MIDI Transfer - Use other Softwares to edit MIDI to Reaper!
This script enable transfer automatic to reaper, in my view making the other software more or less an MIDI editor for reaper!!
How it work?
Every time you export MID from the other software it will get updated and organized (in the tracks you assign each channel) in REAPER. It is really good for softwares that afford different workflows but are good to use with an DAW, like Notation Editors (Musescore, Sibelius, Dorico. Finale….) or softwares like PureData, MAX/MSP etc etc etc...
Image of me using Musescore to edit some MIDI in Reaper:
I will do an video about it soon
Please comment Bugs and FR!!!
Thanks to Amagalma and Lokasenna (The GUI lib is from Lokasenna and the Text Editor is an mod from Amagalma used in his chunk viewer ) Thanks to people on discord (Robert, Stevie Birdbird etc ... ) for the talks. And for Mespotine the oracle that respond my questions when I confused hahah.
I don't know if I'll personally make use of it: I generally only go the other way around: from Reaper TO a notation program.
But this is super cool!
Cool bellerandre !
here is a tip (without any script/extension) for transfering midi from reaper to notation software (or any other that accepts MIDI): you can drag and drop an MIDI item from reaper to the notation program using the mouse modifier: ' Render Item to new File ' .
you might already know about it, but just in case...
It’s been a long-lasting dream of mine to have a notation editor become the main driver for Reaper, and your script just brought me one step closer.
As expected, the Reaper side works great. The Musescore side carries a few bothersome quirks:
1. I couldn’t get the midi export script to work in Musescore (I’m on a mac, I’ll look tonight to see if it can work on the linux side). My current way was: create midi file in reaper=> modify it in musescore=> try to export with script.
2. Musescore’s and Sibelius’ midi exports include all kinds of useless CC data, which interact with VSTs in unexpected ways once brought inside of Reaper. Is there any way to change that ?
3. When I close the midi editor, Reaper keeps prompting me to save changes to the midi file. How do I make this automatic ?
4. CC lanes get copied to only one of the explosion’s children. Is there a way to change that ?
Besides this, the script is great. The explosion functionality is working flawlessly, and it’s really nice to have it as a script that takes care of mapping midi channels to track numbers. Congrats !
The thing I’m most excited about, imo the most powerful feature of this script is the Midi track import option - because it allows me to seamlessly import time-signature changes into the DAW!! That’s so awesome, because I can now fit Reaper’s timeline around my ideas, instead of the other way around!
All I have to say now, is be on the lookout for complex voice-leads and odd-time signatures. I sent a little donation. Thank your daniellumertz!
It’s been a long-lasting dream of mine to have a notation editor become the main driver for Reaper, and your script just brought me one step closer.
As expected, the Reaper side works great. The Musescore side carries a few bothersome quirks:
1. I couldn’t get the midi export script to work in Musescore (I’m on a mac, I’ll look tonight to see if it can work on the linux side). My current way was: create midi file in reaper=> modify it in musescore=> try to export with script.
2. Musescore’s and Sibelius’ midi exports include all kinds of useless CC data, which interact with VSTs in unexpected ways once brought inside of Reaper. Is there any way to change that ?
3. When I close the midi editor, Reaper keeps prompting me to save changes to the midi file. How do I make this automatic ?
4. CC lanes get copied to only one of the explosion’s children. Is there a way to change that ?
Besides this, the script is great. The explosion functionality is working flawlessly, and it’s really nice to have it as a script that takes care of mapping midi channels to track numbers. Congrats !
The thing I’m most excited about, imo the most powerful feature of this script is the Midi track import option - because it allows me to seamlessly import time-signature changes into the DAW!! That’s so awesome, because I can now fit Reaper’s timeline around my ideas, instead of the other way around!
All I have to say now, is be on the lookout for complex voice-leads and odd-time signatures. I sent a little donation. Thank your daniellumertz!
Hey Perken! Thanks for the kind words and the donation!
1.Can you elaborate what happen when you try to run the Musescore plugin to export midi? It just don't create? It appears a error message? There are 2 things that might help you:
A) The plugin works only in musescore 3.6+
B) The plugin had a bug in Win and Mac on the Musescore side that I couldn't fix. I reported the bug, it is one function of them is not working as properly. I will se if I can at least show a message to help the user. The bug is the following:
The plugin tries to get the path of the file you are exporting to. If the file wasn't saved it will return a error. This is expected. But if the user just saved the file for the first time and tries to run it will still return a error. You need to save for the first time and then reopen the Musescore File, and now the export plugin will work. This is on the musescore side I can't do much... I will try to update to show a message explaining.
2. Oh theses CC... In Midi Transfer Window at top there is options>Transfer CC. That you can turn off
3. This message will always appear when you are closing a midi editor with MIDI linked to a file. Are you trying to edit the file you are bringing from musescore? Remember the midi transfer is just helping you to get from Other Software to Reaper not the other way around. I don't see much use to edit the Midi item that is coming from musescore as after you update on musescore it will erase your changes. You can edit the child items made by midi transfer, they are not linked, but midi transfer will override the next update. If you don't want this you can use "Keep cuts" option on midi transfer ! It allow just part of the items be updated. There are more info in the manual
4. Hm in Sibelius all exploded child(these terms are getting weird) are getting the CC they should. I think this is how musescore export midi I will check the foruns and see if is a bug I can work around.
Thanks for using and letting me know !
About the options when you are importing concerning time signatures: This is from Reaper side . The script just tries to reimport each time it notice the file was updated, and then explode it in different tracks hehhe. I never used it importing different timesignatures and stuff from the notation software, glad to know it works. Just make sure your item is at the 1 bar.
Edit: on item 4. Exporting a mid file from musescore don't export any cc Other than the first track in my tests O.o (whaaaat?) I will make a post on musescore see if there is a way to enable that or see what is going on
Last edited by daniellumertz; 04-29-2021 at 12:07 AM.
Corrected Bug concerning huge MIDI files on midi tracks mode: MIDI Transfer was trying to open it before it was done. NOW the window to try to import the midi files back to reaper will only appear when the file is ready and you get focus back to reaper.
MUCH MUCH faster handling of MIDI notes. ( more than 100x times faster )
Better Support to Import Time Signature in MIDI Track MODE (before it tried to import whenever the edit cursor was, now it tries to import the tempo starting with the item)
Presets Menu Removed, I don't see much use in that actually
Add forum and Donate button
Last edited by daniellumertz; 05-05-2021 at 09:43 PM.
This seems amazing! I have to try it!
Probably way too complex but would there be a way to sync playback and transport ? I could really use reaper being slave to musescore playhead....
Thanks Regisfofo.
It will not support playback sync. Actually this script came from my frustration over Sibelius + Rewire + Reaper sync. There are too much MIDI jitter (time discrepancies) error. In the 10 ~ 50ms size. I think there are some people that manage to sync musescore with reaper but I can be wrong.I presume the same MIDI jitter would be present. Anyway this is intended to be a offline sync. whereas a Rewire type of thing is Online.
I've made an attempt on using the script, following your video, when I try to explode the midi-file I get emty items (see screenshot).
What am I missing?
Thanks for help!
Hey o_e, nice to see you here. Hm are the midi notes in channels 1 2 and 3 ? And if they are, you selected as source item the right item you are trying to use? (Just to be sure ) If you want you can send me the project with the midi file.
Hey o_e, nice to see you here. Hm are the midi notes in channels 1 2 and 3 ? And if they are, you selected as source item the right item you are trying to use? (Just to be sure ) If you want you can send me the project with the midi file.
Thanks for the quick reply!
You were right, the lines were on other midi channels, now it works!
But, when I close the Reaper Project and then reopen it, the MIDI Transfer settings are not saved, how can I do this..?
You were right, the lines were on other midi channels, now it works!
But, when I close the Reaper Project and then reopen it, the MIDI Transfer settings are not saved, how can I do this..?
If you first close midi transfer and then reaper it will save
That the state of MIDI Transfer will be saved when closing Reaper, no matter what..
Sorry the delay a lot of stuff in my master end of semester :P ! I updated with your feature request! Now it saves when close when set tracks and when set a source!
I am using this for a long time, without any script. Just .MIDI file reference as you explain in your youtube video, plus setting all midi files OFFLINE during external processing, then back ONLINE after processing is enough.
Some users asked in Youtube if the opposite is possible. Yes, just add your external notation editor (or any other gui .exe or command line program) as a secondary editor. There you go. Then you can create a custom action doing something like: All media OFFLINE > open selected items in secondary editor > All media ONLINE after closing secondary editor. Good luck. Reaper allows anything thanks to those three features:
1. OFFLINE going of media items.
2. Loading of new .mid files as .mid file reference into arrrange
3. Assigning any program as secondary editor which you can trigger as action
Corrected Bug concerning huge MIDI files on midi tracks mode: MIDI Transfer was trying to open it before it was done. NOW the window to try to import the midi files back to reaper will only appear when the file is ready and you get focus back to reaper.
MUCH MUCH faster handling of MIDI notes. ( more than 100x times faster )
Better Support to Import Time Signature in MIDI Track MODE (before it tried to import whenever the edit cursor was, now it tries to import the tempo starting with the item)
Presets Menu Removed, I don't see much use in that actually
Add forum and Donate button
Hello Daniel
thank you for the amazing work!
yes I felt down into the bug of MuseScore today, making several trials.
Do not say anything about the troubles to get the audio out from MuseScore to put it into OBS. 1 day work. Solution: nothing, justa compromise.
I have the version 3.6.2.548021803 (easy versioning I see) .... I think I have to deal with :-)
Your script is working fine but I spotted just a small glitch: when I close the project, and the script, it crashes (at least a small popup appears telling that the script crashes).
I have reaper 6.56 under W11
__________________
Bart R.
Reaper: always the most up-to-date.
O.S.: Windows 11
1st - PAY ATTENTION TO MUSESCORE FEATURE > EXPORTS PROGRAM CHANGES
I don't know it this is known or not.
I know that I stumbled upon this issue yesterday
When you export from MuseScore, in the Main MIDI exported, there are program changes even if not forecasted by the writer.
If you don't know this, and you use (as I did) synths like Xpand2, you risk to get some very strange behaviour just when you reload the project and you start playing (not when in loop or after the first play)
Initially I thought it was some but in reaper OR Xpand2.
I got crazy and then I discovered it was not a bug of any, it's just this way of MuseScore. SFIK there is no way to disable it.
I would appreciate if there is a way to do it
2nd - WHEN YOU CLOSE THE SCRIPT, IT'S NOT CLOSED
When you have the script opened and you click on the X to close the window, the script still running.
Indeed re-instantiate the script via Action-list, Reaper asks to shutdown the previous instance, or to start another one.
__________________
Bart R.
Reaper: always the most up-to-date.
O.S.: Windows 11
For the first thing I made a update recently I can push to reapack I haven't yet because I didn't test in the reaper release version. It will add a menu to filter PC messages .
Second is by design if you close the script while it is checking to update the file it will run on the background, economizing cpu that would be use to draw the UI
For the first thing I made a update recently I can push to reapack I haven't yet because I didn't test in the reaper release version. It will add a menu to filter PC messages .
Second is by design if you close the script while it is checking to update the file it will run on the background, economizing cpu that would be use to draw the UI
Ok great so with the next release your script provides to remove this? Great.
About the second one. Ok great. however if happens to close it without upfront stop it, it should be nice if a window appears informing OR, if possible, to close the window should be impossible till the script is stopped
__________________
Bart R.
Reaper: always the most up-to-date.
O.S.: Windows 11
when you push the new version on ReaPack, please let us know.
Because yes, it's possible to use the MiDI Filter of Reaper, but's quite cumbersome.
It's very preferrable that this script does the filtering as well.
It's a wonderful tool
__________________
Bart R.
Reaper: always the most up-to-date.
O.S.: Windows 11
I think there's a time in going from "not very experienced with Reaper" to "more experienced" where all of a sudden you realise all of the great functionality that scripting adds. And you start installing, and customizing and Reaper becomes more and more the DAW of your dreams.
This script is exactly one of those scripts, I've really wanted a way to use an external, scorebased midi-editor, and here it is
meanwhile I introduced a FR to MuseScore asking if possible to integrate the function to export MIDI through a shortcut, since they are out with the Beta for Version 4 ...
It doesn't mean they will do;
It means I just put a flea in one's ear ... who knows ...
__________________
Bart R.
Reaper: always the most up-to-date.
O.S.: Windows 11
Hey Bart thanks a lot for that, it is the first time someone make a video about my script work and I feel very glad it was good for you enough to you make a video about it
Hey Bart thanks a lot for that, it is the first time someone make a video about my script work and I feel very glad it was good for you enough to you make a video about it
you’ve made an excellent script 👌👌👌
__________________
Bart R.
Reaper: always the most up-to-date.
O.S.: Windows 11
What is the benefit of this script?
Is it "only" to solve the jitter caused by ReWire?
I haven't encountered any issues with Rewire but that's probably because I'm not an advanced user of this type of workflow, apparently it's common and that's what led you to write it.
But is there another reason that I don't see?
Apparently having MIDI in Reaper isn't really useful since it's not relevant to edit it there. This can be a quick way to import it and move/copy it to other tracks, it's already really cool. (I saw your Keep cuts function, interesting)
I'll give it a try anyway and since everyone in this thread seems to see how useful and cool it is, I really want to know why too! And I should work more with ReWire to understand how unstable it is ;-)
Thank you.
EDIT
Ok... I messed around with ReWire a bit and... now I get it >_<
Maybe there are tweaks to be made to improve synchronization but indeed, there's probably something to drive crazy in there.
I will try your workflow.
EDIT
I gave a try to your script, it works nicely.
Your explanatory video is super clear thank you.
Last edited by Kristaoss; 05-24-2022 at 07:30 PM.
Reason: adding infos
Digging a little more I have constant crashes using the MIDI track feature.
Not sure what I'm doing wrong, I'll have to give it another try tomorrow following your instructions again. I'm using Sibelius, there is maybe a thing I'm doing wrong there.
Here is what's in the console:
Error: main.lua:125: bad argument #1 to 'GetTrackMediaItem' (MediaTrack expected)
Stack traceback:
Core.lua:89: in function <...ER\Scripts\Daniel Lumertz Scripts\MIDI Transfer\Core.lua:80>
[C]: in field 'GetTrackMediaItem'
main.lua:125: in function 'CopyMediaItem'
main.lua:291: in function 'main_tr'
GUI.lua:696: in method 'onmouseup'
Core.lua:889: in field 'Update'
Core.lua:441: in field 'Main_Update_Elms'
Core.lua:303: in function <...ER\Scripts\Daniel Lumertz Scripts\MIDI Transfer\Core.lua:299>
[C]: in function 'xpcall'
Core.lua:299: in function <...ER\Scripts\Daniel Lumertz Scripts\MIDI Transfer\Core.lua:298>
Thanks for the bug report I will try to reproduce here. If you want you can send me the MIDI and the reaper project (or some small version of it), that can make my debugging life easier heheh...
Just to make sure, are you checking the first option when you update the midi file?