Skip to content

Commit

Permalink
adjust use of focus in squeezeJoin - fixes #216
Browse files Browse the repository at this point in the history
  • Loading branch information
yaxu committed Sep 23, 2022
1 parent dfdd918 commit 5b56fbe
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/core/pattern.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ export class Pattern {
function query(state) {
const haps = pat_of_pats.discreteOnly().query(state);
function flatHap(outerHap) {
const pat = outerHap.value._focusSpan(outerHap.wholeOrPart().cycleArc());
const pat = outerHap.value._focusSpan(outerHap.wholeOrPart());
const innerHaps = pat.query(state.setSpan(outerHap.part));
function munge(outer, inner) {
let whole = undefined;
Expand Down Expand Up @@ -753,8 +753,7 @@ export class Pattern {
// Similar to compress, but doesn't leave gaps, and the 'focus' can be
// bigger than a cycle
_focus(b, e) {
const factor = Fraction(1).div(e.sub(b));
return this._fast(factor).late(b)
return this._fast(Fraction(1).div(e.sub(b))).late(b);
}

_focusSpan(span) {
Expand Down

0 comments on commit 5b56fbe

Please sign in to comment.