play envelope sound
Problem it solves
You want to design a custom synthesizer sound effect with fine control over attack, decay, sustain, and release phases.
What this block does
Synthesizes and plays a custom audio wave with configurable start and end pitch and envelope timing.
The block
Block ID: retro_envelope_sound
Parameters
| Name | Type | Default | Meaning |
|---|---|---|---|
| startPitch | number | 600 | The starting audio frequency in Hertz. |
| endPitch | number | 400 | The ending audio frequency in Hertz. |
| attack | number | 50 | Time in milliseconds for volume to rise. |
| decay | number | 50 | Time in milliseconds for volume to drop to sustain level. |
| sustain | number | 180 | The volume level held during sustain. |
| release | number | 100 | Time in milliseconds for sound to fade out. |
Example
Retro.envelopeSound(800, 300, 30, 40, 150, 80)
Add the extension
Add github:CrzLe0723/RetroFx to your project, or open: Import RetroFx.