|
Sound.Alsa.Sequencer | Stability | provisional | Maintainer | Iavor S. Diatchki |
|
|
|
|
|
Description |
Overview: http://www.alsa-project.org/alsa-doc/alsa-lib/seq.html
WARNING: This whole library does not seem to be particlarly thread aware.
Perhaps place the sequencer handle in an MVar?
|
|
Synopsis |
|
|
|
|
Sequencer
|
|
|
The type of sequencer handles.
| Instances | |
|
|
|
Read/Write permissions for the sequencer device.
| Instances | |
|
|
|
|
|
|
|
|
|
Blocking behavior of the sequencer device.
| Constructors | Block | Operations may block.
| Nonblock | Throw exceptions instead of blocking.
|
| Instances | |
|
|
|
:: String | The sequencer's "name". This is not a name that you
make up for your own purposes; it has special significance
to the ALSA library. Usually you need to pass default_name
here.
| -> OpenMode | | -> BlockMode | | -> IO SndSeq | | Creates a new handle and opens a connection to the kernel sequencer
interface. After a client is created successfully,
a ClientStart event is broadcast to the announce port.
May throw an exception.
See also: open_lconf, close, get_seq_type,
get_seq_name, set_blocking, get_client_id.
|
|
|
|
:: SndSeq | handle to the sequencer
| -> IO () | | Close the sequencer. Closes the sequencer client and releases its
resources. After a client is closed, an event with ClientExit is
broadcast to announce port. The connection between other clients are
disconnected. Call this just before exiting your program.
NOTE: we could put this in a finalizer for the handle?
|
|
|
|
This is the name that should be passed to open in most cases.
|
|
|
:: SndSeq | sequencer handle
| -> IO String | ALSA identifier for the handel
| Get identifier of a sequencer handle.
It is the same identifier specified in the call to open.
|
|
|
|
:: SndSeq | sequencer handle
| -> BlockMode | blocking mode
| -> IO () | | Change the blocking mode of the given client.
In block mode, the client falls into sleep when it fills the output
pool with events, or when it demands events from an empty input pool.
memory pool with full events. Clients that are sleeping due to
loack of space in the output pool are woken when a certain
amount of free space becomes available (see set_output_room).
|
|
|
Manage user-space buffers
|
|
|
:: SndSeq | Sequencer handle.
| -> IO Word | Size of output buffer in bytes.
| Return the byte size of the output buffer.
|
|
|
|
:: SndSeq | Sequencer handle.
| -> Word | New buffer size in bytes.
| -> IO () | | Resize of the output buffer.
This function clears all output events (see drop_output).
|
|
|
|
:: SndSeq | Sequencer handle.
| -> IO Word | Size of input buffer in bytes.
| Return the byte size of input buffer.
|
|
|
|
:: SndSeq | Sequencer handle.
| -> Word | New byffer size in bytes.
| -> IO () | | Resize the input buffer.
This function clears all input events (see drop_input).
|
|
|
Manage kernel-space memory pools
|
|
|
:: SndSeq | Sequencer handle.
| -> Word | New size in bytes.
| -> IO () | | Resize the output memory pool.
|
|
|
|
:: SndSeq | Sequencer handle.
| -> Word | Number of bytes need to wake up.
| -> IO () | | Specify how much space should become free before waking clients
that are blocked due to a lack of space in the output pool.
|
|
|
|
:: SndSeq | Sequencer handle.
| -> IO () | | Reset the output pool.
|
|
|
|
:: SndSeq | Sequencer handle.
| -> Word | New size in bytes.
| -> IO () | | Resize the input memory pool.
|
|
|
|
:: SndSeq | Sequencer handle.
| -> IO () | | Reset the input pool.
|
|
|
Queue Interface
|
|
module Sound.Alsa.Sequencer.Queue |
|
Client Interface
|
|
module Sound.Alsa.Sequencer.Client |
|
Port Interface
|
|
module Sound.Alsa.Sequencer.Port |
|
Connections
|
|
|
Simple subscription (w/o exclusive & time conversion).
|
|
|
Simple subscription (w/o exclusive & time conversion).
|
|
|
Simple disconnection.
|
|
|
Simple disconnection.
|
|
Events
|
|
|
Used for volume control: means do not change the valume.
|
|
module Sound.Alsa.Sequencer.Event |
|
Types
|
|
|
Constructors | | Instances | |
|
|
|
Constructors | | Instances | |
|
|
|
Instances | |
|
|
|
Constructors | | Instances | |
|
|
|
Constructors | | Instances | |
|
|
|
Constructors | | Instances | |
|
|
|
Constructors | ANote | | NoteOn | | NoteOff | | KeyPress | |
| Instances | |
|
|
|
Constructors | | Instances | |
|
|
|
:: Word8 | Channel.
| -> Word8 | Note.
| -> Word8 | Velocity.
| -> Note | | Make a note whose unspecified fields contain 0.
|
|
|
|
Constructors | Controller | | PgmChange | | ChanPress | | PitchBend | | Control14 | | NonRegParam | | RegParam | | SongPos | | SongSel | | QFrame | | TimeSign | | KeySign | |
| Instances | |
|
|
|
Constructors | | Instances | |
|
|
|
Constructors | ClientStart | | ClientExit | | ClientChange | | PortStart | | PortExit | | PortChange | |
| Instances | |
|
|
|
Constructors | | Instances | |
|
|
|
:: SndSeq | Sequencer handle.
| -> String | String to be parsed.
| -> IO Addr | The parsed address.
| Parse the given string into sequencer address.
The client and port are separated by either colon or period, e.g. 128:1.
The function also accepts client names.
|
|
|
|
The address of all subscribed ports.
|
|
|
Constructors | PortSubscribed | | PortUnsubscribed | |
| Instances | |
|
|
|
Instances | |
|
|
|
Constructors | TuneRequest | | Reset | | Sensing | | None | | Unknown | |
| Instances | |
|
|
|
Constructors | | Instances | |
|
|
|
Constructors | | Instances | |
|
|
|
These are all 14 bit values.
| Constructors | | Instances | |
|
|
Error handling
|
|
|
Instances | |
|
|
|
the (positive) error code
|
|
|
a text description of the problem
|
|
|
Catch an exception generated by the binding.
|
|
Produced by Haddock version 2.4.2 |