Trigger Toggles and Dual Sample & Hold

Post any examples or modules that you want to share here
Post Reply
Perfect Human Interface
Posts: 643
Joined: Sun Mar 10, 2013 7:32 pm

Trigger Toggles and Dual Sample & Hold

Post by Perfect Human Interface »

I kind of wanted these so I made them. As with anything I make, they may not be the most elegant solution but I hope they're useful. :)

The first two modules toggle between two inputs whenever a trigger is received. The second module has two separate trigger inputs-- it will toggle to the top or bottom input depending which is triggered. The final module is like the second, but with sample and hold prims built-in. So it is effectively a two-headed sample and hold (rawr). Hopefully.

They should work with any green input.

Let me know if I did anything stupid. ;) Or brilliant... I'll take that too.
Attachments
TriggerToggle_DualSampleHold_by PHI.fsm
(1.67 KiB) Downloaded 1116 times
KG_is_back
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: Trigger Toggles and Dual Sample & Hold

Post by KG_is_back »

There are much simpler ways to implement all 3 of them using trigger blocker prims.
Attachments
TriggerToggle_DualSampleHold_by KG.osm
(625 Bytes) Downloaded 1123 times
Perfect Human Interface
Posts: 643
Joined: Sun Mar 10, 2013 7:32 pm

Re: Trigger Toggles and Dual Sample & Hold

Post by Perfect Human Interface »

KG_is_back wrote:There are much simpler ways


Oh of course there are. :lol:

People like you are why I gave up programming. Seriously though, thanks. I'll use these simple versions.
Perfect Human Interface
Posts: 643
Joined: Sun Mar 10, 2013 7:32 pm

Re: Trigger Toggles and Dual Sample & Hold

Post by Perfect Human Interface »

I added the help text and my little GUI indicators because I think they're important for debug/visibility (and they're easy to take out).
Attachments
TriggerToggle_DualSampleHold_by KG.fsm
(1.17 KiB) Downloaded 1128 times
Perfect Human Interface
Posts: 643
Joined: Sun Mar 10, 2013 7:32 pm

Re: Trigger Toggles and Dual Sample & Hold

Post by Perfect Human Interface »

I was sure Last Switched didn't work like that. :x I thought the value actually had to be different (as with the "changed" primitive-- the tooltip uses the same wording), not that it just waited for triggers. Of course it's not written in the manual either.

Another thing I wish I had known a long time ago...
Post Reply