Is there a way to start a delay line using delwrite~ & delread~ from the beginning of a buffer? When using a delay line as a loop (feedback = 1) I am trying to fade out a loop and then building a function whereby I can start the loop again from its start point.
Is this possible without resorting to tables?
Thanks!
-
Play buffer from beginning with delread~
-
@Seán The audio is travelling through the delay line in real time.
You would need a delwrite delay longer than what you are recording to be sure to capture the whole first recording.
You need to feed the output of delread back into delwrite, so that it can be played again.
You would need a timer so as to set delread to the right length for the second read (so that it starts at the beginning).
You would need to use [switch~] to stop all audio in your patch as you end recording and so that you can start the delay line again when you press play......... otherwise the audio will drop down the delay line before you do so........... unless you program it to start again immediately.
You will need to do the fade after delread and not fade what you feedback into delwrite, or you will double down on the fade the second time around.BUT.
Because the delay line read point for delread has to be longer than the recording, delread will in fact still be feeding back audio to delwrite after you have finished recording.
So you will have to let it finish.
But you can still read the correct output with a second delread.
Do that, and put it into a second delay line of the absolute correct length (now that you know it) and that will become your delay loop, with feedback as above.
All of that can be automated of course.
David. -
@whale-av Thanks for the reply David. I now realise how unclear my question was! In simpler terms I am looking to stop hearing a looped delay line but being able to start the loop again from its start point.
[switch~] doesn't start audio from delread~ from the starting point of the loop for me here. I can't find any mention of being able to use [delread~] in this way.
DelayLoopStart.pd -
@Seán I had thought too much about it, and it is much simpler than I imagined..... loop_rt.pd
I think the only way to stop the loop is to break the feedback link, and let the audio "run out" of the delay line.
David. -
@whale-av Thanks for that David, but looks like I'll use tables instead as [delread~] still doesn't start from the beginning point of a recently recorded loop, it just cycles around and I can't find out how to tell it to play from sample 0 of the buffer.
-
@Seán You are probably right. The patch I posted will play the sample from the start only once, and only accurately to 1ms. It is possible to make it do so again, but using tables will be easier.
David. -
Much appreciated.