Mercurial > hg > jslab
comparison examples/sound/midi/synth.scm @ 0:bf79fb79ee13
Initial Mercurial check in.
author | samer |
---|---|
date | Tue, 17 Jan 2012 17:50:20 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:bf79fb79ee13 |
---|---|
1 (import "javax.sound.midi.*") | |
2 | |
3 (define synth (MidiSystem.getSynthesizer)) | |
4 (define c0 (vector-ref (.getChannels synth) 0)) | |
5 (define (open) (.open synth)) | |
6 (define (close) (.close synth)) | |
7 (define (on pitch) (.noteOn c0 pitch 80)) | |
8 (define (off pitch) (.noteOff c0 pitch 0)) | |
9 | |
10 (open) |