Skip to content

Commit

Permalink
Big refactoring to remove internal cursors and rely on MIDI player po…
Browse files Browse the repository at this point in the history
…sition instead
  • Loading branch information
infojunkie committed May 16, 2024
1 parent 4c815e9 commit c092cbc
Show file tree
Hide file tree
Showing 8 changed files with 558 additions and 297 deletions.
4 changes: 2 additions & 2 deletions demo/demo.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -268,10 +268,10 @@ function handlePlayPauseKey(e) {
if (e.key === ' ' && g_state.player) {
e.preventDefault();
if (g_state.player.state === PLAYER_PLAYING) {
g_state.player.pause();
g_state.timingObject?.update({ velocity: 0 });
}
else {
g_state.player.play();
g_state.timingObject?.update({ velocity: 1 });
}
}
}
Expand Down
418 changes: 310 additions & 108 deletions dist/musicxml-player.esm.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/musicxml-player.esm.js.map

Large diffs are not rendered by default.

5 changes: 0 additions & 5 deletions dist/types/Player.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@ export declare class Player implements IMidiOutput {
private _title;
static load(options: PlayerOptions): Promise<Player>;
private _midiPlayer;
private _playbackStart;
private _playbackPause;
private _measureIndex;
private _measureStart;
private _measureOffset;
private _timemap;
private _observer;
private _timingsrc;
Expand Down
2 changes: 1 addition & 1 deletion dist/types/Player.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c092cbc

Please sign in to comment.