[CM] creating new sound with empty channels

Bill Schottstaedt bil at ccrma.Stanford.EDU
Wed Sep 17 10:20:00 PDT 2008

Here's one way that is close to yours:

(let ((aacFile (new-sound (format #f "~a~a.~a" outpath name "5.1.wav") 
			  :channels 6 
			  :header-type mus-riff 
			  :data-format mus-l24int 
			  :srate 44100 ))) 
  ;; pump in 4 full channels and 2 empty ones (for LFE and CF) 
  (swap-channels outsound 0 aacFile 1)      
  (swap-channels outsound 1 aacFile 2)      
  (swap-channels outsound 2 aacFile 3)      
  (swap-channels outsound 3 aacFile 4)      
  (save-sound aacFile) 
  (close-sound aacFile) 
  (revert-sound outsound)

More information about the Cmdist mailing list