Fix .out(), renaming webaudio's out() to webaudio() (#361)
* breaking test for out() * rename webaudio's out() to webaudio(), fixes #359
This commit is contained in:
parent
4a2a540500
commit
45842b1f05
2 changed files with 6 additions and 1 deletions
|
|
@ -154,6 +154,11 @@ describe('Pattern', () => {
|
||||||
).toBe(7);
|
).toBe(7);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
describe('out()', () => {
|
||||||
|
it('is an alias for set.out()', () => {
|
||||||
|
sameFirst(sequence(1, 2).out(5, 6, 7, 8), sequence(1, 2).set.out(5, 6, 7, 8));
|
||||||
|
});
|
||||||
|
});
|
||||||
describe('add()', () => {
|
describe('add()', () => {
|
||||||
it('works as toplevel function', () => {
|
it('works as toplevel function', () => {
|
||||||
expect(add(pure(4), pure(5)).query(st(0, 1))[0].value).toBe(9);
|
expect(add(pure(4), pure(5)).query(st(0, 1))[0].value).toBe(9);
|
||||||
|
|
|
||||||
|
|
@ -391,7 +391,7 @@ export const webaudioOutput = async (hap, deadline, hapDuration) => {
|
||||||
|
|
||||||
export const webaudioOutputTrigger = (t, hap, ct, cps) => webaudioOutput(hap, t - ct, hap.duration / cps);
|
export const webaudioOutputTrigger = (t, hap, ct, cps) => webaudioOutput(hap, t - ct, hap.duration / cps);
|
||||||
|
|
||||||
Pattern.prototype.out = function () {
|
Pattern.prototype.webaudio = function () {
|
||||||
// TODO: refactor (t, hap, ct, cps) to (hap, deadline, duration) ?
|
// TODO: refactor (t, hap, ct, cps) to (hap, deadline, duration) ?
|
||||||
return this.onTrigger(webaudioOutputTrigger);
|
return this.onTrigger(webaudioOutputTrigger);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue