herald: Sheet music in Haskell

[ agpl, library, sound ] [ Propose Tags ] [ Report a vulnerability ]

Haskell library for writing musical scores as code and synthesizing them into audio.

Features:

  • Named pitches, key signatures and accidentals that last until the bar line

  • Note values, dots, ties, chords and trills

  • Time signatures, with every bar checked

  • Dynamics

  • Equal temperament and historical tunings

  • Several voices, each with its own instrument and stereo position

  • Mono or stereo WAV output and playback

Instruments: pureTone, additive, organ, harpsichord.


[Skip to Readme]

Modules

  • Herald
    • Herald.Performance
      • Herald.Performance.Instrument
    • Herald.Score
      • Herald.Score.Duration
      • Herald.Score.Dynamic
      • Herald.Score.Pitch
    • Herald.Sound
      • Herald.Sound.IO
    • Herald.Tuning

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.1, 0.1.0.2
Dependencies base (>=4.20 && <4.23), bytestring (>=0.12 && <0.13), containers (>=0.7 && <0.9), mtl (>=2.3.1 && <2.4), process (>=1.6.19 && <1.7), vector (>=0.13.1 && <0.14) [details]
Tested with ghc ==9.10.3 || ==9.12.4 || ==9.14.1
License AGPL-3.0-or-later
Author Joaquín Rossi
Maintainer joaquin@joaquinrossi.net
Uploaded by joaquinrossi at 2026-10-26T04:09:45Z
Category Sound
Home page https://github.com/joaquin-rossi/herald
Bug tracker https://github.com/joaquin-rossi/herald/issues
Source repo head: git clone https://github.com/joaquin-rossi/herald.git
Distributions
Downloads 7 total (7 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2026-10-26 [all 2 reports]

Readme for herald-0.1.0.2

[back to package description]

herald: sheet music in Haskell

CI

Hackage

Haskell library for writing musical scores as code and synthesizing them into audio.

Original idea: https://www.youtube.com/watch?v=FYTZkE5BZ-0

Features

  • Named pitches, key signatures and accidentals that last until the bar line
  • Note values, dots, ties, chords and trills
  • Time signatures, with every bar checked
  • Dynamics
  • Equal temperament and historical tunings
  • Several voices, each with its own instrument and stereo position
  • Mono or stereo WAV output and playback

Instruments: pureTone, additive, organ, harpsichord.

Example

import Herald

melody :: Score m => m ()
melody = do
  setKey gMinor
  tellNotes quarter [g4, b4, a4, g4]
  tellBar
  tellNote whole g4

main :: IO ()
main =
  either (putStrLn . displayScoreError) (saveWav "melody.wav") $
    playScoreMono defaultConfig [(defaultVoice, melody)]

Demo

cabal run herald-demo -- play little-fugue  # requires ffplay

Little Fugue in G minor (source):

https://github.com/user-attachments/assets/ad373e14-ba8c-4924-a4e0-e839ccfaa71f

Happy Birthday:

https://github.com/user-attachments/assets/da93b721-d94f-4736-bea8-e08e566b3189