mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 16:41:02 +02:00
Requested updates
This commit is contained in:
parent
7476de60ce
commit
f233c93aaa
2 changed files with 85 additions and 74 deletions
|
@ -113,7 +113,8 @@ void CALLBACK MidiInProc(HMIDIIN hMidiIn, UINT wMsg, DWORD_PTR dwInstance, DWORD
|
|||
note = 0;
|
||||
}
|
||||
if (typePitchBendEnabled && type == MIDI_PITCH_BEND_CHANGE) {
|
||||
bend = ((MIDI_BYTE_MASK & (dwParam1 >> MIDI_SHIFT_NOTE)) | (MIDI_PITCH_BEND_MASK & (dwParam1 >> MIDI_SHIFT_PITCH_BEND))) - 8192;
|
||||
bend = ((MIDI_BYTE_MASK & (dwParam1 >> MIDI_SHIFT_NOTE)) |
|
||||
(MIDI_PITCH_BEND_MASK & (dwParam1 >> MIDI_SHIFT_PITCH_BEND))) - 8192;
|
||||
channel = 0; // Weird values on different instruments
|
||||
note = 0;
|
||||
velocity = 0;
|
||||
|
|
|
@ -50,16 +50,26 @@ signals:
|
|||
public slots:
|
||||
// Send Raw Midi Packet to all connected devices
|
||||
Q_INVOKABLE void sendRawDword(int device, int raw);
|
||||
/// Send Raw Midi message to selected device
|
||||
/// @param {int} device: device number
|
||||
/// @param {int} raw: raw midi message (DWORD)
|
||||
|
||||
// Send Midi Message to all connected devices
|
||||
Q_INVOKABLE void sendMidiMessage(int device, int channel, int type, int note, int velocity);
|
||||
/// Send midi message to selected device/devices
|
||||
/// @param {int} device: device number
|
||||
/// @param {int} channel: channel number
|
||||
/// @param {int} type: 0x8 is noteoff, 0x9 is noteon (if velocity=0, noteoff), etc
|
||||
/// @param {int} note: midi note number
|
||||
/// @param {int} velocity: note velocity (0 means noteoff)
|
||||
|
||||
// Send Midi Message to all connected devices
|
||||
Q_INVOKABLE void playMidiNote(int status, int note, int velocity);
|
||||
/// play a note on all connected devices
|
||||
/// @param {int} status: 0x80 is noteoff, 0x90 is noteon (if velocity=0, noteoff), etc
|
||||
/// @param {int} note: midi note number
|
||||
/// @param {int} velocity: note velocity (0 means noteoff)
|
||||
|
||||
Q_INVOKABLE void playMidiNote(int status, int note, int velocity);
|
||||
|
||||
/// turn off all notes on all connected devices
|
||||
Q_INVOKABLE void allNotesOff();
|
||||
|
||||
|
|
Loading…
Reference in a new issue