Old 10-12-2018, 11:00 PM   #1
InfiniteDimensionality
Human being with feelings
 
Join Date: Jun 2017
Posts: 187
Default midisend with delay

In a JS I need to send a midi message after some time of receiving a new one.

I've tried adding an offset to the offset but it doesn't seem to work for anything larger than the block size.

I can basically do this when reaper is playing because one can use play_position, which acts as a way to measure time and determine how long to delay.

It would be nice if JS had a time variable that is always incrementing just so JS FX's can measure time.

e.g., daw_time = time since daw was started, or proj_time = time since project was loaded, etc.
InfiniteDimensionality is offline   Reply With Quote
Old 10-16-2018, 05:36 AM   #2
Time Waster
Human being with feelings
 
Time Waster's Avatar
 
Join Date: Aug 2013
Location: Bowral, Australia
Posts: 1,638
Default

Quote:
Originally Posted by InfiniteDimensionality View Post
It would be nice if JS had a time variable that is always incrementing just so JS FX's can measure time.

e.g., daw_time = time since daw was started, or proj_time = time since project was loaded, etc.
See the JS documentation here: http://reaper.fm/sdk/js/basiccode.php#js_time

Alternatively, set a counter in @sample and divide by srate to get seconds.
__________________
Mal, aka The Wasters of Time
Mal's JSFX: ReaRack2 Modular Synth
Time Waster 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 03:58 AM.


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