Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XG drumsets problem #228

Closed
ziyamete opened this issue Oct 5, 2017 · 10 comments
Closed

XG drumsets problem #228

ziyamete opened this issue Oct 5, 2017 · 10 comments
Labels

Comments

@ziyamete
Copy link

ziyamete commented Oct 5, 2017

ver:1.1.6 and 1.1.7
win7, 32

fluidsynth: warning: Instrument not found on channel 5 [bank=127 prog=0], subs
tituted [bank=0 prog=0]

bank 127 for XG drumkits.
correct fallback for drumkits is: bank=128, program=x


and yes; any channel can be used as drum channel.

@derselbst
Copy link
Member

Does XG use CC32 or CC0 for bank selection? Because documentation for synth.midi-bank-select says it uses CC32 while CC0 is ignored. However the decision made whether it's a drum channel or melodic channel is implemented for CC0 (Bank MSB):

fluid_channel_set_bank_msb(fluid_channel_t* chan, int bankmsb)
{
int oldval, newval, style;
style = chan->synth->bank_select;
if (style == FLUID_BANK_STYLE_XG)
{
/* XG bank, do drum-channel auto-switch */
/* The number "120" was based on several keyboards having drums at 120 - 127,
reference: http://lists.nongnu.org/archive/html/fluid-dev/2011-02/msg00003.html */
chan->channel_type = (120 <= bankmsb) ? CHANNEL_TYPE_DRUM : CHANNEL_TYPE_MELODIC;
return;
}

@ziyamete
Copy link
Author

ziyamete commented Oct 5, 2017

For XG DrumKits: CC0=127, CC32=0, PgCh=xxx
For XG SFXKits: CC0=126, CC32=0, PgCh=xxx
For XG Melodic Banks: CC0=0, CC32=BankNo, PgChg=xx

@derselbst
Copy link
Member

Ok. It seems to me that you were only using CC32 and set it to 127. But CC0 decides on whether the channel is drum or meldoic, which in turn influences the bank fallback. Or if you were using CC0 you have not specified -o synth.midi-bank-select=xg when starting fluidsynth.

Thus: How did you start fluidsynth? And perhaps provide a simple test midi.

@ziyamete
Copy link
Author

ziyamete commented Oct 6, 2017

This is Original Yamaha PSR-7300 Demo file, for testing.
Techno.S484.MID.zip

starting: (nothing special)
fluidsynth -f fluid.ini "G:\SF2\Some.sf2" midifile.mid

fluid.ini: (just reverb, gain and interp. settings)
gain 0.5
interp 7
reverb 1
rev_setroomsize 0.8
rev_setdamp 0.3
rev_setwidth 0.5
rev_setlevel 0.5


I'm creating Soundfonts.
I'm looking at the behaviors of the different SNYTHs. (Falcosoft Midi Player, Virtual Midi Synth, XMPlay, Fluidsynth, Vienna, BASS etc.)
midi files I use to test : Roland original, Yamaha original demo files.
In addition, the various files that come with the synths and other soundfonts.

@derselbst
Copy link
Member

Without having actually tested it: You're missing to specify the midi bank selection. You have to start it like

fluidsynth -f fluid.ini -o synth.midi-bank-select=xg "G:\SF2\Some.sf2" midifile.mid

Otherwise it defaults to GS bank selection. See fluidsynth manpage or http://www.fluidsynth.org/api/index.html#CreatingSynth

@ziyamete
Copy link
Author

ziyamete commented Oct 6, 2017

This parameter working good.
But can't fluidsynth do this automatically (detect inside)?
Because "banks (126, 127, 120, 121 and 128)" are special banks.

PS:
Maybe, selecting the wrong file when attaching the midi file.; I meant this file. (Sorry)
JazzGuitar.S084.MID.zip

@derselbst
Copy link
Member

derselbst commented Oct 6, 2017

But can't fluidsynth do this automatically (detect inside)?

Impossible. Given the 4 different bank selection supported, these are 4 different ways to interpret CC0 and CC32. The semantic of these controllers must be provided by the user.

Because "banks (126, 127, 120, 121 and 128)" are special banks.

They are not so special in MMA mode for instance.

@ziyamete
Copy link
Author

ziyamete commented Oct 7, 2017

Okay, I got it.

If you have a playlist and you send it to FluidSynth, you have to say "this file xg, this, gm, this gs, this mma" every time.

I know up to two people who can do this: one is me and the other is you.

Thanks for your interest.

@derselbst
Copy link
Member

If you have a playlist and you send it to FluidSynth, you have to say "this file xg, this, gm, this gs, this mma" every time.

Unfortunately yes. It's not standardized by MIDI, so every file may handle this differently.

@derselbst
Copy link
Member

Closing as invalid.

derselbst added a commit that referenced this issue Oct 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants