Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Adding sound and music to objects
Old
Meg12687
Junior Member
 
Status: Offline
Posts: 12
Join Date: Dec 2011
Location: somewhere in the mid atlantic states
Exclamation Adding sound and music to objects - 12-10-2011, 12:03 PM

I added a .wav sound file to 1 of my objects. When I hit the space bar button for the event to work, I get an error saying:

Error during simulation.

Alice version: 2.2 06/15/2010

Throwable that caused the error:

java.lang.IllegalArgumentException: Requested value 7.9588003 exceeds allowable maximum value 6.0206.

at javax.sound.sampled.FloatControl.setValue(FloatCon trol.java:178)

at com.sun.media.sound.DirectAudioDevice$DirectDL$Gai n.setValue(DirectAudioDevice.java:833)

at com.sun.media.renderer.audio.device.JavaSoundOutpu t.setGain(JavaSoundOutput.java:157)

at com.sun.media.renderer.audio.JavaSoundRenderer$GCA .setLevel(JavaSoundRenderer.java:202)

at edu.cmu.cs.stage3.media.jmfmedia.Player.updateVolu meLevel(Player.java:104)

at edu.cmu.cs.stage3.media.jmfmedia.Player.setVolumeL evel(Player.java:111)

at edu.cmu.cs.stage3.alice.core.response.SoundRespons e$RuntimeSoundResponse.updateVolumeLevel(SoundResp onse.java:94)

at edu.cmu.cs.stage3.alice.core.response.SoundRespons e$RuntimeSoundResponse.prologue(SoundResponse.java :154)

at edu.cmu.cs.stage3.alice.core.behavior.TriggerBehav ior.internalSchedule(TriggerBehavior.java:68)

at edu.cmu.cs.stage3.alice.core.Behavior.schedule(Beh avior.java:233)

at edu.cmu.cs.stage3.alice.core.Sandbox.scheduleBehav iors(Sandbox.java:70)

at edu.cmu.cs.stage3.alice.core.World.scheduleBehavio rs(World.java:457)

at edu.cmu.cs.stage3.alice.core.World.schedule(World. java:499)

at edu.cmu.cs.stage3.alice.core.clock.DefaultClock.sc hedule(DefaultClock.java:99)

at edu.cmu.cs.stage3.alice.authoringtool.AuthoringToo l$7.run(AuthoringTool.java:692)

at edu.cmu.cs.stage3.alice.authoringtool.util.Default Scheduler.simulateOnce(DefaultScheduler.java:115)

at edu.cmu.cs.stage3.alice.authoringtool.util.Default Scheduler.run(DefaultScheduler.java:76)

at edu.cmu.cs.stage3.scheduler.AbstractScheduler.run( AbstractScheduler.java:45)

at java.awt.event.InvocationEvent.dispatch(Invocation Event.java:209)

at java.awt.EventQueue.dispatchEvent(EventQueue.java: 597)

at java.awt.EventDispatchThread.pumpOneEventForFilter s(EventDispatchThread.java:269)

at java.awt.EventDispatchThread.pumpEventsForFilter(E ventDispatchThread.java:184)

at java.awt.EventDispatchThread.pumpEventsForFilter(E ventDispatchThread.java:178)

at java.awt.Dialog$1.run(Dialog.java:1047)

at java.awt.Dialog$3.run(Dialog.java:1099)

at java.security.AccessController.doPrivileged(Native Method)

at java.awt.Dialog.show(Dialog.java:1097)

at java.awt.Component.show(Component.java:1447)

at java.awt.Component.setVisible(Component.java:1400)

at java.awt.Window.setVisible(Window.java:824)

at java.awt.Dialog.setVisible(Dialog.java:987)

at edu.cmu.cs.stage3.swing.DialogManager.showModalDia log(DialogManager.java:61)

at edu.cmu.cs.stage3.swing.DialogManager.showDialog(D ialogManager.java:131)

at edu.cmu.cs.stage3.alice.authoringtool.AuthoringToo l.play(AuthoringTool.java:5145)

at edu.cmu.cs.stage3.alice.authoringtool.Actions$16.a ctionPerformed(Actions.java:176)

at javax.swing.AbstractButton.fireActionPerformed(Abs tractButton.java:1995)

at javax.swing.AbstractButton$Handler.actionPerformed (AbstractButton.java:2318)

at javax.swing.DefaultButtonModel.fireActionPerformed (DefaultButtonModel.java:387)

at javax.swing.DefaultButtonModel.setPressed(DefaultB uttonModel.java:242)

at javax.swing.plaf.basic.BasicButtonListener.mouseRe leased(BasicButtonListener.java:236)

at java.awt.AWTEventMulticaster.mouseReleased(AWTEven tMulticaster.java:272)

at java.awt.Component.processMouseEvent(Component.jav a:6134)

at javax.swing.JComponent.processMouseEvent(JComponen t.java:3265)

at java.awt.Component.processEvent(Component.java:589 9)

at java.awt.Container.processEvent(Container.java:202 3)

at java.awt.Component.dispatchEventImpl(Component.jav a:4501)

at java.awt.Container.dispatchEventImpl(Container.jav a:2081)

at java.awt.Component.dispatchEvent(Component.java:43 31)

at java.awt.LightweightDispatcher.retargetMouseEvent( Container.java:4301)

at java.awt.LightweightDispatcher.processMouseEvent(C ontainer.java:3965)

at java.awt.LightweightDispatcher.dispatchEvent(Conta iner.java:3895)

at java.awt.Container.dispatchEventImpl(Container.jav a:2067)

at java.awt.Window.dispatchEventImpl(Window.java:2458 )

at java.awt.Component.dispatchEvent(Component.java:43 31)

at java.awt.EventQueue.dispatchEvent(EventQueue.java: 599)

at java.awt.EventDispatchThread.pumpOneEventForFilter s(EventDispatchThread.java:269)

at java.awt.EventDispatchThread.pumpEventsForFilter(E ventDispatchThread.java:184)

at java.awt.EventDispatchThread.pumpEventsForHierarch y(EventDispatchThread.java:174)

at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:169)

at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:161)

at java.awt.EventDispatchThread.run(EventDispatchThre ad.java:122)"


"Error during world stop.




Alice version: 2.2 06/15/2010



Throwable that caused the error:

java.lang.NullPointerException

at edu.cmu.cs.stage3.alice.core.Behavior$RuntimeStack .pop(Behavior.java:49)

at edu.cmu.cs.stage3.alice.core.Behavior.popStack(Beh avior.java:367)

at edu.cmu.cs.stage3.alice.core.response.LoopNInOrder $RuntimeLoopNInOrder.epilogue(LoopNInOrder.java:11 0)

at edu.cmu.cs.stage3.alice.core.response.CompositeRes ponse$RuntimeCompositeResponse.childrenEpiloguesIf Necessary(CompositeResponse.java:67)

at edu.cmu.cs.stage3.alice.core.response.CompositeRes ponse$RuntimeCompositeResponse.epilogue(CompositeR esponse.java:74)

at edu.cmu.cs.stage3.alice.core.response.DoTogether$R untimeDoTogether.epilogue(DoTogether.java:85)

at edu.cmu.cs.stage3.alice.core.response.CompositeRes ponse$RuntimeCompositeResponse.childrenEpiloguesIf Necessary(CompositeResponse.java:67)

at edu.cmu.cs.stage3.alice.core.response.CompositeRes ponse$RuntimeCompositeResponse.epilogue(CompositeR esponse.java:74)

at edu.cmu.cs.stage3.alice.core.response.CallToUserDe finedResponse$RuntimeCallToUserDefinedResponse.epi logue(CallToUserDefinedResponse.java:98)

at edu.cmu.cs.stage3.alice.core.response.CompositeRes ponse$RuntimeCompositeResponse.childrenEpiloguesIf Necessary(CompositeResponse.java:67)

at edu.cmu.cs.stage3.alice.core.response.CompositeRes ponse$RuntimeCompositeResponse.epilogue(CompositeR esponse.java:74)

at edu.cmu.cs.stage3.alice.core.response.DoTogether$R untimeDoTogether.epilogue(DoTogether.java:85)

at edu.cmu.cs.stage3.alice.core.response.CompositeRes ponse$RuntimeCompositeResponse.childrenEpiloguesIf Necessary(CompositeResponse.java:67)

at edu.cmu.cs.stage3.alice.core.response.CompositeRes ponse$RuntimeCompositeResponse.epilogue(CompositeR esponse.java:74)

at edu.cmu.cs.stage3.alice.core.response.CallToUserDe finedResponse$RuntimeCallToUserDefinedResponse.epi logue(CallToUserDefinedResponse.java:98)

at edu.cmu.cs.stage3.alice.core.Response$RuntimeRespo nse.stop(Response.java:116)

at edu.cmu.cs.stage3.alice.core.behavior.TriggerBehav ior.stopAllRuntimeResponses(TriggerBehavior.java:9 9)

at edu.cmu.cs.stage3.alice.core.Behavior.stopped(Beha vior.java:396)

at edu.cmu.cs.stage3.alice.core.Element.stopped(Eleme nt.java:1875)

at edu.cmu.cs.stage3.alice.core.World.stop(World.java :509)

at edu.cmu.cs.stage3.alice.core.clock.DefaultClock.st op(DefaultClock.java:58)

at edu.cmu.cs.stage3.alice.authoringtool.AuthoringToo l.worldStopRunning(AuthoringTool.java:5090)

at edu.cmu.cs.stage3.alice.authoringtool.dialog.Rende rContentPane.postDialogShow(RenderContentPane.java :226)

at edu.cmu.cs.stage3.swing.DialogManager.showDialog(D ialogManager.java:132)

at edu.cmu.cs.stage3.alice.authoringtool.AuthoringToo l.play(AuthoringTool.java:5145)

at edu.cmu.cs.stage3.alice.authoringtool.Actions$16.a ctionPerformed(Actions.java:176)

at javax.swing.AbstractButton.fireActionPerformed(Abs tractButton.java:1995)

at javax.swing.AbstractButton$Handler.actionPerformed (AbstractButton.java:2318)

at javax.swing.DefaultButtonModel.fireActionPerformed (DefaultButtonModel.java:387)

at javax.swing.DefaultButtonModel.setPressed(DefaultB uttonModel.java:242)

at javax.swing.plaf.basic.BasicButtonListener.mouseRe leased(BasicButtonListener.java:236)

at java.awt.AWTEventMulticaster.mouseReleased(AWTEven tMulticaster.java:272)

at java.awt.Component.processMouseEvent(Component.jav a:6134)

at javax.swing.JComponent.processMouseEvent(JComponen t.java:3265)

at java.awt.Component.processEvent(Component.java:589 9)

at java.awt.Container.processEvent(Container.java:202 3)

at java.awt.Component.dispatchEventImpl(Component.jav a:4501)

at java.awt.Container.dispatchEventImpl(Container.jav a:2081)

at java.awt.Component.dispatchEvent(Component.java:43 31)

at java.awt.LightweightDispatcher.retargetMouseEvent( Container.java:4301)

at java.awt.LightweightDispatcher.processMouseEvent(C ontainer.java:3965)

at java.awt.LightweightDispatcher.dispatchEvent(Conta iner.java:3895)

at java.awt.Container.dispatchEventImpl(Container.jav a:2067)

at java.awt.Window.dispatchEventImpl(Window.java:2458 )

at java.awt.Component.dispatchEvent(Component.java:43 31)

at java.awt.EventQueue.dispatchEvent(EventQueue.java: 599)

at java.awt.EventDispatchThread.pumpOneEventForFilter s(EventDispatchThread.java:269)

at java.awt.EventDispatchThread.pumpEventsForFilter(E ventDispatchThread.java:184)

at java.awt.EventDispatchThread.pumpEventsForHierarch y(EventDispatchThread.java:174)

at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:169)

at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:161)

at java.awt.EventDispatchThread.run(EventDispatchThre ad.java:122)"



Does anyone know how to fix this?
Attached Files
File Type: a2w beachworld5.a2w (1.92 MB, 3 views)
   
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2023, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.