Support "zero duration" sample playback#118
Merged
breakintoprogram merged 3 commits intobreakintoprogram:mainfrom Oct 27, 2023
Merged
Support "zero duration" sample playback#118breakintoprogram merged 3 commits intobreakintoprogram:mainfrom
breakintoprogram merged 3 commits intobreakintoprogram:mainfrom
Conversation
adds support for playing back an entire sample by sending zero as the duration to play note NB if a volume envelope has been set on the channel then the duration will be the higher of the sample duration or the envelope release phase
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.
Adds support for "play note" on a channel that has a sound sample applied to it to accept a duration of zero to indicate that the whole sample should be played.
This is a convenience to make it easier to play entire samples. Without it you need to keep track of how long a sample is when attempting to play it.
In the event that a sample is set on a channel that also has a volume envelope applied, the actual note playback duration will be the longer of the sample length or the release phase of the envelope. (If necessary, the sample will loop until the release phase has completed)