Closed jagrg closed 2 years ago
Sorry for the delay in responding, I wanted to make sure everything was actually working first and it turned out things weren't.
I've fixed most of the issues now, so ensure you're using a local copy of cl-patterns
updated to the latest commit on master
, and then you can render a pattern with render
like so:
(render (pdef :beat) "/path/to/output.wav" :duration 4) ; render 4 seconds of audio
(render (pdef :beat) "/path/to/output.wav" :dur 4) ; render 4 beats of audio
(render (pdef :beat) "/path/to/output.wav" :max-length 4) ; render the first 4 events of the pattern (note that rests are included)
Since your :beat
pattern is infinite in length, you need to specify :duration
, :dur
, or :max-length
if you want the rendered output to be a specific length.
Alternatively you can make it finite in length, and as long as it has fewer than :max-length
(which defaults to *max-pattern-yield-length*
) outputs, the full pattern will be rendered without needing to specify any keyword arguments.
I've tested this new implementation a bit and it seems to work, but there are probably some cases where it might still be broken. Let me know if you notice any.
FYI it fails when the path is relative. Works fine otherwise. Many thanks!
How can I save an excerpt of the output to an audio file? For example, using this example: