1-2-Many ·
Not exactly sure what you'd call it, but basically I want to hook up two integers to another integer and have that integer display/retain the input that changed last.
From the original SynthMaker forum (2004–2014), with its members’ names and dates.
1-2-Many ·
Not exactly sure what you'd call it, but basically I want to hook up two integers to another integer and have that integer display/retain the input that changed last.
trogluddite ·
You need an Integer Switch from the Flow toolbox - it does exactly that (though probably isn't very well named!).
1-2-Many ·
haha I was just coming back to say "Never mind, I found it." Thanks Trog!
1-2-Many ·
Is there a better way of hooking up multiple inputs (i.e. more than 2) for this sort of function rather than just stacking these primatives?
Here's what I'm up to - there's got to be a better way than this (I've got 64 inputs) 😮
infuzion ·
1-2-Many wrote: Is there a better way of hooking up multiple inputs (i.e. more than 2) for this sort of function rather than just stacking these primatives? Here's what I'm up to - there's got to be a better way than this (I've got 64 inputs)
vote here: expanding Switch
MichaelBenjamin ·
i dont know what you need this for, but most times you can use an array.
trogluddite ·
Here's a method that I use to make adding selections easier...
Each button outputs its value (set in the properties) when pressed, but when released it outputs zero (for the integer version) or an empty string (string version). you can easily add any number of buttons by just connecting them to the 'Get Value' input - even via wireless if you need buttons all over the place.
The 'Get Value' part then only allows a value through if it >0 (integer) or contains a valid string (string version) - So the button 'off' values are blocked, locking the most recent button press in place.
The integer version has the limitiation that you can't use zero as a button value (zero must be the 'off' value, because they are all added together)- but the string version is fine as you'd very rarely want a null string as one of your selections.
1-2-Many ·
MichaelBenjamin wrote: i dont know what you need this for, but most times you can use an array.
I've got a bank of buttons and want to display the name of the last button pushed. This value needs to be held until the next button, or and up/down button is pushed (which changes relative to the last button value held).
trogluddite ·
After struggling with my previous version not being able to handle sending zero's or empty strings, I did some more work on my "stick them all in one input" mehod for updating and storing the most recent change from multiple sources. SM2's new trigger blockers for Int, Bool and String came to the rescue, and I ended up with this...
...you just need one of the little "Update" modules per source - but they can then all sum together anywhere, without any 'signal conditioning' at the destination end - even via wireless if you need them in different places.
Here's a peek inside one of the update modules...
The 'Update Trigger' module contains nothing but a link from input to output to get hold of the triggers, and send them past the blocker. After the new float value and its trigger have been sent, the switch is reset to zero/empty - but doesn't send a second trigger, so your destination doesn't notice the input value getting cleared. However, if a value is set from any other source, the locked 'off' value is read and contributes nothing to the sum of values at the destination. The Loop is a little trick that Malc taught me - you can't send the same trigger to both switch inputs, as the second copy would just get ignored - but an empty Loop still sends a 'Done' trigger with a new identity even if there are no iterations to count off - thus resetting the switch. NB: the link order is important - the Loop must be the last connection made! Same priciple worlks with any of the data types that have a trigger blocker primitive (flloat, integer, boolean and string)
DigitalWhiteByte ·
trogluddite wrote: The Loop is a little trick that Malc taught me
I tried with a simple trig module, and seems to work the same way. Anyway good to know. 😉
trogluddite ·
Wow, great spot DWB. Wonder if there's some new SM2 trigger behaviour at work here - like I said, that 'new' trigger workaround was something Malc showed me after I was struggling with my sequential logic. According to my understanding of his explanation at the time, using the trig module there shouldn't work (so I didn't bother trying!). Would be cool if we could lose some of the 'Victorian Overengineering' from our schematics.
infuzion ·
Wow, neat trick! Should go in the WiKi...
aliasant ·
Very clever indeed 🙂
trogluddite ·
infuzion wrote: Should go in the WiKi...
Ummmm, promise I'll really make an effort this time - it's been a while since I ventured there, have to remind myself how to get those page structures right without making a mess!
BTW: trogluddite wrote: without any 'signal conditioning' at the destination end
Well, almost! It's best to put a Sample and Hold at the receiving end, otherwise any 'reverse' triggers will end up reading the "all quiet" null value of the input rather than the correct last known value.
@DWB. Forgot to say; thanks for testing/posting so quickly! I was about to go through half a dozen big schematics replacing their current crappy 'multi-inputs' with my new one - you saved me having to do all that work over again to put in your cheeky little optimisation!
DigitalWhiteByte ·
@Trog 😉
Wrote something here? To have a post removed or your name hidden, write to [email protected].