SynthMaker

logic problem - resetting a toggle switch to 0 on 'hide'

Archive · 2006 14 old posts

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

angstrom ·

hi all, I'm having a mental block.

I have a toggle switch, but I want it dependent on two cases. What I mean is - the toggle should go between 0 and one when its GUI is active, but when the GUI is deactivated I want the toggle reset to 0.

When the GUI is reactivated I dont want the toggle to be 1, even if it was when we turned it's visibility off.

here's the actual schematic - I have a GUI assignable midi CC thing, quite useful.

OSM FILE

you can see that the red boxed dial is active, we can set the CC on this by turning a physical dial. but when we deactivate the midi-assign button (with the red toggle on) ... twist a new dial then activate 'midi-assign' again argh, the dial has assigned itself to whatever we turned.

I have put a logical & in there that makes sure the new dial CC isnt passed when the GUI is off, but when the GUI comes back on that & is bypassed and the value is assigned as we re-activate the GUI.

damn.

so, any takers ? 🙂 All the key stuff is inside the control/preset/cc object

BTW, the whole thing works fine if you remember to turn off the red 'assign' boxes before you switch off 'assign' mode.

oddson ·

how's this OSM

angstrom ·

jolly good show!

It would have taken me an age to get that variation, thanks!

🙂

infuzion ·

nifty 🙂

angstrom ·

I'm glad this is fixed because the whole 'user CC assign' thing is pretty important to end-users. but the best thing for me about this is that I can simply drop the modified 'dynamic assign CC' component into already existing synths without too much trauma.

hooray. I will tidy it all up (it's 30% spaghetti right now) and probably post it into 'examples'

note: remember to switch midi CC receive off from the midi assign button, or hillarious results will ensue 😉

tormodulator ·

Thanks for that. I haven't really studied it yet, but that's a functionality I want in my plugins.

malc ·

Fantastic stuff!

MIDI learn has been on our todo list for some time now. That's a very nice solution you've come up with.

oddson ·

Hey Angstrom... do you want to be able to have more than one control open to CC assignment at a time?

If not, the trick will be to feed the mouse-click up from the CC module up to the level CC assign switch to reset any others that are open.

[Wireless that could feed multiple levels up would be nice for that... but I think I've suggested that before.]

Alternately, you'd have intercept any mouse-clicks at the level of the CC assign switch instead. Could be a little tricky.

I'd be happy to give it some more thought if that's a direction you're considering.

EDIT- OK, I went ahead because it's more fun solving little problems than banging my head on the big stuff I don't get... 😕

Here's a version that only allows 1 CC assign at a time... OSM

angstrom ·

Thanks,

initially I was going to use a mutually exclusive 'tab' model like you suggest, but I think it is an unplanned for bonus to be able to assign more than one virtual control to the same physical control, it can sometimes be useful. I guess you can still do that with your modified OSM though , so it's probably better.

I do have large and over-elaborate plans for this 🙂

I initially started this as a method of routing control signals and stream data around like a modular routing, I had a dropdown list of sources on there. Then I realised that perhaps midi assignment was a better application and ended up where we are at now. It may still be worth providing a 'manual assign' method, incase people want a control to receive a CC from a sequencing host, but dont actually have a physical controller handy.

oddson ·

I was thinking, for the CC assign issue, that the stock controls could use key modifiers for MIDI learning...

Say, holding down 'Alt' will shift the control into assign CC mode?

Wadya think?

rl ·

Thanks for the examples...

...and here is some more tricky homework:

how to distinguish between a "normal" midi controller [0..128] and an endless rotary dial (usually sending an increment message and a decrement message), e.g. my Tascam US428 mixer low gain control sends B0 12 3C messages (decrement, knob turned counter clockwise) and B0 12 44 (increment). The detection logic would have to check a couple of messages.

infuzion ·

rl wrote: how to distinguish between a "normal" midi controller [0..128] and an endless rotary dial (usually sending an increment message and a decrement message)....

You'd just have to rework the MIDI module of the knob to look for 2 msgs, then have the output of the filters connected to a Counter module. I think you can find examples in skOre's mega-pack of both.

oddson ·

rl wrote: ...and here is some more tricky homework:

how to distinguish between a "normal" midi controller [0..128] and an endless rotary dial (usually sending an increment message and a decrement message), e.g. my Tascam US428 mixer low gain control sends B0 12 3C messages (decrement, knob turned counter clockwise) and B0 12 44 (increment). The detection logic would have to check a couple of messages.

Sorry my homework is late professor. 😉

I don't have a MIDI controller that will allow me to test this but I made something that I hope emulates the messages you've indicated and then built the desired module.

No way for me to test whether it actually works but here it is:

OSM

The remote controlled knob is the same one I used HERE (second version) and is the standard knob except for some minor changes in the knob control module.

Can you let me know what my final grade is? 😉

rl ·

working like a charm, thanks.

oddson wrote: Can you let me know what my final grade is? 😉

sorry, exam failed, midi learn not implemented 😈

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.