Name: csound-expression
Version: 1.1.1
Cabal-Version: >= 1.6
License: BSD3
License-file: LICENSE
Author: Anton Kholomiov
Synopsis: library to make electronic music
Stability: Experimental
Tested-With: GHC==7.6
Build-Type: Simple
Category: Music, Sound
Maintainer: <anton.kholomiov@gmail.com>
Description:
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).
.
* 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.
.
* No dependency on Score-generation libraries. Score (or list of events) is represented with type class. You can use your favorite Score-generation library if you provide an instance for the CsdSco type class. Currently there is support for temporal-music-notation library (see temporal-csound package).
.
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.
.
* Optimization of the memory allocation (liveness analysis).
Extra-Source-Files :
examples/Test.hs
examples/Heartbeat.hs
Homepage: https://github.com/anton-k/csound-expression
Bug-Reports: https://github.com/anton-k/csound-expression/issues
Source-repository head
Type: git
Location: https://github.com/anton-k/csound-expression
Library
Ghc-Options: -Wall
Build-Depends:
base >= 4, base < 5, containers, array, transformers, wl-pprint, stable-maps >= 0.0.3.3, process,
data-default, Boolean >= 0.1.0, data-fix, data-fix-cse
Hs-Source-Dirs: src/
Exposed-Modules:
Csound.Base
Csound.Air
Csound.Tab
Csound.LowLevel
Csound.Opcode
Csound.Opcode.Basic
Csound.Opcode.Advanced
Csound.Opcode.Data
Csound.Opcode.Interaction
Other-Modules:
Csound.Exp
Csound.Exp.Wrapper
Csound.Exp.GE
Csound.Exp.SE
Csound.Exp.Ref
Csound.Exp.Cons
Csound.Exp.Logic
Csound.Exp.Numeric
Csound.Exp.Arg
Csound.Exp.Tuple
Csound.Exp.Mix
Csound.Exp.Event
Csound.Exp.Instr
Csound.Exp.Gui
Csound.Exp.Widget
Csound.Exp.Options
Csound.Exp.EventList
Csound.IO
Csound.Tfm.DeduceTypes
Csound.Tfm.UnfoldMultiOuts
Csound.Tfm.Tab
Csound.Render
Csound.Render.Pretty
Csound.Render.Options
Csound.Render.Instr
Csound.Render.Channel