0
0

The news on the new Designer release (4.25) says:
[quote:1tcudakz]Added granular synthesis support! – Sound instance "Wait for previous" mode is now sample-accurate so sounds are stitched together seamlessly.[/quote:1tcudakz]

I tried making a diesel engine sound that randomly queues very short diesel engine cycles, as in, just a single revolution of the engine about 0.1 seconds long (Sound Instance properties: Start mode: Wait for previous. Loop mode: Oneshot; Play mode: RandomNoRepeat).

However, I can’t seem to make the samples queue seamlessly because the sound won’t repeat if Spawn Time is set to 0,0. It has to be set to at least 0,1 – and this introduces a 0-1 millisecond gap between the samples.

  • You must to post comments
0
0

Hi Peter,

Sounds like most of your setup is correct.

What is your maximum spawned sounds set to? Try setting it to at least 2, which causes FMOD to queue a few of the samples.

If that doesn’t work, you might have to make the samples a little bigger….which isn’t really granular, but I think the issue is caused by a lack of precision in the spawning timing (I believe it’s not a guaranteed 1ms, and somewhat dependent on the update() frequency).

Let me know how this goes.

cheers,
Templar

[quote="Skaven":225t7fpg]The news on the new Designer release (4.25) says:
[quote:225t7fpg]Added granular synthesis support! – Sound instance "Wait for previous" mode is now sample-accurate so sounds are stitched together seamlessly.[/quote:225t7fpg]

I tried making a diesel engine sound that randomly queues very short diesel engine cycles, as in, just a single revolution of the engine about 0.1 seconds long (Sound Instance properties: Start mode: Wait for previous. Loop mode: Oneshot; Play mode: RandomNoRepeat).

However, I can’t seem to make the samples queue seamlessly because the sound won’t repeat if Spawn Time is set to 0,0. It has to be set to at least 0,1 – and this introduces a 0-1 millisecond gap between the samples.[/quote:225t7fpg]

  • You must to post comments
0
0

[quote="Templar":3dp7767x]What is your maximum spawned sounds set to? Try setting it to at least 2, which causes FMOD to queue a few of the samples. [/quote:3dp7767x]
This kind of works, but I then actually get two overlapping sounds, where I just want one neat seamless single-channel queue of short sound snippets, laid one after another gaplessly. And the 0-1 millisecond random delay is still there because at 0,0 no queueing happens.

[quote:3dp7767x]If that doesn’t work, you might have to make the samples a little bigger….[/quote:3dp7767x]
The diesel truck engine cycles are about 190 ms long each.

[quote:3dp7767x]which isn’t really granular, but I think the issue is caused by a lack of precision in the spawning timing (I believe it’s not a guaranteed 1ms, and somewhat dependent on the update() frequency).[/quote:3dp7767x]
I may have misunderstood the concept actually. This granular synthesis you speak of can be used to create a "carpet" of short random sounds by occupying a few channels (2-4).

… whereas what I wanted was wat I stated above: a single-channel gapless queue of clips.

But speaking of granular synthesis, the FL Studio Granulizer has a pretty neat feature: it can select a random offset within a looping sample and fade it in and out (at user adjustable speed), and play these random bits in an evenly laid 4-channel "carpet".

That this does, is that if you have a really short and repetitive rain sample (for example), it can randomly arrange it into an endlessly non-repetitive rain carpet, without you having to create 20 short snippets out of the sample (which I suppose is good for memory granularity). Best of all, you can adjust the density of these grains to change the intensity of the rain.

But maybe that’s a tad fancy for game middleware. :)

  • You must to post comments
0
0

Here, I made a little example:

[url=http://www.futurecrew.com/skaven/share/fmod.org/flstudio_granulizer_rain_example.mp3:3ctcx6sn]FL Studio Granulizer rain example.mp3[/url:3ctcx6sn]

The first 6 seconds is the looping mono rain sample played as it is. You can hear the repetition.

After this, the sample is played through the FL Studio Granulizer, which picks random offsets within the loop, fades them in and out (with some 4 spawned sounds playing simultaneously at even intervals), and pans them evenly in stereo. The "grain spacing" (aka "spawn intensity") can be adjusted to make the rain more or less intense, you can hear an example of the tweaking after a while.

And all this, from a very short mono sample ie a small memory footprint. It’s also easy to manage as you don’t need to create 20 random faded bits out of the loop, just a single looping sample is enough (and in mono at that ), and Granulizer does the random picking for you. I doubt this uses too much CPU either?

The diesel engine could be made to work like this as well. Instead of queueing short clips (which can cause buffering problems), why not just skip within a single sample? The jump points need to be determined (WAV markers?), but anyway I presume this would be more CPU efficient than using separate samples?

  • You must to post comments
0
0

Hi Peter,

By any chance could you send your diesel engine .fdp and samples to support@fmod.org? It seems a little odd that you are getting overlap between the samples. I’d like to take a look at your project, and see if the setup is ok.

cheers,
Templar

P.S. I’ll add your idea to the feature suggestion thread.

  • You must to post comments
0
0

[quote="Templar":2sar13a8]By any chance could you send your diesel engine .fdp and samples to support@fmod.org? [/quote:2sar13a8]
Done. :)

  • You must to post comments
Showing 5 results
Your Answer

Please first to submit.