Skip to content

Commit

Permalink
🍎
Browse files Browse the repository at this point in the history
  • Loading branch information
nanarino committed Feb 15, 2024
1 parent 2a49e71 commit 0b7c6ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.1",
"description": "",
"scripts": {
"dev": "vite",
"dev": "vite --host",
"build": "vite build",
"serve": "vite preview"
},
Expand Down
7 changes: 3 additions & 4 deletions src/components/Player/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,11 @@ const ABCPlayer = (props: { getMusicData: Accessor<string> }) => {
musicData, //.replace(/^\|(?=\s*$)/m, ''),
{
scale: 1,
clickListener: (e) => {
clickListener: (e, t, c, a, d, event?: MouseEvent | TouchEvent) => {
if (event.type !== "mouseup") return;
if (e.rest) return;
abcjs.synth.playEvent(e.midiPitches, undefined, 1000);
for (const pitch of e.midiPitches) {
message(name(pitch));
}
e.midiPitches?.forEach?.((pitch) => message(name(pitch)));
},
}
);
Expand Down

0 comments on commit 0b7c6ae

Please sign in to comment.