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: jimmy
Subject: Re: [fluid-dev] invalid instrument/drum selection problem
Date: Mon, 7 Jan 2008 16:15:29 -0800 (PST)

--- Josh Green <address@hidden> wrote:
> Cool, thanks for the examples.  Sounds like
> FluidSynth should reset
> itself to a default state each time a new MIDI file
> is started.
> 
> I just tried that last MIDI file and did not
> experience the same issue
> as far as the drums channel #10 getting remapped to
> piano.  I do see
> that it sends some strange bank change messages to
> MIDI channels 7 and 8
> though, which thus become unmapped and not present
> in the song.  It
> looks like its mapping bank 1026 (0x402 hex) which
> corresponds to 0x08
> MSB bank and 0x02 LSB bank values.  That file
> doesn't have any SYSEX
> messages to select what type of module it is though.
>  I'd be curious how
> other MIDI soft synths handle that and what module
> its expecting.

I also used other on-board sounds elsewhere, too.  I'm
not an audiophile for my ears are not that sharp.  I
even hope that an old laptop could be my sound module
for when I travel, vkeybd is a little awkward but
could serve it's purpose away from home.  This one
machine has the on-board sound chip:

   Multimedia audio controller: Intel Corporation
82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller (rev
02)

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.

I use Unison.sf2, because FluidR3_GM.sf2 is just too
big for this 512MB PC with other things also running. 
I also have a similar-speed PC with 256MB Rambus
memory that I haven't used in a while.  I suppose
Unison just doesn't have the drumset used by that MIDI
file.  If you can tell me the drum banks and you have
for your soundfont, I might be able to find a MIDI
file using a non existing drumset.

Or, you can use something like midi to text to midi
converter to change the bank select.  I only saw
something like that, never really used one.

I think Rosegarden has some channel editing info.  Not
sure about drum options there.


> I think that flag was supposed to be used internally
> as a way of marking
> an instrument as percussion.  Its correct as far as
> the DLS standard is
> concerned, but FluidSynth doesn't support DLS
> directly so I'm not sure
> how it made it into the code.  I'd expect that same
> flag to get set in
> some other part of the code though for SoundFont
> files, which isn't the
> case.  So you are right, it probably should be
> changed to 128 and the
> code:
> 
>       /* try to search the drum instrument first */
>       preset = fluid_synth_find_preset(synth,
> banknum | DRUM_INST_MASK, prognum);
> 
> should be changed to:
> 
>       /* try to search the drum instrument first */
>       preset = fluid_synth_find_preset(synth,
> DRUM_INST_BANK, prognum);
> 
> Where DRUM_INST_BANK is 128.
> 
> Cheers!
>       Josh

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

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.

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.

Jimmy



      
____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs




reply via email to

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