Biab RB MusicXML to Reaper Notation & Chords

Posted by: Pipeline

Biab RB MusicXML to Reaper Notation & Chords - 02/28/18 01:37 PM

Reaper will import BiabXML and show the chords in the notation.
It will also export it to PDF, xml or mid.

It does what the BB chord window needs, zooms when you Ctrl+scroll mouse wheel.

https://www.dropbox.com/s/5zt86fiedse6qts/Reaper-Notation.gif?dl=0
https://www.dropbox.com/s/5zt86fiedse6qts/Reaper-Notation.gif?dl=1

Just drag n drop the xml in.

You can also copy the chords to Reaper's Regions or Markers, or in another post to lyrics http://www.pgmusic.com/forums/ubbthreads.php?ubb=showflat&Number=458770#Post458770

If you save BB to midi as well you will get the A B part Markers (set in Biab Midi Options) in Reaper, just drag n drop the midi in after the xml and import Markers.

You can get reascales to load into Reaper to give scale or chords to snap to.



Posted by: Matt Finley

Re: Biab RB MusicXML to Reaper Notation & Chords - 03/01/18 10:41 AM

This is a great tip. I viewed the videos and I'll give this a try. Thanks for posting!
Posted by: Noel96

Re: Biab RB MusicXML to Reaper Notation & Chords - 03/03/18 12:27 AM

Thanks for all this information, Pipeline. It's fantastic! You've inspired me to have a play smile
Posted by: Pipeline

Re: Biab RB MusicXML to Reaper Notation & Chords - 03/03/18 02:11 AM

This script will copy the xml chords to regions.

Code:
reaper.Undo_BeginBlock2(0)
reaper.Main_OnCommand(40421,0) --Item: Select all items in track 40421
reaper.Main_OnCommand(40153,0) --Item: Open in built-in MIDI editor (set default behavior in preferences) 40153
take = reaper.MIDIEditor_GetTake(reaper.MIDIEditor_GetActive())
reaper.MIDI_Sort(take)
MIDIOK, MIDI = reaper.MIDI_GetAllEvts(take, "")
tChords = {}
stringPos, ticks = 1, 0
while stringPos < MIDI:len() do
    offset, flags, msg, stringPos = string.unpack("i4Bs4", MIDI, stringPos)
    ticks = ticks + offset
    if msg:byte(1) == 0xFF then
        chord = msg:match("text (.+)")
        if chord then
            tChords[#tChords+1] = {chord = chord, ticks = ticks}
        end
    end
end
tChords[#tChords+1] = {ticks = ticks}
for i = 1, #tChords do
    tChords[i].time = reaper.MIDI_GetProjTimeFromPPQPos(take, tChords[i].ticks)
end
for i = 1, #tChords-1 do
    -- Set Region Color RGB > reaper.ColorToNative(55,118,235)
    reaper.AddProjectMarker2(0, true, tChords[i].time, tChords[i+1].time, tChords[i].chord, 0, reaper.ColorToNative(55,118,235)|0x1000000) 
end
reaper.Undo_EndBlock2(0, "Convert xml chords to regions", -1)


In Reaper Menu > Actions > Show Action List > Reascript > New > Convert xml chords to regions.lua
(this should Save in Reaper Resources\Scripts, to find folder > Options > Show REAPER Resource path..)
copy and paste code below,
select a track from the imported musicxml
in the Reascript window > Ctrl+S to save and run script
close script window
to run the script next time just type the name you save it to in the filter box.
In the script you can change the default region (R,G,B) color > reaper.ColorToNative(55,118,235), to edit the region color right click the region.

To convert the Regions to Text Items Track install ReaPack https://reapack.com/
then Extensions > ReaPack > Browse packages
X-Raym_Create text items on first selected track from regions
right click > Install > Apply
Insert a new track, select it, run > X-Raym_Create text items on first selected track from regions


Posted by: Icelander

Re: Biab RB MusicXML to Reaper Notation & Chords - 03/03/18 07:52 AM

Why hasn't PG just hired you years ago, Pipeline cool
Posted by: DeaconBlues09

Re: Biab RB MusicXML to Reaper Notation & Chords - 04/15/18 05:57 AM

Ya know something, Pipline?

You are a freaking genius and you deserve a medal of honor and then some!

Please hire this guy, PG Music!
Posted by: Jim Fogle

Re: Biab RB MusicXML to Reaper Notation & Chords - 04/15/18 07:38 PM

Originally Posted By: DeaconBlues09
Ya know something, Pipline?

You are a freaking genius and you deserve a medal of honor and then some!

Please hire this guy, PG Music!
So true. I hope PG Music is listening.
Posted by: Pipeline

Re: Biab RB MusicXML to Reaper Notation & Chords - 04/15/18 07:49 PM

To get BB's 2 bar count-in, File > Project Settings > Project start measure: -1