BMC 2.0 API

BMC Documentation https://www.roxxxtar.com/blog/category/bmc-documentation/

BMC Main Page https://www.roxxxtar.com/bmc

GitHub https://github.com/neroroxxx/BMC

DEBUG

startTiming Function BMC-API.h line: 1498

used only during DEBUG
use these to time how long it takes for a piece of code to execute
BMC has 1 millis and 1 micros timer this just a simple timer
you can specify how many timers you want by defining BMC_DEBUG_MAX_TIMING
in your config file, the value of BMC_DEBUG_MAX_TIMING is the number of timers
you want. Once a timer is complete it will print out the time it took on the serial monitor
start a timer specified by n (inclusive)
@n = the index of the timer you want to use
@t_micros = true if you want to time the number of microseconds, false for millis
for every timer you compile there's a millis timer and a micros timer
@t_micros specifies which one you want to use

void startTiming(uint8_t n, bool t_micros=false)

stopTiming Function BMC-API.h line: 1510

stop the active timer specified by n (inclusive)
@n = the index of the timer you want to use
@t_micros = true if you want to time the number of microseconds, false for millis
for every timer you compile there's a millis timer and a micros timer
t_micros specifies which one you want to use
when you stop an active timer BMC will print it's output to the Serial monitor

unsigned long stopTiming(uint8_t n, bool t_micros=false)

HARDWAREBack to Top

onButtonDualPress Callback BMC-API.h line: 157

triggered when 2 buttons are pressed at the same time
see src/hardware/BMC-ButtonsDualHandler.h for info on how this works.

void onButtonDualPress(void (*fptr)(uint16_t btn1, uint16_t btn2))

onGlobalButtonDualPress Callback BMC-API.h line: 163

triggered when an global button is pressed, released, etc.
see src/hardware/BMC-ButtonsDualHandler.h for info on how this works.

void onGlobalButtonDualPress(void (*fptr)(uint16_t btn1, uint16_t btn2))

onButtonActivity Callback BMC-API.h line: 186

Set callback for buttons activity,
called when a button changes states
@n = index of button
@eventIndex = event's index
@trigger = trigger type (BMC_TRIG_PRESS, etc.)
list of triggers
- BMC_TRIG_PRESS
- BMC_TRIG_RELEASE
- BMC_TRIG_HOLD
- BMC_TRIG_DOUBLE_PRESS
- BMC_TRIG_CONTINUOUS
- BMC_TRIG_ALT_PRESS
- BMC_TRIG_RELEASE_PRESS
- BMC_TRIG_RELEASE_HOLD
- BMC_TRIG_RELEASE_DOUBLE_PRESS
- BMC_TRIG_RELEASE_CONTINUOUS
- BMC_TRIG_RELEASE_ALT
- BMC_TRIG_STATE_CHANGE

void onButtonActivity(void (*fptr)(uint16_t n, uint8_t eventIndex, uint8_t trigger))

onGlobalButtonActivity Callback BMC-API.h line: 199

Set callback for global buttons activity
called when a global button changes states
@n = index of global button
@eventIndex = event's index
@trigger = trigger type (BMC_TRIG_PRESS, etc.)
same list of triggers as onGlobalButtonDualPress

void onGlobalButtonActivity(void (*fptr)(uint16_t n, uint8_t eventIndex, uint8_t trigger))

onAuxJackConnection Callback BMC-API.h line: 208

triggered when an aux jack detects a plug connected or disconnected
@n the Aux Jack Index that had a state change.
@state true if a connection has been made, false if disconnected.

void onAuxJackConnection(void (*fptr)(uint8_t n, bool state))

getDeviceName Function BMC-API.h line: 609

get the name of a device
@deviceType the device ID, exp: BMC_DEVICE_ID_LAYER
list of current device IDs can be found in src/utility/BMC-Def.h
@index index of the device
@str char array reference, it must be big enough to hold names
you should always use BMC_MAX_NAMES_LENGTH as the size of the char array
exp: str[BMC_MAX_NAMES_LENGTH]
NOTE: not all devices have names.
-------------------------------------------
device types at the time of writing this
- BMC_DEVICE_ID_LAYER
- BMC_DEVICE_ID_EVENT
- BMC_DEVICE_ID_NAME
hardware
- BMC_DEVICE_ID_BUTTON
- BMC_DEVICE_ID_GLOBAL_BUTTON
- BMC_DEVICE_ID_LED
- BMC_DEVICE_ID_GLOBAL_LED
- BMC_DEVICE_ID_ENCODER
- BMC_DEVICE_ID_GLOBAL_ENCODER
- BMC_DEVICE_ID_POT
- BMC_DEVICE_ID_GLOBAL_POT
- BMC_DEVICE_ID_PIXEL
- BMC_DEVICE_ID_GLOBAL_PIXEL
- BMC_DEVICE_ID_RGB_PIXEL
- BMC_DEVICE_ID_GLOBAL_RGB_PIXEL
- BMC_DEVICE_ID_BI_LED
- BMC_DEVICE_ID_GLOBAL_BI_LED
- BMC_DEVICE_ID_TRI_LED
- BMC_DEVICE_ID_GLOBAL_TRI_LED
- BMC_DEVICE_ID_MAGIC_ENCODER
- BMC_DEVICE_ID_GLOBAL_MAGIC_ENCODER
only layer
- BMC_DEVICE_ID_OLED
- BMC_DEVICE_ID_ILI
- BMC_DEVICE_ID_PIXEL_STRIP
only global
- BMC_DEVICE_ID_NL_RELAY
- BMC_DEVICE_ID_L_RELAY
- BMC_DEVICE_ID_AUX_JACK
pot calibration
- BMC_DEVICE_ID_POT_CALIBRATION
presets and setlist
- BMC_DEVICE_ID_PRESET
- BMC_DEVICE_ID_SETLIST
- BMC_DEVICE_ID_SETLIST_SONG
- BMC_DEVICE_ID_SETLIST_SONG_LIBRARY
special events
- BMC_DEVICE_ID_CUSTOM_SYSEX
- BMC_DEVICE_ID_TRIGGER
- BMC_DEVICE_ID_TEMPO_TO_TAP
- BMC_DEVICE_ID_PIXEL_PROGRAM
- BMC_DEVICE_ID_TIMED_EVENT
- BMC_DEVICE_ID_LFO
others
- BMC_DEVICE_ID_SKETCH_BYTE
- BMC_DEVICE_ID_PORT_PRESET
- BMC_DEVICE_ID_SHORTCUTS
- BMC_DEVICE_ID_LAYER_EVENT

void getDeviceName(uint8_t deviceType, uint16_t index, char* str)

triggerButtonPress Function BMC-API.h line: 865

trigger the press of a button remotely
@n = index of button
@isGlobal = true if reading a global button, false for a layer button

void triggerButtonPress(uint8_t n, bool isGlobal)

triggerButtonRelease Function BMC-API.h line: 883

trigger the release of a button remotely
@n = index of button
@isGlobal = true if reading a global button, false for a layer button

void triggerButtonRelease(uint8_t n, bool isGlobal)

getButtonRawValue Function BMC-API.h line: 901

returns the raw state of a button, this is a pre-debounce value
@n = index of button
@isGlobal = true if reading a global button, false for a layer button

bool getButtonRawValue(uint8_t n, bool isGlobal)

getLedState Function BMC-API.h line: 921

return the state of the specified Led

bool getLedState(uint16_t n, bool isGlobal)

getPixelState Function BMC-API.h line: 941

return the state of the specified pixel

uint8_t getPixelState(uint8_t n, bool isGlobal)

getRgbPixelState Function BMC-API.h line: 961

return the state of the specified rgb pixel

uint8_t getRgbPixelState(uint8_t n, uint8_t color, bool isGlobal)

getPotValue Function BMC-API.h line: 981

return the value of the specified pot

uint8_t getPotValue(uint8_t n, bool isGlobal)

getRelayState Function BMC-API.h line: 1001

return the state of the specified relay

bool getRelayState(uint8_t n, uint8_t isLatching)

LAYERSBack to Top

onLayerChange Callback BMC-API.h line: 104

triggered when you change layers, also triggered when BMC runs it's first loop

void onLayerChange(void (*fptr)(uint8_t layer))

changeLayer Function BMC-API.h line: 502

change to a new layer.
if n is not a valid layer number, nothing happens
if n is the same as the current layer, nothing happens

void changeLayer(uint8_t n)

getCurrentLayer Function BMC-API.h line: 507

get the current layer

uint8_t getCurrentLayer()

getLayerName Function BMC-API.h line: 512

retrieve the name of the current layer

bmcStoreName getLayerName()

getLayerName Function BMC-API.h line: 517

retrieve the name of the a layer specified by n

bmcStoreName getLayerName(uint16_t n)

pageUp Function BMC-API.h line: 529

move to the next layer
if t_wrap is true and you are already on the last layer, you will go to the first layer

void pageUp(bool t_wrap=true)

pageDown Function BMC-API.h line: 535

move to the previous layer
if t_wrap is true and you are already on the first layer, you will go to the last layer

void pageDown(bool t_wrap=true)

MIDIBack to Top

onMidiRx Callback BMC-API.h line: 109

triggered when a MIDI message is received

void onMidiRx(void (*fptr)(BMCMidiMessage data))

onMidiClockTick Callback BMC-API.h line: 114

triggered when a MIDI Clock message is received

void onMidiClockTick(void (*fptr)())

onMidiClockBeat Callback BMC-API.h line: 119

triggered every 24 times a MIDI Clock message is received

void onMidiClockBeat(void (*fptr)())

onMidiClockBpmChange Callback BMC-API.h line: 124

triggered when the Master/Slave Clock has changed it's tempo

void onMidiClockBpmChange(void (*fptr)(uint16_t tempo))

onMidiActivity Callback BMC-API.h line: 129

triggered when a midi message was sent or received

void onMidiActivity(void (*fptr)(bool in, bool out))

onMidiLocalUpdate Callback BMC-API.h line: 140

triggered when MIDI data is updated within the Local MIDI Data Object
BMC holds 129 bytes for each of the 16 MIDI Channels,
1 for Program and 128 for Control Change, when you send or receive
a Program Change this value is updated for that channel, the same goes for
Control Changes. This data is also updated if the message isn't actually sent
to a port, so if a button has a Program Change event but no Ports BMC will
still update this value.

void onMidiLocalUpdate(void (*fptr)())

onMidiPreRouting Callback BMC-API.h line: 151

triggered when a message is about to be sent to a port via Routing.
this callback takes in a MIDI message that is about to be routed (soft-thru)
the callback must return a bool, if the callback returns false the message
will not be routed.
The "data" parameter is a reference so you can manipulate the message before
it reaches it's intended ports, however once the data is changed, any other
BMC functions will see this new data.

void onMidiPreRouting(bool (*fptr)(BMCMidiMessage& data, uint8_t destinations))

setLocalProgram Function BMC-API.h line: 450

@t_channel MUST be 1 thru 16, not 0 thru 15
all other parameters are 0 indexed

void setLocalProgram(uint8_t t_channel, uint8_t t_program)

setLocalControl Function BMC-API.h line: 456

@t_channel MUST be 1 thru 16, not 0 thru 15
all other parameters are 0 indexed

void setLocalControl(uint8_t t_channel, uint8_t t_control, uint8_t t_value)

getLocalProgram Function BMC-API.h line: 462

@t_channel MUST be 1 thru 16, not 0 thru 15
all other parameters are 0 indexed

uint8_t getLocalProgram(uint8_t t_channel)

getLocalControl Function BMC-API.h line: 468

@t_channel MUST be 1 thru 16, not 0 thru 15
all other parameters are 0 indexed

uint8_t getLocalControl(uint8_t t_channel, uint8_t t_control)

getMidiClockBpm Function BMC-API.h line: 1344

for master or slave clock
get the current BPM

uint16_t getMidiClockBpm()

setMidiClockBpm Function BMC-API.h line: 1350

only works when on master clock
set the Clock's BPM

void setMidiClockBpm(uint16_t t_bpm)

midiClockTap Function BMC-API.h line: 1359

only works when on master clock
simulates a Tap Tempo
the Clock BPM is determined based on how often the function is called
for example if there's a gap of 500ms between calling this function
the BPM would be set to 120 BPM, (60000/500) = 120

void midiClockTap()

sendRealTime Function BMC-API.h line: 1521

void sendRealTime(uint8_t port, uint8_t type, uint8_t cable=0)

sendSysEx Function BMC-API.h line: 1525

void sendSysEx(uint8_t port, uint8_t *data, uint16_t size, bool hasTerm=false, uint8_t cable=0)

sendProgramChange Function BMC-API.h line: 1529

void sendProgramChange(uint8_t port, uint8_t channel, uint8_t program, uint8_t cable=0)

sendControlChange Function BMC-API.h line: 1533

void sendControlChange(uint8_t port, uint8_t channel, uint8_t control, uint8_t value, uint8_t cable=0)

sendNoteOn Function BMC-API.h line: 1537

void sendNoteOn(uint8_t port, uint8_t channel, uint8_t note, uint8_t velocity, uint8_t cable=0)

sendNoteOff Function BMC-API.h line: 1541

void sendNoteOff(uint8_t port, uint8_t channel, uint8_t note, uint8_t velocity, uint8_t cable=0)

sendPitchBend Function BMC-API.h line: 1545

void sendPitchBend(uint8_t port, uint8_t channel, int16_t value, uint8_t cable=0)

sendAfterTouch Function BMC-API.h line: 1549

void sendAfterTouch(uint8_t port, uint8_t channel, uint8_t pressure, uint8_t cable=0)

sendAfterTouchPoly Function BMC-API.h line: 1553

void sendAfterTouchPoly(uint8_t port, uint8_t channel, uint8_t note, uint8_t pressure, uint8_t cable=0)

sendTimeCodeQuarterFrame Function BMC-API.h line: 1557

void sendTimeCodeQuarterFrame(uint8_t port, uint8_t type, uint8_t value, uint8_t cable=0)

sendSongPosition Function BMC-API.h line: 1561

void sendSongPosition(uint8_t port, uint16_t beats, uint8_t cable=0)

sendSongSelect Function BMC-API.h line: 1565

void sendSongSelect(uint8_t port, uint8_t song, uint8_t cable=0)

sendTuneRequest Function BMC-API.h line: 1569

void sendTuneRequest(uint8_t port, uint8_t cable=0)

beginRpn Function BMC-API.h line: 1573

void beginRpn(uint8_t port, uint8_t channel, uint16_t number, uint8_t cable=0)

sendRpnValue Function BMC-API.h line: 1577

void sendRpnValue(uint8_t port, uint8_t channel, uint16_t value, uint8_t cable=0)

sendRpnIncrement Function BMC-API.h line: 1581

void sendRpnIncrement(uint8_t port, uint8_t channel, uint8_t amount, uint8_t cable=0)

sendRpnDecrement Function BMC-API.h line: 1585

void sendRpnDecrement(uint8_t port, uint8_t channel, uint8_t amount, uint8_t cable=0)

endRpn Function BMC-API.h line: 1589

void endRpn(uint8_t port, uint8_t channel, uint8_t cable=0)

beginNrpn Function BMC-API.h line: 1593

void beginNrpn(uint8_t port, uint8_t channel, uint16_t number, uint8_t cable=0)

sendNrpnValue Function BMC-API.h line: 1597

void sendNrpnValue(uint8_t port, uint8_t channel, uint16_t value, uint8_t cable=0)

sendNrpnIncrement Function BMC-API.h line: 1601

void sendNrpnIncrement(uint8_t port, uint8_t channel, uint8_t amount, uint8_t cable=0)

sendNrpnDecrement Function BMC-API.h line: 1605

void sendNrpnDecrement(uint8_t port, uint8_t channel, uint8_t amount, uint8_t cable=0)

endNrpn Function BMC-API.h line: 1609

void endNrpn(uint8_t port, uint8_t channel, uint8_t cable=0)

MUXBack to Top

setMuxDigitalValue Function BMC-API.h line: 835

for those using a custom Digital In Multiplexer you would handle reading
it's pins then you pass the value of each of those Pins to BMC with this
API call, digital inputs must be Active LOW, that is if a button was pressed
the value should be LOW if it's not being pressed it's value should be HIGH
BMC will handle all debouncing, DO NOT DEBOUNCE IN YOUR CODE, pass the raw reading

void setMuxDigitalValue(uint8_t pin, bool value)

getMuxDigitalOutValue Function BMC-API.h line: 846

for those using a custom Digital Out Multiplexer BMC will hold the state
that that pin should be at, for example if the pins is being used to turn
leds on/off then BMC will tell you weather that pin should be on or off
you would then handle turning those LEDS on/off with your Mux.

void getMuxDigitalOutValue(uint8_t pin)

setMuxAnalogValue Function BMC-API.h line: 855

same setMuxDigitalValue as but you must pass it a value from 0 to 1024.
BMC will handle all debouncing, pass the raw reading of your analog input

void setMuxAnalogValue(uint8_t n, uint16_t value)

PRESETSBack to Top

onPresetChange Callback BMC-API.h line: 302

triggered when a BMC Preset has changed

void onPresetChange(void (*fptr)(uint8_t t_bank, uint8_t t_preset))

onPresetsBankChange Callback BMC-API.h line: 307

triggered when a BMC Preset Bank has changed

void onPresetsBankChange(void (*fptr)(uint8_t n))

getPresetLength Function BMC-API.h line: 619

returns number of events the current preset has

uint8_t getPresetLength()

getPresetLength Function BMC-API.h line: 624

returns number of events a specified preset has

uint8_t getPresetLength(uint8_t t_bank, uint8_t t_preset)

getPreset Function BMC-API.h line: 629

returns the current preset number (within the current bank)

uint8_t getPreset()

getPresetBank Function BMC-API.h line: 634

returns the current bank number

uint8_t getPresetBank()

getPresetIndex Function BMC-API.h line: 642

returns the actual index of a preset, in BMC presets are arranged
in banks, for example preset index 0 is bank 0 / preset 0
preset index 2 is bank 0 / preset 2 etc.
this function returns the actual index of the preset

uint16_t getPresetIndex()

setPresetNumber Function BMC-API.h line: 647

set to the specified preset within the current bank

void setPresetNumber(uint8_t t_preset, bool t_retrigger = false)

setPresetBank Function BMC-API.h line: 652

set to the specified bank

void setPresetBank(uint8_t t_bank, bool t_retrigger = false)

setPresetByIndex Function BMC-API.h line: 657

set to a preset by specifying the preset index

void setPresetByIndex(uint16_t t_preset, bool t_retrigger = false)

presetNext Function BMC-API.h line: 663

go to the next preset within the current bank
@t_wrap true to go to first preset after reaching the last one

void presetNext(bool t_wrap)

presetPrevious Function BMC-API.h line: 669

go to the previous preset within the current bank
@t_wrap true to go to last preset after reaching the first one

void presetPrevious(bool t_wrap)

presetBankNext Function BMC-API.h line: 675

go to the next bank
@t_wrap true to go to first bank after reaching the last one

void presetBankNext(bool t_wrap)

presetBankPrevious Function BMC-API.h line: 681

go to the previous bank
@t_wrap true to go to last bank after reaching the first one

void presetBankPrevious(bool t_wrap)

getPresetBankLetter Function BMC-API.h line: 686

returns the letter of the current bank

bmcStoreName getPresetBankLetter()

getPresetBankLetter Function BMC-API.h line: 691

returns the letter of the specified bank

bmcStoreName getPresetBankLetter(uint8_t t_bank)

SETLISTBack to Top

onSetListChange Callback BMC-API.h line: 312

triggered when the current BMC SetList has changed

void onSetListChange(void (*fptr)(uint8_t n))

onSetListSongChange Callback BMC-API.h line: 317

triggered when the current BMC SetList Song has changed

void onSetListSongChange(void (*fptr)(uint8_t n))

SETLISTSBack to Top

getSetList Function BMC-API.h line: 703

get the current SetList number

uint8_t getSetList()

getSetListLength Function BMC-API.h line: 708

returns the number of songs in the current setlist

uint8_t getSetListLength()

getSetListLength Function BMC-API.h line: 713

returns the number of songs in the specified setlist

uint8_t getSetListLength(uint8_t n)

setSetList Function BMC-API.h line: 718

go to a specific SetList

void setSetList(uint8_t n)

setListNext Function BMC-API.h line: 727

go to next song in the list
@t_wrap if true, after reaching the last setlist
the next setlist will be the first setlist
otherwise once the last setlist is reached BMC will
ignore this function

void setListNext(bool t_wrap)

setListPrevious Function BMC-API.h line: 736

go to the previous setlist
@t_wrap if true, after reaching the first setlist
the previous setlist will be the last setlist
otherwise once the first setlist is reached BMC will
ignore this function

void setListPrevious(bool t_wrap)

getSetListSong Function BMC-API.h line: 741

returns the current song number in the setlist

uint8_t getSetListSong()

setSetListSong Function BMC-API.h line: 746

go to a specific song number in the setlist

void setSetListSong(uint8_t n)

setListSongNext Function BMC-API.h line: 755

go to next song in the list
@t_wrap if true, after reaching the last song
the next song will be the first song
otherwise once the last song is reached BMC will
ignore this function

void setListSongNext(bool t_wrap)

setListSongPrevious Function BMC-API.h line: 764

go to previous song in the list
@t_wrap if true, after reaching the first song
the previous song will be the last song
otherwise once the first song is reached BMC will
ignore this function

void setListSongPrevious(bool t_wrap)

getSetListSongPart Function BMC-API.h line: 769

get the current song number in the setlist

uint8_t getSetListSongPart()

setSetListSongPart Function BMC-API.h line: 774

go to a specific song number in the setlist

void setSetListSongPart(uint8_t n)

setListSongPartNext Function BMC-API.h line: 783

go to next song in the list
@t_wrap if true, after reaching the last song
the next song will be the first song
otherwise once the last song is reached BMC will
ignore this function

void setListSongPartNext(bool t_wrap)

setListSongPartPrevious Function BMC-API.h line: 792

go to previous song in the list
@t_wrap if true, after reaching the first song
the previous song will be the last song
otherwise once the first song is reached BMC will
ignore this function

void setListSongPartPrevious(bool t_wrap)

moveSetListSong Function BMC-API.h line: 801

move a song within a setlist, you can move the song up or down
@t_song the index of the song in the setlist you want to move
@t_direction weather to move it up of down, use BMC_UP/BMC_DOWN
@t_save true writes the new setlist order to EEPROM
function returns true if the move was successful

bool moveSetListSong(uint8_t t_song, bool t_direction, bool t_save)

SYNC BEATBUDDYBack to Top

onBeatBuddyBeatLocationChange Callback BMC-API.h line: 296

void onBeatBuddyBeatLocationChange(void (*fptr)(uint8_t t_location, uint8_t numerator))

beatBuddySynced Function BMC-API.h line: 1325

bool beatBuddySynced()

beatBuddyPlaying Function BMC-API.h line: 1329

bool beatBuddyPlaying()

getBeatBuddyCurrentPart Function BMC-API.h line: 1333

bool getBeatBuddyCurrentPart()

sendBeatBuddyCommand Function BMC-API.h line: 1337

void sendBeatBuddyCommand(uint8_t value, uint8_t data=127)

SYNC DAWBack to Top

onDawOnline Callback BMC-API.h line: 328

passes the state of the connect, true if a project is loaded

void onDawOnline(void (*fptr)(bool state))

onDawRecievedLCD Callback BMC-API.h line: 333

passes the sysex message containing the updated LCD string

void onDawRecievedLCD(void (*fptr)(BMCMidiMessage data))

onDawRecievedTimeDisplay Callback BMC-API.h line: 338

more info to come

void onDawRecievedTimeDisplay(void (*fptr)(uint8_t digit, char character))

onDawRecievedAssignmentDisplay Callback BMC-API.h line: 343

more info to come

void onDawRecievedAssignmentDisplay(void (*fptr)(uint8_t digit, char character))

onDawRecievedChannelMeter Callback BMC-API.h line: 348

passes the meter value for a channel

void onDawRecievedChannelMeter(void (*fptr)(uint8_t channel, uint8_t value))

onDawChannelMeterUpdate Callback BMC-API.h line: 353

passes the meter value for a channel, includes the overload led status

void onDawChannelMeterUpdate(void (*fptr)(uint8_t channel, uint8_t value, uint8_t overload))

onDawReceivedTimeCodeDigit Callback BMC-API.h line: 358

more info to come

void onDawReceivedTimeCodeDigit(void (*fptr)(uint8_t digit, uint8_t value))

onDawChannelVPotUpdate Callback BMC-API.h line: 363

passes the value of the VPOT ring for the specified channel

void onDawChannelVPotUpdate(void (*fptr)(uint8_t channel, uint8_t value, uint8_t centered, uint8_t mode))

onDawRecievedChannelFaderPosition Callback BMC-API.h line: 368

passes the specified channel's fader position

void onDawRecievedChannelFaderPosition(void (*fptr)(uint8_t channel, int value))

onDawRecievedMasterFaderPosition Callback BMC-API.h line: 373

passes the master channel's fader position

void onDawRecievedMasterFaderPosition(void (*fptr)(int value))

onDawRecievedChannelSelect Callback BMC-API.h line: 378

receive the state of a channel, true if the channel is currently selected

void onDawRecievedChannelSelect(void (*fptr)(uint8_t channel, bool state))

onDawRecievedChannelSolo Callback BMC-API.h line: 383

receive the solo state of a channel, true if the channel is currently in solo

void onDawRecievedChannelSolo(void (*fptr)(uint8_t channel, bool state))

onDawRecievedChannelMute Callback BMC-API.h line: 388

receive the mute state of a channel, true if the channel is currently in mute

void onDawRecievedChannelMute(void (*fptr)(uint8_t channel, bool state))

onDawRecievedChannelRecReady Callback BMC-API.h line: 393

receive the rec/ready state of a channel, true if the channel is currently in rec/ready

void onDawRecievedChannelRecReady(void (*fptr)(uint8_t channel, bool state))

onDawRecievedLedState Callback BMC-API.h line: 398

receive the state leds, @cmd will carry the function of the LED, see documentation

void onDawRecievedLedState(void (*fptr)(uint8_t cmd, bool state))

getDawSelectedTrack Function BMC-API.h line: 403

returns the selected channel number

uint8_t getDawSelectedTrack()

getDawVPotLedState Function BMC-API.h line: 410

returns state of a specified LED in the led ring of a VPOT.
you can use this for a custom led ring to update weather that led should
be on or off

uint8_t getDawVPotLedState(uint8_t channel, uint8_t ledN)

sendDawVPot Function BMC-API.h line: 415

sends a rotation of a v-pot

void sendDawVPot(uint8_t ch, bool clockwise, uint8_t ticks)

sendDawButton Function BMC-API.h line: 420

sends a button press command

void sendDawButton(uint8_t cmd, uint8_t ch, bool release)

SYNC FASBack to Top

onFasConnectionChange Callback BMC-API.h line: 232

triggered when BMC Detects a FAS device has been connected/disconnected

void onFasConnectionChange(void (*fptr)(bool state))

onFasPresetChange Callback BMC-API.h line: 237

triggered when the FAS preset has changed

void onFasPresetChange(void (*fptr)(uint16_t n))

onFasPresetName Callback BMC-API.h line: 242

triggered when the FAS preset name has been received

void onFasPresetName(void (*fptr)(char* str))

onFasSceneChange Callback BMC-API.h line: 247

triggered when the FAS scene has changed

void onFasSceneChange(void (*fptr)(uint8_t n))

onFasBlocksChange Callback BMC-API.h line: 252

triggered when any FAS Effect Block has changed it's states

void onFasBlocksChange(void (*fptr)())

onFasTunerStateChange Callback BMC-API.h line: 257

triggered when the FAS Tuner has been turned on/off

void onFasTunerStateChange(void (*fptr)(bool state))

onFasTunerReceived Callback BMC-API.h line: 269

triggered when the FAS tuner data has been received
the BMCTunerData struct
contains the following attributes
uint8_t stringNumber = 0;
uint8_t note = 0;
uint8_t pitchRaw = 0;
int pitch = 0;
char noteName[3] = "";

void onFasTunerReceived(void (*fptr)(BMCTunerData& data))

onFasLooperStateChange Callback BMC-API.h line: 274

triggered when the FAS Looper has been activated or stopped

void onFasLooperStateChange(void (*fptr)(bool state))

onFasLooperReceived Callback BMC-API.h line: 279

triggered when the FAS Looper data has been received

void onFasLooperReceived(void (*fptr)(uint8_t data, uint8_t position))

onFasCpuReceived Callback BMC-API.h line: 284

triggered when FAS CPU usage has been received

void onFasCpuReceived(void (*fptr)(uint8_t n))

onFasBlockParameterReceived Callback BMC-API.h line: 289

triggered when a FAS Effect Block Parameter has been received

void onFasBlockParameterReceived(void (*fptr)(uint8_t block, uint8_t param, uint16_t value, char* str, uint8_t strLen))

fasConnected Function BMC-API.h line: 1115

return the state of a FAS connection

bool fasConnected()

fasConnect Function BMC-API.h line: 1120

trigger a FAS Connection

void fasConnect()

fasDisconnect Function BMC-API.h line: 1125

trigger a FAS Disconnect

void fasDisconnect()

fasToggleConnection Function BMC-API.h line: 1130

toggle FAS Connection

void fasToggleConnection()

getFasPresetName Function BMC-API.h line: 1140

copy the current Preset Name into a buffer char array
the length of the char array must be at least 32 bytes

bool getFasPresetName(char* str)

getFasPresetNumber Function BMC-API.h line: 1152

get the synced preset number (0 index)
this is the actual preset number within your Fractal, these are not
broken into bank/preset but the location of the preset in your fractal's memory
depending on your Fractal the numbers will be:
Axe FX II: 0 to 383
Axe FX II XL/XL+: 0 tp 767
AX8: 0 to 511

uint16_t getFasPresetNumber()

getFasSceneNumber Function BMC-API.h line: 1157

get the synced scene number

uint8_t getFasSceneNumber()

getFasSceneName Function BMC-API.h line: 1164

copy the current Scene Name into a buffer char array
the length of the char array must be at least 32 bytes
only available for FAS3

bool getFasSceneName(char* str)

getFasSceneName Function BMC-API.h line: 1172

copy the specified Scene Name into a buffer char array
the length of the char array must be at least 32 bytes
only available for FAS3

bool getFasSceneName(uint8_t n, char* str)

getFasPresetBankNumber Function BMC-API.h line: 1184

get the synced preset Bank Number (0 index)
the Axe FX II has 384 presets that is 3 banks each with 128 presets
on Axe FX II a number from 0 to 2 will be returned
the Axe FX II XL and XL+ have 768 for a total of 6 banks of 128 presets each
so a number from 0 to 5 will be returned
the AX8 has 512 presets, 64 banks of 8 presets per bank
so a number from 0 to 63 will be returned

uint8_t getFasPresetBankNumber()

getFasPresetInBankNumber Function BMC-API.h line: 1196

get the synced preset number within it's bank (0 index)
on Axe FX there are 128 presets per bank so a number from 000 to 127
will always be returned
on AX8 there are 8 presets per bank so a number from 000 to 007 will
always be returned.
use this in conjunction with getFasPresetBankNumber() to get the
bank # & preset # to display it on an LCD or OLED

uint8_t getFasPresetInBankNumber()

setFasPresetNumber Function BMC-API.h line: 1201

change to a new FAS preset number, value is the actual preset number

void setFasPresetNumber(uint16_t value)

setFasSceneNumber Function BMC-API.h line: 1206

change to a new FAS scene number, value must be 0 to 7

void setFasSceneNumber(uint8_t value, bool revert=false)

setFasSceneScroll Function BMC-API.h line: 1211

scroll thru FAS Scenes

void setFasSceneScroll(bool t_up=true, bool t_wrap=true, bool t_revert=false, uint8_t t_min=0, uint8_t t_max=7)

getFasBlockBypassed Function BMC-API.h line: 1216

check if a FAS block is bypassed

bool getFasBlockBypassed(uint8_t n)

getFasBlockEngaged Function BMC-API.h line: 1221

check if a FAS block is engaged

bool getFasBlockEngaged(uint8_t n)

getFasIsBlockX Function BMC-API.h line: 1229

check if a FAS block is in X State
if using FAS 3 sync return true if channel is A
this is only here for compatibility,
when you use FAS 3 sync use the getFasBlockChannel call instead

bool getFasIsBlockX(uint8_t n)

getFasIsBlockY Function BMC-API.h line: 1241

check if a FAS block is in Y State
if using FAS 3 sync return true if channel is B
this is only here for compatibility,
when you use FAS 3 sync use the getFasBlockChannel call instead

bool getFasIsBlockY(uint8_t n)

getFasBlockChannel Function BMC-API.h line: 1251

get the channel of a specified block
returns 0 for channel A, 1 for channel B, etc.

uint8_t getFasBlockChannel(uint8_t n)

getFasTuner Function BMC-API.h line: 1267

get FAS Tuner Data, the BMCTunerData struct
contains the following attributes
uint8_t stringNumber = 0;
uint8_t note = 0;
uint8_t pitchRaw = 0;
int pitch = 0;
char noteName[3] = "";

void getFasTuner(BMCTunerData& buff)

fasIsBlockBypassed Function BMC-API.h line: 1272

get FAS Tuner Data

bool fasIsBlockBypassed(uint8_t blockId)

fasIsBlockEngaged Function BMC-API.h line: 1276

bool fasIsBlockEngaged(uint8_t blockId)

fasIsBlockX Function BMC-API.h line: 1280

bool fasIsBlockX(uint8_t blockId)

fasIsBlockY Function BMC-API.h line: 1284

bool fasIsBlockY(uint8_t blockId)

fasToggleTuner Function BMC-API.h line: 1288

void fasToggleTuner()

fasTapTempo Function BMC-API.h line: 1292

void fasTapTempo()

fasSendSetBlockParameter Function BMC-API.h line: 1297

void fasSendSetBlockParameter(uint8_t blockId, uint8_t parameterId, uint16_t value)

fasSendGetBlockParameter Function BMC-API.h line: 1301

void fasSendGetBlockParameter(uint8_t blockId, uint8_t parameterId)

fasSyncParameter Function BMC-API.h line: 1305

void fasSyncParameter(uint8_t slot, uint8_t block, uint8_t parameter)

fasGetSyncedParameter Function BMC-API.h line: 1309

uint16_t fasGetSyncedParameter(uint8_t block, uint8_t parameter)

fasGetSyncedParameter Function BMC-API.h line: 1313

uint16_t fasGetSyncedParameter(uint8_t slot)

fasChangeSyncedParameter Function BMC-API.h line: 1317

void fasChangeSyncedParameter(uint8_t slot, uint16_t value)

SYSTEMBack to Top

onFirstLoop Callback BMC-API.h line: 35

triggered when BMC runs it's update() method the very first time.

void onFirstLoop(void (*fptr)())

onOneSecondPassed Callback BMC-API.h line: 40

triggers every 1 second, additionally adds the stopwatch state as a parameter

void onOneSecondPassed(void (*fptr)(uint8_t stopwatchState))

onEditorUpdate Callback BMC-API.h line: 45

DEPRECATED, USE onStoreUpdate INSTEAD

void onEditorUpdate(void (*fptr)())

onStoreUpdate Callback BMC-API.h line: 50

triggered when EEPROM has been updated either by the editor or the API

void onStoreUpdate(void (*fptr)())

onEditorConnection Callback BMC-API.h line: 56

triggered when the editor connects/disconnects
@state true if editor is connected

void onEditorConnection(void (*fptr)(bool state))

onEepromErased Callback BMC-API.h line: 63

triggered when BMC erases the active EEPROM, this usually only happens when
you have multiple stores available and BMC changes the store to one that doesn't
match the current CRC

void onEepromErased(void (*fptr)())

onValueStream Callback BMC-API.h line: 68

triggered when a value stream is handled

void onValueStream(void (*fptr)(BMCValueStream item))

onTrigger Callback BMC-API.h line: 73

triggered when a BMC Trigger has been handled

void onTrigger(void (*fptr)(uint32_t source, uint32_t event))

onMenu Callback BMC-API.h line: 77

triggered when a BMC Trigger has been handled
triggered when a Menu Command is handled by a button, encoder, API, etc.

void onMenu(void (*fptr)(uint8_t t_command))

onTyperUpdate Callback BMC-API.h line: 82

triggered when the Typer value has been Updated

void onTyperUpdate(void (*fptr)(uint16_t t_value, uint16_t t_rawValue))

onTyperCustomUpdate Callback BMC-API.h line: 87

triggered when the Typer value has been Updated and you set it to custom calback

void onTyperCustomUpdate(void (*fptr)(uint16_t t_value, uint16_t t_rawValue))

onMidUpdate Callback BMC-API.h line: 94

triggered half way thru the BMC update() method, this is in case you need
to do other tasks like update a display without waiting for the BMC update()
method to complete

void onMidUpdate(void (*fptr)())

onMessenger Callback BMC-API.h line: 99

triggered when Messenger message is received from the Editor App.

void onMessenger(void (*fptr)(BMCMessenger t_messenger))

onHostConnectionChange Callback BMC-API.h line: 215

triggered when a USB MIDI Device is connected to the Teensy's USB Host

void onHostConnectionChange(void (*fptr)(bool t_connected))

onBleConnectionChange Callback BMC-API.h line: 223

triggered when BMC connects to a BLE Master Device

void onBleConnectionChange(void (*fptr)(bool t_connected))

stopwatchControl Function BMC-API.h line: 428

void stopwatchControl(uint8_t cmd, uint8_t h=0, uint8_t m=0, uint8_t s=0)

changeStore Function BMC-API.h line: 477

switch to a different Store, only available with SD Card and 24LC256 EEPROM
since this changed was triggered by your sketch we'll delay
it in case it wasn't programmed properly and you are changing
the address way too many times.

bool changeStore(uint8_t t_address)

getStoreAddress Function BMC-API.h line: 494

get the current store address

uint8_t getStoreAddress()

getSketchByte Function BMC-API.h line: 1021

get the value of a sketch byte

uint8_t getSketchByte(uint8_t n)

scrollSketchByte Function BMC-API.h line: 1030

scroll thru sketch bytes, you must pass the initial value "n"
this function will then return the next value up or down
this function is to scroll the index of a sketch byte, useful for editors

uint8_t scrollSketchByte(uint8_t n, uint8_t t_direction, uint8_t t_amount)

scrollSketchByteValue Function BMC-API.h line: 1041

scroll the value of a sketch byte up or down based on the sketch byte's data
n is the index of the sketch byte, that sketch byte value is then loaded and scrolled

uint8_t scrollSketchByteValue(uint8_t n, uint8_t t_direction, uint8_t t_amount)

scrollSketchByteValue Function BMC-API.h line: 1046

same as above but you can use it to pass it a value that you store on your sketch

uint8_t scrollSketchByteValue(uint8_t n, uint8_t t_value, uint8_t t_direction, uint8_t t_amount)

formatSketchByteValue Function BMC-API.h line: 1058

format the value of a sketch byte based on it's config format data
if value is not passed then the sketch byte's value is loaded from EEPROM

void formatSketchByteValue(uint8_t n, char * t_string)

formatSketchByteValue Function BMC-API.h line: 1063

get the formatted value of a sketch byte

void formatSketchByteValue(uint8_t n, uint8_t t_value, char * t_string)

editorConnected Function BMC-API.h line: 1363

bool editorConnected()

bleConnected Function BMC-API.h line: 1367

bool bleConnected()

hostConnected Function BMC-API.h line: 1371

bool hostConnected()

getStopwatchState Function BMC-API.h line: 1376

STOP WATCH

uint8_t getStopwatchState()

getStopwatchHours Function BMC-API.h line: 1380

uint8_t getStopwatchHours()

getStopwatchMinutes Function BMC-API.h line: 1384

uint8_t getStopwatchMinutes()

getStopwatchSeconds Function BMC-API.h line: 1388

uint8_t getStopwatchSeconds()

getStopwatchTimeout Function BMC-API.h line: 1392

uint32_t getStopwatchTimeout()

getRuntime Function BMC-API.h line: 1397

RUN TIME

uint32_t getRuntime()

getHour Function BMC-API.h line: 1403

TIME

uint8_t getHour()

getMinute Function BMC-API.h line: 1407

uint8_t getMinute()

getSecond Function BMC-API.h line: 1411

uint8_t getSecond()

getDay Function BMC-API.h line: 1415

uint8_t getDay()

getMonth Function BMC-API.h line: 1419

uint8_t getMonth()

getYear Function BMC-API.h line: 1423

uint16_t getYear()

messengerSend Function BMC-API.h line: 1435

with the Messenger you can send a signed long value and a char array
the string can only be up to 32 characters
send a value and a string as a char array

void messengerSend(uint16_t status, signed long value, char* str, uint8_t len)

messengerSend Function BMC-API.h line: 1443

send a value and a string as a const string

void messengerSend(uint16_t status, signed long value, const char* str)

messengerSend Function BMC-API.h line: 1451

send just a value without string

void messengerSend(uint16_t status, signed long value)

messengerSend Function BMC-API.h line: 1459

send just a char array string

void messengerSend(uint16_t status, char* str, uint8_t len)

messengerSend Function BMC-API.h line: 1467

send just a const string

void messengerSend(uint16_t status, const char* str)

disconnectBLE Function BMC-API.h line: 1477

BLE MIDI CONTROLS, ignored if BLE is not compiled

void disconnectBLE()

settingsSave Function BMC-API.h line: 1623

METHODS TO UPDATE THE STORE BUT ONLY IF NOT CONNECTED TO THE EDITOR
Save any changes to settings and re-assign all data, writes to EEPROM
also calls the onStoreUpdate callback

void settingsSave()

settingsSetPwmOff Function BMC-API.h line: 1632

Change the PWM when off setting for Leds
if @save is true it will call the settingsSave() writing the store to EEPROM

void settingsSetPwmOff(bool state, bool save=false)

settingsGetPwmOff Function BMC-API.h line: 1642

Get the PWM when off setting for Leds

bool settingsGetPwmOff()

settingsSetButtonHold Function BMC-API.h line: 1652

Change the Buttons Hold Time Setting for Buttons
if @save is true it will call the settingsSave() writing the store to EEPROM
@value must be a value from 0 to 15, where 0 is 500ms, 1 is 750ms, 2 is 1000ms, etc.
each value after 0 adds 250ms to the hold time.
When the value is passed to buttons the actual hold threshold is ((value+2)*250)
this is so that with a value of 0 the hold threshold is 500ms, that's the minimum
since during testing i've found that a value any lower than that is unusable.

void settingsSetButtonHold(uint8_t value, bool save=false)

settingsGetButtonHold Function BMC-API.h line: 1664

Get the Buttons Hold Threshold Setting for Buttons
this value will range from 0 to 15
to get the actual time in milliseconds set inMillis to true

uint8_t settingsGetButtonHold(bool inMillis=false)