Multiple audio inputs on Windows with Beads+JJack

503 views
Skip to first unread message

George Profenza

unread,
Mar 25, 2013, 5:36:28 PM3/25/13
to beadsp...@googlegroups.com
Hello,

I've been reading the beads+jack article:

I tried it on osx and works like a charm. Unfortunately I have to do the same on windows.
I noticed Beads svn trunk only includes jjack built for osx. 
I did find a prebuilt dll here:
But this happens on windows:
  1. The JJack mixer is isn't chosen by default (on osx I get "native jack library loaded using system library path\nopening jjack client "JJack"\n...JavaSoundAudioIO: Chosen mixer is Jjack" but on windows I only get the native library loaded message)
  2. I also get this error:
Exception in thread "Animation Thread" java.lang.UnsatisfiedLinkError: de.gulden.framework.jjack.JJackNativeClient.getSampleRate()I
at de.gulden.framework.jjack.JJackNativeClient.getSampleRate(Native Method)
at de.gulden.framework.jjack.JJackSystem.<clinit>(JJackSystem.java:144)
at beadstest.BeadsTest.setup(BeadsTest.java:33)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.core.PApplet.run(Unknown Source)


at java.lang.Thread.run(Unknown Source)
I am using eclipse by the way.
I'm not sure how to deal with the error. I assume it's because I've used jjack.jar from the beads repo (which was probably built on osx) with this jjack.dll I found
and I'm not even sure they're the same version.

I grabbed jjack from the official repo and tried to build it but ran into errors again:

I'm a n00b when it comes to c/c++ and it took me a while to setup up mingW/msys/ant
but this is getting above my comfort level.

Has anyone else managed to get beads+jjack running on windows ?
If so, how ? Can you please share jjack.dll and jjack.jar or explain how I should build them ?

Also, any other suggestions for working with multiple audio inputs in java/processing on windows ?
The end goal is to simple process a bit of audio from multiple audio inputs coming from a focusrite scarlett 2i2 card.

Thanks,
George

Neil C Smith

unread,
Mar 25, 2013, 6:19:41 PM3/25/13
to beadsp...@googlegroups.com

Hi,

Ollie may have more to say, but I'd suggest having a go with the svn version of Beads using JAudioLibs audio servers and JNAJack, mentioned on the thread you linked to. This should work fine on Windows. JJack is an old and unsupported project, and is likely to require some patching to work correctly on Windows. JNAJack is regularly tested on Windows.

Best wishes,

Neil

Neil C Smith
Artist : Technologist : Adviser
http://neilcsmith.net

--
You received this message because you are subscribed to the Google Groups "beadsproject" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beadsproject...@googlegroups.com.
To post to this group, send email to beadsp...@googlegroups.com.
Visit this group at http://groups.google.com/group/beadsproject?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Oliver Bown

unread,
Mar 25, 2013, 6:29:14 PM3/25/13
to beadsp...@googlegroups.com
Yes, this is included in an updated version of Beads

(this version is not linked from the website as the current release, it is a little newer…. yes, I was supposed to do something about that but… same old story.)

Ollie

George Profenza

unread,
Mar 27, 2013, 7:47:26 PM3/27/13
to beadsp...@googlegroups.com
Hello Neil,Ollie,

Thank you very much! 
I've downloaded the latest version of jna and all worked like a charm!

This is awesome ! ^_^

Jon King

unread,
Apr 17, 2013, 1:03:11 PM4/17/13
to beadsp...@googlegroups.com
Hello, and thanks for these great tools and informative resources,

I'm working from the same tutorial as the thread creator (https://groups.google.com/forum/?hl=en&fromgroups=#!topic/beadsproject/dSvxUM1l9S0), with largely the same goal, attempting to set up six separate audio inputs in a processing sketch.
So far I have a processing sketch which sets up the proper channels using jaudiolibs:

import beads.*;
import org.jaudiolibs.beads.*;
import org.jaudiolibs.jnajack.*;
import org.jaudiolibs.jnajack.JackClient;
import org.jaudiolibs.audioservers.AudioClient;
import org.jaudiolibs.audioservers.AudioConfiguration;
import org.jaudiolibs.audioservers.AudioServer;
import org.jaudiolibs.audioservers.jack.JackAudioServer;

AudioContext ac; 

void setup() {

  ac = new AudioContext(new AudioServerIO.Jack(), 1024, new IOAudioFormat(48000, 16, 6, 2));

println("no of inputs:  " + ac.getAudioInput().getOuts()); 
println("no of outputs: " + ac.out.getIns());
}

I'm having problems understanding how to get a processing sketch to use Beads/JNAJack and show up properly in JACK's connections. I'm thinking the process is either similar to the tutorial, with something like:

-Djjack.client.name=Processing 
-Djjack.ports.out=2 -Djjack.ports.in=6
-Djjack.ports.out.autoconnect=true 


but with a JNAJack equivalent to replace Djjack, or that JNAJack configuration being handled by Beads from the sketch now. Could it be explained how one invokes JNAJack correctly to have a sketch's inputs/outputs sent to JACK? Most tutorials and examples are in reference to JJack, and I'm not certain how much is held in common. I'm mostly just used to Processing, so I hope I'm not too far out of my league. I'd appreciate very much any light that can be shed on this for me!

Jon

George Profenza

unread,
Apr 17, 2013, 8:48:22 PM4/17/13
to beadsp...@googlegroups.com
Hi Jon,

Try this:

ac = new AudioContext(new AudioServerIO.Jack(),512,AudioContext.defaultAudioFormat(6,6));


I'va attached a screenshot of the JJack routing created


--
You received this message because you are subscribed to a topic in the Google Groups "beadsproject" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beadsproject/7W-BRJnKiQA/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to beadsproject...@googlegroups.com.
Screen Shot 2013-04-18 at 01.46.25.png
Message has been deleted

Jon King

unread,
Apr 20, 2013, 12:13:29 PM4/20/13
to beadsp...@googlegroups.com
Hi, and thanks for the reply! The processing line you've given me appears to work much in the same way as before, but there are still no Beads connections appearing in JACK when I run the sketch. I'm using pretty generic settings to try not to mess things up, but maybe something there is amiss.

Is there any java that I should be running outside of the sketch? I'm not experienced with java, but I'm assuming that I need to run JNAjack.jar in my sketch's Code folder using some command line options in order for my sketch to connect to Jack. Am I far from the mark? That's the part that I find the most difficult right now.

jacksettings.png

Neil C Smith

unread,
Apr 20, 2013, 2:34:42 PM4/20/13
to beadsp...@googlegroups.com

Hi,

Two things.

Have you downloaded JNA? JNAJack requires JNA, but if I recall correctly Ollie didn't include it in the download.

Have you tried switching the JACK samplerate to 44100? The way this audio IO is currently written it requires the buffersize and samplerate to match.

Fix those things and it should work. There is nothing else to run.

Best wishes,

Neil

Neil C Smith
Artist : Technologist : Adviser
http://neilcsmith.net

On 20 Apr 2013 17:13, "Jon King" <thec...@gmail.com> wrote:
Hi, and thanks for the reply! The processing line you've given me appears to work much in the same way as before, but there are still no Beads connections appearing in JACK when I run the sketch. I'm using pretty generic settings to try not to mess things up, but maybe something there is amiss.

Is there any java that I should be running outside of the sketch? I'm not experienced with java, but I'm assuming that I need to run JNAjack.jar in my sketch's Code folder using some command line options in order for my sketch to connect to Jack. Am I far from the mark? That's the part that I find the most difficult right now.

BustaDimes

unread,
Jul 13, 2020, 6:32:00 PM7/13/20
to beadsproject
Hey Man I am new to programming and I dont really understand the jargon. 
I was trying to use two microphones to record two audio channels in Proessing and then I was going to try doing some FFT on it.
could you please guide me and provide me with a simplified answer.
I would really appreciate any help !
Reply all
Reply to author
Forward
0 new messages