The hdf package

[Tags: gpl, library]

Haskell data flow library for audio processing. Requires either the RDL UGen from sc3-rdu or the jack-dl host from rju.

See http://rd.slavepianos.org/t/sc3-rdu or http://rd.slavepianos.org/t/rju.


[Skip to ReadMe]

Properties

Versions0.7, 0.11, 0.14, 0.15
Change logNone available
Dependenciesbase (==4.*), directory, fgl, fgl-visualize, filepath, hosc (==0.15.*), hsc3 (==0.15.*), murmur-hash, process, split, transformers [details]
LicenseGPL
Copyright(c) Rohan Drape, 2006-2014
AuthorRohan Drape
Maintainerrd@slavepianos.org
StabilityExperimental
CategorySound
Home pagehttp://rd.slavepianos.org/t/hdf
Source repositoryhead: darcs get http://rd.slavepianos.org/sw/hdf/
UploadedSun Oct 12 10:22:30 UTC 2014 by RohanDrape
DistributionsNixOS:0.15
Downloads575 total (34 in last 30 days)
Votes
0 []
StatusDocs uploaded by user
Build status unknown [no reports yet]

Modules

[Index]

Downloads

Maintainers' corner

For package maintainers and hackage trustees

Readme for hdf-0.15

hdf - haskell data flow
-----------------------

[Haskell][hs] library for uniform rate audio signal processing.

It generates [C][c] code that requires either
`RDL` (from [sc3-rdu][sc3-rdu]) or `jack-dl` (from [rju][rju]).

The [SC2][sc2] [analog bubbles][ab] graph can be written:

~~~~
  let o = lf_saw (mce2 8.0 7.23) 0.0 * 3.0 + 80.0
      m = lf_saw 0.4 0.0 * 24.0 + o
      s = sin_osc (midi_cps m) 0.0 * 0.04
      c = comb_n [0,1] 0.4 s 0.2 4.0
  in out c
~~~~

The data flow graph this generates is:

![](sw/hdf/svg/analog-bubbles.svg)

The generated C-code (for `jack-dl`) is [c/gen/analog-bubbles.c](sw/hdf/c/gen/analog-bubbles.c).

Slightly more elaborate, the [berlin 1977][b7] graph can be written:

~~~~
    let clock_rate = 9
        clock_time = 1 / clock_rate
        clock = impulse clock_rate 0 -- sequencer trigger
        tr = trigger clock
        note = sequ 0 [55,60,63,62,60,67,63,58] tr -- midi note pattern sequencer
        tr_16 = pulse_divider tr 16 0 -- divide tr by 16
        note' = sequ 1 [-12,-7,-5,0,2,5] tr_16 + note -- transpose
        freq = midi_cps note' -- convert midi note to cycles per second
        env = decay2 clock (0.05 * clock_time) (2 * clock_time)
        amp = env * 0.1 + 0.02 -- amplitude envelope
        filt = env * (sin_osc 0.17 0 * 800) + 1400 -- filter frequency
        pw = sin_osc (mce2 0.08 0.09) 0 * 0.45 + 0.5 -- pulse width LFO(s)
        s = lf_pulse freq 0 pw * amp -- not bandlimited
    in out (comb_n [0,1] 0.2 (rlpf s filt 0.15) (mce2 0.2 0.17) 1.5)
~~~~

The data flow graph this generates is:

![](sw/hdf/svg/berlin-1977.svg)

The generated C-code (for `jack-dl`) is [c/gen/berlin-1977.c](sw/hdf/c/gen/berlin-1977.c).

<!-- These are from the small set of example [graphs][ix]. -->

hdf implements `text-dl` for testing.

[hs]: http://haskell.org/
[c]: http://c2.com/cgi/wiki?CeeLanguage
[sc3-rdu]: http://rd.slavepianos.org/?t=sc3-rdu
[rju]: http://rd.slavepianos.org/?t=rju
[ab]: sw/hsc3-graphs/gr/analog-bubbles.scd
[b7]: sw/hsc3-graphs/gr/berlin-1977.scd
[sc2]: http://audiosynth.com/
[ix]: http://rd.slavepianos.org/?t=hdf&e=md/ix.md

© [rohan drape][rd], 2006-2014, [gpl]

[rd]: http://rd.slavepianos.org/
[gpl]: http://gnu.org/copyleft/