add simple bytebeat example to test first implementation with

This commit is contained in:
2022-03-02 22:42:23 +01:00
parent a6a82ff5a1
commit 35ec5fdb59

View File

@@ -0,0 +1,10 @@
include "../include/microw8-api.cwa"
export fn upd() {}
export fn snd(index: i32) -> f32 {
let inline saw = index & 255;
let inline env = (-index #>> 9) & 255;
let inline sample = saw & env;
sample as f32 / 255 as f32 - 0.5
}