New to ChucK => couple of questions (-s) (Midi Relelated);
Hey. I'm new to programming and ChucK, but im loving it. i'm very keen to learn as I like making music in weird ways :) I have just made something i call "my crappy riff generator" (spits out random patterns and loops them for 8 bars, repeats process untill i heard something i like and i break out of the random loop kinda thing and let it play longer). I am trying to get this running through Abelton to drive a softsynth. I found the MIDIsender class that someone here created (well done!!), and *can* get Chuck sending some Midi Note Ons to my softsynth .. but and bare with me because maybe i dont have some of the underlying concepts right in my head. When I try and run a ChucK file whilst abelton is open i get a "could not open channel/ cannot initialise audio device" type error.. (sorry i dont have the error specifics infront of me right now), but from what i can gather Abelton is in charge of the DAC when it tries to run a ck file and thus it whinges . To get around this i used the -s option when running my script (silences the audio) and it sort of *runs* but ChucK seems to have zero concept of time once the -s option is used. Its a mess of overlapping note ons... everything happens at once and worse. Even when i tested with a few lines of <<< insert message here >;> 1::second => now; all the messages get printed to the screen at the same time if i use the -s option. So its a catch 22 situation, i cant run my ck files whilst abelton is running without the -s option , but when i run ck files with the -s option all timing goes out the window. Awaiting answers which point to a large white elephant sitting in the room. ;) Cheers Steve NB. I dont have any midi clock setup ( i cant find how to do this in manual ) but chuck should still play notes in ableton like it does in chuck surely... _________________________________________________________________ http://newlivehotmail.com
On 7/4/07, Steve Salmon wrote: I'm new to programming and ChucK, but im loving it. i'm very keen to learn
as I like making music in weird ways :) I have just made something i call "my crappy riff generator" (spits out random patterns and loops them for 8 bars, repeats process untill i heard something i like and i break out of the random loop kinda thing and let it play longer).
Welcome! That sounds like a very nice project; a infinite amount of session musicians should eventually write a hit song ;-).
When I try and run a ChucK file whilst abelton is open i get a "could not open channel/ cannot initialise audio device" type error.. (sorry i dont have the error specifics infront of me right now), but from what i can gather Abelton is in charge of the DAC when it tries to run a ck file and thus it whinges .
This would be under Windows, I would think? Windows soundcards have the issue that there can normally only be one ASIO program (which would be Live here) and many of them can only be ASIO or DX and not both at the same time. You might get more lucky if you try to put have Live use the slower Windows Media drivers, you could try that. There was also some mention of a ASIO loopback driver here; http://electro-music.com/forum/topic-18931.html But that might be exclusive to Reaper. (I can't remember wether that link was posted to the list already but if not; there is a test-build of ChucK for ASIO thanks to Philippe, seems to work fine for everyone so far but more tests would be better) To get around this i used the -s option when running my script (silences the
audio) and it sort of *runs* but ChucK seems to have zero concept of time once the -s option is used. Its a mess of overlapping note ons... everything happens at once and worse.
Yeah, I can imagine that getting confusing. "-s" doesn't just make ChucK silent; more importantly it will make ChucK do everything as quickly as the CPU allows, it's moistly usefull for rendering wave files to disk if you don't want to wait for them or if your code won't run in real-time. It might be interesting to have a future "no sound but realtime" mode meant for translating user input to MIDI or programs like your own, but I think ChucK might depend on getting a soundcard for it's realtime behaviour..
Awaiting answers which point to a large white elephant sitting in the room.
Well, no, sorry. What you found is entirely normal for ChucK and Windows soundcards. If you have a ASIO capable soundcard I'd sugest letting LIVE use that and having ChucK use the build-in WM card (if there is one?). It would get a bit expensive to try to fix this by buying a new soundcard that could take input from several programs at the same time just for this. NB. I dont have any midi clock setup ( i cant find how to do this in manual
) but chuck should still play notes in ableton like it does in chuck surely...
Yes, sorry to disapoint you more but right now ChucK asumes all MIDI messages to be three bytes while MIDI clock is just one. We need a better interface for MIDI; one that has support for things like clock and preferably one that doesn't require one to use HEX numbers and keep the protocol's standards at hand. I think everybody agrees on this but oither issues were higher on the "todo list". Not very helpfull, I fear, but at least things should be a little more clear now? Yours, Kas.
Steve Salmon wrote:
When I try and run a ChucK file whilst abelton is open i get a "could not open channel/ cannot initialise audio device" type error..
What you'll want to do is to either (a) install a "virtual audio cable" (virtual sound device that just serves for routing audio between different software) or (b) run ChucK in --silent mode if you're not using the output at all. I use ChucK in tandem with Live and use SoundFlower (from Cycling '74) on Mac. There are several similar pieces of software for Windows and Linux. -Scott
participants (3)
-
Kassen
-
Scott Wheeler
-
Steve Salmon