> For the complete documentation index, see [llms.txt](https://hwlab.learndsp.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hwlab.learndsp.org/voice-transformers/granular-synthesis.md).

# Granular Synthesis

We will now implement the second voice transformation method described in the Jupyter notebook, namely pitch shifting via *granular synthesis*.&#x20;

While the alien voice transformer simply alters the quality of the voice, with a pitch shifter we will be able to move the perceived pitch of the speaker either down (to create a "Darth Vader" sound) or up (to create a "Chipmunks" voice).

We recommend you study the relevant section on the notebook carefully before proceeding, since the algorithmic details are going to be a bit trickier than what we have seen so far; please make sure you understand the theory and that you are comfortable with the offline implementation before tackling the real-time version of the transformer.&#x20;

May the Force be with you!

```
                                   _.-'~~~~~~~~~~~~`-._
                                  /         ||         \
                                 /          ||          \
                                |           ||          |
                                | __________||__________|
                                |/ -------- \/ ------- \|
                               /     (     )  (     )    \
                              / \     ----- () -----    / \
                             /   \         /||\        /   \
                            /     \       /||||\      /     \
                           /       \     /||||||\    /       \
                          /_        \o=============o/        _\
                            `--...__|`-._       _.-'|__...--'
                                    |    `-----'    |
```

*Figure: Modified from* [here](http://www.ascii-art.de/ascii/s/starwars.txt).
