Sound Volume

Latest Information on Sim Innovation's flagship product Air Manager

Moderators: Ralph, russ

Message
Author
Pkaser
Posts: 49
Joined: Mon Jul 15, 2019 7:15 pm

Sound Volume

#1 Post by Pkaser » Mon Apr 12, 2021 2:34 pm

Is there a way to change the volume of the sound volume after the sound_add?

Here is situation and why it would be very helpful: when a helicopter goes through ETL there is a vibration that goes from subtle to very pronounced, back to subtle. I have a bass shaker and a stick shaker. I have them both oscillate at about 35 Hz as you go into and through ETL. Problem is that I cant vary the volume that is sent to the bass shaker with the 35Hz tone, so its either not there, or very there.

I could load 10 different sounds with 10% varying volume, but it seems more like a hack.

Any other suggestions?

User avatar
Keith Baxter
Posts: 2802
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: Sound Volume

#2 Post by Keith Baxter » Mon Apr 12, 2021 3:29 pm

Pkaser wrote:
Mon Apr 12, 2021 2:34 pm
Is there a way to change the volume of the sound volume after the sound_add?

Here is situation and why it would be very helpful: when a helicopter goes through ETL there is a vibration that goes from subtle to very pronounced, back to subtle. I have a bass shaker and a stick shaker. I have them both oscillate at about 35 Hz as you go into and through ETL. Problem is that I cant vary the volume that is sent to the bass shaker with the 35Hz tone, so its either not there, or very there.

I could load 10 different sounds with 10% varying volume, but it seems more like a hack.

Any other suggestions?
Hi,

This not work?

Code: Select all

sound_id = sound_add(filename, volume)


Keith
Last edited by Keith Baxter on Mon Apr 12, 2021 3:37 pm, edited 1 time in total.
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

User avatar
Ralph
Posts: 5072
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Sound Volume

#3 Post by Ralph » Mon Apr 12, 2021 3:35 pm

If you go the fancy route, then you pick an Arduino Due with a DAC, and use our Messageport library to create your own audio signal.

User avatar
Keith Baxter
Posts: 2802
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: Sound Volume

#4 Post by Keith Baxter » Mon Apr 12, 2021 3:39 pm

Ralph wrote:
Mon Apr 12, 2021 3:35 pm
If you go the fancy route, then you pick an Arduino Due with a DAC, and use our Messageport library to create your own audio signal.
Ralph,

Is that a hint -> XM :D

Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

User avatar
Keith Baxter
Posts: 2802
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: Sound Volume

#5 Post by Keith Baxter » Mon Apr 12, 2021 3:49 pm

And then there was silence. :lol:
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

User avatar
Ralph
Posts: 5072
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Sound Volume

#6 Post by Ralph » Mon Apr 12, 2021 5:07 pm

Not really sure what you mean :)

Pkaser
Posts: 49
Joined: Mon Jul 15, 2019 7:15 pm

Re: Sound Volume

#7 Post by Pkaser » Mon Apr 12, 2021 9:00 pm

Let me see if I can explain it better...

Then you pass through ETL, which is when your rotor blades become more efficient, there is a shudder that takes place in the cockpit. You feel it everywhere and it starts soft, gets intense, and then fades away again after you get enough airspeed.

Well, IRL, Im a helicopter pilot, and this weekend I was flying and we had 20kt winds. When I was air taxiing back to the ramp, the R44 was in the phenomenon the whole taxi...15 to 30 seconds. But, when you take off or land, you can go through it pretty quickly, like 3-4 seconds.

Well, at the end of my shift I realized I could make this happen in the sim by creating a 28Hz (played with it a bit since earlier) and changing the volume to make it more intense as I was in the middle of the phenomenon, and then fade away as I got through ETL. The but kicker makes the whole sim shake just like IRL.

It works really, REALLY well. The problem is is that, I couldnt load a single sound and then change its' volume. Instead, I had to load 5 of the same sounds each with a 10% increase in volume. I had to stop one sound and start looping another as I approached or departed the middle of this zone. The intensity is base on the airspeed, not duration, or anything else, so I cant make a WAV file that peaks somewhere in the middle. the intensity is already a percentage in my calculations, so passing it to a volume as a float would seem most efficient.

It seems like a hack the way I did it. I mean, It works, but it seems like the code equivalent to duct tape. Thought maybe there is a way to modify a sound volume that I didnt see/know about.

Thanks for the input,

-Patrick

User avatar
Sling
Posts: 4426
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Sound Volume

#8 Post by Sling » Mon Apr 12, 2021 9:35 pm

The sound functions only allow that initial volume to be set. There is no way to alter the value once you load the sound directly from the API at present. Like Ralph said the only way presently would be using an analog signal controlled by AM. You would need message port for this.

Pkaser
Posts: 49
Joined: Mon Jul 15, 2019 7:15 pm

Re: Sound Volume

#9 Post by Pkaser » Mon Apr 12, 2021 10:45 pm

Okay well I guess I will stick to my duct tape solution and I'll just keep my fingers crossed that somewhere down the line you give us the ability to change the volume on the Fly

User avatar
Ralph
Posts: 5072
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Sound Volume

#10 Post by Ralph » Tue Apr 13, 2021 4:32 am

I still think that the DAC option might give the most realistic outcome. You have exact control over the amplitude and frequency. And you can add more things like startup and shutdown rumble, skids grinding, etc.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests