Teensy Controlled Langtons Ant Sequencer - Demo

Expensive Notes

Well-known member
Teensy Controlled Langtons Ant Sequencer with Launchpads, Volca FM, Volca Bass and NTS-1


The Teensy is running a version of Langton's Ant to determine the colour of the squares on the Launchpads. As the sequence increments (see blue pad for sequence position) the NTS-1 is playing notes based on the Ants y position (Red pad). The Volcas are playing notes based on the white and black pads.


 
Me neither, but this tickles the curiosity of my creative thinking matrix. Have a Launchpad mini plugged into a T4 host and would dive in for a play if we can politely twist your arm for some working code?
 
As the sequence index travels horizontally (noteIndex), it calculates the the highest white and black squares (y) to decide the note to play. The notes are constrained to a key over one octave.
Code:
void notesOn(int noteIndex) {
  lastNote1 = 10;
  lastNote2 = 10;
  lastNote3 = 10;
  lastNotey1 = 0;
  lastNotey2 = 0;
  lastNotey3 = 0;
  for (int y = 1 ; y < 9; y++) {
    //find notes
    switch (gridDisplay[noteIndex][y]) {//gridDisplay is a 2d array that stores the colours to display to the Launchpads
      case 0:
        //black cell
        lastNote1 = 48 + minorScale[y];
        lastNotey1 = y;
        break;
      case 1:
        // white cell
        lastNote2 = 48 + minorScale[y];
        lastNotey2 = y;
        break;
      case 5:
        // ant
        lastNote3 = 36 + minorScale[y];
        lastNotey3 = y;
        break;
      case 9:
        // ant2
        lastNote3 = 24 + minorScale[y];
        lastNotey3 = y;
        break;
      default:
        // empty
        break;
    }
  }
  //play notes
  if (lastNote1 > 10) playMIDInote1(noteON1, lastNote1, 100);
  if (lastNote2 > 10) playMIDInote2(noteON1, lastNote2, 100);
  if (lastNote3 > 10) playMIDInote7(noteON1, lastNote3, 100);
}
 
Thank you. After sleeping on it, I get the idea. Current 16 track 32 step sequencer works well. Neopixels are used to display a single track and the Launchpad is currently used as a single dumb set of buttons to control the thing.

Need to work on expanding the launchpad's scope - multi page etc, so will be a while before am able to let any Ants loose.
 
Back
Top