As we know in the end of item there is "All notes off" event (CC123 0)
My script inserts notes into the item, and if it inserts it after this event - item length grows, automatically, and inserts new "All notes off" in the end of extended item, but... old "All notes off" events stays at the same position
https://forum.cockos.com/attachment....1&d=1555549755
I tried to remove it by using this code:
Code:
retval, notecnt, ccevtcnt, textsyxevtcnt = reaper.MIDI_CountEvts( take )
for i=ccevtcnt, 1,-1 do
retval, selected, muted, ppqpos, chanmsg, chan, msg2, msg3 = reaper.MIDI_GetCC( take, i )
Msg(chanmsg.." "..chan.." "..msg2.." "..msg3)
if msg2==123 and msg3==0 then
reaper.MIDI_DeleteCC( take, i-1 )
end
end
but it doesn't do anything to this CC event.
So.. question: How to remove it?
Here is how this MIDI Item looks in Track Chunk:
Code:
<SOURCE MIDI
HASDATA 1 960 QN
POOLEDEVTS {16E3CA0F-5021-4AD6-A120-CE65880A7E14}
E 0 90 30 64
E 0 90 33 64
E 480 90 37 64
E 240 90 40 64
E 240 90 3c 64
E 480 90 3e 64
E 1440 90 43 64
E 217 80 33 00
E 2 80 30 00
E 479 80 37 00
E 239 80 40 00
E 23 90 41 64
E 0 b0 7b 00
E 218 80 3c 00
E 262 90 3c 64
E 218 80 3e 00
E 262 90 38 64
E 480 90 35 64
E 698 80 43 00
E 960 80 41 00
E 480 80 3c 00
E 480 80 38 00
E 480 80 35 00
E 0 b0 7b 00
CHASE_CC_TAKEOFFS 1
GUID {0A69ADDC-E923-4C36-B4B0-D93644D54270}
IGNTEMPO 0 120 4 4
SRCCOLOR 32
VELLANE -1 190 0
CFGEDITVIEW 0 0.081642 60 12 0 -1 0 0 0 0.5
KEYSNAP 0
TRACKSEL 209
EVTFILTER 0 -1 -1 -1 -1 0 0 0 0 -1 -1 -1 -1 0 -1 0 -1 -1
CFGEDIT 1 1 0 1 0 4 1 1 1 1 1 0.25 45 84 791 795 0 0 0 0 0 0 0 0 0 0.49 0 0 1 64
>