When did this happen?? I've been using an older version, I didn't think this thing ever got updated but now it's incredible
![]()

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
-- CREATE TEXT ITEMS
-- text and color are optional
function CreateTextItem(track, start_pos, length, text, color)
item = reaper.AddMediaItemToTrack(track)
reaper.SetMediaItemInfo_Value(item, "D_POSITION", start_pos)
reaper.SetMediaItemInfo_Value(item, "D_LENGTH", length)
if text ~= nil then
reaper.ULT_SetMediaItemNote(item, text)
end
if color ~= nil then
reaper.SetMediaItemInfo_Value(item, "I_CUSTOMCOLOR", color)
end
return item
end
track = reaper.GetSelectedTrack(0, 0) -- Get selected track i
for i = 1, #tChords-1 do
start_pos = tonumber(tChords[i].time)
end_pos = tonumber(tChords[i+1].time)
length = end_pos - start_pos
text = tChords[i].chord
color = reaper.ColorToNative(255,255,0)|0x1000000 -- Set Color (r,g,b)
CreateTextItem(track, start_pos, length, text, color)
end
reaper.MIDIEditor_OnCommand( reaper.MIDIEditor_GetActive(), 2 )
reaper.Undo_EndBlock2(0, "Convert chords to text items", -1)