Uzebox Patch Studio

Topics on software tools like TileStudio, comments on documentation and tutorials (or the lack of) should go here.
User avatar
danboid
Posts: 1881
Joined: Sun Jun 14, 2020 12:14 am

Re: Uzebox Patch Studio

Post by danboid »

EDIT

I re-posted and edited the following as its own post here:

https://uzebox.org/forums/viewtopic.php?f=12&t=11196

JACK and Linux audio cheatsheet

JACK can be thought of as a highly configurable audio mixer for Linux and other platforms. JACK is a program and API that enables you to route audio in realtime between different JACK-aware apps such as DAWs, softsynths, sequencers etc.

Most of the trouble with JACK is simply getting the JACK audio server to run. Once the JACK server is running, using JACK is as simple as using a patchbay to connect audio inputs and outputs.

Pipewire is the latest tech in Linux audio and offers JACK support. Pipewire solves the issue of using pulseaudio and ALSA only apps alongside JACK apps but it made my system very unstable when I was testing the Debian testing version of pipewire a few months ago so I recommend using traditional JACK until Pipewire matures.

There are at least three ways to start and control JACK.

* Using the cli tools
* Using qjackctl
* Using Cadence and Catarina

As a dev, there are definitely times where you'd want to use the cli tools to start the JACK server or make connections between apps. Cadence and Catarina offer a couple of things that qjackctl does not but I personally prefer to use qjackctl if only because its in the Debian repos.

Install qjackctl

apt install qjackctl

Installing qjackctl will also install JACK2 if you've not already installed a version of JACK. You may be required to reboot after installing JACK so that the new system settings are applied re realtime settings.

Start qjackctl in your preferred manner.

The single most important setting in qjackctl / JACK is setting the correct audio device for JACK to use. Click on the Setup button in qjackctl then check which device is selected under Settings -> Parameters -> Interface

For the other main settings in that tab choose:

Driver: alsa
Realtime: checked/enabled
SampleRate: 48000
Frames/Period: 256, if 256 produces xruns, use 512 or 1024. The lower value you can use the better.
Periods/buffer: 3
MIDI driver: seq - this enables ALSA midi support. You don't need to set this if you're not using any (USB) MIDI hardware.

You should be ready to try starting JACK now. In the main qjackctl window, click the 'Start' button. If you have configured qjackctl correctly, you should see 'Started' printed in yellow text and a big row of green zeros representing the JACK transport time. Just to the left of the row of big green zeros is a smaller 0 or it should be zero. This is the xrun counter and you need to adjust your JACK settings if you get any xruns. You should get no xruns when not running any JACK apps. xruns cause momentary skips and breakups in the JACK audio output.

If JACK doesn't start, go back to the qjackctl settings and try using a different interface or try a larger Frames/Period setting.

Once JACK is running you can connect JACK apps to one another using the Graph or Patchbay windows of qjackctl. That should be self explanatory.

Note that Firefox, Chrome/chromium and most browsers under most distros don't have any JACK support. This is a problem solved by Pipewire and you may also be able to get the ALSA2JACK bridge to work if you use Cadence instead of qjackctl to start JACK.

My fave open source sequencers are qtractor and muse. For using MIDI soundfonts under qtractor and muse there is the FluidPlug LV2 plugin. The FluidPlug plugin as well as Cadence, catarina and several other great softsynth plugins and Linux music apps can be easy installing by adding the KX studio repos, which work with both recent versions of Debian and Ubuntu for x86-64 and arm64.

https://kx.studio/Repositories

Also included in the kxstudio repos and of special note to us is Carla, a plugin host which we should be able to use to use UPS as a plugin when we've added JACK support to it.

https://kx.studio/Applications:Carla

If you want a simple LV2 sampler check out rncbc's samplv1

https://www.rncbc.org/drupal/#samplv1

You can use the linuxsampler lv2 plugin for a better sampler plugin.

There are several good softsynths for Linux but some notable ones are Surge, vcvrack / cardinal, helm, yoshimi and TAL noizemaker.

If you want more than what qtractor, muse and Ardour offer then I'd recommend REAPER which has free to use builds for both x64 and arm64 Linux and offers every option you could wish for including full JACK and LV2 plugin support.

https://www.reaper.fm/

If you're not happy with any open source plugins or instruments, most Windows VST plugins can run fine under Linux (via Carla) provided they don't rely on exotic protection mechanisms.

There are several Linux distros optimized for using JACK that include many of the above mentioned apps (and many more) that could provide better performance and/or an easier user experience than trying to configure the OS from scratch yourself. One of the more popular and well established AV creation Linux distros being AV Linux, a derivative of Debian Linux.

https://www.bandshed.net/avlinux/
User avatar
danboid
Posts: 1881
Joined: Sun Jun 14, 2020 12:14 am

Re: Uzebox Patch Studio

Post by danboid »

Sadly UPS no longer builds under recent versions of Debian and its developer seems to have abandonned the project:

https://github.com/flaviozavan/uzebox-p ... o/issues/4

How about integrating UPS into the official repo? Its very handy, cross platform and its quite small too so why not?

I have added a link to UPS on the Sound Engine page. I am currently running UPS in a Debian Bullseye VM.
User avatar
D3thAdd3r
Posts: 3175
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Uzebox Patch Studio

Post by D3thAdd3r »

I agree this should be put into the official repo.

Sure we could make a tool like this on Uzebox too, but this is right on the same filesystem as the machine you are developing on. Versus the manual text editor+tweak+rebuild/test method of old, it saves huge time in SFX development.
User avatar
nicksen782
Posts: 714
Joined: Wed Feb 01, 2012 8:23 pm
Location: Detroit, United States
Contact:

Re: Uzebox Patch Studio

Post by nicksen782 »

I have been considering something like Uzebox music for my JSGAME project. I never really did well with the music though. A nice GUI program would be nice.

If the program can become working again then I agree, add it to the repo. Less silent games ;)
User avatar
danboid
Posts: 1881
Joined: Sun Jun 14, 2020 12:14 am

Re: Uzebox Patch Studio

Post by danboid »

UPS does still build under recent Linux distros, just not those with the latest gcc. It'll no doubt just be a case of making a small tweak to its Makefile to get gcc to ignore a warning or something that its only recently clamped down on.
User avatar
D3thAdd3r
Posts: 3175
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Uzebox Patch Studio

Post by D3thAdd3r »

Do you know the earliest gcc version this happens on? I think it did build for me last I tried, on a fresh 22.04. I know almost nothing on GCC or GTK stuff, I'd probably leave that issue for someone with more knowledge.

Random question: if we had a similar tool on Uzebox(with music playback+RAM patches), what would be the easiest development flow?

For Alter Ego I made all the demo data write to EEPROM, then converted that into an include file. Functional, but also a bit tedious, though could have scripted it. Writing to the SD seems to have the same issues. Maybe "UzeSynth" with FatFS(which can create new?) converts to C array on Uzebox and outputs to a named file you can just move to data folder(under emulation).
User avatar
danboid
Posts: 1881
Joined: Sun Jun 14, 2020 12:14 am

Re: Uzebox Patch Studio

Post by danboid »

It would need to convert it into an array then output it via UART so you could just use a USB serial adapter and a program such as cu or screen under Linux to copy/paste the required data, rather than messing with SD cards. Its easier to copy and paste more than one screen of text from cu than screen. Having the SD card option too would be ideal.

Even better would be a Uzebox sound engine VST / LV2 plugin.

No I don't know when gcc went awry with UPS.
User avatar
D3thAdd3r
Posts: 3175
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Uzebox Patch Studio

Post by D3thAdd3r »

Could add a UART output option in CUzeBox to support that too I suppose.

For sure UPS needs SLIDE commands fixed also, as those are the hardest patches to get right IMO. Additionally, max effort games running tight on space are likely to use a custom sounds.inc. It would be nice, to have that option in UPS, which seems simple enough.

On the same subject, it's already doing patches and (almost full)Uzebox sound emulation, and yet it's only useful for SFX really. I just looked at the code, and I guess it doesn't seem impossible to add in the MIDI player code. With that it would be a single tool for all patch development aspects which would be a huge improvement in easy access factor for people.
User avatar
danboid
Posts: 1881
Joined: Sun Jun 14, 2020 12:14 am

Re: Uzebox Patch Studio

Post by danboid »

I my previous reply I was thinking in the case of using a real Uzebox for writing new patches and MIDI. In the case of using cuzebox then yes I suppose SD card (emulation) and saving to SD makes more sense as it saves you having to copy/paste the arrays.
User avatar
danboid
Posts: 1881
Joined: Sun Jun 14, 2020 12:14 am

Re: Uzebox Patch Studio

Post by danboid »

I have updated the UPS wiki page by adding a LIMITATIONS section.

Is SLIDE the only command it doesn't handle properly?

https://uzebox.org/wiki/Uzebox_Patch_Studio
Post Reply