-
Notifications
You must be signed in to change notification settings - Fork 139
Bela command line arguments
roberthjack edited this page Mar 23, 2021
·
5 revisions
This material has been superseded. Visit learn.bela.io for the maintained version.
Every Bela program supports a standard set of command-line arguments, listed below. Either the long form or the short (single-character) form can be used
Other arguments can be added in each project. With the exception of -p
and -v
, the standard arguments all use capital letters, leaving the lowercase letters free for user-defined arguments. The Bela_usage()
function explains the standard arguments as follows:
--period [-p] period: Set the hardware period (buffer) size in audio samples
--dac-level [-D] dBs: Set the DAC output level (0dB max; -63.5dB min)
--adc-level [-A] dBs: Set the ADC input level (0dB max; -12dB min)
--pga-gain-left dBs: Set the Programmable Gain Amplifier for the left audio channel (0dBmin; 59.5dB max; default: 16dB)
--pga-gain-right dBs: Set the Programmable Gain Amplifier for the right audio channel (0dBmin; 59.5dB max; default: 16dB)
--hp-level [-H] dBs: Set the headphone output level (0dB max; -63.5dB min)
--mute-speaker [-M] val: Set whether to mute the speaker initially (default: no)
--use-analog [-N] val: Set whether to use ADC/DAC analog (default: yes)
--use-digital [-G] val: Set whether to use digital GPIO channels (default: yes)
--analog-channels [-C] val: Set the number of ADC/DAC channels (default: 8)
--digital-channels [-B] val: Set the number of GPIO channels (default: 16)
--receive-port [-R] val: Set the receive port (default: 9998)
--transmit-port [-T] val: Set the transmit port (default: 9999)
--server-name [-S] val: Set the destination server name (default: '127.0.0.1')
--mux-channels [-X] val: Set the number of channels to use on the multiplexer capelet (default: not used)
--audio-expander-inputs [-Y] vals: Set the analog inputs to use with audio expander (comma-separated list)
--audio-expander-outputs [-Z] vals: Set the analog outputs to use with audio expander (comma-separated list)
--pru-file val: Set an optional external file to use for the PRU binary code
--pru-number val: Set the PRU to use for I/O (options: 0 or 1, default: 0)
--disable-led Disable the blinking LED indicator
--disable-cape-button-monitoring Disable the monitoring of the Bela cape button (which otherwise stops the running program)
--verbose [-v]: Enable verbose logging information
--help [-h]: Print this menu