Clean Octave up idea

Started by 11-90-an, July 25, 2020, 12:05:54 AM

Previous topic - Next topic

11-90-an

This idea is based on the fact that the boss oc2 "inverts" the signal when a pulse is given. (Or something like that I can't explain it that well... ;D)

So basically, we replace the bottom half of a boss oc2 with a 90 degree phase shifter and keep the sine to square converter. So in theory, when the input signal wave goes high, the 90 deg phase shifted wave is still at 0. When the input wave goes back to 0 and begins to go negative, the 90deg Phase shifted wave is now high.

With this info, we can now assume that if we have a inverter (like in the oc2) we can feed this 90 deg phase shifter signal to it and it would flip the negative side up. So it basically is a "cleaner" full wave rectifier. In theory.

Here's a hastily drawn block diagram...



Now i know that i don't have enough experience about this, but this is for those who want to try... ;D

Now please tell me why this wouldn't really work... ;)
flip flop flip flop flip

Rob Strand

Your output waveform is shown for 180deg shift  but the block diagram has 90deg shift.

Both will produce a double frequency output because it is modulating but they will sound different.

The 180 deg case is just a rectifier (and inversion of sign).   The cleanness of the rectifier comes down to how fast the opamps are.  Jim Williams (Linear Technology) did a few nifty high speed rectifiers like this; IIRC using fast comparators.

The 90 deg case flips the middle two quadrants of the sinusoid and produces wiggles at 2*f.

When you built LCR meters you see both of these waveforms.  The rectifier signal is the main measurement and the 90deg case is loss (resistance).  They come from a synchonous demodulator.

The 90 deg case would be interesting to compare to the 180 deg case, especially with some filtering.

So tricky part is to get the 90 phase shift working over a wide band of frequencies.   This usually done with a stack of all-pass filters in cascade.  It's called a Hilbert transformer and you might find example in single-sideband (SSB) radio.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

11-90-an

Quote from: Rob Strand on July 25, 2020, 01:45:00 AM
Your output waveform is shown for 180deg shift  but the block diagram has 90deg shift.

Both will produce a double frequency output because it is modulating but they will sound different.

The 180 deg case is just a rectifier (and inversion of sign).   The cleanness of the rectifier comes down to how fast the opamps are.  Jim Williams (Linear Technology) did a few nifty high speed rectifiers like this; IIRC using fast comparators.

The 90 deg case flips the middle two quadrants of the sinusoid and produces wiggles at 2*f.

When you built LCR meters you see both of these waveforms.  The rectifier signal is the main measurement and the 90deg case is loss (resistance).  They come from a synchonous demodulator.

The 90 deg case would be interesting to compare to the 180 deg case, especially with some filtering.

So tricky part is to get the 90 phase shift working over a wide band of frequencies.   This usually done with a stack of all-pass filters in cascade.  It's called a Hilbert transformer and you might find example in single-sideband (SSB) radio.


Oops sorry for the drawing error... :D
Would a frequency detector circuit work as a fine tune to the all-pass-filters?
flip flop flip flop flip

Rob Strand

QuoteOops sorry for the drawing error... :D
I'm assuming you wanted the180deg case?

QuoteWould a frequency detector circuit work as a fine tune to the all-pass-filters?
It all looks clear with sine-wave input but with a real guitar signal the whole idea of getting the fundamental using an analog circuit is very blurred.

If you look at the Boss OC2 it has a low-pass filter to get rid of the high frequencies to help detect the fundamental more reliably.   IIRC a couple of OC2 spin-offs don't have a filter here.  The next thing is the way the detector works.
It captures the peaks and the digital output is close to the peaks.    The peaks are by nature phase-shifted from the zero-crossings.      The low-pass filters themselves cause phase shifts as we get closer to the cut-off.    The point of using the OC2- peak detector method is it tracks fairly well.    So if we wanted to make that detector line-up the phase better then we would need to add all-pass filters to the detector and/or the signal path.

At this point we don't know how much different the two methods of phase-alignment sound so maybe you can just try out the idea with stressing out of over all the phase details.

The simpler octave-up circuits kind of give-up on precise rectification and the difference in sound comes from the distortions of the circuit itself.   It's interesting that these end-up sounding ok.    If you play chords through them they at least produce something resembling distorted guitar.   Playing chords through an OC2 goes bananas.

As far as fundamental detectors go, the Roland guitar synth had an interesting circuit.  Quite complicated though.   IIRC it had the luxury of separate pickups on each string which greatly improves reliability and chord notes are naturally separated.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

11-90-an

I was talking about 90 deg phase shift since that was the one that can give precise triggers to flip the signal...:icon_biggrin:
I understand your point...
But is there a fixed phase shift degree that the LPFs in the OC2 has? Or is it dependent on frequency and amplitude of the input signal?
flip flop flip flop flip

Rob Strand

QuoteBut is there a fixed phase shift degree that the LPFs in the OC2 has? Or is it dependent on frequency and amplitude of the input signal?

It varies quite a bit with frequency.   The phase shifts start occurring somewhat below the cut-off frequency of the filter.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

ElectricDruid

Quote from: Rob Strand on July 25, 2020, 04:21:23 AM
QuoteBut is there a fixed phase shift degree that the LPFs in the OC2 has? Or is it dependent on frequency and amplitude of the input signal?

It varies quite a bit with frequency.   The phase shifts start occurring somewhat below the cut-off frequency of the filter.

The excellent filter tools here plot the phase shift for various popular filter circuits:

http://sim.okawa-denshi.jp/en/Fkeisan.htm


11-90-an

#7
So here's an idea... (but not that new, but you get the point... :icon_redface:)

Chopped oc 2 (only one octave down), remove that 1/2 CD4013 that actually *divides* the signal (the other half generates pulse waves... or something like that...)
After that, attach a CD4046 PLL, configured like the theremin fuzz (scroll down for schem), and only use one of the halves of the CD4013 (aha! that spare one a while ago has some use now!).
Then feed the output to the JFET that flips the waveform...

Here's how the I/O will hopefully end up looking like:


Note that the wave still goes on a bit when it's supposed to be flipped already. This keeps in mind that there would be a bit of phase shift from raw signal to the CD4013 because of all the filtering going on.

Hope what I said makes sense, and any feedback welcome... :icon_biggrin:
flip flop flip flop flip

ElectricDruid

This is a fairly complicated way to get a clean rectifier. A "precision rectifier" circuit will give you the 180 degree waveforms you're talking about without so much messing about. For the 90 degree case, you do need something different.

The problems with the rectifier as an octave up are that (a) unlike a sine wave, the bottom of a guitar waveform rarely looks exactly like the top, so the rectified waveform isn't simply doubled in frequency - it retains a fairly strong fundamental, and (b) those spikes that get created around the centre line when the bottom-half of the wave gets folded up cause a lot of higher harmonics - distortion.

Still, it's worth playing with. I've had fun with various rectifier-based designs.

garcho

#9
^ yeah, long story short, there is no such thing as analog up in guitar pedal world. Look at the old "octave" pedals from pre-microcontroller days. They're all octave down, for a reason. All the new-ish octave up pedals are digital. Manipulating complex frequencies requires "brainy" circuitry.

EDIT: regarding "no such thing as", I meant to say clean octave up. Non-glitchy, all-over-the-fingerboard, clean ocatve up.
  • SUPPORTER
"...and weird on top!"

R.G.

What garcho said.

Even more, guitar signals are not sine waves. Things that work GREAT on pure sines are not necessarily great ideas for signals with lots of harmonics in there. The Hilbert transformer comment applies. One analog doubler that can work uses a Hilbert transformer to generate quadrature across a wide frequency band and then uses analog multipliers to bang the true and quadrature against each other. This works pretty well, but is complex and needs tweaking. Many not fit in a pedal.
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.

11-90-an

So rectifying won't work...  :( (or will work, but not for clean octave..)

Next idea:

Ring mod fed with the same signal on both inputs? in theory, given that the guitar signal is "f", the outs would be:

f + f = 2f
f  - f = 0

of course, there would be tons of filtering, blah blah...

or am I misunderstanding something...?
flip flop flip flop flip

ElectricDruid

Quote from: 11-90-an on October 14, 2020, 11:34:28 PM
Ring mod fed with the same signal on both inputs? in theory, given that the guitar signal is "f", the outs would be:

f + f = 2f
f  - f = 0

of course, there would be tons of filtering, blah blah...

or am I misunderstanding something...?

Well, a guitar signal is more like f+2f+3f+4f, since it has harmonics.

So then the output is:

(f+f)+(f+2f)+(f+3f)+(f+4f) + (2f+f)+(2f+2f)+(2f+3f)+(2f+4f) + (3f+f)+(3f+2f)+(3f+3f)+(3f+4f) + (4f+f)+(4f+2f)+(4f+3f)+(4f+4f)

..and that's just the *sums*, we haven't even looked at the differences yet! Here goes..

(f-f)+(f-2f)+(f-3f)+(f-4f) + (2f-f)+(2f-2f)+(2f-3f)+(2f-4f) + (3f-f)+(3f-2f)+(3f-3f)+(3f-4f) + (4f-f)+(4f-2f)+(4f-3f)+(4f-4f)

Obviously the levels of some of those components might be insignificant, so it might not be quite as bad as it looks. But the idea that you put a frequency in, get a clean frequency out, and all the difference products cancel out and magically disappear is only true in theory, and with perfect sine waves (again, they're theoretical outside of serious lab equipment).

So..."tons of filtering"? Yes, you have to turn a guitar into a lab sine wave generator!

Vivek

Quote from: 11-90-an on July 25, 2020, 12:05:54 AM
90 degree phase shifter

Will the amount of phase shift depend upon the frequency ? So the circuit wont work the same way for all frequencies ?

11-90-an

QuoteSo..."tons of filtering"? Yes, you have to turn a guitar into a lab sine wave generator!

hear me out, hear me out...  :icon_lol:

1. turn guitar signal into square waves via CMOS
2. use a PLL to multiply frequency by 2
3. feed to frequency to voltage converter (this?)
4. feed voltage to sine wave vco

and we end up with a guitar synth... :icon_mad:

Quote from: Vivek on October 15, 2020, 05:23:12 AM
Quote from: 11-90-an on July 25, 2020, 12:05:54 AM
90 degree phase shifter
Will the amount of phase shift depend upon the frequency ? So the circuit wont work the same way for all frequencies ?

yes, the phase shift would have to keep changing and yes, it won't work for all frequencies...
flip flop flip flop flip

Steben

In theory I get some nice results with "bad" biased jFETs (verry assymetric) fed by non inverted and inverted signal and then summed. Not so much with BJTs.
  • SUPPORTER
Rules apply only for those who are not allowed to break them

amptramp

Quote from: 11-90-an on October 15, 2020, 05:45:22 AM
QuoteSo..."tons of filtering"? Yes, you have to turn a guitar into a lab sine wave generator!

hear me out, hear me out...  :icon_lol:

1. turn guitar signal into square waves via CMOS
2. use a PLL to multiply frequency by 2
3. feed to frequency to voltage converter (this?)
4. feed voltage to sine wave vco

and we end up with a guitar synth... :icon_mad:

Quote from: Vivek on October 15, 2020, 05:23:12 AM
Quote from: 11-90-an on July 25, 2020, 12:05:54 AM
90 degree phase shifter
Will the amount of phase shift depend upon the frequency ? So the circuit wont work the same way for all frequencies ?

yes, the phase shift would have to keep changing and yes, it won't work for all frequencies...

A PLL takes time to figure out what the phase is and control the VCO.  It is always going to be behind.  Imagine the signal square wave level going to "high".  The phase detector has to wait until the signal goes back to "low" to determine what the frequency is.  Then it has to apply the control signal to the VCO.  This has to be divided by 2 to get the frequency doubling you want.  In the best case, one cycle has gone by before you know the frequency of the signal and more time has to go by before you phase lock with the double frequency VCO output and still more before the phase detector establishes the phase.

If you have a high-frequency sampling counter, you might be able to make a period halver rather than a frequency doubler.  Duration of high square wave was 0.8 millisecond as determined by the counter?  Count half the amount of time as soon as the signal goes low again and store that number because you are going to repeat it.  Then count the low period and store half that number.  So let's say the duration of the high is 0.8 msec and the low is 0.6 msec.  As soon as the next cycle starts, put out a 0.4 msec high and follow it by a 0.3 msec low then repeat the 0.4 msec high then the 0.3 msec low.  Sometimes, the time domain rules!