;;; -*- Syntax: Common-Lisp; Package: COMMON-MUSIC; Base: 10; Mode: Lisp -*-
;;; This example generates a scorefile to be read by the program mixsounds
;;; to create a mix of several sound files.
;;;
;;; Sound files on the directory /NextLibrary/Music/Sounds are mixed into a rhythm track.
(in-package :stella)
(in-syntax :music-kit t)
(open-cmd "test.score")
(algorithm test MixSounds () ; no default list of slot options
(setf duration 0) ; duration is how much of the file to use -- 0 = all
(setf timeOffset 0) ; timeOffset is where in the file to begin reading
;; Example -- a time offset of 1 and a duration of 2
;; means begin 1 second into the file and continue until 3
;; seconds into the file.
(setf amp (item (items .1 .2 .3))) ; amplitude scaling to be applied to the file.
;; Soundfile is the file to mix.
(setf soundFile (quotify (item (items "/NextLibrary/Sounds/Frog.snd"
"/NextLibrary/Sounds/Basso.snd"
"/NextLibrary/Sounds/Tink.snd"
"/NextLibrary/Sounds/Pop.snd"
"/NextLibrary/Sounds/Bonk.snd"
"/NextLibrary/Sounds/Funk.snd"
in palindrome))))
;; Soundfile is the file to mix.
(setf rhythm (item (rhythms q e e s q e e s h q e e s q e e s h q e e s q e e s h)
:kill T)))
(stella:stella)
#|
Now after you do "write test" to Stella, use the following commands to
mix and play the sound file. The syntax is... mixsounds