Discussion:
[haskell-art] ANN: csound-expression - library to make electronic music
Anton Kholomiov
2013-11-01 19:02:03 UTC
Permalink
Dear Haskell artists,

I'm glad to announce the new version of the library csound-expression [1]
It's a csound code generator with functional interface.

Csound is an audio programming language. It can describe synthesizers
and trigger them in real time (with midi devices or event streams) and
offline
(with list of notes). The csound compiler turns the text based description
to
audio files or real-time performance. It's very efficient but low-level.
It has more than 1500 sound processing units.

The csound-expression embedds the csound in haskell.
We can use the powerfull csound primitives and glue them
together with haskell.

All wiring is hidden with functional interface.
The instrument is a function that takes parameters and turns them
to the sound signals. We can use midi devices, event streams or
lists of notes with instruments and get the final polyphonic signal.
Then we can use this sound in another instrument or apply effects to it.

We can create sound right in ghci. Just one line to make it going:

Prelude Csound.Base> dac $ osc 440

Creates a sine wave and sends it speakers.

Prelude Csound.Base> dac $ (* 0.5) $ midi $ onMsg osc

Triggers a sine wave with a midi-device.

For more information checkout the 5-minutes guide [2].

Key features:

* tries to be simple and minimal (several lines to get the sound going)
* uses functional intrfaces
* implements all csound opcodes
* uses FRP-model to describe the event streams (merge, filter, map)
* no barrier between notes and sounds (we can trigger the
instrument with events, get the mixed sound and use it in
another instrument)
* it's safe to use. The output signal is clipped by 1, so
the value of the amplitude can not exceed the 1.
* it's open to other libraries. The list of notes is a type class
users can use their own libraries.

There is a collection of the instruments in the package
csound-catalog [3]

[1] http://hackage.haskell.org/package/csound-expression-3.0.0
[2]
https://github.com/anton-k/csound-expression/blob/master/tutorial/QuickStart.markdown
[3] http://hackage.haskell.org/package/csound-catalog-0.1

Anton
FA ML
2013-11-02 05:07:44 UTC
Permalink
Post by Anton Kholomiov
Dear Haskell artists,
I'm glad to announce the new version of the library csound-expression [1]
It's a csound code generator with functional interface.
This looks very interesting. I am currently playing with sounds + Haskell;
will give it a spin this weekend!
Evan Laforge
2013-11-02 05:41:13 UTC
Permalink
Nice! I've often thought it a bit of a shame that so many interesting
audio functions are locked up in such an archaic beast as csound,
hopefully this can liberate them in some way.

I noticed that you can use things like reverberation as a first class
function, or use the sounds output from one place as input to another.
I always thought a fundamental limitation of csound was that sound
generation and synthesis were divided by a hard orc/sco "phase
boundary". E.g. the traditional way to do reverb in csound was a
global "instrument" that took the outputs of other instruments via
global variable. The only way to get the sound back in was to run
multiple csounds, in series, and you'd wind up recreating the internal
signal flow thing with a makefile mess. Is this limitation no longer
in csound, or did you find a way around?

On Fri, Nov 1, 2013 at 12:02 PM, Anton Kholomiov
Post by Anton Kholomiov
Dear Haskell artists,
I'm glad to announce the new version of the library csound-expression [1]
It's a csound code generator with functional interface.
Csound is an audio programming language. It can describe synthesizers
and trigger them in real time (with midi devices or event streams) and
offline
(with list of notes). The csound compiler turns the text based description
to
audio files or real-time performance. It's very efficient but low-level.
It has more than 1500 sound processing units.
The csound-expression embedds the csound in haskell.
We can use the powerfull csound primitives and glue them
together with haskell.
All wiring is hidden with functional interface.
The instrument is a function that takes parameters and turns them
to the sound signals. We can use midi devices, event streams or
lists of notes with instruments and get the final polyphonic signal.
Then we can use this sound in another instrument or apply effects to it.
Prelude Csound.Base> dac $ osc 440
Creates a sine wave and sends it speakers.
Prelude Csound.Base> dac $ (* 0.5) $ midi $ onMsg osc
Triggers a sine wave with a midi-device.
For more information checkout the 5-minutes guide [2].
* tries to be simple and minimal (several lines to get the sound going)
* uses functional intrfaces
* implements all csound opcodes
* uses FRP-model to describe the event streams (merge, filter, map)
* no barrier between notes and sounds (we can trigger the
instrument with events, get the mixed sound and use it in
another instrument)
* it's safe to use. The output signal is clipped by 1, so
the value of the amplitude can not exceed the 1.
* it's open to other libraries. The list of notes is a type class
users can use their own libraries.
There is a collection of the instruments in the package
csound-catalog [3]
[1] http://hackage.haskell.org/package/csound-expression-3.0.0
[2]
https://github.com/anton-k/csound-expression/blob/master/tutorial/QuickStart.markdown
[3] http://hackage.haskell.org/package/csound-catalog-0.1
Anton
_______________________________________________
haskell-art mailing list
http://lists.lurk.org/mailman/listinfo/haskell-art
Stephen Tetley
2013-11-02 07:02:38 UTC
Permalink
I haven't looked Anton's work so can speak for it, but Csound itself
has Zak ports to route signals between "instruments". Zak ports are
equivalent to SuperCollider's Synth Bus.
... The only way to get the sound back in was to run
multiple csounds, in series, and you'd wind up recreating the internal
signal flow thing with a makefile mess. Is this limitation no longer
in csound, or did you find a way around?
Anton Kholomiov
2013-11-02 13:51:30 UTC
Permalink
I've found the hack around it. In csound I'm using dynamic
channels to send the sound signals between instruments. An instrument
get's an additional parameter that tells it were to send the output.
It's an integer that denotes the dynamic channel.

In haskell it looks like you get the signal as a result when you trigger
the instrument with notes
or with midi device.
Post by Evan Laforge
Nice! I've often thought it a bit of a shame that so many interesting
audio functions are locked up in such an archaic beast as csound,
hopefully this can liberate them in some way.
I noticed that you can use things like reverberation as a first class
function, or use the sounds output from one place as input to another.
I always thought a fundamental limitation of csound was that sound
generation and synthesis were divided by a hard orc/sco "phase
boundary". E.g. the traditional way to do reverb in csound was a
global "instrument" that took the outputs of other instruments via
global variable. The only way to get the sound back in was to run
multiple csounds, in series, and you'd wind up recreating the internal
signal flow thing with a makefile mess. Is this limitation no longer
in csound, or did you find a way around?
On Fri, Nov 1, 2013 at 12:02 PM, Anton Kholomiov
Post by Anton Kholomiov
Dear Haskell artists,
I'm glad to announce the new version of the library csound-expression [1]
It's a csound code generator with functional interface.
Csound is an audio programming language. It can describe synthesizers
and trigger them in real time (with midi devices or event streams) and
offline
(with list of notes). The csound compiler turns the text based
description
Post by Anton Kholomiov
to
audio files or real-time performance. It's very efficient but low-level.
It has more than 1500 sound processing units.
The csound-expression embedds the csound in haskell.
We can use the powerfull csound primitives and glue them
together with haskell.
All wiring is hidden with functional interface.
The instrument is a function that takes parameters and turns them
to the sound signals. We can use midi devices, event streams or
lists of notes with instruments and get the final polyphonic signal.
Then we can use this sound in another instrument or apply effects to it.
Prelude Csound.Base> dac $ osc 440
Creates a sine wave and sends it speakers.
Prelude Csound.Base> dac $ (* 0.5) $ midi $ onMsg osc
Triggers a sine wave with a midi-device.
For more information checkout the 5-minutes guide [2].
* tries to be simple and minimal (several lines to get the sound going)
* uses functional intrfaces
* implements all csound opcodes
* uses FRP-model to describe the event streams (merge, filter, map)
* no barrier between notes and sounds (we can trigger the
instrument with events, get the mixed sound and use it in
another instrument)
* it's safe to use. The output signal is clipped by 1, so
the value of the amplitude can not exceed the 1.
* it's open to other libraries. The list of notes is a type class
users can use their own libraries.
There is a collection of the instruments in the package
csound-catalog [3]
[1] http://hackage.haskell.org/package/csound-expression-3.0.0
[2]
https://github.com/anton-k/csound-expression/blob/master/tutorial/QuickStart.markdown
Post by Anton Kholomiov
[3] http://hackage.haskell.org/package/csound-catalog-0.1
Anton
_______________________________________________
haskell-art mailing list
http://lists.lurk.org/mailman/listinfo/haskell-art
_______________________________________________
haskell-art mailing list
http://lists.lurk.org/mailman/listinfo/haskell-art
Renick Bell
2013-11-02 06:14:54 UTC
Permalink
Looking forward to trying it!

On Sat, Nov 2, 2013 at 4:02 AM, Anton Kholomiov
Post by Anton Kholomiov
Dear Haskell artists,
I'm glad to announce the new version of the library csound-expression [1]
It's a csound code generator with functional interface.
Csound is an audio programming language. It can describe synthesizers
and trigger them in real time (with midi devices or event streams) and
offline
(with list of notes). The csound compiler turns the text based description
to
audio files or real-time performance. It's very efficient but low-level.
It has more than 1500 sound processing units.
The csound-expression embedds the csound in haskell.
We can use the powerfull csound primitives and glue them
together with haskell.
All wiring is hidden with functional interface.
The instrument is a function that takes parameters and turns them
to the sound signals. We can use midi devices, event streams or
lists of notes with instruments and get the final polyphonic signal.
Then we can use this sound in another instrument or apply effects to it.
Prelude Csound.Base> dac $ osc 440
Creates a sine wave and sends it speakers.
Prelude Csound.Base> dac $ (* 0.5) $ midi $ onMsg osc
Triggers a sine wave with a midi-device.
For more information checkout the 5-minutes guide [2].
* tries to be simple and minimal (several lines to get the sound going)
* uses functional intrfaces
* implements all csound opcodes
* uses FRP-model to describe the event streams (merge, filter, map)
* no barrier between notes and sounds (we can trigger the
instrument with events, get the mixed sound and use it in
another instrument)
* it's safe to use. The output signal is clipped by 1, so
the value of the amplitude can not exceed the 1.
* it's open to other libraries. The list of notes is a type class
users can use their own libraries.
There is a collection of the instruments in the package
csound-catalog [3]
[1] http://hackage.haskell.org/package/csound-expression-3.0.0
[2]
https://github.com/anton-k/csound-expression/blob/master/tutorial/QuickStart.markdown
[3] http://hackage.haskell.org/package/csound-catalog-0.1
Anton
_______________________________________________
haskell-art mailing list
http://lists.lurk.org/mailman/listinfo/haskell-art
--
Renick Bell
- http://renickbell.net
- http://twitter.com/renick
- http://the3rd2nd.com
Loading...