Volca Sample MIDI Mapper using Arduino

The Korg Volca Sample uses 10 MIDI channels for the each sound. This can not be changed.

This is annoying if you want to use Volca as a external drum machine using a external sequencer or DAW.

This arduino code listen notes from single MIDI channel (16) and send to each channel on Sample (support velocity).

The new code support chromatic play through MIDI channel 1-10.

You need to build MIDI In / Out circuit(or get a MIDI shield). Check out this link for the detail how to build.

Check out other similar project here and here.


Arduino MIDI In & Out Circuit


  • 1 x Arduino
  • 1 x 6N138 Optocoupler
  • 1 x 1N4148 (or 1N914) diode
  • 3 x 220 Ohm resistor
  • 2 x 1K Ohm resistor
  • 2 x 5-Pin DIN MIDI connector (female)

The Code


Note & Update

I’ve change two resistor value in MIDI IN circut.

220 Ohm resistor between optocoupler’s pin 6 & pin 8 to 1K Ohm and 4.7K Ohm between pin 7 & GND to 1K Ohm. It’s eliminate jitters and getting much sharper signals without drop.

And it’s not strictly required but I added a small capacitor between optocoupler’s pin 2 & GND for filtering out high frequency noise.

I think there’re some errors and not optimal part choice in the many MIDI circuit using a 6N138 opto floating around Arduino community. I’ll test with different opto like H11L1 or 6N137 soon.

Added velocity support. Volca Sample don’t listen velocity but support level change with CC msg so it’s now mimicking(?) velocity.

06 Mar 2020 : Now it’s filter out notes from other channels and only listening channel 16 (you can use any note on channel 16 to trigger 1~10 sounds on Sample). All other midi message will not getting through except clock, start, stop and continue(if you don’t need it just comment out from the code).

09 Mar 2020 : More compact code using setThruFilterMode(). Now all message passthru to Sample if it’s from MIDI Channel 16 (VolcaChannel).

12 Mar 2020 : New chromatic notes playing code. You can use MIDI Channel 1-10 for chromatic play each sounds or each note will trigger different sounds on MIDI channel 16.

Arduino oled nitrox analyzer

This is update version of my DIY nitrox analyzer based on Arduino compatible board.

It’s using small oled display and powered by 9v battery. Display o2 percentage of gas, sensor mv output, two MOD(maximum operating depth) in meter. 1 push button for lock screen, calibration, po2 change.

Part list
  • Arduino nano compatible board (or any other Arduino board will do)
  • ADS1115 16 Bit DAC Module (the ADS1115 provides 16-bit precision at 860 samples/second over I2C!)
  • 0.96 inch OLED 128×64 I2c display module
  • Rocker or toggle switch for power on/off
  • 1 Push button
  • 1 9v battery connector (better using 3 AA or AAA)
  • 1 Piezo Buzzer (I took one from pc. Skip if you don’t need beeping analyzer :)
  • 1 Connector for o2 sensor (mine is molex)
  • 1 O2 sensor (I use old cell from my CCR but you can get sensor from Teledyne, Maxtec or other manufacturer.


  • VDD to 5v
  • GND to Ground
  • SCL to A5 (nano)
  • SDA to A4 (nano)

OLED 128×64 I2c display module

  • GND to Ground
  • VCC to 5v
  • SCL to A5 (nano)
  • SDA to A4 (nano)

Push button

  • 1 pin to Ground
  • 2 pin to D2 (nano)

9v battery

  • positive to VIN (nano) through rocker (toggle) switch
  • negative to Ground


  • positive to D9 (nano)
  • negative to Ground

Oxygen sensor

  • positive to A0 ADS1115
  • negative to A1 ADS1115
The source

Additional library


youtube video

  • 1 short button push to lock current display (1 push to unlock)
  • 2 sec hold to calibration
  • 3+ sec hold to MOD PO2 change (1.3 to 1.5 rotation)

I put everything include sensor in a small plastic box(65×95×55mm) with transparent cover. Here’s some image of ugly looking inside. I’m sure someone can 3d print smaller and prettier shell.

9v battery is very poor choice for Arduino project (I used because that’s what I have many). AA, AAA x 3 or small rechargeable batteries are better.

Warning! Be cautious when you use 9v battery. Arduino onboard DC regulator will be destroyed if you accidentally switch positive & negative.

Todo list

  • clean the code
  • replace board to custom pcb or pro mini
  • replace 9v batt to rechargeable small lipo battery
  • smaller case

Please don’t email me about basic arduino programming issue. You can search or post question here. https://forum.arduino.cc