Percussion stave plays piano notes on attached midi keyboard rather than drum sounds

• Nov 16, 2011 - 18:26

I am running version 1.1 on Ubuntu. Whilst I can can get percussion sounds to come out of the soundcard on my desktop system (using Musescore's synthesizer for playback I suspect). When I copy the file over to the laptop to which my Casio PX-330 keyboard is attached the percussion track plays using a piano sound. In order to get the laptop to play the piano staves I have turned on jack midi output in preferences and routed the output to the usb midi port in the Jack patchbay. This works fine but has the effect of disabling the normal sound card output route (ALSA I think) that Musescore is using for synthesizer playback. This means that the synthesizer display is greyed out in MuseScore and the Instrument names in the mixer are blank. This may be of no relevance to my main problem which is that the drum stave now plays through the PX330 as though it was a piano stave, but I have mentioned it here for information.

I thought I may be able to fix this by re-enabling the synthesizer. I did this by setting up the Jack option in the Playback section of the preferences and routing the two channels to the two default Jack system playback ports. This re-enabled the synthesizer display and corrected the mixer display to show the correct midi instruments. However the percussion stave still played as a piano via the PX330.

I am not bothered about the output from the laptop sound card (I have it muted) but how can I get the right instrument voices coming out of the PX330.

Thanks

Roger


Comments

I had the same problem when saving my composition as a midi-file and doing some editing in anvil studio.
If i put the percussion on channel 10 (in anvil studio), it works fine.

Probably this is again an argument to consider an option in Musescore to set the channels per instrument in the mixer panel?

It's almost certainly a MIDI patch change problem that you are encountering.

I've taken a peek at the PX-330 pdf online manual, and in order to set a drumset you need to send a Bank Select of 120 followed by the program change.

In General MIDI, channel 10 is configured as the the drum channel by default, but some GM devices can change the drum channel by means of a Bank select message like your PX-330

I'm not quite sure of the MIDI engine in MuseScore, but I suspect that it is either not defaulting the drum channel to 10, or is not sending a Bank Select message that your PX-330 recognises to activate a drum channel.

On checking the TimGM6mb Soundfont in Vienna, it appears that a drum channel is sent with a Bank Select message of 128. This is normal practice for extended GM devices.

So this is the reason why you drums sound like pianos - it is because you are using a GM incompatible keyboard.

You will therefore need to set the drum channel bank select manually from your PX-330 UI

HTH
Michael

Thanks for the replies.

I had a look at the PX-330 manual and as I suspected I cannot find a way of changing the drum bank via the UI.

My next thought is that I should be able to correct this by changing the bank number in the midi data stream by using some sort of filter in Jack. I had a quick search round to see if there was anything out there that I could use rather than writing one myself. I came across "mididings" which would appear to be able to do the trick. It is a Python based mid filter that can run in Jack.

My guess is, I filter for bank select messages on channel 10 and then change the bank parameter from 128 to 120. How does that sound? Comments anyone?

So it is time to dust off my Python manual. It will make a change from practicing the Chopin Mazurka that is driving me mad anyway!

Or maybe I can do this by customizing the SoundFont?

Roger

A further update.

I decided to have a look at what midi events musescore was actually sending. So I connected a midi monitor (gmidimonitor) to the musescore midi output in jack.

I cannot see any relevant bank changes going on. All I see is note output on channel 2. This is the same whether I play the score, or I select drum notes in the drum panel. So at the moment it doesn't look like a midi filter will work.

Anyone got any ideas?

Roger

In reply to by ChurchOrganist

As far as I know MuseScore sends MIDI data via Jack MIDI this way :
- First staff -> Channel 1
- Second staff -> Channel 2 etc...
Only exception is Channel 10 for percussion and instruments like Trumpet or violin that can take more than one channel (normal, mute for trumpet and normal, pizz, tremolo for violin)

In reply to by [DELETED] 5

This agrees with the test MIDI file I dumped out of MuseScore into Sonar 3 last night.

MuseScore is sending drum channel notes on Channel 10, which is the default percussion channel in General MIDI.

It is not sending Bank Select messages, just Program Change and Reverb and Chorus settings.

So we need to delve a little further into the PX-330 MIDI implementation chart :)

I hope I saved a copy.

I think there is a difference between midi export and and midi playback in MuseScore.
Unfortunately I cannot test both on the same system.
On my desktop (which cannot run jack for some reason) I made a little test score with a single stave with the instrument set to snare drum. Drum sounds came out as expected via my sound card when played and edited. The score exported to midi like this.

Header format=1 ntrks=1 division=480
Track start
Time=0 Meta Text, type=0x08 (Unrecognized) leng=16
Text =
Time=0 Time signature=4/4 MIDI-clocks/click=24 32nd-notes/24-MIDI-clocks=8
Time=0 Key signature, sharp/flats=0 minor=0
Time=0 Program, chan=10 program=0
Time=0 Note on, chan=10 pitch=38 vol=80
Time=2 Parameter, chan=10 c1=7 c2=100
Time=4 Parameter, chan=10 c1=10 c2=64
Time=6 Parameter, chan=10 c1=91 c2=30
Time=8 Parameter, chan=10 c1=93 c2=30
Time=479 Note on, chan=10 pitch=38 vol=0
Time=480 Note on, chan=10 pitch=38 vol=80
Time=959 Note on, chan=10 pitch=38 vol=0
Time=960 Note on, chan=10 pitch=38 vol=80
Time=1439 Note on, chan=10 pitch=38 vol=0
Time=1440 Note on, chan=10 pitch=38 vol=80
Time=1919 Note on, chan=10 pitch=38 vol=0
Time=1920 Meta event, end of track
Track end

Note there does not appear to be any bank selection going on. Putting this midi file on an sd card, plugging this card in the keyboard does give percussion sounds when played directly.

On my laptop which can run jack and is connected to my keyboard. This score shows only notes on channel 1 on the midi monitor when it is played back.
Roger

Do you still have an unanswered question? Please log in first to post your question.