Skip to content

No hardware? PC simulator

No board? The simulator runs the same core, GUI and apps as the board, in a window on your computer; it needs no ESP-IDF, so you can skip steps 1–4. To go from nothing to a running example app, follow the 10-minute quickstart.

You build CrossPad/crosspad-pc with CMake and start it. The pads and the screen appear in the window, and your mouse plays the pads: a click is a hit, the wheel turns the encoder and the middle button presses it. The keyboard plays the pads too once you switch the round keyboard button on the window from OFF to FOCUS.

These commands are for Ubuntu and Debian.

  1. Install the build tools and libraries.

    Terminal window
    sudo apt-get update
    sudo apt-get install -y build-essential cmake ninja-build git pkg-config libsdl2-dev libasound2-dev libpulse-dev libdbus-1-dev
    sudo apt-get install -y libpipewire-0.3-dev # optional: native PipeWire virtual audio devices

    You should see: apt finishes without an E: line.

    If not: apt-get install fails or a package is not found

  2. Download the simulator with its submodules.

    Terminal window
    git clone --recursive https://github.com/CrossPad/crosspad-pc.git ~/crosspad-pc
    cd ~/crosspad-pc
    git submodule update --init --recursive
    git submodule status | grep -c '^-' || true

    You should see: 0 on the last line (no submodule left out).

    If not: a request for a GitHub login for a submodule such as crosspad-core or crosspad-gui means it is not open yet (see the note at the top). Anything else: project clone fails

  3. Build it.

    Terminal window
    cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug && cmake --build build

    You should see: MIDI support enabled (RtMidi) and Audio support enabled (RtAudio) while CMake configures, then the build ends without error:.

    If not: CMake cannot find SDL2, ALSA or DBus

  4. Start it.

    Terminal window
    ./bin/CrossPad

    You should see: the CrossPad window, and [Remote] Listening on 127.0.0.1:19840 in the terminal.

    If not: simulator window does not open. In a VM, WSL, a server or a container without sound or Bluetooth services: running without sound or Bluetooth

The simulator runs the same core, GUI and apps as the board. Where the hardware differs, an app sees this:

PartOn the CrossPadIn the simulator
Opening an appThe MODE map; your own apps over USB with crosspad-hil app startA tile for every app in the launcher
ScreenTransport bar on top; app area 320×210Status bar on top; app area 320×218
Transport bar (PLAY, STOP, BPM key) and TempoChanged eventsYesNot present; an app can still set the tempo
PadsVelocity, pressure (aftertouch) and left/right positionMouse and keyboard at velocity 127; the remote-control port on 127.0.0.1:19840 sets any velocity
Pad LEDsColours and PadAnimator framesColours
Kit playback from an app (postSamplePlayback)Pad, velocity, transpose and keyPad and velocity
Note-off on a kit padEnds a pad in Hold modeEnds a pad in Loop mode
MIDI outNotes, control change, pitch bend, aftertouch, program changeNotes and control change
MIDI portsUSB and Bluetooth, as the player’s MIDI settings route themThe ports you choose with the MIDI OUT and MIDI IN jacks; on Linux the simulator picks them
Motion sensor, gestures, haptic motorYesNot present: isAvailable() is false
ISampleTools, IOutputLevelsYesNull
HTTP client (IHttpClient)NullYes, for tools that run on the computer
SD cardThe card, at /sdcardA folder you choose with the SD slot
Virtual serial ports (serial monitor app)—On Windows

Hardware for apps maps each part to its API.

Optional Run the simulator's tests (Linux)

From ~/crosspad-pc after a build:

Terminal window
ctest --test-dir build --output-on-failure -LE gui

Next: Build an app: every recipe runs in the simulator first. To begin from an empty app instead: Start from the template.