Hi I've made a working version of the midi setup I've been rambling about. Now that I make som reak music with the setup I've made a few new observations. Most problematic is the fact that chuck often (well not often, but sometimes) click and pops, esp at noteons, but also other places. I guess I have to see if I can reduce the code run at noteon time, right? But besides that is there any general approaches for making chuck run more smoothly? Just as anoying is the fact that if I punish chuck with too many notes she breaks up the audio. That's just the way it is and I can live with that. But the problem is that after such an incident timing seems to be very sloppy. I could post some examples if someone care to look at them. I'm sure my code can be optimized quite a bit. But I guess the above is still valid since optimized code will behave similar if pressed hard enough. As a final remark at least the following code is totally un-elegant (I have a feeling Chorus is not the cheapest UGen around), but I can't figure out how to envelopes on a stereo signal (and Chorus is mono anyways, or?): sinosc s1 => ADSR env => pan2 pan; sinosc s2 => Chorus chor_l => ADSR env_l => pan.left; sinosc s3 => Chorus chor_r => ADSR env_r => pan.right; pan => dac NB: Still under linux/debian/unstable with realtime kernel from demudi. NB2: With csound I was able to enhance performance by running in a virtual terminal without X. But with chuck, that doesn't semm to make much difference. Neither does running as root. Neither does running with nice -19 and killing a few daemons.... -- peace, love & harmony Atte http://www.atte.dk
Hi Atte!
I've made a working version of the midi setup I've been rambling about.
Cool. Yes, sorry about the performance issues, I believe them to be due to the currently unoptimized implementation, though there are tweaks in the chuck code that can make a big difference.
Most problematic is the fact that chuck often (well not often, but sometimes) click and pops, esp at noteons, but also other places. I guess I have to see if I can reduce the code run at noteon time, right? But besides that is there any general approaches for making chuck run more smoothly?
There may be, it depends on what the program is doing. If you like, I am interested in looking at the program and see if/how we can tweak things and perhaps improve a few things in the chuck implementation at the same time. Also, the stability varies from platform to platform. On linux, for example, we've disabled automatic scheduling/policy boosts (even when running as root), which might make a big difference especially in midi input.
I could post some examples if someone care to look at them.
Please do. Thanks!
(I have a feeling Chorus is not the cheapest UGen around), but I can't figure out how to envelopes on a stereo signal (and Chorus is mono anyways, or?):
You are right - Chorus is implemented in stereo but so far only exposed as a mono ugen in chuck. (doh) This is now on the bug list. Sorry for the massive dose of hoops and issues chuck is providing. Thanks a ton for your thoughts/feedback. We will continue to do our best to make things better. Best, Ge!
Ge Wang wrote:
Cool. Yes, sorry about the performance issues, I believe them to be due to the currently unoptimized implementation, though there are tweaks in the chuck code that can make a big difference.
I hope :-)
If you like, I am interested in looking at the program and see if/how we can tweak things and perhaps improve a few things in the chuck implementation at the same time.
That would be nice. I but it here: http://www.atte.dk/midi.tgz
Also, the stability varies from platform to platform. On linux, for example, we've disabled automatic scheduling/policy boosts (even when running as root), which might make a big difference especially in midi input.
So the linux version is performing worse than the others?
You are right - Chorus is implemented in stereo but so far only exposed as a mono ugen in chuck.
Hmmm, that doesn't sound too clever :-) -- peace, love & harmony Atte http://www.atte.dk
I would like to wire up some inputs into chuck based on information I've scraped from (for examples) a weather website, a share trading website and a "new mail" notification tool. I'd like to trigger musical sounds based on incoming information. There doesn't seem to be an obvious way to do this. I don't know enough about chuck to know whether it's bootstrapped onto another language and could gain access to its libraries, or what other ways there might be to skin the cat. I guess I could try generating chuck code from another language which does have i/o libraries. Does anyone here have an opinion? Cheers, -T
Hi, I would suggest using std.system. This will allow you to use your shell. std.system("ls"); This will do ls in the directory you launched ChucK from. You could do what you want by setting up curl or wget and using a shell script to parse the text and get what you want. The problem is getting the info into ChucK. The system() command will give you the return code of the system call. You may have to use something else to grab the data and send it into ChucK via OSC or MIDI. Right now ChucK's abilities at dealing with strings is very limited. I don't know of a way of reading a text file into ChucK. If you could do that then you could run your shell scripts and output the data to a file that you kept reading in ChucK periodically. That is about all that comes to mind. I hope it helps. --art On 29-Nov-05, at 3:29 PM, Tennessee Leeuwenburg wrote:
I would like to wire up some inputs into chuck based on information I've scraped from (for examples) a weather website, a share trading website and a "new mail" notification tool. I'd like to trigger musical sounds based on incoming information.
There doesn't seem to be an obvious way to do this. I don't know enough about chuck to know whether it's bootstrapped onto another language and could gain access to its libraries, or what other ways there might be to skin the cat. I guess I could try generating chuck code from another language which does have i/o libraries.
Does anyone here have an opinion?
Cheers, -T _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
Hi Atte,
That would be nice. I put it here: http://www.atte.dk/midi.tgz
Got it, thanks!
Also, the stability varies from platform to platform. On linux, for example, we've disabled automatic scheduling/policy boosts (even when running as root), which might make a big difference especially in midi input.
So the linux version is performing worse than the others?
It is likely in some scenarios. Now may be a good time to run some experiments to improve performance under linux. We will make some modifications and perhaps we can test them out together, if you like.
You are right - Chorus is implemented in stereo but so far only exposed as a mono ugen in chuck.
Hmmm, that doesn't sound too clever :-)
"No? But it seemed like a good idea at the time!" Alrighty, we will fix this soon. (though there is something very chuckian in doing redundant work and shooting one's self in the foot) Best, Ge!
(though there is something very chuckian in doing redundant work and shooting one's self in the foot)
best place might be foot for chuck-bullet to find root and there yield bug fruit Sorry, I know Haiku's probably shouldn't rhyme, or have much meter, but I'm waxing multi-modally poetic tonight. PRC
Ge Wang wrote:
It is likely in some scenarios. Now may be a good time to run some experiments to improve performance under linux. We will make some modifications and perhaps we can test them out together, if you like.
Me like :-) -- peace, love & harmony Atte http://www.atte.dk
Ge Wang wrote:
Alrighty, we will fix this soon. (though there is something very chuckian in doing redundant work and shooting one's self in the foot)
Why not go all the way and do like csound: shoot yourself in the head. It's much faster (both csound and shooting yourself in the head)? :-) -- peace, love & harmony Atte http://www.atte.dk
Alrighty, we will fix this soon. (though there is something very chuckian in doing redundant work and shooting one's self in the foot)
Why not go all the way and do like csound: shoot yourself in the head. It's much faster (both csound and shooting yourself in the head)? :-)
No no, chuck is ultimately concerned only with foot-shooting, head-shooting is optional and is to be user-defined. Thanks. Ge!
One definition of Object Oriented Programming is that you make a Foot class, create many instances of it, shoot yourself in one of those, and bleed to death trying to figure out which instance you shot. PRC On Wed, 30 Nov 2005, Ge Wang wrote:
Alrighty, we will fix this soon. (though there is something very chuckian in doing redundant work and shooting one's self in the foot)
Why not go all the way and do like csound: shoot yourself in the head. It's much faster (both csound and shooting yourself in the head)? :-)
No no, chuck is ultimately concerned only with foot-shooting, head-shooting is optional and is to be user-defined. Thanks.
Ge! _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
participants (5)
-
Adam Tindale
-
Atte André Jensen
-
Ge Wang
-
Perry R Cook
-
Tennessee Leeuwenburg