Jamoma API  0.6.0.a19
TTMidiInput.h
1 /*
2  * Midi Input Object
3  * Copyright © 2011, Timothy Place
4  *
5  * License: This code is licensed under the terms of the "New BSD License"
6  * http://creativecommons.org/licenses/BSD/
7  */
8 
9 #ifndef __TT_MIDIINPUT_H__
10 #define __TT_MIDIINPUT_H__
11 
12 #include "TTDSP.h"
13 #include "TTGraph.h"
14 #include "portmidi.h"
15 
16 
17 /** TTMidiInput receives MIDI input from an external device.
18  It is a wrapper around the PortMidi library.
19  */
20 
23 
24 public:
25 
26  TTSymbol mDevice; ///< attr: selected device name
27  const PmDeviceInfo* mDeviceInfo; ///< selected device info struct
28  PmDeviceID mID; ///< selected device ID number
29  PortMidiStream* mStream; ///< a descriptor for a MIDI device that is opened when the device is set
30  TTThreadPtr mPollingThread; ///< our loop that constantly polls for new input
31  TTBoolean mRunning; ///< should the thread be running? If NO then the thread will know to abort itself
32  TTGraphObjectBasePtr mOwner; ///< a graph object that can push() calls when we receive MIDI
33 
34  TTErr getAvailableDeviceNames(const TTValue&, TTValue& returnedDeviceNames);
35  TTErr setDevice(TTValue& newDeviceName);
36 
37 };
38 
39 
40 #endif // __TT_MIDIINPUT_H__
The TTGraphObjectBase wraps a TTDSP object such that it is possible to build a dynamic graph of audio...
bool TTBoolean
Boolean flag, same as Boolean on the Mac.
Definition: TTBase.h:167
Jamoma Asynchronous Object Graph Layer.
TTDataObjectBase is the base class for all data generating and processing objects.
Jamoma DSP Library.
TTBoolean mRunning
should the thread be running? If NO then the thread will know to abort itself
Definition: TTMidiInput.h:31
#define TTCLASS_SETUP(className)
TODO Doxygen: need more comments here.
Definition: TTFoundation.h:54
PortMidiStream * mStream
a descriptor for a MIDI device that is opened when the device is set
Definition: TTMidiInput.h:29
The TTSymbol class is used to represent a string and efficiently pass and compare that string...
Definition: TTSymbol.h:26
const PmDeviceInfo * mDeviceInfo
selected device info struct
Definition: TTMidiInput.h:27
TTGraphObjectBasePtr mOwner
a graph object that can push() calls when we receive MIDI
Definition: TTMidiInput.h:32
TTErr
Jamoma Error Codes Enumeration of error codes that might be returned by any of the TTBlue functions a...
Definition: TTBase.h:342
PmDeviceID mID
selected device ID number
Definition: TTMidiInput.h:28
TTSymbol mDevice
attr: selected device name
Definition: TTMidiInput.h:26
TTThreadPtr mPollingThread
our loop that constantly polls for new input
Definition: TTMidiInput.h:30
[doxygenAppendixC_copyExample]
Definition: TTValue.h:34
TTMidiInput receives MIDI input from an external device.
Definition: TTMidiInput.h:21