Go Back   Cockos Incorporated Forums > REAPER Forums > ReaScript, JSFX, REAPER Plug-in Extensions, Developer Forum

Reply
 
Thread Tools Display Modes
Old 03-21-2018, 02:54 PM   #1
azslow3
Human being with feelings
 
Join Date: Nov 2017
Location: Heidelberg, Germany
Posts: 797
Default HW MIDI/CS: is my approach ok, bad or ugly? (tech. q. to devs)

--------- a bit about "why" ----------------
My final target is to write full scale programmable "control center", as the next version of my AZ Controller for Sonar. Thanks to Reaper API, I can do more then I was able before. And since that is not the first version, I hope to make it much better

Windows only.

As a basis for what I want, I need complete control over hardware MIDI input. To decide what to do with it (route as normal MIDI input, after optional translation, route for "Reaper control path", use for CS tasks directly or just forward it throw MIDI/OSC for other purpose, f.e. to control DM/audio interface).

I have spent some time to find the best (or at least some) way to have access to the stream:
* csurf MIDI API is not real-time (are there some hidden undocumented methods/hooks to do this?)
* I have failed to modify MIDI stream in Audio Hook, but that is rather strange place in any case (f.e. audio engine should be active, too many useless calls in RT route)

So, for the moment I have decided to open MIDI device myself (I have not found the way to match Reaper MIDI enumeration to Windows MIDI enumeration, so even the order of devices is different).
As a prototype, I have written the following:
https://forums.cockos.com/showthread.php?t=204724

-------------- The question(s) -------------

I use a separate thread with "above normal" priority as MIDI input callback, from which I call StuffMIDIMessage (to Virtual keyboard or Control path, in the future also buffering for usual csurf style processing).

Is that OK, Bad, Ugly or complete nonsense?
May be with a hint what else I case use.

If ok. Is there a way to "activate" Reaper MIDI Input without enabling it, so I can Stuff messages as from it? Not essential, but will look better for end user.
azslow3 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 07:26 AM.


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