fluid-dev
[Top][All Lists]
Advanced

[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: Sun, 06 Jan 2008 23:47:05 -0800

Hello Jimmy,

I did a little research into this issue and found that it is a bit more
involved than I had initially thought.  I think it would help to start
with looking at some example problem MIDI files.  Can you point out
specific ones which you are having issues with?

Reading up on the subject of MIDI bank/program switching I came up with
the following information:

There are Sysex messages for switching into GM or GS mode.  Looking at
some of the MIDI files on the web page URL you posted, I found one that
had a GS enable message.  I'm curious how many MIDI files actually have
these.

When in GM mode, bank change messages should be ignored altogether.

Different banks specify different "flavors" of similar sounds.  A sound
module should substitute an instrument with the same program number, if
it does not have one in the requested bank.



I'm not sure yet the best way to handle this in FluidSynth.  I think a
good start would be to listen for the GM and GS sysex init messages
which would modify the behavior accordingly.  Also a command line switch
for selecting among these different standards manually.


GM enable
---------
Initialize all channels except #10 to Program 1 (Grand Piano).
Set channel #10 to bank 128:0
Ignore bank change messages.

GS enable
---------
Setup channels like for GM
Use bank 0 if an invalid bank is selected.


Perhaps substituting bank 0 if an invalid bank/program is selected
should be the default behavior, but that could cause unexpected behavior
if someone isn't using a GM/GS bank.

Any thoughts?  Best regards,
        Josh


On Sun, 2008-01-06 at 16:53 -0800, jimmy wrote:
> Hi Josh,
> 
> Below is the changes I tried.  It does seem to keep
> the existing dromset for any invalid drum-bank
> requests.  Also changed the constant DRUM_INST_MASK ,
> which could potentially requires a re-compile of any
> other programss using this constant.  I think the
> DRUM_INST_MASK should be 128, not a hex number, which
> I believe might have been change along with 8-bit,
> 16-bit, 32-bit porting that now breaks some midi drum
> bank select that needed the 120 offset added in the
> old 7-bit unsigned int days.
> 
> FWIW, you could try the current FluidSynth and this
> patch with the midi files from:
> 
>    geocities.com/timessquare/lair/5396/midipark.html
> 
> they are not mine, and you don't have to try these. 
> In fact, you should try with other midi files you have
> to be sure.
> 
> Jimmy
> 






reply via email to

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