Adds Pink noise, Brownian noise, LFSR noise, pulse, and custom (_WAVE) waveform support to SOUND & PLAY
Adds support for ADSR envelope for SOUND & PLAY
Adds muti-channel (4 voice) support for SOUND & PLAY
Adds SOUND WAIT and SOUND RESUME support for multi-channel for SOUND & PLAY
Adds Amiga Basic like _WAVE command
Closes #187
Adds support for _SNDRAWBATCH that can push a batch of audio sample frames at once compared to just one frame that _SNDRAW supports
Fixes and cleans up multiple data type issues for audio library functions in subs_functions.bas
Moves BEEP out of the audio library. BEEP now uses cross-platform tinyfd_beep() and as such does not pull in the entire audio library
Restores CHR$(7) beep support (due to the above change)
Backports tinyfd_beep() improvements & fixes from the latest tinyfiledialogs library
Refactors away some unpleasant stuff like usage of various custom clamp functions instead of std::clamp, ad-hoc function declarations and general formatting issues
Lot of things:
_WAVE
) waveform support toSOUND
&PLAY
SOUND
&PLAY
SOUND
&PLAY
SOUND WAIT
andSOUND RESUME
support for multi-channel forSOUND
&PLAY
_WAVE
command_SNDRAWBATCH
that can push a batch of audio sample frames at once compared to just one frame that_SNDRAW
supportssubs_functions.bas
BEEP
out of the audio library.BEEP
now uses cross-platformtinyfd_beep()
and as such does not pull in the entire audio libraryCHR$(7)
beep support (due to the above change)tinyfd_beep()
improvements & fixes from the latesttinyfiledialogs
librarystd::clamp
, ad-hoc function declarations and general formatting issuesNew commands and enhancements:
SOUND frequency!, duration![, volume!][, panning!][, waveform&][, waveformParameters!][, voice&]
SOUND WAIT
SOUND RESUME
PLAY voiceCommands1$[, voiceCommands2$][, voiceCommands3$][, voiceCommands4$]
remainingTime# = PLAY([voice&])
_WAVE voice&, waveDefinition%%([index&])[, frameCount&]
_SNDRAWBATCH array!([index&])[, channels&][, handle&][, frameCount&]
PLAY MML language improvements (special thanks to @grymmjack for guidance):
W
n /@
n: waveform select (1 = SQUARE, 2 = SAWTOOTH, 3 = TRIANGLE, 4 = SINE, 5 = NOISE_WHITE, 6 = NOISE_PINK, 7 = NOISE_BROWNIAN, 8 = NOISE_LFSR, 9 = PULSE, 10 = CUSTOM_WAVE)/
n: attack (percentage of total note time 0 - 100)\
n: decay (percentage of total note time 0 - 100)^
n: sustain (percentage of MML volume 0 - 100)_
n: release (percentage of total note time 0 - 100)Y
n: extra params for current waveform (percentage 0 - 100 - usually for pulse wave)S
n: pan position (0 to 100) where 0 is leftmost and 100 is rightmostR
/P
: rest / pauseV+
&V-
: Volume increment / decrement (single-step & clamped)S+
&S-
: Pan right / left (single-step & clamped)