csound-expression: library to make electronic music

[ bsd3, library, music, sound ] [ Propose Tags ]

Let's make music with text! We can use Csound to describe our music. Csound has so many fantastic sound generators. It's very efficient. But sometimes Csound is too low level. So many details: integer identifiers for instruments and arrays, should I use control rate or audio rate signals, lack of abstractions, no nested expressions and it has limited set of types. This library embeds Csound in Haskell. It's Csound code generator. We can use powerful Csound's primitives and glue them together with Haskell abstractions. Start with the module Csound.Base. It contains basic types and functions.

Key principles

  • Keep it simple and compact.

  • Try to hide low level csound's wiring as much as we can (no ids for ftables, instruments, global variables).

  • Don't describe the whole csound in all it's generality but give the user some handy tools to play with sound.

  • No distinction between audio and control rates on the type level. Derive all rates from the context. If the user plugs signal to an opcode that expects an audio rate signal the argument is converted to the right rate.

  • Watch out for side-effects. There is a special type called SE. It functions as IO in Haskell.

  • Less typing, more music. Use short names for all types. Make library so that all expressions can be built without type annotations. Make it simple for the compiler to derive all types. Don't use complex type classes.

  • Make low level opcode definitions simple. Let user define his own opcodes (if they are missing).

  • Make it independent from any Score-generation library. Let user choose his favorite library. By the way, my favorite is the package 'temporal-music-notation' (but i'm biased as an author). You can find it on hackage alongside with 'temporal-csound'. It brings 'csound-expression' and 'temporal-music-notation' together.

  • Ensure that output signal is limited by amplitude. Csound can produce signals with HUGE amplitudes. Little typo can damage your ears and your speakers. In generated code all signals are clipped by 0dbfs value. 0dbfs is set to 1. Just as in Pure Data. So 1 is absolute maximum value for amplitude.

For the future

  • Make composable guis. Just plug the slider in the opcode and see it on the screen. Interactive instruments should be easy to make.

  • Remove score/instrument barrier. Let instrument play a score within a note and trigger other instruments.

  • Timing of events. User can set the beat rate and align events by beat events.

  • Set Csound flags with meaningful (well-typed) values. Derive as much as you can from the context.

Modules

[Last Documentation]

  • Csound
    • Csound.Base
    • Csound.LowLevel
    • Csound.Opcode
      • Csound.Opcode.Advanced
      • Csound.Opcode.Basic
      • Csound.Opcode.Data
      • Csound.Opcode.Interaction

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.0, 0.0.1, 0.0.2, 0.0.3, 0.1.0, 0.2.0, 0.3.0, 0.3.1, 0.3.2, 0.3.3, 0.3.4, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.1.1, 3.0.0, 3.0.1, 3.1.0, 3.1.1, 3.2.1, 3.2.3, 3.3.0, 3.3.1, 3.3.2, 4.0.0, 4.1.0, 4.2.0, 4.2.1, 4.3, 4.4, 4.4.1, 4.5, 4.6, 4.6.1, 4.7, 4.7.1, 4.8, 4.8.1, 4.8.2, 4.8.3, 4.8.4, 4.9.0, 4.9.1, 5.0.0, 5.0.1, 5.1.0, 5.2.0, 5.2.1, 5.2.2, 5.3.0, 5.3.1, 5.3.2, 5.3.3, 5.3.4, 5.4.0, 5.4.1, 5.4.2, 5.4.3, 5.4.3.1
Dependencies array, base (>=4 && <5), Boolean (>=0.1.0), containers, data-default, data-fix, data-fix-cse, transformers, wl-pprint [details]
License BSD-3-Clause
Author Anton Kholomiov
Maintainer <anton.kholomiov@gmail.com>
Category Music, Sound
Home page https://github.com/anton-k/csound-expression
Bug tracker https://github.com/anton-k/csound-expression/issues
Source repo head: git clone https://github.com/anton-k/csound-expression
Uploaded by AntonKholomiov at 2013-02-10T18:06:22Z
Distributions NixOS:5.4.3.1
Reverse Dependencies 5 direct, 0 indirect [details]
Downloads 45567 total (147 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2016-12-22 [all 8 reports]