Sound issues

32 views
Skip to first unread message

Rob McElroy

unread,
Aug 23, 2017, 10:58:32 PM8/23/17
to CoSpaces Scripting

Hey all,

I am having issues making the sounds sync to the scene I have created.

I want the tie engine sound to sync with the movement of the TIE fighter and then the Emperors March with the entrance of the shuttle.  I would also like to have a background noise mp3 play through the entire scene.  I tried adding to the stage setup but it seems to not play (I had it working before)

I have included a screenshot of my coding and here is the link to my stage  https://cospac.es/tOlA


Rob


Stefan Filff

unread,
Aug 25, 2017, 11:23:31 AM8/25/17
to CoSpaces Scripting
Hi Rob,

make sure to untick "wait until finished" in sound blocks when you want other behaviour to happen right after in the blocks that follow. If "wait until finished" is activated, blockly will wait for the sound to finish before continuing. 

Let me know if the problem persists otherwise.

Cheers,
Stefan

Rob McElroy

unread,
Aug 28, 2017, 2:36:44 AM8/28/17
to CoSpaces Scripting
I'm still having issues Stefan.  

Here is the link


And Here is my code




Message has been deleted

Rob McElroy

unread,
Aug 28, 2017, 2:49:57 AM8/28/17
to CoSpaces Scripting
I had it working once.  All sounds played when I wanted them to.  But then the next time I played the scene all the sounds came at once when the shuttle was landing.

Please help

Rob

Stefan Filff

unread,
Aug 28, 2017, 4:05:37 AM8/28/17
to cospaces-...@googlegroups.com
Hi Rob,

possible reason you hear the sounds overlapping and playing at the same time is because your blockly expression is put into a repeat loop. Try removing the blocks from your "repeat 1 times" block. 
When I tried your scene, the sound effects played at the right time (Tie engine sound when the tie fighter lifts off and flies away, darth vader music when the other spaceship enters the hangar).

On slower computers, the "pause for X sec." may take longer than for other machines. This could be another reason for sound effects not playing on time. I'd recommend you to play sound effects right after a "move" block has happened to make sure that the sound effect is motion dependent, not time dependent.

To help you get a better overview of your blockly code you can put bigger block-chunks into functions and call them like shown below. This helps you in creating more manageable code.

 (Click for full size)



Let me know if the problem with playing back the sound persists after removing the loop. 


Cheers,

Stefan

Rob McElroy

unread,
Aug 29, 2017, 3:13:02 AM8/29/17
to CoSpaces Scripting
I copied your code and it works great on my iPhone but my pic is odd. It’s a new model with 8gb of ram. Perhaps I should try another browser than chrome?

Stefan Filff

unread,
Aug 29, 2017, 7:40:47 AM8/29/17
to CoSpaces Scripting
Hi Rob,

CoSpaces should run well on Chrome, but you can try it on Firefox as well to see for the performance. What kind of (visual) issue do you experience?

Cheers,
Stefan
Reply all
Reply to author
Forward
0 new messages