phetsims / sound-waves

"Sound Waves" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
0 stars 1 forks source link

Audio for 'Two Sources' screen does not play sound heard by listener #19

Closed matthew-blackman closed 1 year ago

matthew-blackman commented 1 year ago

In the java version of the sim, the 'Two Source Interference' screen plays the audio heard by the listener at their current location. This allows the user to move the listener around and hear the points of constructive/destructive interference, which is pedagogically important for this screen.

Screen Shot 2023-08-14 at 1 52 52 PM

In the current version of the sim, checking 'Audio Enabled' on this screen simply plays the sound being produced by the speakers, with no interference effects. This does not seem correct for the learning goals of the screen.

I would like to discuss this with @samreid and @marlitas because it may be a big lift to implement this if there is currently no framework for spatializing the audio in 2D and with multiple sources.

matthew-blackman commented 1 year ago

This is working great on my end. @samreid or @marlitas can you review since this is a new feature? Mostly want to check the behavior since the code will be rewritten when we fully re-release this sim. I can add documentation if we feel it's warranted, but doesn't seem like a priority.

samreid commented 1 year ago

@matthew-blackman and I reviewed the commits above, and tested in the sim. Behavior seems as-expected, nice work! Closing.