[Csnd] Some help about a csd performance
Date | 2011-09-13 09:47 |
From | francesco |
Subject | [Csnd] Some help about a csd performance |
Hello All, this time i need a help for a csd i'm working on. These receive many OSC messages by IanniX (a graphic sequencer). I would need to record the audio file (using fout). For some reason that i'm not able to understand (that is my fault), i cannot have a good performance (near the 3/4 time many glitches). I have try many change to the csd but with no luck. Maybe some of You can tell me what is wrong or if there are some bottleneck. Apologies, the csd is long and i'm not so able. thanks in advance for any help. ciao, francesco. (Ubuntu 10.04, Csound 5.13 doubles) http://csound.1045644.n5.nabble.com/file/n4797656/test.csd test.csd -- View this message in context: http://csound.1045644.n5.nabble.com/Some-help-about-a-csd-performance-tp4797656p4797656.html Sent from the Csound - General mailing list archive at Nabble.com. 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" |
Date | 2011-09-13 21:10 |
From | Louis Cohen |
Subject | Re: [Csnd] Some help about a csd performance |
dear Francesco, Your csd is quite long and uses many opcodes that I'm not familiar with. However, I have had a lot of experience with OSC. One important thing that I learned is that OSC messages probably arrive faster than your csd can process them. Your k-rate is 441, which is what I also use for realtime performance. Probably the OSC messages are arriving much faster than 441 messages per second. I learned that these messages are put into an internal csound buffer as they arrive, and if your csd takes them out too slowly, the sounds will be very much delayed and strange things could happen when the buffer fills up. To deal with this I wrote a UDO that I throws away all but the most recent OSC message, and then returns that message. In this way the buffer does not fill up, and the csd responds to the messages just about as fast as they arrive. Here is the UDO: opcode getosc, k,Sk ;reads OSC message, emptying input buffer Smsg,kvalue xin kcount = 0 getmore: kk OSClisten giport, Smsg, "f", kvalue if(kk>0)then kcount = kcount + 1 kgoto getmore endif xout kvalue endop Here is a typical call to the UDO: gkpitchval getosc "/wii/1/accel/pry/0", gkpitchval I hope this is useful. Lou Cohen On Sep 13, 2011, at 4:47 AM, francesco wrote: > Hello All, > this time i need a help for a csd i'm working on. These receive many > OSC > messages by IanniX > (a graphic sequencer). I would need to record the audio file (using > fout). > For some reason that i'm not able to understand (that is my fault), > i cannot > have a good performance > (near the 3/4 time many glitches). > I have try many change to the csd but with no luck. > Maybe some of You can tell me what is wrong or if there are some > bottleneck. > Apologies, the csd is long and i'm not so able. > > thanks in advance for any help. > ciao, > francesco. > > (Ubuntu 10.04, Csound 5.13 doubles) > > http://csound.1045644.n5.nabble.com/file/n4797656/test.csd test.csd > > > > -- > View this message in context: http://csound.1045644.n5.nabble.com/Some-help-about-a-csd-performance-tp4797656p4797656.html > Sent from the Csound - General mailing list archive at Nabble.com. > > > 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" |
Date | 2011-09-14 00:39 |
From | peiman khosravi |
Subject | Re: [Csnd] Some help about a csd performance |
I've had glitches with fout too. It may be worth routing the output via Jack and recording it in Ardour. Best, Peiman On 13 September 2011 09:47, francesco <ilterzouomo@fastwebnet.it> wrote: Hello All, |
Date | 2011-09-14 08:42 |
From | Tarmo Johannes |
Subject | Re: [Csnd] Some help about a csd performance |
hello, from the csd I saw that you are using portaudio as audio driver. It may but also may not work better with jack. About jack I found once and article that it is normally run with too low priority (especially if you are using realtime kernel). If you run it from command line add flag -P 80 (the default priority is 10 ... ) or -P 70 - or you can experiment what works - it may improve the performace conciderably. If you use qjackctl for starting jack, ther is no option where to set the priority, just write jackd -P 70 to "Server Path" in settings. Without fout, does it run OK? No xruns? I have had similar problems with fout with 4 channels of audio, but in the end it worked OK. ( + don't worry, the glitches will not go to your recording!) Or use another application for recording. I saw that your buffers (-b and -B ) were actually already very big. I have never understood the buffer logic thouroughly but I remember a phrase from somewhere that sometimes too large buffer is not good either. Does it make any difference if you bring it down to for example to -b 1024 -B 4096 (that is huge buffer also anyway)? tarmo With On Tuesday 13 September 2011 11:47:10 francesco wrote: > Hello All, > this time i need a help for a csd i'm working on. These receive many OSC > messages by IanniX > (a graphic sequencer). I would need to record the audio file (using fout). > For some reason that i'm not able to understand (that is my fault), i cannot > have a good performance > (near the 3/4 time many glitches). > I have try many change to the csd but with no luck. > Maybe some of You can tell me what is wrong or if there are some bottleneck. > Apologies, the csd is long and i'm not so able. > > thanks in advance for any help. > ciao, > francesco. > > (Ubuntu 10.04, Csound 5.13 doubles) > > http://csound.1045644.n5.nabble.com/file/n4797656/test.csd test.csd > > > > -- > View this message in context: http://csound.1045644.n5.nabble.com/Some-help-about-a-csd-performance-tp4797656p4797656.html > Sent from the Csound - General mailing list archive at Nabble.com. > > > 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" |
Date | 2011-09-14 11:26 |
From | francesco |
Subject | [Csnd] Re: Some help about a csd performance |
Hello All and thanks to All of You, Your words are always helpful for a lover (of music and Csound) not expert like me. To Mr. Louis: Thank You, i did not think at the OSC rate and buffer ... And i will try Your UDO that seem to be really helpful. To Mr. Peiman: Thank You. The strange thing (maybe not so strange) is that fout output file seems ok, but realtime out is not, and i guess that fout either is responsible of that. This could be secondary for my case (i could not have realtime output), but the csd is sending OSC messages also, and the sequencer is receiving that messages following realtime execution (obviously). So i have a audio file probably correct, and a video of sequencer not in sincro with recorded audio. Like You said i will try to use Ardour to record Csound output. To Mr. Tarmo: (Sorry, i read only now Your yesterday message!). i have try almost all drivers i know (portaudio, alsa, and jack, with internal or external card), with many differents b and B buffer size, and many different krate (from sr to 10 !!). Also a realtime kernel. And You were right, i did not think about this, using alsa i can use more great buffers (and more latency, that it's not my priority). About jack priority seems that i can set that in qjackctl (or am i wrong?). Anyway i'm using kxstudio on ubuntu (thanks to Mr. Menno) that have a more easy way of setting jack (via Cadence), but i will try also to use -P 90 in server path, like You said. And finally, also without fout i have glitches. This is why i think there is something wrong (a bottleneck) in my csd. An example: this loop: timout 0, 4, go reinit loop go: event_i "i", 50, 0, 2, 7.00 event_i "i", 50, 1, 2, 7.07 event_i "i", 50, 2, 2, 8.00 changed to ktrig metro 0.25 scoreline {{ i 50 0 2 7.00 i 50 1 2 7.07 i 50 2 2 8.00 }}, ktrig seems to be more efficient, but i don't know why. I will go on to explore ... (Apologies for my too much apologies and thanks, but i'm really this, and no way to change me anymore) Ciao, francesco. -- View this message in context: http://csound.1045644.n5.nabble.com/Some-help-about-a-csd-performance-tp4797656p4802248.html Sent from the Csound - General mailing list archive at Nabble.com. 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" |
Date | 2011-09-14 12:06 |
From | Dave Phillips |
Subject | Re: [Csnd] Some help about a csd performance |
Tarmo Johannes wrote: > ... > > If you use qjackctl for starting jack, ther is no option where to set the priority... That will be news to its developer. :) In the Setup dialog you'll see a scroll-box named Priority in the Parameters section. Set it as needed. Best, dp 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" |
Date | 2011-09-14 22:49 |
From | Tarmo Johannes |
Subject | Re: [Csnd] Some help about a csd performance |
> In the Setup dialog you'll see a scroll-box named Priority in the > Parameters section. Set it as needed. Oh, I was blind! so shamed, I am sorry... I was working around an open path. thanks! tarmo On Wednesday 14 September 2011 14:06:09 Dave Phillips wrote: > Tarmo Johannes wrote: > > ... > > > > If you use qjackctl for starting jack, ther is no option where to set the priority... > > That will be news to its developer. :) > > In the Setup dialog you'll see a scroll-box named Priority in the > Parameters section. Set it as needed. > > Best, > > dp > > > > 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" |