diff options
Diffstat (limited to 'snd11.scm')
-rw-r--r-- | snd11.scm | 37 |
1 files changed, 37 insertions, 0 deletions
@@ -147,3 +147,40 @@ but not anymore. ;(define def-optkey-fun define*) ;(define def-optkey-instrument definstrument) +(define spectro-cutoff spectrum-start) +(define spectro-end spectrum-end) + + + +(define* (play-region reg wait stop-func) + (play (if (integer? reg) (integer->region reg) reg) :wait wait :stop stop-func)) + +(define* (play-selection wait stop-func) + (play (selection) :wait wait :stop stop-func)) + +(define* (play-mix id (beg 0)) + (play (if (integer? id) (integer->mix id) id) beg)) + +(define* (play-and-wait (start 0) snd chn syncd end (pos -1) stop-proc) + (if (string? start) + (play start (or snd 0) :end (or chn -1) :wait #t) + (play (if (integer? snd) (integer->sound snd) + (if (sound? snd) snd + (or (selected-sound) (car (sounds))))) + :channel (or chn -1) :wait #t :with-sync syncd :start start :end (or end -1) + :stop stop-proc :edit-position pos))) + +(define* (old-play (start 0) snd chn syncd end (pos -1) stop-proc (out-chan -1)) + (play (if (integer? snd) (integer->sound snd) + (if (sound? snd) snd + (or (selected-sound) (car (sounds))))) + :channel (or chn -1) :with-sync syncd :start start :end (or end -1) + :stop stop-proc :out-channel out-chan :edit-position pos)) + +(define* (play-channel (beg 0) dur snd chn (pos -1) stop-proc (out-chan -1)) + (play (if (integer? snd) (integer->sound snd) + (if (sound? snd) snd + (or (selected-sound) (car (sounds))))) + :channel (or chn -1) :with-sync #f :start beg :end (if dur (+ beg dur) -1) + :stop stop-proc :out-channel out-chan :edit-position pos)) + |