First time here? Check out the FAQ!
x

Faithfully emulating a tape delay in Kyma

+7 votes
1,387 views

Hello there,

This is a somewhat tricky problem to explain, so please bear with me. It’s an issue that came up in discussion between Alan and Pete in the Kata, and they are both grappling with it at the moment. But I wanted to raise it here because it calls attention to something not present in Kyma that feels as if it should be.

The issue could be described as “mimicking tape”, insofar as it is used in a tape echo delay unit, for example.

Normally we can imitate such a delay by using a memory writer and imposing a lag on the sound reading from the addressed buffer. By adding feedback, the echo is generated.

But if we would like to imitate the effect of speeding up the tape, immediately we run into an issue. We can easily accelerate the reader sound. However, now everything that comes out of the reader will forever be at a different speed to when it went into the writer, whereas on the tape echo, the tape is also moving more quickly past the write/record head, and so after the speed change is completed, the pitch stabilises at that of the source.

With feedback, our Kyma echo has become a spiralling repitched delay, quite different from the tape echo we were seeking to emulate.

There does not seem to be a way to “control the write head”, which would be one obvious solution. A ramp controlling the memory writer in the manner of our choosing would pair nicely with the memory readers like the TimbreWaveShaper, which is controllable by a ramp or any other function. With such an addition, even a beginner like me could solve this problem. :)

Without it, I’m very curious which solutions may spring to your mind. 

As a side note related to the addressability of memorywriters, it strikes me as a little odd that the DiskRecorder can be triggered at sample rate to append the recorded file, but the MemoryWriter cannot. Would adding sample rate control (triggering and addressing buffer position like the TimbreWaveShaper as mentioned above) of the MemoryWriter be a possibility? I only ask as the recent sample-rate update to the OscillatorTimeIndex is hugely welcome!

Anyway, many thanks for your patient reading of what is doubtless a very confusingly phrased query!

asked Jul 7, 2020 in Using Kyma by frozenreeds (Practitioner) (450 points)
edited Jul 7, 2020 by frozenreeds

2 Answers

+3 votes

Here is an example of how to emulate tape-based delay with feedback:

The delay is implemented using a MemoryWriter (the write head) together with a pair of SampleWithTimeIndexes (two read heads).

A common SampleTimeIndex represents the write head position; it is offset by two different delay times to create two different TimeIndex representing the read head positions (called Feedback Read Head and Playback Read Head). These are used as the TimeIndexes for the two SampleWithTimeIndexes called 'Feedback' and 'Playback'.

The delay for Playback Read Head is "smoothed" (slew-rate-limited). This acts like a three speed motor for the read head: normal speed (1), fast forward (!MaxTapeSpeed) and fast reverse (!MaxTapeSpeed negated).

The delay for Feedback Read Head changes instantaneously. This ensures that the audio input to the recording is always at the normal playback rate.

When the delay time changes, the feedback is "ducked" briefly so that the discontinuity associated with instant delay time change is not recorded into delay memory.

Here's the Sound example.

answered Jul 7, 2020 by ssc (Savant) (128,120 points)
Our goal was to emulate a tape delay, and to have the same properties as a tape delay. The starting scenario (property) is with a tape delay if you put feedback up to almost full and play in some sound. Then stop inputting any sound letting the current sound ring round the feedback loop. Then when you change the speed (instantly) say double, the circulating sound will go up to double the pitch constantly and will remain there until the sound dies away. New sounds added at this point will be at normal pitch.

The above SSC example doesn't do this but instead repeatedly swoops the pitch when the delay is changed. As feedback can confuse things, there is a simple test (scenario) without using feedback that will tell you if you are emulating the tape delay correctly, as follows. Set it up so that the delay is set to 1 second (tape speed is 1). Input a constant tone (no feedback). Instantly put the tape speed up double for 1/8 of a second and then back to normal speed. What you will hear is the pitch will instantly go up to double pitch for 1/8 of a second then jump back down to normal, but more importantly approx 1 second later the pitch will drop to half, for 1/8 of a second, and then return to normal pitch again. During the time between the two pitch changes the delay will be a bit less than 1 second but before and after these the blips the delay will be exactly 1 second. The SSC example above doesn't exhibit any of these characteristics.

This is one of the many things where a stepwriter module could help to solve the problem, but failing that the solution will involve delaying both the signal and speed control signal at the same time and calculating the effective delay by subtracting the delayed version of the speed control from the non delayed version. It also involves integrating this new complex speed control, and using that as the delay time control, but in such a way that the accumulative errors do not screw it up.

I've been working on this for two weeks so far, but not yet come up with a definitive way of doing it correctly. Still working on it.
Super beauty, thanks!
+2 votes

This may or may not be helpful, but this 5-tap delay sound (I can't remember where I got it, so I apologize to its maker) does a pretty good job of emulating the speed fluctuation changes of a tape delay: http://kyma.symbolicsound.com/qa/?qa=blob&qa_blobid=4321745701525110676

answered Jul 8, 2020 by andrew-raffo-dewar (Practitioner) (400 points)
I've done it. Made a true tape type delay, and I'm trying to attach it hear but doesn't seem to work. tapeDelay.kym
No, cannot seem to make an attachment . Anyone have any ideas how to do this??
You can attach a file to an answer using the "link" button and the upload tab, but you can't attach a file to a comment.
Well I'm lost. The link says ask a related question. I've put the sound on Kyma Kata slack, and I think all you guys on this thread have access and can get it there if you want it.
Hi Pete!
Why not in Community Library?  P.Please.... :)
Sacher
Hi Sacher. Because it not in a finished state and is in a test jig with random scopes and requires button pushes to get it started. Certainly not in a state for the library.
Hi Sacher I'll send you the sound by email if you wish, but there's no way I can get this thing working. May be you could get it up loaded?? I don't know if it is an Answer, a comment, a reply, a related question, they're all the same to me. I got to the page with instructions on how to upload a file, but there was no link button or upload tab on that page. I was going to send a screenshot but I couldn't upload it.
please do send it!
and I'll do my best to put it in ComLib!
thanx
S
Deleted email address
just did
is it really "DOT co DOT", and not "DOT com DOT" ?
Yes I've just sent you the sound.
Having played a bit with Pete's sound and it is brilliant and I look forward to the final version.

Andrew, the tap delay is a sound I uploaded years ago to the tweaky.  It uses the normal slew built into the standard prototype and while nice for digital delays doesn't have the behavior Pete was describing.

I've been meaning to have another go at that tap delay.  I want to migrate it to the replicator as well as add some additional features to it.
BTW, If anyone is interested, I did finish the tape delay emulator which exhibits all the properties I described above, and we put it in the Community Library. It's called Kyma Kata Petes Tape Delay. It emulates a single play head tape delay but there is an example in there with multi head tape delays so you can emulate the old Watkins copy cat etc.
...