packages feed

csound-expression-typed 0.0.7.5 → 0.0.7.6

raw patch · 2 files changed

+19/−4 lines, 2 filesdep ~temporal-mediaPVP: minor bump suggested

API additions: PVP suggests at least a minor version bump

Dependency ranges changed: temporal-media

API changes (from Hackage documentation)

+ Csound.Typed.Gui: setKnob :: String -> ValSpan -> Double -> SinkSource Sig
+ Csound.Typed.Gui: setSlider :: String -> ValSpan -> Double -> SinkSource Sig
+ Csound.Typed.Gui: sinkSlice :: SinkSource a -> Sink a
+ Csound.Typed.Gui: sourceSlice :: SinkSource a -> Source a

Files

csound-expression-typed.cabal view
@@ -1,5 +1,5 @@ Name:          csound-expression-typed-Version:       0.0.7.5+Version:       0.0.7.6 Cabal-Version: >= 1.6 License:       BSD3 License-file:  LICENSE@@ -25,7 +25,7 @@   Ghc-Options:    -Wall   Build-Depends:         base >= 4, base < 5, ghc-prim, containers, transformers >= 0.3, Boolean >= 0.1.0, colour >= 2.0, data-default, deepseq,-        wl-pprint, stable-maps >= 0.0.3.3, csound-expression-dynamic >= 0.1.4.3, temporal-media >= 0.5.0+        wl-pprint, stable-maps >= 0.0.3.3, csound-expression-dynamic >= 0.1.4.3, temporal-media >= 0.6.0   Hs-Source-Dirs:      src/   Exposed-Modules:     Csound.Typed
src/Csound/Typed/Gui/Widget.hs view
@@ -6,14 +6,14 @@     -- * Types     Input, Output, Inner,     noInput, noOutput, noInner,-    Widget, widget, Source, source, Sink, sink, Display, display, SinkSource, sinkSource,+    Widget, widget, Source, source, Sink, sink, Display, display, SinkSource, sinkSource, sourceSlice, sinkSlice,     mapSource, mapGuiSource, mhor, mver, msca,      -- * Widgets     count, countSig, joy, knob, roller, slider, sliderBank, numeric, meter, box,     button, butBank, butBankSig, butBank1, butBankSig1, toggle, toggleSig,     setNumeric, -    setToggle, setToggleSig,+    setToggle, setToggleSig, setKnob, setSlider,     -- * Transformers     setTitle,     -- * Keyboard    @@ -452,6 +452,12 @@     let evtOuts a = outs =<< stepper 0 (fmap sig a)     return (g, evtOuts, snaps ins) +setKnob :: String -> ValSpan -> Double -> SinkSource Sig+setKnob name sp v0 = setLabelSnkSource name $ singleInOut setVal' (Just v0) $ Knob sp++setSlider :: String -> ValSpan -> Double -> SinkSource Sig+setSlider name sp v0 = setLabelSnkSource name $ singleInOut setVal' (Just v0) $ Slider sp+ ------------------------------------------------------------- -- keyboard @@ -478,6 +484,10 @@ printk2 :: GuiHandle -> Sig -> SE () printk2 handle val = flPrintk2 val =<< refHandle handle +setVal' :: GuiHandle -> Sig -> SE ()+setVal' handle val = flSetVal 1 val =<< refHandle handle++ ------------------------------------------------------------- -- set gui value @@ -499,6 +509,11 @@ changed = Sig . fmap f . mapM toGE     where f = opcs "changed" [(Kr, repeat Kr)] +----------------------------------------------------- +sourceSlice :: SinkSource a -> Source a+sourceSlice = fmap (\(gui, _, a) -> (gui, a)) +sinkSlice :: SinkSource a -> Sink a+sinkSlice = fmap (\(gui, a, _) -> (gui, a))