The AudioClip Node
The AudioClip syntax looks like this:
AudioClip {
exposedField SFString description ""
exposedField SFBool loop FALSE
exposedField SFFloat pitch 1.0
exposedField SFTime startTime 0
exposedField SFTime stopTime 0
exposedField MFString url [ ]
eventOut SFTime duration_changed
eventOut SFBool isActive
}
This is what the sound node uses as a source of sound data. One important thing to remember about the AudioClip is when you change the pitch of a sampled sound, you also change the speed. For example, if you had a note in the key of C play for two seconds, and changed the pitch setting to 2.0, it would play the note one octave higher for one second. Also remember if you set loop=TRUE, that the sample you've found or created makes a good loop, with a smooth transition from the end of the sample back to the beginning. Content is king, you know.
The MovieTexture Node
The MovieTexture syntax looks like this:
MovieTexture {
exposedField SFBool loop FALSE
exposedField SFFloat speed 1
exposedField SFTime startTime 0
exposedField SFTime stopTime 0
exposedField MFString url [ ]
field SFBool repeatS TRUE
field SFBool repeatT TRUE
eventOut SFFloat duration_changed
eventOut SFBool isActive
}
The MovieTexture node is usually used to define both a time dependent texture map (contained in a movie file) and parameters for controlling the movie and the texture mapping. However, it can also be used as the source of sound data for a Sound node, as a MPEG1-System file (.MPEG). MPEG is a favorite because of its variability of compression rates and the quality of the sound that is delivered. Then again, the MovieTexture node is not required to play audio if speed is not equal to 1, and browsers are not required to have two or more simultaneously active movie textures. Therefore, it's best to stick with the AudioClip as a sound source for most applications.
< < < _ > > > > >