Hello Ben,

On Thu, Jun 23, 2016 at 6:47 PM, Ben Gonzales <b...@gonzos.net> wrote:

> Hi Chris and Jean-Jaques.
>
> Thank you for your excellent responses.  I have been using CC11, and have
> programmed it into my EWI-USB. Here is my project site:
>
> http://projects.gonzos.net/ewi-pi/
>
> The original poster on this thread, fenderbenders, has one of my RPi
> configurations, but he would like to use CC2, and I presume that was the
> reason for his enquiry. I haven't done much with soundfonts, so I decided
> to try to modify my soundfont to accommodate the CC2, but ran into
> difficulties, hence my questions.
>
>

If you are just using straight FluidSynth you could probably use the MIDI
router, if it is just a matter of remapping CC2 to CC11.  Sorry if I'm
oversimplifying the task, I haven't been paying much attention to this
email thread.

These commands would translate CC2 controller messages to CC11.

router_begin cc
router_par1 2 2 0 11
router_end

The router_par1 command takes the first parameter of the CC command (the CC
number itself) and checks to see if it is between min and max (2 2), so it
will only match CC2.  It then multiplies it by 0, which makes it 0 and then
adds 11 to make it CC11 and passes it along to the synth with whatever
value it had.  You could also alter the value if need be using the
router_par2 command I believe.


Your answers have helped a lot, but there is still one issue that I don't
> understand. See the yellow arrow in the screen-shot in the following link:
>
> http://gonzos.net/fluid-dev/swami-modulator.png
>
> I don't know what the second controller in the "Amount source" does. That
> was my Q3 earlier, but I don't think I explained myself well enough.
> Hopefully the picture will clarify what I'm after.
>
>

The Amount Source is just an additional control source.  Modulators allow
for up to 2 control sources.  Each of these sources get mapped to a value
between -1 and 1 according to the mapping function applied to the source
(linear/concave/convex/switch, bipolar/unipolar, increasing/decreasing,
etc).  Both sources then get multipled together and also get multiplied by
the amount value before being added to the destination generator (synthesis
parameter).  Each modulator has an additive effect on the resulting value.
There are a bunch of default modulators which cause SoundFont instruments
to respond to some of the defined MIDI controllers as expected (volume
control, pitch bender, etc).  When attempting to modify one of these, you
have to first define a modulator which reverses the effect of the default
modulator (adds a value with the opposite sign).  Then you can define a new
modulator which has the desired effect, otherwise both modulators will be
active (the default one and the user defined one).

Swami really needs to show these default modulators and allow for easily
negating them.  This is on my TODO list.  Otherwise its rather complicated
figuring out what the default modulators are and adding one which negates
it's effect (see section 8.4 on page 41 of the SoundFont 2.4 spec
http://freepats.zenvoid.org/sf2/sfspec24.pdf).

More details on the modulator mathematical model can be found in section
"9.5.1 Controller Model Theory of Operation" on page 51.  There are of
course many other details in the specification as well.



> On a side note, is there a good reference for using SWAMI? It's a
> fantastic program, but I don't understand a lot of what it does.
>
>

No, there is no user manual currently unfortunately, yet another TODO
item.  A README file is in the source code, but it is pretty outdated at
this point, but may provide some helpful info:
https://sourceforge.net/p/swami/code/ci/master/tree/swami/README

Feel free to ask questions on the swami-devel mailing list.  Me or someone
else will be happy to help.

Best regards,

Element Green




> Ben
>
>
> On 23/06/16 19:40, jean-jacques.ceresa wrote:
>
>> Hi, Ben
>> >Q1: Is the modulator best applied at the Instrument or Preset level?
>> Instrument Level (as indicated in the document posted with the patch).
>>
>> >Q2: I can't find "Initial attenuation" as a destination, only
>> "attenuation" I assume they are different?
>> No, in SF2.01 there are only one generator to control dynamic it is named
>> "Inital Attenuation".
>> This is the "Attenuation" considered by the synthesizer  at noteOn time
>> (assuming a value velocity 127). Once the note is started,
>> this Attenuation value can be modulated by another source (i.e breath
>> controler) if this modulator is present in the soundfont.
>>
>> >Q3: What does the "amount controller" do?
>> Amount is a modulator parameter,in short it will works like that.
>> - Ouput modulator = Input source (i.e Breath CC value) x amount.
>> - Input Destination generator (i.e attenuation) = Output modulator.
>> For example, with a amount of 960 (cB), an  input source range from [0 to
>> 127] will be mapped to attenution range [960 to 0].
>> To get this result put theses others useful modulator parameters: Shape:
>> concave,  Polarity: unipolar, Direction: negative.
>>
>> jjc
>>
>> Le 23/06/2016 08:38, Ben Gonzales a écrit :
>>
>>> Thanks.
>>>
>>> Note: I get 2 duplicate messages from you. Is it me or you?
>>>
>>> Q1: Is the modulator best applied at the Instrument or Preset level?
>>>
>>> Q2: I can't find "Initial attenuation" as a destination, only
>>> "attenuation" I assume they are different?
>>>
>>> Q3: What does the "amount controller" do?
>>>
>>> Ben
>>>
>>> On 23/06/16 16:12, S. Christian Collins wrote:
>>>
>>>> Yes, "initial attenuation" with the amount "960" (the measurement is in
>>>> centiBels).
>>>>
>>>> -~Chris
>>>>
>>>>
>>>> On 06/23/2016 12:37 AM, Ben Gonzales wrote:
>>>>
>>>>> Hi Chris.
>>>>>
>>>>> Aha! You sound like someone who might know what to do... I was in the
>>>>> process of working my way through how to do that particular modulator
>>>>> addition. Using SWAMI I'd figured out the concave unipolar negative curve
>>>>> with CC2 as the source, and figured that it should drive the volume
>>>>> attenuation, but couldn't work out what the amount source controller does.
>>>>> SWAMI appears to give the facility to multiply the source controller by 
>>>>> the
>>>>> amount source controller by the amount. But I don't see why you need an
>>>>> amount source controller, or what controller you'd use.
>>>>>
>>>>> I see also that JJ Ceresa has just put in a patch for legato which
>>>>> mentions the "initial attenuation". That sounds like it would be a good
>>>>> target too.
>>>>>
>>>>> Can you offer any advice?
>>>>>
>>>>> Ben
>>>>>
>>>>> On 23/06/16 15:16, S. Christian Collins wrote:
>>>>>
>>>>>> I already responded to your question to the group on this matter. Did
>>>>>> you not see it? There is no default modulator in the SoundFont spec for 
>>>>>> CC
>>>>>> #2 (breath controller), so support must be added to the SoundFont preset
>>>>>> itself using a modulator (CC#2 to attenuation, 96 dB using concave 
>>>>>> negative
>>>>>> unipolar curve). Either that or use a MIDI routing program to filter all 
>>>>>> CC
>>>>>> #2 messages to CC #11 instead, since the SoundFont spec does feature a
>>>>>> default modulator that makes CC #11 control the instrument's volume.
>>>>>>
>>>>>> -~Chris
>>>>>>
>>>>>>
>>>>>> On 06/22/2016 10:52 PM, FenderBenders wrote:
>>>>>>
>>>>>>> Would it be possible to implement continuous controller #2 (breath
>>>>>>> control) in fluidsynth.
>>>>>>> Sent from Samsung mobile
>>>>>>> _______________________________________________
>>>>>>>
>>>>>>
_______________________________________________
fluid-dev mailing list
fluid-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/fluid-dev

Reply via email to