MyNixOS website logo
Description

library to make electronic music, brings together temporal-music-notation and csound-expression packages.

This package joins the forces of the packages temporal-music-notation and csound-expression. The former package gives you handy primitives to arrange the events in sequences (like parallel or sequential composition, the tempo change, standard names for notes and durations) and the later is used for creation of musical timbres or software synthesizers.

You can find the short intro in the module Csound.

This library defines standard note representation that let's you invoke csound instruments with notes defined in the package temporal-music-notation.

Also this library provides you with some cool instruments to try the things out (see Csound.Patch).

WARNING: the library works best within ghci. The real-time sound rendering function dac spawns a child process in the background which may continue to execute after you stop the main process that runs the programm. It's not so in vim but it happens in the Sublime Editor and when you invoke runhaskell. So the best is to write you program in the separate file and then load it in the ghci and invoke the function main (which runs the sound rendering with the function dac).

Library strives to be very simple. For example, to trigger the instrument with virtual midi-device is as simple as (in ghci with loaded modules Csound and Csound.Patch)

Csound Csound.Patch> vdac $ mul 0.2 $ fmap largeHall $ onMidi stringPad

If you have a connected hardware midi-device you can just type:

Csound Csound.Patch> dac $ mul 0.2 $ fmap largeHall $ onMidi stringPad

And you are ready to go. To play a C-major chord just do:

Csound Csound.Patch> dac $ mul 0.2 $ magicCave $ mix $ notes vibraphone2 $ mel [c, e, g, high c, rest 15]

Here we send the output to speakers (dac or vdac), scale the signal to make it quiter (mul), place the signal in some room with reverberation (largeHall or magicCave), listen to midi events (onMidi or onMidin for a midi on the given channel) or get the signal from scores (mix), trigger the csound instrument (stringPad or vibraphone2) on events (notes) and construct the events in sequence (mel). Events include notes (c, e, g - C major) and rests (rest).

Metadata

Version

0.4.3.1

Platforms (77)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows