Australia
Asked — Edited
Resolved Resolved by Steve G!

Stopping Audio In A Script

Hi, just trying to run a basic script to demo Six reacting to different Glyphs of album covers, speaking a line, doing a movement for a few seconds, then playing some of a track from the relevant artist. However despite using a 'Stop Audio' command after the final movement has ended the music won't stop. Am i missing something here?

thanks in advance. (not a coding natural here i' m afraid)


ARC Pro

Upgrade to ARC Pro

Experience the transformation – subscribe to Synthiam ARC Pro and watch your robot evolve into a marvel of innovation and intelligence.

United Kingdom
#1  

Sounds like a cool project. Are you playing the music using either a Soundboard PC or Soindboard EZ-B audio controls? If so, there is a Cheat Sheet ControlCommand() for each of the relevant soundboards to stop the audio playing, for example, for the Soundboard EZB, the ControlCommand() is ControlCommand("Soundboard v4", Stop). Might also be an idea to post your script here on this thread so we can see what’s going on and advise.

As an example, you would want something like the following...

#Recognise the album cover glyph script,

#Followed by the speech script,

#Then execute the movement script,

#Then play the selected audio track. For example, using a Soundboard EZB control...
ControlCommand("Soundboard v4", Track_0)

#Add a sleep to allow the track to play for 10 seconds
sleep(10000)

#Finally, stop the track from playing,
ControlCommand("Soundboard v4", Stop)
Australia
#2  

Hi, sorry i meant to reply ages ago, been crazy busy here.

Steve G, a big thank you! That tip did indeed solve my problem and the display ended up working quite well. I did have a look through the Cheat Sheet as i was putting the code together, but i guess i was still not recognising the answer in front of my face, being a bit of a rookie in this area...!

You've pointed me in the right direction though in terms of the way i need to be thinking about this, and the relationship script relationship to controls.

thanks again!

Australia
#3  

and yes it was using the Soundboard PC control!