Old 09-26-2016, 01:08 PM   #1
Airal
Banned
 
Join Date: Nov 2015
Posts: 406
Default Callback on loop restart

Is there a way to get a function called when reaper reloops during playback?
Airal is offline   Reply With Quote
Old 10-09-2016, 04:42 PM   #2
Airal
Banned
 
Join Date: Nov 2015
Posts: 406
Default

Anyone?
Airal is offline   Reply With Quote
Old 10-09-2016, 05:07 PM   #3
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

You could watch the playback position and detect when it returned to the start of the loop, then call your function. It won't be perfectly precise though.
There was a similar thread recently for a JSFX I think.

Code:
function callback()
 -- do something when the loop restarts
end

function detectLoopRestart()
  if someCondition then
    callback()
  end

  reaper.defer(detectLoopRestart)
end

detectLoopRestart()

Last edited by cfillion; 10-09-2016 at 10:47 PM.
cfillion 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:48 AM.


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