[Jack-Devel] Is JACK suitable for this?

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

[Jack-Devel] Is JACK suitable for this?

Mechamania
Hi all,

I'm new to this list and would like to ask the people on this list for
some advise.

I'm searching for a tool to transfer hundreds of audio channels from an
existing application to some code of our own.

The existing application is SuperCollider and as I understand it
supports connections by JACK.

But is JACK suitable to connect hundreds of audio channels? We need low
latency. Will JACK be low latency? How many times are the samples
internally copied?

Is it true that all audio will be routed through some network layers?

How difficult will it be to add audio input to our own application to
receive audio from JACK?

I hope you people can help me a little bit further with these questions.

Greetings.

_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: Is JACK suitable for this?

Robin Gareus
On 9/4/19 4:42 PM, Mechamania wrote:

> Hi all,
>
> I'm new to this list and would like to ask the people on this list for
> some advise.
>
> I'm searching for a tool to transfer hundreds of audio channels from an
> existing application to some code of our own.
>
> The existing application is SuperCollider and as I understand it
> supports connections by JACK.
>
> But is JACK suitable to connect hundreds of audio channels? We need low
> latency. Will JACK be low latency?

Yes, even thousands and more. Some WFS systems use JACK.

Communication between applications happens in the same process cycle,
without any latency.

Buffersize is a runtime option and only relevant for I/O only. It is low
latency, limited only by your hardware.


> How many times are the samples internally copied?

Port-data is kept in shared-memory, that is zero-copy.

(data may be copied if you mux ports or do 1:N connections).

> Is it true that all audio will be routed through some network layers?

No. There are are however jack-clients that allow to bridge between
jack-instances over the network.

> How difficult will it be to add audio input to our own application to
> receive audio from JACK?

I found JACK to be one of the simplest audio APIs to use.

Just connect to JACK, register ports, set a process-callback method, and
you're set. Check out simple_client.c and capture_client.c at
https://github.com/jackaudio/jack2/tree/develop/example-clients

The hard part is usually setting up JACK and tweaking a system for low
latency.

Also double-check if supercollider's JACK client is up to the task. I'm
pretty sure it is, but I have no personal experience with it using
hundreds of channels. That might need some tweaks for low latency, too.

Cheers!
robin
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: Is JACK suitable for this?

Ralf Mardorf
On Wed, 4 Sep 2019 17:09:49 +0200, Robin Gareus wrote:
>The hard part is usually setting up JACK and tweaking a system for low
>latency.

Hi,

IMO setting up jack is no issue at all (assuming there are no other
sound servers installed, that could cause trouble), but I agree that
tweaking the system for lowlatency could be hard, but not necessarily
is hard to do. In my bad and good experiences it depends on luck related
to the mobo and audio device.

If you should have good luck, all you need is a vanilla kernel booted
with 'threadirqs' or a real-time patched
kernel, https://mirrors.edge.kernel.org/pub/linux/kernel/projects/rt/
and what ever kernel you run, the rtirq script,
https://github.com/rncbc/rtirq .

If you should have bad luck with the hardware, you could try a lot of
other things that might or might not improve audio latency and/or MIDI
jitter. For me migrating from AMD based hardware, to Intel based
hardware and avoiding the usage of a professional, but bad supported RME
PCIe card by an USB class compliant prosumer device was the most
successful step.

"hundreds of audio channels", at least when using Ardour, are no big
deal, even not with an energy-efficient CPU, with less horsepower.
However, I wonder what you consider to be "lowlatency" and what else
apart from the amount of audio channels might have impact on the load.
Some people expect latency way lower, than any usual digital stomp
box or 19" effect provides.

YMMV!
Ralf

--
pacman -Q linux{,-rt{-cornflower,-pussytoes,,-securityink}}|cut -d\  -f2
5.2.11.arch1-1
5.2_rt1-0
5.0.21_rt16-1
5.2.10_rt5-1
4.19.59_rt24-0
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: Is JACK suitable for this?

Mechamania
Thanks for the answers! Helps me a lot! I'm glad JACK can do this number
of channels with low latency :-)

But this remarks about 'if you have bad luck' scares me a little bit.
And I hope that setting up a real time kernel is not needed. Isn't audio
in general driven (timed) by the final target device? E.g. the audio
output of the computer?

Maybe I should explain a little what we want to do:

We want to use SuperCollider to generate hunderds of sounds. Then this
should be streamed to our game engine using JACK where there will be som
processing and mixing. The final result is 2 channel audio that should
be routed to some audio output (USB Dac for instance).

Do I need to set up my own real time kernel for this?

Suppose we use JACK for the connection to SuperCollider and to the final
audio output. Will that be easy? Is the audio timing in this case
controlled by the audio output? If not, then there need to be some audio
resampling. That will cause latency and probably distortion. So I want
to prevent that.

B.T.W., we are running on Windows 10.


Op 4-9-2019 om 18:06 schreef Ralf Mardorf:

> On Wed, 4 Sep 2019 17:09:49 +0200, Robin Gareus wrote:
>> The hard part is usually setting up JACK and tweaking a system for low
>> latency.
> Hi,
>
> IMO setting up jack is no issue at all (assuming there are no other
> sound servers installed, that could cause trouble), but I agree that
> tweaking the system for lowlatency could be hard, but not necessarily
> is hard to do. In my bad and good experiences it depends on luck related
> to the mobo and audio device.
>
> If you should have good luck, all you need is a vanilla kernel booted
> with 'threadirqs' or a real-time patched
> kernel, https://mirrors.edge.kernel.org/pub/linux/kernel/projects/rt/
> and what ever kernel you run, the rtirq script,
> https://github.com/rncbc/rtirq .
>
> If you should have bad luck with the hardware, you could try a lot of
> other things that might or might not improve audio latency and/or MIDI
> jitter. For me migrating from AMD based hardware, to Intel based
> hardware and avoiding the usage of a professional, but bad supported RME
> PCIe card by an USB class compliant prosumer device was the most
> successful step.
>
> "hundreds of audio channels", at least when using Ardour, are no big
> deal, even not with an energy-efficient CPU, with less horsepower.
> However, I wonder what you consider to be "lowlatency" and what else
> apart from the amount of audio channels might have impact on the load.
> Some people expect latency way lower, than any usual digital stomp
> box or 19" effect provides.
>
> YMMV!
> Ralf
>
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: Is JACK suitable for this?

Ralf Mardorf
On Wed, 4 Sep 2019 18:46:41 +0200, Mechamania wrote:
>Do I need to set up my own real time kernel for this?

The good news, you not necessarily need the advantage of a Linux
real-time patched kernel.

>B.T.W., we are running on Windows 10.

Ouch! The bad news, you probably need something similar for Windows 10
too, perhaps http://www.asio4all.org/:

"Changes since version 2.13

    Workaround for a bug in Windows 10 Creators Update: USB audio
    capture would not work any more (red exclamation mark, distorted
    sound, ...)"

For audio I'm only using Linux (with jack) and iOS (without jack), so I
can't comment on Windows 10, since I only run it in a VM, as guest on a
Linux host, without taking care of audio at all.
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: Is JACK suitable for this?

Kjetil Matheussen-2
On Wed, Sep 4, 2019 at 6:59 PM Ralf Mardorf <[hidden email]> wrote:
> >B.T.W., we are running on Windows 10.
>
> Ouch! The bad news, you probably need something similar for Windows 10
> too, perhaps http://www.asio4all.org/:
>

Jack works fine on windows, no need to say "bad news". Asio4all is not
necessary. Proabably a bad advice.
Jack supports ASIO, directx, wasapi, and all other driver types
supported by portaudio.
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: Is JACK suitable for this?

Ralf Mardorf
On Thu, 5 Sep 2019 12:19:02 +0200, Kjetil Matheussen wrote:
>Asio4all is not necessary. Proabably a bad advice.
>Jack supports ASIO, directx, wasapi, and all other driver types
>supported by portaudio.

My apologies,

what is usually the most likely best choice? IIRC I tested a TerraTec
24/96 and a RME HDSPe AIO with Cubase and asio4all, without using jack
on Windows 98. That time I had bad luck with my mobo, FreeBSD,
Linux and Windows didn't work optimal for audio usage. Nowadays I stay
with Linux and iOS for audio, as already pointed out, "I
can't comment on Windows 10". Pardon, if the advice to chose asio4all
is a bad advice.

Regards,
Ralf
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: ?==?utf-8?q? Is JACK suitable for this?

Ralf Mattes
 
Am Donnerstag, 05. September 2019 14:28 CEST, Ralf Mardorf <[hidden email]> schrieb:
 
>Y"I can't comment on Windows 10". Pardon, if the advice to chose asio4all
> is a bad advice.

Sometimes NO advice is actually better than anectodal advice based on your experience
with a 20 year old operating system ....

 Cheers, RalfD

> Regards,
> Ralf
> _______________________________________________
> Jack-Devel mailing list
> [hidden email]
> http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
 
 
 
--
Ralf Mattes

Hochschule für Musik Freiburg
Projektleitung HISinOne
Schwarzwaldstr. 141, D-79102 Freiburg
http://www.mh-freiburg.de
 


_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: Is JACK suitable for this?

Ralf Mardorf
On Thu, 05 Sep 2019 14:35:58 +0200, Ralf Mattes wrote:
>Am Donnerstag, 05. September, Ralf Mardorf schrieb:
>
>>"I can't comment on Windows 10". Pardon, if the advice to chose
>>asio4all is a bad advice.  
>
>Sometimes NO advice is actually better than anectodal advice based on
>your experience with a 20 year old operating system ....

Maybe a less optimal advice still is a pointer into the right direction
and better than no pointer at all.

Probably those links might help the OP:
https://docs.microsoft.com/en-us/windows-hardware/drivers/audio/low-latency-audio.
http://jackaudio.org/faq/jack_on_windows.html
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

[Jack-Devel] JACK and SuperCollider - missing outputs

Mechamania
We did give it a try and tried to connect to SuperCollider using Jack.

SuperCollider has 16 outputs but Jack only sees 4 of them!. Is there a
setting we have to change?

At the end we will need more then 100 outputs of Super Collider to be
connected to some other application. Will Jack connect each of them
separately? That would be inefficient I guess. Can Jack handle a
multichannel audio path? Like one connection with 100 channels?


Op 5-9-2019 om 16:56 schreef Ralf Mardorf:

> On Thu, 05 Sep 2019 14:35:58 +0200, Ralf Mattes wrote:
>> Am Donnerstag, 05. September, Ralf Mardorf schrieb:
>>
>>> "I can't comment on Windows 10". Pardon, if the advice to chose
>>> asio4all is a bad advice.
>> Sometimes NO advice is actually better than anectodal advice based on
>> your experience with a 20 year old operating system ....
> Maybe a less optimal advice still is a pointer into the right direction
> and better than no pointer at all.
>
> Probably those links might help the OP:
> https://docs.microsoft.com/en-us/windows-hardware/drivers/audio/low-latency-audio.
> http://jackaudio.org/faq/jack_on_windows.html
> _______________________________________________
> Jack-Devel mailing list
> [hidden email]
> http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: JACK and SuperCollider - missing outputs

Ralf Mardorf
On Thu, 12 Sep 2019 12:46:15 +0200, Mechamania wrote:
>Can Jack handle a multichannel audio path? Like one connection with
>100 channels?

Jack handles each connection on it's own.

Keep in mind that output 1 of one app could be connected to input 1 of
another app, but also to input 23 or any other input of another app.

When using QjackCtl...

https://i.imgur.com/fcN0U7r.png

...you could collapse the folder of the apps (or as shown by this
example, the folder of the hardware IOs)...

https://i.imgur.com/W8cXbLD.png

IOW you could display connections as one audio path, but you need to
plug each connection separately.

--
pacman -Q linux{,-rt{,-cornflower,-pussytoes,-securityink}}|cut -d\  -f2
5.2.13.arch1-1
5.2.10_rt5-1
5.2_rt1-0
5.0.21_rt16-1
4.19.59_rt24-0
_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Reply | Threaded
Open this post in threaded view
|

Re: JACK and SuperCollider - missing outputs

Jörg Müller
In reply to this post by Mechamania
> SuperCollider has 16 outputs but Jack only sees 4 of them!. Is there a
> setting we have to change?

Can you go to "C:\Program Files (x86)\Jack\64bits" or "C:\Program Files
(x86)\Jack\32bits" and change the "JackRouter.ini" to use a different
port number than 4? You'll need to start the text editor with elevated
(admin) rights. Hope that helps.

_______________________________________________
Jack-Devel mailing list
[hidden email]
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org