;;; -*- syntax: Lisp; font-size: 16; line-numbers: no; -*-
(define *srate* 44100)
(definstrument (sine start-time duration frequency amplitude)
  (let*
      ((start-sample (* start-time *srate*)) 
       (end-sample (+ start-sample (* duration *srate*))) 
       (oscillator (make-oscil :frequency frequency))) 
    (do ((index start-sample (+ index 1)))
         ((> index end-sample))
	  (outa index (* amplitude (oscil oscillator))))))


	  
(with-sound (:output "test.wav" )(sine 1 3 330 0.5))