Csound Csound-dev Csound-tekno Search About

[Csnd] jack

Date2011-08-14 13:34
FromGregorio Garcia Karman
Subject[Csnd] jack
Hi list,

I'm preparing a performance using csound for real time rendering (v5.13, osx). The setup is based on manually triggering a collection of scores during the performance, resulting in simultaneously instances of csound running in the context of several other applications connecting with each other using jack. It seems a bit messy but everything is working well and I am having a lot of fun setting up the system. Now I'm stuck with a question involving jack (know this has been treated in the past, but can't seem to find a good solution):

This is the way I am using to tell csound to connect to jack:

csound -+rtaudio=jack -odac:system:playback_

which works well. If I run an eight-channel orchestra, csound will connect to the first eight channels of the system's outputs (system:playback_1, system:playback_2, system:playback_3, etc). Now, this is how flags look like to connect csound's outputs to the inputs of another application:

csound -+rtaudio=jack -odac:puredata_0:input

works too, but with one inconvenience: pd's channel count is starting at 0 (pure_data_0:input0), and csound is expanding -odac string starting from 1 to: puredata_0:input1, puredata_0:input2, etc, so I'm missing the first channel. 

A similar problem arises if I want to attach csound to channels 9-16 of my playback interface (which I want!). This brings me to the question: is it possible to connect csound to another jack client with a certain channel offset or specify certain channels using -odac? I am thinking of something like this... 

csound -odac:system:playback_[9,10,11,12,13,14,15,16]


I read in previous posts that there are other alternatives to manipulate jack connections, but found no one to be as practical as it would be to be able to make the right assignments using the startup flags. Here a list of alternatives that I tried:

1. Using jack_connect in the (apple)script that I use to launch Csound:

do shell script "export PATH=$PATH:/usr/local/bin; jack_connect csound5:output1 pure_data_0:input8; jack_connect csound5:output2 pure_data_0:input9 ; jack_connect csound5:output3 pure_data_0:input10; jack_connect csound5:output4 pure_data_0:input11 ; jack_connect csound5:output5 pure_data_0:input12; jack_connect csound5:output6 pure_data_0:input13; jack_connect csound5:output7 pure_data_0:input14; jack_connect csound5:output8 pure_data_0:input15"

2. Changing the connections inside the Csound score:

system_i 1, ires system_i 1,{{
	jack_connect csound5:output1 pure_data_0:input8
	jack_connect csound5:output2 pure_data_0:input9
	etc.
}}


Alternatives 1 and 2 take some time to make the connections so the beginning of the audio rendering is cut (remember I am trigerring the scores live).

3. Using JAcko with something like:

JackoInit		"default", "csound"
JackoInfo
JackoAudioOutConnect "output1", "pure_data_0:input8" 
JackoAudioOutConnect "output2", "pure_data_0:input9" 
JackoAudioOutConnect "output3", "pure_data_0:input10" 
JackoAudioOutConnect "output4", "pure_data_0:input11" 
JackoAudioOutConnect "output5", "pure_data_0:input12" 
JackoAudioOutConnect "output6", "pure_data_0:input13" 
JackoAudioOutConnect "output7", "pure_data_0:input14"
JackoAudioOutConnect "output8", "pure_data_0:input15" 
;JackoFreewheel	1 
JackoOn

The only way I managed to get Jacko to work without segfaulting is —unlike the exampe in the documentation— avoiding setting JackoFreewheel=1 and starting csound without audio output (-n). Even then, I did not succeed in a stable setup and somehow kept crashing jack and pd once in a while (syslog 100% cpu), but can't assure I was doing everything right. Also, when audio went through I would say sound quality was suffering if compared with direct playback (not sure if related to the constraints Jacko imposes on ksmps=128 & fs=48000, which I tried to observe).

Thanks for your advice

Gregorio






Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2011-08-14 16:11
FromTarmo Johannes
SubjectRe: [Csnd] jack
Hi, 

just a quick guess, I have not tried it exactly this way:

I wonder if there is QjackCtl frontend for controlling jackd in OSX?  I guess, there is.
If you put everything running and click "Connect" and manually connect everything as you want and then go to "Patchbay" and save the configuration and then choose Setup->Options-> Connections your saved patchbay file, wouldn't it connect ewverythg automatically next time when something starts up?

Then you should not add any outputport to the csound command line, just  -+rtaudio=jack

Perhaps it helps...

+  I have not tried jacko opcodes, but it is pity it does not work - it would be the most logical solution, though. 

greetings,
tarmo

On Sunday 14 August 2011 15:34:10 Gregorio Garcia Karman wrote:
> Hi list,
> 
> I'm preparing a performance using csound for real time rendering (v5.13, osx). The setup is based on manually triggering a collection of scores during the performance, resulting in simultaneously instances of csound running in the context of several other applications connecting with each other using jack. It seems a bit messy but everything is working well and I am having a lot of fun setting up the system. Now I'm stuck with a question involving jack (know this has been treated in the past, but can't seem to find a good solution):
> 
> This is the way I am using to tell csound to connect to jack:
> 
> csound -+rtaudio=jack -odac:system:playback_
> 
> which works well. If I run an eight-channel orchestra, csound will connect to the first eight channels of the system's outputs (system:playback_1, system:playback_2, system:playback_3, etc). Now, this is how flags look like to connect csound's outputs to the inputs of another application:
> 
> csound -+rtaudio=jack -odac:puredata_0:input
> 
> works too, but with one inconvenience: pd's channel count is starting at 0 (pure_data_0:input0), and csound is expanding -odac string starting from 1 to: puredata_0:input1, puredata_0:input2, etc, so I'm missing the first channel. 
> 
> A similar problem arises if I want to attach csound to channels 9-16 of my playback interface (which I want!). This brings me to the question: is it possible to connect csound to another jack client with a certain channel offset or specify certain channels using -odac? I am thinking of something like this... 
> 
> csound -odac:system:playback_[9,10,11,12,13,14,15,16]
> 
> 
> I read in previous posts that there are other alternatives to manipulate jack connections, but found no one to be as practical as it would be to be able to make the right assignments using the startup flags. Here a list of alternatives that I tried:
> 
> 1. Using jack_connect in the (apple)script that I use to launch Csound:
> 
> do shell script "export PATH=$PATH:/usr/local/bin; jack_connect csound5:output1 pure_data_0:input8; jack_connect csound5:output2 pure_data_0:input9 ; jack_connect csound5:output3 pure_data_0:input10; jack_connect csound5:output4 pure_data_0:input11 ; jack_connect csound5:output5 pure_data_0:input12; jack_connect csound5:output6 pure_data_0:input13; jack_connect csound5:output7 pure_data_0:input14; jack_connect csound5:output8 pure_data_0:input15"
> 
> 2. Changing the connections inside the Csound score:
> 
> system_i 1, ires system_i 1,{{
> 	jack_connect csound5:output1 pure_data_0:input8
> 	jack_connect csound5:output2 pure_data_0:input9
> 	etc.
> }}
> 
> 
> Alternatives 1 and 2 take some time to make the connections so the beginning of the audio rendering is cut (remember I am trigerring the scores live).
> 
> 3. Using JAcko with something like:
> 
> JackoInit		"default", "csound"
> JackoInfo
> JackoAudioOutConnect "output1", "pure_data_0:input8" 
> JackoAudioOutConnect "output2", "pure_data_0:input9" 
> JackoAudioOutConnect "output3", "pure_data_0:input10" 
> JackoAudioOutConnect "output4", "pure_data_0:input11" 
> JackoAudioOutConnect "output5", "pure_data_0:input12" 
> JackoAudioOutConnect "output6", "pure_data_0:input13" 
> JackoAudioOutConnect "output7", "pure_data_0:input14"
> JackoAudioOutConnect "output8", "pure_data_0:input15" 
> ;JackoFreewheel	1 
> JackoOn
> 
> The only way I managed to get Jacko to work without segfaulting is —unlike the exampe in the documentation— avoiding setting JackoFreewheel=1 and starting csound without audio output (-n). Even then, I did not succeed in a stable setup and somehow kept crashing jack and pd once in a while (syslog 100% cpu), but can't assure I was doing everything right. Also, when audio went through I would say sound quality was suffering if compared with direct playback (not sure if related to the constraints Jacko imposes on ksmps=128 & fs=48000, which I tried to observe).
> 
> Thanks for your advice
> 
> Gregorio
> 
> 
> 
> 
> 
> 
> Send bugs reports to the Sourceforge bug tracker
>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
> 
> 


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2011-08-14 17:05
FromGregorio Garcia Karman
SubjectRe: [Csnd] jack
Hi Tarmo,

thanks for the idea. Yes, there is QjackCtl on OSX and I sometimes use the patchbay to make static connections as you describe. But AFAIK what QjackCtl does is basically the same as using jack_connect in the terminal (as in alternatives #1 and #2 I explained in my first e-mail). However, the problem I am bumping into is a question of (connection) timing specific to the use of csound live. Imagine that you launch on the fly different csound instances playing different scores and you want them to connect to specific client/ports (i.e. using different command lines). If you need to reconnect them manually _afterwards_ using a recall feature of QjackCtl (or even as additional lines in the startup script after the csound command) you are always going to be too late.

cheers
Gregorio 


On 14.08.2011, at 17:11, Tarmo Johannes wrote:

> Hi, 
> 
> just a quick guess, I have not tried it exactly this way:
> 
> I wonder if there is QjackCtl frontend for controlling jackd in OSX?  I guess, there is.
> If you put everything running and click "Connect" and manually connect everything as you want and then go to "Patchbay" and save the configuration and then choose Setup->Options-> Connections your saved patchbay file, wouldn't it connect ewverythg automatically next time when something starts up?
> 
> Then you should not add any outputport to the csound command line, just  -+rtaudio=jack
> 
> Perhaps it helps...
> 
> +  I have not tried jacko opcodes, but it is pity it does not work - it would be the most logical solution, though. 
> 
> greetings,
> tarmo
> 
> On Sunday 14 August 2011 15:34:10 Gregorio Garcia Karman wrote:
>> Hi list,
>> 
>> I'm preparing a performance using csound for real time rendering (v5.13, osx). The setup is based on manually triggering a collection of scores during the performance, resulting in simultaneously instances of csound running in the context of several other applications connecting with each other using jack. It seems a bit messy but everything is working well and I am having a lot of fun setting up the system. Now I'm stuck with a question involving jack (know this has been treated in the past, but can't seem to find a good solution):
>> 
>> This is the way I am using to tell csound to connect to jack:
>> 
>> csound -+rtaudio=jack -odac:system:playback_
>> 
>> which works well. If I run an eight-channel orchestra, csound will connect to the first eight channels of the system's outputs (system:playback_1, system:playback_2, system:playback_3, etc). Now, this is how flags look like to connect csound's outputs to the inputs of another application:
>> 
>> csound -+rtaudio=jack -odac:puredata_0:input
>> 
>> works too, but with one inconvenience: pd's channel count is starting at 0 (pure_data_0:input0), and csound is expanding -odac string starting from 1 to: puredata_0:input1, puredata_0:input2, etc, so I'm missing the first channel. 
>> 
>> A similar problem arises if I want to attach csound to channels 9-16 of my playback interface (which I want!). This brings me to the question: is it possible to connect csound to another jack client with a certain channel offset or specify certain channels using -odac? I am thinking of something like this... 
>> 
>> csound -odac:system:playback_[9,10,11,12,13,14,15,16]
>> 
>> 
>> I read in previous posts that there are other alternatives to manipulate jack connections, but found no one to be as practical as it would be to be able to make the right assignments using the startup flags. Here a list of alternatives that I tried:
>> 
>> 1. Using jack_connect in the (apple)script that I use to launch Csound:
>> 
>> do shell script "export PATH=$PATH:/usr/local/bin; jack_connect csound5:output1 pure_data_0:input8; jack_connect csound5:output2 pure_data_0:input9 ; jack_connect csound5:output3 pure_data_0:input10; jack_connect csound5:output4 pure_data_0:input11 ; jack_connect csound5:output5 pure_data_0:input12; jack_connect csound5:output6 pure_data_0:input13; jack_connect csound5:output7 pure_data_0:input14; jack_connect csound5:output8 pure_data_0:input15"
>> 
>> 2. Changing the connections inside the Csound score:
>> 
>> system_i 1, ires system_i 1,{{
>> 	jack_connect csound5:output1 pure_data_0:input8
>> 	jack_connect csound5:output2 pure_data_0:input9
>> 	etc.
>> }}
>> 
>> 
>> Alternatives 1 and 2 take some time to make the connections so the beginning of the audio rendering is cut (remember I am trigerring the scores live).
>> 
>> 3. Using JAcko with something like:
>> 
>> JackoInit		"default", "csound"
>> JackoInfo
>> JackoAudioOutConnect "output1", "pure_data_0:input8" 
>> JackoAudioOutConnect "output2", "pure_data_0:input9" 
>> JackoAudioOutConnect "output3", "pure_data_0:input10" 
>> JackoAudioOutConnect "output4", "pure_data_0:input11" 
>> JackoAudioOutConnect "output5", "pure_data_0:input12" 
>> JackoAudioOutConnect "output6", "pure_data_0:input13" 
>> JackoAudioOutConnect "output7", "pure_data_0:input14"
>> JackoAudioOutConnect "output8", "pure_data_0:input15" 
>> ;JackoFreewheel	1 
>> JackoOn
>> 
>> The only way I managed to get Jacko to work without segfaulting is —unlike the exampe in the documentation— avoiding setting JackoFreewheel=1 and starting csound without audio output (-n). Even then, I did not succeed in a stable setup and somehow kept crashing jack and pd once in a while (syslog 100% cpu), but can't assure I was doing everything right. Also, when audio went through I would say sound quality was suffering if compared with direct playback (not sure if related to the constraints Jacko imposes on ksmps=128 & fs=48000, which I tried to observe).
>> 
>> Thanks for your advice
>> 
>> Gregorio
>> 
>> 
>> 
>> 
>> 
>> 
>> Send bugs reports to the Sourceforge bug tracker
>>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>> 
>> 



Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2011-08-14 17:36
FromAndres Cabrera
SubjectRe: [Csnd] jack
Hi,

You could also create a silent 1 or 2 second section in your score to
give time for the connections to settle.

Cheers,
Andres

On Sun, Aug 14, 2011 at 5:05 PM, Gregorio Garcia Karman
 wrote:
> Hi Tarmo,
>
> thanks for the idea. Yes, there is QjackCtl on OSX and I sometimes use the patchbay to make static connections as you describe. But AFAIK what QjackCtl does is basically the same as using jack_connect in the terminal (as in alternatives #1 and #2 I explained in my first e-mail). However, the problem I am bumping into is a question of (connection) timing specific to the use of csound live. Imagine that you launch on the fly different csound instances playing different scores and you want them to connect to specific client/ports (i.e. using different command lines). If you need to reconnect them manually _afterwards_ using a recall feature of QjackCtl (or even as additional lines in the startup script after the csound command) you are always going to be too late.
>
> cheers
> Gregorio
>
>
> On 14.08.2011, at 17:11, Tarmo Johannes wrote:
>
>> Hi,
>>
>> just a quick guess, I have not tried it exactly this way:
>>
>> I wonder if there is QjackCtl frontend for controlling jackd in OSX?  I guess, there is.
>> If you put everything running and click "Connect" and manually connect everything as you want and then go to "Patchbay" and save the configuration and then choose Setup->Options-> Connections your saved patchbay file, wouldn't it connect ewverythg automatically next time when something starts up?
>>
>> Then you should not add any outputport to the csound command line, just  -+rtaudio=jack
>>
>> Perhaps it helps...
>>
>> +  I have not tried jacko opcodes, but it is pity it does not work - it would be the most logical solution, though.
>>
>> greetings,
>> tarmo
>>
>> On Sunday 14 August 2011 15:34:10 Gregorio Garcia Karman wrote:
>>> Hi list,
>>>
>>> I'm preparing a performance using csound for real time rendering (v5.13, osx). The setup is based on manually triggering a collection of scores during the performance, resulting in simultaneously instances of csound running in the context of several other applications connecting with each other using jack. It seems a bit messy but everything is working well and I am having a lot of fun setting up the system. Now I'm stuck with a question involving jack (know this has been treated in the past, but can't seem to find a good solution):
>>>
>>> This is the way I am using to tell csound to connect to jack:
>>>
>>> csound -+rtaudio=jack -odac:system:playback_
>>>
>>> which works well. If I run an eight-channel orchestra, csound will connect to the first eight channels of the system's outputs (system:playback_1, system:playback_2, system:playback_3, etc). Now, this is how flags look like to connect csound's outputs to the inputs of another application:
>>>
>>> csound -+rtaudio=jack -odac:puredata_0:input
>>>
>>> works too, but with one inconvenience: pd's channel count is starting at 0 (pure_data_0:input0), and csound is expanding -odac string starting from 1 to: puredata_0:input1, puredata_0:input2, etc, so I'm missing the first channel.
>>>
>>> A similar problem arises if I want to attach csound to channels 9-16 of my playback interface (which I want!). This brings me to the question: is it possible to connect csound to another jack client with a certain channel offset or specify certain channels using -odac? I am thinking of something like this...
>>>
>>> csound -odac:system:playback_[9,10,11,12,13,14,15,16]
>>>
>>>
>>> I read in previous posts that there are other alternatives to manipulate jack connections, but found no one to be as practical as it would be to be able to make the right assignments using the startup flags. Here a list of alternatives that I tried:
>>>
>>> 1. Using jack_connect in the (apple)script that I use to launch Csound:
>>>
>>> do shell script "export PATH=$PATH:/usr/local/bin; jack_connect csound5:output1 pure_data_0:input8; jack_connect csound5:output2 pure_data_0:input9 ; jack_connect csound5:output3 pure_data_0:input10; jack_connect csound5:output4 pure_data_0:input11 ; jack_connect csound5:output5 pure_data_0:input12; jack_connect csound5:output6 pure_data_0:input13; jack_connect csound5:output7 pure_data_0:input14; jack_connect csound5:output8 pure_data_0:input15"
>>>
>>> 2. Changing the connections inside the Csound score:
>>>
>>> system_i 1, ires system_i 1,{{
>>>      jack_connect csound5:output1 pure_data_0:input8
>>>      jack_connect csound5:output2 pure_data_0:input9
>>>      etc.
>>> }}
>>>
>>>
>>> Alternatives 1 and 2 take some time to make the connections so the beginning of the audio rendering is cut (remember I am trigerring the scores live).
>>>
>>> 3. Using JAcko with something like:
>>>
>>> JackoInit            "default", "csound"
>>> JackoInfo
>>> JackoAudioOutConnect "output1", "pure_data_0:input8"
>>> JackoAudioOutConnect "output2", "pure_data_0:input9"
>>> JackoAudioOutConnect "output3", "pure_data_0:input10"
>>> JackoAudioOutConnect "output4", "pure_data_0:input11"
>>> JackoAudioOutConnect "output5", "pure_data_0:input12"
>>> JackoAudioOutConnect "output6", "pure_data_0:input13"
>>> JackoAudioOutConnect "output7", "pure_data_0:input14"
>>> JackoAudioOutConnect "output8", "pure_data_0:input15"
>>> ;JackoFreewheel      1
>>> JackoOn
>>>
>>> The only way I managed to get Jacko to work without segfaulting is —unlike the exampe in the documentation— avoiding setting JackoFreewheel=1 and starting csound without audio output (-n). Even then, I did not succeed in a stable setup and somehow kept crashing jack and pd once in a while (syslog 100% cpu), but can't assure I was doing everything right. Also, when audio went through I would say sound quality was suffering if compared with direct playback (not sure if related to the constraints Jacko imposes on ksmps=128 & fs=48000, which I tried to observe).
>>>
>>> Thanks for your advice
>>>
>>> Gregorio
>>>
>>>
>>>
>>>
>>>
>>>
>>> Send bugs reports to the Sourceforge bug tracker
>>>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> Discussions of bugs and features can be posted here
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>>>
>>>
>
>
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"