mimium-cli 2.0.0-alpha2

mimium(minimal-musical-medium) an infrastructural programming language for sound and music. mimium-cli is a simple frontend interface for using mimium
let pi = 3.14159265359
let sr = 44100.0
let _ = set_midi_port("from Max 2")
fn phasor(freq){
  (self + freq/sr)%1.0
}
fn osc(freq){
  sin(phasor(freq)*pi*2.0)
}
fn midi_to_hz(note){
    440.0*  (2.0 ^((note-69.0)/12.0))
}
let boundval = bind_midi_note_mono(0.0,69.0,127.0);

fn dsp(){
    let (note,vel) = boundval();

    let sig = note |> midi_to_hz |> osc 
    let r = sig * (vel /127.0);
    (r,r)
}