fluid-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [fluid-dev] How can I start fluidsynth playback with certain cc comm


From: Element Green
Subject: Re: [fluid-dev] How can I start fluidsynth playback with certain cc commands specified from the very start?
Date: Sun, 19 Jan 2014 08:47:31 -0700

I suspect that each time a MIDI file is loaded in FluidSynth, it initializes all the controllers to known default values.

There currently aren't any commands within the shell to play MIDI files.  If there was, it would be possible to say something like "play my.mid" and then do your CC commands afterwards.  So it seems like there isn't a very good way to do what you are trying to do at the moment, from the FluidSynth command line application.

An alternative is to use an external MIDI player connected to FluidSynth, such as aplaymidi.  You could then initialize FluidSynth with the settings you want and then play the MIDI file via the external application.  This would retain whatever controller values you assign, except for those which get assigned by the MIDI file.

The MIDI router feature of FluidSynth can probably be used to override CC11 or CC7 assignments.  I just did a search on Google and came up with this thread on fluid-dev.  I thought this topic seemed familiar ;-)

https://lists.gnu.org/archive/html/fluid-dev/2012-02/msg00005.html

So basically what I said above is mostly a repeat of what is in that thread.  Here is a copy paste of the router rules I posted then, which makes any CC7 assignment set the value to 100%.

router_begin cc
router_par1 7 7 1 0
router_par2 0 127 0 127
router_end

And this is for CC 11:

router_begin cc
router_par1 11 11 1 0
router_par2 0 127 0 127
router_end


Description of above rules:
router_par1 sets the CC to modify (first 2 parameters are min/max, which defines a range of CCs to match).  The remaining 2 parameters are multiply and add, so basically multiply the CC controller number by 1 and add 0, which means the CC controller number will be unmodified.

For router_par2, the min and max are 0 and 127, so match any value for the CC and then modify it by multiplying it by 0 (which equals 0) and adding 127.  So the final value will always be 127 regardless of what is assigned.

Best regards,

Element




On Sat, Jan 18, 2014 at 5:59 PM, Martin Larsson <address@hidden> wrote:
Interesting… However, shouldn’t I be able to keep on using midi files with built-in CC#7 commands and resort to manipulating CC#11 instead (rather than forcing my midi-files to use CC#11), even if it’s not the “right” way to do it? I don’t care much for doing things the right way right now; I just want it to work :)

Anyhow, I’m starting to wonder if I can place CC commands in an init file at all. For example, when trying to pan everything to one side by using the CC#10 command in my init file, everything is still centered during playback. Are my CCs being sent before the midi file has been properly set up, and therefore also ignored or reset once playback starts?

On 19 Jan 2014, at 00:42, Jim Henry <address@hidden> wrote:

> The "right" way to do what you want would be for you to use CC 7, channel volume, and the MIDI files to use CC 11, _expression_ controller. The two values are multiplied together and divided by 128 to get the final volume of the channel. If the MIDI files use CC 7 for what is really _expression_ control, then you can use CC 11 to control the channel volume to mix the channels.
>
> Jim Henry
>
> On 1/18/2014 1:58 PM, Martin Larsson wrote:
>> Yes, I can confirm that this is the case for my midi files (which are generated from Lilypond). My CC commands aren’t printed anywhere, but in the list, the following shows up:
>>
>> fluidsynth: cc07100
>> fluidsynth: noteon06490000001.0101.2020.0000
>> fluidsynth: cc17100
>> fluidsynth: noteon16490000011.0101.2030.0001
>> fluidsynth: cc27100
>> fluidsynth: noteon26090000021.0101.2030.0002
>> fluidsynth: cc37100
>> fluidsynth: noteon35790000031.0101.2030.0003
>>
>> So, yes.
>>
>> Is there any way for me to suppress these commands or to make my own commands from the init file appear directly after them (but before the first notes are played)?
>
>
> _______________________________________________
> fluid-dev mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/fluid-dev


_______________________________________________
fluid-dev mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/fluid-dev


reply via email to

[Prev in Thread] Current Thread [Next in Thread]