Merged
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Sequencer
A timing-correct, multi-track
Sequencerthat delegates audio scheduling to instrumentsvia
instrument.start({ note, time }).Features:
addTrack(instrument, notes)/removeTrack/clearTracks"4n","8n","1m","2:1","1:1:48", dotted ("4n.")start/pause/stopwith seamless resumebpmmid-playback with no rescheduling neededpositionto jump to any bar/beat/tick while playingloopStart/loopEnd/progressscheduleRepeat(callback, interval)for programmatic patternsbeat,bar,loop,end,start,stop,pauseSequencer
noteOn/noteOffeventsThe Sequencer emits
noteOnandnoteOffevents driven by the instrument's ownonStart/onEndedcallbacks — they fire at actual playback time, not at scheduling time:The event (
NoteEvent) containsnoteId,trackIndex,noteIndex, and the originalSequencerNote. Notes can have a customidfield; otherwisenoteIddefaults to thearray index.
AudioWorklet graceful degradation
Reverbnow checks forcontext.audioWorkletbefore callingaddModule(). On iPad Safariover HTTP (non-secure context),
audioWorkletisundefined— the reverb now degradesgracefully (no effect, no crash) instead of throwing.