Close
0%
0%

16 step MIDI sequencer

Arduino based (ATMEGA 644) 16 step sequencer with 2 MIDI ports and direct drum triggers

Public Chat
Similar projects worth following
This was a project I wanted to do for a long time, I was considering it using PICAxe, but then after discovering the Arduino platform and the power of C the project started.

There are 8 playable parts per step, these can be either MIDI or direct drum triggers.
When editing the sequence, you pick the part you want to play and the steps to play it, this can be easily done while the sequence is running.

The sequence runs using a timer interrupt, with the value being calculated using BPM, the formula converts the BPM to Hz and then to the timer value that creates 24 pulses per quater note, so it can also send MIDI clock

This is then divided up into 16th notes and a beat pulse (for the LED)

This allows the sequence to run, while the chip can carry on processing input.

There are 3 main chips that do the work:
ATMEGA 644 - Main sequencer and controller
ATMEGA 328 - LED controller, takes a clock and reset line, and serial data to  set the pattern
ATTINY 85 - Scans the push buttons and sends serial to the main chip on change

I could have used the main MPU to do everything, but that would have meant a lot of code, this was a big project to start with, it was far easier to use dedicated chips.

A clock pulse is sent every 16th note to the LED controller, which increments from left to right, the controller for the LEDs ATMEGA328 receives serial data to set the 'sequence' when that part is being edited. Exclusive OR commands make the LED go out when the step hits it.

When the sequence is stopped a reset pulse is sent to start it all over again, the sequencer doens't have a pause option.

All the note data for the sequence is stored in a multi dimensional array, along with the MIDI port, Channel and velocity command.
The sequence scans 8 individual parts for one step.

Push_Button_Controller.zip

Push button controller Scans the matrix of buttons (16 steps plus the 4 on the LCD) and sends a serial value back to the main chip

x-zip-compressed - 1008.00 bytes - 07/08/2018 at 15:44

Download

LED_Controller.zip

LED controller chip code This takes a clock and reset pulse and also serial data in to set the LEDs

x-zip-compressed - 1.50 kB - 07/08/2018 at 15:44

Download

  • Software Fixes and updates

    RH Electronics6 days ago 0 comments

    MIDI Send

    Testing revealed that certain devices didn't like the output, and after scoping the MIDI port it was sending note off every single time it hit a step, regardless if a note had been played previously.. so 8x16 note offs were going on!

    I have now programmed an array that flags if the previous step has been played and only send note off if it has, therefore if nothing is set it will send no data.

    The stop sequence routine did the same, just note offed everything. so this uses the flag and only sends if there is something to send.


    Clock Out
    I have added a 'clock out' which is a 5v pulse on every 8th or 16th note (programmable)

    MIDI IN

    - CC now starts and stops the sequencer
    - MIDI in merges with the sequencer MIDI on port 1

  • PCB Complete

    RH Electronics6 days ago 0 comments

    PCB Arrived and is now all complete on it's new panel

    PROTOTYPE SPARES AVAILABLE IF INTERESTED.. PLEASE CONTACT ME

  • PCB

    RH Electronics07/08/2018 at 15:52 0 comments

    PCB has been ordered for this

    I'll have some spare so anyone interested in this project, get in touch

  • New Panel

    RH Electronics06/27/2018 at 20:23 0 comments

    Just got some new aluminium panels cut so this will fit in my new modular synth box, now it's 250x175 so more room to mount the components and circuit board.

    The current panel is too small and left no room for a good fixing into a rack or case.

    I need to give it it's own 5 volt regulator as the main PSU for the case is +/- 12 v only.

  • Software issues on first test

    RH Electronics06/16/2018 at 20:43 0 comments

    The second bar option works, but the LED sequence misses off the first step as it has to flip the entire display from bar 1 to bar 2


    The MIDI sends a Note ON with velocity of 0 instead of Note OFF, this upsets some equipment and makes clicking noises.
    Easily changed in software


    When the LED hits the next one, it sends a note OFF even if there wasn't a sequence set, this is fixable but would require additional checks at the start of the next sequence to see if the previous was set and if so, send the note off, otherwise ignore it.

View all 5 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates