Thank you Oscar for this contribution; it's a very helpful external.
I'm curious what else is out there to compare. Is anyone following this thread aware of other granular synthesis externals out there for PD that are worth considering?
what does a granular synthesis patch should offer? i've made a basic one, that offer all mandatory functionalities, but i never manage to be happy with the sound produce. I still don't know if it's only me that did not like granular synthesis, my patch that did not offer enough functionalities, or the sound-file i'm using.
sorry for the large or generic question.
cheers Cyrille
Well, I guess since there's a thread going I should throw something into the mix. Sorry in advance for the lack of documentation, they've been mostly personal projects...
I've been slowly building my own little external library that has a granular external: https://github.com/derekxkwan/dxkpure , which is based on a more basic abstraction fgrainstr2~ that needs fgrain2: https://github.com/derekxkwan/pure-data-abstractions/tree/master/fgrain . I don't really have any demo of it by itself, but I used it to stretch the ambient background noises in this: https://soundcloud.com/dxkzh/airportmusic . You can best hear it at the 1:45 mark.
I tried to model them after what I thought SuperCollider's Warp2 UGen did. I made them to substitute for Warp2 when i was porting a piece of mine from SC to PD, where I'm using attack detection to stretch the sound of a kalimba to 100x its normal duration.
Basically each grain, windowed with either hanning or tukey envelopes in the external version, starts one after the other at semi regular intervals (with a bit of variation to avoid a pitch) and are long enough to overlap each other by some crazy number (64, I think). I tried to make them lower, I think Warp2 does an 8x overlap, but it just didn't sound continuous to me. Each grain's duration is always varied a little bit to avoid a pitch arising from the grain windows. I also randomized their amplitudes. I think it's synchronous granular synthesis?
You basically used them as you would tabread4~. fgrainstr2~ has few options, basically can only change the "grain rate" while in the external you can change the overlap, window type, amount of randomization for transposition, grain size, amplitude, where each grain starts in the soundfile relative to the phasor indexing, hopsize,.... I think that's it.
I'm relatively happy with the sound of them. the external one dxkgrnrd~ glitches a bit compared to the abstraction and I never got the transposition to really sound right...
I guess I do like the sound of granular synthesis. For sounds that aren't pitched, I prefer granular synthesis to phase vocoding. I feel that it's a bit truer to the original timbres of a soundfile (even though attacks gets smeared). I suppose it's because it's using the actual original sound rather than a sine tone resynthesis... I like all those YouTube videos where they take songs that perhaps I wouldn't normally like such as Justin Bieber songs (no offense meant to pd-list Bieber fanatics) and stretch them out something like 1000x times and all of a sudden you have this beautiful, ambient drony soundscape. I forget if they're using granular synthesis or paulstretching though so maybe it's not proper evidence to support me liking granular synthesis... Like any other technique, they can suffer if overused though...
Derek
===================== Derek Kwan www.derekxkwan.com