Switch track imported from MIDI channel 10 to bank 128, patch 0 in SF2 player.

(aka. import drum tracks)
This commit is contained in:
Raine M. Ekman
2015-01-14 22:01:42 +02:00
parent 030292cbad
commit 26a84837c2

View File

@@ -497,6 +497,15 @@ bool MidiImport::readSMF( TrackContainer* tc )
}
}
// Set channel 10 to drums as per General MIDI's orders
if( chs[9].hasNotes && chs[9].it_inst && chs[9].isSF2 )
{
// AFAIK, 128 should be the standard bank for drums in SF2.
// If not, this has to be made configurable.
chs[9].it_inst->childModel( "bank" )->setValue( 128 );
chs[9].it_inst->childModel( "patch" )->setValue( 0 );
}
return true;
}