Skip to content

Commit

Permalink
updated sounds for energized molecules, see #216
Browse files Browse the repository at this point in the history
  • Loading branch information
jbphet committed Oct 14, 2019
1 parent fe12480 commit c8a40f2
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 8 deletions.
20 changes: 13 additions & 7 deletions js/moleculesandlight/view/MoleculesAndLightScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ define( require => {

// sounds
const brokeApartSoundInfo = require( 'sound!MOLECULES_AND_LIGHT/break-apart.mp3' );
const moleculeEnergizedSoundInfo = require( 'sound!MOLECULES_AND_LIGHT/absorb-loop.mp3' );
const moleculeEnergizedLoopInfo = require( 'sound!MOLECULES_AND_LIGHT/glow-loop.mp3' );
const moleculeEnergizedStartSoundInfo = require( 'sound!MOLECULES_AND_LIGHT/glow-start-one-shot.mp3' );
const rotateSoundInfo = require( 'sound!MOLECULES_AND_LIGHT/rotate-loop.mp3' );
const vibratingLoopSoundInfo = require( 'sound!MOLECULES_AND_LIGHT/vibration-loop-001.mp3' );
const vibrationStartSoundInfo = require( 'sound!MOLECULES_AND_LIGHT/vibration-one-shot-for-loop-start.mp3' );
Expand Down Expand Up @@ -260,18 +261,23 @@ define( require => {
// sound generation
//-----------------------------------------------------------------------------------------------------------------

// photon absorbed sound
const moleculeEnergizedSound = new SoundClip( moleculeEnergizedSoundInfo, {
// sound to play when molecule becomes "energized", which is depicted as glowing in the view
const moleculeEnergizedLoop = new SoundClip( moleculeEnergizedLoopInfo, {
loop: true,
initialOutputLevel: 0.05
initialOutputLevel: 0.4
} );
soundManager.addSoundGenerator( moleculeEnergizedSound );
soundManager.addSoundGenerator( moleculeEnergizedLoop );
const moleculeEnergizedStartSound = new SoundClip( moleculeEnergizedStartSoundInfo, {
initialOutputLevel: 0.7
} );
soundManager.addSoundGenerator( moleculeEnergizedStartSound );
const moleculeEnergizedSoundPlayer = moleculeEnergized => {
if ( moleculeEnergized ) {
moleculeEnergizedSound.play();
moleculeEnergizedStartSound.play();
moleculeEnergizedLoop.play();
}
else {
moleculeEnergizedSound.stop();
moleculeEnergizedLoop.stop();
}
};

Expand Down
Binary file removed sounds/absorb-loop.mp3
Binary file not shown.
Binary file added sounds/glow-loop.mp3
Binary file not shown.
Binary file added sounds/glow-start-one-shot.mp3
Binary file not shown.
10 changes: 9 additions & 1 deletion sounds/license.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
{
"absorb-loop.mp3": {
"glow-loop.mp3": {
"text": [
"Copyright 2018 University of Colorado Boulder"
],
"projectURL": "http://phet.colorado.edu",
"license": "contact [email protected]",
"notes": "created by Ashton Morris (PhET Interactive Simulations)"
},
"glow-start-one-shot.mp3": {
"text": [
"Copyright 2018 University of Colorado Boulder"
],
Expand Down

0 comments on commit c8a40f2

Please sign in to comment.