# Umbrella

Umbrella is a compatibility layer that I made to allow developing Bela projects on desktop Linux without Bela hardware.

# 1 Source

git clone https://code.mathr.co.uk/umbrella.git
git clone --branch umbrella https://code.mathr.co.uk/Bela.git
git clone https://github.com/mattgodbolt/seasocks.git

Tested with Bela commit f0d561581692f94fc4e27933458400aa5d6d0642 (Mon May 15 13:09:22 2023 +0100).

Upstream Bela repository:

git clone --branch build-without-bela https://github.com/BelaPlatform/Bela.git

# 2 Compile

cd seasocks
mkdir build
cd build
cmake ..
cd ../..
cd umbrella

Currently about 85 of 100 examples (excluding Csound, PureData, SuperCollider) build successfully.

# 3 Run

./bin/Fundamentals_sinetone --use-analog 0 --use-digital 0

Connect audio_out_1 and audio_out_2 to your output device in your JACK patchbay.

Most command line arguments (listed by --help) are inoperative. Useful are:

--use-analog [-N] val:          Use ADC/DAC analog (default: yes)
--use-digital [-G] val:         Use digital GPIO channels (default: yes)
--analog-channels [-C] val:     ADC/DAC channels (default: 8)
--digital-channels [-B] val:    GPIO channels (default: 16)

Analog channels can be 2 (double sample rate), 4, or 8 (half sample rate).

Currently only a few of the examples have been tested.

# 4 Bugs

The following should really be fixed:

  • createBelaRtPipe() is not implemented in a realtime safe way.

    However, replacing this with e.g. a lock-free FIFO would require invasive changes in the Bela repository which would probably not be accepted upstream, so it’s unlikely to happen any time soon.

The following probably won’t be fixed:

  • ALSA MIDI client is unnamed (appears as 129:Client-129 in qpwgraph)

  • BelaContext does not expose data buffers, which breaks (compile time):

    • examples/Capelets/multiplexer-spectrum
    • examples/Communication/logging-sensors
    • examples/Extras/measure-noisefloor
    • examples/Extras/oscillator-bank
    • examples/Extras/salt-factory-taste
    • examples/Extras/tank-wars
    • examples/Instruments/airharp
    • examples/Instruments/d-box
    • examples/Sensors/MPR121
  • no multiplexer, which breaks (compile time):

    • examples/Capelets/multiplexer-display
    • examples/Capelets/multiplexer-spectrum
  • no GPIO, which breaks (link time):

    • examples/Digital/synchronous-gpio
    • examples/Extras/cape-test
  • no I2c_Codec, which breaks (link time):

    • examples/Extras/bucket-brigade-chorus
  • no PRU, which breaks (compile time):

    • examples/Extras/pru-pwm
    • examples/Extras/second-pru