Skip to content

Support "zero duration" sample playback#118

Merged
breakintoprogram merged 3 commits intobreakintoprogram:mainfrom
stevesims:upstream-zero-duration
Oct 27, 2023
Merged

Support "zero duration" sample playback#118
breakintoprogram merged 3 commits intobreakintoprogram:mainfrom
stevesims:upstream-zero-duration

Conversation

@stevesims
Copy link
Copy Markdown
Contributor

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)

tomm and others added 3 commits October 23, 2023 17:15
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
@breakintoprogram breakintoprogram added the enhancement New feature or request label Oct 26, 2023
@breakintoprogram breakintoprogram merged commit 9c075a7 into breakintoprogram:main Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants