Go Back   Cockos Confederated Forums > REAPER Forums > REAPER Bug Reports

Reply
 
Thread Tools Display Modes
Old 10-14-2016, 06:42 PM   #1
motmeister
Human being with feelings
 
motmeister's Avatar
 
Join Date: Apr 2015
Posts: 8
Default musicXML import not honoring MIDI channel (FIXED)

I used PrintMusic 2014 to create a two measure, two stave composition.

Staff 1 was assigned in PrintMusic to MIDI channel 1.

Staff 2 was assigned in PrintMusic to MIDI channel 2.

I exported the composition to MusicXML.

I examined the resulting MusicXML file and it showed that the parts were properly showing the MIDI channels as I assigned them.

I'm running REAPER v5.26/x64 rev 62afe3 (Oct 5 2016)

I opened an empty new REAPER project and did Import Media File of the MusicXML file created above.

At the MIDI File Import dialog box I selected Expand 2 MIDI tracks to new REAPER tracks.

I opened each of the resulting MIDI files in the editor and viewed them in Event View Mode.

Both show all MIDI events on MIDI channel 1.

------------------

I did a second test where I UNchecked the Expand MIDI tracks option, and only the first of the two parts from the MusicXML file was imported.

--------------------------------------------

I apologize if this is duplicating someone else's post, but I searched as well as I could looking for other reports of this kind but was unable to find any.

I will provide the text of the MusicXML file at the end of this post if it will be of any help.

It's fairly important to me that MusicXML MIDI channels be honored and carried into the REAPER import, because I compose in PrintMusic and import to REAPER.

I'm a new poster to this forum so please be kind. If I've broken any protocols for posting please let me know and I'll adjust accordingly.

Regards
Dennis Schaefer

The MusicXML file is posted below the line...
--------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 3.0 Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd">
<score-partwise version="3.0">
<identification>
<encoding>
<software>PrintMusic 2014 for Windows</software>
<software>Dolet Light for PrintMusic 2014</software>
<encoding-date>2016-10-14</encoding-date>
<supports attribute="new-system" element="print" type="yes" value="yes"/>
<supports attribute="new-page" element="print" type="yes" value="yes"/>
<supports element="accidental" type="yes"/>
<supports element="beam" type="yes"/>
<supports element="stem" type="yes"/>
</encoding>
</identification>
<defaults>
<scaling>
<millimeters>7.2319</millimeters>
<tenths>40</tenths>
</scaling>
<page-layout>
<page-height>1545</page-height>
<page-width>1194</page-width>
<page-margins type="both">
<left-margin>70</left-margin>
<right-margin>70</right-margin>
<top-margin>88</top-margin>
<bottom-margin>88</bottom-margin>
</page-margins>
</page-layout>
<system-layout>
<system-margins>
<left-margin>0</left-margin>
<right-margin>0</right-margin>
</system-margins>
<system-distance>121</system-distance>
<top-system-distance>70</top-system-distance>
</system-layout>
<staff-layout>
<staff-distance>80</staff-distance>
</staff-layout>
<appearance>
<line-width type="stem">0.7487</line-width>
<line-width type="beam">5</line-width>
<line-width type="staff">0.7487</line-width>
<line-width type="light barline">0.7487</line-width>
<line-width type="heavy barline">5</line-width>
<line-width type="leger">0.7487</line-width>
<line-width type="ending">0.7487</line-width>
<line-width type="wedge">0.7487</line-width>
<line-width type="enclosure">0.7487</line-width>
<line-width type="tuplet bracket">0.7487</line-width>
<note-size type="grace">60</note-size>
<note-size type="cue">60</note-size>
<distance type="hyphen">120</distance>
<distance type="beam">8</distance>
</appearance>
<music-font font-family="Maestro,engraved" font-size="20.5"/>
<word-font font-family="Times New Roman" font-size="10.25"/>
</defaults>
<credit page="1">
<credit-words default-x="70" default-y="1453" font-size="12" valign="top">Score</credit-words>
</credit>
<part-list>
<part-group number="1" type="start">
<group-symbol default-x="-5">bracket</group-symbol>
<group-barline>yes</group-barline>
</part-group>
<score-part id="P1">
<part-name print-object="no">MusicXML Part</part-name>
<score-instrument id="P1-I1">
<instrument-name>SmartMusic SoftSynth 1</instrument-name>
</score-instrument>
<midi-instrument id="P1-I1">
<midi-channel>1</midi-channel>
<midi-bank>15489</midi-bank>
<midi-program>1</midi-program>
<volume>80</volume>
<pan>0</pan>
</midi-instrument>
</score-part>
<score-part id="P2">
<part-name print-object="no">MusicXML Part</part-name>
<score-instrument id="P2-I2">
<instrument-name>None</instrument-name>
</score-instrument>
<midi-instrument id="P2-I2">
<midi-channel>2</midi-channel>
<midi-program>1</midi-program>
<volume>80</volume>
<pan>0</pan>
</midi-instrument>
</score-part>
<part-group number="1" type="stop"/>
</part-list>
<!--================================================== =======-->
<part id="P1">
<measure number="1" width="527">
<print>
<system-layout>
<system-margins>
<left-margin>70</left-margin>
<right-margin>0</right-margin>
</system-margins>
<top-system-distance>211</top-system-distance>
</system-layout>
<measure-numbering>system</measure-numbering>
</print>
<attributes>
<divisions>2</divisions>
<key>
<fifths>0</fifths>
<mode>major</mode>
</key>
<time>
<beats>4</beats>
<beat-type>4</beat-type>
</time>
<clef>
<sign>G</sign>
<line>2</line>
</clef>
</attributes>
<sound tempo="120"/>
<note default-x="84">
<pitch>
<step>G</step>
<octave>4</octave>
</pitch>
<duration>8</duration>
<voice>1</voice>
<type>whole</type>
</note>
</measure>
<!--================================================== =====-->
<measure number="2" width="456">
<note default-x="14">
<pitch>
<step>A</step>
<octave>4</octave>
</pitch>
<duration>8</duration>
<voice>1</voice>
<type>whole</type>
</note>
<barline location="right">
<bar-style>light-heavy</bar-style>
</barline>
</measure>
</part>
<!--================================================== =======-->
<part id="P2">
<measure number="1" width="527">
<print>
<measure-numbering>none</measure-numbering>
</print>
<attributes>
<divisions>2</divisions>
<key>
<fifths>0</fifths>
<mode>major</mode>
</key>
<time>
<beats>4</beats>
<beat-type>4</beat-type>
</time>
<clef>
<sign>G</sign>
<line>2</line>
</clef>
</attributes>
<sound tempo="120"/>
<note default-x="84">
<pitch>
<step>C</step>
<octave>5</octave>
</pitch>
<duration>8</duration>
<voice>1</voice>
<type>whole</type>
</note>
</measure>
<!--================================================== =====-->
<measure number="2" width="456">
<note default-x="14">
<pitch>
<step>D</step>
<octave>5</octave>
</pitch>
<duration>8</duration>
<voice>1</voice>
<type>whole</type>
</note>
<barline location="right">
<bar-style>light-heavy</bar-style>
</barline>
</measure>
</part>
<!--================================================== =======-->
</score-partwise>
motmeister is offline   Reply With Quote
Old 10-14-2016, 07:07 PM   #2
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 8,869
Default

Thanks for the report. Our MusicXML import looks for an "instrument" element for each note to determine which channel to assign. This file does not contain instrument elements, but since it defines only one channel for each of the two parts of the score, there is enough information for us to assign channels. We'll add support for this in the next build.
schwa is offline   Reply With Quote
Old 10-14-2016, 09:22 PM   #3
motmeister
Human being with feelings
 
motmeister's Avatar
 
Join Date: Apr 2015
Posts: 8
Default quick reply!

Thanks for your quick reply!

I've spent some time since your response looking at the MusicXML standard. I'm still looking for a sample of how an "instrument" is used at the note level. No luck so far.

For translating compositions written in Finale/PrintMusic/etc, when you create an instrument, the programs add a part and assign it to the next MIDI channel. You can't specify different notes in the same part to a different MIDI channel, so on the export to MusicXML, everything's done by part. I have an easy workaround for now. I can import to REAPER, let the parts split to different tracks, edit the MIDI for each track and change the MIDI channels as appropriate, then glue them back together.

I appreciate your willingness to take this on in the new release! It just shows that support for REAPER is at a tremendously high level. You guys are brave to take on MusicXML support. It's a mean and ugly beast. I'm a software engineer, and the complexities of the MusicXML standard make me cringe.
motmeister is offline   Reply With Quote
Old 10-15-2016, 04:33 AM   #4
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 8,869
Default

You can export a single track containing multiple MIDI channels from REAPER to see an example of notes using the <instrument> element.

In any case, the default channel change is done for the next prerelease build which should be available today or tomorrow.
schwa is offline   Reply With Quote
Old 10-15-2016, 04:36 AM   #5
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 8,869
Default

Ironically, we added MusicXML export before PDF export because we (I) thought it would be simpler, not knowing anything about the PDF format. Then PDF turned out to be almost trivially simple.
schwa is offline   Reply With Quote
Old 10-15-2016, 06:47 AM   #6
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 5,652
Default

Quote:
Originally Posted by schwa View Post
Ironically, we added MusicXML export before PDF export because we (I) thought it would be simpler, not knowing anything about the PDF format. Then PDF turned out to be almost trivially simple.
Thanks schwa for the excellent work with the notation!
__________________
Reaper x64, win 8.1
G-Sun.no - Music Blog - My music
G-Sun is online now   Reply With Quote
Old 10-15-2016, 03:01 PM   #7
motmeister
Human being with feelings
 
motmeister's Avatar
 
Join Date: Apr 2015
Posts: 8
Default test on 5.27 PRE6 looks good!

Thanks! Great job!

One additional note. With a multichannel MIDI file import, you have the option "Import 3-channel MIDI as: Multichannel item on a single track." Such is not the case with MusicXML. If you uncheck the Expand to multiple tracks option, it just imports the first of the three channels.

Should the functionality of both importants be substantially the same?

Thanks again. I'm totally blown away with being able to interact with a developer at this level!
motmeister is offline   Reply With Quote
Old 10-15-2016, 06:49 PM   #8
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 8,869
Default

Quote:
Originally Posted by motmeister View Post
Should the functionality of both importants be substantially the same?
OK, yes.
schwa is offline   Reply With Quote
Old 10-18-2016, 11:36 AM   #9
motmeister
Human being with feelings
 
motmeister's Avatar
 
Join Date: Apr 2015
Posts: 8
Default Looks great!

All looks good in reaper527rc2_x64-install!

Thanks!
motmeister is offline   Reply With Quote
Reply

Tags
channel, import, midi, musicxml

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 08:06 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.