Granular Synthesis

DSP related issues, mathematics, processing and techniques
Post Reply
User avatar
Spogg
Posts: 3368
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England
Contact:

Granular Synthesis

Post by Spogg »

A friend in our community asked me to explain about granular synthesis and how my Quilcom Harvester goes about it.

So here’s my brief summary…


Every grain player (wave player) has the whole wave file loaded; all of it.

The bit you want to hear is addressed and read out by the wave player’s index value.

If you start at index=0 and run to index=end, at sample rate, you hear the whole wave file at the original pitch, as recorded.

Now, by setting the index start and end positions to shorter values within the wave file’s range, you can play just a section of the file; a “grain”.

By changing the count rate of the index you alter the pitch.

If you count down instead of up the grain plays backwards.

If you keep a constant range of index values but change the offset, and keep repeating the grain, you can scan the file faster or slower than the original recorded time. For example the index could go from 100 to 200 then the next cycle would be 101 to 201, then 102 to 202 and so on. In this example it would take 100 cycles to completely move on to 200-300. The pitch would be correct (at the original sample rate) but the speed would be slow.

Granular synthesis comes into its own when you have several grains playing close together, apart, or randomly, as in my Harvester.

Another thing to think about is cross-fading between playing successive grains. This is to avoid clicks on non-zero crossings. I used a sample accurate AHD envelope for this.

For changing the musical pitch (count rate for the index value) you need to interpolate between individual samples since most pitches will involve non-integer values for the index.

------------------------------------------------------------------------------------------------------------------------------

If anyone wants to add to this, or can offer better or different methods, or even ASM optimised stuff, this might become a useful topic for me and others. My intention is to re-visit granular synthesis and/or wavetable synthesis at some point, so any offerings I would greatly welcome.



Cheers


Spogg
User avatar
rocknrollkat
Posts: 213
Joined: Mon Jan 04, 2016 7:04 pm
Location: Oakland Gardens, New York City, U.S.A.
Contact:

Re: Granular Synthesis

Post by rocknrollkat »

Hi Spogg,
Excellent article, well thought through and well presented.
You really spell it out, especially for people just getting into synthesis.
It would be interesting to hear your thoughts on granular synthesis compared with sampling and 'rompling', since all three tend to cross each others' boundaries.
If Flowstone had a dictionary (and it should), this article would be the entry for Granular Synthesis.

ROXY :D
Jay
Posts: 276
Joined: Tue Jul 13, 2010 5:42 pm

Re: Granular Synthesis

Post by Jay »

Nice tips there Spogg! i recently upgraded my Reason daw to version 10, it comes with a granular sampler "Grain Sample Manipulator" it is one of the best granular synths i have ever played, you should give it a wee hurl if you get the chance m8, lovely! great at getting some very usable sounds really fast just from dropping any old sample onto it and tweaking a little! here is an image of it -

grain.png
grain.png (241.68 KiB) Viewed 24872 times


Cheers for the article

Best regards - Jay
User avatar
Spogg
Posts: 3368
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England
Contact:

Re: Granular Synthesis

Post by Spogg »

Thanks Jay!

Great products like Grain highlight the difference between my hobby-grade work and proper professional output. I still have fun experimenting with various techniques though, and often a commercial product has stimulated my interest in messing around to see what I can come up with.

Cheers

Spogg
tulamide
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Granular Synthesis

Post by tulamide »

Spogg wrote:Thanks Jay!

Great products like Grain highlight the difference between my hobby-grade work and proper professional output. I still have fun experimenting with various techniques though, and often a commercial product has stimulated my interest in messing around to see what I can come up with.

Cheers

Spogg

You sell yourself short! The audio engine is pretty much on par with grain. It's only the GUI, that makes it look unprofessional.
"There lies the dog buried" (German saying translated literally)
User avatar
Spogg
Posts: 3368
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England
Contact:

Re: Granular Synthesis

Post by Spogg »

Thanks tulamide!

I do try to make my stuff sound as good as I can.

The GUI is always my Achilles heel but also we don't yet have drag-and-drop and I do think that would really improve usability.

Cheers

Spogg
Post Reply