News:

SMF for DIYStompboxes.com!

Main Menu

PIC based octave down ?

Started by igor12, July 14, 2007, 08:50:26 AM

Previous topic - Next topic

igor12

I've been working on a PIC based octave down using comparator on the PIC for a trigger. Anybody try this at all?  It does work ok with a sine wave up to over 100Khz going in but doesn't work that well with guitar. I added a 300Hz MPF filter, but that did not seem to help. Am I chasing a dead end here?

The Tone God

Just off the topic of my head depending on your program you might be hitting the max processing speed the uC can handle meaning your signal is faster then the uC can respond.

If you are polling the input that might be part of the problem. Switching to interrupts might help.

Andrew

R.G.

Guitars are not sine wave generators.

Sine waves generate exactly one zero crossing per half cycle. Guitars produce more or less than one, and only sometimes one.

The amplitude of a guitar wanders around, especially if more than one string is struck, and the signal of a guitar may spend a long time on one side of ground or the other.

Frankly, if all you're doing is using the PIC as a comparator driving a flipflop, why not just use an analog comparator driving a CMOS flipflop. Oh, wait! That's the MXR Blue Box. And the Roctave. And most other octave downs.

N.B. to TTG: if he's able to follow a 100kHz sine wave, he's able to respond to signal within one half cycle of a 100kHz wave at least. That's 10uS, which is pretty good. I don't think loop time is the issue, I think it's just that the signal is complex. That's what trips up most people who try to dink with digitizing audio.
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.

The Tone God

:::smacks self on head::: 100kHz. Miss read that. It seemed strange to me. I thought there must have been some other processing going on that they couldn't service the signal.

Andrew

Dave_B

Assuming this is for a one-note-at-a-time device, you might look at the µC-based guitar tuners on the Internet to see how they condition the signal going into the chip.  Here's a simple one.  And here's a more involved one.  I've no idea how well either would work in your application, but I assume you're going to breadboard something first.   ;D 


Help build our Wiki!

oskar

It should be working well. Even if you make it trigger on the overtones as well. I think your problem is
that your ear is more sensitive than the pic. You need to boost the signal because the guitar tone decays rather quickly.
Post a drawing.

Quote300Hz MPF filter
what's an mpf filter? :icon_redface: