LunaMod Generator

miniMO's LunaMod is a sequence tone generator. It plays a series of 64 notes in a loop, and while you keep the button pressed, it records the knob's positions as notes. Depending of the tempo and the time you keep the button pressed, you can modify individual notes, or the entire loop at once (more details here).


Download from Github


  • 64-note sequencer
  • Real time tempo and sequence control
  • Three waveforms: triangle, square, and saw
  • External modulation of either frequency or tempo
  • External waveform change triggering
  • Automatic Battery check



  • 1&2: Outputs - signal
  • 3: Input - frequency/tempo modulation
  • 4: Input - wave change


  • Knob: change tempo (default) or frequency
    • If you change tempo, miniMO waits until you reach the value it has currently stored
    • The LED toggles ON/OFF every 8 notes to give an indication of the tempo
  • Button Press: record the knob's position
    • Recording continues for as long as the button is pressed
    • After the button is depressed, the knob controls tempo once more
  • Finger Tap on both terminals of I/O 4: cycle through the available wave shapes
    • Shapes (in order): triangle, square, and saw
    • You can also use an external source to change waves automatically


When you switch the module ON,

  • If the LED blinks once, the battery is OK
  • If the LED blinks fast several times, the battery is running low



  • This program uses I/O 4 as a makeshift extra button
  • The best way to try this feature is to set the tempo to a low value, then gently place a finger over BOTH pins of I/O 4, until the wave changes
  • Usually it takes pressing for about a "LED interval" for the wave to change
  • This is an experimental feature! if for whatever reason it doesn't work for you, please let me know
  • To disable this feature,
    • comment the line that has the following code: if (analogRead(1) < 700) advanceWave();
    • modify writeWave(value from 0 to 2) to set the initial wave shape


This program is based on a Remix by Rob Miles of the original LunaMod project, by Brian McNamara.