On Dec 31, 2013, at 10:12 AM, Alexandros Drymonitis <[email protected]> wrote:

> On Mon, Dec 30, 2013 at 11:24 PM, Dan Wilcox <[email protected]> wrote:
> Did you see this in the PD FAQ?: 
> http://puredata.info/docs/faq/how-can-i-run-pd-with-realtime-priority-in-gnu-linux
> This confuses me a bit as it slightly differs from this 
> http://jackaudio.org/linux_rt_config

Yeah, but both pages are doing the exactly same thing ...

> In the Pd FAQ it says that if /etc/security/limits.d/audio.conf exists you 
> don't need to do anything, where in the other link it says that you need to 
> create /etc/security/limits.d/99-realtime.conf and there you should write the 
> following:
> 
> @realtime  -  rtprio   99
> @realtime  -  memlock  unlimited
> 
> In the Pd FAQ, it says that if /etc/security/limits.d/audio.conf doesn't 
> exist, you should add the two lines above to /etc/security/limits.conf but 
> instead of @realtime you should write @audio
> Anyway, I've followd the jack link and supposedly I've added realtime 
> scheduling. Should I run Pd with '-rt' ?

This is just a style difference. The system will read from whichever files are 
in that folder. Putting the realtime lines into limits.conf or 99-realtime.conf 
makes no difference. 99.realtime.conf is a good idea in that it won't be 
replaced if the main limits.conf if altered on a system update. Also, the 
groupname you use is arbitrary, "audio" or "realtime" will work either way (but 
don't mix them).

There is lots of info out there but I think, perhaps, you're confusing yourself 
and/or somehow missing, conceptually, the point of all of this. I don't write 
that in a bad way as I went through the same thing when I switched to Linux. 
It's easy to start following articles and forums at first the tweak this and 
that ... but in the long run you just have to learn the *why* of what you're 
doing and not just the *how*.

Let's look at Pd + Jack. From my experience with Linux, (some of this may have 
been updated by now, but I don't think so), there are 2 low level audio APIS: 
OSS & ALSA. OSS was the original, but ALSA has the predominant interface for 
apps to connect to audio hardware. From a user point of view, it's main problem 
is that it does not do mixing of audio streams aka you can't open multiple 
audio programs and have them play sound together using only ALSA. You need 
something else to help out, enter ESD (Enlightenment Sound Daemon), Jack, & 
Pulseaudio which are simply software daemons running on the background that 
take audio streams from apps and mix them before sending the result to ALSA.

ESD & Pulseaudio are focused on the day-to-day desktop environment while Jack 
is mainly for professional audio work aka *fast, low latency audio*. This is an 
important difference. ESD & Pusleaudio are mainly just providing audio for your 
youtube video or music player, so you won't mind or notice that they buffer and 
run at a pretty long latency (say 1024 samples per buffer +, etc). A long 
latency means the cpu doesn't have to process that stream as quickly and the 
sound server (ESD/Pulse) doesn't need to run at a very high priority. Jack, on 
the other hand, is designed for *realtime* performance aka getting everything 
to process as fast as possible so you have the lowest latency possible, say a 
length of 128 or 64 samples per buffer. In order to allow Jackd to run as fast 
as possible, we have to tell the system that it should have the permissions to 
receive more resources and run faster than other apps, hence needing to unlock 
the realtime limits.

Ok, if we can now run Jackd in realtime mode, we should try and run our audio 
apps as fast as possible as well, if they support it. Why? Because, they may 
not be able to deliver the samples as quickly as Jack wants, resulting in audio 
dropouts (clicks). For Pd, there is the -rt start flags which starts Pd with 
realtime priority. Again, needing this really depends on your system, but it's 
a good idea to run Jack & Pd with -rt, in my experience. Years ago, I happily 
ran realtime audio with Jack and multitrackrecording from Pd to Ardour on a 
*single core* Pentium M with around 1.6 GHZ which was a beast compared to the 
early 2000s, but is a mouse by today's standards.

> I guess I'll have to read the manual.

Aha. Well, welcome to Linux ... :D In the future, though, it would be helpful 
if you did that before trying to get the pd-list to help you step by step 
through the process. They coudl be doing other things, like improving pd :D On 
the other hand, perhaps there is not the *right* info out there now and perhaps 
we need to have a How To Jack + Pd added to the Pd FAQ?

Also, I *really* hope you're using a GUI for Jackd like QJackCtl: 
https://en.wikipedia.org/wiki/Qjackctl 

> On Dec 30, 2013, at 3:31 PM, [email protected] wrote:
> 
>> From: Alexandros Drymonitis <[email protected]>
>> Subject: Re: [PD] Mess with Pd installation on Linux
>> Date: December 30, 2013 at 3:30:47 PM GMT+1
>> To: yvan volochine <[email protected]>
>> Cc: pd-list <[email protected]>
>> 
>> On Mon, Dec 30, 2013 at 4:12 PM, yvan volochine <[email protected]> wrote:
>> 
>> On 30/12/13 14:29, Alexandros Drymonitis wrote:
>> I've realized that I need to open pd with sudo in order to have it work
>> with jack (I also have to open jack with sudo in order to use the
>> firewire).
>> 
>> as IOhannes said, you _should not_ do that..
>> (if you do it could mean that you did not add yourself to the `audio` group, 
>> as suggested by my previous link)
>> Ok, I was opening jack with sudo before you posted the link, now I can 
>> indeed open it without sudo and it will see the firewire, no prob. So I'm 
>> also opening pd without sudo, but I get the same behaviour. Sometimes it 
>> works, sometimes it doesn't. 
>> 
>> how do you start jack? can you post here the full command?
>> jack -d firewire (I use & if I want to open pd from the same terminal 
>> window, but don't really know how to turn off jack afterwards..)
>> 
>> 
>> y
>> 
>> -- 
>> http://yvanvolochine.com
>> http://soundcloud.com/yvanvolochine
>> http://soundcloud.com/elgusanorojo
>> http://github.com/gusano
>> http://vimeo.com/yv
>> 
>> _______________________________________________
>> [email protected] mailing list
>> UNSUBSCRIBE and account-management -> 
>> http://lists.puredata.info/listinfo/pd-list
> 
> --------
> Dan Wilcox
> @danomatika
> danomatika.com
> robotcowboy.com
> 
> 
> 
> 
> 
> 

--------
Dan Wilcox
@danomatika
danomatika.com
robotcowboy.com





_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

Reply via email to