> For the complete documentation index, see [llms.txt](https://holy-city-audio.gitbook.io/spincad-designer/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://holy-city-audio.gitbook.io/spincad-designer/blocks/pitch/the-pitch-offset-blocks.md).

# The Pitch Offset Blocks

These two blocks can be found in the "Pitch" menu. &#x20;

<figure><img src="/files/2O5y4lwGFjhdG4pw4Ngw" alt=""><figcaption></figcaption></figure>

These blocks implement the algorithm found [here ](http://spinsemi.com/knowledge_base/effects.html#Pitch_shifting)at the Spin Knowledge Base.  This is something called a "Hilbert Transform" and I don't intuitively understand how it works, or else I'd try explaining it.  As described in the article, a bandpass filtered signal is run through a phase shift and multiplied by a sine and cosine at the pitch offset frequency.  The result is that frequency components are offset by a fixed amount rather than by a percentage as in the traditional pitch shifter which maintains harmonic relationships.

So, supposing the input signal  has components at:

* 100 Hz
* 200 Hz
* 300 Hz

If the pitch offset is 10 Hz, we'll get:

* 110 Hz
* 210 Hz
* 310 Hz

The "3rd harmonic" is 20 Hz flat!  Clearly this is not the effect to use when you are after beauty - or is it?  According to[ the code sample](http://spinsemi.com/knowledge_base/pitch_sft.html), this offsets up or down by up to 370 Hz.

The secret to this block is that "zero" offset occurs with a control input level of 0.5.  Above 0.5 offsets down while below 0.5 offsets upwards. &#x20;

<figure><img src="/files/AtXqi2i7rTvrRP6vnaxo" alt=""><figcaption></figcaption></figure>

Now you can get goofy sci-fi sounds by exploiting the full range directly, or you can put the pitch offset in the feedback loop of a delay, to get a different kind of sci-fi sound.

<figure><img src="/files/txk1ZR9DwF5R4bH5V8SD" alt=""><figcaption></figcaption></figure>

I discovered that you can also get a beautiful sort of tremolo/chorus sound by scaling the control signal way down so that the variation around 0.5 is very small, i.e. 0.49 to 0.51.   This is easily accomplished by setting the Scale/Offset as shown:

<figure><img src="/files/HzL4tGdC28jvN2ZfDtk1" alt=""><figcaption></figcaption></figure>

You can run this in stereo or summed to mono.  Each one is a unique sound.

One drawback of this block is that it uses a LOT of registers and instructions.  For the dual-output block, I had to have them share the input filter so you can't really get totally separate processing, but you can do things like this:

<figure><img src="/files/YLK8aO9UuRyFqq29EhCY" alt=""><figcaption></figcaption></figure>

Check out the linked [SpinCAD Bank file](https://github.com/HolyCityAudio/SpinCAD-Designer/blob/master/patches/pitch-shifter-examples.spbk) for these patches and a few more.  Click on the "Download" button as shown.

<figure><img src="/files/uwtnpbfx0upUCr7SccRS" alt=""><figcaption></figcaption></figure>

What can you come up with?
