-
Notifications
You must be signed in to change notification settings - Fork 7
/
vivid.cabal
278 lines (253 loc) · 7.97 KB
/
vivid.cabal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
name: vivid
version: 0.4.2.3
synopsis: Sound synthesis with SuperCollider
description:
Music and sound synthesis with SuperCollider.
.
Example usage (after installing and booting SuperCollider):
.
@
{-\# LANGUAGE DataKinds, ExtendedDefaultRules \#-}
@
.
> import Vivid
>
> playSong :: VividAction m => m ()
> 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
>
> theSound :: SynthDef '["note"]
> 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]
>
> main :: IO ()
> 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 "song.wav" playSong
author: Tom Murphy
maintainer: Tom Murphy
category: Audio, Music, Sound
build-type: Simple
cabal-version: >=1.8
stability: experimental
license: GPL
library
exposed-modules:
Vivid
, Vivid.Actions
, Vivid.Actions.Class
, Vivid.Actions.IO
, Vivid.Actions.NRT
, Vivid.Actions.Scheduled
, Vivid.ByteBeat
, Vivid.Envelopes
, Vivid.NoPlugins
, Vivid.OSC.Bundles
, Vivid.Randomness
, Vivid.SCServer
, Vivid.SCServer.Connection
, Vivid.SCServer.State
, Vivid.SCServer.Types
, Vivid.SynthDef
, Vivid.SynthDef.FromUA
, Vivid.SynthDef.ToSig
, Vivid.SynthDef.Types
, Vivid.SynthDef.TypesafeArgs
, Vivid.UGens
, Vivid.UGens.Algebraic
, Vivid.UGens.Analysis
, Vivid.UGens.Args
, Vivid.UGens.Buffer
, Vivid.UGens.Conversion
, Vivid.UGens.Convolution
, Vivid.UGens.Delays
, Vivid.UGens.Demand
, Vivid.UGens.Dynamics
, Vivid.UGens.Envelopes
, Vivid.UGens.Examples
, Vivid.UGens.FFT
, Vivid.UGens.Filters
, Vivid.UGens.Filters.BEQSuite
, Vivid.UGens.Filters.Linear
, Vivid.UGens.Filters.Nonlinear
, Vivid.UGens.Filters.Pitch
, Vivid.UGens.Generators.Chaotic
, Vivid.UGens.Generators.Deterministic
, Vivid.UGens.Generators.Granular
, Vivid.UGens.Generators.SingleValue
, Vivid.UGens.Generators.Stochastic
, Vivid.UGens.Info
, Vivid.UGens.InOut
, Vivid.UGens.Maths
, Vivid.UGens.Multichannel
, Vivid.UGens.Random
, Vivid.UGens.Reverbs
, Vivid.UGens.SynthControl
, Vivid.UGens.Triggers
, Vivid.UGens.Undocumented
, Vivid.UGens.UserInteraction
-- other-modules:
build-depends:
-- These package bounds are to comply with the PVP
-- (https://wiki.haskell.org/Package_versioning_policy).
-- Most/all of these upper bounds will be able to be bumped
-- forevermore: if you're having trouble building this because
-- of an upper bound, you can probably just bump it up.
-- I'll try to bump version bounds whenever new compatible
-- versions come out.
-- Auto bounds from 'cabal init':
base > 3 && < 5
-- TEMP:
, binary
-- Lower bound:
-- Just a guess -- 0.5.0.2 is >5 years old
-- I don't have a reason to think it needs a lower bound
-- 0.2 is the oldest version on Hackage
-- Upper bound:
-- 0.9 doesn't exist yet
-- Try: "> 0.5.0.2 && < 0.9"
-- Lower bound:
-- Just a guess -- 0.9.1.8 is >5 years old
-- I don't have a reason to think it needs a lower bound
-- 0.9 is the oldest version on Hackage
-- Upper bound:
-- 0.11 doesn't exist yet
-- Try: "> 0.9.1.8 && < 0.11"
, bytestring
-- Lower bound:
-- Just a guess -- 0.4.0.0 is >5 years old
-- I don't have a reason to think it needs a lower bound
-- 0.1.0.0 is the oldest version on Hackage
-- Upper bound:
-- 0.6 doesn't exist yet
-- Try: "> 0.4.0.0 && < 0.6"
, containers
, directory
-- Lower bound:
-- 1.0 is the oldest version with 'takeExtension'
-- (It's from 2007-05)
-- Upper bound:
-- 1.5 doesn't exist yet
-- Try: "&& < 1.5"
, filepath >= 1.0
-- Lower bound:
-- 1.1.1.0 is the first version with 'hashWithSalt'
-- (It's from 2011-02)
-- (Also betw 1.2 and 1.2.0.5 are marked as broken!)
-- Upper bound:
-- 1.3 doesn't exist yet
-- Try: "&& < 1.3"
, hashable >= 1.2.0.6
-- Lower bound:
-- 0.1 is the oldest version on Hackage
-- Upper bound:
-- 0.5 doesn't exist yet
-- Try: ">= 0.1 && < 0.5"
, MonadRandom
-- Lower bound:
-- Just a guess -- 0.2.0.0 is >5 years old
-- I don't have a reason to think it needs a lower bound
-- 1.0 is the oldest version on Hackage
-- Upper bound:
-- 2.3 doesn't exist yet
-- Try: ">= 2.0.0.0 && < 2.3"
, mtl
-- Lower bound:
-- Just a guess -- 2.3 is >5 years old
-- I don't have a reason to think it needs a lower bound
-- 2.0 is the oldest version on Hackage
-- Upper bound:
-- 2.7 doesn't exist yet
-- Try: ">= 2.3 && < 2.7"
, network
-- Lower bound:
-- Just a guess -- 1.0.1.4 is >5 years old
-- I don't have a reason to think it needs a lower bound
-- 1.0.0.0 is the oldest version on Hackage
-- Upper bound:
-- 1.5 doesn't exist yet
-- Try: ">= 1.0.1.4 && < 1.5"
, process
-- Lower bound:
-- Just a guess -- 1.0.0.3 is >5 years old
-- I don't have a reason to think it needs a lower bound
-- 1.0.0.0 is the oldest version on Hackage
-- Upper bound:
-- 1.2 doesn't exist yet
-- /= : 1.0.1.3 is deprecated
-- Try: (>= 1.0.0.3 && <= 1.0.1.1) || (>= 1.1 && < 1.2)
, random >= 1.1
-- Lower bound:
-- 0.0.3 is the first version with 'shuffleM'
-- Upper bound:
-- 0.1 doesn't exist yet (will it ever?)
-- Try: "&& < 0.1"
, random-shuffle >= 0.0.3
-- Lower bound:
-- 0.2.0.0 is the first version with 'chunksOf'
-- Upper bound:
-- 0.3 doesn't exist yet
-- Try: "&& < 0.3"
, split >= 0.2.0.0
-- Lower bound:
-- Just a guess -- 2.2.0.1 is >5 years old
-- I don't have a reason to think it needs a lower bound
-- 2.1 is the oldest version on Hackage
-- Upper bound:
-- 2.5 doesn't exist yet
-- Try: ">= 2.2.0.1 && < 2.5"
, stm
-- Lower bound:
-- Just a guess -- 1.2 is >5 years old
-- I don't have a reason to think it needs a lower bound
-- (Although check out 'old-time' and those changes -- but
-- that's before 1.2)
-- 1.0 is the oldest version on Hackage
-- Upper bound:
-- 1.7 doesn't exist yet
-- Try: "&& < 1.7"
, time >= 1.2
-- Lower bound:
-- Only need it for 'MonadIO' which came in 0.2.0.0
-- (0.2.0.0 is from 2010-03)
-- Upper bound:
-- 0.6 doesn't exist yet
-- Note there are lots of deprecated versions but I'm taking
-- a guess for now that 'liftIO' is fine in all of them
-- Try: "&& < 0.6" (and maybe disallow deprecated)
, transformers >= 0.2.0.0
-- We only need 'fromString' from here:
, utf8-string
-- Pinned to vivid's version:
, vivid-osc >= 0.4 && < 0.6
, vivid-supercollider == 0.4.*
-- TODO: constraint solver iterations only for the GHC that needs it
ghc-options:
-O2
-fconstraint-solver-iterations=0
-- TODO:
-- testsuite
-- build-depends:
-- vivid
-- , microspec
-- -- , quickcheck