Duplicate Buffer~ without noise (for looper undo/redo)
Hello!
So Im trying to make an undo / redo function for my loopstation. My approach is to use a polybuffer and save a copy of the main buffer each time a new layer is overdubbed. Problem is, saving the steps with the "duplicate" message creates a small, but unacceptable pop / crack in the audio. Same issue with the normal Buffer~, For my purposes i need the buffer to be at least 30 seconds, so i understand it's a lot to grab at once.
Is there any way to get around this?
When you create a new buffer in the polybuffer do you make it the size of you need or do you rely on duplicate to resize the buffer?
duplicate message just copies the samples
and resizes the buffer to full size of source bufer.
and it can't create any clicks or pops itself
Are you fading the overdubs ?
I mean when overdub goes off, fade out for
10 - 20 ms and THEN copy the buffer ?
Copy back (undo) can produce some noise
while buffer is playing, but should not degrade the recorded audio.
But if you copy while overdub is recording,
than you need something better than just copy arround.
I did such thing allready but with
custom modified el.buffet object
which can overdub into buffer
but it's a bit longer story ...
P.S. if you are not using multiply or other means of extending the initial
recording length, message crop 0 $1 (rec length ) to recording buffer
at the end will cut it to recorded length, thus making copies
for undo smaller.
When loop needs to get re-recorded, one sends resize message...
The buffer itself is not making any noise, but it sounds like the action of saving/loading is creating a small lag, resulting in a pop from other stuff that is playing, even if nothing is playing back from that specific buffer. Might be mistaken though (i hope so!) I'll try to recreate it in a clean patch and see how it goes.
I've been trying el.buffet, and the whole potpourri pack, and it does a lot of things i could make use of, but it was crashing on me quite a bit so i left it for now. Are you still using it? All running smooth?
And yes, I AM doing a lot of multiply/divide to extend the loops, so at the moment I'm keeping all buffers at some maximum loop length value and only moving around the loop points.
Ok, have a look/listen at this.
Clean patch, and still getting pops and clicks.
Can't see any CPU spikes, and increasing I/O size to 128 didn't help.
Are you getting the same results? Any ideas?
Your problem here is clear message to polybuffer
This can't work
Why would you clear entire polybuffer while using it ?
I would understand it when one wants to reset entire project.
normal buffer has clearlow message that nicely wipes
all samples without causing any hickups to running processes.
That does not resize it but sets all samples to zero.
send 1 clearlow to polybuffer can be used in such way.
Another option is to send 1 size 0
--------
I would start from beginning.
message
appendempty 0, send $1 duplicate helpwave
will do the job of creating new buffer and copying data into it.
You start with counter to increase new buffers.
Buffer gets anyway resized so why create empty space at all ?
When you need next copy, just proceed, but this time
counter sends 2, then again 3 etc
At the end you can clear whole polybuffer
when looper needs to get reset.
Even that would not be really necessary,
just reset the counter to start from 1 again.
Every new copy would resize and copy the buffer
or you create 10 empty buffers at the beginning,
uzi 10 -> appendempty 0
you have 10 ready buffers in no time
------
I had a long discussion with Eric Lyon till he repaired
but never released fixed el.buffet in potpourri package.
Mistake amoung others was buffer not freeing
used buffers after operation etc etc.
here is the link :
https://cycling74.com/forums/buf-op-on-a-long-buffer
At the end you'll find noncrashing el.buffet external
Even that not all functions are working
the really usefull stuff like copy, overdub,
rotate buffer etc are all performing well.
el.buffet is really helpfull tool.
Imagine for your needs, after recording just copy
the buffer to itself(at end rec location) and rotate the buffer
so that next fresh copy is there to freely overdub.
even while overdubbing, you rotate back
to cancel allready overdubbed material
etc etc
I used overdub buffer function of el.buffet
to copy only overdub samples to another buffer and then
overdub them back either normal (which adds it)
or phase reversed (gain -1 to remove it)
----
My modded version has samples units, but also many functions
have been renamed and some removed, some added.
I have no time to write help files etc for it
so I can't share it.
Here is one patch I made for somebody on the forum,
bit different, only recording new loops and playing them randomly,
but it shows the use of copy, crop etc
Thanks for reminding me of clearlow! And all the thoughts in the first two sections makes sense and would be a cleaner way.
But..
In this example I'm not actually using the buffer for anything. And even with "send 1 clearlow", I still have the same issue. If i try to manually send the bangs i only notice pops when using "duplicate".
In this patch I've corrected the clear thing, and added a selector~ for choosing playback input. A possible clue is that i can't hear any pops if the sound being played comes from cycle~ instead of wave~.
EDIT: that made me first think the problem was with wave~ specifically, but switching to a Play~ didn't help. So i thought maybe "duplicate" is somehow disturbing the phasor~ flow, but checking with Delta~ and Minmax~ i can't see any inconsistencies..
edit: using play~ and checking phasor flow.
About el.buffet~ Hey! Ive been down that thread before! Is the el.buffet linked in the end different from the one in the LyonPotpourri 3.0 Package? (also, any advice on how to use and try out two versions of the same external without messing things up?)
I actually just yesterday tried that thing of writing the negative of an overdub into a buffer to erase that specific sound.. wow. It's like magic. I get how it works, and why it should work, but somehow i had in my mind that once something is overdubbed into the same buffer you cant surgically cut out a specific layer.
Freakin amazing!
so apart from undo/redo Im definitely gonna make a way to toggle each overdub on and off individually! Only tried with uzi/poke, so time to upgrade and make an el.buffet version!
----------
I don't think i completely get what your suggesting with rotate... but sounds good :p Is the idea to store undo/redo layers in the same buffer?
Why do you duplicate and clear the buffer every 100 ms ?
If one duplicates the buffer it gets wiped and resized anyway.
---------
duplicate message does make pops and clicks
making a copy with set message does not.
try this please
I used cycle waveform becaus it would not forgive
any dropouts
get that buffet from the link as comparison
P.S. make that 4 polybuffer instances
only 1 is loadbang created.
el.buffet from the link is different and working
the one from last putpourri does not work properly and is crashing
at least from last download of the package
that I had
http://disis.music.vt.edu/eric/main/wp-content/uploads/2016/06/LyonPotpourri-3.0-Package-06132016.zip
I was doing every 100ms just because the click only appear some times, so mostly to not have to wait so long to know if its there or not. Although it would be good if in the end you can undo/redo do as fast as your fingers allow, to be able to use it musically.
So i looked at your patch..
Wow. i would not have come up with that myself. Thats a beautifully hacky solution! Is Max ok with two buffers temporarily haveing the same name?
Good to be clear about how to properly use "duplicate" at least: Stay away from it!
set message is ok, but is a bit dangerous because if one does not
set buffer back to it's original name, any buffer operation will affect both buffers.
buffer A, buffer B
message to buffer B :
set A
makes it a clone of A
clear to buffer B (is now actually A)
wipes both buffers.
That's why I use immediately set back message.
But really - el.buffet is sooo much faster and has so
many options inside, that one simply has to use it instead.
applying fade in /out after recording for example
and freedomn to copy only portion of buffer that one needs.
My only problem with it is ms as units.
I need samples.
digital audio works in samples, rounding to ms
can sometime mean a loss of a sample.
I hacked el buffet years ago to use up to 4 channels and samples
as units without recompiling it, there was no source code
now that source code is available it is easier to adjust it.