MakeCode Games!

A fan-made community library of MakeCode Arcade games. Visit MakeCode Arcade to make a game!

← Back to extensions

Retro FX

Add juicy 8-bit sound synthesizers, screen shakes, particle explosions, camera effects, and retro text displays to your games.

reactive sound

Problem it solves

You want the engine hum of a race car or the pitch of a metal detector to react dynamically to distance or speed.

What this block does

Maps a game value from a minimum and maximum range into a pitch frequency between 300Hz and 900Hz and plays the tone.

The block

Block ID: retro_reactive_sound

reactive sound value $value min $min max $max block

Parameters

NameTypeDefaultMeaning
valuenumber50The current game variable value.
minnumber0The lowest expected variable value.
maxnumber100The highest expected variable value.

Example

Retro.reactiveSound(75, 0, 100)

Add the extension

Add github:CrzLe0723/RetroFx to your project, or open: Import RetroFx.