If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
Automation of on/off switches
7 posts
• Page 1 of 1
Automation of on/off switches
My current project is a Hurdy Gurdy simulator so I needed to simulate being able to turn individual strings on/off like on a real HG. My plan was that the soft (click-free) string on/off switches could be recorded and automated in the DAW. However, when I tested this it didn’t work correctly in Reaper.
The automation would correctly register my turning the switches on and off and show the action correctly in the automation lane’s envelope. BUT, when I played it back, the switches would turn on but not off until the track had stopped. Thus followed a few hours of investigation as to what was going on and going wrong.
I found that the float value from the automation envelope coming out of the preset parameter prim was not steady at zero, but fluctuating at a very low value, like 0.00000xx.
So I checked and it seems that any float used as a Bool will produce TRUE if it’s not exactly zero. So when the automation value should have been exactly zero it was slightly higher so, since the switch operates as Boolean true/false, it was always True due to this “non-zero noise” and thus the switch never turned off again. I also noticed that the float value of 1 was slightly noisy. I have no idea why DAW zero isn’t actually zero but I made a work-around by using Greater than prims to set a threshold of 0.5 and that works reliably. Maybe someone knows why Reaper’s automation values are not accurate…
The attached schematic is a modified version of the stock bitmap slide switch also with the preset module separate which you could use to replace preset modules in any other toggle switch. I used it in my own LED/switch which is not a bitmap toggle and it works there too.
Of course this will only be interesting if you think the user might want to automate a specific toggle switch.
The automation would correctly register my turning the switches on and off and show the action correctly in the automation lane’s envelope. BUT, when I played it back, the switches would turn on but not off until the track had stopped. Thus followed a few hours of investigation as to what was going on and going wrong.
I found that the float value from the automation envelope coming out of the preset parameter prim was not steady at zero, but fluctuating at a very low value, like 0.00000xx.
So I checked and it seems that any float used as a Bool will produce TRUE if it’s not exactly zero. So when the automation value should have been exactly zero it was slightly higher so, since the switch operates as Boolean true/false, it was always True due to this “non-zero noise” and thus the switch never turned off again. I also noticed that the float value of 1 was slightly noisy. I have no idea why DAW zero isn’t actually zero but I made a work-around by using Greater than prims to set a threshold of 0.5 and that works reliably. Maybe someone knows why Reaper’s automation values are not accurate…
The attached schematic is a modified version of the stock bitmap slide switch also with the preset module separate which you could use to replace preset modules in any other toggle switch. I used it in my own LED/switch which is not a bitmap toggle and it works there too.
Of course this will only be interesting if you think the user might want to automate a specific toggle switch.
- Attachments
-
- Switch with working automation.fsm
- FS 3.06
- (11.42 KiB) Downloaded 959 times
-
Spogg - Posts: 3358
- Joined: Thu Nov 20, 2014 4:24 pm
- Location: Birmingham, England
Re: Automation of on/off switches
Wonder how many other DAWs have the same "bug"...
Seems like using float in their automation tracks/lanes/whatever would seem like the right answer 99.9% of the time. But some of the usual strategies for dealing with denormal numbers will introduce the kind of "near-zero" noise you saw.
Seems like using float in their automation tracks/lanes/whatever would seem like the right answer 99.9% of the time. But some of the usual strategies for dealing with denormal numbers will introduce the kind of "near-zero" noise you saw.
I keep a pair of oven mitts next to my computer so I don't get a concussion from slapping my forehead while I'm reading the responses to my questions.
- deraudrl
- Posts: 239
- Joined: Thu Nov 28, 2019 9:12 pm
- Location: SoCal
Re: Automation of on/off switches
I wonder that too.
I only checked in Reaper because that’s where I had the problem. Maybe all DAWs do it!
I only checked in Reaper because that’s where I had the problem. Maybe all DAWs do it!
-
Spogg - Posts: 3358
- Joined: Thu Nov 20, 2014 4:24 pm
- Location: Birmingham, England
Re: Automation of on/off switches
Congrats! You successfully entered the float realm of blurriness
One possibility lies in the fact that not all values can be reproduced by a float, especially if values are converted between formats. Reaper works with 64 bit floats, which makes the issue less apparent, but Flowstone is still on 32-bit floats. So I see Flowstone as the issue.
Instead of greater than prims (that also just delay the issue theoretically), you could also use rounding. This has the advantage that the value is actually really 1 or 0 afterwards (to avoid further falsifications of the value). A conversion to int and back also should do the trick.
One possibility lies in the fact that not all values can be reproduced by a float, especially if values are converted between formats. Reaper works with 64 bit floats, which makes the issue less apparent, but Flowstone is still on 32-bit floats. So I see Flowstone as the issue.
Instead of greater than prims (that also just delay the issue theoretically), you could also use rounding. This has the advantage that the value is actually really 1 or 0 afterwards (to avoid further falsifications of the value). A conversion to int and back also should do the trick.
"There lies the dog buried" (German saying translated literally)
- tulamide
- Posts: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
Re: Automation of on/off switches
tulamide wrote:Instead of greater than prims (that also just delay the issue theoretically), you could also use rounding. This has the advantage that the value is actually really 1 or 0 afterwards (to avoid further falsifications of the value). A conversion to int and back also should do the trick.
Good point.
You see I still think in analogue electronics (being so old) so in a noisy signal situation you would have a comparator with a threshold half way up. Or if the signal was noisy and changing quite slowly I’d use a Schmitt trigger.
I believe rounding is actually similar because you have a threshold of 0.4999999 above which you get a 1 and below which you get a 0. Or am I a bit off with that view?
However I can see that using Integer prims would probably involve fewer triggers, so your idea is better anyway.
-
Spogg - Posts: 3358
- Joined: Thu Nov 20, 2014 4:24 pm
- Location: Birmingham, England
Re: Automation of on/off switches
Always appreciate an issue being raised, even if it hasn't surfaced for me personally yet ("yet" being the key word).
I might be wrong, but I think Spogg and I have both REAPER and Win 7 in common, so I try to keep an eye out for FS issues with either.
I might be wrong, but I think Spogg and I have both REAPER and Win 7 in common, so I try to keep an eye out for FS issues with either.
We have to train ourselves so that we can improvise on anything... a bird, a sock, a fuming beaker! This, too, can be music. Anything can be music. -Biff Debris
-
Duckett - Posts: 132
- Joined: Mon Dec 14, 2015 12:39 am
Re: Automation of on/off switches
Duckett wrote:... I think Spogg and I have both REAPER and Win 7 in common, so I try to keep an eye out for FS issues with either.
Yes indeed.
I have 2 boot drives for Win 7 32 and 64 bit with the appropriate Reaper on each. I test my plugins in both versions except 64 bit of course.
-
Spogg - Posts: 3358
- Joined: Thu Nov 20, 2014 4:24 pm
- Location: Birmingham, England
7 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 40 guests