2019-02-20 snapshot

Post anything about MX Simulator here. Please. I'm begging you.
User avatar
Jakob Hubbard
Posts: 682
Joined: Fri Nov 24, 2017 3:16 am
Team: SPR
Location: Cold

Re: 2019-02-20 snapshot

Postby Jakob Hubbard » Fri Feb 22, 2019 1:23 am

so does this mean in supercross we could have a gate drop sound? :shock:
Image

Ddavis
Posts: 17169
Joined: Wed Sep 28, 2011 1:02 am
Team: DX3 Fasthouse KTM
Location: California
Contact:

Re: 2019-02-20 snapshot

Postby Ddavis » Fri Feb 22, 2019 2:14 am

Import the MX vs ATV sounds into sim and we're dialed :lol:
7th ['13 250 West] 6th ['14 250 East] 9th ['14 450 MX] 9th ['15 450 MX] 11th ['16 450 MX] 7th ['17 450 SX/MX] 9th ['18 450 MX]
1 450SX EU Win - 1 250SX EU Win - 2 rF Podiums - 20 rF Top 5's - 99 rF Top 10's [Post-Indy]

jlv
Site Admin
Posts: 13214
Joined: Fri Nov 02, 2007 5:39 am
Team: No Frills Racing
Contact:

Re: 2019-02-20 snapshot

Postby jlv » Fri Feb 22, 2019 2:38 am

aeffertz wrote:Assuming they have to be .sw audio files?

Yes. It's headerless 16 bit signed PCM samples.

808 wrote:Does this mean birds and wind or does this mean chain slapping and impact noises. Or both?

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.
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.

User avatar
TeamHavocRacing
Posts: 6983
Joined: Thu Nov 19, 2009 5:52 am
Team: Havoc Racing
Contact:

Re: 2019-02-20 snapshot

Postby TeamHavocRacing » Fri Feb 22, 2019 2:12 pm

checkerz wrote:So we can get Turley's "What's up my duuuuudddeeeesssss" when someone passes for the lead?

In the name Science no!
Thanks to Matt James, we are no longer allowed have pix in this area right here.

User avatar
Soul Designs
Posts: 62
Joined: Sat Sep 15, 2018 7:31 pm
Team: Privateer

Re: 2019-02-20 snapshot

Postby Soul Designs » Fri Feb 22, 2019 4:18 pm

TeamHavocRacing wrote:
checkerz wrote:So we can get Turley's "What's up my duuuuudddeeeesssss" when someone passes for the lead?

In the name Science no!

IMPAO

User avatar
BcMxKx37
Posts: 1156
Joined: Sun Jun 02, 2013 5:20 am
Team: BCD
Location: Costa Mesa, CA
Contact:

Re: 2019-02-20 snapshot

Postby BcMxKx37 » Fri Feb 22, 2019 4:59 pm

jlv wrote:
Smidly wrote:Does this mean you can make the "oof" sound effect for when you go legs off?

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.

did you have to use the most annoying thing ever as a test :roll:

User avatar
AtlasZoor
Posts: 257
Joined: Wed Aug 02, 2017 12:51 am
Team: Atlas Trackworks
Location: Zimbabwe

Re: 2019-02-20 snapshot

Postby AtlasZoor » Fri Feb 22, 2019 9:16 pm

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?


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);


In the sound_pos is there any way to have the position constant and not directional?

(my b if this made no sense)
Image

Shadow13
Posts: 44
Joined: Sat Mar 18, 2017 2:50 am
Team: Supreme Decals

Re: 2019-02-20 snapshot

Postby Shadow13 » Fri Feb 22, 2019 10:24 pm

keeps sayin i cant run as adminitrator
Image

User avatar
DJ99X
Posts: 15503
Joined: Tue Jan 15, 2008 11:36 am
Location: Land Down Under

Re: 2019-02-20 snapshot

Postby DJ99X » Sat Feb 23, 2019 1:20 am

AtlasZoor 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?


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);


In the sound_pos is there any way to have the position constant and not directional?

(my b if this made no sense)


Use the new camera location function to lock the sound to the camera

User avatar
AtlasZoor
Posts: 257
Joined: Wed Aug 02, 2017 12:51 am
Team: Atlas Trackworks
Location: Zimbabwe

Re: 2019-02-20 snapshot

Postby AtlasZoor » Sat Feb 23, 2019 1:37 am

DJ99X wrote:Use the new camera location function to lock the sound to the camera


ah ok. any Idea what I would put in the (position, rotmatrix) part? Also, how would I sign the sound to the camera position.

Fairly new to js so sorry...
Image

jlv
Site Admin
Posts: 13214
Joined: Fri Nov 02, 2007 5:39 am
Team: No Frills Racing
Contact:

Re: 2019-02-20 snapshot

Postby jlv » Sat Feb 23, 2019 2:30 am

AtlasZoor wrote:
DJ99X wrote:Use the new camera location function to lock the sound to the camera


ah ok. any Idea what I would put in the (position, rotmatrix) part? Also, how would I sign the sound to the camera position.

Fairly new to js so sorry...

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.
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.

User avatar
AtlasZoor
Posts: 257
Joined: Wed Aug 02, 2017 12:51 am
Team: Atlas Trackworks
Location: Zimbabwe

Re: 2019-02-20 snapshot

Postby AtlasZoor » Sat Feb 23, 2019 2:43 am

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.


Im still kinda lost but this is what I have.

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.
Image

jlv
Site Admin
Posts: 13214
Joined: Fri Nov 02, 2007 5:39 am
Team: No Frills Racing
Contact:

Re: 2019-02-20 snapshot

Postby jlv » Sat Feb 23, 2019 3:09 am

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]);
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.

User avatar
AtlasZoor
Posts: 257
Joined: Wed Aug 02, 2017 12:51 am
Team: Atlas Trackworks
Location: Zimbabwe

Re: 2019-02-20 snapshot

Postby AtlasZoor » Sat Feb 23, 2019 3:21 am

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]);


So would this be correct to place the sound on the camera?

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
Image

aaronr5
Posts: 588
Joined: Wed Dec 29, 2010 8:03 am
Team: DAM
Location: North Carolina

Re: 2019-02-20 snapshot

Postby aaronr5 » Sat Feb 23, 2019 5:03 am

AtlasZoor wrote:
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]);


So would this be correct to place the sound on the camera?

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


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.

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;


Return to “General Discussion”

Who is online

Users browsing this forum: bradencory69 and 4 guests