BMC Documentation https://www.roxxxtar.com/blog/category/bmc-documentation/
BMC Main Page https://www.roxxxtar.com/bmc
GitHub https://github.com/neroroxxx/BMC
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
is the number of timers BMC_DEBUG_MAX_TIMING
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
= true if you want to time the number of microseconds, false for millis @t_micros
for every timer you compile there's a millis timer and a micros timer
specifies which one you want to use@t_micros
void startTiming(uint8_t n, bool t_micros=false)
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)
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))
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))
Set callback for buttons activity,
called when a button changes states
@n
= index of button
@eventIndex
= event's index
@trigger
= trigger type (
etc.) BMC_TRIG_PRESS
,
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))
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))
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))
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
as the size of the char array BMC_MAX_NAMES_LENGTH
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
-
_LIBRARYBMC_DEVICE_ID_SETLIST
_SONG
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
-
_EVENTBMC_DEVICE_ID_LAYER
void getDeviceName(uint8_t deviceType, uint16_t index, char* str)
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)
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)
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)
return the state of the specified Led
bool getLedState(uint16_t n, bool isGlobal)
return the state of the specified pixel
uint8_t getPixelState(uint8_t n, bool isGlobal)
return the state of the specified rgb pixel
uint8_t getRgbPixelState(uint8_t n, uint8_t color, bool isGlobal)
return the value of the specified pot
uint8_t getPotValue(uint8_t n, bool isGlobal)
return the state of the specified relay
bool getRelayState(uint8_t n, uint8_t isLatching)
triggered when you change layers, also triggered when BMC runs it's first loop
void onLayerChange(void (*fptr)(uint8_t layer))
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)
get the current layer
uint8_t getCurrentLayer()
retrieve the name of the current layer
bmcStoreName getLayerName()
retrieve the name of the a layer specified by n
bmcStoreName getLayerName(uint16_t n)
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)
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)
triggered when a MIDI message is received
void onMidiRx(void (*fptr)(BMCMidiMessage data))
triggered when a MIDI Clock message is received
void onMidiClockTick(void (*fptr)())
triggered every 24 times a MIDI Clock message is received
void onMidiClockBeat(void (*fptr)())
triggered when the Master/Slave Clock has changed it's tempo
void onMidiClockBpmChange(void (*fptr)(uint16_t tempo))
triggered when a midi message was sent or received
void onMidiActivity(void (*fptr)(bool in, bool out))
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)())
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))
@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)
@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)
@t_channel
MUST be 1 thru 16, not 0 thru 15
all other parameters are 0 indexed
uint8_t getLocalProgram(uint8_t t_channel)
@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)
for master or slave clock
get the current BPM
uint16_t getMidiClockBpm()
only works when on master clock
set the Clock's BPM
void setMidiClockBpm(uint16_t t_bpm)
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()
void sendRealTime(uint8_t port, uint8_t type, uint8_t cable=0)
void sendSysEx(uint8_t port, uint8_t *data, uint16_t size, bool hasTerm=false, uint8_t cable=0)
void sendProgramChange(uint8_t port, uint8_t channel, uint8_t program, uint8_t cable=0)
void sendControlChange(uint8_t port, uint8_t channel, uint8_t control, uint8_t value, uint8_t cable=0)
void sendNoteOn(uint8_t port, uint8_t channel, uint8_t note, uint8_t velocity, uint8_t cable=0)
void sendNoteOff(uint8_t port, uint8_t channel, uint8_t note, uint8_t velocity, uint8_t cable=0)
void sendPitchBend(uint8_t port, uint8_t channel, int16_t value, uint8_t cable=0)
void sendAfterTouch(uint8_t port, uint8_t channel, uint8_t pressure, uint8_t cable=0)
void sendAfterTouchPoly(uint8_t port, uint8_t channel, uint8_t note, uint8_t pressure, uint8_t cable=0)
void sendTimeCodeQuarterFrame(uint8_t port, uint8_t type, uint8_t value, uint8_t cable=0)
void sendSongPosition(uint8_t port, uint16_t beats, uint8_t cable=0)
void sendSongSelect(uint8_t port, uint8_t song, uint8_t cable=0)
void sendTuneRequest(uint8_t port, uint8_t cable=0)
void beginRpn(uint8_t port, uint8_t channel, uint16_t number, uint8_t cable=0)
void sendRpnValue(uint8_t port, uint8_t channel, uint16_t value, uint8_t cable=0)
void sendRpnIncrement(uint8_t port, uint8_t channel, uint8_t amount, uint8_t cable=0)
void sendRpnDecrement(uint8_t port, uint8_t channel, uint8_t amount, uint8_t cable=0)
void endRpn(uint8_t port, uint8_t channel, uint8_t cable=0)
void beginNrpn(uint8_t port, uint8_t channel, uint16_t number, uint8_t cable=0)
void sendNrpnValue(uint8_t port, uint8_t channel, uint16_t value, uint8_t cable=0)
void sendNrpnIncrement(uint8_t port, uint8_t channel, uint8_t amount, uint8_t cable=0)
void sendNrpnDecrement(uint8_t port, uint8_t channel, uint8_t amount, uint8_t cable=0)
void endNrpn(uint8_t port, uint8_t channel, uint8_t cable=0)
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)
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)
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)
triggered when a BMC Preset has changed
void onPresetChange(void (*fptr)(uint8_t t_bank, uint8_t t_preset))
triggered when a BMC Preset Bank has changed
void onPresetsBankChange(void (*fptr)(uint8_t n))
returns number of events the current preset has
uint8_t getPresetLength()
returns number of events a specified preset has
uint8_t getPresetLength(uint8_t t_bank, uint8_t t_preset)
returns the current preset number (within the current bank)
uint8_t getPreset()
returns the current bank number
uint8_t getPresetBank()
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()
set to the specified preset within the current bank
void setPresetNumber(uint8_t t_preset, bool t_retrigger = false)
set to the specified bank
void setPresetBank(uint8_t t_bank, bool t_retrigger = false)
set to a preset by specifying the preset index
void setPresetByIndex(uint16_t t_preset, bool t_retrigger = false)
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)
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)
go to the next bank
@t_wrap
true to go to first bank after reaching the last one
void presetBankNext(bool t_wrap)
go to the previous bank
@t_wrap
true to go to last bank after reaching the first one
void presetBankPrevious(bool t_wrap)
returns the letter of the current bank
bmcStoreName getPresetBankLetter()
returns the letter of the specified bank
bmcStoreName getPresetBankLetter(uint8_t t_bank)
triggered when the current BMC SetList has changed
void onSetListChange(void (*fptr)(uint8_t n))
triggered when the current BMC SetList Song has changed
void onSetListSongChange(void (*fptr)(uint8_t n))
get the current SetList number
uint8_t getSetList()
returns the number of songs in the current setlist
uint8_t getSetListLength()
returns the number of songs in the specified setlist
uint8_t getSetListLength(uint8_t n)
go to a specific SetList
void setSetList(uint8_t n)
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)
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)
returns the current song number in the setlist
uint8_t getSetListSong()
go to a specific song number in the setlist
void setSetListSong(uint8_t n)
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)
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)
get the current song number in the setlist
uint8_t getSetListSongPart()
go to a specific song number in the setlist
void setSetListSongPart(uint8_t n)
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)
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)
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)
void onBeatBuddyBeatLocationChange(void (*fptr)(uint8_t t_location, uint8_t numerator))
bool beatBuddySynced()
bool beatBuddyPlaying()
bool getBeatBuddyCurrentPart()
void sendBeatBuddyCommand(uint8_t value, uint8_t data=127)
passes the state of the connect, true if a project is loaded
void onDawOnline(void (*fptr)(bool state))
passes the sysex message containing the updated LCD string
void onDawRecievedLCD(void (*fptr)(BMCMidiMessage data))
more info to come
void onDawRecievedTimeDisplay(void (*fptr)(uint8_t digit, char character))
more info to come
void onDawRecievedAssignmentDisplay(void (*fptr)(uint8_t digit, char character))
passes the meter value for a channel
void onDawRecievedChannelMeter(void (*fptr)(uint8_t channel, uint8_t value))
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))
more info to come
void onDawReceivedTimeCodeDigit(void (*fptr)(uint8_t digit, uint8_t value))
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))
passes the specified channel's fader position
void onDawRecievedChannelFaderPosition(void (*fptr)(uint8_t channel, int value))
passes the master channel's fader position
void onDawRecievedMasterFaderPosition(void (*fptr)(int value))
receive the state of a channel, true if the channel is currently selected
void onDawRecievedChannelSelect(void (*fptr)(uint8_t channel, bool state))
receive the solo state of a channel, true if the channel is currently in solo
void onDawRecievedChannelSolo(void (*fptr)(uint8_t channel, bool state))
receive the mute state of a channel, true if the channel is currently in mute
void onDawRecievedChannelMute(void (*fptr)(uint8_t channel, bool state))
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))
receive the state leds, @cmd
will carry the function of the LED, see documentation
void onDawRecievedLedState(void (*fptr)(uint8_t cmd, bool state))
returns the selected channel number
uint8_t getDawSelectedTrack()
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)
sends a rotation of a v-pot
void sendDawVPot(uint8_t ch, bool clockwise, uint8_t ticks)
sends a button press command
void sendDawButton(uint8_t cmd, uint8_t ch, bool release)
triggered when BMC Detects a FAS device has been connected/disconnected
void onFasConnectionChange(void (*fptr)(bool state))
triggered when the FAS preset has changed
void onFasPresetChange(void (*fptr)(uint16_t n))
triggered when the FAS preset name has been received
void onFasPresetName(void (*fptr)(char* str))
triggered when the FAS scene has changed
void onFasSceneChange(void (*fptr)(uint8_t n))
triggered when any FAS Effect Block has changed it's states
void onFasBlocksChange(void (*fptr)())
triggered when the FAS Tuner has been turned on/off
void onFasTunerStateChange(void (*fptr)(bool state))
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))
triggered when the FAS Looper has been activated or stopped
void onFasLooperStateChange(void (*fptr)(bool state))
triggered when the FAS Looper data has been received
void onFasLooperReceived(void (*fptr)(uint8_t data, uint8_t position))
triggered when FAS CPU usage has been received
void onFasCpuReceived(void (*fptr)(uint8_t n))
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))
return the state of a FAS connection
bool fasConnected()
trigger a FAS Connection
void fasConnect()
trigger a FAS Disconnect
void fasDisconnect()
toggle FAS Connection
void fasToggleConnection()
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)
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()
get the synced scene number
uint8_t getFasSceneNumber()
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)
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)
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()
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()
change to a new FAS preset number, value is the actual preset number
void setFasPresetNumber(uint16_t value)
change to a new FAS scene number, value must be 0 to 7
void setFasSceneNumber(uint8_t value, bool revert=false)
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)
check if a FAS block is bypassed
bool getFasBlockBypassed(uint8_t n)
check if a FAS block is engaged
bool getFasBlockEngaged(uint8_t n)
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)
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)
get the channel of a specified block
returns 0 for channel A, 1 for channel B, etc.
uint8_t getFasBlockChannel(uint8_t n)
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)
get FAS Tuner Data
bool fasIsBlockBypassed(uint8_t blockId)
bool fasIsBlockEngaged(uint8_t blockId)
bool fasIsBlockX(uint8_t blockId)
bool fasIsBlockY(uint8_t blockId)
void fasToggleTuner()
void fasTapTempo()
void fasSendSetBlockParameter(uint8_t blockId, uint8_t parameterId, uint16_t value)
void fasSendGetBlockParameter(uint8_t blockId, uint8_t parameterId)
void fasSyncParameter(uint8_t slot, uint8_t block, uint8_t parameter)
uint16_t fasGetSyncedParameter(uint8_t block, uint8_t parameter)
uint16_t fasGetSyncedParameter(uint8_t slot)
void fasChangeSyncedParameter(uint8_t slot, uint16_t value)
triggered when BMC runs it's update() method the very first time.
void onFirstLoop(void (*fptr)())
triggers every 1 second, additionally adds the stopwatch state as a parameter
void onOneSecondPassed(void (*fptr)(uint8_t stopwatchState))
DEPRECATED, USE onStoreUpdate INSTEAD
void onEditorUpdate(void (*fptr)())
triggered when EEPROM has been updated either by the editor or the API
void onStoreUpdate(void (*fptr)())
triggered when the editor connects/disconnects
@state
true if editor is connected
void onEditorConnection(void (*fptr)(bool state))
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)())
triggered when a value stream is handled
void onValueStream(void (*fptr)(BMCValueStream item))
triggered when a BMC Trigger has been handled
void onTrigger(void (*fptr)(uint32_t source, uint32_t event))
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))
triggered when the Typer value has been Updated
void onTyperUpdate(void (*fptr)(uint16_t t_value, uint16_t t_rawValue))
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))
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)())
triggered when Messenger message is received from the Editor App.
void onMessenger(void (*fptr)(BMCMessenger t_messenger))
triggered when a USB MIDI Device is connected to the Teensy's USB Host
void onHostConnectionChange(void (*fptr)(bool t_connected))
triggered when BMC connects to a BLE Master Device
void onBleConnectionChange(void (*fptr)(bool t_connected))
void stopwatchControl(uint8_t cmd, uint8_t h=0, uint8_t m=0, uint8_t s=0)
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)
get the current store address
uint8_t getStoreAddress()
get the value of a sketch byte
uint8_t getSketchByte(uint8_t n)
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)
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)
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)
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)
get the formatted value of a sketch byte
void formatSketchByteValue(uint8_t n, uint8_t t_value, char * t_string)
bool editorConnected()
bool bleConnected()
bool hostConnected()
STOP WATCH
uint8_t getStopwatchState()
uint8_t getStopwatchHours()
uint8_t getStopwatchMinutes()
uint8_t getStopwatchSeconds()
uint32_t getStopwatchTimeout()
RUN TIME
uint32_t getRuntime()
TIME
uint8_t getHour()
uint8_t getMinute()
uint8_t getSecond()
uint8_t getDay()
uint8_t getMonth()
uint16_t getYear()
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)
send a value and a string as a const string
void messengerSend(uint16_t status, signed long value, const char* str)
send just a value without string
void messengerSend(uint16_t status, signed long value)
send just a char array string
void messengerSend(uint16_t status, char* str, uint8_t len)
send just a const string
void messengerSend(uint16_t status, const char* str)
BLE MIDI CONTROLS, ignored if BLE is not compiled
void disconnectBLE()
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()
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)
Get the PWM when off setting for Leds
bool settingsGetPwmOff()
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)
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)