/* Copyright 2020 Rodolphe Belouin
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// Maximum number of steps: 256
// Maximum number of tracks: 8
/**
* Make sure that the items of this enumeration follow the powers of 2, separated by a ternary variant.
* Check the implementation of `get_step_duration` for further explanation.
*/
typedef enum sequencer_resolution_t;
typedef struct sequencer_config_t;
/**
* Because Digital Audio Workstations get overwhelmed when too many MIDI signals are sent concurrently,
* We use a "phase" state machine to delay some of the events.
*/
typedef enum sequencer_phase_t sequencer_phase_t;
typedef struct sequencer_state_t;
extern sequencer_config_t sequencer_config;
// We expose the internal state to make the feature more "unit-testable"
extern sequencer_state_t sequencer_internal_state;
bool ;
void ;
void ;
void ;
void ;
bool ;
void ;
void ;
void ;
bool ;
bool ;
void ;
void ;
void ;
uint8_t ;
void ;
void ;
void ;
sequencer_resolution_t ;
void ;
void ;
void ;
uint8_t ;
uint16_t ;
uint16_t ;
uint16_t ;
uint16_t ;
void ;