2014-01-18 04:51:46 -05:00
|
|
|
|
|
|
|
;*************************************************
|
|
|
|
;* RULES - MIDI FILTERS
|
|
|
|
;*************************************************
|
|
|
|
|
|
|
|
/*
|
2014-01-19 02:34:27 -05:00
|
|
|
The MidiRules section is for modifying midi input from some other source.
|
2014-01-25 09:13:33 -05:00
|
|
|
Alter these functions as required.
|
2014-01-25 00:49:59 -05:00
|
|
|
*/
|
2014-01-19 02:34:27 -05:00
|
|
|
|
2014-01-25 00:49:59 -05:00
|
|
|
; *** New rule handler functions ***
|
|
|
|
ProcessNote(device, channel, note, velocity, isNoteOn) {
|
|
|
|
/*
|
|
|
|
Add your own note filters here.
|
2014-01-19 02:34:27 -05:00
|
|
|
|
|
|
|
Example:
|
2014-01-25 00:49:59 -05:00
|
|
|
if (isNoteOn and note == 20)
|
2014-01-18 04:51:46 -05:00
|
|
|
{
|
2014-01-25 00:49:59 -05:00
|
|
|
; Clamp the velocity to 80
|
|
|
|
if (velocity > 80) {
|
|
|
|
velocity := 80
|
|
|
|
}
|
2014-01-19 02:34:27 -05:00
|
|
|
gosub, SendNote ; send the note out.
|
2014-01-18 04:51:46 -05:00
|
|
|
}
|
2014-01-25 00:49:59 -05:00
|
|
|
*/
|
|
|
|
}
|
2014-01-18 04:51:46 -05:00
|
|
|
|
2014-01-25 00:49:59 -05:00
|
|
|
ProcessCC(device, channel, cc, value) {
|
|
|
|
global AxisMax_X, max_cc_val, iInterface, HID_USAGE_X
|
|
|
|
if (cc == 7) {
|
2014-01-25 09:13:33 -05:00
|
|
|
new_axis_value := ConvertCCValueToAxis(value, 127, AxisMax_X)
|
|
|
|
VJoy_SetAxis(new_axis_value, iInterface, HID_USAGE_X)
|
|
|
|
DisplayOutput("Axis X", ConvertCCValue(value, 127))
|
2014-01-25 00:49:59 -05:00
|
|
|
}
|
|
|
|
}
|
2014-01-18 04:51:46 -05:00
|
|
|
|
2014-01-25 00:49:59 -05:00
|
|
|
ProcessPC(device, channel, note, velocity) {
|
|
|
|
}
|
2014-01-19 02:34:27 -05:00
|
|
|
|
2014-01-25 09:13:33 -05:00
|
|
|
ProcessPitchBend(device, channel, value) {
|
|
|
|
|
|
|
|
}
|
2014-01-18 04:51:46 -05:00
|
|
|
|