cracked-machine / BassStationSequencerSW

Firmware for Novation BassStation HW Sequencer
MIT License
0 stars 1 forks source link

HW Sequencer for Novation BassStation Synth

Front Panel Design

Architecture Overview

The sequencer runs an Arm-Cortex M0+. Aside from the regular STM32 peripheral set, the system also has dedicated chips for the:

The triggering of notes on the BassStation is achieved via a ribbon cable connected from the HW sequencer to the internal BassStation cable. A dedicated 8x8 crosspoint switch is used to close the contacts to trigger a note on the synth. Note, a modification is required to the BassStation's internal ribbon cable.

The overal architecture of the SW and HW is divided up between vendor provided libraries and libraries written by myself. Use of the LL library - provided by STMicroelectronics - is gradually fazed out as the project is concluded.

Mapping keypresses to sequencer step position

The key press event IDs from the ADP5587 IC are stored in an enumeration - adp5587::KeyPadMappings - in the adp5587 driver.

In order to map these IDs to the steps in the sequencer pattern, an associative array is used. Note there are 32 steps in the pattern, one for each physical button on the HW sequencer.

Since std::map uses dynamic allocation, a custom statically allocated map was created. This uses a std::array of std::pairs. The first item in the pair is the map key, the second item in the pair is the map value.

Here KeyPadMappings is the map key and Step is the map value.

Each Step object has a KeyState (on/off), a RDG LedColour and a Note (any note between C0-C2).

Therefore, when the ADP5587 key press event FIFO is examined, the associated Step object value can quickly be found (via the StaticMap::find_key function) using KeyPadMapping as the key. This is not only convenient but also efficiently avoids using a huge switch statement in the user code.

Mapping notes to crosspoint switch poles

To map each Note to a switch Pole another statically-allocated associative array is used. The Note object is the map key and a NoteData object is used as the map value to store both the Pole object and other useful data.

Further documentation

Hardware design [1]

Development tool installation [2]

Building this repo [3]

STM32 device configuration report (out of date) [4]

UnitTest code coverage report (out of date) [5]