I need to open a midi file with Lua and get the maker names and location to create a region csv
the color will be representative of the song section (marker name)
Code:
#,Name,Start,End,Length,Color
R1,Intro,1.1.00,3.1.00,2.0.00,FF80C0
R2,Verse,3.1.00,4.1.00,1.0.00,1127AE
R3,Chorus,4.1.00,5.1.00,1.0.00,3776EB
R4,Bridge,5.1.00,8.1.00,3.0.00,3776EB
....
Not sure if this will get the 0x06 Markers or there's something else ??
https://github.com/FMS-Cat/Lua_midiP...idi-parser.lua
I added a bit in lyrics.lua to select what text event but that's with the midi tracks loaded into Reaper
https://forums.cockos.com/showthread...645&page=5#186
Quote:
Originally Posted by ELP
Meta Event Status-byte = 0xFF ; two String Characters F|F
Meta Event ID 0x0F would be REAPER Notation ;two String Characters 0|F
= four String Characters
...
META ID´s
(0xID)
0x01 = Text
0x02 = Copyright
0x03 = Sequence/Track Name
0x04 = Instrument
0x05 = Lyric
0x06 = Marker
0x07 = Cue
0x08 = Program
0x09 = Device
....
0x0F = REAPER Notation
..
.
and so on.
at the End you need this 4 String Characters F|F|I|D with midisend_str(offset,string)
or 0xFF|0xID with midisend_buf(offset,buf, len)
0xFF Meta Message statusbyte //within REAPER and MIDI Files; over MIDI Pipe this would be MIDI RESET)
0xID Meta ID
otherwise you get/send of course a corrupt Meta Message!
(The result would be the Meta text Data within REAPERs auto SysEx Body 0xF0....0xF7)
|