source-academy / scm-slang

Implementation of the Scheme language in TypeScript
Apache License 2.0
1 stars 1 forks source link

Sound not working? #24

Open martin-henz opened 2 months ago

martin-henz commented 2 months ago

https://share.sourceacademy.org/jhd28

(import "sound" 
    (play make_sound))
(define π 3.141592653589793)
(play 
 (make_sound (lambda (t) (sin (* 2 π t 440))) 1))

currently gives

Line 6: Error: play is expecting sound, but encountered t => t >= duration ? 0 : wave(t),1
s-kybound commented 1 month ago

I suspect this stems from the differing number representations of scm-slang and SA. will work on a way to reconcile this issue!