ARDUINO MIDI looper / sequencer

Hello !
I continued to work on my new MIDI Looper.
I was focused on the display and now I can show some useful informations : which channel is selected, play/stop status, what is the bar/quarter/step position, the bar count, the step count …
I had to override a little bit the code from Adafruit : sending the whole display buffer trough I2C took too much time to much CPU; which might create some latency in the MIDI output.
I had to rewrite a bit the code in order to send buffer data pixel per pixel.

6 Likes

Ha, nice project!

I’ve written data to eeprom in several projects in the past (DIY controllers - #18 by Jos, Kosmo Euclidean Rhythm Generator - #24 by Jos). Maybe I can make some suggestions about using one?

Although the eeprom can be written to thousands of times, take care to only do so if the data you want to store into it has changed. In other words, do not write to it every time the loop() function runs.

To make the wear of the eeprom even less, some people try to write to a different location in the eeprom each time (and add a unique mark at the beginning of the data to be able to find it back later).

Also note that writing to eeprom takes some time, so if you want to store data to it in real time, make sure that it does nog make the looper stutter. You can do this by not writing all the data at the same time.

Given that your device will be a midi looper, consider that every midi datum is only a few bytes (up to 3) long (unless you sample sysex data which can have a much larger size) and they are sampled at a low frequency (relative to audio sampling). Mind you, you can calculate in advance which sequence length will fit in the eeprom. If the eeprom appears to be too small for your use case, then use a different microcontroller to accommodate your needs.

From the arduino site: There are 1024 bytes on the ATmega328P, 512 bytes on the ATmega168 and ATmega8, 4 KB (4096 bytes) on the ATmega1280 and ATmega2560.

From some other source: the nano every has 256 bytes of EEPROM, it seems.

2 Likes