//  _______ _     _ _______      _______ __   _ ______         _______ _______ _______
//     |    |_____| |______      |______ | \  | |     \ |      |______ |______ |______
//     |    |     | |______      |______ |  \_| |_____/ |_____ |______ ______| ______|
//
//  _______ _______ _____ ______       ______  _______ __   _  ______ _______  ______
//  |_____| |         |   |     \      |_____] |_____| | \  | |  ____ |______ |_____/
//  |     | |_____  __|__ |_____/      |_____] |     | |  \_| |_____| |______ |    \_
//
//
// Pattern generator code taken from
//    https://www.vitling.xyz/toys/acid-banger/
// created by Vitling (David Whiting) i.am@thewit.ch
//
// The rest of the code by written by thement@ibawizard.net.
// Some related info probably at http://tips.ibawizard.net/
//
// This work is licensed under a Creative Commons Attribution 4.0 International License.
//
//
// What is this?
// =============
// The endless acid banger is autonomous pattern generator that spits acid-like
// note and drum sequences via MIDI.
//
// How to make this work?
// ======================
// Attach 10 buttons to Arduino (pinout specified bellow), connect serial TX
// to DIN-5 female socket (TX to pin 3 via 220 Ohm resistor, 5V to pin 4 via
// 220 Ohm resistor, GND to pin 2) and let it play.
//
// How does the interface work?
// ============================
// - "Play" button starts/stops the sequencer
// - "Gen synth1" button generates new melody for synth 1 from current note set
// - "Gen synth2" button ditto for synth 1
// - "Gen notes" creates new note set and regenerates the synth1/synth2
//   melodies from it
// - "Gen drum" generates new drum pattern
// - "Mem1-5" buttons switch to different patterns. If you hold one memory and
//   then press another one, the first one gets copied to the second.
//
// Have fun!

acid_banger_v1.ino debug.h