SynthMaker

Advance Radio Buttons

Archive · 2006 20 old posts

From the original SynthMaker forum (2004–2014), with its members’ names and dates.

aiit ·

I have 5 Toggle Buttons "on off state".

I need to come up with an algorithm to do the following

on button1

button1 = 1 button2 = 0 button3 = 0 button4 = 0 button5 = 0 button6 = 0 button7 = 0 button8 = 1 button9 = 0

on button2

button1 = 0 button2 = 1 button3 = 0 button4 = 0 button5 = 0 button6 = 0 button7 = 0 button8 = 0 button9 = 1

on button3

button1 = 0 button2 = 0 button3 = 1 button4 = 0 button5 = 0 button6 = 0 button7 = 0 button8 = 0 button9 = 0

on button4

button1 = 0 button2 = 0 button3 = 0 button4 = 1 button5 = 0 button6 = 0 button7 = 0 button8 = 0 button9 = 0

on button5

button1 = 0 button2 = 0 button3 = 0 button4 = 0 button5 = 1 button6 = 0 button7 = 0 button8 = 0 button9 = 0

I guess I need a module that look at all button states and go from there. Also if a button in on and you hit it again it should remain in the on position.

Any suggestion?

MyCo ·

just make a new type of button, with a Boolean input, that you can trigger the Button from outside. Then connect button1 to button8 and button2 to button9

SM is that easy... 🙂

oddson ·

I'm not sure if I get this completely but the 'State Machine' primitive might help....

oh... and I did a quick knock-up of regular radio buttons... that might help.

MyCo ·

There it is: http://music-drive.com/btns.osm

oddson ·

But those aren't radio buttons, clicking one on doesn't turn off the others...

Here's my quick & dirty version... I'm sure there's a cleaner way OSM

MyCo's are prettier too!

MyCo ·

@oddson: page not found

oddson ·

MyCo wrote: @oddson: page not found

Oopps... thanks.. working on a better version.

Edit - got it... OSM

The tricky bit is in the 'on/off trigger module' and in the use of wireless connectors in the main modules.

It's a way to send info to all other sync'd modules except itself (so it doesn't turn itself off)...

The the rest is an 'external on' input to do the slaving feature...

aiit ·

Here’s a file tell me if you can upload it and then I will try to explain the functionality and behavior I am trying to generate.

http://www.filegone.com/v7h0

oddson ·

I can open your file... those buttons look familiar 😉

First you need to learn about syncronizing modules...

Delete all but one of them. Copy it. Then choose "Paste Syncronize" to make linked copies....

Then when you edit any content it will do so in all the modules together...

edit -- wait! I forgot about "Paint Syncronised"

aiit ·

ok here i go.

oddson ·

Nevermind about Paint Syncornize/Syncronize all -- your first two modules were different from the rest... just get them all the same and all synchronized...

Then you can remove the "Label" module from inside... it's not doing anything anymore...

When thats done you can play with the button logic.

Do the buttons I made do whay you want?

aiit ·

ok got it

oddson ·

oddson wrote: Do the buttons I made do whay you want?

If they do... you'll need to make the control module look like this to handle the new logic...

I have to go eat now... I'll check with you later...

edit - D'oh! -- It's not working for me here! Will definitely have to wait until later...

aiit ·

Explanation of Buttons

b1 := 1 b2 := 0 b3 := 0

b4 := 0 b5 := 0

b6 := 0 by its seslf, on off when ever

These 3 are there own group they are mutually exlusive but they shut of when b3, or b4, or b5 , or b6 go's on b7 := 0 b8 := 1 b9 := 0

dose not depend on any one but shuts off when b3 is pressed b10 := 0

These 3 are there own group they are mutually exlusive b11 := 0 b12 := 0 b13 := 0

aiit ·

a start

Functionality of Buttons Initial Press

on (b1) on (b2) b1 := 1 b1 := 0 b2 := 0 b2 := 1 b3 := 0 b3 := 0

b4 := 0 b4 := 0 b5 := 0 b5 := 0

b6 := 0 b6 := 0

b7 := 0 b7 := 0 b8 := 1 b8 := 0 b9 := 0 b9 := 1

b10 := 0 b10 := 0

b11 := 0 b11 := 0 b12 := 0 b12 := 0 b13 := 0 b13 := 0

end on end on

on (b3) on (b4) b1 := 0 b1 := 0 b2 := 0 b2 := 0 b3 := 1 b3 := 0

b4 := 0 b4 := 1 b5 := 0 b5 := 0

b6 := 0 b6 := 0

b7 := 0 b7 := 0 b8 := 0 b8 := 0 b9 := 0 b9 := 0

b10 := 0 b10 := 0

b11 := 0 b11 := 0 b12 := 0 b12 := 0 b13 := 0 b13 := 0

end on end on

on (b5) b1 := 0 b2 := 0 b3 := 0

b4 := 0 b5 := 1

b6 := 0

b7 := 0 b8 := 0 b9 := 0

b10 := 0

b11 := 0 b12 := 0 b13 := 0 end on

aiit ·

OH The stroke button is great nice and simple.

oddson ·

Sorry... don't know if I'm going to be able to help much more...

There's a lot of interaction between the buttons.. the wireless trick I've used works for a radio button effect but not-so-much for all these state dependencies. The State Machine thing I mentioned first might still be an option.

If you are going to try to make these work you should have an external state input instead of the wireless thing.

Here's a basic button in the style you want that takes external state input. OSM

You can add the logic externally...

oddson ·

For some reason I can't leave a challenge alone...

Here's what I've come up with...

OSM

... it's a toggle button system that sends an ID message to it's partners which then turn themselves ON or OFF according to map strings saved through their properties panel.

[Note: In SM, data typed into the schematic of a sync'd module will replace all instances. If it's a property and is edited through the property panel, it will not be replaced. For this to work the ID values and map strings for each module must be edited through the properties panel.]

Use semi-colons for delimiters in the map lists...

I've made no attempt to replicate the switching you've indicated because I not sure what it all means, but you sould be able to replicate any ON/OFF mapping between any number of these buttons with the map strings.

There's (at least) one kludge in there... I had to delay the message ID by 15 MS to get the thing to work...

If anyone has suggestions for improvements let me know.

aiit ·

amazing!!

infuzion ·

oddson wrote: Here's what I've come up with... OSM ... it's a toggle button system that sends an ID message to it's partners which then turn themselves ON or OFF according to map strings saved through their properties panel.

I feel like I'm playing one of those "wack a mole" games 😉.

Wrote something here? To have a post removed or your name hidden, write to [email protected].

Before your first post

A few rules keep this a friendly place. You agree to them once.

Shown next to what you post, here and in the app. It doesn’t have to be your real name: 3–24 lower-case letters, digits or _ (capitals become lower case, spaces become _).

    Then your post goes up straight away.

    Delete this reply?

    Open it in SynthMaker?

    It goes on the track you’re editing there, in place of that track’s sound, and into My sounds. Your other tracks stay as they are.

    Want to keep that track’s sound? Start a new song in SynthMaker first (Song › New song), then open this.

    Report this reply?

    Only the developer reads reports. The person isn’t told who reported them.

    What’s wrong with it?

    Block this person?

    You won’t see their posts and replies here any more. They aren’t told, and you can unblock them at any time.

    People you’ve blocked

    Their posts and replies are hidden from you. Unblock someone to see them again.

    The community rules

    A few rules keep this a friendly place. Everyone agrees to them once, before their first post.