Code Monkey home page Code Monkey logo

sound's Introduction

Sound Waves

"Sound Waves" is an educational simulation in HTML5, by PhET Interactive Simulations at the University of Colorado Boulder. For a description of this simulation, associated resources, and a link to the published version, visit the simulation's web page.

Try it!

Click here to run " Sound Waves".

Screenshot

Documentation

The PhET Development Overview is the most complete guide to PhET Simulation Development. This guide includes how to obtain simulation code and its dependencies, notes about architecture & design, how to test and build the sims, as well as other important information.

Quick Start

(1) Clone the simulation and its dependencies:

git clone https://github.com/phetsims/assert.git
git clone https://github.com/phetsims/axon.git
git clone https://github.com/phetsims/babel.git
git clone https://github.com/phetsims/brand.git
git clone https://github.com/phetsims/chipper.git
git clone https://github.com/phetsims/dot.git
git clone https://github.com/phetsims/joist.git
git clone https://github.com/phetsims/kite.git
git clone https://github.com/phetsims/perennial.git perennial-alias
git clone https://github.com/phetsims/phet-core.git
git clone https://github.com/phetsims/phetcommon.git
git clone https://github.com/phetsims/phetmarks.git
git clone https://github.com/phetsims/query-string-machine.git
git clone https://github.com/phetsims/scenery.git
git clone https://github.com/phetsims/scenery-phet.git
git clone https://github.com/phetsims/sherpa.git
git clone https://github.com/phetsims/sound-waves.git
git clone https://github.com/phetsims/sun.git
git clone https://github.com/phetsims/tambo.git
git clone https://github.com/phetsims/tandem.git
git clone https://github.com/phetsims/twixt.git
git clone https://github.com/phetsims/utterance-queue.git

(2) Install dev dependencies:

cd chipper
npm install
cd ../perennial-alias
npm install
cd ../sound-waves
npm install

(3) Change directory to chipper cd ../chipper/, then transpile the code to JavaScript by running node js/scripts/transpile.js --watch. This starts a file-watching process that will automatically transpile new or changed files.

(4) In a new terminal/command prompt, start an http-server

(5) Open in the browser: http://localhost/sound-waves/sound-waves_en.html (You will probably need to modify this URL based on your HTTP port and relative path.)

Optional: Build the simulation into a single file

(1) Change directory to the simulation directory: cd ../sound-waves

(2) Build the sim: grunt --brands=adapted-from-phet. It is safe to ignore warnings like >> WARNING404: Skipping potentially non-public dependency, which indicate that non-public PhET-iO code is not being included in the build.

(3) Open in the browser: http://localhost/sound-waves/build/adapted-from-phet/sound-waves_en_adapted-from-phet.html ( You will probably need to modify this URL based on your HTTP port and relative path.)

Get Involved

This simulation was created using SceneryStack. Join the SceneryStack community for resources and discussion around interactives like Sound Waves!

Help us improve, create a New Issue

License

See the LICENSE

sound's People

Contributors

matthew-blackman avatar samreid avatar zepumph avatar phet-dev avatar jonathanolson avatar pixelzoom avatar marlitas avatar veillette avatar jbphet avatar brettfiedler avatar

Watchers

Taliesin L. Smith avatar Ariel Paul avatar Olusola Olateju avatar  avatar

Forkers

nooberjones

sound's Issues

Panels become misaligned with stringTest=double

Test device
Dell

Operating System
Win10

Browser
Chrome

Problem description
For phetsims/qa#972, with ?stringTest=double, the panels on the Air Pressure screen become misaligned.

Visuals
Screenshot 2023-08-22 at 8 33 17 AM

Troubleshooting information: !!!!! DO NOT EDIT !!!!! Name: ‪Sound Waves‬:‪Sound Waves‬ URL: https://phet-dev.colorado.edu/html/sound-waves/1.0.0-dev.5/phet/sound-waves_all_phet.html?stringTest=double Version: 1.0.0-dev.5 2023-08-21 17:16:24 UTC Features missing: applicationcache, applicationcache, touch Flags: pixelRatioScaling User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36 Language: en-US Window: 1433x729 Pixel Ratio: 2/1 WebGL: WebGL 1.0 (OpenGL ES 2.0 Chromium) GLSL: WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium) Vendor: WebKit (WebKit WebGL) Vertex: attribs: 16 varying: 31 uniform: 1024 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32) Max viewport: 16384x16384 OES_texture_float: true Dependencies JSON: {}

Add credits

From a TODO, we need to add credits in sound-main.ts

Sound Main Checklist

{{SIM_NAME}} main checklist

Design

  • Sim folder and design doc created (Date: //)
  • Review user feedback
  • Learning goals and standards identified (Date: //)
  • Design concept complete (Date: //)
  • Wireframes complete (Date: //)
  • Mockups complete (Date: //)
    • Mockups checked for colorblind and greyscale
  • Features for PhET-iO discussion
  • Interviews complete (Date: //)
    • Results reported to team
    • Notes pasted into design doc
    • Back-up of interviews
  • Lead designer "sign off" (Date: //)
    • Performance acceptable
    • Carefully review ?showPointerAreas
    • No new feature requests
  • Pre-prototype items
    • Auxiliary screenshots (at least 1 additional)
    • Accessories (keywords, categories, description, learning goals, related sims, NSDL) as appropriate
    • Email/Twitter announcement language
    • Teacher Guide created, uploaded, and added to sim design folder
  • Pre-publication items
    • Auxilary screenshots (up to 3 additional)
    • Screen-specific screenshots for metadata service (see naming convention)
    • Accessories (keywords, categories, description, learning goals, related sims, NSDL)
    • Accessibility features
    • Email announcement language
    • Teacher Guide created, uploaded, and added to sim design folder
    • LoL icons for each screen created and uploaded to Drive
    • LoL metadata for each screen (description, vocab words, questions for before/after sim use)
  • Make sim visible on website
  • Post-publication items
    • If a Port: Review legacy gold star activities, copy over if appropriate
    • Share new features, design challenges, and treats with group!
    • Email announcement
    • Deliver to Legends of Learning
    • Create "sim primer" issue
    • Hold postmortem if applicable (Date: //)

Inclusive Features

  • Alternative Input (Started: ) (Completed: )
  • Pan & Zoom
  • Sound & Sonification (UI)
  • Sound & Sonification (Pedagogical) - (include link to relevant sonification design document)
    • Sound design complete (Started: ) (Completed: )
    • Development complete (Started: ) (Completed: )
  • Interactive Description - (link to description design & implementation checklist)
    • Description design complete (Started: ) (Completed: )
    • Development complete (Started: ) (Completed: )
    • Mobile description included
  • Voicing - (include links to relevant voicing design document)

Implementation

  • Repository created by following new_repo_checklist.md (Date: //)
  • Development started (Date: //)
  • Sim is "feature complete" (Date: //)
  • QA team "first look" (Date: //)
  • Interviews may happen around here (see above)
  • Code review checklist completed" (Date: //)
  • Sim team sign-off (Date: //)
  • Code review completed (Date: //)
  • Sim dev test completed (Date: //)
  • Sim RC tests completed (Date: //)
  • Pre-publication items
    • Main screenshot (read this)
    • Verify credits with lead (Team, Contributors, QA, Graphic Arts, Sound Design, any Thanks - see conventions)
    • Add CT tests for public query parameters
  • Published (Date: //)

QA

  • If a Port: Legacy sim tested for bugs; issues reported in repo
  • Dev testing started (Date: //)
  • Dev testing completed (Date: //)
  • First RC published (Date: //)
  • RC testing completed (Date: //)

Minor pointer area overlap

Test device
Samsung
Operating System
Win 11
Browser
Chrome
Problem description
For phetsims/qa#974
There is a minor pointer overlap between the air density slider and the air density reset button on the last screen.

Visuals
minoroverlap

Troubleshooting information:

!!!!! DO NOT EDIT !!!!!
Name: ‪Sound Waves‬
URL: https://phet-dev.colorado.edu/html/sound-waves/1.0.0-rc.2/phet/sound-waves_all_phet.html?showPointerAreas
Version: 1.0.0-rc.2 2023-08-28 14:05:18 UTC
Features missing: applicationcache, applicationcache, touch
Flags: pixelRatioScaling
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36
Language: en-US
Window: 1536x707
Pixel Ratio: 1.25/1
WebGL: WebGL 1.0 (OpenGL ES 2.0 Chromium)
GLSL: WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium)
Vendor: WebKit (WebKit WebGL)
Vertex: attribs: 16 varying: 31 uniform: 4096
Texture: size: 8192 imageUnits: 32 (vertex: 32, combined: 64)
Max viewport: 8192x8192
OES_texture_float: true
Dependencies JSON: {}

Check that all features of the legacy java sim are carried over

The sim is looking very close to feature complete. All features from the java sim appear to be implemented, with the following intentional changes:

  • Removed the "cone effect" from the sound waves coming out of the speaker
  • Add 'x' symbol to person in Two Sources screen to show the location being sonified
  • Limit dragging of person to the vertical axis in Two Sources screen
  • Changed the UX from 'Air Density in Speaker Box' from an on/off button to a slider

@KatieWoe can you check that all features are correctly carried over from the java version, other than the intentional differences listed above?

Reseting while trying to pulse at 0 hz disables pulsing

Test device
Samsung Chromebook
Operating System
ChromeOS
Browser
Chrome
Problem description
For phetsims/qa#972. Related to #30. If you set the frequency on the Reflection screen to 0 hz, then try to pulse, the pulse button is stuck. If you then reset all in this state, the pulse feature is permanently unusable until the sim is reloaded. If you change frequency before resetting the permanent unusability may not happen.
Steps to reproduce

  1. Go to the reflection screen
  2. Set scene to pulse
  3. Change the frequency to 0
  4. Hit the pulse button
  5. Hit reset all

Visuals

Sound.Waves.-.Google.Chrome.2023-08-22.12-14-59.mp4

Troubleshooting information:

!!!!! DO NOT EDIT !!!!!
Name: ‪Sound Waves‬
URL: https://phet-dev.colorado.edu/html/sound-waves/1.0.0-dev.5/phet/sound-waves_all_phet.html
Version: 1.0.0-dev.5 2023-08-21 17:16:24 UTC
Features missing: applicationcache, applicationcache, touch
Flags: pixelRatioScaling
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36
Language: en-US
Window: 1536x707
Pixel Ratio: 1.25/1
WebGL: WebGL 1.0 (OpenGL ES 2.0 Chromium)
GLSL: WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium)
Vendor: WebKit (WebKit WebGL)
Vertex: attribs: 16 varying: 31 uniform: 4096
Texture: size: 8192 imageUnits: 32 (vertex: 32, combined: 64)
Max viewport: 8192x8192
OES_texture_float: true
Dependencies JSON: {}

Make it clear that the 'Air Density' slider only applies to the air inside the box

This was not clear to me at first and made the behavior of the 'Air Density' slider very confusing. In the java sim, the UI for 'Air Density' has buttons for 'Remove air from box', and 'Add air to box', making this more clear. I think a low-cost solution here would be to change the label of the 'Air Density' slider to 'Air Density in Box' or 'Density of Air in Box'.

Sound not playing on iPad Pro

User reported no sound playing on iPad Pro when 'Listener Audio' is checked.

Environment:
IPad Pro. Chrome. Also tested in Safari. Listener Audio on. Volume set high.

Possible to lose ruler

Test device
MacBook Air M1 chip

Operating System
13.5

Browser
Safari 16.6

Problem description
For phetsims/qa#972, on the Measure Screen it is possible to lose the ruler on the bottom of the screen.

Steps to reproduce

  1. On the Measure Screen, drag the ruler off screen and let go.

Visuals

loseRuler.mp4

Troubleshooting information:
!!!!! DO NOT EDIT !!!!!
Name: ‪Sound Waves‬
URL: https://phet-dev.colorado.edu/html/sound-waves/1.0.0-dev.5/phet/sound-waves_all_phet.html
Version: 1.0.0-dev.5 2023-08-21 17:16:24 UTC
Features missing: applicationcache, applicationcache, touch
Flags: pixelRatioScaling
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Safari/605.1.15
Language: en-US
Window: 1196x618
Pixel Ratio: 2/1
WebGL: WebGL 1.0
GLSL: WebGL GLSL ES 1.0 (1.0)
Vendor: WebKit (WebKit WebGL)
Vertex: attribs: 16 varying: 30 uniform: 1024
Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32)
Max viewport: 16384x16384
OES_texture_float: true
Dependencies JSON: {}

Address TODOs

There were some TODO that did not reference GitHub issues, so were failing the "todo-should-have-issue" lint rule. They are temporarily referencing this issue.

Is it possible to increase font size?

Test device
MacBook Air M1 chip

Operating System
13.5

Browser
Safari 16.6

Problem description
For phetsims/qa#972, the font size is unusually small in this sim. I know this is meant to be a quick release, but I wanted to mention it.

Here is a comparison with Gravity and Orbits:
Screenshot 2023-08-21 at 3 30 26 PM

Troubleshooting information: !!!!! DO NOT EDIT !!!!! Name: ‪Sound Waves‬ URL: https://phet-dev.colorado.edu/html/sound-waves/1.0.0-dev.5/phet/sound-waves_all_phet.html? Version: 1.0.0-dev.5 2023-08-21 17:16:24 UTC Features missing: applicationcache, applicationcache, touch Flags: pixelRatioScaling User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Safari/605.1.15 Language: en-US Window: 1099x624 Pixel Ratio: 2/1 WebGL: WebGL 1.0 GLSL: WebGL GLSL ES 1.0 (1.0) Vendor: WebKit (WebKit WebGL) Vertex: attribs: 16 varying: 30 uniform: 1024 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32) Max viewport: 16384x16384 OES_texture_float: true Dependencies JSON: {}

"Cone effect" creates waves that do not follow Huygens' principle

The sound sim applies a "cone" effect for the sound waves, which looks like this:
SoundConeEffect

The physics displayed here are problematic both in terms of accuracy as well as pedagogy. The correct behavior is displayed in the 'Waves Intro' and 'Wave Interference' sims:
CorrectWaves

I strongly recommend removing this cone effect, as it is not an accurate model can be confusing to students (eg. Why am I able to hear sound from a speaker if I'm standing next to it and not in front of it?)

Audible sound drops to zero when listener is at a non-zero amplitude sound wave

To reproduce:

  • Open 'Intro' screen
  • Check 'Audio Enabled' and 'Listener'
  • Move the listener all the way to the right
  • The audio will be silent
Screen Shot 2023-08-14 at 12 38 06 PM

The sound should have a non-zero amplitude at this point, consistent with the inverse-square law. This is an important pedagogical aspect that should block publication in my opinion. It should be relatively straightforward to track this down and implement the correct audio behavior.

String keys do not follow PhET naming conventions

Noted while working on another cross-cutting issue...

Many of the string keys for this sim do not conform to PhET's naming conventions. Once the sim is published, PhET is effectively struck with those string keys. And that's a problem when a PhET-iO version is published, because the keys are used to name the string Properties that appear in the Studio tree.

Please see the item that begins with "Make sure the string keys are all perfect" in code-review-checklist.md. In general, keys should correspond as closely as possible to the English string values.

For example:

  "reflectionControlPanel.positionSlider": {
    "value": "Wall Position"
  },

should be:

  "reflectionControlPanel.wallPosition": {
    "value": "Wall Position"
  },

The nesting under reflectionControlPanel is also questionable and not typical, so I recommend simply:

  "wallPosition": {
    "value": "Wall Position"
  },

A prototype version of this sim was recently published. Hopefully these keys can still be changed.

Issues with ?stringTest=dynamic

Test device
MacBook Air M1 chip

Operating System
13.5

Browser
Safari 16.6

Problem description
For phetsims/qa#974, with ?stringTest=dynamic I am seeing two issues:

  1. The units on the ruler:
Screenshot 2023-08-30 at 3 57 10 PM
  1. The scales for Wall Position and Wall Angle can become misaligned:
Screenshot 2023-08-30 at 4 01 04 PM Screenshot 2023-08-30 at 4 01 14 PM
Troubleshooting information: !!!!! DO NOT EDIT !!!!! Name: ‪Sound Waves‬ URL: https://phet-dev.colorado.edu/html/sound-waves/1.0.0-rc.2/phet/sound-waves_all_phet.html?stringTest=dynamic Version: 1.0.0-rc.2 2023-08-28 14:05:18 UTC Features missing: applicationcache, applicationcache, touch Flags: pixelRatioScaling User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 Language: en-US Window: 1269x729 Pixel Ratio: 2/1 WebGL: WebGL 1.0 (OpenGL ES 2.0 Chromium) GLSL: WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium) Vendor: WebKit (WebKit WebGL) Vertex: attribs: 16 varying: 31 uniform: 1024 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32) Max viewport: 16384x16384 OES_texture_float: true Dependencies JSON: {}

Some features in the java sim are missing from dev version

Test device
MacBook Air M1 chip

Operating System
13.5

Browser
Safari 16.6

Problem description
For phetsims/qa#972 and related to #24:

  1. The "help" button that appeared on the first 3 screens of the java sim was removed. Perhaps indicator arrows should be used so that users know the listener (screens 1 and 3), and speaker (screen 2) can be moved?
  2. On the Measure Screen, the movable blue lines are missing. I didn't see this listed as a change in #24.

Visuals
Screenshot 2023-08-21 at 4 52 15 PM

Screenshot 2023-08-21 at 4 52 35 PM
Troubleshooting information: !!!!! DO NOT EDIT !!!!! Name: ‪Sound Waves‬ URL: https://phet-dev.colorado.edu/html/sound-waves/1.0.0-dev.5/phet/sound-waves_all_phet.html? Version: 1.0.0-dev.5 2023-08-21 17:16:24 UTC Features missing: applicationcache, applicationcache, touch Flags: pixelRatioScaling User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Safari/605.1.15 Language: en-US Window: 1099x624 Pixel Ratio: 2/1 WebGL: WebGL 1.0 GLSL: WebGL GLSL ES 1.0 (1.0) Vendor: WebKit (WebKit WebGL) Vertex: attribs: 16 varying: 30 uniform: 1024 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32) Max viewport: 16384x16384 OES_texture_float: true Dependencies JSON: {}

Unable to load debug version of sim

Test device
Samsung
Operating System
Win 11
Browser
Chrome
Problem description
For phetsims/qa#972
Trying to load the debug version of the sim fails and the errors pictured below show up in the console.

Visuals
bugdebug

Troubleshooting information:

!!!!! DO NOT EDIT !!!!!
Name: ‪Sound Waves‬
URL: https://phet-dev.colorado.edu/html/sound-waves/1.0.0-dev.5/phet/sound-waves_all_phet.html
Version: 1.0.0-dev.5 2023-08-21 17:16:24 UTC
Features missing: applicationcache, applicationcache, touch
Flags: pixelRatioScaling
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36
Language: en-US
Window: 1536x707
Pixel Ratio: 1.25/1
WebGL: WebGL 1.0 (OpenGL ES 2.0 Chromium)
GLSL: WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium)
Vendor: WebKit (WebKit WebGL)
Vertex: attribs: 16 varying: 31 uniform: 4096
Texture: size: 8192 imageUnits: 32 (vertex: 32, combined: 64)
Max viewport: 8192x8192
OES_texture_float: true
Dependencies JSON: {}

Listener's exact position is unclear in Two Sources screen

In the java version of the sim, the image of the person in the Two Sources screen makes it (relatively) clear that the person's ear is the location being represented by the sim audio. See screenshot:
Screen Shot 2023-08-15 at 9 18 14 AM

This is helpful for showing students the details of the interference pattern, where behavior can change quickly in short distances. The current version of the Sound sim makes it unclear which point is being represented:
Screen Shot 2023-08-15 at 9 19 57 AM

I recommend adding a small addition to the graphics of the person, such as a dot or an 'x' marking the location that is represented by the sim audio.

Layout improvements

While reviewing the sim, I saw the layout looks like this:

image

This seems unbalanced, can we please try the following?

  1. Move the play/pause buttons to the right, under the control panels
  2. Scale the sound box (maintaining aspect ratio) so that it fills the dev bounds vertically
  3. Left-align the sound box with the left edge of the dev bounds
  4. Make the control panel fonts and controls larger
  5. For the control panel and reset all button, use the same margin on the top/right/bottom edges

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

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.

What should happen when I change amplitude with frequency=0Hz?

Test device
MacBook Air M1 chip

Operating System
13.5

Browser
Safari 16.6

Problem description
For phetsims/qa#972, the behavior is different between 1.0.0-dev.5 and the java sim when I change the amplitude while the frequency has a value of 0 Hz. In the java sim nothing happens while in the current dev version a wave is produced. I wasn't sure what the behavior should be.

Steps to reproduce
Compare these steps in both versions:

  1. On any screen, move the frequency slider to 0 Hz.
  2. Once there are no more waves on the screen, move the amplitude slider.

Visuals

zeroFrequency.mp4
Troubleshooting information: !!!!! DO NOT EDIT !!!!! Name: ‪Sound Waves‬ URL: https://phet-dev.colorado.edu/html/sound-waves/1.0.0-dev.5/phet/sound-waves_all_phet.html? Version: 1.0.0-dev.5 2023-08-21 17:16:24 UTC Features missing: applicationcache, applicationcache, touch Flags: pixelRatioScaling User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Safari/605.1.15 Language: en-US Window: 1099x624 Pixel Ratio: 2/1 WebGL: WebGL 1.0 GLSL: WebGL GLSL ES 1.0 (1.0) Vendor: WebKit (WebKit WebGL) Vertex: attribs: 16 varying: 30 uniform: 1024 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32) Max viewport: 16384x16384 OES_texture_float: true Dependencies JSON: {}

Audio control 'Speaker' option doesn't have a sonified location

The current design of the sim has a checkbox for 'Audio Enabled', along with two radio buttons for 'Speaker' and 'Listener'. When reviewing the sim features, it was discovered that this design created problems with pedagogy and UX.

UX issues:

  • Setting the default value to 'Speaker' makes it unclear what location is being sonified. When this option is checked, moving the person closer or further from the speaker does not have an effect on the audio. During testing, @KatieWoe and I found to be confusing and initially thought it was a bug. At the very least, I recommend making the default setting 'Listener' so that the audio represents the sound heard by the person.

Pedagogical issues:

  • Sonification should make clear what location is being represented by the audio. Sound intensity approaches infinity as distance approaches zero, so the sim is already choosing a "default" distance for the 'Speaker' setting but it is not clear to the user what this distance is.
  • The speaker does not have an "absolute" sound intensity that can be sonified. Sound intensity is inherently connected to distance from the source, and with the 'Speaker' option selected it is unclear where the sonified location is for this setting.
  • In the 'Air Pressure' screen, the speaker will not create any sound waves if all air is removed from the speaker box. On this screen, the 'Speaker' setting still plays sound. This is especially confusing, because there would be no sound waves produced anywhere.

I recommend removing the 'Speaker' setting altogether and set the audio checkbox to 'Enable Listener Audio. This would only enable sonificiation on the screens in which there is a listener, which I feel is more than enough for users to explore sonification and the roles of frequency, amplitude and interference throughout the sim. This allows the user to still hear what the different frequencies and amplitudes of the speaker will sound like to the person on the screen in a more straightforward and pedagogically rigorous way.

Extreme low frequencies are problematic

In dev testing, it was noted that extreme low frequencies (under 50 Hz) lead to issues such as #30 and #33, as well as visual problems with the frame-by-frame animation of the vibrating speaker.

These extreme low frequencies do not add to the pedagogical value of the sim, and I recommend capping the minimum frequency at 100 Hz. This will still allow users to study the relationship between frequency and wavelength, without breaking the limitations of the speaker animation system and Amplitude / Pulse controls.

Convert to TypeScript

It is about 2000 LOC, may be good to do a mini-review while converting to TypeScript

Distortion of waves along horizontal line

In the 'Two Sources' screen, I noticed some distortion of the waves along a horizontal line above the top speaker. See below:
Screen Shot 2023-08-14 at 1 59 30 PM

Removing this seems worth investigating since it is visually noticeable students may ask about it.

CT Build failed with status code 1:

sound-waves : build
Build failed with status code 1:
Running "report-media" task

Running "clean" task

Running "build" task
>> tsc complete: 26383ms
Building runnable repository (sound-waves, brands: phet)
Building brand: phet
>> Webpack build complete: 5969ms
>> Unused string: key=singleSource.help.listener, value=Listener can be moved left and right
>> Unused string: key=measure.help.stick, value=Use meter stick to measure waves
>> Unused string: key=measure.help.blueLines, value=Blue lines can be moved left and right to help mark measurement points on waves
>> Unused string: key=twoSource.help.upperSpeaker, value=Upper speaker can be moved up and down
>> Unused string: key=twoSource.help.listener, value=Listener can be moved in all directions
>> Unused string: key=airDensityControlPanel.removeAir, value=Remove Air from Box
>> Unused string: key=airDensityControlPanel.addAir, value=Add Air to Box
Fatal error: Perennial task failed:
AssertionError [ERR_ASSERTION] [ERR_ASSERTION]: missing entry for sim title, key = SOUND_WAVES/sound-waves.title
at module.exports (/data/share/phet/continuous-testing/ct-main/ct-snapshots/1692628041596/chipper/js/grunt/buildRunnable.js:157:3)
at /data/share/phet/continuous-testing/ct-main/ct-snapshots/1692628041596/chipper/js/grunt/Gruntfile.js:298:15
at Object.startAsync (/data/share/phet/continuous-testing/ct-main/ct-snapshots/1692628041596/perennial-alias/js/common/phetTimingLog.js:133:20)
at /data/share/phet/continuous-testing/ct-main/ct-snapshots/1692628041596/chipper/js/grunt/Gruntfile.js:297:13
at Object.startAsync (/data/share/phet/continuous-testing/ct-main/ct-snapshots/1692628041596/perennial-alias/js/common/phetTimingLog.js:133:20)
at /data/share/phet/continuous-testing/ct-main/ct-snapshots/1692628041596/chipper/js/grunt/Gruntfile.js:225:7
at wrap (/data/share/phet/continuous-testing/ct-main/ct-snapshots/1692628041596/chipper/js/grunt/Gruntfile.js:69:7)

Full Error details:
AssertionError [ERR_ASSERTION]: missing entry for sim title, key = SOUND_WAVES/sound-waves.title�
Snapshot from 8/21/2023, 8:27:21 AM

What should this sim and repo be named?

On Monday Sept 26, @samreid said in a slack message with @arouinfar and @kathy-phet 👍

Hi Kathy & Amy, I responded to an email about incorporating a 3rd party (Jan and Piet) implementation of the PhET Sound simulation into our codebase. What do you want to call the repo + sim name for the HTML implementation? It looks like the repo name in Java was “sound”, and the Java title was “Sound Waves”.

@arouinfar replied:

Are you talking about this sim? Seems like it’s just called “Sound”. I double checked the sim itself and the name in the table on the Admin > Simulations page.

I replied:

OK sounds good, thanks

Today @pixelzoom said:

Based on your other posts, I’m guessing this is a new sim. And I’m sort of surprised by such a generic-sounding sim name.

This sim uses a lot of code from wave interference

There are currently 52 imports from wave-interference, including images, sound effects, UI components, etc. Should we treat "wave-interference" like a common code dependency (like circuit-construction-kit-common, or density-buoyancy-common), or should we take time to move things to tambo, scenery-phet, etc?

@kathy-phet and @pixelzoom what do you recommend?

Waves look odd when the wall is moved while paused

Test device
MacBook Air (m1 chip)

Operating System
13.5

Browser
safari 16.5

Problem description
For phetsims/qa#974, this might be outside the scope of this release, but it looks really odd to me that the wave doesn't disappear/update when the wall is moved during pause.

Steps to reproduce

  1. Go to the Reflection Screen and pause the sim after waves have reached the wall
  2. Move the Wall Angle slider all the way to the right
  3. Press play and then pause again
  4. Move the Wall Position slider all the way to the right

Visuals
Screenshot 2023-08-30 at 1 37 19 PM

Screenshot 2023-08-30 at 1 37 32 PM
Troubleshooting information: !!!!! DO NOT EDIT !!!!! Name: ‪Sound Waves‬ URL: https://phet-dev.colorado.edu/html/sound-waves/1.0.0-rc.2/phet/sound-waves_all_phet.html Version: 1.0.0-rc.2 2023-08-28 14:05:18 UTC Features missing: applicationcache, applicationcache, touch Flags: pixelRatioScaling User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Safari/605.1.15 Language: en-US Window: 1346x717 Pixel Ratio: 2/1 WebGL: WebGL 1.0 GLSL: WebGL GLSL ES 1.0 (1.0) Vendor: WebKit (WebKit WebGL) Vertex: attribs: 16 varying: 30 uniform: 1024 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32) Max viewport: 16384x16384 OES_texture_float: true Dependencies JSON: {}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.