37 : pMidiMicrotonal(midimicrotone)
38 , mMappedChannelIsUsed(16,false)
39 , mKeyOfMappedChannel(16,-1)
40 , mSequentialNumber(0)
41 , mSequentialNumberOfMappedChannel(16,0)
42 , mCurrentPitch(128,0)
59 LOGMESSAGE <<
"Set Midi output channel to" << instrument;
83 LOGSTATUS <<
"Turn note on: Channel =" << channel <<
"/ key =" << key
84 <<
"/ volume =" << volume;
87 int mappedChannel = -1;
88 int lowestSequentialNumber = 0x7fffffff;
99 if (mappedChannel < 0)
101 lowestSequentialNumber = 0x7fffffff;
110 if (mappedChannel < 0)
LOGERROR <<
"Search inconsistent";
112 LOGSTATUS <<
"Release key on mapped channel" << mappedChannel;
120 playNote (
true,mappedChannel,key,volume,delta);
138 LOGSTATUS <<
"Polyphonic Key Pressure, channel =" << channel <<
"/ key =" << key;
144 quint8 command = 0xA0 | c;
164 LOGSTATUS <<
"Control change, channel =" << channel <<
"/ control =" << control;
168 quint8 command = 0xB0 | c;
186 LOGSTATUS <<
"bank select, bank =" << bank;
190 quint8 command = 0xB0 | c;
213 LOGSTATUS <<
"Turn note off: channel =" << channel <<
"/ key =" << key;
235 for (quint8 command = 0xB0U; command < 0xC0U; command++)
251 for (quint8 command = 0xB0U; command < 0xC0U; command++)
273 for (
int c=0; c<16; c++)
288 int command = (on ? 0x90 : 0x80) + (mappedChannel & 0x0f);
302 LOGSTATUS <<
"Pitch bend: channel =" << channel <<
"/ pitch =" << pitch;
303 if (qAbs(pitch) >= 200)
305 LOGWARNING <<
"Cannot tune" << pitch <<
"cents";
308 int command = 0xe0 + (channel & 0x0f);
309 int pitchbend = qRound(8192 * (1+pitch/200));
310 qint8 arg1 = pitchbend & 0x7f;
311 qint8 arg2 = (pitchbend >> 7) & 0x7f;
354 LOGMESSAGE <<
"Local control of external Midi =" << on;
355 for (quint8 command = 0xB0U; command < 0xC0U; command++)
358 QMidiMessage(command, 122, on ? 0x7f : 0, 0.0));
void resetAllControllers()
Reset all controllers.
void setModuleName(const QString &name)
Specify the name of the class-specific module.
QVector< bool > mMappedChannelIsUsed
Indicates usage of channel.
MidiMicrotonalHelper(MidiMicrotonal *midimicrotone)
Constructor, resetting the member variables.
void setPitchBend(int channel, double pitch)
void allNotesOff()
Turn all notes off.
void bankSelect(int bank, double delta)
MidiMicrotonalHelper::bankSelect.
void controlChange(int channel, int control, int value, double delta)
Polyphonic Key Pressure (Aftertouch).
void sendMidiEvent(QMidiMessage event)
Output signal: This is the converted outgoing stream of Midi events.
MidiMicrotonal * pMidiMicrotonal
Pointer back.
void setInstrument(int instrument)
Set the instrument (program)
void playNote(bool on, int mappedChannel, int key, int vol, double delta)
int mSequentialNumber
Increasing tag.
Class for converting an ordinary Midi stream into a microtonal one.
void turnNoteOn(int channel, int key, int volume, double delta)
Turn note on.
void localControl(bool on)
Enable local control.
void sendInitialMidiCommands(void)
Send initial Midi commands.
void tune(int key, double pitch)
MidiMicrotonalHelper::tune.
void afterTouch(int channel, int key, int volume, double delta)
Polyphonic Key Pressure (Aftertouch).
static const QMidiMessage cLoopMarker
Closed-loop marking event.
const int cDrumChannel
Take out drum channel.
int mInstrument
The selected instrument.
QVector< double > mCurrentPitch
Pitch.
void turnNoteOff(int channel, int key, double delta)
Turn note off.
QVector< int > mSequentialNumberOfMappedChannel
Tag storage.
QVector< int > mKeyOfMappedChannel
Associated key.