Go Back   Cockos Incorporated Forums > REAPER Forums > MIDI Hardware, Control Surfaces, and OSC

Reply
 
Thread Tools Display Modes
Old 09-18-2022, 11:10 AM   #20121
Geoff Waddington
Human being with feelings
 
Geoff Waddington's Avatar
 
Join Date: Mar 2009
Location: Dartmouth, Nova Scotia
Posts: 11,617
Default

Quote:
Originally Posted by Funkybot View Post
Currently using a stepsize of 0.001.

Here's my stepped param list from the FX Configurator I use for the Twister. Tick count is in the parens. It's probably not a perfect scaled response, but I found it works well enough.
Code:
# of Steps: [ values ]
2:    [ 0.00 1.00 ]                                                                                                                                            
3:    [ (25) 0.00 0.50 1.00 ]                                                                                                                                       
4:    [ (25) 0.00 0.33 0.67 1.00 ]                                                                                                                                  
5:    [ (25) 0.00 0.25 0.50 0.75 1.00 ]                                                                                                                             
6:    [ (20) 0.00 0.20 0.40 0.60 0.80 1.00 ]                                                                                                                        
7:    [ (20) 0.00 0.17 0.33 0.50 0.67 0.83 1.00 ]                                                                                                                   
8:    [ (20) 0.00 0.14 0.29 0.43 0.57 0.71 0.86 1.00 ]                                                                                                              
9:    [ (20) 0.00 0.13 0.25 0.38 0.50 0.63 0.75 0.88 1.00 ]                                                                                                         
10:   [ (15) 0.00 0.11 0.22 0.33 0.44 0.56 0.67 0.78 0.89 1.00 ]                                                                                                    
11:   [ (15) 0.00 0.10 0.20 0.30 0.40 0.50 0.60 0.70 0.80 0.90 1.00 ]                                                                                               
12:   [ (15) 0.00 0.09 0.18 0.27 0.36 0.45 0.55 0.64 0.73 0.82 0.91 1.00 ]                                                                                          
13:   [ (15) 0.00 0.08 0.17 0.25 0.33 0.42 0.50 0.58 0.67 0.75 0.83 0.92 1.00 ]                                                                                     
14:   [ (10) 0.00 0.08 0.15 0.23 0.31 0.38 0.46 0.54 0.62 0.69 0.77 0.85 0.92 1.00 ]                                                                                
15:   [ (10) 0.00 0.07 0.14 0.21 0.29 0.36 0.43 0.50 0.57 0.64 0.71 0.79 0.86 0.93 1.00 ]                                                                           
16:   [ (10) 0.00 0.07 0.13 0.20 0.27 0.33 0.40 0.47 0.53 0.60 0.67 0.73 0.80 0.87 0.93 1.00 ]                                                                      
17:   [ (5)  0.00 0.06 0.13 0.19 0.25 0.31 0.38 0.44 0.50 0.56 0.63 0.69 0.75 0.81 0.88 0.94 1.00 ]                                                                 
18:   [ (5)  0.00 0.06 0.12 0.18 0.24 0.29 0.35 0.41 0.47 0.53 0.59 0.65 0.71 0.76 0.82 0.88 0.94 1.00 ]                                                            
19:   [ (5)  0.00 0.06 0.11 0.17 0.22 0.28 0.33 0.39 0.44 0.50 0.56 0.61 0.67 0.72 0.78 0.83 0.89 0.94 1.00 ]                                                       
20:   [ (5)  0.00 0.05 0.11 0.16 0.21 0.26 0.32 0.37 0.42 0.47 0.53 0.58 0.63 0.68 0.74 0.79 0.84 0.89 0.95 1.00 ]                                                  
21:   [ (3)  0.00 0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 0.55 0.60 0.65 0.70 0.75 0.80 0.85 0.90 0.95 1.00 ]                                             
22:   [ (3)  0.00 0.05 0.10 0.14 0.19 0.24 0.29 0.33 0.38 0.43 0.48 0.52 0.57 0.62 0.67 0.71 0.76 0.81 0.86 0.90 0.95 1.00 ]                                        
23:   [ (3)  0.00 0.05 0.09 0.14 0.18 0.23 0.27 0.32 0.36 0.41 0.45 0.50 0.55 0.59 0.64 0.68 0.73 0.77 0.82 0.86 0.91 0.95 1.00 ]                                   
24:   [ (3)  0.00 0.04 0.09 0.13 0.17 0.22 0.26 0.30 0.35 0.39 0.43 0.48 0.52 0.57 0.61 0.65 0.70 0.74 0.78 0.83 0.87 0.91 0.96 1.00 ]                              
25:   [ (3)  0.00 0.04 0.08 0.13 0.17 0.21 0.25 0.29 0.33 0.38 0.42 0.46 0.50 0.54 0.58 0.63 0.67 0.71 0.75 0.79 0.83 0.88 0.92 0.96 1.00 ]
Thank you !

I think I'll take that, multiply it by 10 (for finer tuning), and smooth the values just a bit.

Of course that means the MFT, with a step size of 0.001, will divide these values by 10.

What do you think of this for a first cut:
Code:
Steps 2   3   4   5   6   7   8   9   10  11  12  13 14 15 16 17 18 19 20 21 22 23 24 25 
Ticks 250 235 220 205 190 175 160 145 130 115 100 90 80 70 60 50 45 40 35 30 25 20 20 20
__________________
To install you need the CSI Software and Support Files
For installation instructions and documentation see the Wiki
Donate -- via PayPal to waddingtongeoff@gmail.com
Geoff Waddington is offline   Reply With Quote
Old 09-18-2022, 11:22 AM   #20122
Funkybot
Human being with feelings
 
Funkybot's Avatar
 
Join Date: Jul 2007
Location: New Joisey
Posts: 6,150
Default

Quote:
Originally Posted by Geoff Waddington View Post
Thank you !

I think I'll take that, multiply it by 10 (for finer tuning), and smooth the values just a bit.

Of course that means the MFT, with a step size of 0.001, will divide these values by 10.

What do you think of this for a first cut:
Code:
Steps 2   3   4   5   6   7   8   9   10  11  12  13 14 15 16 17 18 19 20 21 22 23 24 25 
Ticks 250 235 220 205 190 175 160 145 130 115 100 90 80 70 60 50 45 40 35 30 25 20 20 20
Looks good!
__________________
CSI v3 Wiki
Funkybot is online now   Reply With Quote
Old 09-18-2022, 01:57 PM   #20123
Equitone
Human being with feelings
 
Join Date: Apr 2018
Posts: 123
Default XTouch with X32

Hi, I'm trying to help a friend who has an X32 and an XTouch. Is there some kind of action he can use to switch between one and the other. For access reasons, he is using the X32 with ethernet, and the XTouch with USB.
Thanks.
Equitone is offline   Reply With Quote
Old 09-18-2022, 02:40 PM   #20124
Geoff Waddington
Human being with feelings
 
Geoff Waddington's Avatar
 
Join Date: Mar 2009
Location: Dartmouth, Nova Scotia
Posts: 11,617
Default

Quote:
Originally Posted by Equitone View Post
Hi, I'm trying to help a friend who has an X32 and an XTouch. Is there some kind of action he can use to switch between one and the other. For access reasons, he is using the X32 with ethernet, and the XTouch with USB.
Thanks.
As I'm sure you know, you can use both simultaneously with CSI, but if I understand the question, you mean you want to switch between using one or the other.

If so, just make 2 Pages, one with the X32 setup, and one with the X-Touch setup, and switch between the two Pages.
__________________
To install you need the CSI Software and Support Files
For installation instructions and documentation see the Wiki
Donate -- via PayPal to waddingtongeoff@gmail.com
Geoff Waddington is offline   Reply With Quote
Old 09-18-2022, 02:57 PM   #20125
Equitone
Human being with feelings
 
Join Date: Apr 2018
Posts: 123
Default

Geoff,

Are there config files for the X32, and which action does he have to use to switch pages?
Thanks.
Equitone is offline   Reply With Quote
Old 09-18-2022, 03:37 PM   #20126
Geoff Waddington
Human being with feelings
 
Geoff Waddington's Avatar
 
Join Date: Mar 2009
Location: Dartmouth, Nova Scotia
Posts: 11,617
Default

Quote:
Originally Posted by Equitone View Post
Geoff,

Are there config files for the X32, and which action does he have to use to switch pages?
Thanks.
No files yet, jacksoonbrowne, a forum member, is working on X32 support, but it's not quite finished yet.

There is a NextPage Action.

Probably worth checking out the Wiki to find out more about Pages, they are very powerful.
__________________
To install you need the CSI Software and Support Files
For installation instructions and documentation see the Wiki
Donate -- via PayPal to waddingtongeoff@gmail.com
Geoff Waddington is offline   Reply With Quote
Old 09-18-2022, 03:43 PM   #20127
Geoff Waddington
Human being with feelings
 
Geoff Waddington's Avatar
 
Join Date: Mar 2009
Location: Dartmouth, Nova Scotia
Posts: 11,617
Default

New build is up.

CSI Exp.zip

Added preliminary support for auto calc tick counts.

It only works with EZFXZones for now.

You must have the following defined for it to work:
StepSize -- either in the Zone definition or via the .mst file.
Number of steps for the parameter -- either in the Zone definition or via the ZoneStepSizes folder.

[edit]
For the coders, here's how it works, it's dead simple once you have all the necessary pieces:
Code:
stepSize *= 10000.0;
int baseTickCount = zoneManager->GetTickCount(context->GetNumberOfSteppedValues());
int tickCount = int(baseTickCount / stepSize + 0.5);
tickCounts.push_back(tickCount);
context->SetTickCounts(tickCounts);
__________________
To install you need the CSI Software and Support Files
For installation instructions and documentation see the Wiki
Donate -- via PayPal to waddingtongeoff@gmail.com

Last edited by Geoff Waddington; 09-18-2022 at 03:54 PM.
Geoff Waddington is offline   Reply With Quote
Old 09-18-2022, 05:21 PM   #20128
Funkybot
Human being with feelings
 
Funkybot's Avatar
 
Join Date: Jul 2007
Location: New Joisey
Posts: 6,150
Default

Hi Geoff, this latest build inverted my encoders on the MFTwister. They worked in the build from the earlier today, but this latest one has them inverted. Note: fixing the inverted encoder behavior was why MFTEncoder was originally created.

Code:
StepSize
    Rotary 0.001
StepSizeEnd

AccelerationValues
    Rotary Dec 3f     3e    3d    3c    3b    3a    39     38    36    33    2f     
    Rotary Inc 41     42    43    44    45    46    47     48    4a    4d    51
    Rotary Val 0.001  0.002 0.003 0.004 0.005 0.006 0.0075 0.01  0.02  0.03  0.04
AccelerationValuesEnd

Widget RotaryA1 Rotary
    Encoder b0 00 7f
    FB_Fader7Bit b0 00 00
WidgetEnd
And this EZFX.zon:
Code:
Zone "VST: UAD Fairchild 660 (Universal Audio, Inc.)" "Fair660"
	FXParams		          1     2      3     6    7      9      0     8
 	FXParamNames		     Input Thresh Ratio Knee Output HdRoom Meter WetDry
	FXValueWidgets  	     RotaryA|
    	FXParamNameDisplays  	DisplayUpperA|
    	FXParamValueDisplays 	DisplayLowerA|

	FXParams		          5
 	FXParamNames		     DC Bal
	FXValueWidgets  	     RotaryB1
    	FXParamNameDisplays  	DisplayUpperB1
    	FXParamValueDisplays 	DisplayLowerB1

	FXParamStepValues   0	0.0 0.50 1.0
	FXParamStepValues   1	0.0 0.05 0.11 0.16 0.21 0.26 0.32 0.37 0.42 0.47 0.53 0.58 0.63 0.68 0.74 0.79 0.84 0.89 0.95 1.0
	FXParamStepValues   3	0.0 0.20 0.40 0.60 0.80 1.0 
 	FXParamStepValues   9	0.0 0.17 0.33 0.50 0.67 0.83 1.0
ZoneEnd
__________________
CSI v3 Wiki
Funkybot is online now   Reply With Quote
Old 09-18-2022, 05:38 PM   #20129
Geoff Waddington
Human being with feelings
 
Geoff Waddington's Avatar
 
Join Date: Mar 2009
Location: Dartmouth, Nova Scotia
Posts: 11,617
Default

Quote:
Originally Posted by Funkybot View Post
Hi Geoff, this latest build inverted my encoders on the MFTwister. They worked in the build from the earlier today, but this latest one has them inverted. Note: fixing the inverted encoder behavior was why MFTEncoder was originally created.

Code:
StepSize
    Rotary 0.001
StepSizeEnd

AccelerationValues
    Rotary Dec 3f     3e    3d    3c    3b    3a    39     38    36    33    2f     
    Rotary Inc 41     42    43    44    45    46    47     48    4a    4d    51
    Rotary Val 0.001  0.002 0.003 0.004 0.005 0.006 0.0075 0.01  0.02  0.03  0.04
AccelerationValuesEnd

Widget RotaryA1 Rotary
    Encoder b0 00 7f
    FB_Fader7Bit b0 00 00
WidgetEnd
And this EZFX.zon:
Code:
Zone "VST: UAD Fairchild 660 (Universal Audio, Inc.)" "Fair660"
	FXParams		          1     2      3     6    7      9      0     8
 	FXParamNames		     Input Thresh Ratio Knee Output HdRoom Meter WetDry
	FXValueWidgets  	     RotaryA|
    	FXParamNameDisplays  	DisplayUpperA|
    	FXParamValueDisplays 	DisplayLowerA|

	FXParams		          5
 	FXParamNames		     DC Bal
	FXValueWidgets  	     RotaryB1
    	FXParamNameDisplays  	DisplayUpperB1
    	FXParamValueDisplays 	DisplayLowerB1

	FXParamStepValues   0	0.0 0.50 1.0
	FXParamStepValues   1	0.0 0.05 0.11 0.16 0.21 0.26 0.32 0.37 0.42 0.47 0.53 0.58 0.63 0.68 0.74 0.79 0.84 0.89 0.95 1.0
	FXParamStepValues   3	0.0 0.20 0.40 0.60 0.80 1.0 
 	FXParamStepValues   9	0.0 0.17 0.33 0.50 0.67 0.83 1.0
ZoneEnd
Is everything inverted, or just ones with tick counts ?

Auto tick count enabling is the only thing changed in this afternoon's build.

Are you sure you had this mornings build his morning ?

Something that needs to be changed, but it was there this morning too:

Code:
StepSize
    RotaryWidgetClass 0.001
StepSizeEnd

AccelerationValues
    RotaryWidgetClass Dec 3f     3e    3d    3c    3b    3a    39     38    36    33    2f     
    RotaryWidgetClass Inc 41     42    43    44    45    46    47     48    4a    4d    51
    RotaryWidgetClass Val 0.001  0.002 0.003 0.004 0.005 0.006 0.0075 0.01  0.02  0.03  0.04
AccelerationValuesEnd


Widget RotaryA1 RotaryWidgetClass
    Encoder b0 00 7f
    FB_Fader7Bit b0 00 00
WidgetEnd
__________________
To install you need the CSI Software and Support Files
For installation instructions and documentation see the Wiki
Donate -- via PayPal to waddingtongeoff@gmail.com

Last edited by Geoff Waddington; 09-18-2022 at 05:46 PM.
Geoff Waddington is offline   Reply With Quote
Old 09-18-2022, 05:46 PM   #20130
Funkybot
Human being with feelings
 
Funkybot's Avatar
 
Join Date: Jul 2007
Location: New Joisey
Posts: 6,150
Default

It happens on all encoders, not just stepped params.

As soon as I found the issue, I downgraded to the version from earlier this afternoon and it started working again. Went back to the newest build and it broke again. So the issue isn't when I saved the Encoder changes in the .mst or anything version related.

I tried this and it made no difference. Still experiencing inverted encoders.
Code:
AccelerationValues
    Rotary Dec 41     42    43    44    45    46    47     48    4a    4d    51
    Rotary Inc 3f     3e    3d    3c    3b    3a    39     38    36    33    2f      
    Rotary Val 0.001  0.002 0.003 0.004 0.005 0.006 0.0075 0.01  0.02  0.03  0.04
AccelerationValuesEnd
__________________
CSI v3 Wiki
Funkybot is online now   Reply With Quote
Old 09-18-2022, 05:49 PM   #20131
Geoff Waddington
Human being with feelings
 
Geoff Waddington's Avatar
 
Join Date: Mar 2009
Location: Dartmouth, Nova Scotia
Posts: 11,617
Default

Quote:
Originally Posted by Funkybot View Post
It happens on all encoders, not just stepped params.

As soon as I found the issue, I downgraded to the version from earlier this afternoon and it started working again. Went back to the newest build and it broke again. So the issue isn't when I saved the Encoder changes in the .mst or anything version related.

I tried this and it made no difference. Still experiencing inverted encoders.
Code:
AccelerationValues
    Rotary Dec 41     42    43    44    45    46    47     48    4a    4d    51
    Rotary Inc 3f     3e    3d    3c    3b    3a    39     38    36    33    2f      
    Rotary Val 0.001  0.002 0.003 0.004 0.005 0.006 0.0075 0.01  0.02  0.03  0.04
AccelerationValuesEnd
Please see the edit to the post.

[edit] Just checked GitHub, Rotary was changed to RotaryWidgetClass yesterday.
__________________
To install you need the CSI Software and Support Files
For installation instructions and documentation see the Wiki
Donate -- via PayPal to waddingtongeoff@gmail.com
Geoff Waddington is offline   Reply With Quote
Old 09-18-2022, 05:53 PM   #20132
Funkybot
Human being with feelings
 
Funkybot's Avatar
 
Join Date: Jul 2007
Location: New Joisey
Posts: 6,150
Default

Quote:
Originally Posted by Geoff Waddington View Post
Please see the edit to the post.
Thanks, I just realized that. I missed a build and didn't make that update. Working now! And they feel pretty good.
__________________
CSI v3 Wiki
Funkybot is online now   Reply With Quote
Old 09-18-2022, 05:57 PM   #20133
Geoff Waddington
Human being with feelings
 
Geoff Waddington's Avatar
 
Join Date: Mar 2009
Location: Dartmouth, Nova Scotia
Posts: 11,617
Default

Quote:
Originally Posted by Funkybot View Post
Thanks, I just realized that. I missed a build and didn't make that update. Working now! And they feel pretty good.
Great, and if you have the ZoneStepSizes folder contents, the Fairchild 660 is in there, you won't even need the step values:

Code:
Zone "VST: UAD Fairchild 660 (Universal Audio, Inc.)" "Fair660"
	FXParams		          1     2      3     6    7      9      0     8
 	FXParamNames		     Input Thresh Ratio Knee Output HdRoom Meter WetDry
	FXValueWidgets  	     RotaryA|
    	FXParamNameDisplays  	DisplayUpperA|
    	FXParamValueDisplays 	DisplayLowerA|

	FXParams		          5
 	FXParamNames		     DC Bal
	FXValueWidgets  	     RotaryB1
    	FXParamNameDisplays  	DisplayUpperB1
    	FXParamValueDisplays 	DisplayLowerB1

	FXParamStepValues   0	0.0 0.50 1.0
	FXParamStepValues   1	0.0 0.05 0.11 0.16 0.21 0.26 0.32 0.37 0.42 0.47 0.53 0.58 0.63 0.68 0.74 0.79 0.84 0.89 0.95 1.0
	FXParamStepValues   3	0.0 0.20 0.40 0.60 0.80 1.0 
 	FXParamStepValues   9	0.0 0.17 0.33 0.50 0.67 0.83 1.0
ZoneEnd
__________________
To install you need the CSI Software and Support Files
For installation instructions and documentation see the Wiki
Donate -- via PayPal to waddingtongeoff@gmail.com
Geoff Waddington is offline   Reply With Quote
Old 09-18-2022, 06:11 PM   #20134
Funkybot
Human being with feelings
 
Funkybot's Avatar
 
Join Date: Jul 2007
Location: New Joisey
Posts: 6,150
Default

Quote:
Originally Posted by Geoff Waddington View Post
Great, and if you have the ZoneStepSizes folder contents, the Fairchild 660 is in there, you won't even need the step values:

Code:
Zone "VST: UAD Fairchild 660 (Universal Audio, Inc.)" "Fair660"
	FXParams		          1     2      3     6    7      9      0     8
 	FXParamNames		     Input Thresh Ratio Knee Output HdRoom Meter WetDry
	FXValueWidgets  	     RotaryA|
    	FXParamNameDisplays  	DisplayUpperA|
    	FXParamValueDisplays 	DisplayLowerA|

	FXParams		          5
 	FXParamNames		     DC Bal
	FXValueWidgets  	     RotaryB1
    	FXParamNameDisplays  	DisplayUpperB1
    	FXParamValueDisplays 	DisplayLowerB1

	FXParamStepValues   0	0.0 0.50 1.0
	FXParamStepValues   1	0.0 0.05 0.11 0.16 0.21 0.26 0.32 0.37 0.42 0.47 0.53 0.58 0.63 0.68 0.74 0.79 0.84 0.89 0.95 1.0
	FXParamStepValues   3	0.0 0.20 0.40 0.60 0.80 1.0 
 	FXParamStepValues   9	0.0 0.17 0.33 0.50 0.67 0.83 1.0
ZoneEnd
Refresh my memory about how to get the ZoneStepSizes populated again please. There's no Autoscan happening in this latest build right? Do I have to enable that in the CSI.ini? I remember at one point having NoAutoScan in there, but that's been gone a few days now.

Or does it get created when the FX is activated?

Code:
Version 2.0

MidiSurface "XTouchOne" 7 9 
MidiSurface "MFTwister" 6 8 
OSCSurface "iPad Pro" 8003 9003 10.0.0.146
OSCSurface "TouchOSCLocal" 8002 9002 10.0.0.100
MidiSurface "CMC-QC" 23 24 

Page "HomePage"
"XTouchOne" 1 0 "X-Touch_One.mst" "X-Touch_One_FB" 
"MFTwister" 8 0 "MIDIFighterTwisterEncoder.mst" "FXTwisterMenu" 
"iPad Pro" 8 0 "FXTwister.ost" "FXTwisterMenu" 
"TouchOSCLocal" 8 0 "FXTwister.ost" "FXTwisterMenu" 
"CMC-QC" 0 0 "Stienberg_CMC-QC-2.mst" "Steinberg_CMC-QC-2" 

Page "MCUPage"
"XTouchOne" 1 0 "X-Touch_One.mst" "X-Touch_One_FB" 
"MFTwister" 8 0 "MIDIFighterTwisterEncoder.mst" "FXTwisterFocusedFX" 
"iPad Pro" 8 0 "MCU-Pad.ost" "MCU" 
"TouchOSCLocal" 8 0 "FXTwister.ost" "FXTwisterFocusedFX" 
"CMC-QC" 0 0 "Stienberg_CMC-QC-2.mst" "Steinberg_CMC-QC-2"
__________________
CSI v3 Wiki
Funkybot is online now   Reply With Quote
Old 09-18-2022, 06:25 PM   #20135
Geoff Waddington
Human being with feelings
 
Geoff Waddington's Avatar
 
Join Date: Mar 2009
Location: Dartmouth, Nova Scotia
Posts: 11,617
Default

Quote:
Originally Posted by Funkybot View Post
Refresh my memory about how to get the ZoneStepSizes populated again please. There's no Autoscan happening in this latest build right? Do I have to enable that in the CSI.ini? I remember at one point having NoAutoScan in there, but that's been gone a few days now.

Or does it get created when the FX is activated?

Code:
Version 2.0

MidiSurface "XTouchOne" 7 9 
MidiSurface "MFTwister" 6 8 
OSCSurface "iPad Pro" 8003 9003 10.0.0.146
OSCSurface "TouchOSCLocal" 8002 9002 10.0.0.100
MidiSurface "CMC-QC" 23 24 

Page "HomePage"
"XTouchOne" 1 0 "X-Touch_One.mst" "X-Touch_One_FB" 
"MFTwister" 8 0 "MIDIFighterTwisterEncoder.mst" "FXTwisterMenu" 
"iPad Pro" 8 0 "FXTwister.ost" "FXTwisterMenu" 
"TouchOSCLocal" 8 0 "FXTwister.ost" "FXTwisterMenu" 
"CMC-QC" 0 0 "Stienberg_CMC-QC-2.mst" "Steinberg_CMC-QC-2" 

Page "MCUPage"
"XTouchOne" 1 0 "X-Touch_One.mst" "X-Touch_One_FB" 
"MFTwister" 8 0 "MIDIFighterTwisterEncoder.mst" "FXTwisterFocusedFX" 
"iPad Pro" 8 0 "MCU-Pad.ost" "MCU" 
"TouchOSCLocal" 8 0 "FXTwister.ost" "FXTwisterFocusedFX" 
"CMC-QC" 0 0 "Stienberg_CMC-QC-2.mst" "Steinberg_CMC-QC-2"
Here's how you do it, just uncomment the following:
Code:
Version 2.0

//AutoScan

MidiSurface "XTouch Universal" 12 11 
MidiSurface "SCE24" 11 10 
OSCSurface "iPhone" 8000 9000 168.192.2.1

Page "HomePage"
"XTouch Universal" 8 0 "X-Touch.mst" "X-Touch"
but for the UA Fairchild 660, you just have to make sure the files from the ZoneStepSizes folder in CSI Support Files are in your ZoneStepSizes folder, the work has already been done for you

That's the whole idea, that folder will get more and more and more .stp files, meaning a whole lot of step sizes for a whole lot of FX will automatically be available for everyone to utilize.
__________________
To install you need the CSI Software and Support Files
For installation instructions and documentation see the Wiki
Donate -- via PayPal to waddingtongeoff@gmail.com
Geoff Waddington is offline   Reply With Quote
Old 09-18-2022, 06:47 PM   #20136
Funkybot
Human being with feelings
 
Funkybot's Avatar
 
Join Date: Jul 2007
Location: New Joisey
Posts: 6,150
Default

Just tried it out: the AutoScan process is still having the issues I experienced earlier:

1. It crashes frequently
2. After a crash, it starts over again in a loop
3. There are no files being written at all on Windows
4. At one point it looked like it got to the end of the list without crashing, then started over again at the start of the list again and crashed the second time thorugh...no files written

So the only files in the CSI\Zones\ZoneStepSizes\ folder are the UAD files you provided. Which work great for the Fairchild plugin, but not at all for my non-UAD plugins.

Once I can get this working, I'll have hundreds of step files to share. Will run this on my Mac and try to just transfer the files over to Windows.
__________________
CSI v3 Wiki
Funkybot is online now   Reply With Quote
Old 09-18-2022, 06:57 PM   #20137
Geoff Waddington
Human being with feelings
 
Geoff Waddington's Avatar
 
Join Date: Mar 2009
Location: Dartmouth, Nova Scotia
Posts: 11,617
Default

Quote:
Originally Posted by Funkybot View Post
Ok, nothing that needs fixing right now but the AutoScan process is still having the issues I experienced earlier:

1. It crashes frequently
2. After a crash, it starts at the begining again
3. No files are actually being written along the way
4. At one point it looked like it got to the end without crashing, then started over again at the start of the list again and crashed the second time thorugh...no files written

The only files in the CSI\Zones\ZoneStepSizes\ folder are the UAD files you provided. Which work great for the Fairchild plugin, but not at all for my non-UAD plugins.

Yup, autoscan is definitely a work in progress.

Just like you must with Reaper, when trying to isolate a particularly obnoxious plugin, there are a series of steps you can take.

The most important is trying to find which plugin is crashing it.

If you can do that, remove it from your FX folder temporarily and redo the autoscan.

Another strategy, try pointing your surface at a temporary Zone folder in CSi.ini, or in the config panel.

Then place a few FX at a time in the temporary Zone folder and slowly make progress that way.

Not pretty, but you only have to do it once

Once you make your way laboriously through this process, you never have to think about step sizes again !

Are you sure you have the right folder structure on Windows ?

[edit] I'll also rewrite it so that it puts out each file when it finishes so, like the previous version, you can see where you halted/crashed, and you don't lose your previous work.
__________________
To install you need the CSI Software and Support Files
For installation instructions and documentation see the Wiki
Donate -- via PayPal to waddingtongeoff@gmail.com

Last edited by Geoff Waddington; 09-18-2022 at 07:05 PM.
Geoff Waddington is offline   Reply With Quote
Old 09-18-2022, 07:28 PM   #20138
jacksoonbrowne
Human being with feelings
 
jacksoonbrowne's Avatar
 
Join Date: Aug 2017
Location: Ottawa, Canada
Posts: 665
Default

Quote:
Originally Posted by Geoff Waddington View Post
Thanks, will be in next build.

[edit] On closer inspection, not sure this type of code doesn't circumvent shared pointer semantics, could be disastrous:
Code:
memcpy((void*)&outSocket_, (void*)&inSocket, sizeof(shared_ptr<oscpkt::UdpSocket>));
I've changed all those shared pointers to regular pointers, since they have app lifetime, and checked it in.

It will be in next build, could you verify I got things right here:
Code:
OSC_ControlSurfaceIO::OSC_ControlSurfaceIO(string surfaceName, string receiveOnPort, string transmitToPort, string transmitToIpAddress) : name_(surfaceName)
{
    if (receiveOnPort != transmitToPort)
    {
        inSocket_  = GetInputSocketForPort(surfaceName, stoi(receiveOnPort));;
        outSocket_ = GetOutputSocketForAddressAndPort(surfaceName, transmitToIpAddress, stoi(transmitToPort));
    }
    else
    {
        // WHEN INPUT AND OUTPUT SOCKETS ARE THE SAME -- DO MAGIC :)
        oscpkt::UdpSocket* inSocket = GetInputSocketForPort(surfaceName, stoi(receiveOnPort));;

        struct addrinfo hints;
        struct addrinfo* addressInfo;
        memset(&hints, 0, sizeof(struct addrinfo));
        hints.ai_family = AF_INET;      // IPV4
        hints.ai_socktype = SOCK_DGRAM; // UDP
        hints.ai_flags = 0x00000001;    // socket address is intended for bind
        getaddrinfo(transmitToIpAddress.c_str(), transmitToPort.c_str(), &hints, &addressInfo);
        memcpy(&(inSocket->remote_addr), (void*)(addressInfo->ai_addr), addressInfo->ai_addrlen);

        inSocket_  = inSocket;
        outSocket_ = inSocket;
        outputSockets_[surfaceName] = outSocket_;
    }
 }
You got it right
Tested with X32 and works perfectly.
__________________
AKA: Roy Wallingford

Last edited by jacksoonbrowne; 09-18-2022 at 09:07 PM.
jacksoonbrowne is offline   Reply With Quote
Old 09-18-2022, 07:37 PM   #20139
Funkybot
Human being with feelings
 
Funkybot's Avatar
 
Join Date: Jul 2007
Location: New Joisey
Posts: 6,150
Default

Quote:
Originally Posted by Geoff Waddington View Post
Are you sure you have the right folder structure on Windows ?
Sure? No. But I think I do!

[Reaper Resource Path]\CSI\Zones\ZoneStepSizes\

...same as in the Support files.

Note: on Mac, it writes as it goes. But not writing on Windows.

That said, now that I got it running on Mac, I have a large set of ZoneStepSizes to share. There are 473 Zone Step Files in here (that number includes the UAD files you already created):

https://www.dropbox.com/s/8ef28oodgd...Geoff.zip?dl=0

...feel free to add these to the Support Files to save others the trouble. Lots of common stuff in here from Arturia, Softube, SoundToys, Kush, Valhalla, Fuse, Relab, Black Rooster, Empircal, Plugin Alliance, Native Instruments, etc.
__________________
CSI v3 Wiki
Funkybot is online now   Reply With Quote
Old 09-18-2022, 08:56 PM   #20140
Funkybot
Human being with feelings
 
Funkybot's Avatar
 
Join Date: Jul 2007
Location: New Joisey
Posts: 6,150
Default

Small quirk with the ZoneStepSizes AutoScan process: if you have SubZones for a given plugin, it will try to create .stp files for each one. So you get someplugin.stp and someplugin-1.stp, someplugin-2.stp, etc. Only the original will have the step values.
__________________
CSI v3 Wiki
Funkybot is online now   Reply With Quote
Old 09-19-2022, 12:48 AM   #20141
Geoff Waddington
Human being with feelings
 
Geoff Waddington's Avatar
 
Join Date: Mar 2009
Location: Dartmouth, Nova Scotia
Posts: 11,617
Default

Quote:
Originally Posted by jacksoonbrowne View Post
You got it right
Tested with X32 and works perfectly.
Great, now what do we need to include to merge the rest of your X32 code ?

I think you said there is a heartbeat necessary to keep the X32 happy.
__________________
To install you need the CSI Software and Support Files
For installation instructions and documentation see the Wiki
Donate -- via PayPal to waddingtongeoff@gmail.com
Geoff Waddington is offline   Reply With Quote
Old 09-19-2022, 12:49 AM   #20142
Geoff Waddington
Human being with feelings
 
Geoff Waddington's Avatar
 
Join Date: Mar 2009
Location: Dartmouth, Nova Scotia
Posts: 11,617
Default

Quote:
Originally Posted by Funkybot View Post
Small quirk with the ZoneStepSizes AutoScan process: if you have SubZones for a given plugin, it will try to create .stp files for each one. So you get someplugin.stp and someplugin-1.stp, someplugin-2.stp, etc. Only the original will have the step values.
Cool, thanks for finding that.
__________________
To install you need the CSI Software and Support Files
For installation instructions and documentation see the Wiki
Donate -- via PayPal to waddingtongeoff@gmail.com
Geoff Waddington is offline   Reply With Quote
Old 09-19-2022, 12:50 AM   #20143
Geoff Waddington
Human being with feelings
 
Geoff Waddington's Avatar
 
Join Date: Mar 2009
Location: Dartmouth, Nova Scotia
Posts: 11,617
Default

Quote:
Originally Posted by Funkybot View Post
Sure? No. But I think I do!

[Reaper Resource Path]\CSI\Zones\ZoneStepSizes\

...same as in the Support files.

Note: on Mac, it writes as it goes. But not writing on Windows.

That said, now that I got it running on Mac, I have a large set of ZoneStepSizes to share. There are 473 Zone Step Files in here (that number includes the UAD files you already created):

https://www.dropbox.com/s/8ef28oodgd...Geoff.zip?dl=0

...feel free to add these to the Support Files to save others the trouble. Lots of common stuff in here from Arturia, Softube, SoundToys, Kush, Valhalla, Fuse, Relab, Black Rooster, Empircal, Plugin Alliance, Native Instruments, etc.
Thanks for all the work !!

Now included in CSI Support Files.
__________________
To install you need the CSI Software and Support Files
For installation instructions and documentation see the Wiki
Donate -- via PayPal to waddingtongeoff@gmail.com
Geoff Waddington is offline   Reply With Quote
Old 09-19-2022, 12:57 AM   #20144
Geoff Waddington
Human being with feelings
 
Geoff Waddington's Avatar
 
Join Date: Mar 2009
Location: Dartmouth, Nova Scotia
Posts: 11,617
Default

New build is up.

CSI Support Files.zip

Thanks to Funkybot's excellent effort, there are now 473 Zone Step Size files.

This number will continue to grow over time.

If you are wondering what impact this will have on project load time...

On the M1 Mac mini, 473 .stp files take 25 milliseconds to pre process, so negligible increase in load time.

Even if the count reaches into the thousands, I doubt the load time hit will ever reach a second.

Small price to pay for never having to again think about FX step sizes
__________________
To install you need the CSI Software and Support Files
For installation instructions and documentation see the Wiki
Donate -- via PayPal to waddingtongeoff@gmail.com
Geoff Waddington is offline   Reply With Quote
Old 09-19-2022, 01:45 AM   #20145
jacksoonbrowne
Human being with feelings
 
jacksoonbrowne's Avatar
 
Join Date: Aug 2017
Location: Ottawa, Canada
Posts: 665
Default

Quote:
Originally Posted by Geoff Waddington View Post
Great, now what do we need to include to merge the rest of your X32 code ?

I think you said there is a heartbeat necessary to keep the X32 happy.

The X32 heartbeat is the last baby step required to support basic X32.

Then as I build up and test FXs, etc there may need to be more OSC controls/actions (but that comes after getting heartbeat to work)

My code for the X32 heartbeat got broken with your last source code update, not your fault, it was the "shared pointers to regular pointers" update that caused my heartbeat code to fail compilation.

I will likely to need you to give me some bread crumbs to fix it.

Code working before update:

Control_surface_integrator.cpp
Code:
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// OSC I/O Manager
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static map<string, shared_ptr<oscpkt::UdpSocket>> inputSockets_;
static map<string, shared_ptr<oscpkt::UdpSocket>> outputSockets_;

//@@@@ START: NEEDED FOR XREMOTE BACKGROUND RUN()
map<string, shared_ptr<oscpkt::UdpSocket>>* GetOutputSockets()
{
    return &outputSockets_;
}
//@@@@ END: NEEDED FOR XREMOTE BACKGROUND RUN()
Control_surface_integrator.h
Code:
    void Run()
    {
        trackNavigationManager_->RebuildTracks();
        trackNavigationManager_->RebuildVCASpill();
        trackNavigationManager_->RebuildFolderTracks();
        
        for(auto surface : surfaces_)
            surface->HandleExternalInput();
        
        for(auto surface : surfaces_)
            surface->RequestUpdate();

        //@@@@
        X32_BackGroundTask();
Code:
 
 //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    //@@@@ START: X32 BACKGROUND SEND /xremote
    //@@@@          EVERY 8 SECONDS
    //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    void X32_BackGroundTask()
    {
        const  time_t refreshInterval = 8; // SECONDS
        static time_t lastRefreshTime = 0;

        time_t currentTime = time(nullptr);

        //---- WHEN ARRIVED AT REFRESH INTERVAL
        if ((currentTime - lastRefreshTime) >= refreshInterval)
        {
            lastRefreshTime = currentTime; // RESET INTERVAL

            extern map<string, shared_ptr<oscpkt::UdpSocket>>* GetOutputSockets();
            map<string, shared_ptr<oscpkt::UdpSocket>>* outputSockets = GetOutputSockets();
            for (auto sockEntry = outputSockets->begin(); sockEntry != outputSockets->end(); sockEntry++)
            {
                if (strstr(sockEntry->first.c_str(), "X32") || strstr(sockEntry->first.c_str(), "x32"))
                {
                    shared_ptr<oscpkt::UdpSocket> oSockInfo = sockEntry->second;
                    oscpkt::Message msg_xremote("/xremote");
                    oscpkt::PacketWriter pw;
                    pw.init().addMessage(msg_xremote);
                    oSockInfo->sendPacket(pw.packetData(), pw.packetSize());
                }
            }
        }
    }
    //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    //@@@@ END: X32 BACKGROUND SEND /xremote
    //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
__________________
AKA: Roy Wallingford
jacksoonbrowne is offline   Reply With Quote
Old 09-19-2022, 02:57 AM   #20146
JP_
Human being with feelings
 
Join Date: Jul 2022
Posts: 93
Default

Hey everyone, finally back from hospital and healed up! I read through about 15 pages of progress since I last posted, but there's at least another 20 more on top I just don't have the time to look through hahaha!

Before hospital we'd just finished up making the X-Touch work on both layers (thanks Mix Monkey!) so can anyone give me a kind of global update of what you've been cracking on with since?

No doubt based on the 30+ pages it's a lot! But if someone could gloss over it into 3-5 bulletpoints that would be awesome!

Anyway, it makes me so happy to see you all still fighting through the creation process and collaborating throughout the globe! I really adore this community!
JP_ is offline   Reply With Quote
Old 09-19-2022, 03:27 AM   #20147
Puck
Human being with feelings
 
Puck's Avatar
 
Join Date: Feb 2022
Location: Almost Canada
Posts: 506
Default

Quote:
Originally Posted by JP_ View Post
Hey everyone, finally back from hospital and healed up! I read through about 15 pages of progress since I last posted, but there's at least another 20 more on top I just don't have the time to look through hahaha!

Before hospital we'd just finished up making the X-Touch work on both layers (thanks Mix Monkey!) so can anyone give me a kind of global update of what you've been cracking on with since?

No doubt based on the 30+ pages it's a lot! But if someone could gloss over it into 3-5 bulletpoints that would be awesome!

Anyway, it makes me so happy to see you all still fighting through the creation process and collaborating throughout the globe! I really adore this community!
Hey JP!

Glad you are all healed up!

A great way to catch up is to check the change log in the wiki! I just use the link in Funkybot’s signature.

Geoff has been on fire lately.
Puck is offline   Reply With Quote
Old 09-19-2022, 03:42 AM   #20148
JP_
Human being with feelings
 
Join Date: Jul 2022
Posts: 93
Default

Quote:
Originally Posted by Puck View Post
Hey JP!

Glad you are all healed up!

A great way to catch up is to check the change log in the wiki! I just use the link in Funkybot’s signature.

Geoff has been on fire lately.
Yeah, I guess I needed layman's terms hahaha! I don't understand 99% of the genius posted here! I've still got more surgery to come, but at least I'm walking again!
JP_ is offline   Reply With Quote
Old 09-19-2022, 05:03 AM   #20149
Puck
Human being with feelings
 
Puck's Avatar
 
Join Date: Feb 2022
Location: Almost Canada
Posts: 506
Default

@JP

Alot of us are programmers or aspiring programmers so Geoff share’s coding insight. To the layman I’m sure that can be intimidating. I’m one of the aspiring guys so I appreciate it immensely.

Im decent with the layman speak as well so let me give it a shot;

1. There was a discussion about automapping FX that don’t have an fx zone in your setup.

That led to a few changes;

a. EZFXZones - this is just an alternative way to write an fx zone (it’s more horizontal-based than vertical) but it was born out of the automapping conversation. Most likely when the automapping gets finished, the zones it will create will be EZFXZones

b. A couple mst (surface file) changes. No need to worry about this yet. We will get more granular with the details once they are all fleshed out and ready for prime time.

This is probably the biggest thing that’s been discussed, tons of discourse on this topic and all the side quests that come along with it.

So instead of trying to summarize the rest, maybe it’d be better if you checked the change log (I know you did already) again and then asked the questions that come to mind. Don’t think that everyone just gets everything here. I follow this pretty closely and there are parts I don’t understand. Just yesterday I asked a question about the recent discussion and was way off base.
Puck is offline   Reply With Quote
Old 09-19-2022, 05:04 AM   #20150
Geoff Waddington
Human being with feelings
 
Geoff Waddington's Avatar
 
Join Date: Mar 2009
Location: Dartmouth, Nova Scotia
Posts: 11,617
Default

Quote:
Originally Posted by JP_ View Post
Yeah, I guess I needed layman's terms hahaha! I don't understand 99% of the genius posted here! I've still got more surgery to come, but at least I'm walking again!
Hey man, nice to see you back !!

Agree 100% with Puck, Funkybot is doing a sensational job of keeping the change log current !

Just click on the Wiki link in his sig or mine and then click the change log link.
__________________
To install you need the CSI Software and Support Files
For installation instructions and documentation see the Wiki
Donate -- via PayPal to waddingtongeoff@gmail.com
Geoff Waddington is offline   Reply With Quote
Old 09-19-2022, 05:29 AM   #20151
MixMonkey
Human being with feelings
 
MixMonkey's Avatar
 
Join Date: Sep 2017
Location: London, England.
Posts: 5,019
Default

Quote:
Originally Posted by JP_ View Post
Hey everyone, finally back from hospital and healed up! I read through about 15 pages of progress since I last posted, but there's at least another 20 more on top I just don't have the time to look through hahaha!
Nice to see you back Dude! Hope the X-Touch Compact setup is going well
MixMonkey is offline   Reply With Quote
Old 09-19-2022, 05:39 AM   #20152
MixMonkey
Human being with feelings
 
MixMonkey's Avatar
 
Join Date: Sep 2017
Location: London, England.
Posts: 5,019
Default

Quote:
Originally Posted by Geoff Waddington View Post
Hey man, nice to see you back !!

Agree 100% with Puck, Funkybot is doing a sensational job of keeping the change log current !

Just click on the Wiki link in his sig or mine and then click the change log link.
Had a thought about the support files. I wonder if it might be an idea to "freeze" the current support files to align with the current V2.0 release and have an "Exp" version that can chop and change with the rapid development currently taking place.

That way the Wiki, V2.0 and Support Files will all align and only change with a major update and the Changelog, Exp version and Exp Support Files (which really only need be X-Touch Universal) can reflect the fast development.

For someone looking to move from V1.1 to V2.0, this would provide a stable target with developed documentation and tested support files. For the more adventurous, there's the changelog and the forum
MixMonkey is offline   Reply With Quote
Old 09-19-2022, 05:53 AM   #20153
Geoff Waddington
Human being with feelings
 
Geoff Waddington's Avatar
 
Join Date: Mar 2009
Location: Dartmouth, Nova Scotia
Posts: 11,617
Default

Quote:
Originally Posted by jacksoonbrowne View Post
The X32 heartbeat is the last baby step required to support basic X32.

Then as I build up and test FXs, etc there may need to be more OSC controls/actions (but that comes after getting heartbeat to work)

My code for the X32 heartbeat got broken with your last source code update, not your fault, it was the "shared pointers to regular pointers" update that caused my heartbeat code to fail compilation.

I will likely to need you to give me some bread crumbs to fix it.

Code working before update:

Control_surface_integrator.cpp
Code:
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// OSC I/O Manager
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static map<string, shared_ptr<oscpkt::UdpSocket>> inputSockets_;
static map<string, shared_ptr<oscpkt::UdpSocket>> outputSockets_;

//@@@@ START: NEEDED FOR XREMOTE BACKGROUND RUN()
map<string, shared_ptr<oscpkt::UdpSocket>>* GetOutputSockets()
{
    return &outputSockets_;
}
//@@@@ END: NEEDED FOR XREMOTE BACKGROUND RUN()
Control_surface_integrator.h
Code:
    void Run()
    {
        trackNavigationManager_->RebuildTracks();
        trackNavigationManager_->RebuildVCASpill();
        trackNavigationManager_->RebuildFolderTracks();
        
        for(auto surface : surfaces_)
            surface->HandleExternalInput();
        
        for(auto surface : surfaces_)
            surface->RequestUpdate();

        //@@@@
        X32_BackGroundTask();
Code:
 
 //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    //@@@@ START: X32 BACKGROUND SEND /xremote
    //@@@@          EVERY 8 SECONDS
    //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    void X32_BackGroundTask()
    {
        const  time_t refreshInterval = 8; // SECONDS
        static time_t lastRefreshTime = 0;

        time_t currentTime = time(nullptr);

        //---- WHEN ARRIVED AT REFRESH INTERVAL
        if ((currentTime - lastRefreshTime) >= refreshInterval)
        {
            lastRefreshTime = currentTime; // RESET INTERVAL

            extern map<string, shared_ptr<oscpkt::UdpSocket>>* GetOutputSockets();
            map<string, shared_ptr<oscpkt::UdpSocket>>* outputSockets = GetOutputSockets();
            for (auto sockEntry = outputSockets->begin(); sockEntry != outputSockets->end(); sockEntry++)
            {
                if (strstr(sockEntry->first.c_str(), "X32") || strstr(sockEntry->first.c_str(), "x32"))
                {
                    shared_ptr<oscpkt::UdpSocket> oSockInfo = sockEntry->second;
                    oscpkt::Message msg_xremote("/xremote");
                    oscpkt::PacketWriter pw;
                    pw.init().addMessage(msg_xremote);
                    oSockInfo->sendPacket(pw.packetData(), pw.packetSize());
                }
            }
        }
    }
    //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    //@@@@ END: X32 BACKGROUND SEND /xremote
    //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Please forgive me if you already know this stuff, allow me the opportunity to discuss it for all of the coders out there.

There is a concept in Object Oriented programming called encapsulation.

In truth it's been around forever, long before Object Oriented programming came to be, it's simply another way to say need-to-know.

I'm sure all of you C/C++ coders out there (and coders of many other languages as well) have done this, I'll use plain old C for the example, it's been around for over 50 years:

Code:
int MultiplyBySecretValue(int aParam)
{
    int aHiddenVariable = 42;

    return aParam * aHiddenVariable;
}

Classic encapsulation.
When I'm coding, I look for anything that breaks encapsulation.

One of the most obvious signs (I do this all the time) is that I'm reaching into a Class to get some information that has heretofore been hidden.

Then I ask myself, hmmm... is this really the responsibility of the method I'm currently in.

Should this be delegated to the Class I was reaching into ?

The answer is often yes, and indeed, that's the case here.

The new GetOutputSockets() method is just such a clue.

It is added behaviour that reaches in to get something that was heretofore hidden.

Next, X32_BackGroundTask() is at a Page level, but it really belongs at a Surface level.

One more thing, the naming, it's too cryptic.

It's a balancing act, you want to give the method a descriptive name, but not so descriptive that you tie yourself to an implementation.

X32_SendMessageEvery8Seconds is too descriptive, you're giving too much away about the internals.

So, let's name it SendX32Heartbeat.

Now, let's put it where it has the right context, in the RequestUpdate method of ControlSurface.

Then you can ask the surface "are you an X32 ?".

I'll use a bit of pseudo code here:

Code:
ControlSurface::RequestUpdate()
{
    if(thisIsAnX32)
        SendX32Heartbeat();   

}
Next comes the question that enters into a grey area.

Who decides about the 8 seconds ?

It could be here, or it could be delegated downstream.

Following the "when in doubt, delegate" guideline, let's delegate.

Ok, we want to send an OSC message, whose responsibility is that ?

Oh wait, we've already got our own personal (per surface) OSC_ControlSurfaceIO at our disposal, just waiting to do our bidding.

Let's delegate the operation to OSC_ControlSurfaceIO.

Now the RequestUpdate method looks something like this, once again being lazy and using a bit of pseudo code:
Code:
ControlSurface::RequestUpdate()
{
    if(GetName() contains the phrase X32)
        surfaceIO_->SendX32Heartbeat();   

}
Now we just need to enhance OSC_ControlSurfaceIO to keep track of time between message sends, probably a good thing to add to it's repertoire any way, and simply add a method -- SendX32Heartbeat().

When you do this, you will see the code magically simplify, almost to the point of being trivial, that's when you know you're doing good OO

I'm sure I've glossed over a bunch of important details, but if you use this approach, I'm fairly certain your code will become much cleaner and easier to read -- aka easier to discern what's going on

[edit] One final, minor point, instead of const time_t, you can use DAW::GetCurrentNumberOfMilliseconds() to be consistent with the rest of the code base.
__________________
To install you need the CSI Software and Support Files
For installation instructions and documentation see the Wiki
Donate -- via PayPal to waddingtongeoff@gmail.com

Last edited by Geoff Waddington; 09-19-2022 at 06:00 AM.
Geoff Waddington is offline   Reply With Quote
Old 09-19-2022, 05:59 AM   #20154
JP_
Human being with feelings
 
Join Date: Jul 2022
Posts: 93
Default

Quote:
Originally Posted by MixMonkey View Post
Nice to see you back Dude! Hope the X-Touch Compact setup is going well
Hey man! I'm actually having some issues! The LED panning lights don't match the track panning in Reaper and the select buttons turn the light off when you remove your finger from them.

I've gone through the additional files, such as track and track selected, and renamed parameters such as Fader and Rotary to FaderA and RotaryA to match the new widget names; but the LED displays are still incorrect.
JP_ is offline   Reply With Quote
Old 09-19-2022, 06:03 AM   #20155
Geoff Waddington
Human being with feelings
 
Geoff Waddington's Avatar
 
Join Date: Mar 2009
Location: Dartmouth, Nova Scotia
Posts: 11,617
Default

Quote:
Originally Posted by MixMonkey View Post
Had a thought about the support files. I wonder if it might be an idea to "freeze" the current support files to align with the current V2.0 release and have an "Exp" version that can chop and change with the rapid development currently taking place.

That way the Wiki, V2.0 and Support Files will all align and only change with a major update and the Changelog, Exp version and Exp Support Files (which really only need be X-Touch Universal) can reflect the fast development.

For someone looking to move from V1.1 to V2.0, this would provide a stable target with developed documentation and tested support files. For the more adventurous, there's the changelog and the forum
Good point, but not sure there's a need, at least currently.

The recent changes made to the .mst were carefully designed to be backwards compatible -- old style code with new style files should be just fine, the new features get conveniently ignored, at least I think so

And, I'm just about to promote everything to v2.0 anyway, maybe even later today.

Again, your point is well taken.
__________________
To install you need the CSI Software and Support Files
For installation instructions and documentation see the Wiki
Donate -- via PayPal to waddingtongeoff@gmail.com
Geoff Waddington is offline   Reply With Quote
Old 09-19-2022, 06:07 AM   #20156
MixMonkey
Human being with feelings
 
MixMonkey's Avatar
 
Join Date: Sep 2017
Location: London, England.
Posts: 5,019
Default

Quote:
Originally Posted by JP_ View Post
Hey man! I'm actually having some issues! The LED panning lights don't match the track panning in Reaper and the select buttons turn the light off when you remove your finger from them.

I've gone through the additional files, such as track and track selected, and renamed parameters such as Fader and Rotary to FaderA and RotaryA to match the new widget names; but the LED displays are still incorrect.
ZIP up your CSI folder and i'll take a look.
MixMonkey is offline   Reply With Quote
Old 09-19-2022, 06:10 AM   #20157
tompad
Human being with feelings
 
Join Date: Jan 2010
Location: Fjugesta, Sweden
Posts: 816
Default

Quote:
Originally Posted by MixMonkey View Post
Had a thought about the support files. I wonder if it might be an idea to "freeze" the current support files to align with the current V2.0 release and have an "Exp" version that can chop and change with the rapid development currently taking place.

That way the Wiki, V2.0 and Support Files will all align and only change with a major update and the Changelog, Exp version and Exp Support Files (which really only need be X-Touch Universal) can reflect the fast development.

For someone looking to move from V1.1 to V2.0, this would provide a stable target with developed documentation and tested support files. For the more adventurous, there's the changelog and the forum

+1! ;-)
__________________
ToDoList Obliques MusicMath Donation Some of mine and my friends music projects on Spotify
tompad is offline   Reply With Quote
Old 09-19-2022, 06:11 AM   #20158
MixMonkey
Human being with feelings
 
MixMonkey's Avatar
 
Join Date: Sep 2017
Location: London, England.
Posts: 5,019
Default

Quote:
Originally Posted by Geoff Waddington View Post
Good point, but not sure there's a need, at least currently.

The recent changes made to the .mst were carefully designed to be backwards compatible -- old style code with new style files should be just fine, the new features get conveniently ignored, at least I think so

And, I'm just about to promote everything to v2.0 anyway, maybe even later today.

Again, your point is well taken.
Fair enough I just saw it as a way of quarantining the stable version from the rapid development, where "Anything can happen in the next half hour!"
MixMonkey is offline   Reply With Quote
Old 09-19-2022, 06:15 AM   #20159
Geoff Waddington
Human being with feelings
 
Geoff Waddington's Avatar
 
Join Date: Mar 2009
Location: Dartmouth, Nova Scotia
Posts: 11,617
Default

New build is up

CSI v2_0.zip

Just brings version 2.0 up to current Exp level.
__________________
To install you need the CSI Software and Support Files
For installation instructions and documentation see the Wiki
Donate -- via PayPal to waddingtongeoff@gmail.com
Geoff Waddington is offline   Reply With Quote
Old 09-19-2022, 06:17 AM   #20160
Geoff Waddington
Human being with feelings
 
Geoff Waddington's Avatar
 
Join Date: Mar 2009
Location: Dartmouth, Nova Scotia
Posts: 11,617
Default

Quote:
Originally Posted by MixMonkey View Post
Fair enough I just saw it as a way of quarantining the stable version from the rapid development, where "Anything can happen in the next half hour!"
I hear ya'

Matter of fact, I'm going to take it easy today, need to
__________________
To install you need the CSI Software and Support Files
For installation instructions and documentation see the Wiki
Donate -- via PayPal to waddingtongeoff@gmail.com
Geoff Waddington 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:00 PM.


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