CSL
6.0
|
MIDIIO class: superclass of in and out; has a message buffer and current messages It's a model so you can observe it. Uses mMsg.CMIDIMessageType as a status flag. More...
#include <MIDIIOJ.h>
Public Member Functions | |
MIDIIO () | |
< It's a model & sends itself "changed" More... | |
virtual | ~MIDIIO () |
void | open () |
open the abstract More... | |
virtual void | open (int devID)=0 |
open a device More... | |
bool | isOpen () |
true if MIDI stream is opened. More... | |
virtual void | close () |
closing MIDI stream More... | |
virtual void | start () |
virtual void | stop () |
start MIDI stream More... | |
virtual void | clear () |
stop MIDI stream More... | |
void | dumpBuffer () |
MIDIIO () | |
virtual | ~MIDIIO () |
virtual void | open () |
bool | is_open () |
can't open the abstract class More... | |
void | close () |
closing MIDI stream More... | |
void | dump_device_info () |
printing device info for all devices. More... | |
void | dump_count_devices () |
printing total number of devices available More... | |
int | count_devices () |
int | get_default_input_id () |
int | get_default_output_id () |
const PmDeviceInfo * | get_device_info (int deviceID) |
void | attachObserver (Observer *) |
(possibly notify obersvers on my death) More... | |
void | detachObserver (Observer *) |
void | changed (void *argument) |
this is what I send to myself to notify my observers; It's not overridden in general. It results in the observers receiving update() calls < override evaluate to filter updates to the observer map More... | |
virtual int | evaluate (void *argument) |
Static Public Member Functions | |
static int | countDevices () |
static void | dumpDevices () |
printing device info for all devices. More... | |
Public Attributes | |
int | mDeviceID |
device ID which will/is opened. More... | |
CMIDIMessage | mMsg |
current message (its flags determine the port state) More... | |
CMIDIMessage | mMsg2 |
juce::MidiBuffer | mBuffer |
I/O buffer. More... | |
Protected Member Functions | |
void | handleError (CException *err) |
error handler More... | |
void | copyMessage (CMIDIMessage &source, CMIDIMessage &dest) |
copy csl::CMIDIMessage <–> juce::MidiMessage More... | |
void | copyMessage (CMIDIMessage &source, juce::MidiMessage *dest) |
void | copyMessage (const juce::MidiMessage &source, CMIDIMessage &dest) |
void | handle_error (PmError err) |
Protected Attributes | |
juce::MidiMessage * | mJMsg |
JUCE-format message. More... | |
bool | mIsOpen |
instance status indicators More... | |
long | mBufferSize |
long | mFilterFlag |
PmStream * | mMIDIStream |
opened stream More... | |
PmDeviceID | mDeviceID |
device ID which will/is opened. More... | |
bool | mIsInput |
bool | mIsOutput |
Static Protected Attributes | |
static bool | mIsInitialized = false |
< static flags to keep track of driver state More... | |
static unsigned | mNumInstantiated = 0 |
static bool | mIsPortTimeStarted = false |
status indicators More... | |
MIDIIO class: superclass of in and out; has a message buffer and current messages It's a model so you can observe it. Uses mMsg.CMIDIMessageType as a status flag.
MIDIIO class.
MIDIIO::MIDIIO | ( | ) |
< It's a model & sends itself "changed"
Definition at line 75 of file MIDIIOJ.cpp.
References csl::kNone, csl::CMIDIMessage::message, mIsInitialized, mIsOpen, and mMsg.
|
virtual |
Definition at line 83 of file MIDIIOJ.cpp.
References mIsInitialized.
csl::MIDIIO::MIDIIO | ( | ) |
|
virtual |
|
static |
Definition at line 51 of file MIDIIOJ.cpp.
|
static |
printing device info for all devices.
Definition at line 58 of file MIDIIOJ.cpp.
References len, and csl::logMsg().
void MIDIIO::open | ( | ) |
open the abstract
Definition at line 87 of file MIDIIOJ.cpp.
|
pure virtual |
open a device
Implemented in csl::MIDIOut, csl::MIDIPlayer, csl::MIDIOut, csl::MIDIIn, and csl::MIDIIn.
bool MIDIIO::isOpen | ( | ) |
|
virtual |
closing MIDI stream
Definition at line 95 of file MIDIIOJ.cpp.
References clear(), and mIsOpen.
Referenced by CSLMIDIComponent::~CSLMIDIComponent().
|
inlinevirtual |
Reimplemented in csl::MIDIIn.
|
inlinevirtual |
start MIDI stream
Reimplemented in csl::MIDIPlayer, and csl::MIDIIn.
|
virtual |
stop MIDI stream
clear MIDI stream
Definition at line 102 of file MIDIIOJ.cpp.
References csl::kNone, mBuffer, csl::CMIDIMessage::message, and mMsg.
Referenced by close(), and CSLMIDIComponent::update().
void MIDIIO::dumpBuffer | ( | ) |
Definition at line 179 of file MIDIIOJ.cpp.
|
protected |
error handler
Definition at line 194 of file MIDIIOJ.cpp.
References csl::kLogError, csl::logMsg(), and csl::CException::what().
|
protected |
copy csl::CMIDIMessage <–> juce::MidiMessage
Definition at line 109 of file MIDIIOJ.cpp.
References csl::CMIDIMessage::channel, csl::CMIDIMessage::command, csl::CMIDIMessage::data1, csl::CMIDIMessage::data2, csl::CMIDIMessage::message, and csl::CMIDIMessage::time.
Referenced by csl::MIDIIn::handleIncomingMidiMessage(), csl::MIDIIn::nextEvent(), csl::MIDIPlayer::start(), and csl::MIDIOut::write().
|
protected |
Definition at line 118 of file MIDIIOJ.cpp.
References csl::CMIDIMessage::channel, csl::CMIDIMessage::command, csl::CMIDIMessage::data1, csl::CMIDIMessage::data2, and csl::CMIDIMessage::time.
|
protected |
Definition at line 127 of file MIDIIOJ.cpp.
References CCOPY_MSG, csl::CMIDIMessage::channel, csl::CMIDIMessage::command, csl::CMIDIMessage::data1, csl::CMIDIMessage::data2, csl::kAftertouch, csl::kControlChange, csl::kLogError, csl::kNoteOff, csl::kNoteOn, csl::kPitchWheel, csl::kPolyTouch, csl::kProgramChange, csl::kSysEX, csl::logMsg(), csl::CMIDIMessage::message, mMsg, and csl::CMIDIMessage::time.
|
inlinevirtual |
Reimplemented in csl::MIDIOut, and csl::MIDIIn.
bool MIDIIO::is_open | ( | ) |
can't open the abstract class
true if MIDI stream is opened.
Definition at line 102 of file MIDIIOP.cpp.
References mIsOpen.
void csl::MIDIIO::close | ( | ) |
closing MIDI stream
void MIDIIO::dump_device_info | ( | ) |
printing device info for all devices.
Definition at line 113 of file MIDIIOP.cpp.
void MIDIIO::dump_count_devices | ( | ) |
printing total number of devices available
thin wrapper for PortMidi functions. made available for flexibility.
Definition at line 132 of file MIDIIOP.cpp.
int MIDIIO::count_devices | ( | ) |
Definition at line 138 of file MIDIIOP.cpp.
int MIDIIO::get_default_input_id | ( | ) |
Definition at line 142 of file MIDIIOP.cpp.
int MIDIIO::get_default_output_id | ( | ) |
Definition at line 146 of file MIDIIOP.cpp.
const PmDeviceInfo * MIDIIO::get_device_info | ( | int | deviceID | ) |
Definition at line 150 of file MIDIIOP.cpp.
Referenced by csl::MIDIIn::open(), and csl::MIDIOut::open().
|
protected |
Definition at line 156 of file MIDIIOP.cpp.
References csl::kLogError, and csl::logMsg().
Referenced by csl::MIDIIn::filter_active_sensing(), csl::MIDIIn::filter_clock_msg(), csl::MIDIIn::filter_sysex(), csl::MIDIIn::open(), csl::MIDIOut::open(), csl::MIDIIn::read(), csl::MIDIIn::setFilter(), csl::MIDIOut::write(), csl::MIDIOut::write_Aftertouch(), csl::MIDIOut::write_ControlChange(), csl::MIDIOut::write_NoteOff(), csl::MIDIOut::write_NoteOn(), csl::MIDIOut::write_PitchWheel(), csl::MIDIOut::write_PolyTouch(), csl::MIDIOut::write_ProgramChange(), csl::MIDIOut::write_short(), and csl::MIDIOut::write_SysEX().
|
inherited |
(possibly notify obersvers on my death)
register/remove observers
Definition at line 502 of file CGestalt.cpp.
References csl::logMsg(), csl::Observer::mKey, and csl::Observer::mPeriod.
Referenced by CSLMIDIComponent::CSLMIDIComponent(), and csl::SpatialPanner::setSpeakerLayout().
|
inherited |
Definition at line 518 of file CGestalt.cpp.
References csl::logMsg().
Referenced by csl::SpatialPanner::setSpeakerLayout(), and csl::SpatialPanner::~SpatialPanner().
|
inherited |
this is what I send to myself to notify my observers; It's not overridden in general. It results in the observers receiving update() calls < override evaluate to filter updates to the observer map
Definition at line 540 of file CGestalt.cpp.
References csl::logMsg().
Referenced by csl::SpeakerLayout::addSpeaker(), csl::MIDIIn::handleIncomingMidiMessage(), and csl::SpeakerLayout::setDefaultSpeakerLayout().
|
inlinevirtualinherited |
Reimplemented in csl::MIDIIn.
Definition at line 270 of file CGestalt.h.
int csl::MIDIIO::mDeviceID |
device ID which will/is opened.
Definition at line 103 of file MIDIIOJ.h.
Referenced by csl::MIDIIn::MIDIIn(), csl::MIDIOut::MIDIOut(), csl::MIDIIn::open(), and csl::MIDIOut::open().
CMIDIMessage csl::MIDIIO::mMsg |
current message (its flags determine the port state)
Definition at line 104 of file MIDIIOJ.h.
Referenced by clear(), copyMessage(), MIDIIO(), and csl::MIDIPlayer::start().
CMIDIMessage csl::MIDIIO::mMsg2 |
Definition at line 105 of file MIDIIOJ.h.
Referenced by csl::MIDIIn::handleIncomingMidiMessage().
juce::MidiBuffer csl::MIDIIO::mBuffer |
|
staticprotected |
|
protected |
JUCE-format message.
Definition at line 111 of file MIDIIOJ.h.
Referenced by csl::MIDIIn::nextEvent(), and csl::MIDIOut::write().
|
protected |
|
protected |
opened stream
Definition at line 113 of file MIDIIOP.h.
Referenced by csl::MIDIIn::filter_active_sensing(), csl::MIDIIn::filter_clock_msg(), csl::MIDIIn::filter_sysex(), csl::MIDIIn::open(), csl::MIDIOut::open(), csl::MIDIIn::read(), csl::MIDIIn::setFilter(), csl::MIDIOut::write(), csl::MIDIOut::write_Aftertouch(), csl::MIDIOut::write_ControlChange(), csl::MIDIOut::write_NoteOff(), csl::MIDIOut::write_NoteOn(), csl::MIDIOut::write_PitchWheel(), csl::MIDIOut::write_PolyTouch(), csl::MIDIOut::write_ProgramChange(), csl::MIDIOut::write_short(), and csl::MIDIOut::write_SysEX().
|
protected |
|
staticprotected |
status indicators
Definition at line 119 of file MIDIIOP.h.
Referenced by csl::MIDIIn::open(), and csl::MIDIOut::open().