[Top][All Lists]

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

Re: [fluid-dev] invalid instrument/drum selection problem

From: Josh Green
Subject: Re: [fluid-dev] invalid instrument/drum selection problem
Date: Wed, 09 Jan 2008 02:11:27 -0800

Hello Jimmy,

On Mon, 2008-01-07 at 16:15 -0800, jimmy wrote:
> For quick test, I use Kmid to play the MIDI files,
> connect to Qsynth/FluidSynth wiht QJackctl.  I drag
> the MIDI file to Kmid and it interrupts the existing
> playing, starting to play the new file.  So probably
> Fluidsynth doesn't know much (or just guessing) about
> a new file being played.
> But how about using FluidSynth as a sound module for
> praticing or live playing?  If a song/accompaniment
> ends, I may still want to have my preloaded
> instruments exactly the way they are, so I can
> continue on to the next song and not have to reselect
> all the instruments again.

If MIDI files were played directly with FluidSynth, then it would have a
concept of when a new one started and could reset accordingly.  In the
case where the MIDI sequencer of FluidSynth isn't being used, then it
could still listen for SYSEX messages requesting GM, GS or other modes.
Not all MIDI files have them, but I have seen quite a few of them that

> If I misunderstand the purpose of that flag, my bad. 
> Maybe we need a new/different variable/constant.

No you were right.  The code was not correct.  It shouldn't be used as a
flag at all though, but instead as a constant value of 128.  From what I
can tell SoundFont isn't supposed to have any bank #s above 128.

> I think the single midi file in my first post on this
> list uses a program change on drum channel with bank
> number less than 128 (I suppose GS instruments can
> accommodate drum channel offset of 128), that's what
> led me to think the flag value should be 128. 
> Especially where it is being used, to check for a
> valid drum bank.  I think I might have seen drum, or
> special effect bank number 129 before.  That's why I
> think it is an offset, not an absolute number 128. 
> Thus the use of "|" or "+" 128 in my code patch.

I would be really curious to see a SoundFont that has a bank # above 128
and what software created it.  The format itself can do it, but the
standard says its not supposed to sound.  If you see one, do let me

> So even if GS spec says to use instrument [0 0], the
> keyboard/sound module maps the drum channel to the
> equivalent of [128 0].  The [128 0] is the same thing
> if used in other channels.  That's how I interpret the
> GS or any other specs, because drum channel should
> never use a bank below 128 - unless there is no bank
> 128, of course.

Agreed, in GM/GS mode FluidSynth should behave that way.  I would like
to keep it general purpose though too, so that if someone wants to do
something else with Channel #10 than percussion, they can.

> Jimmy

Best regards,

reply via email to

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