Hi, I was following Quickstart - Event streams and noticed an error when using Csound.Control.Evt.every.
This is my code:
import Csound.Base
notes1, notes2 :: Evt D
notes1 = repeatE 330 $ metroE 4
notes2 = every 0 [2] notes1
playNotes :: Evt D -> IO ()
playNotes = dacBy dacOpts . sched instr . withDur 0.25
where
dacOpts :: Options
dacOpts = setGain 0.6 <> setTrace
instr :: D -> SE Sig
instr x = return $ 0.5 * osc (sig x)
playNotes notes1 works as expected.
playNotes notes2 results in an error from Csound
The error message is:
ghci> playNotes notes2
UnifiedCSD: /tmp/tmp.csd
error: Unable to find opcode entry for 'fillarray' with matching argument types:
Found: a[] fillarray kk
ararr10 fillarray kr2 ...
Line: 64
from file /tmp/tmp.csd (1),Parsing failed due to syntax errors
Stopping on parser failure
cannot compile orchestra
end of score. overall amps: 0.0
overall samples out of range: 0
1 errors in performance
Elapsed time at end of performance: real: 0.002s, CPU: 0.002s
Hi, I was following Quickstart - Event streams and noticed an error when using
Csound.Control.Evt.every
.This is my code:
playNotes notes1
works as expected.playNotes notes2
results in an error from CsoundThe error message is:
This is the contents of
/tmp/tmp.csd
for notes1:This is the contents of
/tmp/tmp.csd
for notes2:Versions:
Thanks