Discuss Scratch

New to Scratch
7 posts

Audio resources in plugins


The external device i'm writing a plugin for, is capable of playing the same .wav audio files used in scratch. Is there a way in the new plugin api to say that a block argument should be an audio file? I then want to access that audio data in the plugin, so as to be able to send it to the device

1000+ posts

Audio resources in plugins

Using the normal editor it would be as easy as downloading the project file and grabbing the sound assets to make a menu out of. However ScratchX doesn't store projects online afaik…

cute cute cute cute cute

rip in pizza ATs
500+ posts

Audio resources in plugins

I looked at the scratch source and found that the sound blocks in Scratch use the menu %m.sound, and a quick test showed it to work with extensions. If your .wavs are imported into the project, ‘sound’ would be an array of those files, but I don't know how you could access that array from the extension, nor how to access sound files.

Last edited by Znapi (May 24, 2015 04:28:20)

New to Scratch
3 posts

Audio resources in plugins

I need the same than randsk. I would play a wav or mp3 file into a device that I connect via the extension. It is possible to get the file to send it to another device and play?
New to Scratch
1 post

Audio resources in plugins

Hey! I figured out how to add a .wav file! go to sounds > grab a play sound block > go to the drop down box > record…> then select the add file up at the top and give it about 10 -20 seconds to load it! Hope this is what you needed!

Powered by DjangoBB

Standard | Mobile