jack-0.6.2: Bindings for the JACK Audio Connection Kit

Safe HaskellSafe-Infered

Sound.JACK

Contents

Description

The Jack module defines types and functions that allows you to use the JACK Audio Connection Kit.

Synopsis

general stuff

data Client Source

Handles of Jack clients

newClientSource

Arguments

:: ThrowsStatus e 
=> String

name of the JACK server

-> String

name of the client

-> ExceptionalT e IO Client 

Constructs a new Jack client.

newClientDefaultSource

Arguments

:: ThrowsStatus e 
=> String

name of the client

-> ExceptionalT e IO Client 

Creates a new JACK client with the default server

withClientSource

Arguments

:: ThrowsStatus e 
=> String

name of the JACK server

-> String

name of the client

-> (Client -> ExceptionalT e IO a) 
-> ExceptionalT e IO a 

Run a block of code with a newly allocated client. Do not use the client outside the block.

withClientDefaultSource

Arguments

:: ThrowsStatus e 
=> String

name of the client

-> (Client -> ExceptionalT e IO a) 
-> ExceptionalT e IO a 

clientClose :: ThrowsErrno e => Client -> PortSet -> ExceptionalT e IO ()Source

closes the given Jack client without causing any trouble (hopefully)

activate :: ThrowsErrno e => Client -> ExceptionalT e IO ()Source

activates the given Jack client

class PortType typ Source

Jack Port Type

Instances

PortType CFloat 
PortType EventBuffer 

data Input Source

Type argument for Jack input ports

Instances

data Output Source

Type argument for Jack output ports

Instances

data UnknownType Source

Type argument for Jack ports where the type of samples transported by the port is unknown.

data UnknownDirection Source

Type argument for Jack ports where we do not know whether it is an input or an output port.

data Port typ dir Source

newPortSource

Arguments

:: (PortType typ, Direction dir, ThrowsPortRegister e) 
=> Client

Jack client

-> String

name of the input port

-> ExceptionalT e IO (Port typ dir) 

Better use withPort that also handles freeing the port.

withPortSource

Arguments

:: (PortType typ, Direction dir, ThrowsPortRegister e, ThrowsErrno e) 
=> Client

Jack client

-> String

name of the input port

-> (Port typ dir -> ExceptionalT e IO a) 
-> ExceptionalT e IO a 

Creates a new port for the given client and delete it after usage. The port manages audio or MIDI data in input or output direction depending on the Port type. Usually the required port type can be inferred from following actions that use that port.

Do not use the port outside the enclosed block.

data PortSet Source

A collection of mixed types of ports. It is mainly needed for freeing all allocated ports.

Instances

setOfPort :: (PortType typ, Direction dir) => Port typ dir -> PortSetSource

setOfPorts :: (PortType typ, Direction dir) => [Port typ dir] -> PortSetSource

mkClientRegistration :: ClientRegistration -> IO (FunPtr ClientRegistration)Source

Create a client registration callback FunPtr.

setClientRegistration :: ThrowsErrno e => Client -> FunPtr ClientRegistration -> ExceptionalT e IO ()Source

Set the client registration callback.

mkPortRegistration :: PortRegistration -> IO (FunPtr PortRegistration)Source

Create a port registration callback FunPtr.

setPortRegistration :: ThrowsErrno e => Client -> FunPtr PortRegistration -> ExceptionalT e IO ()Source

Set the port registration callback.

mkPortConnect :: PortConnect -> IO (FunPtr PortConnect)Source

Create a port connect callback FunPtr.

setPortConnect :: ThrowsErrno e => Client -> FunPtr PortConnect -> ExceptionalT e IO ()Source

Set the port connect callback.

portName :: Port typ dir -> IO StringSource

Return the full port name, including the client_name: prefix.

portShortName :: Port typ dir -> IO StringSource

Return the short port name, not including the client_name: prefix.

getPortsSource

Arguments

:: Client

the Jack client

-> IO [String]

the names as a list of strings

Returns the names of all existing ports.

portGetAllConnections :: Client -> Port typ dir -> IO [String]Source

Return all the port names a given port is connected to.

This function must not be called from a JACK event callback.

newtype NFrames Source

represents absolute frame time

Constructors

NFrames CUInt 

Exceptions