Adding custom sounds in MIT Scratch 3.0
If you want to add a custom sound to your Scratch project, in the online Scratch programming IDE there’s a pretty straightforward way to do it.
If you want to add a custom sound to your Scratch project, in the online Scratch programming IDE there’s a pretty straightforward way to do it.
The LEGO MINDSTORMS Robot Inventor App allows you to record custom sounds to be played by your device (not by the hub). The LEGO SPIKE Prime App also allows you to record custom sounds to be played by your device.This feature is available only in the Word Blocks (Scratch 3.0) Programming Environment, while it’s not available when using Python.
What if you want to play a whole song, your favorite MP3, a sound effect downlaoded from internet, or a prerecorded and long professionally mastered WAV sound file?
To add a custom sound to your LEGO MINDSTORMS projects, or to add a custom sound to your LEGO SPIKE Prime Scratch projects, follow these steps. You can watch the video tutorial if you prefer.
Also, if you know how to run Python scripts, scroll down to the bottom of the page and click on the button to get the Python script that makes all the process automatic.
"sounds": [
{
"assetId": "1b8b032b06360a6cf7c31d86bddd144b",
"name": "Cat Meow 1",
"dataFormat": "wav",
"rate": 48000,
"sampleCount": 60000,
"md5ext": "1b8b032b06360a6cf7c31d86bddd144b.wav"
},
],
To support my work, please consider buying your LEGO sets from these Amazon affiliate links. I may earn a little commission, at no extra charge for you. THANKS!
If you mess up with the JSON formatting, you will make the project unusable. That’s why you made a backup. You did it, right?
"sounds": [
{
"assetId": "1b8b032b06360a6cf7c31d86bddd144b",
"name": "Cat Meow 1",
"dataFormat": "wav",
"rate": 48000,
"sampleCount": 60000,
"md5ext": "1b8b032b06360a6cf7c31d86bddd144b.wav"
},
{
"assetId": "b746b0e5635e7cd6ec20f2e7dcb34a07",
"name": "Custom Sound",
"dataFormat": "wav",
"rate": 44100,
"sampleCount": 140839,
"md5ext": "b746b0e5635e7cd6ec20f2e7dcb34a07.wav"
}
],
This tutorial was made after studying the official MIT Scratch reference WIKI on the SCRATCH File Format and on the JSON data structure.
To support my work, please consider buying your LEGO sets from these Amazon affiliate links. I may earn a little commission, at no extra charge for you. THANKS!
If you know how to run Python scripts, you can use this super useful script that automates the whole process described above. Thanks to the author!