summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/example/cli.ha5
-rw-r--r--cmd/example/simple.ha4
2 files changed, 5 insertions, 4 deletions
diff --git a/cmd/example/cli.ha b/cmd/example/cli.ha
index edd45be..b981e17 100644
--- a/cmd/example/cli.ha
+++ b/cmd/example/cli.ha
@@ -62,8 +62,9 @@ export fn main() void = {
};
const note = runetonote(runes[0]);
const pitch = strconv::stou32(spl[2])!;
- midi::noteon(&tc, 0, note, 64, pitch);
- midi::noteoff(&tc, dt, note, 64, pitch);
+ const tp = midi::playnote(dt, note, 64, pitch);
+ append(tc.ev, tp.0);
+ append(tc.ev, tp.1);
};
};
diff --git a/cmd/example/simple.ha b/cmd/example/simple.ha
index 98aa607..733baec 100644
--- a/cmd/example/simple.ha
+++ b/cmd/example/simple.ha
@@ -12,8 +12,8 @@ export fn main() void = {
let tc = midi::newtrack();
defer midi::finishtrack(tc);
- midi::noteon(&tc, 0, midi::note::C);
- midi::noteoff(&tc, 4, midi::note::C);
+ append(tc.ev, midi::noteon(0, midi::note::C));
+ append(tc.ev, midi::noteoff(4, midi::note::C));
midi::writeheader(os::stdout, th);
midi::writechunk(os::stdout, tc);
};