# Analog-to-digital percussions

tl;dr: jump to the end for a video where I hit a thing that sounds like other things.

Percussions are as cool as they are broadly defined. Hit a thing once – that’s noise. Hit it again rhytmically – that’s percussion.

The constraint is, you need an it to hit: a drum, cymbal, triangle, tambourine, you name it. Something physically instantiated in this world, of course. But this also means owning them, carrying them around, setting them up, keeping them in tune, and all the jazz associated with objects that exist. So, in a world were atoms turn into bits (unintentional fission pun), I set out to find how good digital percussions could be.

## The it to hit

The first obvious step was scouting the options for an actual input device. Digital percussion modules/pads are a thing, and they come in a variety of shapes and target audiences – ranging from Roland’s drumstick-affine Octapads to Akai’s fingerhitting-good MPCs. However, if we filter for something that is playable with bare hands, compact, and somewhat similar to a drum/tambourine… Than the options dry out really quick: only 3 actual contenders are left:

At the left, we see Korg’s Wavedrum. The demo performance is worth checking out: the responsivity is out of this world – even jazz brushes work. The product, however, has no MIDI output and lacks any sort of media input: you’re basically stuck with the built-in sounds. Also, having been released in 2009, it reeks of discontinuation. Too much of a risk for the >500€ price tag.

Next in line, there’s the Roland HandSonic HPD-20, which seems to be de facto standard in its niche. MIDI out and an SD card for user samples are present, and the multi-region pad make for a highly configurable system. The issue? A ~1k€ price tag. *shrug*

Last but not least, I stumbled upon Keith McMillen’s BopPad. As showcased, each of its 4 quadrants can indenpendently output velocity, pressure and radius information – all fully configurable -, opening quite a lot of possibilities. Different from the other contenders however, this 200€ module isn’t a standalone system, requiring a computer for actual sound generation/output. This wasn’t really an issue for me, so put a ring on it.

## From hit to bit, and back

The quest now was for decent sound samples. Percussion VSTs exist in countless shapes, forms, styles and price ranges – from high-end orchestral ensembles to free collections of latin one-shots. However, for realistic results, multi-sampled instruments are a must – and here, again, the options dry out. After some searching, I converged to Sonivox’ Atsia Percussion, which offers a rich selection of drums, bells and shakers. Samples are provided in a way that hits to different regions of e.g. a drum (say, center, edge or rim) are mapped to different MIDI notes – which is precisely what I was looking for.

Though it isn’t free, the Atsia Percussion‘s 20USD price tag felt more than fair.

## Hit the brick (wall)

A problem arose when trying to put the VST and the BopPad together, however.

As we see above, in (a), when playing a drum/tambourine, different sounds can be produced by hitting the skin at different radial regions (there’s way more than that, but that’s a start). The BopPad, as seen in (b), however, offers a 1-note-per-quadrant approach. Sure, I could just map each drum’s region to a quadrant and be done with it, but I felt it’d really rob the intuitiveness and playability of the underlying instrument. It’d just be weird. So, the goal became (c): implement a more natural mapping/playability for the BopPad.

## Another bit in the wall

Using BopPad’s provided settings editor, I started off by configuring it to emit not only a note when hit, but also the radial position at which the hit happened*, as a MIDI CC:

This information needed to be unpacked on the host side, so I once again took advantage of REAPER‘s (my DAW of choice) scripting capabilities**. Long story short, I cooked up a little JSFX plugin that waits for the radial CC information, maps it and reemits it to the DAW as a configurable note:

The start of the show, _bpq_map_note(), does what you’d expect – mapping the radial position to an user-defined note in an array***:

The playable notes are defined directly in the plugin’s UI. That allows the user to save different note configurations for different instruments directly in the DAW, and hot-swap them (even live), without having to reconfigure anything on the BopPad itself.

You can check out the full code here. It ended up doing quite a bit more: it can produce different CCs, pitch bend, map quadrants to different MIDI channels, etc. It uses REAPER’s built-in slider controls, so the UI is… peculiar. Yet, the functionality is all there.

* There are some more less relevant details to this setup; you can check out the import-able configuration for the BopPad here.
** I avoided a lot of details in this single sentence. If you’re interested in REAPER and the JSFX/EEL2 programming environment, this post is a gold mine.
*** Arrays in JSFX/EEL2 are weird. This and this were very useful resources on the subject; the code I stole is also interesting to look at.

## Hit it

Astonishingly, it actually works. In the video below, I’m switching between a preset for a djembe (from Atsia Percussion) and a handpan (powered by AmpleSound’s Cloud Drum, a really nice free VST), both of which use different mapping schemes configured directly in the plugin.

## Get it

REAPER supports ReaPack, a cool and straightforward package manager, and Martins BopPad Mapper can be obtained through it*. To get it,

1. Install ReaPack
2. Add the repository to the ReaPack, by opening the “Import repositories…” option, and pasting this URL into it: https://raw.githubusercontent.com/MartinBloedorn/ReaThings/master/JSFX/index.xml
3. “Browse packages…” and search for “martins”. Select the package, mark it for install and apply the changes.
4. Restart REAPER, and voilà, the plugin will be visible.

* Warm thanks to cfillion and sai’ke for respectively documenting and providing examples for the index format.

’til next time.