Safe Haskell | None |
---|---|
Language | Haskell2010 |
Non-realtime synthesis. Create a sound file from the same instructions you use to perform live!
- *Note** we don't currently support redefining Synthdefs midway -- e.g.
you can't explicitly define a SynthDef "foo" (with
defineSD
), then make a synth from it, then explicitly define it again with a new definition, and then make a new synth with the new definition
Documentation
writeNRT :: FilePath -> NRT a -> IO () Source #
Generate an audio file from an NRT action -- this can write songs far faster than it would take to play them.
This uses defaultNRTArgs
for its sample rate, number of channels, etc.
If you want to use args other than the default, use writeNRTWith
.
The file type is detected from its extension. The extensions supported at the moment are .aif, .aiff, and .wav
(macOS users will need to make sure scsynth
is in their $PATH)
(And I apologize, but I really don't know what Windows users will need to do)
Currently doesn't work with single quotes in the filename
writeNRTScore :: FilePath -> NRT a -> IO () Source #
Generate a file of actions that SC can use to do NRT with.
If you just want the .aiff file, you probably want writeNRT
instead.
Usage: this will create a file at "tmpNRTout.aiff" with your sound :: NRT a
:
writeNRT "/tmp/foo.osc" test scsynth -N /tmp/foo.osc _ /tmp/NRTout.aiff 44100 AIFF int16
encodeNRTScore :: NRT x -> IO ByteString Source #