• Welcome to PiBoSo Official Forum. Please login or sign up.
 
April 28, 2024, 08:38:01 AM

News:

World Racing Series beta14 available! :)


Intensity of the throttle affects sounds

Started by Eagle, January 11, 2015, 09:04:35 AM

Previous topic - Next topic

h106frp

Could it be a mechanism to shorten the playback time length of the sample without altering the pitch?, ie the bike is accelerating faster than the normal loop time of the original sample

HornetMaX

Quote from: HornetMaX on January 18, 2015, 10:53:52 AM
Hmmm ... there's something that puzzles me: within a sample, knowing only RefPitch, MinPitch and MaxPitch (plus MaxValue, of course), I can calculate the start and end point of the sample (i.s. the value of point0 and pointN, N being the last point in the sample).

Why would one be able to change independently Min/MaxPitch and the start/end value of sample ?

Quote from: h106frp on January 18, 2015, 12:44:20 PM
Could it be a mechanism to shorten the playback time length of the sample without altering the pitch?

No, I doubt it would have this as an effect.

Quote from: h106frp on January 18, 2015, 12:44:20 PM
ie the bike is accelerating faster than the normal loop time of the original sample

The time length of the sample has no importance as when you change the pitch (depending on the bike rpms), the "length" is changed too (as changing the pitch means in fact changing the "speed" at which you play the sample).

MaX.

HornetMaX

I'm making progress on the tool.

I'm not 100% sure it will be able to play the sounds properly, but even if it only shows visually what the .scl does, it will be of great help: opening various .scl of mod bikes I'm seeing some pretty crazy stuff (plenty of missing samples, plenty of weird layouts) ...

MaX.

Warlock

No problem Max, .scl file is the most annoying part to adjust and write, so it will be a great help anyway.

Also it will improve that crazy stuff you are seeing. Kind of normal when doing all manually.
About missing samples , i often use the same sample for different pitches, so when working on the sound i can add a mid step just copying, editing the sample and chage the name in the .scl

For example , i use the same onLow.wav for onVeryLow , onLow , onMid and make the  scl.
At any point i can duplicate onLow.wav, edit the sound (bass, treble, for example), and save it as onMid.wav , and just change the name of the sample in the .scl.
This way i don't have to redo all the .scl if i want to add a step.

HornetMaX

Quote from: Warlock on January 20, 2015, 02:25:41 PM
About missing samples , i often use the same sample for different pitches, so when working on the sound i can add a mid step just copying, editing the sample and chage the name in the .scl
That's OK, but what I'm seeing are really missing samples: the .scl references (for example) M1_onidle.wav and the file does not exist.  :o

Not to talk about the fade-out fade-in of two consecutive samples ...I've seen some ... hmmm ... creative stuff :)

MaX.

HornetMaX

Hehe, a bit of spare time and things are coming together nicely: I can "play" the scl  in my app !!

At the moment I have two sliders, one for throttle and one for RPM, and they don't interact (i.e. you open the throttle, the RPM stay constant), but that should be easy to solve.
I'm very very pleased, the "audio" part was the one I had more doubts on.

I'll just add now ways to manipulate the values of the .scl (show them in a table, maybe interact with the graphs, dragging stuff around) and the "simulation" of the engine/bike dynamics.



MaX.

Hawk

This is looking good Max! Will this be able to mix the sounds? Or is it for sound volume adjustments? Or both?

Nice job so far mate!  ;D

Hawk.

HornetMaX

Quote from: Hawk_UK on January 21, 2015, 04:30:56 PM
This is looking good Max! Will this be able to mix the sounds? Or is it for sound volume adjustments? Or both?
I'm not sure what you mean with "mix the sounds".

The tool will NOT help you in creating good samples. However it will allow you to:

  • alter the .scl file: probably via an integrated mini-editor and some smart manipulations of values (e.g. "rescale" an entire .scl, manage the fade-out/fade-in of samples etc
  • see visually what the .scl does (the 1st of the 3 graphs above shows how the different samples in the .scl are "connected" together.
  • "play" the .scl: this means that you will control the throttle (via a slider, maybe via the joypad/joystick) and you will hear the engine sound, more or less just like in GPB when the bike is in neutral.

On the last point:

  • I coud do very fancy things like having positional audio (the library I use to play the sounds uses openAL, just like GPB)
  • I could simulate real engine load : for that I would have to read also the bike.cfg and engine.cfg files (plus simulate the physics behind all that). I'm still pondering if that's really needed, most likely I'll settle for a 1st version that only simulates the engine in neutral and then see if that's not already enough.

MaX.

Hawk

January 22, 2015, 11:18:03 AM #53 Last Edit: January 22, 2015, 11:21:34 AM by Hawk_UK
Quote from: HornetMaX on January 22, 2015, 08:01:53 AM
Quote from: Hawk_UK on January 21, 2015, 04:30:56 PM
This is looking good Max! Will this be able to mix the sounds? Or is it for sound volume adjustments? Or both?
I'm not sure what you mean with "mix the sounds".

The tool will NOT help you in creating good samples. However it will allow you to:

  • alter the .scl file: probably via an integrated mini-editor and some smart manipulations of values (e.g. "rescale" an entire .scl, manage the fade-out/fade-in of samples etc
  • see visually what the .scl does (the 1st of the 3 graphs above shows how the different samples in the .scl are "connected" together.
  • "play" the .scl: this means that you will control the throttle (via a slider, maybe via the joypad/joystick) and you will hear the engine sound, more or less just like in GPB when the bike is in neutral.

On the last point:

  • I coud do very fancy things like having positional audio (the library I use to play the sounds uses openAL, just like GPB)
  • I could simulate real engine load : for that I would have to read also the bike.cfg and engine.cfg files (plus simulate the physics behind all that). I'm still pondering if that's really needed, most likely I'll settle for a 1st version that only simulates the engine in neutral and then see if that's not already enough.

MaX.

Well it seems to me(if I understand this correctly) that each layer is acting like a separate sound channel?
Would it be possible to have each channel(Layer) in a separate graph chart, and be able to select/cut/copy/paste sections of the sound wave in those channel graphs and also to be able to adjust the volume/length of any selected sections of the sound wave? Maybe "Bullet one" in your post above will allow a similar end result?

If I understand you correctly on the simulation of the real engine load: I presume that would enable you to play back the sound under different engine loads? If so then I think this would be very useful in obtaining an accurate engine sound throughout the range of sounds during different engine loads(If I understand you correctly on this?). This would in my mind be very useful in creating engine sounds how you want them.
Also to be able to play back the separate channels independently, and also to be able to play back all channels combined(like a final sample(end result) playback function).

But yeah. This is what I mean by being able to mix the sounds so that we could take basic sound sample/s and alter and combine sounds from that sample/s to create a final sound we want by using different channels and combining them by using the fade-in/fade-out and time scales for that process.

Not sure if this is possible, but just some thoughts to mull over.  ;)

Your doing a great job there Max!  ;)


Hawk.

PS: Just a thought on the subject of engine sounds: Seems to me that there should be two different engine sound files implemented into GPB for a future release, because the sound of a bike engine you hear when your riding the bike is totally different to hearing the engine sound from say a spectators point of view.
I have heard a two stroke engine sound in GPB, that onboard it sounds pretty good, but the same sound when heard from outside sounds like a 2 stroke lawnmower. Now either there is an element of tone deafness in the creation of the sound(or indeed in the recipient of the sound(ME. LOL  ;D ), or there is a problem between simulating the two different sounds(onboard/outside) from one sound file?

HornetMaX

The two layers are for on-throttle and off-throttle. In the 1st and 2nd graph I posted, on-throttle samples are the ones above the X axis, off-throttle ones are the ones below x axis (they are plotted with negative volumes so that you can separate them from on-throttle samples).

The (maybe simplitic) approach I'm using I do:

  • Given the current RPMs, find for each sample in each layer, what is his own volume and pitch, according to the data in the .scl.
  • Then weight each sample's volume according to the throttle position:

    • Throttle 100% ON ==> weight for layer0 (ON) is 1, weight for layer1 (OFF) is 0
    • Throttle  0% ON ==> weight for layer0 (ON) is 0, weight for layer1 (OFF) is 1
    • Throttle X% ON ==> weight for layer0 (ON) is X/100, weight for layer1 (OFF) is 1 - X/100

And yes, altering the .scl allows you to tell GPB in which RPM range one sample (i.e. one .wav) will be played and how.
To be honest I think that just presenting the whole .scl in terms of RPM instead of normalised values (0.0 - 1.0) will already help a lot of people in understanding what's going on.

What I meant with "simulating the real engine load" is that in neutral if you open the throttle the engine revs up very quickly, because it has (almost) no load.
But if you do it in gear and with the bike on the track, it will rev up not that fast, because ... well, because it has to push the bike forward (and make the rotating parts spin, something I'm sure many are not aware). So by simulating that stuff, I could give you the same result (or something close to) as going in GPB and accelerating with the bike on a straight.

Concerning your PS: I can only guess that the spectator sound is "bad" because GPB can't render all the details that makes you hear what you hear. I mean stuff like sound propagation in real environment (with obstacles, with air temperature and density, etc). But the sound is only one,the one produced by the bike.

MaX.

Hawk

January 22, 2015, 02:57:54 PM #55 Last Edit: January 22, 2015, 03:00:00 PM by Hawk_UK
Quote from: HornetMaX on January 22, 2015, 11:37:48 AM
The two layers are for on-throttle and off-throttle. In the 1st and 2nd graph I posted, on-throttle samples are the ones above the X axis, off-throttle ones are the ones below x axis (they are plotted with negative volumes so that you can separate them from on-throttle samples).

The (maybe simplitic) approach I'm using I do:

  • Given the current RPMs, find for each sample in each layer, what is his own volume and pitch, according to the data in the .scl.
  • Then weight each sample's volume according to the throttle position:

    • Throttle 100% ON ==> weight for layer0 (ON) is 1, weight for layer1 (OFF) is 0
    • Throttle  0% ON ==> weight for layer0 (ON) is 0, weight for layer1 (OFF) is 1
    • Throttle X% ON ==> weight for layer0 (ON) is X/100, weight for layer1 (OFF) is 1 - X/100

And yes, altering the .scl allows you to tell GPB in which RPM range one sample (i.e. one .wav) will be played and how.
To be honest I think that just presenting the whole .scl in terms of RPM instead of normalised values (0.0 - 1.0) will already help a lot of people in understanding what's going on.

What I meant with "simulating the real engine load" is that in neutral if you open the throttle the engine revs up very quickly, because it has (almost) no load.
But if you do it in gear and with the bike on the track, it will rev up not that fast, because ... well, because it has to push the bike forward (and make the rotating parts spin, something I'm sure many are not aware). So by simulating that stuff, I could give you the same result (or something close to) as going in GPB and accelerating with the bike on a straight.

Concerning your PS: I can only guess that the spectator sound is "bad" because GPB can't render all the details that makes you hear what you hear. I mean stuff like sound propagation in real environment (with obstacles, with air temperature and density, etc). But the sound is only one,the one produced by the bike.

MaX.

This sounds good to me Max.... I've studied your previous explanation a while back(from another thread I believe?) on how the sound .scl files work and your very useful excel spreadsheet(very nice post) and this addition of the engine load simulation in your tool above would be very useful in gaining a correct sound for when the bike is accelerating under load. Good and very useful stuff mate... Nice one! ;D

I understand what your saying about the bike engine sound being only one sound and that other factors come into play that defines the ambient engine sounds from outside of the bike(the Doppler effect I believe is already implemented)...... But maybe this is a large part of the problem with the issue of the "engine sound drowning" effect that is still present at this time? Maybe if/when the sound engine has been refined fully we will get a subtle but definite difference in ambient engine sounds from other bikes around us than what we currently have, which is currently the exact same engine sound drowning out your own engine sound which makes it almost impossible to define what your own engine is doing as far as revs and gear changes are concerned from the bike next to you. A big current problem in my book. I only hope Piboso has plans for sorting this "Engine sound drowning" issue out in the future as it will make such a huge difference when riding and dicing with other riders around you. Anyway this is a little off-topic and another story.  :)

Hawk.

HornetMaX

Quote from: Hawk_UK on January 22, 2015, 02:57:54 PM
I only hope Piboso has plans for sorting this "Engine sound drowning" issue out in the future as it will make such a huge difference when riding and dicing with other riders around you. Anyway this is a little off-topic and another story.  :)
Only thing I can do about that is the following: I can simulate 2 bikes (let's say placed 3 meters apart), with the listener sitting on one of the two, with 2 throttles (one for each bike) and play the scene to see if, even outside GPB, you have what you call the "drowning". Personally I'm tempted to think you will, meaning the issue may not be in GPB.

I know we discussed this in the past and many agreed there's something not right, but I'm still not sure.

My reasoning: put some Offspring on your hifi and try to see if you hear it much louder when you are 1m away from the loudspeakers compared to when you're 5m away.
You don't. The change is minimal.

When you're on a full grid of bikes revving into the red-zone, I'm not sure you can hear properly your own bike. What is surely true is that in real life you feel your bike (essentially the vibrations) so what you hear (or don't hear) is less of an issue.

MaX.

Hawk

January 22, 2015, 03:54:34 PM #57 Last Edit: January 22, 2015, 03:59:29 PM by Hawk_UK
Quote from: HornetMaX on January 22, 2015, 03:12:31 PM
Quote from: Hawk_UK on January 22, 2015, 02:57:54 PM
I only hope Piboso has plans for sorting this "Engine sound drowning" issue out in the future as it will make such a huge difference when riding and dicing with other riders around you. Anyway this is a little off-topic and another story.  :)
Only thing I can do about that is the following: I can simulate 2 bikes (let's say placed 3 meters apart), with the listener sitting on one of the two, with 2 throttles (one for each bike) and play the scene to see if, even outside GPB, you have what you call the "drowning". Personally I'm tempted to think you will, meaning the issue may not be in GPB.

I know we discussed this in the past and many agreed there's something not right, but I'm still not sure.

My reasoning: put some Offspring on your hifi and try to see if you hear it much louder when you are 1m away from the loudspeakers compared to when you're 5m away.
You don't. The change is minimal.

When you're on a full grid of bikes revving into the red-zone, I'm not sure you can hear properly your own bike. What is surely true is that in real life you feel your bike (essentially the vibrations) so what you hear (or don't hear) is less of an issue.

MaX.

I think the biggest problem with the engine sound drowning effect, is that when another bike is close(or even quite far behind you) the two sounds are the same volume and pitch, were in reality the sound of the bike your sitting on compared to the sound of other bikes from around you are subtly but definitely a different pitch of tone. This would make a huge difference in a rider being able to make out his own bikes sounds from others.

I'm certainly not saying that in reality on a starting grid with all riders full throttle at the start that you can easily hear your own bikes engine, but with this difference in pitch/tone I described above I definitely think you can still make out your own bikes engine noise.
If Piboso cannot recreate this difference in the sound engine then surely a compromise must be made with an ambient sound volume slider in the settings menu? I would not say that would detract GPB from being a real simulator as some would fear.

Hawk.

PS: Maybe when we have real motorcycle controllers like DD is creating we will also eventually be able to have some good force-feedback and vibration through the handlebars. That would be great.  ;D

HornetMaX

Quote from: Hawk_UK on January 22, 2015, 03:54:34 PM
I think the biggest problem with the engine sound drowning effect, is that when another bike is close(or even quite far behind you) the two sounds are the same volume and pitch, were in reality the sound of the bike your sitting on compared to the sound of other bikes from around you are subtly but definitely a different pitch of tone. This would make a huge difference in a rider being able to make out his own bikes sounds from others.
Well, if you have two identical bikes at identical revs, the pitch should be the same more or less.

MaX.

Hawk

Quote from: HornetMaX on January 22, 2015, 04:23:06 PM
Quote from: Hawk_UK on January 22, 2015, 03:54:34 PM
I think the biggest problem with the engine sound drowning effect, is that when another bike is close(or even quite far behind you) the two sounds are the same volume and pitch, were in reality the sound of the bike your sitting on compared to the sound of other bikes from around you are subtly but definitely a different pitch of tone. This would make a huge difference in a rider being able to make out his own bikes sounds from others.
Well, if you have two identical bikes at identical revs, the pitch should be the same more or less.

MaX.

Sorry Max, but rightly or wrongly(Maybe one of the current real-life racers we have on the forum could confirm or deny this), I disagree in that I believe from what I remember when racing myself that when you are on a bike yourself, the sound coming up from your own bike engine sounds different from the engine sound(pitch/tone) hitting you from bikes that are further away from you. I maybe wrong on this as it's been many, many years since I was last on a track racing. Lol   :P

Hawk.