Just Intonation  Version 1.3.1 (19)
Explore key-independent dynamically adapting tuning in just intonation
MidiMicrotonalHelper Class Reference

Auxiliary class for microtonal conversion. More...

#include <midimicrotonalhelper.h>

Inheritance diagram for MidiMicrotonalHelper:
Inheritance graph
Collaboration diagram for MidiMicrotonalHelper:
Collaboration graph

Public Slots

void sendInitialMidiCommands (void)
 Send initial Midi commands. More...
 

Public Member Functions

 MidiMicrotonalHelper (MidiMicrotonal *midimicrotone)
 Constructor, resetting the member variables. More...
 
void setInstrument (int instrument)
 Set the instrument (program) More...
 
void turnNoteOn (int channel, int key, int volume, double delta)
 Turn note on. More...
 
void turnNoteOff (int channel, int key, double delta)
 Turn note off. More...
 
void afterTouch (int channel, int key, int volume, double delta)
 Polyphonic Key Pressure (Aftertouch). More...
 
void controlChange (int channel, int control, int value, double delta)
 Polyphonic Key Pressure (Aftertouch). More...
 
void bankSelect (int bank, double delta)
 MidiMicrotonalHelper::bankSelect. More...
 
void allNotesOff ()
 Turn all notes off. More...
 
void resetAllControllers ()
 Reset all controllers. More...
 
void localControl (bool on)
 Enable local control. More...
 
void tune (int key, double pitch)
 MidiMicrotonalHelper::tune. More...
 
void setVerbosity (int verbosity)
 Set the verbosity level of the class-specific messages. More...
 
int getVerbosity ()
 Get the actual verbosity level. More...
 

Private Member Functions

void playNote (bool on, int mappedChannel, int key, int vol, double delta)
 
void setPitchBend (int channel, double pitch)
 

Private Attributes

MidiMicrotonalpMidiMicrotonal
 Pointer back. More...
 
QVector< bool > mMappedChannelIsUsed
 Indicates usage of channel. More...
 
QVector< int > mKeyOfMappedChannel
 Associated key. More...
 
int mSequentialNumber
 Increasing tag. More...
 
QVector< int > mSequentialNumberOfMappedChannel
 Tag storage. More...
 
QVector< double > mCurrentPitch
 Pitch. More...
 
int mInstrument
 The selected instrument. More...
 
const int cDrumChannel = 9
 Take out drum channel. More...
 

Detailed Description

Auxiliary class for microtonal conversion.

Definition at line 36 of file midimicrotonalhelper.h.

Constructor & Destructor Documentation

MidiMicrotonalHelper::MidiMicrotonalHelper ( MidiMicrotonal midimicrotone)

Constructor, resetting the member variables.

Parameters
midimicrotone: Pointer back to the instance of MidiMicrotone

Definition at line 36 of file midimicrotonalhelper.cpp.

Here is the call graph for this function:

Member Function Documentation

void MidiMicrotonalHelper::afterTouch ( int  channel,
int  key,
int  volume,
double  delta 
)

Polyphonic Key Pressure (Aftertouch).

Parameters
channel
key
volume
delta

Definition at line 136 of file midimicrotonalhelper.cpp.

void MidiMicrotonalHelper::allNotesOff ( )

Turn all notes off.

Definition at line 232 of file midimicrotonalhelper.cpp.

Here is the call graph for this function:

void MidiMicrotonalHelper::bankSelect ( int  bank,
double  delta 
)

MidiMicrotonalHelper::bankSelect.

Parameters
bank
delta

Definition at line 184 of file midimicrotonalhelper.cpp.

void MidiMicrotonalHelper::controlChange ( int  channel,
int  control,
int  value,
double  delta 
)

Polyphonic Key Pressure (Aftertouch).

Parameters
channel
control
value
delta

Definition at line 162 of file midimicrotonalhelper.cpp.

int Log::getVerbosity ( )
inherited

Get the actual verbosity level.

Returns
: Verbosity level (1...4)

Definition at line 118 of file log.cpp.

void MidiMicrotonalHelper::localControl ( bool  on)

Enable local control.

If one plays on an electronic keyboard it is per default controlled locally, that is, pressing a key produces a sound. This means that the keyboard unit and the sound-generating unit in the keyboard are connected. For playing in just intonation, we have to switch the local control off and send all data through the attached computer.

Parameters
on: True = local control, false = no local control

Definition at line 352 of file midimicrotonalhelper.cpp.

void MidiMicrotonalHelper::playNote ( bool  on,
int  mappedChannel,
int  key,
int  vol,
double  delta 
)
private

Definition at line 286 of file midimicrotonalhelper.cpp.

Here is the call graph for this function:

void MidiMicrotonalHelper::resetAllControllers ( )

Reset all controllers.

Definition at line 248 of file midimicrotonalhelper.cpp.

void MidiMicrotonalHelper::sendInitialMidiCommands ( void  )
slot

Send initial Midi commands.

This function sends the intial MIDI commands for initialization. In particular it resets all channels to the same mInstrument. Moreover, it switches the local control of the target device off.

Definition at line 326 of file midimicrotonalhelper.cpp.

Here is the call graph for this function:

void MidiMicrotonalHelper::setInstrument ( int  instrument)

Set the instrument (program)

Parameters
instrument: Midi instrument number (0...127)

Definition at line 57 of file midimicrotonalhelper.cpp.

void MidiMicrotonalHelper::setPitchBend ( int  channel,
double  pitch 
)
private

Definition at line 300 of file midimicrotonalhelper.cpp.

void Log::setVerbosity ( int  verbosity)
inherited

Set the verbosity level of the class-specific messages.

Parameters
verbosity: Verbosity level (1...4)

Definition at line 107 of file log.cpp.

void MidiMicrotonalHelper::tune ( int  key,
double  pitch 
)

MidiMicrotonalHelper::tune.

This function receives the key number and the corresponding cent deviatin from the tuner module. It scans the array to look up which of the 16 channels currently plays this key. If so, the pitch bend function is called.

Parameters
key: Number of the key
pitch: pitch versus ET in cent

Definition at line 269 of file midimicrotonalhelper.cpp.

Here is the call graph for this function:

void MidiMicrotonalHelper::turnNoteOff ( int  channel,
int  key,
double  delta 
)

Turn note off.

Parameters
channel
key
delta

Definition at line 211 of file midimicrotonalhelper.cpp.

Here is the call graph for this function:

void MidiMicrotonalHelper::turnNoteOn ( int  channel,
int  key,
int  volume,
double  delta 
)

Turn note on.

Parameters
channel
key
volume
delta

Definition at line 75 of file midimicrotonalhelper.cpp.

Here is the call graph for this function:

Member Data Documentation

const int MidiMicrotonalHelper::cDrumChannel = 9
private

Take out drum channel.

Definition at line 68 of file midimicrotonalhelper.h.

QVector<double> MidiMicrotonalHelper::mCurrentPitch
private

Pitch.

Definition at line 66 of file midimicrotonalhelper.h.

int MidiMicrotonalHelper::mInstrument
private

The selected instrument.

Definition at line 67 of file midimicrotonalhelper.h.

QVector<int> MidiMicrotonalHelper::mKeyOfMappedChannel
private

Associated key.

Definition at line 63 of file midimicrotonalhelper.h.

QVector<bool> MidiMicrotonalHelper::mMappedChannelIsUsed
private

Indicates usage of channel.

Definition at line 62 of file midimicrotonalhelper.h.

int MidiMicrotonalHelper::mSequentialNumber
private

Increasing tag.

Definition at line 64 of file midimicrotonalhelper.h.

QVector<int> MidiMicrotonalHelper::mSequentialNumberOfMappedChannel
private

Tag storage.

Definition at line 65 of file midimicrotonalhelper.h.

MidiMicrotonal* MidiMicrotonalHelper::pMidiMicrotonal
private

Pointer back.

Definition at line 61 of file midimicrotonalhelper.h.


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