|
|
|
07-20-2018, 10:10 AM
|
#1
|
Human being with feelings
Join Date: Mar 2013
Posts: 463
|
JS MIDI effect sending data to Reaper Web Interface
im interested in getting realtime tuner info to show on the reaper web interface.
to do so im thinking of doings something like so:
ReaTune (sends MIDI of detected note) -> custom JS MIDI effect (uses MIDI from ReaTune to create a readable string like "-->A---" and to somehow do SetExtState() or something similar to store this data -> Reaper Web Interface javascript (calls GetExtState every 100 milliseconds or so to display the string stored by the JS MIDI effect
where im getting stuck is im not sure how to get the JS MIDI effect to store the string it generates in a way that the Reaper Web Interface javascript can access and display.
is this possible?
|
|
|
07-20-2018, 10:26 AM
|
#2
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
Maybe helpful as well, the documentation for JSFX
https://www.reaper.fm/sdk/js/js.php
|
|
|
07-20-2018, 10:33 AM
|
#3
|
Human being with feelings
Join Date: Mar 2013
Posts: 463
|
yea i had a look thru that and couldnt find anything that seemed to achieve what i need...
|
|
|
07-20-2018, 12:24 PM
|
#4
|
Banned
Join Date: Sep 2015
Posts: 1,650
|
You might be better off ignoring the JSFX angle and going for a script to get the ReaTune parameter and set an ExtState.
|
|
|
07-20-2018, 12:25 PM
|
#5
|
Human being with feelings
Join Date: Mar 2013
Posts: 463
|
how does the script get called constantly when ReaTune is changing the current MIDI note in realtime?
|
|
|
07-20-2018, 12:47 PM
|
#6
|
Banned
Join Date: Sep 2015
Posts: 1,650
|
Scripts can run in the background, getting called around 25 times a second, so will get the parameter that number of times and the web app will call X times a second so should be responsive enough for tuning.
|
|
|
07-20-2018, 12:50 PM
|
#7
|
Human being with feelings
Join Date: Mar 2013
Posts: 463
|
what is the impact on realtime performance to have a script running that often?
also i am attempting to set this up right now and ReaTune doesnt have a parameter I can access via a script to get the current note, ReaTune simply sends MIDI data when the note changes.
Last edited by matthewjumpsoffbuildings; 07-20-2018 at 01:02 PM.
|
|
|
07-20-2018, 01:20 PM
|
#8
|
Human being with feelings
Join Date: Mar 2013
Posts: 463
|
ok further investigation leads me to believe that ReaTune wont work for this after all, since even if i send MIDI from it to a JS fx that reads out the midi note into one of its params (which i then can access in my deferred ReaScript), the note data ReaTune sends is only the nearest whole note, it doesnt seem to send the cents that the tuning is off by...
There is a JSFX tuner that has a param that is exactly what i want - eg it reads out "[--*--|-----]" and the name of the note, problem is its really wonky and unreliable compared to ReaTune, especially on higher guitar strings :/
|
|
|
07-20-2018, 02:53 PM
|
#9
|
Banned
Join Date: Sep 2015
Posts: 1,650
|
Yeah, I didn't check ReaTune for a tuning parameter so you'd need a reliable parameter for it to work. Checking a parameter via a script won't use any noticeable CPU plus you don't have to check every defer call, you can set up a timer so that it only checks once every X calls.
|
|
|
07-20-2018, 03:17 PM
|
#10
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
Then it's probably time for a feature-request
|
|
|
07-20-2018, 05:42 PM
|
#11
|
Banned
Join Date: Sep 2015
Posts: 1,650
|
The effect MJOB mentions doesn't use FFT so I think the answer might be to write a JSFX that uses the FFT functions that I assume are shared by ReaTune. I have no idea how to do that though, experiments have failed.
|
|
|
07-20-2018, 07:07 PM
|
#12
|
Human being with feelings
Join Date: Mar 2013
Posts: 463
|
is the source of ReaTune available anywhere?
|
|
|
07-21-2018, 03:08 AM
|
#13
|
Banned
Join Date: Sep 2015
Posts: 1,650
|
No and I'm only assuming that ReaTune uses it for the tuner. Maybe it doesn't, but I know that you can get pitch with FFT so it would be worth a bash to see if it's better than what you have just now. I just don't know how that would be done.
|
|
|
01-21-2023, 08:09 PM
|
#14
|
Human being with feelings
Join Date: Jan 2013
Posts: 1,126
|
Well JSFX can write to a gmem. Probably a defer script could write the gmem info to an extstate then webremote could read that extstate?
Or maybe the webremote can read gmem directly?
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 04:35 AM.
|