Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Bug Reports

Reply
 
Thread Tools Display Modes
Old 09-27-2014, 06:20 AM   #1
skirsdeda
Human being with feelings
 
Join Date: Jun 2014
Location: Vilnius, Lithuania
Posts: 2
Default Reascript MIDI bug (missing note events)

Some calls to RPR_MIDI_InsertNote produce invalid events (it seems) with position 0 on channel 1 (no other data visible in event list view).

Attached is a test script which reproduces this bug (failing calls to RPR_MIDI_InsertNote are marked). This script can be run in an empty project, it will add one track, create MIDI item take and write notes to it.
I simplified it as much as possible, but couldn't find any good reason why this is not working. Removing any non-missing note in script seems to revive one missing note Strange...
Attached Images
File Type: jpg midi_note_bug_screen.jpg (36.6 KB, 389 views)
Attached Files
File Type: txt midi_note_bug.txt (1.7 KB, 1622 views)
skirsdeda is offline   Reply With Quote
Old 10-08-2014, 02:52 AM   #2
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Confirmed. 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

Code:
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));
    //UpdateArrange();
  );
);

insert_note();


(REAPER v4.731, Win XP32)

Last edited by spk77; 10-08-2014 at 03:02 AM.
spk77 is offline   Reply With Quote
Old 12-09-2014, 01:07 PM   #3
dusanmsk
Human being with feelings
 
Join Date: Nov 2011
Posts: 109
Default

Found similar problem, but using midi keyboard and step sequencing mode:
http://forum.cockos.com/showthread.php?t=151619
dusanmsk is offline   Reply With Quote
Old 03-08-2015, 03:19 AM   #4
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

Fix is still "coming soon".
X-Raym is offline   Reply With Quote
Reply

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:42 AM.


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