(taking it back to the list)
So, just to be clear, are you actually saying that PD's audio internals *are* multi-threaded?
Of course they are! Otherwise we wouldn't need the lockfree ringbuffer :)
The only occurrences I find in (0.53.1) of pthread_create() are in d_fft_fftsg.c and d_soundfile.c. Where and how is the audio thread created? How many audio threads are there?
The audio thread is created implicitly by the audio backend. Typically, there is only a single audio callback and thus only a single "audio thread" per application.
However, an application may create additional helper threads to spread DSP computation across multiple course. This is done by most modern DAWs. Another example would be Supernova, the alternative SuperCollider server by Tim Blechmann.)
Christof
On Fri, 12 Apr 2024 at 10:58, Christof Ressi info@christofressi.com wrote:
So, just to be clear, are you actually saying that PD's audio internals *are* multi-threaded?
The audio thread is created implicitly by the audio backend. Typically, there is only a single audio callback and thus only a single "audio
thread"
per application.
So that's one. where am I getting the other three threads from? Or is this a case of "it depends on the library?" Because I can live with that, I guess. It doesn't explain the problems that I am having with JACK, but it changes the scope of my inquiry, and that is enough.
- c/&cet
On Fri, Apr 12, 2024 at 12:54 PM Caoimhe &co kumoyuki@gmail.com wrote:
On Fri, 12 Apr 2024 at 10:58, Christof Ressi info@christofressi.com wrote:
So, just to be clear, are you actually saying that PD's audio internals *are* multi-threaded?
The audio thread is created implicitly by the audio backend. Typically, there is only a single audio callback and thus only a single "audio thread" per application.
So that's one. where am I getting the other three threads from? Or is this a case of "it depends on the library?" Because I can live with that, I guess. It doesn't explain the problems that I am having with JACK, but it changes the scope of my inquiry, and that is enough.
If you're on Linux, try this:
gdb -p $(pidof pd) thread apply all bt
Thank Kjetil, that bit of gdb help gave me everything I needed.
I really don't spend enough time with gdb to consider myself fluent with it because I get paid to use something entirely different.
On a side note, if there is interest for MIDI support through JACK, I may have a useful patch in the not-too-distant-future :)
- c/&cet
On Fri, 12 Apr 2024 at 12:16, Kjetil Matheussen k.s.matheussen@gmail.com wrote:
On Fri, Apr 12, 2024 at 12:54 PM Caoimhe &co kumoyuki@gmail.com wrote:
On Fri, 12 Apr 2024 at 10:58, Christof Ressi info@christofressi.com
wrote:
So, just to be clear, are you actually saying that PD's audio internals *are* multi-threaded?
The audio thread is created implicitly by the audio backend. Typically, there is only a single audio callback and thus only a single "audio
thread"
per application.
So that's one. where am I getting the other three threads from? Or is
this a case of "it depends on the library?" Because I can live with that, I guess. It doesn't explain the problems that I am having with JACK, but it changes the scope of my inquiry, and that is enough.
If you're on Linux, try this:
gdb -p $(pidof pd) thread apply all bt
On 17.04.24 03:58, Caoimhe &co wrote:
On a side note, if there is interest for MIDI support through JACK, I may have a useful patch in the not-too-distant-future :)
Here is a feature request for that: https://github.com/pure-data/pure-data/issues/728
hey, does anybody know what is the minimum windows version for the Pd 64 bit application? Thanks
Hi, I'm revising the manual and finding many things that don't seem up to date, like notes on how Pd works in Windows 95 😅
And the manual says you can use multiple audio devices from the settings, and I'm pretty sure this is not something possible anymore, if it ever was... but then, I'm on mac, maybe you can do it in Linux or something? Hence, I ask.
Thanks
And the manual says you can use multiple audio devices from the settings,
I think that's true, and here is my quick test.
I connected a second soundcard to my laptop so I have one built-in and one USB.
In Pure Data (self-built 0.52.1 with some irrelevant local hackery), Menu -> Media -> Audio Settings... gives me the usual Audio Settings dialog (sample rate, delay, input & output soundcard dropdowns ...) and a button "Use Multiple Devices".
Clicking that button opens another dialog which looks almost the same, but the "Input Devices" and "Output Devices" sections now have multiple rows of checkboxes and dropdowns. Now I can select one soundcard for row 1, the other for row 2, assign the number of channels on each device (like in the single-soundcard settings menu)
The help on [adc~] / [dac~] explains how to use the additional channels.
Best regards, Albert.
Here's me on macOS, using 0.54-1 (downloaded not compiled). I don't have that button and don't think I've ever seen it. So, is this just not available in mac? Why?
[image: Screen Shot 2024-04-12 at 16.08.02.png]
and what is your OS Albert?
thanks
Em sex., 12 de abr. de 2024 às 16:01, Albert Rafetseder < albert.rafetseder@univie.ac.at> escreveu:
And the manual says you can use multiple audio devices from the settings,
I think that's true, and here is my quick test.
I connected a second soundcard to my laptop so I have one built-in and one USB.
In Pure Data (self-built 0.52.1 with some irrelevant local hackery), Menu -> Media -> Audio Settings... gives me the usual Audio Settings dialog (sample rate, delay, input & output soundcard dropdowns ...) and a button "Use Multiple Devices".
Clicking that button opens another dialog which looks almost the same, but the "Input Devices" and "Output Devices" sections now have multiple rows of checkboxes and dropdowns. Now I can select one soundcard for row 1, the other for row 2, assign the number of channels on each device (like in the single-soundcard settings menu)
The help on [adc~] / [dac~] explains how to use the additional channels.
Best regards, Albert.
Here's me on macOS, using 0.54-1 (downloaded not compiled). I don't have that button and don't think I've ever seen it. So, is this just not available in mac? Why?
[image: Screen Shot 2024-04-12 at 16.08.02.png]
Interesting!
and what is your OS Albert?
Sorry, forgot to say: This is a laptop running Linux (AMD 64 bit Ubuntu 22.04.4)
Ok, I suspected this could be a Linux thing. I now want to confirm if it's also possible on Windows, so I can properly document this.
And I wonder why we can't do this on mac. It would be cool and would help me a lot
Em sex., 12 de abr. de 2024 às 16:12, Albert Rafetseder < albert.rafetseder@univie.ac.at> escreveu:
Here's me on macOS, using 0.54-1 (downloaded not compiled). I don't have that button and don't think I've ever seen it. So, is this just not available in mac? Why?
[image: Screen Shot 2024-04-12 at 16.08.02.png]
Interesting!
and what is your OS Albert?
Sorry, forgot to say: This is a laptop running Linux (AMD 64 bit Ubuntu 22.04.4)
I believe it depends in a complicated way on the OS and the API.
cheers
Miller
On 4/12/24 21:59, Alexandre Torres Porres wrote:
Ok, I suspected this could be a Linux thing. I now want to confirm if it's also possible on Windows, so I can properly document this.
And I wonder why we can't do this on mac. It would be cool and would help me a lot
Em sex., 12 de abr. de 2024 às 16:12, Albert Rafetseder albert.rafetseder@univie.ac.at escreveu:
> Here's me on macOS, using 0.54-1 (downloaded not compiled). I don't > have > that button and don't think I've ever seen it. So, is this just not > available in mac? Why? > > [image: Screen Shot 2024-04-12 at 16.08.02.png] Interesting! > and what is your OS Albert? Sorry, forgot to say: This is a laptop running Linux (AMD 64 bit Ubuntu 22.04.4)
Pd-dev mailing list Pd-dev@lists.iem.at https://urldefense.com/v3/__https://lists.puredata.info/listinfo/pd-dev__;!!...
and how about windows, does this work there?
Em sex., 12 de abr. de 2024 às 18:06, Miller Puckette < mpuckette@cloud.ucsd.edu> escreveu:
I believe it depends in a complicated way on the OS and the API.
cheers
Miller
On 4/12/24 21:59, Alexandre Torres Porres wrote:
Ok, I suspected this could be a Linux thing. I now want to confirm if it's also possible on Windows, so I can properly document this.
And I wonder why we can't do this on mac. It would be cool and would help me a lot
Em sex., 12 de abr. de 2024 às 16:12, Albert Rafetseder albert.rafetseder@univie.ac.at escreveu:
> Here's me on macOS, using 0.54-1 (downloaded not compiled). I don't > have > that button and don't think I've ever seen it. So, is this just not > available in mac? Why? > > [image: Screen Shot 2024-04-12 at 16.08.02.png] Interesting! > and what is your OS Albert? Sorry, forgot to say: This is a laptop running Linux (AMD 64 bit Ubuntu 22.04.4)
Pd-dev mailing list Pd-dev@lists.iem.at
https://urldefense.com/v3/__https://lists.puredata.info/listinfo/pd-dev__;!!...
Pd-dev mailing list Pd-dev@lists.iem.at https://lists.puredata.info/listinfo/pd-dev
On 12.04.24 21:59, Alexandre Torres Porres wrote:
And I wonder why we can't do this on mac. It would be cool and would help me a lot
I think the OS can do it on Mac (over a decade ago that I've used Macs, but back then it was called "aggregate device" and you set up such meta device which is composed of multiple soundcards. It exposes then the sum of the inputs/outputs to the system).
I have no idea about the rationale not to include that function in Pd on Mac, but I assume it's better if the OS is doing it. From what I understood Apple is doing resampling anyway to compensate for clock drifts, just like pipewire does on Linux.
with an aggregate device, if I join the mac built in output and black hole, what I get with [dac~ 1 2] is that it outputs to both devices at the same time. Maybe I'm configuring something wrong... ?
but the way Pd seems to work with multiple devices is that it splits channels for devices separately
Em sex., 12 de abr. de 2024 às 18:38, Max abonnements@revolwear.com escreveu:
On 12.04.24 21:59, Alexandre Torres Porres wrote:
And I wonder why we can't do this on mac. It would be cool and would help me a lot
I think the OS can do it on Mac (over a decade ago that I've used Macs, but back then it was called "aggregate device" and you set up such meta device which is composed of multiple soundcards. It exposes then the sum of the inputs/outputs to the system).
I have no idea about the rationale not to include that function in Pd on Mac, but I assume it's better if the OS is doing it. From what I understood Apple is doing resampling anyway to compensate for clock drifts, just like pipewire does on Linux.
https://support.apple.com/en-us/102171
Pd-dev mailing list Pd-dev@lists.iem.at https://lists.puredata.info/listinfo/pd-dev
this is also for the manual, but I tink it'd be good to also mention this in the download page
Em sex., 12 de abr. de 2024 às 12:40, Alexandre Torres Porres < porres@gmail.com> escreveu:
hey, does anybody know what is the minimum windows version for the Pd 64 bit application? Thanks