-
Notifications
You must be signed in to change notification settings - Fork 0
/
MReaPy_ABLM_ID.py
44 lines (35 loc) · 1.05 KB
/
MReaPy_ABLM_ID.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
from sws_pythoncommands import *
current = RPR_GetSelectedTrack(0, 0)
i = 0
j=0
while RPR_GetTrack(0, i) != mediatracknumberError():
success = False
target = RPR_GetTrack(0, i)
fx = 0
instance = 0
fxnum = RPR_TrackFX_GetCount(target)
while fx <= fxnum:
fxname = RPR_TrackFX_GetFXName(target, fx, "", 200)[3]
if fxname == "":
success = False
break
if "ABLM2 (TBProAudio)" in fxname:
instance += 1
success = True
if instance == 1:
instance1_id = fx
pass
if instance == 2:
instance2_id = fx
break
fx += 1
if success == True:
j = j+1
RPR_TrackFX_SetParam(target, instance1_id, 3, 0)
RPR_TrackFX_SetParam(target, instance2_id, 3, 1)
RPR_TrackFX_SetParam(target, instance1_id, 4, j / 257)
RPR_TrackFX_SetParam(target, instance2_id, 4, j / 257)
pass
else:
pass
i += 1