SynthMaker

How Can I get a Value print in a Label using a Button?

Archive · 2012 9 old posts

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

distante ·

I'm trying (for a couple of hours now) to make a label change his value when I push a bottom

For Example, I have the a button with the Text "65hz", so, I want to change a Label to "65Hz" when I puss this button, but I can't figure out what combination of primitives or modules do I have to use, I tried the String Switch without success... 🙁

A pointer?

Cheers

cyto ·

Here are a couple different ways. The first toggles between two values. The second "sends" a value to the label. Are either of these what you had in mind?

-cyto

ChrisHooker ·

Grrr.... Cyto beat me to the punch. Oh well, here's another example using the String Switch method which incorporates buttons such as you described in your question.

Basically, it's probably the trigger that was getting you hung up, I bet?

distante ·

Yeap the trigger was what I wasn't able to understand!

Thank you cito and Chris! Now I have see how can change labels with buttons/triggers

Cheers!!

😀

distante ·

Chris,

I'm using your example for assign a value to a module string using a button, I copied and Paste your buttons but for some reason they aren't showed in the top module, any ideas why?

edit:

The "show in parent" option is active btw.

ChrisHooker ·

Yeah, sorry about that - I had the wireless link named to something for the schematic I was using the buttons in. Just rename/delete the name of the wireless View transmitter in each button. That should fix ya up.

distante ·

Oh! I didn't knew that changing the name of the wireless link this can happen.

Thank you 😉

ChrisHooker ·

Something else I just realized - I made these buttons starting from the stock "Push Button" module from the toolbox, which doesn't include any preset features. If you want that capability, you'll need to modify accordingly.

distante ·

Not really, I'm using this buttons for do a Play/Pause/Stop Buttons for the Wave Player module, I just added on more button for the "initialization".

I need to ask other thing now hehehe!

😀 Cheers!

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.