Skip to content

Commit

Permalink
Merge pull request #377 from tidalcycles/draw-fixes
Browse files Browse the repository at this point in the history
Draw fixes
  • Loading branch information
felixroos committed Jan 15, 2023
2 parents 3626799 + 5aa983b commit 7000a4c
Show file tree
Hide file tree
Showing 6 changed files with 289 additions and 283 deletions.
2 changes: 1 addition & 1 deletion packages/core/euclid.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const _bjork = function (n, x) {
return Math.min(ons, offs) <= 1 ? [n, x] : _bjork(...(ons > offs ? left(n, x) : right(n, x)));
};

const bjork = function (ons, steps) {
export const bjork = function (ons, steps) {
const offs = steps - ons;
const x = Array(ons).fill([1]);
const y = Array(offs).fill([0]);
Expand Down
7 changes: 6 additions & 1 deletion packages/core/pattern.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,12 @@ export class Pattern {
* silence
*/
queryArc(begin, end) {
return this.query(new State(new TimeSpan(begin, end)));
try {
return this.query(new State(new TimeSpan(begin, end)));
} catch (err) {
logger(`[query]: ${err.message}`, 'error');
return [];
}
}

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/react/dist/index.cjs.js

Large diffs are not rendered by default.

0 comments on commit 7000a4c

Please sign in to comment.