csound-expression-5.2.2: library to make electronic music

Safe HaskellNone
LanguageHaskell98

Csound.Cabbage

Contents

Description

The Cab is a monad for Cabbage markup language. The markup description can be constructed in the same way as blaze-html markup.

We use monadic sequencing for sequencing of markup elements.

An example:

import Csound.Base
import qualified Csound.Cabbage as C

ui = do
    C.cabbage $ do
        C.form $ do
           C.size 100 100
           C.pluginid "plugin"
       C.button $ do
           C.bounds 10 10 80 80
           C.channel "button"
           C.text1 "Click me"
            C.colour0 (C.Rgb 150 30 0)
            C.colour1 (C.Rgb 30 150 12) 
    res <- chnCtrlGet "button"  
    return res

main = dac $ do
   btn <- ui
   return $ btn * osc 220

We can read a complete tutorial on how to create Cabbage plugins at the guide: https://github.com/spell-music/csound-expression/blob/master/tutorial/chapters/CabbageTutorial.md

Synopsis

Documentation

type Cab = Cab' () #

type CabProp = CabProp' () #

data Col :: * #

Constructors

Hash String 
Rgb Int Int Int 

cabbage :: Cab -> SE () #

Widgets

Properties

bounds :: Int -> Int -> Int -> Int -> CabProp #

size :: Int -> Int -> CabProp #