play variation
Problem it solves
You want to fire laser guns repeatedly but want each shot to sound slightly unique in pitch, volume, and length.
What this block does
Plays a synthesized chiptune tone with randomized variations in volume, duration, and pitch.
The block
Block ID: retro_variation_sound
Parameters
| Name | Type | Default | Meaning |
|---|---|---|---|
| pitch | number | 600 | Target base pitch frequency in Hertz. |
| duration | number | 100 | Base duration in milliseconds. |
| volume | number | 120 | Base volume (0 to 255). |
Example
Retro.playSoundWithVariation(700, 120, 150)
Add the extension
Add github:CrzLe0723/RetroFx to your project, or open: Import RetroFx.