fixed failing test
This commit is contained in:
parent
c20a6673af
commit
0f4e6af49d
3 changed files with 15 additions and 1 deletions
|
|
@ -91,7 +91,8 @@ export function setGainCurve(newGainCurveFunc) {
|
||||||
*
|
*
|
||||||
* Note: `must` be called with await, otherwise you'll get a pending Promise object.
|
* Note: `must` be called with await, otherwise you'll get a pending Promise object.
|
||||||
*
|
*
|
||||||
* @name getDuration
|
* @name getDuration,getDur
|
||||||
|
* @tag samples
|
||||||
* @param {string} sampleName
|
* @param {string} sampleName
|
||||||
* @param {number} (optional) n
|
* @param {number} (optional) n
|
||||||
*
|
*
|
||||||
|
|
@ -105,6 +106,8 @@ export const getDuration = (s, n = 0) => {
|
||||||
return getSampleBufferSource({ s, n }, soundMap.get(s)[s].data.samples).then((x) => x.bufferDuration);
|
return getSampleBufferSource({ s, n }, soundMap.get(s)[s].data.samples).then((x) => x.bufferDuration);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const getDur = getDuration;
|
||||||
|
|
||||||
function aliasBankMap(aliasMap) {
|
function aliasBankMap(aliasMap) {
|
||||||
// Make all bank keys lower case for case insensitivity
|
// Make all bank keys lower case for case insensitivity
|
||||||
for (const key in aliasMap) {
|
for (const key in aliasMap) {
|
||||||
|
|
|
||||||
|
|
@ -5306,6 +5306,15 @@ exports[`runs examples > example "gain" example index 0 1`] = `
|
||||||
|
|
||||||
exports[`runs examples > example "gap" example index 0 1`] = `[]`;
|
exports[`runs examples > example "gap" example index 0 1`] = `[]`;
|
||||||
|
|
||||||
|
exports[`runs examples > example "getDur" example index 0 1`] = `
|
||||||
|
[
|
||||||
|
"[ 0/1 → 1/1 | s:sax cps:null ]",
|
||||||
|
"[ 1/1 → 2/1 | s:sax cps:null ]",
|
||||||
|
"[ 2/1 → 3/1 | s:sax cps:null ]",
|
||||||
|
"[ 3/1 → 4/1 | s:sax cps:null ]",
|
||||||
|
]
|
||||||
|
`;
|
||||||
|
|
||||||
exports[`runs examples > example "grow" example index 0 1`] = `
|
exports[`runs examples > example "grow" example index 0 1`] = `
|
||||||
[
|
[
|
||||||
"[ 0/1 → 1/10 | s:tha bank:mridangam ]",
|
"[ 0/1 → 1/10 | s:tha bank:mridangam ]",
|
||||||
|
|
|
||||||
|
|
@ -127,6 +127,7 @@ const loadSoundfont = () => {};
|
||||||
const loadCsound = () => {};
|
const loadCsound = () => {};
|
||||||
const loadCSound = () => {};
|
const loadCSound = () => {};
|
||||||
const loadcsound = () => {};
|
const loadcsound = () => {};
|
||||||
|
const getDuration = () => {};
|
||||||
|
|
||||||
const midin = () => {
|
const midin = () => {
|
||||||
return (ccNum) => strudel.ref(() => 0); // returns ref with default value 0
|
return (ccNum) => strudel.ref(() => 0); // returns ref with default value 0
|
||||||
|
|
@ -170,6 +171,7 @@ evalScope(
|
||||||
loadCSound,
|
loadCSound,
|
||||||
loadCsound,
|
loadCsound,
|
||||||
loadcsound,
|
loadcsound,
|
||||||
|
getDuration,
|
||||||
setcps: id,
|
setcps: id,
|
||||||
setcpm: id,
|
setcpm: id,
|
||||||
Clock: {}, // whatever
|
Clock: {}, // whatever
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue