0
0

Hi all,

we have some issues in implementing an engine sound in a motorbike game (we are using Fmod Studio 1.0.3 – 42909)
We built the engine using a standard approach: the engine of the motorbike is an event made by 4 cross-faded samples; cross-fades are clearly depending on the rpm value passed by the physics engine of the game. No load parameter has been applied for the moment. The engine is pitched not with the "autopitch" function, but with a pitch modulation based also on the rpm. The sound is 3D, but no reverb or lowpass filtering is applied.

The engine of our bike is correctly played when a limited number of instances is played: for example, we noticed no problem with 1 – 10 motorbikes running, while when activating 15 instances of the engine sound disappears several times, in particular in the rpm ranges corresponding to the crossfades between samples. It seems like the current-playing samples decreases correctly in volume accordingly to the cross-fade, but actually the next-to-trigger sample is not triggered, thus resulting in a fade to silence of the current-playing sample, and not in a cross-fade.

To be honest, we also have some minor clicks also with a few instances, but maybe this is related to the absence of any modulation (like an ADSR with a non-zero attack\release time) for each sample of the event.

We already checked the following:
– Every sample is looping and it’s never silent;
– Every motorbike has its own event instance, so we’re not sharing a single event between the motorbikes;
– The rpm parameter is correctly updated, and the parameter range is coherent both in the game and in Fmod;
– We tried to solve the problem deactivating the "steal voice" option in the event macro menu and by raising the number of voices to infinite and the priority of the event to highest, but with no result.

We also tried a more complex engine event with load, reverb and lowpass, and we found the same cross-fade issue.
Moreover, we also noticed a strange behaviour in the distance attenuation curve. By selecting the first curve on the second row (the one above the "off" label), given a certain listener point in the space, increasing the maximum distance results in attenuating the volume at that point, while decreasing the maxDist results in increasing it. The other three attenuation curves work the opposite way, correctly in our opinion (maybe it’s a desired behavior but we couldn’t find it in the manual).

Do you have any suggestion about how to fix the engine?

Thank you in advance for your time and attention, best regards

SalvoFid & LucaPic

  • You must to post comments
0
0

[quote:tex62p8r]we are using Fmod Studio 1.0.3[/quote:tex62p8r]
First off, I recommend that you update to the latest version – there have been many fixes since 1.0.3, including several fixes for cross-faded samples.

[quote:tex62p8r]The engine of our bike is correctly played when a limited number of instances is played: for example, we noticed no problem with 1 – 10 motorbikes running, while when activating 15 instances of the engine sound disappears several times, in particular in the rpm ranges corresponding to the crossfades between samples. It seems like the current-playing samples decreases correctly in volume accordingly to the cross-fade, but actually the next-to-trigger sample is not triggered, thus resulting in a fade to silence of the current-playing sample, and not in a cross-fade.[/quote:tex62p8r]
This sounds like you may be running out of real channels. Each sample that is played requires a real channel, and if there are no real channels available the sample will go virtual and be silent. You can set the number of real channels using the low level System::setSoftwareChannels function as follows:
[code:tex62p8r]
FMOD::Studio::System system;
FMOD::System* lowLevelSystem = NULL;
ERRCHECK(system.getLowLevelSystem(&lowLevelSystem));
ERRCHECK(lowLevelSystem->setSoftwareChannels(128));
[/code:tex62p8r]
FMOD uses 64 real channels by default; can you try increasing this to 128 (as shown) or more?

  • You must to post comments
0
0

Hi Ben,
we tried to increase the real channels to 256 using the 1.0.3 but nothing changed… after that, we tried with the latest version 1.01.03 (we have rebuild the same fmod project) and the problem is still present.
Moreover, we noticed that there are performance problems with the latest version. I profiled the FMOD::Studio::System::update (1 per frame) and the FMOD::Studio::ParameterInstance::setValue (called every frame on about 20 instances). With the old version we have, respectively, 0.5 ms and 0.8 ms, but with the new version we have 1-3 sec. After that I used an external profiler and it is returning FMOD::ChannelControl::get3DConeSettings as the most time consuming method (9.27 sec on 9.81 total profiling session).

note: we are using fmodL/fmodstudioL
Thanks again.

  • You must to post comments
0
0

fmodL/fmodstudioL are ‘logging’ versions and are significantly slower based on how much they are logging.

If it’s logging that much (1 second per frame) you might want to check the logs and see why it has to write so much as well.

  • You must to post comments
0
0

Thanks,
I thought could be a logging problem but I haven’t seen the fmod.log file. It is continuously writing SpeakerLevelsPool::alloc and SpeakerLevelsPool::free. Why?
The cross fade problem is still present.
Bye, Salvo

  • You must to post comments
0
0

Hi Salvo,

You can change the amount of logging using the FMOD_Debug_SetLevel function, the speaker level pool allocs are ‘info’ and not particularly useful.

[code:20tipvvn]FMOD_Debug_SetLevel(FMOD_DEBUG_LEVEL_WARNING | FMOD_DEBUG_LEVEL_ERROR);[/code:20tipvvn]

  • You must to post comments
0
0

Ok, done…
but after a while (with the same cross-fade problem and software channels set to 128), calling SetParamValue I have this error:
[quote:2rjzu649]FMOD error 44 – Not enough memory or resources[/quote:2rjzu649]
and in the fmod.log :
[quote:2rjzu649]DSPFader::addFadePoint : Error! Fade point limit exceeded, contact support![/quote:2rjzu649]
so, here we are :-) support contacted 😀
Bye, Salvo

  • You must to post comments
0
0

Hi Salvo,

Please send an email through to support@fmod.org so we can get more information about your usage, and determine the cause of the issue.

  • You must to post comments
0
0

For anyone watching this thread, the fade point limit issue should be fixed in the next release. We’re still investigating the crossfade dropout issue.

  • You must to post comments
Showing 8 results
Your Answer

Please first to submit.