How to set up an audio app on Linux without desktop?

We are trying to port our JUCE-based desktop standalone synth to a single-board computer running linux without a desktop.
We plan on using a standalone command-line JUCE app.

What dependencies are required with respect to Graphics and audio?

We are going to use the HDMI output to draw to a display.
We are expecting to use ALSA for sound.

Hi,

without desktop or without graphics at all (headless)?

Without desktop!!
We still want to be able to use graphics. Imagine how graphics were implemented back with Microsoft DOS, and launching the program was achieved by typing into a command prompt

It will be an interactive console app, I guess.

Here is example of command line midi sender app GitHub - gbevin/SendMIDI: Multi-platform command-line tool to send out MIDI messages
It doesn’t use any juce_graphic modules and have only basic Linux dependencies:

ldd /usr/bin/sendmidi
        linux-vdso.so.1 (0x00007ffc05fc6000)
        libasound.so.2 => /lib64/libasound.so.2 (0x00007f35860c0000)
        libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f3585e00000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f3585d1c000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f3586099000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f3585b21000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f3586390000)

So, If I get the question (and it’s Ubuntu), you have to install libasound2-dev package only JUCE/Linux Dependencies.md at develop · juce-framework/JUCE · GitHub

For the graphics part, it seems what you want is direct access to the framebuffer in Linux.

I’m not familiar with that, but that question has been asked on the forum before. See if the answers in the topics below are somehow helpful for your case:

BTW this is by no mean a complete list, you could find more searching with the search feature of the forum, or with Google

If you can live with X11 and just want to get rid of any taskbars, window decorations etc., you can run only a full screen window without all the bells and whistles.

It’s been years since I’ve done that, but I had a hardware prototype running on an RPi with Touchscreen like that. I think what I did is install a Raspbian without Desktop and then manually install X11 (according to old notes the only package needed was xserver-xorg-legacy).

The system was configured to boot directly into a user shell, and in the ~/.profile I ran a script that launched the processes I needed.

To run a UI app in X11 without any Desktop, you can then just run xinit my_awesome_app. Or in my case xinit my_awesome_app -- -nocursor, to hide the mouse cursor when running with a touchscreen.

It wasn’t a JUCE app though. I basically had a background process doing all the audio, and a simple GUI built with PyQT, both communicating with each other over OSC. But it should work with a JUCE Standalone app just as well.

Note that I had no idea what I was doing at the time, the above is just a recollection of bits and pieces I Stackoverflowed and hacked together many years ago. There’s probably “more right” ways to do this.