Skip to content

Commit

Permalink
new sounds to try for grab/release of balloons, see #480
Browse files Browse the repository at this point in the history
  • Loading branch information
jbphet committed Feb 16, 2021
1 parent 2bb3dbd commit 3c83482
Show file tree
Hide file tree
Showing 30 changed files with 202 additions and 138 deletions.
10 changes: 8 additions & 2 deletions js/balloons-and-static-electricity/view/BalloonNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,14 @@ import Rectangle from '../../../../scenery/js/nodes/Rectangle.js';
import SoundClip from '../../../../tambo/js/sound-generators/SoundClip.js';
import soundManager from '../../../../tambo/js/soundManager.js';
import Utterance from '../../../../utterance-queue/js/Utterance.js';
import grabBalloonSound from '../../../sounds/balloon-grab_mp3.js';
import releaseBalloonSound from '../../../sounds/balloon-release_mp3.js';
import grabBalloonSound from '../../../sounds/balloon-grab-002_mp3.js';
// import grabBalloonSound from '../../../sounds/balloon-grab-003_mp3.js';
// import grabBalloonSound from '../../../sounds/balloon-grab-004_mp3.js';
// import grabBalloonSound from '../../../sounds/balloon-grab-005_mp3.js';
import releaseBalloonSound from '../../../sounds/balloon-release-002_mp3.js';
// import releaseBalloonSound from '../../../sounds/balloon-release-003_mp3.js';
// import releaseBalloonSound from '../../../sounds/balloon-release-004_mp3.js';
// import releaseBalloonSound from '../../../sounds/balloon-release-005_mp3.js';
import balloonsAndStaticElectricity from '../../balloonsAndStaticElectricity.js';
import BASEA11yStrings from '../BASEA11yStrings.js';
import BASEQueryParameters from '../BASEQueryParameters.js';
Expand Down
Binary file removed sounds/balloon-grab-001.mp3
Binary file not shown.
21 changes: 0 additions & 21 deletions sounds/balloon-grab-001_mp3.js

This file was deleted.

Binary file added sounds/balloon-grab-002.mp3
Binary file not shown.
21 changes: 21 additions & 0 deletions sounds/balloon-grab-002_mp3.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/* eslint-disable */
import asyncLoader from '../../phet-core/js/asyncLoader.js';
import base64SoundToByteArray from '../../tambo/js/base64SoundToByteArray.js';
import WrappedAudioBuffer from '../../tambo/js/WrappedAudioBuffer.js';
import phetAudioContext from '../../tambo/js/phetAudioContext.js';

const soundURI = 'data:audio/mpeg;base64,//swxAAABEwXPVQxgBFvk63zHsAAUAEJIkqUB+F1zgcWH4IYIYP8ocWD6g/y5/+nwQ/3/D/5c/ACAAESiQAAAghsBFZ5VLBGRRsUYr4jabL4hAL4xRYl2vXgfPAid9YsonPlaaPpyh66qktJ17t/mlHcdWxqmlziH2zMy7E1MP356DIkaBi1oS0x5QXSAFJ7vX9j1ZYeDvEu2uqs//syxAQACAylXhmFAAEjD+p3HpAAFUABrozdqZNQQVWPwdXhkG0JTS0EIRR5XfECeQhen+mKosiCKFzqfxVc0w0pX/xaQ4hae/UFVuLAAAACMfaIVhoIBEAAADtFPTgh2OXhds+/0C2Yl/EwBESv4WDzRBRF9p5QqruxW//A1N7LONRvP//WsqFgEPdoGBFGg92TiyzUqoawcA0s7f/7MsQDAAhUo1e49AABEBNxtx6wAgYAgGQAAAADkcYlzoEYj7ktmx+IyLXXm5H54eDEnURiQDlh2L3dXb95xk2RHMXO2WiTafaz1SH9G0Z98SBwN2SyCSx6IJBoAAAAf/OR3/3T8ZGZulzkQoL8n4zQKh3frQTDeyG3x5oUGRqOo0NWMqN/Rumy4tv//Xs7RlZzvvWWVW22wi3DaUz/+zLEA4AIYFN/uJSAAKGMJqeEMAagCChKLwAOJOJvEnRCEY9IESwflIXTSZ8oxwNOO7WzlfT00kdOmAiZMndRMcgOH36yoRkXO/La/6t2pBIpaa25LDerUNAgIVLQxMx6lsWzMeq6iS26phQE6DT+JTqMS9bv93X9SkxBTUUzLjk5LjWqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq';
const soundByteArray = base64SoundToByteArray( phetAudioContext, soundURI );
const unlock = asyncLoader.createLock( soundURI );
const wrappedAudioBuffer = new WrappedAudioBuffer();
const onDecodeSuccess = decodedAudio => {
wrappedAudioBuffer.audioBufferProperty.set( decodedAudio );
unlock();
};
const onDecodeError = decodeError => {
console.warn( 'decode of audio data failed, using stubbed sound, error: ' + decodeError );
wrappedAudioBuffer.audioBufferProperty.set( phetAudioContext.createBuffer( 1, 0, phetAudioContext.sampleRate ) );
unlock();
};
phetAudioContext.decodeAudioData( soundByteArray.buffer, onDecodeSuccess, onDecodeError );
export default wrappedAudioBuffer;
Binary file added sounds/balloon-grab-003.mp3
Binary file not shown.
21 changes: 21 additions & 0 deletions sounds/balloon-grab-003_mp3.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/* eslint-disable */
import asyncLoader from '../../phet-core/js/asyncLoader.js';
import base64SoundToByteArray from '../../tambo/js/base64SoundToByteArray.js';
import WrappedAudioBuffer from '../../tambo/js/WrappedAudioBuffer.js';
import phetAudioContext from '../../tambo/js/phetAudioContext.js';

const soundURI = 'data:audio/mpeg;base64,//swxAAABCgDE1QRgDF7Dez3O7AC/EVpNi0QADgfzhd5ApLlDhyfBAoNB8ocOf+f/7S//+Uk3FKrhcrpM7oGAAAAAALFcHA8JCDAtyLtmMVQnMfwgiL+tsj4b2RIZsCm7dIHAkXOYbTPTSt1xHkvmJCJkBCYKIVNbsWO4FuTAANGZMvX1uWO4XvTRXwre3WGIty5I+5KWMAiy2yL//syxAOACISLTbj1gAChAOSrsCAGbSQAAAAAAJ3is0b504JfHsvG6CObxjUOVx8mUanUaz7HqNjkM1vDyf4NnQ+9e2slkOl27IC/8wcISoS7dYAApJJlFQBHmXS4CuBpQdqPCmqwOknGP7txK2v/nr5ZR7Zu/cq2NtLKDsktu1F1AgAavWg294qlkBJahCEfp0C0Vz1C2bP//0gJRv/7MsQRAAP0BTejhGAw0ABk9GEIBuSxyNtuAGBwqNTI3JASQbctzBVglmgLNGg4DXit3omj3U+pAFFTIKrpDYM1VC2mPgJNAkwGwG2AAAGae/QKt/ireKdaTEFNRTMuOTkuNaqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqr/+zLEKwPCNAEboARAMAAANIAAAASqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq';
const soundByteArray = base64SoundToByteArray( phetAudioContext, soundURI );
const unlock = asyncLoader.createLock( soundURI );
const wrappedAudioBuffer = new WrappedAudioBuffer();
const onDecodeSuccess = decodedAudio => {
wrappedAudioBuffer.audioBufferProperty.set( decodedAudio );
unlock();
};
const onDecodeError = decodeError => {
console.warn( 'decode of audio data failed, using stubbed sound, error: ' + decodeError );
wrappedAudioBuffer.audioBufferProperty.set( phetAudioContext.createBuffer( 1, 0, phetAudioContext.sampleRate ) );
unlock();
};
phetAudioContext.decodeAudioData( soundByteArray.buffer, onDecodeSuccess, onDecodeError );
export default wrappedAudioBuffer;
Binary file added sounds/balloon-grab-004.mp3
Binary file not shown.
21 changes: 21 additions & 0 deletions sounds/balloon-grab-004_mp3.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/* eslint-disable */
import asyncLoader from '../../phet-core/js/asyncLoader.js';
import base64SoundToByteArray from '../../tambo/js/base64SoundToByteArray.js';
import WrappedAudioBuffer from '../../tambo/js/WrappedAudioBuffer.js';
import phetAudioContext from '../../tambo/js/phetAudioContext.js';

const soundURI = 'data:audio/mpeg;base64,//swxAAAA5wREZRhgDGNGOs3NLACAADTcnxiAF6CAAAIOTPvSo4yf1Ah8+v//L//+D5Iss1122u20FolAYAADgOIYEMHBTF4SYEvOkDo7vnNDILYeu9irTmtgiB4JRiB0ChwvjIAvA+KgHNXXYHiaaB8A6S4v3wQyaReeIVV1//9OY0+mpJ40qf/+uvZTlSpF5xv/XSqAAWlu1tw//syxAMASGCDXb2WACkGCaplnaRpAADol7TMnPYo53AeIvOmvXKW3EJTLoch/hLHh1ZU6UwloZqTON91cV0kXfCxZauZWe5aXL02sGM27Z+OZwDAAAKgeNchkxHElhxHSaaSAIoX5Eog6k8/rAmjtcc8CiVpnnBGEAaBIqpa155ES4EVEm+iJLaS0idLcSnSg1/5qqUHL9pddawAw//7MsQEgAiUfWesMKrxCwyrdPYZTpSmtBK6GGGiMOgrt5czWwhYsnLB6cpE9pahXKvVHdqEE2DWK7KbmZJRCSKKKFGELGte0RGUA6ZYls5dQ2glNbZI20gK20ELCRgfgEZXmIuEylRd7A93PbrgSizdSxNosrDPjVfxD7u+igqNXRuKKJn1zdikoRK23fT1lW0PrVUEmW22RyNkgUL/+zLEBIAITItVoDxh8RoSKHTEjRzaLCYhr6UTgXI9UBHRq9hXNkKMqx1ZyxdYAcfQcFp1i2RBd9PK+vcjzBKMWRDQVDJR06ARE37Ha/0kge/eaW2xkCywKikbiYDKoJCStELIxg+yq0iTZXUMBnHASZuKAif1lqrqQF+eaw/1LjbBSRZZ1dZ0sCuSaCqwVlZWBj3/1gAEhaLrLIBA//swxAQDxDQDMaAMIDAAADSAAAAEDIjMjC21Yq7bCrtbOkWFzNuwzbt/57///01MQU1FMy45OS41VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV';
const soundByteArray = base64SoundToByteArray( phetAudioContext, soundURI );
const unlock = asyncLoader.createLock( soundURI );
const wrappedAudioBuffer = new WrappedAudioBuffer();
const onDecodeSuccess = decodedAudio => {
wrappedAudioBuffer.audioBufferProperty.set( decodedAudio );
unlock();
};
const onDecodeError = decodeError => {
console.warn( 'decode of audio data failed, using stubbed sound, error: ' + decodeError );
wrappedAudioBuffer.audioBufferProperty.set( phetAudioContext.createBuffer( 1, 0, phetAudioContext.sampleRate ) );
unlock();
};
phetAudioContext.decodeAudioData( soundByteArray.buffer, onDecodeSuccess, onDecodeError );
export default wrappedAudioBuffer;
Binary file added sounds/balloon-grab-005.mp3
Binary file not shown.
21 changes: 21 additions & 0 deletions sounds/balloon-grab-005_mp3.js

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

Binary file removed sounds/balloon-grab.mp3
Binary file not shown.
21 changes: 0 additions & 21 deletions sounds/balloon-grab_mp3.js

This file was deleted.

Binary file removed sounds/balloon-release-001.mp3
Binary file not shown.
Loading

0 comments on commit 3c83482

Please sign in to comment.