Piano Rendered as Percussion/Drums when Importing MIDI

• Oct 4, 2015 - 18:58

I would like to save a song in MIDI format from my Yamaha DGX-650 keyboard and import it into musescore. When I import the MIDI file into musescore it is imported as percussion, rather than piano.

How can I get it to import properly as piano?

Attachment Size
UserSong5.MID 1.71 KB
screenshot.png 60.87 KB
UserSong5.mscz 8 KB

Comments

I don't know much about such things, but from what I can tell, there is special code in MsueScore to try to recognize some sort of Yamaha-specific information to guess if a MIDI file is meant for drums, and for whatever reason, this particular MIDI file is triggering that code. Something to do with "part mode". If you can find a setting like that on your keyboard, make sure it is set to 0.

In reply to by Marc Sabatella

It's my guess that it is the chunk of SysEx at the beginning of the file that is causing the trouble.

Obviously MuseScore is not interpreting it right.

The section of it which sets part mode is as follows - all is hexadecimal:

F0 43 10 4C 08 00 07 00 F7 
F0 43 10 4C 08 01 07 00 F7 
F0 43 10 4C 08 02 07 00 F7 
F0 43 10 4C 08 03 07 00 F7 
F0 43 10 4C 08 04 07 00 F7 
F0 43 10 4C 08 06 07 00 F7 
F0 43 10 4C 08 07 07 00 F7 
F0 43 10 4C 08 08 07 00 F7 
F0 43 10 4C 08 09 07 02 F7 
F0 43 10 4C 08 0A 07 00 F7 
F0 43 10 4C 08 0B 07 00 F7 
F0 43 10 4C 08 0C 07 00 F7 
F0 43 10 4C 08 0D 07 00 F7 
F0 43 10 4C 08 0E 07 00 F7 
F0 43 10 4C 08 0F 07 00 F7

For those interested - the interpretation of this hexadecimal is as follows.....

The first four bytes F0 43 10 4C are the SysEx Status byte followed By Yamaha's identification stuff, which is why it is the same in each string.

The next 4 bytes do the business....

08 references the XG PARAMETER CHANGE TABLE ( MULTI PART ) the next byte is the channel, the third byte in the chunk is the particular parameter being changed - in this case part mode - the final byte of this chunk sets the part mode then you have the SysEx "End" Status byte.

As you can see the only channel which has part mode set to anything other than 0 (normal) is channel 10 (0x09) which has it set to 2 (Drums 1).

The only channel MuseScore should be interpreting as a Drum Channel is channel 10, but somehow it is applying the partmode message to channel 1 as well.

Presumably whoever coded this didn't understand Yamaha SysEx as well as they thought they did :)

The temporary solution is to use a sequencer to remove the SysEx from the file (which is irrelevant to MuseScore anyway) and re-import it.

PS Indeed that is the solution - MIDI attached :)

Attachment Size
UserSong5noSysEx.mid 1.39 KB

In reply to by stewartb132

Thanks for the help! I created a PHP script based on the information provided by ChurchOrganist. The script targets and replaces the SysEx data which is responsible for this, creating a new file without the issue.
{syntaxhighlighter SPEC}<?php

$data = bin2hex(file_get_contents('song.mid'));

$data = preg_replace('/7e..f700/','7e00f700' ,$data);
$data = preg_replace('/00..f700/','0000f700' ,$data);
$data = preg_replace('/07..f700/','0700f700' ,$data);

file_put_contents('song-fixed.mid', pack("H*" , $data) );

echo 'Done!';

?>{/syntaxhighlighter}

In reply to by stewartb132

As soon as Marc mentioned Yamaha Part Mode I knew this one was part of my remit - in a prior existence as a backing track programmer I was working with Yamaha XG SysEx on a daily basis.

It's not rocket science once you know where to look in the data tables which Yamaha always provide with their keyboards and sound modules.

Took me ten minutes once I'd downloaded the DGX-650 data lists to isolate the problem.

Took me longer to write the post explaining the problem - lol

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