@@ -6,31 +6,38 @@ class ExtTest:
6
6
def __init__ (self , ownerComp ):
7
7
self .ownerComp = ownerComp
8
8
CustomParHelper .Init (self , ownerComp , enable_properties = True , enable_callbacks = True )
9
- NoNode .Init (ownerComp , enable_chopexec = True , enable_datexec = True , enable_keyboard_shortcuts = True , enable_parexec = True )
9
+ #CustomParHelper.DisableCallbacks()
10
+ NoNode .Init (ownerComp , enable_chopexec = True , enable_datexec = True , enable_parexec = True , enable_keyboard_shortcuts = True )
10
11
NoNode .SetMarkColor ((0.5 , 0.05 , 0.5 ))
11
-
12
+
12
13
# CHOP Exec tests
13
14
NoNode .RegisterChopExec (NoNode .ChopExecType .ValueChange , self .ownerComp .op ('null_test_chopexec' ), 'v1' , self .onTestChopValueChange )
14
15
NoNode .RegisterChopExec (NoNode .ChopExecType .OffToOn , self .ownerComp .op ('null_test_chopexec' ), 'v*, v2' , self .onTestChopOffToOn )
15
16
NoNode .RegisterChopExec (NoNode .ChopExecType .OnToOff , self .ownerComp .op ('null_test_chopexec' ), ['v1' , 'v2' ], self .onTestChopOnToOff )
16
17
#NoNode.RegisterChopExec(NoNode.ChopExecType.WhileOn, self.ownerComp.op('null_test_chopexec'), '*', self.onTestChopWhileOn)
17
18
#NoNode.RegisterChopExec(NoNode.ChopExecType.WhileOff, self.ownerComp.op('null_test_chopexec'), '*', self.onTestChopWhileOff)
18
-
19
+ #NoNode.DisableChopExec()
20
+
19
21
# DAT Exec tests
20
22
NoNode .RegisterDatExec (NoNode .DatExecType .TableChange , self .ownerComp .op ('null_test_datexec' ), self .onTestDatExecTableChange )
21
23
NoNode .RegisterDatExec (NoNode .DatExecType .RowChange , self .ownerComp .op ('null_test_datexec' ), self .onTestDatExecRowChange )
22
24
NoNode .RegisterDatExec (NoNode .DatExecType .ColChange , self .ownerComp .op ('null_test_datexec' ), self .onTestDatExecColChange )
23
25
NoNode .RegisterDatExec (NoNode .DatExecType .CellChange , self .ownerComp .op ('null_test_datexec' ), self .onTestDatExecCellChange )
24
26
NoNode .RegisterDatExec (NoNode .DatExecType .SizeChange , self .ownerComp .op ('null_test_datexec' ), self .onTestDatExecSizeChange )
25
- NoNode .DisableDatExec ()
27
+ #NoNode.DisableDatExec()
28
+
29
+ # Parexec tests
30
+ NoNode .RegisterParExec (NoNode .ParExecType .ValueChange , self .ownerComp , 'Float' , self .onTestParValueChange )
31
+ NoNode .RegisterParExec (NoNode .ParExecType .OnPulse , self .ownerComp , 'Pulse' , self .onTestParOnPulse )
32
+ NoNode .RegisterParExec (NoNode .ParExecType .ValueChange , self .ownerComp , self .ownerComp .par .Testseq0float , self .onTestParSeqValueChange )
33
+ NoNode .RegisterParExec (NoNode .ParExecType .ValueChange , self .ownerComp .op ('button1' ), 'value0' , self .onTestParButton1ValueChange )
34
+ NoNode .RegisterParExec (NoNode .ParExecType .OnPulse , self .ownerComp .op ('speed1' ), 'resetpulse' , self .onTestParSpeed1ResetPulse )
35
+ #NoNode.DisableParExec()
26
36
27
37
# Keyboard shortcut test
28
38
NoNode .RegisterKeyboardShortcut ('ctrl.t' , self .onTestKeyboardShortcut )
39
+ NoNode .DisableKeyboardShortcuts ()
29
40
30
- # Parexec tests
31
- NoNode .RegisterParExec (NoNode .ParExecType .ValueChange , 'Float' , self .onTestParValueChange )
32
- NoNode .RegisterParExec (NoNode .ParExecType .OnPulse , 'Pulse' , self .onTestParOnPulse )
33
- NoNode .RegisterParExec (NoNode .ParExecType .ValueChange , self .ownerComp .par .Testseq0float , self .onTestParSeqValueChange )
34
41
35
42
# CHOP Exec callbacks
36
43
def onTestChopValueChange (self , _channel , _sampleIndex , _val , _prev ):
@@ -51,6 +58,7 @@ def onTestChopWhileOn(self, _channel, _sampleIndex, _val, _prev):
51
58
def onTestChopWhileOff (self , _channel , _sampleIndex , _val , _prev ):
52
59
debug (f'onTestChopWhileOff: { _channel .name } { _sampleIndex } { _val } { _prev } ' )
53
60
61
+
54
62
# DAT Exec callbacks
55
63
def onTestDatExecTableChange (self , _dat ):
56
64
debug (f'onTestDatExecTableChange: { _dat } ' )
@@ -67,30 +75,28 @@ def onTestDatExecCellChange(self, _dat, _cells, _prev):
67
75
def onTestDatExecSizeChange (self , _dat ):
68
76
debug (f'onTestDatExecSizeChange: { _dat } ' )
69
77
70
- # Keyboard shortcut callback
71
- def onTestKeyboardShortcut (self ):
72
- debug ('onTestKeyboardShortcut: ctrl+t pressed' )
73
78
74
- # # Existing parameter callbacks
75
- # def onParFloat(self, _par, _val, _prev):
76
- # debug(f'onParFloat: {_par} {_val} {_prev}')
79
+ # Existing parameter callbacks
80
+ def onParFloat (self , _par , _val , _prev ):
81
+ debug (f'onParFloat: { _par } { _val } { _prev } ' )
82
+
83
+ def onParPulse (self , _par ):
84
+ debug (f'onParPulse: { _par } ' )
85
+ print ('printing parameters as self.par<Parname> properties:' , self .parFloat , self .parPulse , self .parGroupInt )
86
+ print ('printing parameters as self.eval<Parname> properties:' , self .evalFloat , self .evalPulse , self .evalGroupInt )
77
87
78
- # def onParPulse(self, _par):
79
- # debug(f'onParPulse: {_par}')
80
- # print('printing parameters as self.par<Parname> properties:', self.parFloat, self.parPulse, self.parGroupInt)
81
- # print('printing parameters as self.eval<Parname> properties:', self.evalFloat, self.evalPulse, self.evalGroupInt)
88
+ def onParGroupInt (self , _parGroup , _val ):
89
+ debug (f'onParGroupInt: { _parGroup } { _val } ' )
82
90
83
- # def onParGroupInt (self, _parGroup, _val ):
84
- # debug(f'onParGroupInt : {_parGroup} {_val }')
91
+ def onSeqTestseqN (self , idx ):
92
+ debug (f'onSeqTestN : { idx } ' )
85
93
86
- # def onSeqTestseqN (self, idx):
87
- # debug(f'onSeqTestN : {idx}')
94
+ def onSeqTestseqNfloat (self , _par , idx , _val , _prev ):
95
+ debug (f'onSeqTestNFloat : { _par } { idx } { _val } { _prev } ' )
88
96
89
- # def onSeqTestseqNfloat (self, _par, idx, _val, _prev):
90
- # debug(f'onSeqTestNFloat : {_par} {idx} {_val} {_prev}')
97
+ def onSeqTestseqNstr (self , _par , idx , _val , _prev ):
98
+ debug (f'onSeqTestNStr : { _par } { idx } { _val } { _prev } ' )
91
99
92
- # def onSeqTestseqNstr(self, _par, idx, _val, _prev):
93
- # debug(f'onSeqTestNStr: {_par} {idx} {_val} {_prev}')
94
100
95
101
# Parexec callbacks
96
102
def onTestParValueChange (self , _par , _val ):
@@ -102,3 +108,13 @@ def onTestParOnPulse(self):
102
108
def onTestParSeqValueChange (self , _par , _val ):
103
109
debug (f'onTestParSeqValueChange: { _par .name } { _val } ' )
104
110
111
+ def onTestParButton1ValueChange (self , _par , _val ):
112
+ debug (f'onTestParButton1ValueChange: { _par .name } { _val } ' )
113
+
114
+ def onTestParSpeed1ResetPulse (self ):
115
+ debug (f'onTestParSpeed1ResetPulse' )
116
+
117
+
118
+ # Keyboard shortcut callback
119
+ def onTestKeyboardShortcut (self ):
120
+ debug ('onTestKeyboardShortcut: ctrl+t pressed' )
0 commit comments