summaryrefslogtreecommitdiff
path: root/cmd/example/cli.ha
diff options
context:
space:
mode:
authorJulian Hurst <julian.hurst@digdash.com>2024-11-21 14:56:36 +0100
committerJulian Hurst <julian.hurst@digdash.com>2024-11-21 15:02:14 +0100
commit15a04a5dad595fa774da1085253159a6e71b9a05 (patch)
treedfc639cf6c1b6c0c59c625be5e34bea4d9cd0dfa /cmd/example/cli.ha
parent1793341797569b42f6623e5bfdf9098e3e80ef19 (diff)
downloadhare-midi-15a04a5dad595fa774da1085253159a6e71b9a05.tar.gz
Add writeevents and writemidievents
Diffstat (limited to 'cmd/example/cli.ha')
-rw-r--r--cmd/example/cli.ha5
1 files changed, 3 insertions, 2 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);
};
};