# 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).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hwlab.learndsp.org/voice-transformers/granular-synthesis.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
