[ANN] DrumMachine.jl 1.5.0: step sequencer for drum practice, with MIDI for e-drums

Hi everyone,

DrumMachine.jl is a step sequencer in Julia for drum practice: you enter a groove, listen to it, export it as WAV and play along.

I play drums and built it for my own practice. It talks to my e-drum module (Roland TD-27) over USB: it records what I play, and it can play a groove through the module while I play along.

Grooves and sound

  • Grid in 16ths, 8ths, 8th or 16th triplets, 32nds; up to 32 steps per pattern, so 5/4 or 7/8 work
  • Ghost, normal and accent per note, plus double stroke, buzz roll, flam and drag
  • Up to 24 patterns per song, each with its own tempo; 30 to 400 BPM, swing 50 to 80 %
  • 12 tracks, sampled kits from free libraries (AVL, DrumGizmo, Virtuosity, Crocell) and 808/909 synth kits
  • 57 presets, “+ Fill” makes a fill from the current groove
  • Human: the timing drifts slowly like a drummer instead of random noise per hit, hi-hat and ride accent the beats, softer hits pick softer recordings
  • Feel moves a track up to 40 ms earlier or later (laid-back snare)
  • WAV export with count-in and click, loop export the TD-27 accepts, MIDI export

MIDI with an e-drum

  • Record: a click plays, from the first hit on every bar goes into a new song
  • Calibrate: you play a short groove along, the program sets the thresholds for ghost and accent per pad and the timing offset
  • Output: the pattern goes out as notes on channel 10, with MIDI clock so the module’s click follows the tempo
  • Output with “clock only”: the pattern plays from the computer, the module gets only the tempo, so your own playing and the pattern have different sounds
  • Kit: selects the kit of the module by number (program change), also written into the MIDI export
  • Setup player for the stage: songs, WAVs and MIDI files in order, MIDI files through the module

For the Julia side: the GUI is GLMakie, audio goes through PortAudio, MIDI through PortMidi_jll with ccall. The audio thread sends the MIDI messages without allocating, timed for the moment the sound card plays the same point, so module and computer stay in time.

Install (Julia 1.13 or newer, OpenGL 3.3)

julia -t auto -e 'using Pkg; Pkg.add("DrumMachine"); using DrumMachine; DrumMachine.run()'

Limits

Tested on Linux (KDE Plasma, Wayland). It runs on Windows too, MIDI is untested there; macOS is untested. PLATFORMS.md lists the known gaps. The note table is made for the TD-27; other modules need a mapping in the settings file. Preset names are German.

1 Like