Old 10-08-2014, 02:43 AM   #1
Human being with feelings
Join Date: Aug 2012
Location: Finland
Posts: 2,488
Default Bug in MIDI_InsertNote function?

Edit: This bug was already posted: http://forum.cockos.com/showthread.php?t=146899

There seems to be something wrong with MIDI_InsertNote

I'm trying to add a note at pitch 0. It adds "00 00 00" events. Running the script three times finally adds the note. MIDI_InsertNote function returns "1".

If someone wants to test it:
  • Open new MIDI item in editor
  • Open "Raw MIDI data" window
  • Run the script

function insert_note() local(take, ret)
  (take = MIDIEditor_GetTake(MIDIEditor_GetActive())) ? (
    //bool MIDI_InsertNote(MediaItem_Take* take, bool selected, bool muted, startppqpos, endppqpos, int chan, int pitch, int vel)
    ret = MIDI_InsertNote(take, 1, 0, 0.0, 960.0, 0, 0, 96);
    ShowConsoleMsg(sprintf(#, "%d", ret));


(REAPER v4.731, Win XP32)

Last edited by spk77; 10-08-2014 at 02:57 AM.
spk77 is offline   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -7. The time now is 08:23 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.