x-dsp-0.2.3.1: A embedded DSL for manipulating DSP languages in Haskell

Safe HaskellSafe-Infered

Language.XDsp.Semantics.BasicExtensions

Synopsis

Documentation

class Dsp repr => StringVar repr whereSource

Support for string variables.

Associated Types

data VString repr :: *Source

Methods

fromStr :: String -> VString reprSource

Instances

StringVar (S n) 

class Dsp repr => Buffer repr whereSource

Audio buffer or other data table.

Associated Types

type Buf repr :: *Source

Methods

emptyBuffer :: Int -> repr (Buf repr)Source

Instances

Buffer HN 
Buffer (S n)

creation of buffers

class Buffer repr => BufferR repr out a whereSource

Table lookup

Methods

lookupAt :: Buf repr -> a -> repr outSource

Instances

BufferR HN Double Double

table lookup with linear interpolation

Integral a => BufferR HN Double a 
BufferR HN Double (INum HN) 
BufferR HN (ASig HN) (ASig HN) 
BufferR HN (KSig HN) (KSig HN) 
Varable a => BufferR (S n) a a 

class Dsp repr => VKtl repr whereSource

Get data from an external source

Methods

vktl :: String -> repr (KSig repr)Source

class Buffer repr => VBuf repr whereSource

Create a sized buffer which is updated by an external source

Methods

vbuf :: String -> Int -> repr (Buf repr)Source

Instances

VBuf (S n)

creation of host-variable buffers

class Dsp repr => LblBlock repr whereSource

Creates a runnable labelled block. This block can only be run at compile time. Creating runnable blocks at runtime is a to-be-implemented class.

Associated Types

type ArgTag repr :: *Source

type ArgTyp repr :: *Source

data Block repr :: *Source

Methods

lblBlock :: Int -> repr a -> repr (Block repr)Source

runBlock :: Block repr -> Double -> Double -> TList (ArgTag repr) (ArgTyp repr) -> repr ()Source

Instances

LblBlock (S n)

Labelled blocks (basic instrument creation)

class (Nat n, Nat m, m :>=: n) => NumArgs repr m n whereSource

Gets an argument from a runnable context

Methods

getArg :: n -> repr m (INum (repr m))Source

Instances

(Nat m, Nat n, Show n, :>=: m n) => NumArgs S m n 

data TList n a Source

Constructors

TList [a] 

Instances

Functor (TList n) 
Eq a => Eq (TList n a) 
Show a => Show (TList n a) 
(Varable a, Nat d) => Varable (TList d a) 

tlist0 :: (Nat n, n :>=: D3) => TList n aSource

unTList :: TList n a -> [a]Source

unTList' :: n -> TList n a -> [a]Source

unsafeTList :: Nat n => n -> [a] -> TList n aSource

defaultRunBlock :: (ArgTag repr ~ D3, LblBlock repr) => Block repr -> Double -> Double -> repr ()Source

class Phasor repr out a whereSource

Phasor (output sawtooth range 0-1 at specified frequency)

Methods

phasor :: a -> repr outSource

Instances

Phasor HN (ASig HN) (ASig HN) 
Phasor HN (ASig HN) (KSig HN) 
Phasor HN (ASig HN) (INum HN) 
Phasor HN (KSig HN) (KSig HN) 
Phasor HN (KSig HN) (INum HN) 
Varable a => Phasor (S n) (ASig (S n)) a 
Phasor (S n) (KSig (S n)) (KSig (S n)) 

class Buffer repr => Oscil repr out a b whereSource

A basic table-lookup oscillator, interpolating and non-interpolating

Methods

oscil :: a -> b -> Buf repr -> repr outSource

oscil' :: a -> b -> Buf repr -> INum repr -> repr outSource

Instances

(Varable a, Varable b, PVar out) => Oscil (S n) out a b

Supports table-lookup oscillators