Commit 7ff01d1f by Guerric Chupin

Error in synth state update.

parent 0b7bb448
......@@ -136,9 +136,11 @@ createNotebook boardQueue tc addLayerRV rmLayerRV
reactiveValueUpdate_ layerMapRV
(M.adjust (\(stat,_,synth) -> (stat,nDyn,synth)) cp)
updateSynth cp = do
synthState <- reactiveValueRead synthMCBMVar
nSynth <- reactiveValueRead synthMCBMVar
reactiveValueUpdate_ layerMapRV
(M.adjust (\(stat,dyn,_) -> (stat,dyn,nSynth)) cp)
reactiveValueAppend boardQueue $
M.singleton cp $ ([],) $ synthMessage cp synthState
M.singleton cp $ ([],) $ synthMessage cp nSynth
updateStatLayer cp = do
nStat <- reactiveValueRead statMCBMVar
reactiveValueUpdate_ layerMapRV
......
......@@ -79,7 +79,8 @@ main = do
boardStatusEP <- getEPfromRV boardStatusRV
reactiveValueOnCanRead playRV $ reactiveValueWrite boardStatusRV Running
reactiveValueOnCanRead stopRV $ reactiveValueWrite boardStatusRV Stopped
let tempoRV' = liftR2 (\bool t -> t * fromEnum (not bool)) pauseRV tempoRV
let tempoRV' = liftR2 (\paused tempo -> if paused then 0 else tempo)
pauseRV tempoRV
jointedMapRV = liftR (fmap (\(x,y) -> (x,y,NoEvent))) $
liftR2 (M.intersectionWith (,)) boardMapRV layerMapRV
inRV = liftR3 (,,) tempoRV' boardStatusEP jointedMapRV
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment