[CM] issues with graph->ps

David O'Toole deeteeoh1138 at gmail.com
Tue Sep 24 16:11:08 PDT 2019


I'm trying to render a full waveform preview of a sound file using the
GRAPH->PS function, but encountering issues. With (SET! (CHANNEL-STYLE
SOUND) CHANNELS-SEPARATE) i get an output graph, but only of the first
snippet of sound. Even if SHOW-FULL-DURATION is set to #t before the
sound file is opened.

With CHANNELS-SUPERIMPOSED or CHANNELS-COMBINED, I get an EPS file
that is just a white square.

Here is the code I'm using to try to make the waveform preview:

(define^ (mosaic-render-waveform sound-file output-file)
  (set! eps-size 1.0)
  (let ((old-show show-full-duration))
    (set! show-full-duration #t)
    (let ((sound (open-sound sound-file)))
      (select-sound sound)
      (set! (channel-style sound) channels-separate)
      (graph->ps output-file)
      (set! show-full-duration old-show)
      (close-sound sound))))


More information about the Cmdist mailing list