1-bit number can have only 2 values: 0 or 1. Because 2^1 = 2. Therefore 1-bit sound can be defined by only two voltage levels – usually some voltage, and no voltage.

So 1-bit signal is simply square wave.

Different sound colours are achieved by modulating frequency and pulse width of this square wave. Lunchbeat generates four 1-bit waveforms at once. How each waveform will sound is determined by four separated algorithms:

dropping frequency for bass drum

slow noise for snare drum

fast noise for hi-hat

steady frequency for bass wave

Each algorithm’s input values are influenced with dedicated knob. What parameter and how much is it tweaked by knob is for every algorithm individual, to ensure that the modulation will be interesting and fun :)

Sequencer:

Sequencer has 8 steps playing in loop.Tempo is controlled by internal clock or external clock pulses.

Programming the sequencer is easy and intuitive and uses two levels of LEDs brightness. By pressing EDIT button you cycle thru all 8 steps. One bright LED marks current step being edited. Pair of half lited LEDs is indicating enabled sound on current step. Sound is switched on or off by pressing adequate sound button.

Controls:

START/STOP – runs or stops sequencer. When sequencer is started in external sync mode, it waits for first TRIG in pulse. In SETUP mode this button selects internal or external clock.EDIT – cycles thru all sequencer steps from step 1 to step 8, I call this EDIT mode. Selected step is marked with fully light LED.SOUND BUTTONS – in EDIT mode you turn on/off sounds to be played on selected step. When not in EDIT mode, sounds can pe played by pressing sound button at any time. In SETUP sound buttons are used to enter TRIG division value. In binary! :)MOD POTS – each sound has dedicated potentiometer to tweak sound parameters in real time.TEMPO POT – tempo of internal clock generator.

Syncing:

Lunchbeat can be switched to internal clock, so sequencer advances in intervals given by internal clock generator, and so Lunchbeat sends short 5V pulses to TRIG connector, serving as master.
Or Lunchbeat can be switched to external clock, to receive clock pulses via TRIG cable, and sequencer advances when rising edge of 5V pulse is received.

Holding EDIT button for longer time gets Lunchbeat to setup mode (tempo LED flashes rapidly). In setup mode you can select internal or external clock and division factor of TRIG synchronization. With division factor set Lunchbeate is receiving (or sending) every x-th TRIG pulse. Division factor “x” can be any number from 1 to 15. Can be used for creating unequal floating beats. Leave setup mode by holding EDIT button for longer time again.WARNING: there is no protection circuitry on TRIG IN input! So be sure your TRIG signal does not exceed 5V! In other case you can fry your chip.

Syncing video by Daan:

Hacking:

MCU RESET – mcu reset button is not usually implemented on music instrument. But my assumption is that user will be messing with firmware, so there we go. I am using rigid 2.5N pushutton for this, to prevent reseting unit accidentaly.ISP6pin – hacker’s gate to unit’s microcontroller. Tweak the sound algorithms. Tweak the sequencer. Change unit’s purpose completely. Use the fact that Lunchbeat is the same thing as Arduino with 6 buttons, 5 pots, 8 LEDs on SPI shift register and 3-bit digital to analog converter. You can run Arduino sketches on it. From here it is up to you and your fantasy.

How it works:

Microcontroller Atmel Atmega328p is running at freq 16MHz. 6 buttons is connected to digital input pins with enabled internal pullup resistors, and five potentiometers connected to analog input pins. Audio is outputed thru 3-bit resistor-2-resistor digital/analog converter with LM358n operational amplifier in voltage follower mode and DC blocking capacitor. 8 blue LEDs are controlled with 74595 shift register, to which data is sended from MCU via SPI bus.
Internal sampling frequency is 15626Hz. So there is interrupt routine firing 15626x per second. This routine checks if some sound should be playing, and if so, checks how long is that sound playing already and than is computed value for output. Sounds are 1 bit, so output value can be only 0 or 1, nothing else. After that all four sound values are summed together (mixed) and this final mix value is pushed to 3-bit DAC.

MCU change (since June 2014): I am now using Atmega48pa microcontroller in Lunchbeat. Everything works the same as with Atmega328p. Only difference is smaller flash memory (only 4k of flash). Atmega48pa also does not support bootloaders, so do not try to burn Arduino bootloader into it. To upload code use ISP programmer (you can get USBASP or USBTINY on Ebay for very cheap). Do not forget to change MCU type in compiler options. Also you can use your Arduino as ISP programmer!

How to get one:

Assembled version and DIY kit is available in Buranelectrix online store HERE

Lunchbeat was designed for one of Lunchmeat-Neone workshops, to demonstrate how sound can be made with 8-bit microcontroller. But the machine eventually proved itself to be raised from breadboard domains to upper – more solid – printed circuit board states.