<div dir="ltr"><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:Verdana">> b. Further thought on whether/how to include
SoundEffects nodes, building on past work. 
Primary topic for next week</p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:Verdana"> </p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:Verdana">My understanding so
far about the SoundEffects issue:</p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:Verdana">A. Explicit x3d
SoundEffect nodes</p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:Verdana">Disadvantage: </p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:Verdana">- there's a lot of
them, and x3d browsers have some overhead for each node</p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:Verdana">- any
ancillary js functions used in conjunction such as sleep() or loops would
need to be node-ized / converted into a declarative form</p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:Verdana">- some uncertainty
in implementation method (see ** below), unfamiliar scene authoring syntax for those familiar with webAudio</p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:Verdana">Advantage: </p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:Verdana">- can route
directly from x3d nodes to SoundEffect node fields, updating the effect from
x3d</p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:Verdana"> </p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:Verdana">B, js scripting
approach</p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:Verdana">Disadvantage </p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:Verdana">- different
implementation effort to expose Labsound or equivalent webAudio API to js engine, depends on browser
and programmer capability (no opinion, haven't reviewed js exposing of labsound)</p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:Verdana">Advantage of js
scripting approach:</p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:Verdana">- js snippets can
be copied from html examples of webAudio (including js loops and sleep()s when not long enough to stall rendering thread? or would the effect be run-once in a spawned thread?)</p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:Verdana">- only fields of
interest would be exposed on script node (you mentioned a url field on
SpatializedSound would hold the script. Will SpatializedSound have 'dynamic fields' like a Script
node that can be scene-authored and routed to, so regular scene can route to
fields on SoundEffect nodes or more precisely to dynamic fields declared on
SpatializedSound, for use inside the script by webAudio nodes?)</p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:Verdana"> </p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:Verdana">-Doug Sanden</p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:Verdana"> </p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:Verdana">** Untested design
for native implementation method with LabSound.lib for explicit effect nodes approach:</p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:Verdana">1) when
initializing x3d audioContext node, launch worker thread (separate thread per
audioContext)</p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:Verdana">- the worker thread
is in C++ and holds smart pointer variables for lifespan of context ie run of
program</p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:Verdana">2) the worker
thread loops, and once per loop waits on a condition variable^</p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:Verdana">3) once per
rendering frame, when the browser is rendering the scenegraph, and renders the
audioContext node, it sets the condition variable</p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:Verdana">4) if first time,
the context worker thread creates all the labsound nodes and connects them</p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:Verdana">- to match the x3d
declared context and connected child nodes</p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:Verdana">5) in subsequent
rendering frames, if any field has been changed on the x3d audio effect nodes, </p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:Verdana">- the condition
variable is set and the worker thread updates the changed fields on</p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:Verdana">- the labsound
nodes</p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:Verdana">6) at end of
program run, the condition variable is set and the worker thread exits,</p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:Verdana">- triggering
garbage collection of smart pointer variables</p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:Verdana"> </p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:Verdana">^<a href="https://en.cppreference.com/w/cpp/thread/condition_variable">https://en.cppreference.com/w/cpp/thread/condition_variable</a>
</p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:10pt;font-family:Verdana"> -shows
std::condition_variable and thread.</p></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jun 17, 2020 at 11:21 AM Don Brutzman <<a href="mailto:brutzman@nps.edu">brutzman@nps.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Attendees: Efi Lakka, Thanos Malamos, Dick Puk, Don Brutzman<br>
<br>
No Web3D member-only information is included in these minutes.<br>
<br>
1. Refined structure for object model.<br>
<br>
Great progress, we are converging nicely.<br>
<br>
Efi will distribute updated document.  Thank you!<br>
<br>
We discussed Microphone node.  We think it best fits as MicrophoneSource as an X3DSoundSourceNode, with no direct need of X3DSensorNode.<br>
<br>
<br>
2. Discussed "sound effects" nodes.  Observed that names like "AnalyserNode, OscillatorNode, ChannelSplitterNode etc. are the WebAudio API names, the suffix "Node" would not be part of the X3D names (because "Node" indicates abstract types).<br>
<br>
Wondering if all of the sound effects could have a parent X3DSoundEffectsNode.  Conjectured:<br>
<br>
+- X3DTimeDependentNode -+- X3DSoundEffectsNode -+- SoundEffectsGroup (containing the following as an audio graph) or<br>
                                                  +- SoundProcessingGroup (or something)<br>
                                                  +- Analyzer<br>
                                                  +- Oscillator<br>
                                                  +- ChannelSplitter<br>
                                                  +- etc.<br>
3. Next steps.<br>
<br>
a. For consideration... much of the structure for sound-effects node composition can be "side-stepped" if we allow support for WebAudioApi javascript source as a way to describe audio graph.  If accepted, this would be connected via /url/ field for SpatialSound node.  It also would confirm whether all spatialized inputs/outputs are available in SpatialSound node.  This is an option (not a requirement) that might provide comparisons and clarity regarding whether node-defined audio graphs in X3D have the same expressive power.<br>
<br>
b. Further thought on whether/how to include SoundEffects nodes, building on past work.  Primary topic for next week.<br>
<br>
c. Dick and Don will update X3D4 draft specification organization to match the current structure in the document, establishing placeholders for agreed-upon nodes.  We will try to keep up with incremental progress.<br>
<br>
Our next goal is to have a preliminary releasable draft X3D4 Specification by 30 JUN 2020, anticipating public release of draft for SIGGRAPH 2020.<br>
<br>
We will try to meet Wednesday 0900 pacific (1900 EET Eastern European Time for Crete) in order to not collide with Web3D User Experience (Web3DUX) working group meeting.<br>
<br>
"What say??" ... Have fun with X3D audio and sound!  8)<br>
<br>
all the best, Don<br>
-- <br>
Don Brutzman  Naval Postgraduate School, Code USW/Br       <a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a><br>
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149<br>
X3D graphics, virtual worlds, navy robotics <a href="http://faculty.nps.edu/brutzman" rel="noreferrer" target="_blank">http://faculty.nps.edu/brutzman</a><br>
<br>
_______________________________________________<br>
x3d-public mailing list<br>
<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br>
<a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" rel="noreferrer" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br>
</blockquote></div>