Pitch shifting ideas... hmmm...

Started by WaveshapeIllusions, February 08, 2013, 06:48:06 PM

Previous topic - Next topic

WaveshapeIllusions

Just musing out loud here, nothing really fleshed out yet. A few different ideas, all analog. I hope some of them will be of interest.

A ring modulator generates sum and difference frequencies, right? You put the same signal in the carrier and modulator and you get an octave up. Well, how about other frequencies relative to your guitar? I realize that with a guitar it's quite different than a perfect sine wave, but I think the idea would still stand. Say you mix dry signal and an octave down. That would generate a fifth up (1.5x original) and octave down (0.5x original), right? Perhaps with some careful filtering you might even be able to subtract out the octave down and have a fifth up. I think that'd be cool.

I was also looking at the OC2 schematic. As far as I can tell, the divided square flips the phase of the dry signal every other cycle to make the octave down signal. What if you drove that with a filterrd and squared version of the input (without division)? It would flip every half-cycle, right? That would double the frequency, wouldn't it? Going from the OC2 tone, it would be relatively clean, at least compared to the standard octave fuzz.

On filtering (for better fundamental extraction), I had a few thoughts. Going back to the OC2, it uses a Sallen-Key. Normally the opamp is a buffer, but would a cap in the feedback loop for an integrator help attenuation? Or use an inverting opamp with gain so the higher frequencies aren't just unity but attenuated? Say a 20k input and 50k feedback with something like 2k in line with the cap. Wouldn't that have a gain of about 2.5 until the crossover and then a gain of 0.1 above it?

Another idea would be a state-variable filter. The highpass is inverted compared to the lowpass. Summing them together would mean more attenuation, right? It does take 3 opamps though (4 if you include the buffer) so maybe a 4-pole Sallen-Key would be easier. What if you inverted the bandpass and added that too?

Also on filtering, as I understand it part of the issue is that a guitar often has multiple zero crossings, which can glitch the divider. If you filter it enough to get just one zero crossing, what is the duty cycle like? Is it close enough to 50% that it could be turned into a square? I think that'd drive a flip-flop well enough. Really though, doesn't it just change states every positive pulse? So duty cycle would be irrelevant, just zero-crossings?

Just some musings on this kind of thing. I haven't seen some of these things. There's a good chance I haven't seen them yet. That, or they don't work. ;D Either way, just some ideas that floated through my head. Thanks for hearing out my block of text. I hope some if it can be of use.

amptramp

There are a few methods of getting an octave higher:

1. Fullwave rectification - generates a number of harmonics, see: http://www.falstad.com/fourier/ set to sine then fullwave rectify and click on the non-zero terms to see the amplitude.
2. Linear multiplication with both inputs the same - use a 1496 analog multiplier, but keep it in the linear region to get sinewave doubling via trig identity Cos (2f) = 2cos^2(f) -1
3. Log-antilog after multiplying the log signal by two - gives you the square of the signal which is the second harmonic
4. Ring modulation with both inputs the same - similar to linear multiplication but with extra harmonics

Note that multiplication and log/antilog methods may require a compressor in front to keep amplitudes from changing excessively - doubling the input gives you four times the output.  In addition, you can get fullwave rectification by using an analog multiplier with one input overdriven.  This adds harmonics but reduces sensitivity to input level.

Good luck and have fun!

tca

#2
It is funny you mention this. I've been just reading and simulating this fundamental frequency extracting system (http://www.google.com/patents/US4377961) It is not an easy task to do it! I was thinking in making a 8 octave version out of it and using a Steiner filter for each octave (not voltage control). Actually in my simulation I've used a Sallen-Key filter to do the job... I do think that the way to go is the Quadrafuzz way... But I don't really like the distortion of those two leds.

I do think that one should look to the guitar signal in a very distinct way from synth signals. The guitar signal is already a very complex signal. The way your reasoning follows it seems that your are trying to simplify the original guitar signal, one should use its complexity not remove it.

One of the things I've done is to change the guitar signal with a diode function generator, you can really add harmonics to the original signal, control the attack and decay, etc. You can obtain ring modulator type of sounds, overdrive, octave up (which is easy with this setting), and theoretically, also a octave down. By  theoretically I mean that I could not get it, I've build a breadboard with 10 trims, not easy to adjust all of them!

BTW, squaring the guitar signal will introduce much more harmonics than the simple trig double formula shows, your guitar signal is not a sine wave and so you will get terms of the form sin w_n * sin w_m for all n and m, all the harmonics products.

Cheers.
"The future is here, it's just not evenly distributed yet." -- William Gibson

WaveshapeIllusions

Amptramp-
Those are some cool methods. The analog multiplier sounds interesting. I've never played with those, it looks like something I should try. I've not even heard of the log/antilog method. I've heard of logarithmic amplifiers, I would assume one of those is involved? Would it be possible to multiply (or divide) the log signal by something other than two to get different pitches?

tca-
That is a rather interesting circuit. It's made by Bode, the one whose name is attached to the filter plotting method? Your plan for it sounds awesome, I'd like to see it.

I agree with you on the signal complexity. My main concern in filtering it is to ease pitch-shifting. Though having a stombox that put out a sine wave in place of my original signal would be cool...

The diode function generator sounds fun. Do you have a schematic for it? I thought of a diode waveshaper after seeing something like it in the Fuzzstain. It would consist of a few sets of diodes in the feedback loop with pots in line with each set, with increasing forward voltage per set. One could tailor the gain of each wave section.

Thanks for the extra info on squaring the signal. I was not aware of the effect extra harmonics would have. I really must stop assuming a sine wave when I think of wave shaping, things always seem a lot easier than in reality when dealing with a pure tone. I think I have a few scans of a guitar waveform somewhere. I should post them for reference.

tca

#4
I think that Bode is this Bode: http://en.wikipedia.org/wiki/Harald_Bode

Here is the forum entry for the DFG and the simulation entry.

Cheers
"The future is here, it's just not evenly distributed yet." -- William Gibson

samhay

The AD633 is an analog multiplier chip that can do do frequency doubling. They work great for sine waves, but not so great for guitar signals. There are a few ring modulation designs based around them that work OK.
I'm a refugee of the great dropbox purge of '17.
Project details (schematics, layouts, etc) are slowly being added here: http://samdump.wordpress.com

WaveshapeIllusions

Oh, okay. Mr Bode is pretty cool sounding. Lots of synth projects.

I like that circuit tca, even though I'm not quite sure of what's going on there. I'm going to have to take awhile to digest that.

Thanls for the part recommendation samhay. I'll.have to pick some of those up next time I go for parts. In the meantime, I suppose I should read up on analog multiplication. It sounds like a rather useful tool for sound mangling.

Mark Hammer

As I keep reminding folks here, people tend to forget that the "classic" ring modulator and frequency-shifted sounds we have come to know and love, came out of the synthesizer universe, where oscillators allow for a constant signal amplitude and rigid timbral control.  And if one is using sine-waves, you don't even need that.  And many of the sonic goals people have in using any of the sideband-related techniques have an end-product very much like synthesis in mind.  Unfortunately, guitar signals are a LOT more harmonically complex, and just generally complex, than what sideband-related effects anticipate.  

Doesn't mean they can't be interesting, musically valid, or that one shouldn't use them, just that the signal has to be "conditioned" to apply those methods with success.

amptramp