0
0

I am trying to set up a sound that plays random thunderclaps in a random 3D position, with a delay between each sample of between 4 and 15 seconds. I don not want to change the volume of the thunderclaps beyond a small variation that I can set on the sound definition.

I have one sound definition containing 6 samples. The sound definition has a spawn time of between 4 and 15 seconds. The maximum spawned sounds is set to 1. This sound definition is then triggered by a oneshot event (for which the oneshot parameter is set to ‘no’ so that the repeating sound definition will work).

My first problem is that while the spawning times work correctly, my samples are all cut off before they are finished. Are the spawn time values timed from the start of a sound definition, or between one instance of the sound definition finishing (when the sample has played out) and the next starting? The latter is what I am hoping – and it’s how the system is behaving, apart from the samples being cut off. What I mean is that there is a time of between 4 and 15 seconds [i:3k0jyggn]between the sample cut off and the next one playing[/i:3k0jyggn].

My second problem is that I cannot seem to randomise the pan position without also affecting the volume of the sound. If I set a random 3D position on the sound definition, it seems to spawn each one in a random position within the radius I set. I need to be able to have a random 3D pan position without affecting the volume. I tried setting the event to 2D, but this loses the random 3D information set in the sound definition, as is reasonable to expect.

What I need is a random PAN option rather than a random POSITION option. I am already able to randomly affect volumes independently, but I can’t see a way of just affecting pan. Is this achievable with the current system?

  • You must to post comments
0
0

I have a kind of workaround for my second problem. I have set the rolloff to linear, and set the minimum distance to the same value as the 3D randomisation parameter on the sound definition. This way, the volume within the allowable range for sound definitions to be spawned is always 100%.

Perhaps we need two flags for 3D events – one that causes volume to be ignored (i.e. events play at full volume regardless of position), and one that causes 3D position to be ignored (events play with central panning but with volume calculated from the 3D position).

Still getting samples cut off in the spawning sound definition though.

  • You must to post comments
0
0

I have now realised that the spawn time seems to be calculated from the START of an instance. So if my samples are between 6 and 10 seconds long, my spawn time needs to be at least 10 seconds PLUS my random deviation settings.

Perhaps an option to start spawn timings from the start OR the end of a spawned instance?

I have however just tried greatly increasing the spawn time so that it is significantly longer than the longest sample in the sound definition… and samples are still getting cut off, even when the max spawn count is 2 or more.

Going to stop posting now 😉

  • You must to post comments
0
0

[quote="PeteWard":3js0rfyu]I am trying to set up a sound that plays random thunderclaps in a random 3D position, with a delay between each sample of between 4 and 15 seconds. I don not want to change the volume of the thunderclaps beyond a small variation that I can set on the sound definition.

I have one sound definition containing 6 samples. The sound definition has a spawn time of between 4 and 15 seconds. The maximum spawned sounds is set to 1. This sound definition is then triggered by a oneshot event (for which the oneshot parameter is set to ‘no’ so that the repeating sound definition will work).
[/quote:3js0rfyu]
This sounds like the right way to do it.

[quote="PeteWard":3js0rfyu]I have now realised that the spawn time seems to be calculated from the START of an instance. So if my samples are between 6 and 10 seconds long, my spawn time needs to be at least 10 seconds PLUS my random deviation settings.
[/quote:3js0rfyu]
This is how spawn times are intended to work. There was a bug that caused them to work the way you originally thought when max playbacks = 1. This has been fixed in the most recent development release:
[quote="revision.txt 4.15.04":3js0rfyu]
– Event API – Fixed incorrect sound definition spawn behaviour when "Maximum spawned sounds" has been reached
[/quote:3js0rfyu]

[quote="PeteWard":3js0rfyu]
Perhaps an option to start spawn timings from the start OR the end of a spawned instance?
[/quote:3js0rfyu]
We will consider this for a future release.

[quote="PeteWard":3js0rfyu]
What I need is a random PAN option rather than a random POSITION option. I am already able to randomly affect volumes independently, but I can’t see a way of just affecting pan. Is this achievable with the current system?[/quote:3js0rfyu]
We will look into adding a random pan option for sound definitions in a future release.

[quote="PeteWard":3js0rfyu]I have a kind of workaround for my second problem. I have set the rolloff to linear, and set the minimum distance to the same value as the 3D randomisation parameter on the sound definition. This way, the volume within the allowable range for sound definitions to be spawned is always 100%.

Perhaps we need two flags for 3D events – one that causes volume to be ignored (i.e. events play at full volume regardless of position), and one that causes 3D position to be ignored (events play with central panning but with volume calculated from the 3D position).
[/quote:3js0rfyu]
You can also set the 3D rolloff to custom. This will disable distance attenuation for that event.

[quote="PeteWard":3js0rfyu]
I have however just tried greatly increasing the spawn time so that it is significantly longer than the longest sample in the sound definition… and samples are still getting cut off, even when the max spawn count is 2 or more.
[/quote:3js0rfyu]
This sounds like a bug, probably unrelated to the spawn time (spawning should never cut off playing sounds). Can you email support@fmod.org with a simple project (FDP and audio files) that demonstrates the problem? Just put a link to this thread in the email so we know what’s what :-)

Thanks,
Ben

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.