Community
VRED Forum
Welcome to Autodesk’s VRED Forums. Share your knowledge, ask questions, and explore popular VRED topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Sound Node

18 REPLIES 18
Reply
Message 1 of 19
Anonymous
2914 Views, 18 Replies

Sound Node

How do you import a sound file into the Node Editor?  I don't see a browser and drag and drop doesn't work.

18 REPLIES 18
Message 2 of 19
dlincol1
in reply to: Anonymous

From the Scenegraph menu select Create, Sound.

 

Then edit the Sound node and change the soundFile attribute to be the path to your wav file.

 

To play it from a Variant Set:

Add this Python code to the Script Tab.

 

s = findNode("Sound")
s.setFieldBool("play", true) 

Regards,
Dan
Message 3 of 19
Anonymous
in reply to: dlincol1

Thanks for the information.  Can you walk me through all the steps?  I created the sound node in the SG.  Do you drag and drop a .wav file on top of it?  I did this and the Import Options window pops up.  I say "ok", and something happens, but I'm not sure if it is truely loaded- nothing happens when I click on the sound node.  Then do I create an new Variant or can I add it to an existing one?  Say, when I click on Material Variant to change the paint color, I want to hear a sound.  Do I copy and paste the script into the Script Variant and need to change part of it to the name of the .wav file?  Thanks so much.

Message 4 of 19
sinje_thiedemann
in reply to: Anonymous

Hi, dropping the wav file onto VRED doesn't work. You need to set the path of the .wav file in the Node Editor, see attached screenshot.

Regards

Sinje

Message 5 of 19
dlincol1
in reply to: Anonymous

Dawn,

 

You can add the Python script to the same Variant Set (Script) Tab.

You may need to set the loop attribute to false to keep it from looping.

 

Regards,

Dan

Regards,
Dan
Message 6 of 19
Anonymous
in reply to: dlincol1

Thanks for your replies.  I did what you said, but I'm still not hearing anything.  I must be missing a step.

Message 7 of 19
sinje_thiedemann
in reply to: Anonymous

Do you hear something when you load the example file 3DSound.py?

 

I noticed that it's a bit tricky to enter the path in the Node Editor. You need to enter it without quotes. With every character that you're typing VRED tries to load the file, that's why there are lots of error messages in the Terminal as long as the path is not complete.

Message 8 of 19
Anonymous
in reply to: sinje_thiedemann

I'm trying out the same and nothing works. 3DSound and 3DSound2 don't play anything, making a sound node and pointing it to a wav file fails too. It doesn't error out when I finish writing the path, but it won't play either. 

Message 9 of 19
Anonymous
in reply to: Anonymous

A tutorial would be nice.  Anyone?

Message 10 of 19
Anonymous
in reply to: Anonymous

I see this topic mentioned in the May Knowledge Network:

http://knowledge.autodesk.com/support/vred-products/troubleshooting/caas/sfdcarticles/sfdcarticles/H...

 

Issue:

How to control sound within Autodesk® VRED™

Solution:

There are some example scenes available within the installation folder of VRED under examples that are explaining how a sound file can be handled.

 

I see some .wav files in the examples folder, but I do not see the scene example containing any sound nodes.

Message 11 of 19
sinje_thiedemann
in reply to: Anonymous

The examples are 3DSound.py and 3DSound2.py.

Message 12 of 19
Anonymous
in reply to: sinje_thiedemann

While these examples work, I can't seem to make it work with any other wav files other than the supplied. What are the constrains of the sound types? 

 

I load 3Dsound2.py, it plays the motor_b8 file. I copy a random wav to the same folder the motor_b8.wav is at, re-point the soundFile field to it, then it won't play anymore (even after ckicking pay = true field on and off repeatedly). If I point the node to the motor_b8.wav again, it won't play either. I re-open 3dsound2.py and it won't work anymore. I need to re-start vred for the example to work again.

 

If I point the soundFile to any other wav file that comes with vred, it works. Looks like other wav files are breaking vred?

Message 13 of 19
Anonymous
in reply to: Anonymous

Heads up, I think I figured this one out...

When you point to a new sound, do NOT use "", paste the whole path. The sound might not play. Save the file with play ON, then close and re-open VRED, it should now work.
Message 14 of 19
Anonymous
in reply to: Anonymous

I'm glad you've made some progress, pselener.  I'm trying so hard to get this, but I have no Python/scripting experience, so I'm missing the basics.

 

I did figure out how to turn the sound on and off, using Variants, but when I save the scene and re-open it , the Variants disappear. 

 

When I open "3DSound", I hear the .wav file, "drumloop", even though I see the word, "motor_a8.wav".

 

I would expect it to play once instead of over and over if I make "loop" false in the Node Editor, but it doesn't.

 

I'm confused about what the cube geometry is for.

 

For the "3DSound2" file, I don't hear anything.  I'm not sure what to do with this one.  Are you supposed to Add it to a .vpb scene?

Message 15 of 19
Anonymous
in reply to: Anonymous

You don't need variants to turn the sound on and off, you can do it from the node editor. I don't know why your vsets would disapear...

The cube geometries I think are supposed to show where the two different sounds are coming from.
Message 16 of 19
bryan.shepperd
in reply to: Anonymous

Playing with the examples and by changing my wav file I find that sound works upon scene reload.  It seems to have to load the .wav in at scene start or it doesn't load it at all.  I'm looking at attributes of the sound node in the node editor and the gain does not seem to work.  pitch does work.  reference distance and rolloffFactor do control how loud a sound is relative to how far you are from it.  I have no idea what cone angles do - they do not appear to do anything. Seems odd there is a boolean play and a boolean stop.  play true false seems to work just fine.  Perhaps play false functions as a pause and a full stop would bring you to the beginning.  Could make sense but I have not checked yet.

 

I wish there were more python documentation for anything related to this.

 

In the demo scene the sound under the red cube has no rolloff factor and the sound on the green cube does have rolloff. So the cubes are there only to indicate where the sounds are coming from.  moving closer to the green cube you should hear more engine noise. 

Message 17 of 19
Anonymous
in reply to: Anonymous

Thank you guys for your guide, sounds perfectly working..

 

(vred pro 2018)

 

Regards

Message 18 of 19
Anonymous
in reply to: Anonymous

Hello Guys

 

I just would like to ask you guys, can i volume up or down individually to sound nodes in node editor ?

 

I tried many section there but i failed..

 

Thank you and Regards

Message 19 of 19
Anonymous
in reply to: Anonymous

By the way according to my attempts, i get success with only 44100.0 Hz and 16 bit wav files !

And they have to be stand in the `root`, if you would like to make them all in one group its also doesnt work.

Your attentions..

 

Regards

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report