mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-26 21:18:49 +00:00
fixing minor bugs and adding description
This commit is contained in:
parent
843d9d52c3
commit
78adaaedef
@ -310,6 +310,9 @@ const generic_params = [
|
|||||||
*/
|
*/
|
||||||
['loop'],
|
['loop'],
|
||||||
/**
|
/**
|
||||||
|
* Begin to loop at a specific point in the sample (inbetween `begin` and `end`).
|
||||||
|
* Note that the loop point must be inbetween `begin` and `end`, and before `loopEnd`!
|
||||||
|
*
|
||||||
* @name loopBegin
|
* @name loopBegin
|
||||||
* @param {number | Pattern} amount between 0 and 1, where 1 is the length of the sample
|
* @param {number | Pattern} amount between 0 and 1, where 1 is the length of the sample
|
||||||
* @synonyms loopb
|
* @synonyms loopb
|
||||||
@ -321,6 +324,10 @@ const generic_params = [
|
|||||||
*/
|
*/
|
||||||
['loopBegin', 'loopb'],
|
['loopBegin', 'loopb'],
|
||||||
/**
|
/**
|
||||||
|
*
|
||||||
|
* End the looping section at a specific point in the sample (inbetween `begin` and `end`).
|
||||||
|
* Note that the loop point must be inbetween `begin` and `end`, and after `loopBegin`!
|
||||||
|
*
|
||||||
* @name loopEnd
|
* @name loopEnd
|
||||||
* @param {number | Pattern} amount between 0 and 1, where 1 is the length of the sample
|
* @param {number | Pattern} amount between 0 and 1, where 1 is the length of the sample
|
||||||
* @synonyms loope
|
* @synonyms loope
|
||||||
|
|||||||
@ -249,7 +249,6 @@ export async function onTriggerSample(t, value, onended, bank, resolveUrl) {
|
|||||||
bufferSource.loop = true;
|
bufferSource.loop = true;
|
||||||
bufferSource.loopStart = loopBegin * bufferSource.buffer.duration - offset;
|
bufferSource.loopStart = loopBegin * bufferSource.buffer.duration - offset;
|
||||||
bufferSource.loopEnd = loopEnd * bufferSource.buffer.duration - offset;
|
bufferSource.loopEnd = loopEnd * bufferSource.buffer.duration - offset;
|
||||||
duration = loop * duration;
|
|
||||||
}
|
}
|
||||||
bufferSource.start(time, offset);
|
bufferSource.start(time, offset);
|
||||||
const { node: envelope, stop: releaseEnvelope } = getEnvelope(attack, decay, sustain, release, 1, t);
|
const { node: envelope, stop: releaseEnvelope } = getEnvelope(attack, decay, sustain, release, 1, t);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user