Beatrix

What other apps and distros do you use to round out your studio?

Moderators: MattKingUSA, khz

studio32

Beatrix

Post by studio32 »

Hi,

Can anyone tells me how I get Beatrix to work? Raboof?

edit: found some info about jackification

Jackification
http://rg42.org/wiki/beatrix

It would not to complicated to wrap beatrix into a jack-audio and alsa-sequencer application without changing any of beatrix' original source!

You would need to add jack-audio client code and wrap the midi-I/O into alsa much like beatrix-v041-jack7g.diff - I also suggest to compile beatrix with the -O3 option (in Makefile) and replace the usage documentation to include the [-R <sample-rate>] optional command line argument (in main.c).

After this small exercise, one would find that some internal buffer-sizes and hardcoded optimizations in beatrix yield to unwanted audio-effects when running at samplerates other than 22050. There are two proposed workarounds: re-sample or change pitch!
With jack at 22050Hz and multiples thereof (eg. 44.1kHz) there are no problems. Running at 48k SPS would need either of those fixes:

Code: Select all

./beatrix osc.tuning=404.249986  # internal seq at 22050, tune corrected.
 # 404.25 = 440 Hz / 24000 * 22050
 # internal pitch corrected from 22050 to 24k (*2 to JACK - 48kHz)

Code: Select all

./beatrix -R 24001 osc.tuning=440.018333 # internal seq upsampled x2
 #(-R 24000 would be correct, but collides with beatrix internals)

Code: Select all

./beatrix -R 48001 osc.tuning=440.009179 # natively synth at 48k
 # Beware: Beatrix ties the effects to sample-buffer size.
 # Using large sample-rates, it is possible to configure
 # long reverb and whirl-effect, which may cause internal buffer
 # overflows. 
see also http://www.restivo.org/blog/archives/be ... -the-house

jack midi patch

Code: Select all

diff --git a/main.c b/main.c
index 9232a62..3263c2d 100644
--- a/main.c
+++ b/main.c
@@ -604,0 +605,2 @@
+  chdir(dirname(strdup(argv[0])));
+
diff --git a/midi.c b/midi.c
index a9393cb..6645d38 100644
--- a/midi.c
+++ b/midi.c
@@ -1096,0 +1097,2 @@
+  snprintf(seq_name,32,"beatrix");
+
Last edited by studio32 on Tue Dec 29, 2009 4:14 pm, edited 3 times in total.
User avatar
raboof
Established Member
Posts: 1855
Joined: Tue Apr 08, 2008 11:58 am
Location: Deventer, NL
Has thanked: 48 times
Been thanked: 74 times
Contact:

Re: Beatrix

Post by raboof »

It's been a real long time since I used this - I guess you already saw http://arnout.engelen.eu/index.php/Beatrix - not sure if I ever got it to work with reasonable latencies.
studio32

Re: Beatrix

Post by studio32 »

mmh ya there is an discussion on LAU about it... would be nice to have it GPL...

I got

Code: Select all

/dev/midi00: No such file or directory
User avatar
raboof
Established Member
Posts: 1855
Joined: Tue Apr 08, 2008 11:58 am
Location: Deventer, NL
Has thanked: 48 times
Been thanked: 74 times
Contact:

Re: Beatrix

Post by raboof »

Hmm, one 'JP Mercury' mentions he patched Beatrix to work with Jack, might be nice to try and get hold of that patch.
User avatar
raboof
Established Member
Posts: 1855
Joined: Tue Apr 08, 2008 11:58 am
Location: Deventer, NL
Has thanked: 48 times
Been thanked: 74 times
Contact:

Re: Beatrix

Post by raboof »

I updated http://arnout.engelen.eu/index.php/Beatrix to document how to make it play nice with ALSA MIDI: basically you just load snd_virmidi and point Beatrix to the right midi device.
studio32

Re: Beatrix

Post by studio32 »

I have it working now with my usb keyboard, but how do I change instruments?
User avatar
raboof
Established Member
Posts: 1855
Joined: Tue Apr 08, 2008 11:58 am
Location: Deventer, NL
Has thanked: 48 times
Been thanked: 74 times
Contact:

Re: Beatrix

Post by raboof »

studio32 wrote:I have it working now with my usb keyboard, but how do I change instruments?
By sending the 'program change' events documented in the console when starting Beatrix. To switch easily using vkeybd, check http://arnout.engelen.eu/index.php/Vkey ... or_Beatrix

I wonder what would be a good technology for quickly whipping together MIDI interfaces like this one. Perhaps as a Pd patch?
studio32

Re: Beatrix

Post by studio32 »

Nice I can use vkeybd for instrument change and play it on my usb keyboard.

The only problem right now, I can't open qjacktl along with beatrix.... only alsaconnect... :(
User avatar
raboof
Established Member
Posts: 1855
Joined: Tue Apr 08, 2008 11:58 am
Location: Deventer, NL
Has thanked: 48 times
Been thanked: 74 times
Contact:

Re: Beatrix

Post by raboof »

studio32 wrote:The only problem right now, I can't open qjacktl along with beatrix.... only alsaconnect... :(
Could you be a bit more specific?
studio32

Re: Beatrix

Post by studio32 »

Code: Select all

/dev/dsp: Device or resource busy
that's when I start qjackctl and after that ./beatrix

don't have that problem with alsaconnect
thorgal
Established Member
Posts: 739
Joined: Mon Apr 07, 2008 6:04 pm

Re: Beatrix

Post by thorgal »

studio32, I am working on a patch to the kernel module kfusd.
What is it for ?
kfusd can simulate device nodes and is used by oss2jack which creates a jack client with some fake /dev/dsp

last time I used it was with kernel 2.6.24 and it is completely broken with the newer kernel (2.6.29 for sure). Some internal kernel API has changed. I have a patch to kfusd, it compiles and loads fine against kernel 2.6.29.x. oss2jack now starts OK, is showing up in the jack graph and creates /dev/dsp and /dev/mixer

However, playback is sort of frozen when I try to use an app using /dev/dsp. So I need to look into this a bit more. I will tell the community when I have a working patch. It should not take too long.
Not that oss2jack is really useful for me but I see it can be useful for some situations like yours. It will also help people with skype, flash plugin, etc.
studio32

Re: Beatrix

Post by studio32 »

That's great! I hope its ready soon :)
thorgal
Established Member
Posts: 739
Joined: Mon Apr 07, 2008 6:04 pm

Re: Beatrix

Post by thorgal »

I got it to work.
It was not working because I am usually using jack2. That's not something new that oss2jack is not jack2 compatible, but it works fine with jack1.

I will publish the patch somewhere so ppl can check it. I tried oss2jack at low lat and it works cool :)
good ol' /dev/dsp is back baby :lol:
studio32

Re: Beatrix

Post by studio32 »

ah neat... link link link ?
thorgal
Established Member
Posts: 739
Joined: Mon Apr 07, 2008 6:04 pm

Re: Beatrix

Post by thorgal »

first, I'd like to try this beatrix. Is it coming with a GUI or only command line ?

EDIT: I am busy testing some netjack stuff for Torben H (netjack1 guy) and I have to cook diner. I'll be back.
Post Reply