DIYstompboxes.com

DIY Stompboxes => Building your own stompbox => Topic started by: ~arph on April 17, 2008, 05:26:06 AM

Title: Pitch shifting
Post by: ~arph on April 17, 2008, 05:26:06 AM
We all know that increasing delay time on a delay, while a note is sounding will lower the picht of the note heard. The opposite is when the delaytime is decresed the pitch will raise.

Will it be possible to fool the delay to have the impression that the delay time is constantly in/decreasing by modulating it using a sawtooth?
I imagine that the pitch can than be controlled by changing the slope of the sawtooth by altering it's amplitude and keeping the freq (~50Khz, so it's out of the audible range) the same.

The Question is.. is this uberhaupt possible ?

Title: Re: Pitch shifting
Post by: Seljer on April 17, 2008, 05:43:51 AM
http://www.youtube.com/watch?v=qHy2zDHubFI
Title: Re: Pitch shifting
Post by: ~arph on April 17, 2008, 06:10:31 AM
 ??? That's just puretube showing off his frustration about behringer...
Title: Re: Pitch shifting
Post by: ~arph on April 17, 2008, 06:21:00 AM
Perhaps I wasn't clear. What I meant is that I want the pitch change to be constant and not changing. So for instance you could do octave up, down and other intervals.
Title: Re: Pitch shifting
Post by: RonaldB on April 17, 2008, 10:26:19 AM
You would probeply thought of this but how about a pitch shifter in the delay's effects loop ???
Title: Re: Pitch shifting
Post by: ~arph on April 17, 2008, 10:36:24 AM
I'm still not clear I'm afraid.
I'm not talking about a delay. I'm talking about using the basics of a delay, to create a pitch shifter using the pitch effect you get when you change the delay time. (as used in vibrato/chorus/flanger).
The trouble is that this effect only occurs when the delay time is changing. I wonder if you can fool the delay ic with a sawtooth so it appears to the IC that the delay time is constantly increasing or decreasing and not going up and down as in the effects mentioned before (chorus, etc.)
Title: Re: Pitch shifting
Post by: Andre on April 17, 2008, 10:51:41 AM
I think this is what you're looking for:
(http://www.xs4all.nl/~jvcn0028/pictures/rfharmsch.gif)

André
Title: Re: Pitch shifting
Post by: demonstar on April 17, 2008, 12:48:07 PM
Arnoud, I like the sound of your idea, sounds good!

I guess your then saying one could alter the pitch change by adjusting the gradient of the saw tooth (equivalent to turning the delay pot slower/faster). I would imagine it would need a pure saw tooth waveform. What do you think? Would this be easy to do?

Is the changing pitch definitely happening electronically/physically or is possibly psychological that the increasing delay tricks our brains (not the chip) into thinking the pitch is changing.
Just a thought. ???
Title: Re: Pitch shifting
Post by: flo on April 17, 2008, 02:03:11 PM
It will not work I think, but perhaps I'm too much in the "digital" world here. But interesting anyway!

Here comes a bit of ptch shifting blabla that somewhat tries to be on topic not completely succeeds:  :)
A delay pedal has an audio buffer (like a BBD or RAM chip). This buffer is a single First-In-First-Out buffer. So the audio that is put into it, comes out of it a little while later at the "other" end.
For a contolled pitch shift, you need to be able to access that audio buffer at all points in the buffer not only "at the end". Another way of saying this: The "read" must be done asynchronous of the "write". This way, the audio buffer containing the sampled audio can be "read" with a different speed than the sample frequency that was used to write the audio into the buffer. The difference in speed between the "write" and "read" frequencies leads to the shifted pitch. This cannot be done in a single FIFO buffer like a BBD chip because there is not separate "read" possible asynchronous from the "write". Both are the same as long as the sample frequency does not change.
In your example we change sample frequency. The pitch shift that we hear is the difference between the sample frequency when writing the audio sample into the buffer, and the sample frequency when that audio appears again at the end of the buffer after the delay time. This sort of emulates "reading" the audio samples at a different speed than "writing" it but cannot continue indefinitely because the sample frequency cannot be changed in one direction indefinitely. There is no fooling possible here, I think. (This is not easy to explain in English for me.)

I musty say, that the above posted schematic with BBD chips looks interesting. It should sort of work in the same manner as I tried to describe but I can't quite "see" it yet.
Title: Re: Pitch shifting
Post by: puretube on April 17, 2008, 06:18:00 PM
Quote from: demonstar on April 17, 2008, 12:48:07 PM
Arnoud, I like the sound of your idea, sounds good!

I guess your then saying one could alter the pitch change by adjusting the gradient of the saw tooth (equivalent to turning the delay pot slower/faster). I would imagine it would need a pure saw tooth waveform. What do you think? Would this be easy to do?

Is the changing pitch definitely happening electronically/physically or is possibly psychological that the increasing delay tricks our brains (not the chip) into thinking the pitch is changing.
Just a thought. ???

http://www.diystompboxes.com/smfforum/index.php?topic=65815
Title: Re: Pitch shifting
Post by: puretube on April 17, 2008, 06:23:15 PM
Quote from: ~arph on April 17, 2008, 05:26:06 AM
We all know that increasing delay time on a delay, while a note is sounding will lower the picht of the note heard. The opposite is when the delaytime is decresed the pitch will raise.

The Question is.. is this uberhaupt possible ?



the very very first pitch shifters in the `70s did that...
Title: Re: Pitch shifting
Post by: puretube on April 17, 2008, 06:25:12 PM
Quote from: Seljer on April 17, 2008, 05:43:51 AM
http://www.youtube.com/watch?v=qHy2zDHubFI

that`s not pitch-shifting, but advanced flanging...
Title: Re: Pitch shifting
Post by: puretube on April 17, 2008, 06:40:08 PM
Quote from: ~arph on April 17, 2008, 06:10:31 AM
??? That's just puretube showing off his frustration about behringer...

Wrong.
It`s him showing B*hr*ng*er that there is more that can be done than just
trying to imitate the functions,
copy the look of great vintage FX-pedals,
and displaying lookalike d*mmy boxes at a show...

http://acapella.harmony-central.com/showthread.php?t=1509270
http://www.diystompboxes.com/smfforum/index.php?topic=53452.0
Title: Re: Pitch shifting
Post by: dschwartz on April 17, 2008, 07:03:57 PM
you got me thinking about it and ended up with this limitations:

- The ramp voltage has to be perfect
- you can´t have and infinite ramp.. it has to stop sometime. so you need a ramp oscillator that gives a perfect ramp at any rate like this:
   /|/|/|/|/|/|/|/|/|/|/|/|/|/|/|/|/|/|/|/|...............
The ramp down has to be perfectly vertical.this will cause at least a pop or clik mixed with the output (or even make a mess)

- the voltage dependant resistor (fet, transistor, LDR, etc.) to use as a "time pot" has to have the same response at any rate.
..
anyway is easier and probably cheaper to get a cheap multiFX with pitch shifter..it will sound a lot better than this..

idea:
- Use a rocker pedal with a double pot controlling time and feedback. and two pots setting the max value for each.,, with that you can make from a mild manual chorus up to freaky-wikipiki martian raping pigs sounds....
Title: Re: Pitch shifting
Post by: ~arph on April 21, 2008, 03:53:22 AM
Quote from: dschwartz on April 17, 2008, 07:03:57 PM
- The ramp voltage has to be perfect

Yes, perfectly linear (or perfectly linear behaviour combined with the voltage dep. res.)
Sorry I haven't had time to review all this during the weekend.

Quote
- you can´t have and infinite ramp.. it has to stop sometime. so you need a ramp oscillator that gives a perfect ramp at any rate like this:
   /|/|/|/|/|/|/|/|/|/|/|/|/|/|/|/|/|/|/|/|...............
The ramp down has to be perfectly vertical.this will cause at least a pop or clik mixed with the output (or even make a mess)

Yes as vertical as possible, but to avoid nasty side effects I propose to run the saw at an inaudible frequency (say 50kHz).

Quote
- the voltage dependant resistor (fet, transistor, LDR, etc.) to use as a "time pot" has to have the same response at any rate.

True, this and the ramp voltage determine the sound

As for now this is all just guesswork on paper I'll have to try it out. This method is different than other methods posted here, this requires only one BBD/PT2399 chip and the pitch change is tunable. Currently I see no reasons why this should not work, but chances are likely that it will not.
Title: Re: Pitch shifting
Post by: Mark Hammer on April 21, 2008, 11:43:13 AM
Read the review of the old A/DA Analog Harmonizer here - http://hammer.ampage.org/files/Device1-4.PDF - particularly, the part about the parts count, then think about it again.

For the amount of hassle, board size, parts count, and cost involved, get yourself a digital pitch shifter like a little $60 2nd hand Zoom thing or whatever.  You may hate absolutely everything else about it, but trust me, you will be more than satisfied with the quality of the pitch shift and ease with which it is produced.  Unless you are one of those folks who prefers to go up Mt. Everest on the difficult side, and has no social life or need to actually take time to play music, there is really no reason to attempt an analog harmonizer/pitch-shifter.
Title: Re: Pitch shifting
Post by: ~arph on April 21, 2008, 02:32:12 PM
Well, I'm not looking for a pitch shifter for myself. Nowadays I enjoy meddling around with electronics more than playing the guitar (and I don't like climbing either), but I think that undertaking something challenging actually helps me get better at this. You're probably right about about the infeasability of the idea, but I guess I'll try it anyway. First I'll read the pdf.
Title: Re: Pitch shifting
Post by: Mark Hammer on April 21, 2008, 02:52:43 PM
Read p11, where Anderton notes that the pedal uses 42 (yes forty-two) chips in all.   :icon_eek:

So, are you up for some serious kluging? :icon_lol:
Title: Re: Pitch shifting
Post by: ~arph on April 21, 2008, 03:30:09 PM
Hahaha.. no.. ;D

If you read carefully I only intend to modulate a delay's delay time with a sawtooth..
so I could start out  with something like a Echo base or even a rebote and change/add a saw lfo.
If this works, one can always parralel two or more of these to create chord like sounds.
And yes I've read about the forty two chips 22 cmos.. wow..
No that's too much for me, I once designed a simple tap tempo using cmos and that got me at thirteen ics, never built it. It was no use, but it was nice practice.

Regards,

Arnoud
Title: Re: Pitch shifting
Post by: mdh on April 21, 2008, 03:36:24 PM
Quote from: Mark Hammer on April 21, 2008, 02:52:43 PM
Read p11, where Anderton notes that the pedal uses 42 (yes forty-two) chips in all.   :icon_eek:

So, are you up for some serious kluging? :icon_lol:

So does this mean that the question of life, the universe and everything was, "How many chips are required to make an analog pitch shifter?"
Title: Re: Pitch shifting
Post by: Processaurus on April 21, 2008, 11:27:24 PM
Here's a neat write up that Dirk Hendrik did, who followed through on these ideas about making a working BBD harmonizer, very impressive, and honest, too, about the limitations and shortcomings of that approach.  Unfortunately it looks like the picture links are dead, lots of scope shots.

http://www.diystompboxes.com/smfforum/index.php?topic=35335.0 (http://www.diystompboxes.com/smfforum/index.php?topic=35335.0)

As a musician I'm really excited about how my new-ish ehx HOG harmonizer works, kind of a general purpose granular synthesizer for guitar, though the tinkerer inside is a bit chagrined...
Title: Re: Pitch shifting
Post by: DavidRavenMoon on April 22, 2008, 12:18:22 AM
Quote from: mdh on April 21, 2008, 03:36:24 PM
Quote from: Mark Hammer on April 21, 2008, 02:52:43 PM
Read p11, where Anderton notes that the pedal uses 42 (yes forty-two) chips in all.   :icon_eek:

So, are you up for some serious kluging? :icon_lol:

So does this mean that the question of life, the universe and everything was, "How many chips are required to make an analog pitch shifter?"

Yes, and thanks for all the fish!
Title: Re: Pitch shifting
Post by: ~arph on April 22, 2008, 03:50:01 AM
I've seen D_H's approach, really impressive indeed, but it's a completely different route as the one I'm trying to explore.

my attempts are mostly harmless...
Title: Re: Pitch shifting
Post by: DougH on April 22, 2008, 07:27:07 AM
I get enough pitch shifting and harmonizing between my HOG and my Super Shifter. The HOG is pricey but the SS is pretty cheap, $150 or so. Those 2 units alone could keep me busy for decades just operating them. But if building an analog pitchshifter is your idea of fun- go for it. :icon_wink:
Title: Re: Pitch shifting
Post by: slacker on April 22, 2008, 08:30:37 AM
Quote from: ~arph on April 21, 2008, 03:30:09 PM
I could start out  with something like a Echo base or even a rebote and change/add a saw lfo.

If I've understood you correctly I don't think you'll be able to do this with a PT2399 based delay. The minumum delay time is about 20-30ms so you couldn't modulate it at 50kHz. A sawtooth wave a "normal" LFO frequencies would probably be interesting though.
Title: Re: Pitch shifting
Post by: ~arph on April 22, 2008, 09:30:10 AM
You're right, that is about the minimum time for a PT2399. But I think that doesn't really matter if I modulate above this minimum delay time (which is when you put pin 6 to ground) In order to be able to change the pitch I think all I have to do is modulate at a lower frequency than the lowest interternal clock value which is 2Mhz, so I'm safe here. The pitch shift is not determined by the actual delay times, but the speed of change in delay time, though keeping delay time as low as possible is the best as you want the quickest response you can get).
This is still all just theoretical and I will test this as soon as I finished redecorating my bathroom.
Title: Re: Pitch shifting
Post by: MikeH on April 22, 2008, 01:29:32 PM
Quote from: Mark Hammer on April 21, 2008, 11:43:13 AM
Unless you are one of those folks who prefers to go up Mt. Everest on the difficult side, and has no social life or need to actually take time to play music, there is really no reason to attempt an analog harmonizer/pitch-shifter.

I almost shot an entire bite of pear through my nose when I read this.
Title: Re: Pitch shifting
Post by: Mark Hammer on April 22, 2008, 02:28:06 PM
When I was 8, I had my tonsils removed, as was the custom of the day.  I was, as they described it to me then, "a bleeder".  To stop the bleeding, some sort of "thing" was installed that had a length of string inserted into my nostril, down into my throat and out my mouth, where the two loose ends were tied together.  The string, or tubing, or whatever it was (that was a looooooong time ago, remember, and I was drugged up) was used to hold a pad of some kind in place in the middle of my head, to absorb the blood.  When it was time to leave the hospital, someone came and snipped the string/tube, and gave a yank at one end.  I watched this knot disappear into my nose, felt like my brain was being re-arranged for a few milliseconds, and then to my utter disbelief this huge red clotted snotty lump came flying out my mouth.  It was like someone had caught a fish in the middle of my head and was yanking it into the boat.

It may have been going the other way, and may not have been a chunk of pear, but I imagine the experience would be quite similar to snorting a pear chunk out one's nasal passages.  I do not recommend it.  Still, glad to have brought a smile to your day. :icon_biggrin:
Title: Re: Pitch shifting
Post by: ~arph on April 23, 2008, 04:14:05 AM
Quote from: Mark Hammer on April 22, 2008, 02:28:06 PM
When I was 8, I had my tonsils removed, as was the custom of the day.  I was, as they described it to me then, "a bleeder".  To stop the bleeding, some sort of "thing" was installed that had a length of string inserted into my nostril, down into my throat and out my mouth, where the two loose ends were tied together.  The string, or tubing, or whatever it was (that was a looooooong time ago, remember, and I was drugged up) was used to hold a pad of some kind in place in the middle of my head, to absorb the blood.  When it was time to leave the hospital, someone came and snipped the string/tube, and gave a yank at one end.  I watched this knot disappear into my nose, felt like my brain was being re-arranged for a few milliseconds, and then to my utter disbelief this huge red clotted snotty lump came flying out my mouth.  It was like someone had caught a fish in the middle of my head and was yanking it into the boat.

:icon_eek:

Oh lord..it's amazing where this thread goes
Title: Re: Pitch shifting
Post by: Mark Hammer on April 23, 2008, 08:17:01 AM
Oh hell, I only build stuff so I can tell stories! :icon_lol:
Title: Re: Pitch shifting
Post by: scratch on April 23, 2008, 10:05:24 AM
For reference the the Spin Semi FV-1 (Small Bear carries them) datasheet shows two programs with 'pitch shift' a straight one with +/- 4 semi-tones, and one with Echo.

Just throwing it out there ...
Title: Re: Pitch shifting
Post by: ~arph on April 23, 2008, 10:19:22 AM
Looks like a cool IC, you can program it yourself, not too expensive either
Title: Re: Pitch shifting
Post by: flo on April 23, 2008, 06:29:15 PM
Yes, looks like an interesting chip. But how to create a good board for it and solder it. Its smd.  :(
Or just get the evaluation board (a bit expensive at 90 pound => 170 dollar)? If  you want to program it, you probably need one anyway.
Then perhaps the upcoming Line6 Tonecore DSP kit is a more interesting option at $199,-
Its also programmable from a PC, has USB connection, 24bit AD/DA, code examples, Tonecore stompbox like enclosure... hmmm looks very interesting!