Hi
I have two questions regarding channels in pd:
this be done from commandline?
what would be the difference in performance between sending a stereo patch to stereo dac and sending ith to first two channels in a 10 channel dac?
Atte André Jensen wrote:
I have two questions regarding channels in pd:
Forgot to mention I'm running 0.40.2 under linux/debian with jack...
hi again
first set the number of channels you need with jack run pd with jack-audio make object [dac~ 1 2 3 4 5 6 7 8
it depends on your patch... more processing - more cpu :) so i belive more channels - more cpu corect me if im wrong
greets nikola
On 9/16/07, Atte André Jensen atte.jensen@gmail.com wrote:
Atte André Jensen wrote:
I have two questions regarding channels in pd:
Forgot to mention I'm running 0.40.2 under linux/debian with jack...
-- peace, love & harmony Atte
http://atte.dk | http://myspace.com/attejensen http://anagrammer.dk | http://atte.dk/compositions
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Nikola Jeremic wrote:
first set the number of channels you need with jack run pd with jack-audio make object [dac~ 1 2 3 4 5 6 7 8
That's possible. However what I'd like to do is to simply run "pd" (without -channels) and then be able to somehow *in a pd patch* select how many channels to use.
it depends on your patch... more processing - more cpu :) so i belive more channels - more cpu corect me if im wrong
I believe the same as you, but I'd like to know :-)
Howdy,
Atte André Jensen wrote:
Nikola Jeremic wrote:
first set the number of channels you need with jack run pd with jack-audio make object [dac~ 1 2 3 4 5 6 7 8
That's possible. However what I'd like to do is to simply run "pd" (without -channels) and then be able to somehow *in a pd patch* select how many channels to use.
Well, without any flags defined by the starting command or the saved settings, then PD would start with two channels (stereo) and adding more with the [adc~] or [dac~] would have no effect.
it depends on your patch... more processing - more cpu :) so i belive more channels - more cpu corect me if im wrong
I believe the same as you, but I'd like to know :-)
I can tell you for sure that extra channels add extra CPU, due to PD maintaining connections with the audio drivers. I notice this when, for example, I use my Hammefall DSP with -channels 18 instead of -channels 2 or -channels 8 or whatever. Some audio drivers are "greedier" than others, so switching between them can show you a difference in load.
Of course, you can always test these things yourself ;-)
best, d.
Derek Holzer wrote:
Well, without any flags defined by the starting command or the saved settings, then PD would start with two channels (stereo) and adding more with the [adc~] or [dac~] would have no effect.
Ok, so I need to specify on the commandline how many channels I need...
I can tell you for sure that extra channels add extra CPU, due to PD maintaining connections with the audio drivers. I notice this when, for example, I use my Hammefall DSP with -channels 18 instead of -channels 2 or -channels 8 or whatever. Some audio drivers are "greedier" than others, so switching between them can show you a difference in load.
Ok
Of course, you can always test these things yourself ;-)
Sure, 32 channels, pd idle uses 3,3%cpu, 2 channels, pd idle uses 2%. This is on my IBM T41 laptop running jack at 128/3 (latency 8,71 ms).
But I was wondering if it had any impact that would be sporadic, but it seems not. However I'll modify my startup script to start with appropriate number of channels...
Atte André Jensen wrote:
Derek Holzer wrote:
Well, without any flags defined by the starting command or the saved settings, then PD would start with two channels (stereo) and adding more with the [adc~] or [dac~] would have no effect.
Ok, so I need to specify on the commandline how many channels I need...
you can script the entire audio-settings dialog. the problem is, that you can only script the entire audio-settings dialog, and not parts of it (this is: you have to specify audio-api, inchannels, outchannels, latency, midi-stuff ,...)
if you know all these, you could just do a loadbang in your patch to create a sufficient number of channels.
fgmadsr. IOhannes
Hallo, IOhannes m zmoelnig hat gesagt: // IOhannes m zmoelnig wrote:
you can script the entire audio-settings dialog. the problem is, that you can only script the entire audio-settings dialog, and not parts of it (this is: you have to specify audio-api, inchannels, outchannels, latency, midi-stuff ,...)
Do you have a pointer to some examples for this or the specs or where to find the specs for audio dialog messages?
Frank Barknecht _ ______footils.org_ __goto10.org__
On Mon, 2007-09-17 at 16:23 +0200, Frank Barknecht wrote:
Hallo, IOhannes m zmoelnig hat gesagt: // IOhannes m zmoelnig wrote:
you can script the entire audio-settings dialog. the problem is, that you can only script the entire audio-settings dialog, and not parts of it (this is: you have to specify audio-api, inchannels, outchannels, latency, midi-stuff ,...)
Do you have a pointer to some examples for this or the specs or where to find the specs for audio dialog messages?
actually, i found nowhere documentation about this, probably also because the format of these messages will change over pd versions.
however, you can easily find out, what you need to send by eavesdroping on the 'pd channel':
[r pd] | [print]
then choose the desired settings in the menu and click 'ok'. as soon as you click ok, you'll see the message (and its format) in the pd-console.
this is the hack i use to get jack running, since '-jack' isn't working here and always having to open the menu is odd.
to finally answer atte's initial question: yes, it is possible to set the number of channels from within a pd-patch.
roman
___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
Roman Haefeli wrote:
On Mon, 2007-09-17 at 16:23 +0200, Frank Barknecht wrote:
Hallo, IOhannes m zmoelnig hat gesagt: // IOhannes m zmoelnig wrote:
you can script the entire audio-settings dialog. the problem is, that you can only script the entire audio-settings dialog, and not parts of it (this is: you have to specify audio-api, inchannels, outchannels, latency, midi-stuff ,...)
Do you have a pointer to some examples for this or the specs or where to find the specs for audio dialog messages?
actually, i found nowhere documentation about this, probably also because the format of these messages will change over pd versions.
however, you can easily find out, what you need to send by eavesdroping on the 'pd channel':
[r pd] | [print]
then choose the desired settings in the menu and click 'ok'. as soon as you click ok, you'll see the message (and its format) in the pd-console.
this is the hack i use to get jack running, since '-jack' isn't working here and always having to open the menu is odd.
to finally answer atte's initial question: yes, it is possible to set the number of channels from within a pd-patch.
roman
This is an excellent trick. PD was not defaulting to 2 channels for some reason in my machine, and setting inchannels, outchannels with "-jack" was not working here too. I've sniffed the message and am sending it to pd now and it works like a charm. Is this documented anywhere?
Batuhan
Roman Haefeli wrote:
however, you can easily find out, what you need to send by eavesdroping on the 'pd channel':
[r pd] | [print]
then choose the desired settings in the menu and click 'ok'. as soon as you click ok, you'll see the message (and its format) in the pd-console.
Nice! However I can't seem to get it working. With the above setup I get the following printed when I change channels to 10:
print: audio-dialog 0 0 0 0 10 0 0 0 0 0 0 0 2 0 0 0 44100 50
So I pasted this (without "print: " into a message-box and was expecting channels to be set to 10 when I clicked on it. However this doesn't happen. Are my expectations wrong or am I missing something?
Atte André Jensen wrote:
Roman Haefeli wrote:
however, you can easily find out, what you need to send by eavesdroping on the 'pd channel':
[r pd] | [print]
then choose the desired settings in the menu and click 'ok'. as soon as you click ok, you'll see the message (and its format) in the pd-console.
Nice! However I can't seem to get it working. With the above setup I get the following printed when I change channels to 10:
print: audio-dialog 0 0 0 0 10 0 0 0 0 0 0 0 2 0 0 0 44100 50
So I pasted this (without "print: " into a message-box and was expecting channels to be set to 10 when I clicked on it. However this doesn't happen. Are my expectations wrong or am I missing something?
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
You need to send the message to pd, therefore it should be something like: [;pd audio-dialog 0 0 0 0 10 0 0 0 0 0 0 0 2 0 0 0 44100 50(
Prepend ";pd" to the messagebox, basically. (or conencting your message box to [s pd] should also work.
Batuhan
Batuhan Bozkurt wrote:
You need to send the message to pd, therefore it should be something like: [;pd audio-dialog 0 0 0 0 10 0 0 0 0 0 0 0 2 0 0 0 44100 50(
Prepend ";pd" to the messagebox, basically. (or conencting your message box to [s pd] should also work.
Thanks, that works great!
Hey Atte,
There is more info about messages in CVSROOT/pure-data/doc/additional/
pd-msg/ that you might wanne browse through. It doesn't describe the
audio-dialog message though.
On Tue, 2007-09-18 at 08:55 +0200, Atte André Jensen wrote:
Roman Haefeli wrote:
however, you can easily find out, what you need to send by eavesdroping on the 'pd channel':
[r pd] | [print]
then choose the desired settings in the menu and click 'ok'. as soon as you click ok, you'll see the message (and its format) in the pd-console.
Nice! However I can't seem to get it working. With the above setup I get the following printed when I change channels to 10:
print: audio-dialog 0 0 0 0 10 0 0 0 0 0 0 0 2 0 0 0 44100 50
So I pasted this (without "print: " into a message-box and was expecting channels to be set to 10 when I clicked on it. However this doesn't happen. Are my expectations wrong or am I missing something?
yo, sorry, i should have mentioned it, since its not self-explanatory. you need to send it back to pd, so do either this:
[audio-dialog 0 0 0 0 10 0 0 0 0 0 0 0 2 0 0 0 44100 50( | [s pd]
or, which is exactly the same:
[; pd audio-dialog 0 0 0 0 10 0 0 0 0 0 0 0 2 0 0 0 44100 50(
YO, N.B.: you need to send the audiosetapi message before you send the audio-dialog message. audio-dialog alone won't work i think. this has the bad side effect, that the audio-settings window pops up. i didn't find a solution yet to avoid this. has someone an idea?
roman
___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
Hallo, Roman Haefeli hat gesagt: // Roman Haefeli wrote:
this is the hack i use to get jack running, since '-jack' isn't working here and always having to open the menu is odd.
Actually during pd~convention 2 I heard about a trick (from IOhannes or Matju?) to work around this bug: You also need to specify the number of channels, Pd should use. Then Pd will automatically connect and work even from the command line:
$ pd -jack -channels 2
or
$ pd -jack -inchannels 2 -outchannels 6
both work as expected (tested with pd-0.40).
Frank Barknecht _ ______footils.org_ __goto10.org__
On Tue, 2007-09-18 at 12:33 +0200, Frank Barknecht wrote:
Hallo, Roman Haefeli hat gesagt: // Roman Haefeli wrote:
this is the hack i use to get jack running, since '-jack' isn't working here and always having to open the menu is odd.
Actually during pd~convention 2 I heard about a trick (from IOhannes or Matju?) to work around this bug: You also need to specify the number of channels, Pd should use. Then Pd will automatically connect and work even from the command line:
$ pd -jack -channels 2
or
$ pd -jack -inchannels 2 -outchannels 6
both work as expected (tested with pd-0.40).
hey frank
thanks a lot for bringing this up here. i am glad to hear that and also that it is not a longterm bug, but just an issue of how using it. works perfectly!
i even found a solution, that works from the commandline:
-send "pd audio-setapi 5"
-send "pd midi-setapi 1"
-send "pd audio-dialog 0 0 0 0 8 0 0 0 0 0 0 0 8 0 0 0 44100 50"
-send "pd midi-dialog 1 0 0 0 1 0 0 0 1 1"
though, i am very happy, that i don't need to use these lines anymore.
roman
___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de