snowsh
Well-known member
t4.1
I am developing a midi sequencer. At present its timer is based on a couple of counters. the first counter measures the steps in each pattern, and the second increments on each round of the pattern sequence.
It has 16 channels, some of these channels could be a drum sequencer which offers 16 instruments... there is allot going on.
I am now addming an "Arranger" so you can setup pattern changes at a given time in the song.
how would you suggest defining these events? I am working on a struct and up to 100 entries to define these event changes, but I dont want to have to hunt all the entries at every round to find an event based on the current song position. This struc below seems to lead towards that issue of having to hunt for the startTime constantly....
Maybe I am approaching the whole thing wrong?
I am developing a midi sequencer. At present its timer is based on a couple of counters. the first counter measures the steps in each pattern, and the second increments on each round of the pattern sequence.
It has 16 channels, some of these channels could be a drum sequencer which offers 16 instruments... there is allot going on.
I am now addming an "Arranger" so you can setup pattern changes at a given time in the song.
how would you suggest defining these events? I am working on a struct and up to 100 entries to define these event changes, but I dont want to have to hunt all the entries at every round to find an event based on the current song position. This struc below seems to lead towards that issue of having to hunt for the startTime constantly....
Maybe I am approaching the whole thing wrong?
Code:
#define NUMBER_OF_ARRANGER_BLOCKS 100
struct arrangerBlockStruct {
uint8_t blockId;
int start;
uint8_t patternId;
uint8_t transpose; // value to transpose everything
uint8_t theory; // value to set a new theory
} currentArrangerBlock[NUMBER_OF_CHANNELS]; // keep in SRAM the current block for eaach channel;
EXTMEM struct arrangerBlockStruct arrangerBlockLibrary[NUMBER_OF_CHANNELS][NUMBER_OF_ARRANGER_BLOCKS]; // keep in PSRAM the library
Last edited: