I'm a bit late to the JS boat, so I had to do some basic research on this. I found that:
Quote:
The @gfx section gets executed around 30 times a second when the plug-ins GUI is open. You can do whatever processing you like in this (Typically using gfx_*()). Note that this code runs in a separate thread from the audio processing, so you may have both running simultaneously which could leave certain variables/RAM in an unpredictable state.
|
I need to now translate this polling script that uses beyond reaper in to EEL (It failed miserably to achieve the goal, mostly because it was spamming my undo history with 'reascript' events.):
Code:
import beyond.Reaper
import beyond.Screen
import beyond.Reaper.Track
import beyond.Reaper.Item
from time import sleep
@ProgramStart
class Main(Parallel):
def Start()
with Reaper as r:
Project=r.ProjectSelected
# Project.UndoEvent("KB_Raise_VEP")
while True:
while r.CountSelectedMediaItems(Project.Address) > 0:
for Item in Project.ItemsSelected:
Item.Receive()
if Item.Address not in stored:
stored.append(Item)
T = r.Track(r.GetMediaItem_Track(Item.Address))
if not T.Selected:T.Selected = True
d=[stored.remove(I) for I in stored if I not in Project.ItemsSelected] # Just to be pythonic
sleep(.05)
1. How do you append things to the end of an array in eel?
2. How do you delete a specific value from an array?
3. Is there comprehensive documentation besides
http://reaper.fm/sdk/js/js.php where I can see some examples of these more basic scripting questions?
Thanks for any help!