Time-Warp-O-Matic

Sculpt-O-Sound presents: Time-Warp-O-Matic

Summary / tl;dr

Time-Warp-O-Matic is a PT2399 based delay/echo/chorus multi effect built using 2 prefabricated PT2399 boards, a CD4066 analog switch, a rotary encoder, 2 potmeters and 2 opamps. The analog switch allows for choosing in which way the signals are routed to and from the PT2399s and the output. Furthermore a feedback / tail and a Wet/Dry control are included. An arduino nano, a rotary control and an OLED display allow for setting effect parameters. The PT2399 configuration / signal routing can be chosen using the rotary encoder. Finally a foot pedal input was added and a CV-input.

Build

A prefabricated PT2388 circuit can be bought for very little money from aliexpress and other stores. These boards are so cheap that it will be hard to reproduce the circuit using individual components for less money.

Reverse engineering the board resulted in this schematic (the layout in part follows the physical layout of the components on the board):

It is a standard approach to using the PT2399. However I wanted to be able to set the delay time and choose the wet/dry mix freely, so therefore I removed R27 and the potentiometer. As you can see the board has a 78M05 which powers the PT2399 at 5 Volts so you can use it in euro rack or 9 Volt battery (portable) applications.

I 3D-printed a frame to house the 2 boards,

and used a piece of vero board to solder the opamps, analog switch and the arduino nano to. Furthermore I printed a front panel with 2 ‘rails’ to hold the framed PT-boards and the vero board.

The final build became sort of a sandwich and everything fit in snuggly:

Schematic

The circuit I ended up using is loosely based on the Time-Manipulator pedal.

Before I show the electrical diagram here is a drawing that gives an overview of the possible signal flow Time-Warp-O-Matic allows. The signal flow is from left to right.

Each Sigma sign denotes a summing point, the switches are analog switches, del1 and del2 are the 2 PT-boards.

This setup allows for various routing configurations depending on the switches and the potentiometer settings. Signals can be send through one or two PT2399 modules in series OR in parallel which can then be summed including or excluding the DRY signal simply by setting the right switches.

This drawing shows the circuitry I added to the PT-modules.

Note: the module runs on 12 V but I used a few diodes to lower the actual voltage powering the circuitry because the CD4066 would otherwise not respond properly to the nano’s LOW and HIGH signals. The PT-boards already had a circuit to regulate their power, so I did not change that. One could have circumvented that by directly connecting an external 5 V supply to it, but leaving the circuitry in would make it compatible with euro/kosmo setups that lack a 5V supply.

The electrosmash Time-Manipulator’s software already had a few interesting signal routing configurations but while I was working on this project I added a few more and lost a few on the way. Furthermore because I added an OLED display and changed the routing of the signals a bit to offer more flexibility I had to make quite a few changes to the published software. You will find them documented in the source code which is available at my github.

The arduino nano controls the analog switches and the delay times. The delay times are set using 2 pulse width modulation outputs of the nano. Varying the pulse width of a square wave on a combination of a resistor and a capacitor and buffering that via an opamp will allow for a transistor to sink a certain amount of current. Connect that transistor to pin 6 of the PT2399 and you can in effect set the chip’s delay time. This is done via two BC547 transistors connected to TL072B-1 and TL072B-2, one for each PT-module.

Note: the +3.3V power for the OLED display is taken from the nano’s 3v3 pin.

Controls

Pedals often have a bypass switch. I did not implement that in hardware in Time-Warp-O-Matic, but left the code in tact, so that if I want to add that later I do not have to restore the code ( one could call this ‘dormant’ code so to speak :wink: ). As a variant I implemented a mode in the software that will choose a routing either with or without the dry signal added to the final mixer. This mode is show in the display.

I did however add an input jack for a foot switch to be connected to the module for controlling some of the signal routings. It is internally connected to the nano’s D8 input.

Software modes

There are 4 modes between which you toggle using the rotary encoder’s push button.
A: FX selection mode: choose the effect using the rotary encoder.
B: Time setting mode: choose the delay time or speed with which the effect changes using the rotary encoder.

1: Wet signal only mode: only the wet signal (no direct dry signal) is sent to the output
2: Wet and Dry signal mix: the wet signal from the effect units and the dry signal are summed and connected to the output

A typical use of mode 1 is to only have the effect signal available to e.g. put it on a different channel than the input signal.

Switch between mode A and B by double pressing the rotary encoder’s push button.
Switch between mode 1 and 2 by single pressing the rotary encoder’s push button.

The settings will be retained in the nano’s EEPROM (for each effect individually), so at startup Time-Warp-O-Matic will have the same settings the last time you used it.
To preserve the OLED display, I added a screen saver mode that will clear the display after a while and warp time every few minutes.

So which effects are there in Time-Warp-O-Matic at the moment?

               switch settings
               SWA SWB SWC SWD
Fast Chorus     1   0  PS   1
Chorus          1   0  PS   1
Decelerator     0   OS  0   0 // If you press the pedal switch the signal will slow     down to a halt.
Short Delay     1   0  RT   1
Delay           0   1  RT   1
Echo            0   1  RT   1
Echo+           0   1  RT   0
Echo++          1   1  RT   0 // Echo with a slight flanging / chorussy effect.
Reverb          1   0  RT   1
Telegraph       PS  0   1   0 // The reverb signal will be added to the dry signal only when you press the pedal switch.
Televerb        PS  0  PS  PS // Reverb is activated only when pressing the pedal switch.
Wow not Flutter 1   0   0   0 // A few random settings make the delay time go up and down which sounds like the signal slowing down or up. This isn't entirely the same as Wow, but what's in a name eh?
Psycho          1   1  RT   1 // Something weird.

OS = One shot via Pedal Switch
PS = Pedal Switch pressed
RT = rotary encoder toggle

Note: most effects allow for a time or speed parameter to be set. For chorus there is a speed parameter, for delay and echos there is typically a time parameter you can set.
The PT-modules do not respond in a linear fashion to the time or speed setting.

Debugging the hardware

To make debugging the hardware more easy I added a jumper to the circuit. If you short this the display will show extra information on the status of the effect switches, and the push button. Furthermore the delay time sent to the PT-modules is slowly varied so you should hear the effect on the audio fed to the circuit change over time.

Caveats

The 2nd CV-input is fully wired but I’ve not added any code for it so the nano will not respond to it yet. I have not made my mind up what it should be used for, but I wanted to include the hardware from the start. Because I can upload code into the module while it is mounted in my rack, the CV-input can easily be used at a later time.

There are many possible overlaps between the effects. As all are based on a delay line several configurations can lead to the same result. It is in the differences between them where interesting sonic opportunities exist.

I’ve not played around with the device long enough, so I’m not providing any presets for the parameters. If you build this, you have to find some by experimenting yourself. Note that the signal flow and parameter settings allow for overlap between the effects.

Finally: I may make changes to my build and will then publish alterations to the schematic (if necessary) in this thread at a later time. So I suggest you read the rest of this thread as well, ha ha, or at least my posts :wink: !

14 Likes

Your modules are really always attractive and sophisticated, again huge work with this one :+1:

btw with all the detailed description of the creation and operation, I still lacked a small sound / video :sleepy: :wink:

3 Likes

I will try to make a few audio examples in the coming days. Making them into a video I can upload to youtube will take some time though.

3 Likes

Seeing another Sculpt-O-Sound production is like tickets to a new movie. I love your balance of idea and what I call YDIY. (Why DIY when there’s a chip or module free or cheap).
Everything from the controls and display to the foot pedal input makes it a must build.
JFDI? And he did. Well done @Jos

2 Likes

A short audio example (and classic usage) of Time-Warp-O-Matic’s “Short Delay”:

@Dud: There are too many possible variations, so I keep the demos limited.

A short demo showing all the FXs and how to set their parameters:

To demonstrate the usage of the nano’s EEPROM at the end of the video I reset the nano and you see the splash screen once more. Furthermore you can see that the last effect type used before the reset, is read from the EEPROM and shown once the start up sequence finishes.

A short audio demo of the ‘Decelerator’ effect:

The “deceleration” is based on increasing the delay time over time at a certain speed which sounds like speeding down / decelerating the signal which is being played. In the video the effect is demonstrated for 2 deceleration speed values.

6 Likes

When using the module to produce only a wet signal, I noticed that the module has a gain factor slightly lower than 1, so this made the wet signal always lower in volume than the dry signal. To be able to compensate for that I added a 20k trim pot to the output stage of the module. How does one use this pot? During the build, set the output to be as loud in the ‘wet’ mode (double click the encoder) as the input signal you feed the circuit (use a mixer to compare both signals).

Furthermore I updated the firmware of the device to v0.2. Writing the settings to the arduino’s EEPROM is now done a few seconds after the the user has stopped operating the rotary encoder.

1 Like

Hi @Jos,
Thanks a lot sharing this :wink:
I’m trying to reproduce your module, but I can’t compile the code, you’re using a library that I think you modified. This is StensTimerJSB.h. If you have it, could you upload it here or put it on your github?
Thank you !

A quick look into your question shows that the differences between the original file and the JSB-version are negligible:

diff StensTimer/src/StensTimer.cpp StensTimerJSB/src/StensTimerJSB.cpp
18c18
< #include <StensTimer.h>
---
> #include <StensTimerJSB.h>
52c52
<     Serial.println(F("Error: Timer slots full!"));
---
>     //Serial.println(F("Error: Timer slots full!"));

So if you change #include <StensTimerJSB.h> into #include <StensTimer.h> you should be fine. If not, let me know.

2 Likes

Thank you Jos !
It compiles with this library!

1 Like

Nice! If you come up with any changes to the code, please let me know. I may then incorporate this in mine if I like it. B.t.w. I changed the code in the github repo.

2 Likes

it’s starting to work :slight_smile:
I have a low volume in wet output, I will add the trimmer as you explain. I have at least a lot of bad contacts and probably bad wiring, but half of the effects give something, even if the result is sometimes weird ;).
I’m going to redo some of the wiring on another breadboard, it’s too tight.


For the code I’m going to look, but I’m still a beginner :thinking:.
On the other hand, with the bad contacts, I came across some interesting glitches, maybe NC momentary switches at different spots.

2 Likes

If the collector current of the transistor connected to the control input of the PT2399 is not within specific bounds you may hear a really odd sound which remotely resembles the rumbling of clouds during a thunder storm. You may also hear this when you are trying out the device during the time you switch it on and occasionally when you reset the nano. Don’t worry about that, that can be remedied / will pass.

2 Likes

As you can see from the date of the first post, I’ve had my Time-Warp-O-Matic for quite some time. It consists of two PT2399 analog delay lines. Those can be switched into all kinds of configurations using some HEF4066 analog switches. So far it worked nicely but I found choosing a delay time very tedious because the device only allowed me to dial in some number between 0 and 255. I’ve changed that by using one CV input to measure the cycle time of an external clock which allows me to choose a ‘relative’ delay time in terms of parts of the cycle time of that clock. Oh yes, this makes things much easier!

Furthermore, the delay time should be automagically adapted when the clock speed changes.

The updated software will be in my github soon.

2 Likes