SynthMaker

A/B + Undo/Redo Approach!!!

Archive · 2012 5 old posts

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

MDMA ·

Hi guys,

Not sure if this has been disscussed yet, at least I couldn't find anything related.

So I'm trying to implement A/B functionality and a undo/redo system to my synth projects. I'm trying to use sample and hold techniques and array stacks, there is also the mem components winch I don't quite understand yet, are they only for dealing with wav files? It would be great to use them to store the user modifications history!

Anywhay, I will be posting what I come up with as I develop it and would appreciate if you guys could join in so that everyone could have easy access to such systems in the future.

Peace and Light!

--edit-- So far I've noticed that with a "Float Stack" Undo seems quite easy to achieve. We could push the knob value to the stack on a mouse up event and then pop it off the stack and back into the knob with a ctrl+z command but this would mean a "float stack" to every single knob and it would only give us undo functionality. What to you think?

--edit-2-- Ok, so I've decided to start with the hard part and managed to achieve the undo/redo schematic but with 1 bug and 1 problem!

BUG = For some reason Left Mouse Up doesn't allways send out a trigger, I've tested it even disconected from all my schematic pieces and it still doesn't allways work, is this a synthmaker bug?

PROBLEM = I left out the ability to determine a max undo level because my brain just freezed but I'm sure someone will come up with a solution for this, I left something on the bottom left side with "Max Undo" on it as a start to figure out how to achieve it.

I placed a presets manager with 2 presets to check if no problems ocurr while using presets.

Hope someone jumps aboard on this or at least lets me know if I'm wasting my time 😕 !

cyto ·

MDMA wrote: BUG = For some reason Left Mouse Up doesn't allways send out a trigger, I've tested it even disconected from all my schematic pieces and it still doesn't allways work, is this a synthmaker bug?

I haven't had a chance to look over your example yet, but I think I may be able to shed some light on this "bug". I, too, have experienced this and (if I remember correctly) in order for the mouse up triggers to be sent, the mouse must still be over the original mouse area. So when using knobs, etc where it is very common to drag the mouse off of the area in order to make a change, there will be no "up" trigger. Does this make sense?

BTW, here is a quick work around... Go deep into your knob module and find the y-drag primitive. There should be a boolean output labeled "dragging" or something of that nature. From that output, connect a "bool to false" primitive. The trigger from that can then be your de-facto "mouse up" trigger.

EDIT: you can also just connect a "bool to false" primitive to the "interact" value in the first sub-level of the knob, but in order for this to work, you need to go even deeper and bypass the trigger blocker at the very bottom of the "moving part" subsection. (these instructions refer to the "bitmap knob" though I'm sure it's the same for all the stock knobs).

-cyto

MDMA ·

cyto wrote: MDMA wrote: BUG = For some reason Left Mouse Up doesn't allways send out a trigger, I've tested it even disconected from all my schematic pieces and it still doesn't allways work, is this a synthmaker bug?

I haven't had a chance to look over your example yet, but I think I may be able to shed some light on this "bug". I, too, have experienced this and (if I remember correctly) in order for the mouse up triggers to be sent, the mouse must still be over the original mouse area. So when using knobs, etc where it is very common to drag the mouse off of the area in order to make a change, there will be no "up" trigger. Does this make sense?

BTW, here is a quick work around... Go deep into your knob module and find the y-drag primitive. There should be a boolean output labeled "dragging" or something of that nature. From that output, connect a "bool to false" primitive. The trigger from that can then be your de-facto "mouse up" trigger.

EDIT: you can also just connect a "bool to false" primitive to the "interact" value in the first sub-level of the knob, but in order for this to work, you need to go even deeper and bypass the trigger blocker at the very bottom of the "moving part" subsection. (these instructions refer to the "bitmap knob" though I'm sure it's the same for all the stock knobs).

-cyto

I cant believe I haven't thought of that, specially having done the same workaround in the past, lol, I guess it was because I spent all day on that schematic and my brain was just slowing down!

Thanks for the tip on the bool to false primitive, I didn't thought of that approach but now that you mention it, I did experienced a weird fact using bool to false and to true on the schematic for A/B, I was using a boolean switch connected to a bool to false and to a bool to true, and they were conected to Intenger sample and hold, what the sample and hold primitive was giving me was ZEROs instead of the number they were holding, weird occurence there 2. Have you experienced that?

Thanks for replying mate and I would be gratefull if you or someone else would be interessted in developing this undo redo system for the community, the reason why I thought of it is because I'm a producer myself and many times when making music using synths I really miss having a undo system, you twist 2 or 3 knobs and you screwd up the sound and cant go back at it because there is no undo, it sucks!

So here is the Undo_Redo (who still needs to get a workaround to determine max undo level) and the A/B system winch is inside the knob module! Ill be waiting for people to jump aboard! 🙂

trogluddite ·

Liking this so far - I know just what you mean about messing up great patches, so I think this is a great idea. MDMA wrote: (who still needs to get a workaround to determine max undo level)

Hmm, yes that is a tricky one - for undo you need a stack (always pop the newest entry), but to limit the length you need to pop the oldest item (a queue). So you need a module that is a stack and a queue at the same time. The "Stack" and "Queue" are quite new to SM - before they were added, such things were done by playing around with array primitives, so maybe the thing you need was made before. mwvdlee's Missing Links Collection has a few examples of the old style array stuff, so that might be a good place to look (in the "Deprecated" part of the Arrays module). I'll have a look through my old stuff too, to see if I have anything useful.

MDMA ·

trogluddite wrote: Liking this so far - I know just what you mean about messing up great patches, so I think this is a great idea. MDMA wrote: (who still needs to get a workaround to determine max undo level)

Hmm, yes that is a tricky one - for undo you need a stack (always pop the newest entry), but to limit the length you need to pop the oldest item (a queue). So you need a module that is a stack and a queue at the same time. The "Stack" and "Queue" are quite new to SM - before they were added, such things were done by playing around with array primitives, so maybe the thing you need was made before. mwvdlee's Missing Links Collection has a few examples of the old style array stuff, so that might be a good place to look (in the "Deprecated" part of the Arrays module). I'll have a look through my old stuff too, to see if I have anything useful.

Nice of you to join in mate, I'll have to check that tomorow as I'm a bit pissed at the moment lol. 😉

--edit-- Yes, I've downloaded this b4 but have so many things in the toolbox that sometimes don't even know what I have. Looking at it now it seems that this problem is close to be solved (or maybe not). I'm trying a combination of queue, counter and getAt, seems to be close but have to continue tomorow coz today I had enought lol.

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.