[Csnd] Csound and Jack in Linux
Date | 2009-08-27 23:15 |
From | James |
Subject | [Csnd] Csound and Jack in Linux |
I'm having trouble getting real-time playback working with Csound 5. My orchestra header is as follows: sr = 48000 kr = 4800 ksmps = 10 nchnls = 2 The error I get at runtime is: rtjack: period size (-b) must be an integer multiple of ksmps If I change -b to a multiple of 10 it tells me -B is too small. Eventually I adjust my arguments to csound -b 400 -B 1600, it runs but I get no audio. No errors in the qjack listener. It just says: 18:12:02.781 JACK connection graph change. 18:12:02.881 JACK connection change. ..presumably when the program starts and stops. Any help would be appreciated, James |
Date | 2009-08-27 23:32 |
From | victor |
Subject | [Csnd] Re: Csound and Jack in Linux |
I'd suggest you use a ksmps => power of
two, 32 or 64, then
set -b and -B to a power of two (say 128 and 256).
This should
work.
Victor
|
Date | 2009-08-27 23:32 |
From | victor |
Subject | [Csnd] Re: Csound and Jack in Linux |
Also make sure you connect Csound to the
output.
Victor
|
Date | 2009-08-29 17:15 |
From | James |
Subject | [Csnd] Re: Re: Csound and Jack in Linux |
Thanks Victor. I had to increase the buffer size to 1024 to get Csound to run. Csound produces no errors but I get no audio. It seems to be a problem with jack itself because the same thing happens with jack.play. I posted to the jack-devel list but no one has got back to me. In the meantime if I just write -odac I can play audio in realtime. As an incidental question, when I use these settings I have to omit kr becuase it gives me this error: "inconsistent sr, kr, ksmps" -+rtaudio=jack -b 128 -B 1048 -iadc -odac sr = 48000 , ksmps = 32 , nchnls = 2 What happens when I leave kr blank. Does it default to some value or does it calculate it based on sr and ksmps? What would I have to set kr to avoid the above error. James On Thu, Aug 27, 2009 at 6:32 PM, victor <Victor.Lazzarini@nuim.ie> wrote:
|
Date | 2009-08-29 17:24 |
From | victor |
Subject | [Csnd] Re: Re: Re: Csound and Jack in Linux |
When you leave kr out, it gets calculated as
sr/ksmps. I think that
is probably the best thing to do in most
cases.
|
Date | 2009-09-09 20:37 |
From | Chuckk Hubbard |
Subject | [Csnd] Re: Re: Re: Csound and Jack in Linux |
kr doesn't have to be an integer. I never set it, because I always use sr=44100 and almost always ksmps=16; sometimes I try other values, but at any rate I don't much care what kr works out to. I'm running jack with this command: jackd -R -P 70 -dalsa -P -p128 -n3 -r44100 I'm not sure how the -p and -n of jackd do or don't relate to -b or -B of Csound, but I also never set those when using Jack. Incidentally, I've added this to /etc/security/limits.conf: @audio - rtprio 100 @audio - nice -10 @audio - memlock 400000 The first line there, the rtprio one, allows me to run jackd with high priority, which is the -P 70 argument to jackd. In case you didn't know. If you don't need all that, you can leave out that argument. -Chuckk On Sat, Aug 29, 2009 at 7:15 PM, James |