Scratch Tone Synth Extension

Contents

Introduction

This Scratch extension provides you with a set of blocks you can use to generate your own sounds.

Experiment with a sound synthesizer with blocks that control frequency and waveform, and effects like echo, pan, glide, and wah. You can use it to code your own funky electronic music or make weird new sound effects.

Tone.js and the Web Audio API are used to power this extension.


Gobo in Space available in the Example Projects

Getting Started

The Web Audio API is not supported by Internet Explorer at this time.

Google Chrome, Firefox, and Safari web browsers should all work with this extension.

Launch the synth extension on ScratchX.

Scratch Blocks

Turn the tone on for a specified number of seconds.


Turn the tone on for a specified number of seconds. Waits until the tone is complete before going on to the next block.


Turn the tone on.


Turn the tone off.


Set the tone to either a note (MIDI Key) or frequency (Hz).

MIDI notes and frequency table


Change note (MIDI Key) or frequency (Hz) by a specified number.


Report the synthesizer's current note (MIDI Key) or frequency (Hz).


Set an effect to a value between 0 and 100%:


Change synth effect by a value between 0 and 100%.


Clear all synth effects.


Set the delay time in seconds for the echo effect (you have to also use the "set synth effect echo" block to turn it on).


Change the oscillator waveform between sine, triangle, square, sawtooth, and pwm.

Information on oscillator waveforms

Example Projects


Gobo in Space
Drag your mouse to make Gobo sing spacey sounds.

Synth Racer
Drive a ball with the arrow keys to make synthesized engine sounds. The engine sound increases in frequency with the ball's velocity. Drive over the red and blue circles for a bounce or a boost.

Bouncing Synth Ball
When the ball crosses the red or blue lines the oscillator turns on and changes frequencies.

Synth Test
Demonstrates the synth extension with sound effects triggered by arrow keys and the mouse.