Go Back   Cockos Incorporated Forums > Projects > Deprecated REAPER issue tracker > Feature Request

Sample accurate automation for JS needed, @slider is highly inaccurate Issue Tools
issueid=4440 11-05-2012 07:58 AM
Human being with feelings
Sample accurate automation for JS needed, @slider is highly inaccurate
A solution to provide sample accurate automation for JS

--- THE PROBLEM ---

JS automation is not sample accurate: You determine if a slider has changed or not in @slider, and then react upon that in @block. But the size of a block is variable, so attempting to make automations relative to the groove of a song may be impossible.

For example, I had to put this code into @block:
midisend(0, msg1, msg23);

Why 0? Because JS provides no information about the timing of events that triggered @slider. So all of my automation updates are imprecisely quantized onto a variably sized @block boundary.

--- THE SOLUTION ---

I can propose one solution, a new section called '@event'

- @event is called for each atomic automation update coming from a JS GUI or from Reaper automation.

- Within a given call to @event three active variables shall be provided:
1) slider_idx
2) slider_value
3) sampleoffset

- midisend() shall also be a valid call in @event, so that we don't have to create our own array to remember the updates that came in.

This also solves another major problem that @slider has: You had to "KEEP TRACK OF THE CURRENT VALUE FOR EACH KNOB AND THEN CHECK TO SEE IF IT CHANGED OR NOT AND IF SO SEND IT OUT". But this is horrible, because I specifically need to send a REPEATING VALUE sometimes. You literally cannot detect that you've automated 128, 64, 64, 32, 128 using @slider, because there's no way to know that 64 occurred twice. You can only check if a slider no longer matches its previous value.
Issue Details
Issue Type Feature Request
Project Deprecated REAPER issue tracker
Category Plugins
Status Coming in REAPER 5
Priority 1 - Highest
Suggested Version 4.26
Implemented Version (none)
Users who would use this feature 3
Users who would not use this feature 0
Assigned Users (none)
Tags (none)

12-22-2014 02:34 AM
Human being with feelings
 
DONE! (v5.0pre1)
Reply
Reply

Issue Tools
Subscribe to this issue

All times are GMT -7. The time now is 03:09 PM.


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