packages feed

vivid 0.1.0.2 → 0.1.0.3

raw patch · 3 files changed

+19/−7 lines, 3 filesdep ~hashablePVP: minor bump suggested

API additions: PVP suggests at least a minor version bump

Dependency ranges changed: hashable

API changes (from Hackage documentation)

+ Vivid.UGens: cpsMIDI :: ToSigM i => i -> SDState Signal

Files

Vivid/SynthDef.hs view
@@ -40,6 +40,7 @@ {-# LANGUAGE NoRebindableSyntax #-}  -- {-# LANGUAGE ExistentialQuantification #-}+{-# LANGUAGE BangPatterns #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} @@ -227,8 +228,9 @@ -- | This is the hash of the UGen graph and params, but not the name! --   So (re)naming a SynthDef will not change its hash. instance Hashable SynthDef where-   hash (SynthDef _name params ugens) = hash . encodeSD $-      SynthDef (SDName_Named "VIVID FTW") params ugens+   hashWithSalt salt (SynthDef _name params ugens) =+      hashWithSalt salt . encodeSD $+         SynthDef (SDName_Named "VIVID FTW") params ugens  gatherConstants :: [(Int, UGen)] -> [Float] gatherConstants ugens =@@ -290,6 +292,7 @@  defineSDIfNeeded :: SynthDef -> IO () defineSDIfNeeded synthDef@(SynthDef name _ _) = do+   let !_ = scServerState    hasBeenDefined <- (((name, hash synthDef) `Set.member`) <$>) $       readTVarIO (scServer_definedSDs scServerState)    unless hasBeenDefined $ do@@ -401,10 +404,10 @@     "Constants: ", show $ _synthDefConstants synthDef   , "\n"   , mconcat$-      (flip map) (Literal._synthDefUGens synthDef) $ \ug -> mconcat [-                show (_uGenSpec_name ug) <> " - " <> show (_uGenSpec_calcRate ug)+      (flip map) (zip [0..] (Literal._synthDefUGens synthDef)) $ \(i,ug) -> mconcat [+                show i <> " " <> show (_uGenSpec_name ug) <> " - " <> show (_uGenSpec_calcRate ug)                ,"\n"-               ,mconcat $ map ((<>"\n") . ("  "<>) . show) $ _uGenSpec_inputs ug+               ,mconcat $ map ((<>"\n") . ("  "<>) . showInputSpec) $ _uGenSpec_inputs ug                ,case BS8.unpack (_uGenSpec_name ug) of                    "UnaryOpUGen" -> mconcat [ "  "                       , show ( specialIToUOp (_uGenSpec_specialIndex ug))@@ -415,6 +418,14 @@                    _ -> ""                ]   ]+ where+   showInputSpec :: InputSpec -> String+   showInputSpec (InputSpec_Constant constantIndex) = mconcat [+       "Constant: "+      ,show $ (_synthDefConstants synthDef) !! fromEnum constantIndex+      ," (index ", show constantIndex, ")"+      ]+   showInputSpec x = show x  -- | Immediately stop a synth playing -- 
Vivid/UGens.hs view
@@ -96,6 +96,7 @@    -- ** Functions     , midiCPS+   , cpsMIDI    , abs'    , neg    , binaryOp
vivid.cabal view
@@ -2,7 +2,7 @@ --  see http://haskell.org/cabal/users-guide/
 
 name:                vivid
-version:             0.1.0.2
+version:             0.1.0.3
 x-revision: 1
 synopsis:            Sound synthesis with SuperCollider
 description:         Sound synthesis with SuperCollider. Start with Vivid.SynthDef
@@ -33,7 +33,7 @@     , bytestring
     , containers
     , deepseq
-    , hashable == 1.1.*
+    , hashable >= 1.2
     , mtl
     , network
     , split