Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
felixroos committed Jan 2, 2025
1 parent 32f78c5 commit 0c0ced0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
8 changes: 3 additions & 5 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,9 @@ session.on("sync", () => {

// hydra
const hydraFrame = document.getElementById("hydra");
const handleEvalHydra = (msg) => {
console.log("eval:hydra", msg);
hydraFrame.contentWindow.postMessage({type: "eval", msg});
};
session.on("eval:hydra", handleEvalHydra);
session.on("eval:hydra", (msg) =>
hydraFrame.contentWindow.postMessage({ type: "eval", msg })
);

// strudel
const strudelFrame = document.getElementById("strudel");
Expand Down
8 changes: 4 additions & 4 deletions src/strudel.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,11 @@ export class StrudelSession {

// fft wiring
if (this.enableAutoAnalyze) {
pattern = pattern.fmap((hap) => {
if (hap.analyze == undefined) {
hap.analyze = "flok-master";
pattern = pattern.fmap((value) => {
if (value.analyze == undefined) {
value.analyze = "flok-master";
}
return hap;
return value;
});
}

Expand Down

0 comments on commit 0c0ced0

Please sign in to comment.