Undo stack doesn't pop off first recording if added more than one entry to stack

Report anything that appears to be a bug here.

Moderator: jesse

Post Reply
ericfont
Posts: 36
Joined: Fri Jun 25, 2021 11:08 am

Undo stack doesn't pop off first recording if added more than one entry to stack

Post by ericfont »

If I create a new loop and recorded something and then press undo, then undo works properly to return that loop to the initial state of having nothing recorded.

However, if I create a new loop and perform more than one recording and or overdub, then pressing undo only works to pop off changes up until it reaches the first recording, at which point pressing undo fails to properly return that loop tot eh initial state of having nothing recorded.

Example steps:

Press Ctrl-1 to add a new loop.
Press record and say "One".
Press record (or overdub) and say "Two".
Press undo and will correctly hear "One".
but Pressing undo a subsequent time doesn't revert back to having nothing recorded on that track.

jesse
Posts: 545
Joined: Sat Sep 06, 2008 9:46 am
Contact:

Re: Undo stack doesn't pop off first recording if added more than one entry to stack

Post by jesse »

Yes, this was done intentionally to prevent accidental extra undo steps going to silence. If you you long-press undo it will reset to silence. Or you can hit Mute, if what you really want is silence. Way back in the early development days I found it sometimes easy to lose track of how many undos there were left and musically found it better to avoid a jarring thing like that.

Perhaps it should be an option whether or or not undos (with a stack bigger than 1) will allow it go all the way back to silence.

ericfont
Posts: 36
Joined: Fri Jun 25, 2021 11:08 am

Re: Undo stack doesn't pop off first recording if added more than one entry to stack

Post by ericfont »

ahh...it's a feature not a bug, ha! Fine.
Perhaps it should be an option whether or or not undos (with a stack bigger than 1) will allow it go all the way back to silence.
An option to have the undo stack behavior go back to silence would be nice, though on the other hand users rarely change the default options and get confused to too many options, so maybe adding an extra rarely-used option isn't worth while to add.
If you long-press undo it will reset to silence
Unfortunately I use an external midi footpedal for controlling sooperlooper instead of my computer mouse, and I don't know I can communicate the concept of a long-press of a physical midi button to clear that track all the way back to silence regardless of how large the undo stack is.

I would find useful a feature to add the full clear to become a midi-assignable command *and* (maybe as a separate feature request) for sooper looper to understand the concept of a long press of a midi button and have that be assignable in the preferences for midi event (and maybe even learnable with the Learn button)

ericfont
Posts: 36
Joined: Fri Jun 25, 2021 11:08 am

Re: Undo stack doesn't pop off first recording if added more than one entry to stack

Post by ericfont »

(as and aside, I have a hardware footpdeal mini looper called "DittoLooper" which also has the behavior of a long press to clear the loop. It would be nice for my muscle memory to be able to use long-presses on my midi foot controller to control sooperlooper in the same manner that the long-press on ditto looper works.)

jesse
Posts: 545
Joined: Sat Sep 06, 2008 9:46 am
Contact:

Re: Undo stack doesn't pop off first recording if added more than one entry to stack

Post by jesse »

@ericfont, undo_all is already a bindable command. Also, SL will interpret long-presses automatically if you are able to use Note or CC messages as the bound event for the command, and your controller/pedal is able to send separate events on press and release. What foot-controller do you use?

ericfont
Posts: 36
Joined: Fri Jun 25, 2021 11:08 am

Re: Undo stack doesn't pop off first recording if added more than one entry to stack

Post by ericfont »

Ah great...the long-press feature is already in the documentation (http://essej.net/sooperlooper/doc_commands.html)...and I see when I've configured buttons on my midi controller to operate in momentary CC button mode, they behave just like the middle-mouse button:
SooperLooper supports long-presses (from gui, or when commands are bound from MIDI note message). When a command is held down for more than 1 second, it becomes a momentary (or SUS) control, so that when the command is released, it ends the operation (as if you had quickly pressed and released a command twice). In the gui, middle-mouse button press-releases are always momentary (releases always end the operation immediately). MIDI bindings have a SUS option, that if set will treat that binding as an immediate momentary operation (SUS).
For anyone else reading, I am using the MeloAudio MIDI Commander and I have properly replaced the firmware with their "MOMENTARY CONTROL MODE" image
MOME means momentary control. In this mode, the 1 to 4 key will send midi cc commands on both the key pressed down (127 after the CC number) and released (0 after the CC number) . This could be very useful of using HOST like Boss RC505.
I have verified by looking at midi events using aseqdump that each of the 1 to 4 buttons act like momentary buttons as you describe...when I press down I see each produces a Control change with value 127 for controller number 80 to 83 on channel 1.

I now do think I really do wish the Undo Stack would pop off the first recording too if added more than one entry to the stack...and I do think that should be the default behavior when undoing, cause that is how undo is understood universally in like every program I can think of. I guess I can just make that code change to my own private git branch, lol.

jesse
Posts: 545
Joined: Sat Sep 06, 2008 9:46 am
Contact:

Re: Undo stack doesn't pop off first recording if added more than one entry to stack

Post by jesse »

ericfont wrote:
Thu Oct 07, 2021 3:05 pm
I now do think I really do wish the Undo Stack would pop off the first recording too if added more than one entry to the stack...and I do think that should be the default behavior when undoing, cause that is how undo is understood universally in like every program I can think of. I guess I can just make that code change to my own private git branch, lol.
I think it would be a good option to add, but of course you can hack it however you want.

When I originally implemented it, I found that musically once you had a committed loop going (more than one operation on the undo stack), it was better to avoid accidental undo-to-silence than the alternative which would be to kill the music when you didn't expect it. If you really wanted to kill the music you could mute, or reset it (undo-all).

ericfont
Posts: 36
Joined: Fri Jun 25, 2021 11:08 am

Re: Undo stack doesn't pop off first recording if added more than one entry to stack

Post by ericfont »

I was poking through the back end code handling these undo operations and it was a bit hard for me to follow. I'm wondering now maybe instead of modifying any code, I'm wondering maybe what I really want is single-click save-all-and-clear-slate button on the GUI's top panel or menu that issues a global save of all loops (in case I recorded something good) and loads a default loop set config file (so I have all parameters like "sync" already checked). And I should be able to do that without modifying any of the existing code by just adding a new command in the menu bar (and maybe giving it a keyboard command). Should be fairly straight forward for me to write.

Post Reply