From 15a04a5dad595fa774da1085253159a6e71b9a05 Mon Sep 17 00:00:00 2001 From: Julian Hurst Date: Thu, 21 Nov 2024 14:56:36 +0100 Subject: Add writeevents and writemidievents --- cmd/example/cli.ha | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cmd/example/cli.ha') 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); }; }; -- cgit v1.2.3