Skip to content

Commit

Permalink
spatialized vibration sound, see #284
Browse files Browse the repository at this point in the history
  • Loading branch information
jbphet committed Mar 3, 2020
1 parent 1689a47 commit 60bd2be
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js/moleculesandlight/view/MoleculesAndLightScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import rotationCounterclockwiseSoundInfo from '../../../sounds/rotate-counterclo
import rotationDirections001SoundInfo from '../../../sounds/rotate-directions-001-spatialized_mp3.js';
import rotationDirections002SoundInfo from '../../../sounds/rotate-directions-002-spatialized_mp3.js';
import vibrationSoundInfo from '../../../sounds/vibration_mp3.js';
import vibrationSpatializedSoundInfo from '../../../sounds/vibration-spatialized_mp3.js';
import MALConstants from '../../common/MALConstants.js';
import MoleculesAndLightA11yStrings from '../../common/MoleculesAndLightA11yStrings.js';
import moleculesAndLightStrings from '../../molecules-and-light-strings.js';
Expand Down Expand Up @@ -311,7 +312,8 @@ function MoleculesAndLightScreenView( photonAbsorptionModel, tandem ) {
};

// molecule vibration sound
const moleculeVibrationLoop = new SoundClip( vibrationSoundInfo, {
const moleculeVibrationSoundInfo = MALConstants.USE_SPATIALIZED_SOUNDS ? vibrationSpatializedSoundInfo : vibrationSoundInfo;
const moleculeVibrationLoop = new SoundClip( moleculeVibrationSoundInfo, {
initialOutputLevel: 0.4,
loop: true,
enableControlProperties: [ photonAbsorptionModel.runningProperty ]
Expand Down
8 changes: 8 additions & 0 deletions sounds/license.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,5 +126,13 @@
"projectURL": "http://phet.colorado.edu",
"license": "contact [email protected]",
"notes": "created by Ashton Morris (PhET Interactive Simulations)"
},
"vibration-spatialized.mp3": {
"text": [
"Copyright 2020 University of Colorado Boulder"
],
"projectURL": "http://phet.colorado.edu",
"license": "contact [email protected]",
"notes": "created by Ashton Morris (PhET Interactive Simulations)"
}
}
Binary file added sounds/vibration-spatialized.mp3
Binary file not shown.
5 changes: 5 additions & 0 deletions sounds/vibration-spatialized_mp3.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 60bd2be

Please sign in to comment.