Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix the id we send for sequencer events #1474

Merged
merged 1 commit into from
Mar 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions libs/mixer/sim/music.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,16 @@

await res.sequencer.initAsync();
res.sequencer.addEventListener("stop", () => {
board().bus.queue(SEQUENCER_STOP_MESSAGE, this.id);
board().bus.queue(SEQUENCER_STOP_MESSAGE, res.id);
});
res.sequencer.addEventListener("state-change", () => {
board().bus.queue(SEQUENCER_STATE_CHANGE_MESSAGE, this.id);
board().bus.queue(SEQUENCER_STATE_CHANGE_MESSAGE, res.id);
});
res.sequencer.addEventListener("looped", () => {
board().bus.queue(SEQUENCER_LOOPED_MESSAGE, this.id);
board().bus.queue(SEQUENCER_LOOPED_MESSAGE, res.id);
});
res.sequencer.addEventListener("tick", () => {
board().bus.queue(SEQUENCER_TICK_MESSAGE, this.id);
board().bus.queue(SEQUENCER_TICK_MESSAGE, res.id);
});


Expand All @@ -71,24 +71,24 @@
}

export function _sequencerState(id: number): string {
return lookupSequencer(id)?.state();

Check failure on line 74 in libs/mixer/sim/music.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

Expression expected.

Check failure on line 74 in libs/mixer/sim/music.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

':' expected.

Check failure on line 74 in libs/mixer/sim/music.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

Expression expected.

Check failure on line 74 in libs/mixer/sim/music.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

':' expected.

Check failure on line 74 in libs/mixer/sim/music.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

Expression expected.

Check failure on line 74 in libs/mixer/sim/music.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

':' expected.
}

export function _sequencerCurrentTick(id: number): number {
return lookupSequencer(id)?.currentTick();

Check failure on line 78 in libs/mixer/sim/music.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

Expression expected.

Check failure on line 78 in libs/mixer/sim/music.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

':' expected.

Check failure on line 78 in libs/mixer/sim/music.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

Expression expected.

Check failure on line 78 in libs/mixer/sim/music.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

':' expected.

Check failure on line 78 in libs/mixer/sim/music.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

Expression expected.

Check failure on line 78 in libs/mixer/sim/music.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

':' expected.
}

export function _sequencerPlaySong(id: number, song: RefBuffer, loop: boolean): void {
const decoded = decodeSong(song.data);
lookupSequencer(id)?.start(decoded, loop);

Check failure on line 83 in libs/mixer/sim/music.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

Expression expected.

Check failure on line 83 in libs/mixer/sim/music.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

':' expected.

Check failure on line 83 in libs/mixer/sim/music.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

Expression expected.

Check failure on line 83 in libs/mixer/sim/music.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

':' expected.

Check failure on line 83 in libs/mixer/sim/music.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

Expression expected.

Check failure on line 83 in libs/mixer/sim/music.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

':' expected.
}

export function _sequencerStop(id: number): void {
lookupSequencer(id)?.stop();

Check failure on line 87 in libs/mixer/sim/music.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

Expression expected.

Check failure on line 87 in libs/mixer/sim/music.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

':' expected.

Check failure on line 87 in libs/mixer/sim/music.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

Expression expected.

Check failure on line 87 in libs/mixer/sim/music.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

':' expected.

Check failure on line 87 in libs/mixer/sim/music.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

Expression expected.

Check failure on line 87 in libs/mixer/sim/music.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

':' expected.
}

export function _sequencerSetVolume(id: number, volume: number): void {
lookupSequencer(id)?.setVolume(volume);

Check failure on line 91 in libs/mixer/sim/music.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

Expression expected.

Check failure on line 91 in libs/mixer/sim/music.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

':' expected.

Check failure on line 91 in libs/mixer/sim/music.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

Expression expected.

Check failure on line 91 in libs/mixer/sim/music.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

':' expected.

Check failure on line 91 in libs/mixer/sim/music.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

Expression expected.

Check failure on line 91 in libs/mixer/sim/music.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

':' expected.
}

export function _sequencerSetVolumeForAll(volume: number): void {
Expand Down