2019-02-20 snapshot
-
- Posts: 1182
- Joined: Fri Nov 24, 2017 3:16 am
- Team: Phil's
- Location: Cold
- Contact:
Re: 2019-02-20 snapshot
Import the MX vs ATV sounds into sim and we're dialed
Re: 2019-02-20 snapshot
Yes. It's headerless 16 bit signed PCM samples.aeffertz wrote:Assuming they have to be .sw audio files?
I'd use it for sounds specific to the track. Things like gate drops, crowd noise, fireworks or whatever else is making noise around the track. While you could use it to add something like chain noise, it wouldn't be the right place to do it since it would only apply to the one track and might end up conflicting with any chain sounds that were eventually added to the game itself.808 wrote:Does this mean birds and wind or does this mean chain slapping and impact noises. Or both?
Josh Vanderhoof
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
-
- Posts: 8371
- Joined: Thu Nov 19, 2009 5:52 am
- Team: Havoc Racing
- Contact:
Re: 2019-02-20 snapshot
In the name Science no!checkerz wrote:So we can get Turley's "What's up my duuuuudddeeeesssss" when someone passes for the lead?
jlv wrote:If it weren't for Havoc I'd have been arguing with the 12 year olds by myself.
-
- Posts: 102
- Joined: Sat Sep 15, 2018 7:31 pm
- Team: ilegal taco bell
Re: 2019-02-20 snapshot
IMPAOTeamHavocRacing wrote:In the name Science no!checkerz wrote:So we can get Turley's "What's up my duuuuudddeeeesssss" when someone passes for the lead?
Re: 2019-02-20 snapshot
did you have to use the most annoying thing ever as a testjlv wrote:Wouldn't be ideal for that. You could check for sudden accelerations and play a sound but there's no way to check for legs off currently.Smidly wrote:Does this mean you can make the "oof" sound effect for when you go legs off?
Re: 2019-02-20 snapshot
So I just took a quick look at the js file and scrolled to the sound section, I some questions. When adding in sounds how would you add ambient sound? Because if I were to set the sound position to any coordinate wouldn't it play in your speakers/headphones based on the direction you are facing instead of just being constant in both sides? Also does a sound need to be linked to an object?
In the sound_pos is there any way to have the position constant and not directional?
(my b if this made no sense)
Code: Select all
var g_sproing = mx.add_sound("@jstest/sproing.sw")
mx.set_sound_freq(g_sproing, 22050);
mx.set_sound_vol(g_sproing, 1.0);
mx.set_sound_pos(g_sproing, x, y, z);
(my b if this made no sense)
Re: 2019-02-20 snapshot
keeps sayin i cant run as adminitrator
Re: 2019-02-20 snapshot
Use the new camera location function to lock the sound to the cameraAtlasZoor wrote:So I just took a quick look at the js file and scrolled to the sound section, I some questions. When adding in sounds how would you add ambient sound? Because if I were to set the sound position to any coordinate wouldn't it play in your speakers/headphones based on the direction you are facing instead of just being constant in both sides? Also does a sound need to be linked to an object?
In the sound_pos is there any way to have the position constant and not directional?Code: Select all
var g_sproing = mx.add_sound("@jstest/sproing.sw") mx.set_sound_freq(g_sproing, 22050); mx.set_sound_vol(g_sproing, 1.0); mx.set_sound_pos(g_sproing, x, y, z);
(my b if this made no sense)
Re: 2019-02-20 snapshot
ah ok. any Idea what I would put in the (position, rotmatrix) part? Also, how would I sign the sound to the camera position.DJ99X wrote:Use the new camera location function to lock the sound to the camera
Fairly new to js so sorry...
Re: 2019-02-20 snapshot
Like this:AtlasZoor wrote:ah ok. any Idea what I would put in the (position, rotmatrix) part? Also, how would I sign the sound to the camera position.DJ99X wrote:Use the new camera location function to lock the sound to the camera
Fairly new to js so sorry...
var p = [], r = [];
mx.get_camera_location(p, r);
// now 'p' has 3 elements with the camera x, y and z coords and 'r' has a 9 element rotation matrix.
Josh Vanderhoof
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
Re: 2019-02-20 snapshot
Im still kinda lost but this is what I have.jlv wrote: Like this:
var p = [], r = [];
mx.get_camera_location(p, r);
// now 'p' has 3 elements with the camera x, y and z coords and 'r' has a 9 element rotation matrix.
var p = [], r = []; {
mx.get_camera_location(p, r);
mx.set_sound_freq(g_ambient, 44100);
mx.set_sound_vol(g_ambient, 1.0);
}
I am for sure missing alot of stuff but I just don't know where to start.
Re: 2019-02-20 snapshot
You mean to place the sound on the camera? Do it like this:
var p = [], r = [];
mx.get_camera_location(p, r);
mx.set_sound_pos(g_ambient, p[0], p[1], p[2]);
var p = [], r = [];
mx.get_camera_location(p, r);
mx.set_sound_pos(g_ambient, p[0], p[1], p[2]);
Josh Vanderhoof
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
Re: 2019-02-20 snapshot
So would this be correct to place the sound on the camera?jlv wrote:You mean to place the sound on the camera? Do it like this:
var p = [], r = [];
mx.get_camera_location(p, r);
mx.set_sound_pos(g_ambient, p[0], p[1], p[2]);
var p = [], r = []; {
g_ambient = mx.add_sound("@blank/sounds/ambient.sw")
mx.get_camera_location(p, r);
mx.set_sound_pos(g_ambient, p[0], p[1], p[2]);
mx.set_sound_freq(g_ambient, 44100);
mx.set_sound_vol(g_ambient, 1.0);
}
if so it does not work ingame
Re: 2019-02-20 snapshot
That would not work. The first problem is you are not calling mx.start_sound(g_ambient) any where in the script so the sound will never play. Second you have some invalid JavaScript here. You are opening a block on the first line after you declare your variables which should not be there. Something like this would make a sound loop and follow the camera. Not sure if this is the best way but it worked for me.AtlasZoor wrote:So would this be correct to place the sound on the camera?jlv wrote:You mean to place the sound on the camera? Do it like this:
var p = [], r = [];
mx.get_camera_location(p, r);
mx.set_sound_pos(g_ambient, p[0], p[1], p[2]);
var p = [], r = []; {
g_ambient = mx.add_sound("@blank/sounds/ambient.sw")
mx.get_camera_location(p, r);
mx.set_sound_pos(g_ambient, p[0], p[1], p[2]);
mx.set_sound_freq(g_ambient, 44100);
mx.set_sound_vol(g_ambient, 1.0);
}
if so it does not work ingame
Code: Select all
var g_ambient = mx.add_sound("@blank/sounds/ambient.sw");
var p = [], r = [];
mx.set_sound_freq(g_ambient, 44100);
mx.set_sound_vol(g_ambient, 1.0);
mx.set_sound_loop(g_ambient, 1);
mx.start_sound(g_ambient);
function updateCamPosition() {
mx.get_camera_location(p, r);
mx.set_sound_pos(g_ambient, p[0], p[1], p[2]);
}
mx.frame_handler = updateCamPosition;