Mercurial > hg > jslab
annotate examples/sound/midi/synth.scm @ 2:74cc9e431818
Revert change to MidiSynth
author | samer |
---|---|
date | Fri, 05 Apr 2019 16:43:56 +0100 |
parents | bf79fb79ee13 |
children |
rev | line source |
---|---|
samer@0 | 1 (import "javax.sound.midi.*") |
samer@0 | 2 |
samer@0 | 3 (define synth (MidiSystem.getSynthesizer)) |
samer@0 | 4 (define c0 (vector-ref (.getChannels synth) 0)) |
samer@0 | 5 (define (open) (.open synth)) |
samer@0 | 6 (define (close) (.close synth)) |
samer@0 | 7 (define (on pitch) (.noteOn c0 pitch 80)) |
samer@0 | 8 (define (off pitch) (.noteOff c0 pitch 0)) |
samer@0 | 9 |
samer@0 | 10 (open) |