[X3D-Public] MIDI node was X3D for Web Authors Examples Archive, plus audio test scene of different sound formats

Don Brutzman brutzman at nps.edu
Mon Dec 16 08:35:42 PST 2013


On 12/12/2013 10:59 AM, Michalis Kamburelis wrote:
> Don Brutzman wrote:
>> - it requires multiple retrievals of the souncd file since both url
>> and pitch are controlled by AudioClip
> 
> That is why view3dscene can cache by URLs, so multiple AudioClips with 
> the same url load their resources only once :) Each one can still have 
> individual pitch.

Very nice.  But of course for this to work, you have to keep track of http headers and decide to reload or not.  Remote files may change over time - perhaps even frequently for news and announcements - so care must be taken when caching to recheck that a remote resource hasn't changed.  Browsers handle this process well.

This will become even more important as we start to work with streamable formats.

Michalis, if you (or others) have done this kind of thing already in your player, please advise on the details.  We should document this technique on the website - there may be several alternative approaches.  Thanks in advance for all help.


> If you load 
> http://www.web3d.org/x3d/content/examples/Vrml2.0Sourcebook/Chapter24-Sound/Figure24.4FourKeyKeyboard.x3d 
> in view3dscene with debug log (you run view3dscene from the terminal 
> with --debug-log option) you'll see this:
> 
> Network: Downloading 
> "http://www.web3d.org/x3d/content/examples/Vrml2.0Sourcebook/Chapter24-Sound/tone1.wav"
> Network: Successfully downloaded 
> "http://www.web3d.org/x3d/content/examples/Vrml2.0Sourcebook/Chapter24-Sound/tone1.wav", 
> MIME type "audio/x-wav", MIME type was specified by server: True
> Sound: Loaded 
> "http://www.web3d.org/x3d/content/examples/Vrml2.0Sourcebook/Chapter24-Sound/tone1.wav": 
> TSoundWAV, mono 16, size: 19124, frequency: 6000, duration: 1.59
> Sound: Loaded 
> "http://www.web3d.org/x3d/content/examples/Vrml2.0Sourcebook/Chapter24-Sound/tone1.wav" 
> from cache, now has 2 references
> Sound: Loaded 
> "http://www.web3d.org/x3d/content/examples/Vrml2.0Sourcebook/Chapter24-Sound/tone1.wav" 
> from cache, now has 3 references
> Sound: Loaded 
> "http://www.web3d.org/x3d/content/examples/Vrml2.0Sourcebook/Chapter24-Sound/tone1.wav" 
> from cache, now has 4 references
> 
> Michalis

all the best, Don
-- 
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman



More information about the X3D-Public mailing list