Mercurial > hg > jslab
view examples/sound/midi/synth.scm @ 3:15b93db27c04
Get StreamSource to compile, update args for demo
author | samer |
---|---|
date | Fri, 05 Apr 2019 17:00:18 +0100 |
parents | bf79fb79ee13 |
children |
line wrap: on
line source
(import "javax.sound.midi.*") (define synth (MidiSystem.getSynthesizer)) (define c0 (vector-ref (.getChannels synth) 0)) (define (open) (.open synth)) (define (close) (.close synth)) (define (on pitch) (.noteOn c0 pitch 80)) (define (off pitch) (.noteOff c0 pitch 0)) (open)