Re: [LAU] Fluidsynth shift an octave down

From: Ken Restivo <ken@email-addr-hidden>
Date: Wed Jan 12 2011 - 11:23:18 EET

On Tue, Jan 11, 2011 at 06:38:21PM +0100, Pedro Lopez-Cabanillas wrote:
> On Tuesday 11 January 2011, you wrote:
> > On Thu, Jan 06, 2011 at 02:09:27PM +0100, Pedro Lopez-Cabanillas wrote:
> > > On Thursday 06 January 2011, Ken Restivo wrote:
> > > > Is there a way in fluidsynth to shift a whole soundfont up or down an octave?
> > > >
> > > > Or would I have to edit the soundfont in Swami and permanently move the notes around?
> > >
> > > You can use FluidSynth's MIDI router. For instance, type the following commands in FS' shell:
> > >
> > > router_clear
> > > router_begin note
> > > router_chan 0 8 1 0
> > > router_par1 12 127 1 -12
> > > router_end
> > >
> > > It transposes notes in channels 1 to 9 one octave down. See also: http://sourceforge.net/apps/trac/fluidsynth/wiki/UserManual#MIDIROUTER
> > >
> >
> > I tried this, and it did indeed shift the notes an octave down, but, it broke fluidsynth so that it doesn't respond to Volume or Expression CC's anymore!
> >
> > Is that a bug in Fluidsynth or am I doing something wrong?
>
> This is the expected behavior. In FluidSynth, "router_clear" deactivates *every* event, not
> only volume or expression controllers. I mean that after the following commands:
>
> router_clear
> router_begin note
> router_end
>
> FluidSynth will recognize notes, but not controllers or program changes, or any other message types. To activate controllers again, you need to execute the commands:
>
> router_begin cc
> router_end
>
> The same for program changes. You can restore them again with:
>
> router_begin prog
> router_end
>
> Complementary of router_clear is the command "router_default", that reassigns all the initial defaults (losing your custom rules).
>

Thanks, that worked!

-ken
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-user
Received on Wed Jan 12 12:15:04 2011

This archive was generated by hypermail 2.1.8 : Wed Jan 12 2011 - 12:15:04 EET