Uzebox Patch Studio

Topics on software tools like TileStudio, comments on documentation and tutorials (or the lack of) should go here.
User avatar
D3thAdd3r
Posts: 3170
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Uzebox Patch Studio

Post by D3thAdd3r »

It appears that PC_SLIDE/PC_SLIDE_SPEED do not work correctly. I could somehow hear some very slight change if they were present, but things involving slides do not sound the same as they sound on Uzebox. This is on Windows and I have not yet tried on Linux, can anyone else confirm?
User avatar
Artcfox
Posts: 1382
Joined: Thu Jun 04, 2015 5:35 pm
Contact:

Re: Uzebox Patch Studio

Post by Artcfox »

D3thAdd3r wrote:It appears that PC_SLIDE/PC_SLIDE_SPEED do not work correctly. I could somehow hear some very slight change if they were present, but things involving slides do not sound the same as they sound on Uzebox. This is on Windows and I have not yet tried on Linux, can anyone else confirm?
Yes, I can confirm that it doesn't sound correct on Linux as well.

Edit: Though, none of the other patches sound close to the same for me.

Try each of these using TriggerFx, and then try playing them with Uzebox Patch Studio:

Code: Select all

//bass instrument - gameover melody
const char bass_gameover[] PROGMEM = {
0,	PC_WAVE,		8,
0,	PC_TREMOLO_RATE,	1,
0,	PC_TREMOLO_LEVEL,	64,
0,	PC_ENV_VOL,	52,
25,	PC_ENV_SPEED,	-1,
10,	PATCH_END,		0,
};

//bass instrument - title melody
const char bass_title[] PROGMEM = {
0,	PC_WAVE,		4,
0,	PC_TREMOLO_RATE,	222,
0,	PC_TREMOLO_LEVEL,	128,
0,	PC_ENV_VOL,		33,
4,	PC_ENV_SPEED,		-1,
2,	PC_ENV_SPEED,		-2,
0,	PC_WAVE,		8,
14,	PATCH_END,		0,
};

//lead instrument - title melody
const char lead_title[] PROGMEM = {
0,	PC_WAVE,		4,
0,	PC_TREMOLO_RATE,	222,
0,	PC_TREMOLO_LEVEL,	128,
0,	PC_ENV_VOL,		28,
4,	PC_ENV_SPEED,		-2,
0,	PC_WAVE,		8,
14,	PATCH_END,		0,
};

const char fx_shot[] PROGMEM ={//Uzepede
0,PC_WAVE,2,
0,PC_ENV_SPEED,-16,
0,PC_SLIDE_SPEED,12,
0,PC_SLIDE,-24,
8,PC_ENV_SPEED,-32,
0,PATCH_END
};

const struct PatchStruct patches[] PROGMEM = {
{0,NULL,lead_title,0,0},
{0,NULL,bass_title,0,0},
{0,NULL,bass_gameover,0,0},
{0,NULL,fx_shot,0,0},
};
User avatar
danboid
Posts: 1881
Joined: Sun Jun 14, 2020 12:14 am

Re: Uzebox Patch Studio

Post by danboid »

Thanks for creating this very useful tool for UB game dev!

It seems that it already has most of the features I'd want but it would very useful to show the valid parameter value ranges either when mousing over the parameter field or maybe at the bottom of the ups window. ups already turns the parameter field red when the user inputs an incorrect value but it would be nice to know what the valid values to enter are without having to read the source.

https://github.com/flaviozavan/uzebox-p ... o/issues/1
User avatar
danboid
Posts: 1881
Joined: Sun Jun 14, 2020 12:14 am

Re: Uzebox Patch Studio

Post by danboid »

I've not looked at the source for UPS yet but I started a discussion on the best way to turn UPS into an audio plugin on the linuxmusicians developers subforum:

https://linuxmusicians.com/viewtopic.php?t=24991

After reading both, it looks like we need to add three new features to UPS to make it usable as a standalone JACK app and as a DAW plugin:

* JACK support for audio output

* JACK MIDI input

* The ability to easily play patches at different pitches

UPS already has the ability to play multiple patches simultaneously, so when it has JACK support it can also be used as a plugin in your DAW or tracker or choice (if it supports plugins) via carla:

https://kx.studio/Applications:Carla

Someone else also suggested we try adding Uzebox soud engine support to Furnace, as I have suggested elsewhere on this forum beforehand.

If it works with JACK it will also work fine with Pipewire, the new Linux audio system.
User avatar
danboid
Posts: 1881
Joined: Sun Jun 14, 2020 12:14 am

Re: Uzebox Patch Studio

Post by danboid »

I say three features need to be added but they can be summarised by simply saying UPS needs JACK support. When it has JACK MIDI input support, you will have the ability to easily play patches at different pitches.

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

I've created a few tickets for UPS on gh but It looks like the author has abandonned the project so it'll be up to one of us to fork it and add JACK support if we want to make UB music production easier.
User avatar
danboid
Posts: 1881
Joined: Sun Jun 14, 2020 12:14 am

Re: Uzebox Patch Studio

Post by danboid »

Me: How would I need to modify the source code of Uzebox patch studio to connect to a JACK audio server?

Code: Select all

ChatGPT: To connect to a JACK audio server using the Patch Studio source code, you will need to include the JACK header files in your code and use the JACK API to establish a connection to the audio server.

Here is an example of how you might do this:

    Add the following line at the top of your source file to include the JACK header file:

#include <jack/jack.h>

    Declare a global variable to hold the JACK client:

jack_client_t *client;

    In your initialization code, use the jack_client_open function to create a new JACK client and connect to the JACK audio server:

client = jack_client_open("Patch Studio", JackNullOption, NULL);

    If the connection to the audio server was successful, you can start using the JACK API to send and receive audio data. For example, you can use the jack_activate function to start the JACK client and begin processing audio:

if (client) {
  jack_activate(client);
  // ... other code to send and receive audio data using the JACK API
}

This is just a basic example of how to connect to a JACK audio server using the Patch Studio source code. You may need to modify the code further to suit your specific needs.

I hope this helps! Let me know if you have any questions or need further assistance.
I expect its a bit more involved than it makes out but this sounds like relevant info at least.
User avatar
danboid
Posts: 1881
Joined: Sun Jun 14, 2020 12:14 am

Re: Uzebox Patch Studio

Post by danboid »

Have you looked at how much effort it would be to add JACK (audio and MIDI) support to UPS Artcfox? This would seem to be the easiest way for us to get a nice, relatively easy to use UB music composing workflow sorted. It should be portable to Windows and Mac too, theoretically. Has anyone already tried bulding UPS under Windows or MacOS?
User avatar
Artcfox
Posts: 1382
Joined: Thu Jun 04, 2015 5:35 pm
Contact:

Re: Uzebox Patch Studio

Post by Artcfox »

I have never gotten a working JACK system on Linux. I would love to get it configured and working with Rosegarden, because timidity adds so much lag that sometimes you get no output for minutes, and have to restart both timidity and rosegarden.

I haven't used UPS in a while. I don't know what happened, but it stopped sounding like it did on real hardware. Mostly I just use the cuzebox emulator these days to try out different sounds.
User avatar
danboid
Posts: 1881
Joined: Sun Jun 14, 2020 12:14 am

Re: Uzebox Patch Studio

Post by danboid »

I can help you get JACK going, I've been messing with it for years but I'm still new to C/C++ so I've not done any JACK coding. I've got JACK running under regular Debian currently well enough to do some MIDI softsynth stuff.

If you're doing serious music production and want low latency recording to work well, it makes sense to use one of the JACK optimised distros such as AV Linux where you should get better OOTB results than under regular Debian or Ubuntu. I suspect you don't need that.

Note that the Firefox and chromium builds under Debian and Ubuntu don't support JACK so you either have to do some ALSA2JACK trickery or use Pipewire, which turns everything into a JACK client when you enable its JACK replacement library.

I've still not got a physical UB to compare cuzebox or uzem to for testing the sound accuracy of UPS but surely we can just revert it to the last commit where it was close the the real deal and fork it from there.
User avatar
Artcfox
Posts: 1382
Joined: Thu Jun 04, 2015 5:35 pm
Contact:

Re: Uzebox Patch Studio

Post by Artcfox »

danboid wrote: Sat Jan 07, 2023 1:35 pm I can help you get JACK going, I've been messing with it for years but I'm still new to C/C++ so I've not done any JACK coding. I've got JACK running under regular Debian currently well enough to do some MIDI softsynth stuff.
That would be awesome! I use a Debian 11 LiveUSB, so it should be pretty easy to replicate my setup on your end. The best thing about LiveUSB images is it makes it easy to verify the steps to install and configure something. That is how I made my Rosegarden video tutorial: https://www.youtube.com/watch?v=sf4cVNM_tdo

Sometimes the sound output with timidity drops completely, and I end up composing my Uzebox soundtracks in complete silence, except when converting it into a Uzebox game and running it in the emulator.
Post Reply