Old 08-28-2013, 01:35 PM   #1
Mike@Ossarium
Human being with feelings
 
Mike@Ossarium's Avatar
 
Join Date: Nov 2012
Location: Munich, Germany
Posts: 111
Default MusicXML support

Hello,

i like to add MusicXML support (import/export) to Reaper,
but i think that its more than a simple plug-in.
So - where to start? How could i got access to the Reaper source code?

Best regards,

Michael

Last edited by Mike@Ossarium; 08-29-2013 at 01:57 AM.
Mike@Ossarium is offline   Reply With Quote
Old 08-29-2013, 02:22 AM   #2
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Reaper itself isn't open source, it's a proprietary commercial application. You can only do Reaper specific extension plugins to extend Reaper's features, using the APIs mostly available from the publicly available header files.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 08-29-2013, 03:09 AM   #3
Mike@Ossarium
Human being with feelings
 
Mike@Ossarium's Avatar
 
Join Date: Nov 2012
Location: Munich, Germany
Posts: 111
Default

Do you think that its possible to do the MusicXML extension as a plug-in?
Mike@Ossarium is offline   Reply With Quote
Old 08-29-2013, 04:02 AM   #4
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by Mike@Ossarium View Post
Do you think that its possible to do the MusicXML extension as a plug-in?
It will depend on what you exactly need the plugin do, but I would guess it's mostly possible. Handling MIDI data with the Reaper APIs will be messy and complicated.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 08-30-2013, 01:34 AM   #5
Mike@Ossarium
Human being with feelings
 
Mike@Ossarium's Avatar
 
Join Date: Nov 2012
Location: Munich, Germany
Posts: 111
Default

I like to do the following (raw thoughts):

MusicXML import
-----------------------
- generate new project out of input file
- add midi data to new track
- add midi data to selected track
- add MusicXML 'specials' to track /as new track (in MIDI viewer?)


MusicXML export
-----------------------
Export Track MIDI data
Export Project data


I think my first step will be to add the MusicXML MIDI stuff as a new MIDI item to a track. Any suggestions for that (API functions?)?
Mike@Ossarium is offline   Reply With Quote
Old 09-03-2013, 03:02 AM   #6
airon
Human being with feelings
 
airon's Avatar
 
Join Date: Aug 2006
Location: Berlin
Posts: 11,818
Default

Since the Reaper developers have been banging away at the midi editor for the past months, this may be a good question for them.

They might just implement support themselves if you can convince them on why it's a good idea.
__________________
Using Latch Preview (Video) - Faderport 16 setup for CSI 1.1 , CSI 3.10
Website
"My ego comes pre-shrunk" - Randy Thom
airon is offline   Reply With Quote
Old 09-07-2013, 09:39 AM   #7
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 7,318
Default

+1 from me
__________________
Reaper x64, win 11
Composer, text-writer, producer
Bandcamp
G-Sun is offline   Reply With Quote
Old 10-08-2013, 10:40 AM   #8
paaltio
Human being with feelings
 
Join Date: Aug 2011
Location: Los Angeles, CA
Posts: 314
Default

I've been thinking about doing a MusicXML exporter in Python for REAPER as I frequently need to export stuff to Sibelius and there's no way to assign voices or display quantize in pure MIDI files.

This is pretty far down on the list though, so I won't be getting to it in the next few months. The design needs to be pretty solid -- the last thing a feature like that needs is a couple of edge cases breaking the notation in surprising ways and then delivering incorrect parts to sessions!

Anyone have ideas on how to include the metadata in the REAPER session? Maybe if nothing else just using a frequently unused CC to encode those in. The voicing information would probably have to come from note MIDI channels though, although that's quite non-ideal since obviously they have other uses.
paaltio is online now   Reply With Quote
Old 10-08-2013, 12:23 PM   #9
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 7,318
Default

Quote:
Originally Posted by paaltio View Post
I've been thinking about doing a MusicXML exporter in Python for REAPER as I frequently need to export stuff to Sibelius and there's no way to assign voices or display quantize in pure MIDI files.

This is pretty far down on the list though, so I won't be getting to it in the next few months. The design needs to be pretty solid -- the last thing a feature like that needs is a couple of edge cases breaking the notation in surprising ways and then delivering incorrect parts to sessions!

Anyone have ideas on how to include the metadata in the REAPER session? Maybe if nothing else just using a frequently unused CC to encode those in. The voicing information would probably have to come from note MIDI channels though, although that's quite non-ideal since obviously they have other uses.
What is included in MusicXML and what is not?
What metadata are we talking about?

I go back and forth from MuseScore, and I'd be very happy to see a good exchange-format.
__________________
Reaper x64, win 11
Composer, text-writer, producer
Bandcamp
G-Sun is offline   Reply With Quote
Old 10-08-2013, 07:58 PM   #10
Breeder
Human being with feelings
 
Breeder's Avatar
 
Join Date: Nov 2010
Posts: 2,436
Default

Quote:
Originally Posted by paaltio View Post
Anyone have ideas on how to include the metadata in the REAPER session?
Last time I checked you couldn't do that in Python but you can in a compiled extension. For example:
http://code.google.com/p/sws-extensi...Freeze.cpp#133(lines 133-297 and 372)
Breeder is offline   Reply With Quote
Old 10-10-2013, 07:58 AM   #11
paaltio
Human being with feelings
 
Join Date: Aug 2011
Location: Los Angeles, CA
Posts: 314
Default

Quote:
Originally Posted by Breeder View Post
Last time I checked you couldn't do that in Python but you can in a compiled extension. For example:
http://code.google.com/p/sws-extensi...Freeze.cpp#133(lines 133-297 and 372)
Cool thanks, I'll look into this. Although this looks like something that wouldn't help with note-level metadata, right? The voicing information should stay with the notes and persist edits, so would need to figure out something for that.
paaltio is online now   Reply With Quote
Old 10-10-2013, 08:02 AM   #12
paaltio
Human being with feelings
 
Join Date: Aug 2011
Location: Los Angeles, CA
Posts: 314
Default

Quote:
Originally Posted by G-Sun View Post
What is included in MusicXML and what is not?
What metadata are we talking about?

I go back and forth from MuseScore, and I'd be very happy to see a good exchange-format.
Primarily I was thinking of the difference MusicXML makes between playback and display. It's quite an extensive format with instrument definitions and such, but I would go for a pretty narrow "export as cleanly as possible to notation programs" type functionality at first as that's my own pressing need. But I can certainly release the source if someone else wants to extend it.

Or if someone can get to it before I can, please do!
paaltio is online now   Reply With Quote
Old 02-09-2014, 08:16 AM   #13
Mike@Ossarium
Human being with feelings
 
Mike@Ossarium's Avatar
 
Join Date: Nov 2012
Location: Munich, Germany
Posts: 111
Default Status?

Quote:
Originally Posted by paaltio View Post
Primarily I was thinking of the difference MusicXML makes between playback and display. It's quite an extensive format with instrument definitions and such, but I would go for a pretty narrow "export as cleanly as possible to notation programs" type functionality at first as that's my own pressing need. But I can certainly release the source if someone else wants to extend it.

Or if someone can get to it before I can, please do!

After spending a lot of time in hospital i come back to the MusikXML issue.
Does any body have an example plug-in (source code) how to read or write the midi data with the REAPER API?

@paaltio: Do you got any success? Any source code available?
__________________
Reaper Version: 6.18 with CSI 1.0 and SWS / Audio Interface: Behringer FCA1616 + ADA8000
Band: Ossarium / Last Project: http://ossarium.bandcamp.com/ (Recorded and Mixed with Reaper)
Mike@Ossarium is offline   Reply With Quote
Old 02-10-2014, 11:42 AM   #14
paaltio
Human being with feelings
 
Join Date: Aug 2011
Location: Los Angeles, CA
Posts: 314
Default

Quote:
Originally Posted by Mike@Ossarium View Post
After spending a lot of time in hospital i come back to the MusikXML issue.
Does any body have an example plug-in (source code) how to read or write the midi data with the REAPER API?

@paaltio: Do you got any success? Any source code available?
Sorry nope, I've been back on Cubase due to the VE Pro bug ( http://forum.cockos.com/showthread.php?t=129293 ) that still persists. Will continue my scripting efforts when I can eventually use REAPER for my work.
paaltio is online now   Reply With Quote
Old 03-31-2014, 12:04 PM   #15
Mike@Ossarium
Human being with feelings
 
Mike@Ossarium's Avatar
 
Join Date: Nov 2012
Location: Munich, Germany
Posts: 111
Default ReaScoreMusicXML

Hello again.

I have finished a little bit of Python code that is a good statring point. It's based on the music21 library which is available here:
https://github.com/metalmike/music21...7.1_midi_addon
(you need it to run my script)

Actually the script extract all MIDI data from the selected tracks and convert them into MusicXML. Its any easy way to view your MIDI data as a score view!!

At first i will concentrate on exporting MIDI data to MusicXML and then i will also do the import stuff.
If anybode have ideas and wishes please let me know...

I also like to support TAB for fretted instruments.

Here you can find somethin to play with:
https://github.com/metalmike/ReaScor...es/tag/v0.1.1a

Caution: Its absoluteley only for testing.


The offical release of music21 can be found here: http://web.mit.edu/music21/
__________________
Reaper Version: 6.18 with CSI 1.0 and SWS / Audio Interface: Behringer FCA1616 + ADA8000
Band: Ossarium / Last Project: http://ossarium.bandcamp.com/ (Recorded and Mixed with Reaper)

Last edited by Mike@Ossarium; 04-01-2014 at 01:48 PM.
Mike@Ossarium is offline   Reply With Quote
Old 04-01-2014, 01:19 PM   #16
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,900
Default

How can we test that ?
X-Raym is offline   Reply With Quote
Old 04-01-2014, 01:25 PM   #17
Mike@Ossarium
Human being with feelings
 
Mike@Ossarium's Avatar
 
Join Date: Nov 2012
Location: Munich, Germany
Posts: 111
Default

- Download/Install Python 2.7
- Download/Install music21 library
- download ReaScoreMusicXML script from github
- activate python in reaper
- assign shortcut to script
- setup simple project which has at least one midi item

If you have a programm installed which can handle MusicXML files (*.xml) and have assigned .xml files to be used with this Program, you can directly view the score (MuseScore is a good and free tool for that).

Is you haven't such a programm you only got an ascii file opened in an editor or webbrowser.
__________________
Reaper Version: 6.18 with CSI 1.0 and SWS / Audio Interface: Behringer FCA1616 + ADA8000
Band: Ossarium / Last Project: http://ossarium.bandcamp.com/ (Recorded and Mixed with Reaper)
Mike@Ossarium is offline   Reply With Quote
Old 04-01-2014, 01:31 PM   #18
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 29,269
Default

Quote:
If you have a programm installed which can handle MusicXML files (*.xml) and have assigned .xml files to be used with this project you can directly view the score
XML is really text so can be opened in any text editor.
__________________
Music is what feelings sound like.
karbomusic is offline   Reply With Quote
Old 04-01-2014, 01:33 PM   #19
Mike@Ossarium
Human being with feelings
 
Mike@Ossarium's Avatar
 
Join Date: Nov 2012
Location: Munich, Germany
Posts: 111
Default

Sure. But it's mutch nicer to view a score instead of viewing a text file :-)
__________________
Reaper Version: 6.18 with CSI 1.0 and SWS / Audio Interface: Behringer FCA1616 + ADA8000
Band: Ossarium / Last Project: http://ossarium.bandcamp.com/ (Recorded and Mixed with Reaper)
Mike@Ossarium is offline   Reply With Quote
Old 04-01-2014, 01:50 PM   #20
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 29,269
Default

Quote:
Originally Posted by Mike@Ossarium View Post
Sure. But it's mutch nicer to view a score instead of viewing a text file :-)
Oh you meant literally view as a score instead of just the XML. Oops!
__________________
Music is what feelings sound like.
karbomusic is offline   Reply With Quote
Old 04-01-2014, 11:47 PM   #21
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 7,318
Default

Quote:
Originally Posted by Mike@Ossarium View Post
Hello again.

I have finished a little bit of Python code that is a good statring point. It's based on the music21 library which is available here:
https://github.com/metalmike/music21...7.1_midi_addon
(you need it to run my script)

Actually the script extract all MIDI data from the selected tracks and convert them into MusicXML. Its any easy way to view your MIDI data as a score view!!

At first i will concentrate on exporting MIDI data to MusicXML and then i will also do the import stuff.
If anybode have ideas and wishes please let me know...

I also like to support TAB for fretted instruments.

Here you can find somethin to play with:
https://github.com/metalmike/ReaScor...es/tag/v0.1.1a

Caution: Its absoluteley only for testing.


The offical release of music21 can be found here: http://web.mit.edu/music21/
Very cool
__________________
Reaper x64, win 11
Composer, text-writer, producer
Bandcamp
G-Sun is offline   Reply With Quote
Old 04-03-2014, 11:08 AM   #22
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,900
Default

For whatever reason i'm unable to use Pythin in Reaper, I tried 3.40 and 2.7.6, both x86 and x84, I activate python in reaper, I link do dll but no... it says that no dll was found, despite the fact I restart Reaper. =/
X-Raym is offline   Reply With Quote
Old 04-03-2014, 12:42 PM   #23
G-Sun
Human being with feelings
 
G-Sun's Avatar
 
Join Date: May 2010
Location: Norway
Posts: 7,318
Default

Quote:
Originally Posted by X-Raym View Post
For whatever reason i'm unable to use Pythin in Reaper, I tried 3.40 and 2.7.6, both x86 and x84, I activate python in reaper, I link do dll but no... it says that no dll was found, despite the fact I restart Reaper. =/
I had a long jurney there as well. Let's see if I can get you on the right thread.
Have a look here:
http://forum.cockos.com/showthread.p...ghlight=python
__________________
Reaper x64, win 11
Composer, text-writer, producer
Bandcamp
G-Sun is offline   Reply With Quote
Old 04-03-2014, 12:55 PM   #24
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,900
Default

Thanks it works

now, a final step,

how do I "assign shortcut to script" ? what .py file ?
Sorry i'm a bit confused with that it's the first time i use that kind of python stuff :P
X-Raym is offline   Reply With Quote
Old 04-08-2014, 05:26 AM   #25
Mike@Ossarium
Human being with feelings
 
Mike@Ossarium's Avatar
 
Join Date: Nov 2012
Location: Munich, Germany
Posts: 111
Default

Go to 'Actions' menu --> Show action list
Then click on 'NEW/load..' button.
Select the reascoremusicxml.py

Select reascoremusicxml in the list and click ADD in the botton left corner of the window to add a shotrtcut.
__________________
Reaper Version: 6.18 with CSI 1.0 and SWS / Audio Interface: Behringer FCA1616 + ADA8000
Band: Ossarium / Last Project: http://ossarium.bandcamp.com/ (Recorded and Mixed with Reaper)
Mike@Ossarium is offline   Reply With Quote
Old 04-08-2014, 06:50 AM   #26
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,900
Default

I'm getting closer

but i know have

Code:
Erreur d'éxecution de script 

Traceback (most recent call last):
  File "reascoremusicxml.py", line 19, in <module>
    from music21 import stream, metadata, midi
ImportError: No module named music21
Despite the fact i just run the install.py =/
X-Raym is offline   Reply With Quote
Old 04-08-2014, 07:09 AM   #27
Mike@Ossarium
Human being with feelings
 
Mike@Ossarium's Avatar
 
Join Date: Nov 2012
Location: Munich, Germany
Posts: 111
Default

What install.py ?

the installer.py from music21?

You can check if music21 is installed correctly by typing

>>> from music21 import corpus

after you have started python
__________________
Reaper Version: 6.18 with CSI 1.0 and SWS / Audio Interface: Behringer FCA1616 + ADA8000
Band: Ossarium / Last Project: http://ossarium.bandcamp.com/ (Recorded and Mixed with Reaper)
Mike@Ossarium is offline   Reply With Quote
Old 04-08-2014, 07:43 AM   #28
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,900
Default

Install.py from music21 yes

the from music21 import corpus reveals that music21 is not installed
i tried to reinstall it several times, reboot, change version of pyhton (from 2.7.6 x64 to 2.7.6 x32) and nothing.

I just have to run install.py script right ?
X-Raym is offline   Reply With Quote
Old 04-08-2014, 07:50 AM   #29
Mike@Ossarium
Human being with feelings
 
Mike@Ossarium's Avatar
 
Join Date: Nov 2012
Location: Munich, Germany
Posts: 111
Default

Hm -

you first have to run configure.py and then installer.py

Can you send me a PN with the install log?

All my changes in music21 will be included in the next official release!
But i actually don't know the release date - sorry.
__________________
Reaper Version: 6.18 with CSI 1.0 and SWS / Audio Interface: Behringer FCA1616 + ADA8000
Band: Ossarium / Last Project: http://ossarium.bandcamp.com/ (Recorded and Mixed with Reaper)
Mike@Ossarium is offline   Reply With Quote
Reply

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 04:07 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.