Author Topic: FV-1 Pitch Shifting Lag?  (Read 8812 times)

Bard Morons

FV-1 Pitch Shifting Lag?
« on: June 22, 2010, 10:18:08 AM »
Hey guys,

I wired up an FV-1 last night to test it out for some pitch shifting I was planning on doing.  The effects are generally impressive, but I seem to be noticing some lag in the pitch shifting algorithm hard coded on the chip (preset 3 or 4).  Has anyone else noticed this?  I searched around but failed to find a similar incident.  The shift is accurate and works well, but seems to have some lag associated with it.  I didn't notice the lag with the other presets, but after awhile, I think my ears started playing tricks on me... too much A/B testing melts the mind :)  Thanks.

-Matt

octfrank

Re: FV-1 Pitch Shifting Lag?
« Reply #1 on: June 22, 2010, 12:17:41 PM »
You are correct, there is a lag. Pitch shifting requires a window of data to work with so there is a lag as a result, the actual lag is not fixed as we sweep through the window and approach the write pointer so the delay modulates slightly but the shift amount remains constant. For an explanation of how it is done see http://www.spinsemi.com/Products/appnotes/spn1001/AN-0001.pdf
Frank Thomson
Experimental Noize

Bard Morons

Re: FV-1 Pitch Shifting Lag?
« Reply #2 on: June 22, 2010, 01:48:35 PM »
Of course.   That makes sense.  Thanks for the heads up.

mth5044

Re: FV-1 Pitch Shifting Lag?
« Reply #3 on: June 22, 2010, 05:39:46 PM »
Do other pitch shifters, such as the Whammy, suffer from this same problem?

ExpAnonColin

Re: FV-1 Pitch Shifting Lag?
« Reply #4 on: June 22, 2010, 08:18:09 PM »
Do other pitch shifters, such as the Whammy, suffer from this same problem?

All pitch shifters which involve a delay (eg, most of them, other than "octavia" or counter-based octave-down effects) will have some inherent lag, though with clever processing it can be made to be mostly imperceptible.

-Colin

Taylor

  • Awesome!
  • ****
  • Posts: 4118
  • Total likes: 62
  • The clean energy source of the future.
Re: FV-1 Pitch Shifting Lag?
« Reply #5 on: June 22, 2010, 09:19:35 PM »
Supposedly the Whammy uses a PSOLA approach. Something like this can be done in the FV-1. There are also some other tricks to deal with the lag. I have seen code that does this well, but unfortunately it's not my work to divulge.

I haven't done anything with this idea, but the Spin documentation does mention that the JAM opcode can be used to do some kind of autocorrelation which I think is relate to the Whammy approach.

ExpAnonColin

Re: FV-1 Pitch Shifting Lag?
« Reply #6 on: June 24, 2010, 04:45:05 PM »
Supposedly the Whammy uses a PSOLA approach. Something like this can be done in the FV-1. There are also some other tricks to deal with the lag. I have seen code that does this well, but unfortunately it's not my work to divulge.

I haven't done anything with this idea, but the Spin documentation does mention that the JAM opcode can be used to do some kind of autocorrelation which I think is relate to the Whammy approach.


Interesting, I didn't realize that PSOLA was being implemented in effects pedals in general.

-Colin

Taylor

  • Awesome!
  • ****
  • Posts: 4118
  • Total likes: 62
  • The clean energy source of the future.
Re: FV-1 Pitch Shifting Lag?
« Reply #7 on: June 24, 2010, 05:07:23 PM »
Actually, scratch that, according to Sean Costello it's some variant of SOLA:

http://www.diystompboxes.com/smfforum/index.php?topic=29074.msg197182#msg197182

The patent for the Whammy is available if you search USPTO for IVL Technologies. I haven't had time to dig through it, but the answer is there.

puretube

Holy Pitch...
« Reply #8 on: June 24, 2010, 05:34:47 PM »
That "PitchLag" is one of the highlights that make the HOLY STAIN - fuzz (E-H) so unique...  :icon_wink:

CamWylde

Re: FV-1 Pitch Shifting Lag?
« Reply #9 on: June 24, 2010, 06:09:14 PM »
My whammy iv seems to suffer my lag, and my teachers original whammy only has the tiniest bit of it.
Any here experimented with midi devices for the whammy iv?
I'm looking into it. Molten midi do a good one

camwylde

Bard Morons

Re: FV-1 Pitch Shifting Lag?
« Reply #10 on: June 29, 2010, 12:32:09 PM »
I'm curious to see if a better rendition of the pitch shifting can be done... I'm working on it.  I'm also curious to play with some autocorrelation on it's own in some attempts at pitch detection... we'll see.  The theory isn't all that bad... but that's always the case :)

ExpAnonColin

Re: FV-1 Pitch Shifting Lag?
« Reply #11 on: July 04, 2010, 01:39:59 AM »
I'm curious to see if a better rendition of the pitch shifting can be done... I'm working on it.  I'm also curious to play with some autocorrelation on it's own in some attempts at pitch detection... we'll see.  The theory isn't all that bad... but that's always the case :)

Autocorrelation is not a very robust pitch detection technique, especially for polyphonic signals like guitar.

-Colin

ExpAnonColin

Re: FV-1 Pitch Shifting Lag?
« Reply #12 on: July 04, 2010, 01:42:03 AM »
Actually, scratch that, according to Sean Costello it's some variant of SOLA:

http://www.diystompboxes.com/smfforum/index.php?topic=29074.msg197182#msg197182

The patent for the Whammy is available if you search USPTO for IVL Technologies. I haven't had time to dig through it, but the answer is there.

Interesting, I always thought of PSOLA as what he describes as SOLA - eg, "pitch-synchronous overlap-add", not "phase synchronous".

-Colin
« Last Edit: July 04, 2010, 01:44:25 AM by ExpAnonColin »

Taylor

  • Awesome!
  • ****
  • Posts: 4118
  • Total likes: 62
  • The clean energy source of the future.
Re: FV-1 Pitch Shifting Lag?
« Reply #13 on: July 04, 2010, 01:50:09 AM »
Yes, but with larger grain size according to Sean. He's been working this area much longer than I so while he's speculating, I'd defer to him.

I think if you forget the pitch detection and just think about writing the signal into the middle of the delay memory instead of the head, you can get far with that.

Oh, you modified your post after I started writing, so now my post doesn't make sense.  :icon_biggrin:


Jule553648

Re: FV-1 Pitch Shifting Lag?
« Reply #14 on: July 05, 2010, 01:55:25 PM »
Did anybody noticed hissing sound in Reverb - first program? When you hit a string it reverbes than hiss.

In other reverbs(6,7) there is no hiss.

Taylor

  • Awesome!
  • ****
  • Posts: 4118
  • Total likes: 62
  • The clean energy source of the future.
Re: FV-1 Pitch Shifting Lag?
« Reply #15 on: July 05, 2010, 03:13:28 PM »
Yeah, there is some hiss on certain reverbs. One of the knobs in the ROM verb programs is high end response, that should help a bit. What circuit are you using the chip in? Do you have a buffer before it?

Bard Morons

Re: FV-1 Pitch Shifting Lag?
« Reply #16 on: July 07, 2010, 10:19:16 AM »
My apologies, I was doing the pitch detection for some other, independent operations.  In this case it is only partially for pitch shifting... out of curiousity.  And I was certainly not using autocorrelation for polyphonic signals.  I've used autocorrelation before for pitch extraction on monophonic signals hence its appeal to me although it hasn't provided the best results.  I'm always looking for a better way to extract the fundamental if you have insight?  Zero crossing is not the route I want to go and is nearly always what I hear suggested.  There is too much harmonic content for accurate readings so far as I can tell (even when monophonic)... I've never had much luck.  FFT operations appear to be beyond what the FV-1 was designed for.  Given those reasons, I was looking at the autocorrelation.  Perhaps you gentlemen can provide more insight on pitch detection methods?

Edit: Zero crossing would be much more useful if I were to look at the slopes of the crossings... each harmonic, and the fundamental, would possess a different and unique slope.  Correct?  The minimum of such should be the fundamental as it would be the lowest frequency.  I believe that would be true of a sinusoid...
« Last Edit: July 07, 2010, 12:04:50 PM by Bard Morons »

Taylor

  • Awesome!
  • ****
  • Posts: 4118
  • Total likes: 62
  • The clean energy source of the future.
Re: FV-1 Pitch Shifting Lag?
« Reply #17 on: July 07, 2010, 02:01:05 PM »
I don't know if you're already reading the Spin forum, but there's some good info there, and a program was posted here that does a good job of pitch detection:

http://www.spinsemi.com/forum/viewtopic.php?t=161

Bard Morons

Re: FV-1 Pitch Shifting Lag?
« Reply #18 on: July 08, 2010, 08:56:41 AM »
I have indeed been searching through material over there but failed to catch that post.  Thanks!  It's an interesting solution.

ExpAnonColin

Re: FV-1 Pitch Shifting Lag?
« Reply #19 on: July 08, 2010, 10:53:28 AM »
In terms of non-FFT-based monophonic pitch detection methods, I've always felt the best solution was the YIN algorithm:

http://recherche.ircam.fr/equipes/pcm/cheveign/pss/2002_JASA_YIN.pdf

Which, at its core, is well-tuned autocorrelation.

-Colin