Tap Tempo for an Analog Delay

Started by Scott Swartz, September 04, 2003, 06:02:55 PM

Previous topic - Next topic

Scott Swartz

I got an email asking about this, and I have a concept of how to do it but wondering what hardware it would take.

The MN3101 and MN3102 clocks can accept direct oscillator input at pin 5, so all you need is a circuit that can count the period between the 2 taps of a momentary and convert that to an oscillator frequency.

The front end would be like a frequency counter set to measure period.  They always have a mode that runs a calibrated oscillator and counts to measure the period of an interval.

So the front end oscillator could run at 1000 Hz, and a 100 ms tap time would run the counter to 100.

I guess there would be a scaling constant.

The 100 would be multipled by 204.8 giving a desired frequency of an output oscillator of 20480 Hz, for a delay time of exactly 100 milliseconds.

Its easy as a thought experiment, but what device to build it.  Something like a PIC I am guessing.

Joep

It might be handy to use one of these PIC chips for it, I mean these DIL8 chips you can program.

I must be possible to write a little software program that convert the time between the taps into a frequency.

You need programming device for this....

Just an idea...

Joep

Explorer

You will need a digital device like a pic chip. I´m working on this.

It cannot be done totally analog (like with sample and hold circuits) because it will leak over time. And also calibrating it would be a mess.

With digital electronics you need a very stable oscillator, because most oscillators have several % difference.

A long book to read about this programming.. getting educated day by day..

afranks

Doing this would be really easy with a PIC, and wouldn't require a lot of
programming.  One question would be, what kind of oscillator waveform does the BBD clock chip require?  The job of the PIC would be to
debounce the momentary switch, time the tap interval, output the said
waveform at the correct frequency, and maybe pulse an LED to match the tap tempo.  Sounds doable...

The programming h/w is pretty simple too.  You can build a programmer
for a PIC 16F84 for just a few bucks.  And there a couple of freeware/
shareware programming tools for the PC that work with it.

The big question is, is it worth doing?  I always thought that the tap tempo thing was more useful for longer, digital based delays.  If the longest delay
you can get is 200-300ms, that's some pretty fast toe-tapping.  :D

puretube

...for a non-PIC solution, a look into guitar-tuner schematics might be of help for getting inspirations...

Peter Snowberg

I see one non-PIC solution as an oscillator driving a counter with a latch on the outs that can get transfered into a preset value. Start the counter off at 0 with the first tap counting up and latch the value with the second tap. With that value now the preset, start counting down in a loop to make the tap frequency.

Now make a delay clock using a 4046 PLL and a divider the same length as the BBD to match the clock from the first counter. There's your multiplied tap frequency. :)

If you did it with a PIC, you could average multiple taps and keep a running average to really lock in on the time. It would also cost <$2 and fit in an 8 pin DIP.

Hey, what about using a tap time input triggered from a kick drum to set the delay parameters for a guitar? Hmm....

-Peter
Eschew paradigm obfuscation

R.G.

The PIC is clearly the way to go here.  

To do the job, the PIC has to have some way to read a speed pot (presumably you want a speed pot other than only a tap tempo), a way to adjust the speed of the actual thing it's controlling, and a way to read the tap switch.

The tap switch is simplicity itself. Just debounce the switch with a resistor and cap, and then feed it into an I/O pin.

Reading a speed pot is pretty simple too. The PIC has the pot set up as a variable resistor between the PIC and a cap. You read the pot by setting the pin to ground, discharging the cap fully, and then flipping the pin to high for a little time, and reading the pin state. The PIC will only read a "1" when the cap charges over the read threshold, so you get a direct reading of the time it takes to charge the cap up, and hence the resistance charging the cap.

Setting the actual speed takes some work. Here, you have to take what the speed pot used to do and make the PIC do it instead. The speed pot probably used to be a series resistor. In that case, you can use a cheap multiplying DAC to do the job.  If the speed pot used to be a three terminal pot (voltage divider) then you can directly output a voltage from the PIC by using one of the pins as a PWM output.  Not many effects speed pots are set up as voltage inputs, though.

Maybe the best thing is something like the trick the "LERA" circuit uses - use the PIC's PWM to control the current in an LED, use an LDR to do the actual speed control function, and then read the actual LFO sweep speed with another PIC pin. That would let you do PWM on the LED current pin, then have a closed loop control of the actual LFO speed, within the limits of actual digital quantization of the speed.

Sounds complicated, right? But the hardware is cheap and easily available. It's all A Simple Matter Of Programming to get the right code in there.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

Mark Hammer

If you're using a PIC, then I assume it would not be unreasonable to build in some sort of bpm display capabilities...or would it?

Arno van der Heijden


R.G.

Yes, either display is pretty simple. You just run out of I/O pins and have to buy a $3.00  PIC with more I/O pins to drive the display. If you can live with an LCD display for about $10.00, you can drive it with three pins.

You can also display furlongs per fortnight... 8-)

R.G.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

Jazzpeter65

HI!

I was the one starting this topic about tap tempo, by asking Scott Swartz about it.

One of you asks if it is worth doing, because the tap tempo thing is more useful for longer, digital based delays.

If the longest delay you can get is 200-300ms, that's some pretty fast toe-tapping.

As a proffesional guitarist I can say this is absolutly true.

Before we go any further somone has to come up with a "long-analog-delay" project.

Scott has just posted his AD-3208 delay which will take us to someting between 400 to 600 miliseconds, depending on sound quality.

Who will come up with a 1-2 seconds delay project?

And who will construct the tap tempointerface for it?

I think that these two ideas will talk to alot of us DIY guys.

Just look at the new Replica analog delay from T-rex. Analog sound and taptempo. Sold out everywhere. Even at a price of over 400£......

- Peter

dubs

Quote from: Jazzpeter65HI!



Just look at the new Replica analog delay from T-rex. Analog sound and taptempo. Sold out everywhere. Even at a price of over 400£......

- Peter

The TREX Replica is not a analog delay but a digital delay that uses 24bit burr brown converters. It has a high band filter switch to cuts highs and give the perception of an analog sound (I guess like the PT2399 delay priojects) and as far as I know it's alot simpler to add tap tempo for a digital delay than an analog delay.

Jazzpeter65

It's correct: The T-rex is a digitaldelay. But the 24db filtering makes is sound "right". That's what matters, is'nt it?

Using the PT2396 for taptempo may be an idea since it wil take a signal from a MCU to set the delay time.

I just found the datasheet. Take a look:

http://www.orchard1.com.tw/ics/pdfile/audio/2396s.pdf