fix off()
This commit is contained in:
parent
1b748648e0
commit
b323855b69
2 changed files with 10 additions and 2 deletions
|
|
@ -618,7 +618,7 @@ class Pattern {
|
||||||
const left = this.withValue(val => Object.assign({}, val, {pan: elem_or(val, "pan", 0.5) - by}))
|
const left = this.withValue(val => Object.assign({}, val, {pan: elem_or(val, "pan", 0.5) - by}))
|
||||||
const right = this.withValue(val => Object.assign({}, val, {pan: elem_or(val, "pan", 0.5) + by}))
|
const right = this.withValue(val => Object.assign({}, val, {pan: elem_or(val, "pan", 0.5) + by}))
|
||||||
|
|
||||||
return stack([left,func(right)])
|
return stack(left,func(right))
|
||||||
}
|
}
|
||||||
|
|
||||||
// is there a different name for those in tidal?
|
// is there a different name for those in tidal?
|
||||||
|
|
|
||||||
|
|
@ -383,7 +383,15 @@ describe('Pattern', function() {
|
||||||
it("Can offset a transformed pattern from the original", () => {
|
it("Can offset a transformed pattern from the original", () => {
|
||||||
assert.deepStrictEqual(
|
assert.deepStrictEqual(
|
||||||
pure(30).off(0.25, add(2)).firstCycle,
|
pure(30).off(0.25, add(2)).firstCycle,
|
||||||
stack(pure(30), pure(30).early(0.25).add(2)).firstCycle
|
stack(pure(30), pure(30).late(0.25).add(2)).firstCycle
|
||||||
|
)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
describe("jux", () => {
|
||||||
|
it("Can juxtapose", () => {
|
||||||
|
assert.deepStrictEqual(
|
||||||
|
pure({a: 1}).jux(fast(2))._sortEventsByPart().firstCycle,
|
||||||
|
stack(pure({a:1, pan: 0}), pure({a:1, pan: 1}).fast(2))._sortEventsByPart().firstCycle
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue