// ****************************************************************************************************** // * DW6000 controller for Arduino nano V3 * // * Author: PHOBoS * // * Date: Jun 3rd, 2018 * // ****************************************************************************************************** // * * // * example code that repeatedly sweeps the filer cutoff frequency up and down * // * * // ****************************************************************************************************** #include #include // use midi library MIDI_CREATE_DEFAULT_INSTANCE(); // use default midi configuration // KORG DW6000 parameter change bytes const byte exclusive = 0xF0; const byte korg_id = 0x42; const byte format_id = 0x30; const byte dw6000_id = 0x04; const byte param_change = 0x41; const byte eox = 0xF7; byte param_offset = 5; // selected parameter (5 = filter cutoff frequency) byte param_value = 0; // value for selected parameter byte sysexArray[] = {exclusive, korg_id, format_id, dw6000_id, param_change, param_offset, param_value, eox}; void setup(void) { pinMode(LED_BUILTIN, OUTPUT); // initialize built in LED as an output MIDI.begin(MIDI_CHANNEL_OMNI); // set midi channels to OMNI } void loop() { for (param_value = 0; param_value < 63; param_value++) { digitalWrite(LED_BUILTIN, HIGH); sysexArray[6] = param_value; MIDI.sendSysEx(8, sysexArray, false); delay(10); } for (param_value = 63; param_value > 0; param_value--) { digitalWrite(LED_BUILTIN, LOW); sysexArray[6] = param_value; MIDI.sendSysEx(8, sysexArray, false); delay(10); } }