< Back to IRCAM Forum

Question: Converting .xml to actions

Hello, I was wondering if I have 3 .xml files of a short Bach invention, one being the top (right hand) part of the piece, the other being the bottom (left hand) part, and a third file that has both parts together, is there any way that I can easily generate the actions that will perform the bottom part along with me as I play the top part? Or, do I have to tediously hand code every single note of the bottom part?

Any help here would be greatly appreciated!
Thank you!

Hello,

the feature you ask is not available now, but we plan to add it in some future release.

By now, I suggest to have a look on regular expressions, for instance with a text editor like Textwrangler:
http://www.anybrowser.org/bbedit/grep.shtml

Using such tools you can easily convert NOTE events like

NOTE 6600 2
NOTE 6800 1
NOTE 6600 1

into a action with delay
mnote(6600,2)
2 mnote(6800,1)
1 mnote(6600,1)

where mnote may be a Antescofo process, macro or function that triggers a MIDI note by sending a message to Max. (you have to define it according to the Max object and patch you use to synthesize sounds; have a look on Antescofo documentation for more details on them)

Once you have converted the accompaniment score, you just have to gather these actions into a single group
group midinotes @tight @local
{
mnote(6600,2)
2 mnote(6800,1)
1 mnote(6600,1)
}

then copy/paste this group under the first note of your event score.

Ask for details if something is not clear.