# libkmid Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# FMOut Class Reference

FM device output class . Sends MIDI events to FM devices. More...

`#include <fmout.h>`

Inheritance diagram for FMOut:

[legend]
Collaboration diagram for FMOut:

[legend]
List of all members.

## Public Member Functions

| FMOut (int d=0, int total=12)
| Constructor.
| ~FMOut ()
| Destructor.
virtual void | openDev (int sqfd)
| See MidiOut::openDev().
virtual void | closeDev (void)
| See MidiOut::closeDev().
virtual void | initDev (void)
| See MidiOut::initDev().
virtual void | noteOn (uchar chn, uchar note, uchar vel)
| See MidiOut::noteOn().
virtual void | noteOff (uchar chn, uchar note, uchar vel)
| See MidiOut::noteOff().
virtual void | keyPressure (uchar chn, uchar note, uchar vel)
| See MidiOut::keyPressure().
virtual void | chnPatchChange (uchar chn, uchar patch)
| See MidiOut::chnPatchChange().
virtual void | chnPressure (uchar chn, uchar vel)
| See MidiOut::chnPressure().
virtual void | chnPitchBender (uchar chn, uchar lsb, uchar msb)
| See MidiOut::chnPitchBender().
virtual void | chnController (uchar chn, uchar ctl, uchar v)
| See MidiOut::chnController().
virtual void | sysex (uchar *data, ulong size)
| It's an empty function, as FM devices don't support System Exclusive messages.
virtual void | setVolumePercentage (int i)
| See MidiOut::setVolumePercentage().
int | patch (int p)
| Returns `p` if the patch p has been loaded, or another patch (already loaded) if `p` hasn't been loaded.

## Static Public Member Functions

void | setFMPatchesDirectory (const char *dir)
| Sets the directory where the FM patches are stored, that is, where the std.o3, std.sb, drums.o3 and drums.sb files can be found.

## Detailed Description

FM device output class . Sends MIDI events to FM devices.

FMOut is used to send MIDI events to FM devices, such as AdLib cards, or OPL3 synthesizers.

FMOut inherits MidiOut and supports the same simple API.

The preferred way to use this class is by selecting a FM device on the MidiManager and using a MidiManager object directly

Version:
  0.9.5 17/01/2000

Author:
  Antonio Larrosa Jimenez <larrosa@kde.org>

Definition at line 43 of file fmout.h.

## Constructor & Destructor Documentation

FMOut::FMOut | ( | int | d = 0,
|  | int | total = 12
| ) |

| Constructor. See MidiOut::MidiOut() for more information. Definition at line 45 of file fmout.cc.

FMOut::~FMOut | ( |  | ) |

| Destructor. Definition at line 60 of file fmout.cc. References closeDev().

## Member Function Documentation

void FMOut::openDev | ( | int | sqfd | ) | `[virtual]`

| See MidiOut::openDev(). Reimplemented from MidiOut. Definition at line 72 of file fmout.cc.

void FMOut::closeDev | ( | void |  | ) | `[virtual]`

| See MidiOut::closeDev(). Reimplemented from MidiOut. Definition at line 89 of file fmout.cc. References MidiOut::ok(). Referenced by ~FMOut().

void FMOut::initDev | ( | void |  | ) | `[virtual]`

| See MidiOut::initDev(). Reimplemented from MidiOut. Definition at line 97 of file fmout.cc. References chnController(), chnPatchChange(), chnPitchBender(), chnPressure(), MidiOut::ok(), and sysex().

void FMOut::noteOn | ( | uchar | chn,
|  | uchar | note,
|  | uchar | vel
| ) | `[virtual]`

| See MidiOut::noteOn(). Reimplemented from MidiOut. Definition at line 218 of file fmout.cc. References noteOff(), MidiMapper::patch(), and patch().

void FMOut::noteOff | ( | uchar | chn,
|  | uchar | note,
|  | uchar | vel
| ) | `[virtual]`

| See MidiOut::noteOff(). Reimplemented from MidiOut. Definition at line 251 of file fmout.cc. Referenced by noteOn().

void FMOut::keyPressure | ( | uchar | chn,
|  | uchar | note,
|  | uchar | vel
| ) | `[virtual]`

| See MidiOut::keyPressure(). Reimplemented from MidiOut. Definition at line 266 of file fmout.cc.

void FMOut::chnPatchChange | ( | uchar | chn,
|  | uchar | patch
| ) | `[virtual]`

| See MidiOut::chnPatchChange(). Reimplemented from MidiOut. Definition at line 274 of file fmout.cc. References MidiMapper::patch(). Referenced by initDev().

void FMOut::chnPressure | ( | uchar | chn,
|  | uchar | vel
| ) | `[virtual]`

| See MidiOut::chnPressure(). Reimplemented from MidiOut. Definition at line 285 of file fmout.cc. Referenced by initDev().

void FMOut::chnPitchBender | ( | uchar | chn,
|  | uchar | lsb,
|  | uchar | msb
| ) | `[virtual]`

| See MidiOut::chnPitchBender(). Reimplemented from MidiOut. Definition at line 295 of file fmout.cc. Referenced by initDev().

void FMOut::chnController | ( | uchar | chn,
|  | uchar | ctl,
|  | uchar | v
| ) | `[virtual]`

| See MidiOut::chnController(). Reimplemented from MidiOut. Definition at line 306 of file fmout.cc. Referenced by initDev().

void FMOut::sysex | ( | uchar * | data,
|  | ulong | size
| ) | `[virtual]`

| It's an empty function, as FM devices don't support System Exclusive messages. Reimplemented from MidiOut. Definition at line 321 of file fmout.cc. Referenced by initDev().

void FMOut::setVolumePercentage | ( | int | i | ) | `[virtual]`

| See MidiOut::setVolumePercentage(). Reimplemented from MidiOut. Definition at line 337 of file fmout.cc. References KStdAccel::close(), and KStdAccel::open().

int FMOut::patch | ( | int | p | ) |

| Returns `p` if the patch p has been loaded, or another patch (already loaded) if `p` hasn't been loaded. Definition at line 207 of file fmout.cc. Referenced by noteOn().

void FMOut::setFMPatchesDirectory | ( | const char * | dir | ) | `[static]`

| Sets the directory where the FM patches are stored, that is, where the std.o3, std.sb, drums.o3 and drums.sb files can be found. It will store a copy of the parameter, so you should delete the memory used by the parameter you passed. Definition at line 326 of file fmout.cc.

The documentation for this class was generated from the following files:

- fmout.h
- fmout.cc

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:28:36 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001