The vivid package

[ Tags: audio, gpl, library, music, sound ] [ Propose Tags ]

Music and sound synthesis with SuperCollider.

Example usage:

{-# LANGUAGE DataKinds, ExtendedDefaultRules #-}
import Vivid

theSound = sd (0 ::I "note") $ do
   wobble <- sinOsc (freq_ 5) ? KR ~* 10 ~+ 10
   s <- 0.1 ~* sinOsc (freq_ $ midiCPS (V::V "note") ~+ wobble)
   out 0 [s,s]

playSong = do
   fork $ do
      s0 <- synth theSound (36 ::I "note")
      wait 1
      free s0
   s1 <- synth theSound (60 ::I "note")
   forM_ [62,66,64] $ \note -> do
      wait (1/4)
      set s1 (note ::I "note")
   wait (1/4)
   free s1

main = do
   putStrLn "Simplest:"
   playSong

   putStrLn "With precise timing:"
   doScheduledIn 0.1 playSong
   wait 1

   putStrLn "Written to a file, non-realtime synthesis:"
   putStrLn "(Need to quit the running server for NRT)"
   quitSCServer
   writeNRT "/tmp/song.wav" playSong

Properties

Versions 0.1.0.0, 0.1.0.1, 0.1.0.2, 0.1.0.3, 0.2.0.0, 0.2.0.1, 0.2.0.2, 0.2.0.3, 0.2.0.4, 0.2.0.5, 0.3.0.0, 0.3.0.1, 0.3.0.2
Dependencies base (>3 && <5), bytestring, containers, directory, filepath (>=1.0), hashable (>=1.2.0.6), MonadRandom, mtl, network, process, random (>=1.1), random-shuffle (>=0.0.3), split (>=0.2.0.0), stm, time (>=1.2), transformers (>=0.2.0.0), utf8-string, vivid-osc (==0.3.*), vivid-supercollider (==0.3.*) [details]
License GPL
Author Tom Murphy
Maintainer Tom Murphy
Category Audio, Music, Sound
Uploaded Wed Sep 13 13:49:14 UTC 2017 by TomMurphy
Distributions NixOS:0.3.0.2, Stackage:0.3.0.2
Downloads 1039 total (47 in the last 30 days)
Rating 2.0 (1 ratings) [clear rating]
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2017-09-13 [all 1 reports]
Hackage Matrix CI

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees