Old 02-12-2016, 08:05 PM   #1
pcartwright
Human being with feelings
 
Join Date: Jan 2009
Posts: 1,030
Default Notation API

A thread to discuss API for Reaper's notation viewer/editor.

To start with, I'm curious how to read notation event via MIDI events.
pcartwright is offline   Reply With Quote
Old 02-12-2016, 08:14 PM   #2
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 15,733
Default

From JSFX you should be able to read the notation data using midirecv_str. REAPER-specific notation data will have the first two bytes 0xFF, 0xF. (This is outside the official MIDI spec but still in-band for MIDI text meta-events.)

From other API clients, MIDI_GetTextSysexEvt should work.

Note that very little of the interoperability has been tested, and the notation spec will very likely change over the short term!
schwa is offline   Reply With Quote
Old 02-12-2016, 08:55 PM   #3
pcartwright
Human being with feelings
 
Join Date: Jan 2009
Posts: 1,030
Default

Got it. So don't write scripts or JSFX relying on notation event syntax for the time being. I suppose the MIDI event syntax will eventually be added to the JSFX and scripting API documentation?
pcartwright is offline   Reply With Quote
Old 02-13-2016, 08:16 AM   #4
paaltio
Human being with feelings
 
Join Date: Aug 2011
Location: Los Angeles, CA
Posts: 308
Default

Seems like the notation editor shares the same multitrack editing paradigm with the piano roll editor. So that would mean I can't create a script that processes notes on all the tracks, because MIDIEditor_GetTake only returns one take.

So I'm going to have to submit my #1 API feature request on the notation side as well: a "get all editable items" function, please!
paaltio is offline   Reply With Quote
Old 02-13-2016, 10:56 AM   #5
ELP
Human being with feelings
 
Join Date: Apr 2014
Posts: 943
Default

Schwa: From JSFX you should be able to read the notation data using midirecv_str. REAPER-specific notation data will have the first two bytes 0xFF, 0xF. (This is outside the official MIDI spec but still in-band for MIDI text meta-events.)"

Just a question, Schwa but why do not you use simply

Proprietary Event/Sequencer-Specific Meta-event ?
FF 7F <len> <Your Cockos id> <data>
That´s the meta spec for such special events, like for Notation etc. pp

instead of
the maybe with future MIDI-HD spec conflicted "outside the official MIDI spec
or better at the moment not existing 0xFF 0xF <len> <data> and these other non existing 0xA-0xE ...

I personally have no problem with it but it is outside existing meta command ids
and can maybe conflict with future things as long as it not in spec or Cockos make Spec together with the rest or the rest of the world just follow Cockos
Particularly if it is also exported to SMF.

Attached Images
File Type: jpg spez.JPG (53.1 KB, 2901 views)
__________________
I hope you can understand me? Without german beer my written english is always very bad, with beer it becomes unbearable!.
Less is more! To much limited the own creativity.
ELP is offline   Reply With Quote
Old 02-13-2016, 11:06 AM   #6
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 15,733
Default

Quote:
Originally Posted by ELP View Post
why do not you use simply

Proprietary Event/Sequencer-Specific Meta-event ?
FF 7F <len> <Your Cockos id> <data>

The only reason is that FF 0F, though not a specified text event type, is still a text event, as opposed to FF 7F, which is assumed to be binary data. So FF 0F displays in the piano roll text event lane, is more likely to be preserved at least as readable information if imported into another program, etc. Admittedly it's not a strong reason.
schwa 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 01:20 AM.


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