Louis 1> We need to produce a custom soundfont for breath data.
This is the best that any MIDI breath controler player can do (EVI,EWI..). I am not a EWI player (guitar,piano only), but sharing ideas is a great pleasure.
I hope that others EWI players will read your mail !.
Louis 2> cannot get a usable MIDI note .....I suggest we hardcode the velocity to 50%....
a)Assuming Initial_attenuation at 0 (no attenuation on volume adrs output), fixed velocity, fixed volume and breath mapped to CC _expression_
If you set 50 % fixed velocity, you will get 50% sound level when breath reach 100% ( assuming CC Volume fixed at 100%).
With this setting: for a breath from 0 to 100%, you will get a sound level from 0 to 50%
Now, if volume is set to 50%, for a breath from 0 to 100%, you will get a sound level from 0 to 25% ! (a low level )
Be aware that that the sound level will be never higher than the velocity value or volume value.
Remember the relation: Note level = Voice0 level + Voice1 level + ....(One or more voice described in soundfont)
voice0 level = adrsOut0 x InitialAttenuation0 x VelocityFixed x Breath x Volume
voice1 level = adrsOut1 x InitialAttenuation1 x VelocityFixed x Breath x Volume
Velocity, Breath and volume are common factor for all voices. But InitialAttenuation is a private factor for this voice, so voices level may be distinct if needed.
PeakLevel at adsrOut is a common factor for all voices. Of course ADSR shape may be private for this voice.
b)Warning. if the soundfont have a custom modulator of the same name than the default modulator this default modulator will be replaced by the custom one!
Louis 3> We need to get fluidsynth accurately adjust the amplitude to track the breath data......
This is the case, as far Breath can be a CC source modulator, with "Intial Attenuation" generator as the destination of this modulator.(i.e as in (a) ).
Be aware that the modulator curve shape at input (Breath) is actually concave, but you can change it to linear or other shape, but you cannot
define your own shape. I found, this is a limitation in Soundfonts 2.0 from the start (1996). I'am supprised that there is no other SF versions to integrate this
Louis 4>Overlapping or Linked notes or Legato notes.......could fluidsynth play note B not from the beginning but as if note ............
a)Actally FluidSynth (FS) have no monophic mode so ADSR generator are always triggered the same way on consecutives notes n1,n2 which is not convenient for monophonic
instrument when n1 is the first note of a begining phrase played legato with next ones (n2,n3..). I think that with additional support, FS could do the job, but this request careful
design. I am not a FS maintainer but, i am actually working to write a document with specifications and making a proposal. This is the reason of the initial mail of this discussion.
b)A true monophonic mode would allow note n1 with ADSR and note n2 with no peak (i.e with attack that reach the sustain level of previous note n1, with or without
retriggering attack). In others word only the first note will have a peak in ADSR but not the next ones (when played legato). This kind of monophonic mode seem to be necessary
for MIDI polyphonic controler (i.e keyboard).
c)For MIDI monophonic controler (EVI,EWI) we remark that both, this monohonic mode and the volume ADSR generator presence assist the player (adding artificial tonging ) when
playing the first note n1. This "artificial tonging" is added to the "player tonging". But what happens if the player want to play the first note n1 without tonging ?. In this case the note
will sound with unwanted "artificial tonging". Of course the player can correct with a low breath to diminish this "artificial tonging".
c1) Is this unwanted "artificial tonging" an inconvenient ?
c2) When the player want to get a "tonging sound", is this added "artificial tonging" benefic ?
c3) I wonder if there is case where the player prefer no added ADSR, being himself a human ADSR generator ?
Notes: It is possible to design a sound with no ADSR effect. To do that the sound designer must set a flat shape (i.e a squared shape).
Louis>OK just to let know I will be away on business next week for three days.
I have had a further play with the ewi and fluidsynth......I get best results setting up the ewi up to used a fixed velocity of 127 and then on the ewi map the breath input to midi _expression_.
Louis, after 3 days business>At the moment when I try connect the EWI to fluidsynth using a fixed velocity and map the breath sensor to MIDI _expression_ (using the EWI) the outputs sound
dead. I am not sure what is wrong.
D'ont forget, both "Fixed velocity" and CC volume > 0 ?