• Welcome to PiBoSo Official Forum. Please login or sign up.
 
April 24, 2024, 04:45:46 PM

News:

GP Bikes beta21c available! :)


Sound: granular synthesis

Started by HornetMaX, February 17, 2015, 09:00:05 AM

Previous topic - Next topic

HornetMaX

[This is mostly for Warlock, but others may be interest in reading/replying]

Hi all,

while finishing the editor for the .scl file I've also taken a look at what Warlock mentioned in terms of audio tool to create good samples from a recording of a real bike.
He said that what in the audio world is known as"Granular Synthesis" looks promising. So I took a look.

As far as i can see, there's absolutely noting magical in granular synthesis, it's just a fancy name  ;D
It boils down to this:

  • Select a part of your sample (can be fairly small): that's what is called a "grain".
  • Apply a volume envelope to it so that you can loop it with no glitches.
  • Loop-play the "shaped" grain allowing to alter the pitch in real time (and eventually to alter the grain size and the volume envelope too).

So now I'm fairly tempted to code this just for the fun of it :)

MaX.

r1rossi

Please do!,

Looking forward to what comes out of this!

Hawk

I presume this(grain) would allow an expansion/manipulation/development on a small sound sample, enabling the producer to manipulate a small sound sample(grain) into a larger sound sample that they are looking for? Maybe to fill out a part of the whole sample that a particular sound is missing? Hope you understand what I'm trying to explain?  :)

Hawk.

HornetMaX

Quote from: Hawk_UK on February 17, 2015, 01:52:19 PM
I presume this(grain) would allow an expansion/manipulation/development on a small sound sample, enabling the producer to manipulate a small sound sample(grain) into a larger sound sample that they are looking for? Maybe to fill out a part of the whole sample that a particular sound is missing? Hope you understand what I'm trying to explain?  :)
From what I've seen and from what Warlock has said, the idea would be this:

  • We start from a real life sample, ideally of the bike on a dyno, standing at idle for a few seconds, then revving up in gear (throttle wide open).
  • That sample can not be used directly in GPB, because it's not at constant RPMs. The granular stuff is what allows us to "extract" a sub-sample from the large sample: if the sub-sample is small enough (short in time), we can consider (hopefully) that the RPMs are near constant.
  • All is left is to make the sub-sample loopable smoothly.
  • Basic process flow would be:

    • Open the large sample, find a convenient place in it and select the sub-sample (raw grain) selecting a range in the sample.
    • Select a volume envelope to be applied to the raw grain to get the final grain (I leave some details out here). Typically the envelope goes volume 0 --> 1 --> 1 --> 0 (fade-in / constant / fade-out).
    • Play the grain in loop and adjust it while playing: you can adjust (in principle) where the grain starts and stops (the selection), the volume envelope parameters (fade-in/out) and the pitch.

If all this works well then we could create the samples we need from a pair recordings (one revving up throttle fully open, one revving down throttle fully closed) instead of having to fetch multiple samples at different RPMs.

Note: at the moment I'm still looking around to assess how feasible this would be for me. It looks doable but I can't grant anything right now.

MaX.

BOBR6 84

still got lots of prep to do with my bike but its getting there.. once its all sorted il look at getting on the dyno with the equipment ''H'' pointed out..

no motogp bike lol but would be good to test..

(short rant lol im slightly put off spending money on this.. especially after recent events  ::))

Hawk

Quote from: HornetMaX on February 17, 2015, 02:06:03 PM
Quote from: Hawk_UK on February 17, 2015, 01:52:19 PM
I presume this(grain) would allow an expansion/manipulation/development on a small sound sample, enabling the producer to manipulate a small sound sample(grain) into a larger sound sample that they are looking for? Maybe to fill out a part of the whole sample that a particular sound is missing? Hope you understand what I'm trying to explain?  :)
From what I've seen and from what Warlock has said, the idea would be this:

  • We start from a real life sample, ideally of the bike on a dyno, standing at idle for a few seconds, then revving up in gear (throttle wide open).
  • That sample can not be used directly in GPB, because it's not at constant RPMs. The granular stuff is what allows us to "extract" a sub-sample from the large sample: if the sub-sample is small enough (short in time), we can consider (hopefully) that the RPMs are near constant.
  • All is left is to make the sub-sample loopable smoothly.
  • Basic process flow would be:

    • Open the large sample, find a convenient place in it and select the sub-sample (raw grain) selecting a range in the sample.
    • Select a volume envelope to be applied to the raw grain to get the final grain (I leave some details out here). Typically the envelope goes volume 0 --> 1 --> 1 --> 0 (fade-in / constant / fade-out).
    • Play the grain in loop and adjust it while playing: you can adjust (in principle) where the grain starts and stops (the selection), the volume envelope parameters (fade-in/out) and the pitch.

If all this works well then we could create the samples we need from a pair recordings (one revving up throttle fully open, one revving down throttle fully closed) instead of having to fetch multiple samples at different RPMs.

Note: at the moment I'm still looking around to assess how feasible this would be for me. It looks doable but I can't grant anything right now.

MaX.

That technique is very interesting and I will be fascinated to see how this works out.

Thanks Max. ;)

Hawk.

Warlock

February 18, 2015, 02:32:43 PM #6 Last Edit: February 18, 2015, 08:40:45 PM by Warlock
Would be great Max, but not sure if its that easy that is just a loop
Some texts i found around , is difficult for me to understand all they say, maybe you found it easy  :)

http://en.wikipedia.org/wiki/Granular_synthesis

http://www.sfu.ca/~truax/gran.html

http://www.pd-tutorial.com/english/ch03s07.html

HornetMaX

Quote from: Warlock on February 18, 2015, 02:32:43 PM
Would be great Max, but not shure if its that easy that is just a loop
Some texts i found around , is difficult for me to understand all they say, maybe you found it easy  :)

http://en.wikipedia.org/wiki/Granular_synthesis

http://www.sfu.ca/~truax/gran.html

http://www.pd-tutorial.com/english/ch03s07.html

Yeah, the next step is to have multiple grains and play them "in sequence" (here too I'm simplifying).
But the 1st part (get a grain, make it loopable) is the one I'm (I was) more concerned about.

MaX.

Warlock

Cool,  man if you think its worth the time and work it will need, go ahead. We will be glad to receive it as a gpb sound tool for sure.
Also people would be less scared to try making a good sound, as things will become much easier with a loop tool we can use with just one engine recording, and the scl editor you are working on. Thank you

Anyway the produced sound will need to be tuned in a sound software because, (don't now what gpb does to it) it will sound very different ingame.

HornetMaX

Quote from: Warlock on February 18, 2015, 07:23:06 PM
Cool,  man if you think its worth the time and work it will need, go ahead. We will be glad to receive it as a gpb sound tool for sure.
Also people would be less scared to try making a good sound, as things will become much easier with a loop tool we can use with just one engine recording, and the scl editor you are working on. Thank you
I'll likely have a break from coding as soon as I'm done with the scl tool. But the loop tool is an interesting challenge.
All the stuff I do in GPB I do it because it helps other players/modders and because doing it I learn plenty of stuff.

Quote from: Warlock on February 18, 2015, 07:23:06 PM
Anyway the produced sound will need to be tuned in a sound software because, (don't now what gpb does to it) it will sound very different ingame.
In my .scl tool, when I "play" the .scl, it sounds fairly close to how it sounds in GPB. So I guess this will help you a lot.

MaX.