Jump to content

Tempo switch for 1/8 triplets


Pillimees

Recommended Posts

  • Members

I noticed that the T-Rex Replica has a switch to select between straight quarter notes and 1/8 triplets, when setting the delay tempo. So I was wondering if it was possible to build similar functionality into a standalone footswitch. Any pointers would be most appreciated. If I could pull that off, my Echohead would cover all my delay needs.

 

Thanks in advance.

Link to comment
Share on other sites

  • Members

I think you misunderstood me. Perhaps I didn't explain what I wanted clearly enough.

 

I have a Marshall Echohead delay pedal, which has an input jack for an external tap tempo switch. I've built such a tap tempo switch, and it's working fine, but the tempo I tap in translates directly to delay time. The Echohead doesn't support triplets itself, so I'd like to expand my current switch (or build a new one) to add this functionality. For this, the footswitch will need to delay the tempo I tap in (probably using some PIC programmed to do just that?) and send that to the Echohead. This is the part I was asking advice for.

Link to comment
Share on other sites

  • Members

so you want a frequency converter? you tap at 4/4, and it outputs either at 4/4 (i.e. 1x multiplier) or 12/8 (i.e. 1.5x multiplier)?

 

a 1.5x multiplier would be a pain, but a 3x multiplier would be relatively easy, so you could just tap at 2/4 instead in order to achieve 12/8.

Link to comment
Share on other sites

  • Members

My apologies, it was late last night when I posted this, so I got things mixed up a bit. Dotted 8th notes is what I'm after, not 8th note triplets. So if I tapped in quarter notes at, say, 150BPM, I'd get a delay time of 300ms, which would give that cool double-picking effect when I play 8th notes in time.

 

So that would be a 0.75x multiplier, right? If that's a pain to do, what about a 3x multiplier and a 4x divider?

Link to comment
Share on other sites

  • Members

Yep all your maths makes sense. Definitely a PIC or AVR is the easiest way of doing this. And having thought about it a bit more, actually a non-integer multiplier is not all that hard at all.

 

Cheapest way of course is learn to tap in dotted-eighth.

Link to comment
Share on other sites

  • Members

Cheap, yes. Troublesome, too. Especially having to adjust the tempo mid-song.

 

Any pointers you could give to get me started would be most appreciated. I'm fairly handy with a soldering iron and have built several effect pedals, but this is new territory for me. I don't even know where to start looking.

Link to comment
Share on other sites

  • Members

Any experience with PICs or AVRs? I don't have much but I'm sure some others on here do.

 

Basically there's a software component and a hardware component to your problem. For the hardware, you need a micro (microcontroller; i.e. PIC or AVR), and power supply (probably 5V regulated), some input buffering for the tap switch input, and some output circuitry, and a switch to choose 0.75x or 1x multiplier. And some LEDs too.

 

Input buffering is required for switch de-bouncing, although you could do this in software instead of hardware. It depends on whether you find a competent programmer.

 

In terms of software, You basically time the period between consecutive taps, then multiply as appropriate and set a timer to that value. All micros have built-in timers. You stop the timer basically when you detect that the taps have stopped. The timer triggers the output.

Link to comment
Share on other sites

  • Members

 

Any experience with PICs or AVRs? I don't have much but I'm sure some others on here do.

 

None whatsoever.

 

Could you explain the input buffering in a bit more detail? I'm not sure I understand what switch de-bouncing is. Also, what would the output circuit look like?

 

The LEDs, I assume, are for indicator purposes, right?

 

For the 0.75x or 1x multiplier, I can simply use a switch to bypass the whole PIC circuit, so it behaves like a regular footswitch (just like it is now).

 

Would a PIC16F627 work for this purpose? I can get a PIC programming board from a local electronics store, which includes that chip.

Link to comment
Share on other sites

  • Members

None whatsoever.


Could you explain the input buffering in a bit more detail? I'm not sure I understand what switch de-bouncing is. Also, what would the output circuit look like?


The LEDs, I assume, are for indicator purposes, right?


For the 0.75x or 1x multiplier, I can simply use a switch to bypass the whole PIC circuit, so it behaves like a regular footswitch (just like it is now).


Would a PIC16F627 work for this purpose? I can get a PIC programming board from a local electronics store, which includes that chip.

 

For switch debouncing, type "Switch debouncing" into google. Open the first document (should be a pdf - www.ganssle.com/debouncing.pdf). Read and enjoy. Come back here with questions.

 

You wouldn't want to bypass the whole thing. Thats an ineligant solution. Better would be to control the PIC to tell it to dotted 1/8ths, straight through, or any other variation you can think of.

 

You could use a 16F627, but I wouldn't. I've programmed with the older PICs like the 16F877 (which was an update on the 16C77), and I was happy to leave them behind when the 18F452 came out (that was in 2002, so they probably have a newer one now). The older ones didn't even have hardware multiply.

 

You can do what you want with just about any of them, but why make it harder for yourself? Look for microchip's PICKits. The PICkit 2 looks good for the more advanced processors I'd recommend.

 

BTW, have you done much programming? How about assembler?

Link to comment
Share on other sites

  • Members

For switch debouncing, type "Switch debouncing" into google. Open the first document (should be a pdf -
www.ganssle.com/debouncing.pdf
). Read and enjoy. Come back here with questions.

Thanks, that document was very helpful.

So would a simple RC debouncer do the trick?

 

You wouldn't want to bypass the whole thing. Thats an ineligant solution. Better would be to control the PIC to tell it to dotted 1/8ths, straight through, or any other variation you can think of.

Alright.

I started thinking about this myself and realised that I'd want a status LED that blinks with the tempo, so bypassing the PIC won't do.

 

You could use a 16F627, but I wouldn't. I've programmed with the older PICs like the 16F877 (which was an update on the 16C77), and I was happy to leave them behind when the 18F452 came out (that was in 2002, so they probably have a newer one now). The older ones didn't even have hardware multiply.

What would you suggest? The 18F452 is available here for like $20. Seems kind of steep, but perhaps that's the sort of price these things command.

 

You can do what you want with just about any of them, but why make it harder for yourself? Look for microchip's PICKits. The PICkit 2 looks good for the more advanced processors I'd recommend.

Alright, I can get the PICKit 2 Starter Kit here.

 

BTW, have you done much programming? How about assembler?

Several years, and programming is what's earning me my daily bread right now. But all higher-level languages, not assembler.

Link to comment
Share on other sites

  • Members

 

Thanks, that document was very helpful.

So would a simple RC debouncer do the trick?


 

 

It might. You really just need to play with it. Ideally you could hook the switch up with a scope. Given you don't need many pulses too quickly the RC debouncing might be just fine.

 

The last time I did this though, I used a software debouncer. I think I used the state change interrupt on the PIC to set a hardware timer. Then, when the timer expiration interrupt happened I checked the value of the input. (at least that's what I recall - this was 5 years ago)

 

 

What would you suggest? The 18F452 is available here for like $20. Seems kind of steep, but perhaps that's the sort of price these things command.

 

 

Where are you? I thought they were cheaper than that last time I ordered some (~$11 in the US).

 

Also, you can request free samples from Microchip if you are "in the industry" (they don't really check). 3 pieces of any part # and up to 5 part numbers. Once every 60 days. (or at least that's what it used to be)

 

I like the 18F452 because it's what I've worked with. If I were to do something now, I might go with a newer chip with USB support. I haven't looked at the microchip documentation lately, so I don't know what's up to date.

 

Unless you are going to be building 1000s of these things, my advice is always to get the more expensive one with more functions.

 

Also, you might want to consider the # of pins. The 452 is a 40 pin chip, and you won't need nearly that many. You can get a 8 pin PIC, but I don't remember from which family.

 

 


Several years, and programming is what's earning me my daily bread right now. But all higher-level languages, not assembler.

 

 

Good! If you understand pointers, you shouldn't have any trouble. If you've ever done some assembler (which I'd assume if you have an EE or CS degree) you should be familiar with the style and get right back into it.

 

I'd look around on the Microchip website and find the introductory pdfs. There should be one for learning the language and one for learning the basics of PICs. Those should get you started and help you decide what chip to go with.

 

When you decide, get the datasheet for that part #. The Microchip data sheets are excellent and can be read easily. I used to read them while on the exercise bike at the gym.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...