-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The big audio library update #565
Merged
a740g
merged 39 commits into
QB64-Phoenix-Edition:main
from
a740g:the-big-audio-library-update
Nov 8, 2024
Merged
The big audio library update #565
a740g
merged 39 commits into
QB64-Phoenix-Edition:main
from
a740g:the-big-audio-library-update
Nov 8, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Audio lib fixes
a740g
added
bug
Something isn't working
enhancement
New feature or request
libqb-refactor
Separating out libqb.cpp
labels
Nov 6, 2024
a740g
requested review from
grymmjack,
mkilgore,
flukiluke,
SteveMcNeill and
RhoSigma-QB64
November 6, 2024 04:11
RhoSigma-QB64
approved these changes
Nov 6, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
enhancement
New feature or request
libqb-refactor
Separating out libqb.cpp
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Lot of things:
_WAVE
) waveform support toSOUND
&PLAY
SOUND
&PLAY
SOUND
&PLAY
SOUND WAIT
andSOUND RESUME
support for multi-channel forSOUND
&PLAY
_WAVE
commandWAVE
andSOUND
improvements #187_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)