mirror of
https://github.com/exoticorn/microw8.git
synced 2026-01-20 11:16:42 +01:00
9 lines
220 B
Plaintext
9 lines
220 B
Plaintext
include "../include/microw8-api.cwa"
|
|
|
|
export fn snd(index: i32) -> f32 {
|
|
let inline saw = index;
|
|
let inline env = (-index #>> 9);
|
|
let inline sample = saw & env;
|
|
(sample & 255) as f32 / 255 as f32 - 0.5
|
|
}
|