electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Articles  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links  |  Store
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
Live streaming at radio.electro-music.com

  host / artist show at your time
  mosc Back on the air tonight - Twyndyllyngs
Please visit the chat
 Forum index » DIY Hardware and Software » ChucK programming language
Chuck, Jack & Linux
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [10 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
DrumAliens



Joined: Jul 10, 2008
Posts: 26
Location: UK
Audio files: 1

PostPosted: Mon Feb 01, 2010 4:46 am    Post subject: Chuck, Jack & Linux Reply with quote  Mark this post and the followings unread

I have been happily using miniAudicle in Windows but I have recently been experimenting with Linux, puredyne, which comes with ChucK already installed.

I was wondering if there was a way of running ChucK so that each shred would come through as a different input to Jack. Doing it this way would allow me to record each shred on a different channel in say Ardour I can then mix things in a bit more of a controlled manner.

Any ideas.
Back to top
View user's profile Send private message
Antimon



Joined: Jan 18, 2005
Posts: 3734
Location: Sweden
Audio files: 277
G2 patch files: 96

PostPosted: Mon Feb 01, 2010 8:26 am    Post subject: Reply with quote  Mark this post and the followings unread

I think you need to set a different (pair of) channels for each shred. I don't think Jack can set up multiple devices. You do that like this:

Code:
SinOsc left1 => dac.chan(0);
SinOsc right1 => dac.chan(1);
SinOsc left2 => dac.chan(2);
SinOsc right2 => dac.chan(3);


Not sure that's what you want...

/Stefan

_________________
Antimon's Window
@soundcloud @Flattr home - you can't explain music
Back to top
View user's profile Send private message Visit poster's website
DrumAliens



Joined: Jul 10, 2008
Posts: 26
Location: UK
Audio files: 1

PostPosted: Mon Feb 01, 2010 4:11 pm    Post subject: Reply with quote  Mark this post and the followings unread

Thanks for the suggestion Antimon. Unfortunately I could only get the script to run with the first two lines adding in the other two lines generates an error

[chuck](VM): sporking incoming shred: 1 (test.ck)...
[chuck](VM): NullPointerException: (UGen link) in shred[id=1:test.ck], PC=[40]
Back to top
View user's profile Send private message
Antimon



Joined: Jan 18, 2005
Posts: 3734
Location: Sweden
Audio files: 277
G2 patch files: 96

PostPosted: Mon Feb 01, 2010 11:50 pm    Post subject: Reply with quote  Mark this post and the followings unread

OK, so you're running on the command line now, right? You will need to start ChucK so it can use more outputs. Here is what I use with my ChucK on OSX:

Code:
chuck  --adc4 --in4 --out8


adc identifies a device that you can look up by running chuck --probe. This line will set ChucK to use 4 inputs and 8 outputs.

For me, it's been a bit tricky to locate good values for this command - if I specify 6 outputs for example the sound gets mangled. I suspect this is more due to my MOTU hardware though.

/Stefan

_________________
Antimon's Window
@soundcloud @Flattr home - you can't explain music
Back to top
View user's profile Send private message Visit poster's website
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 7678
Location: The Hague, NL
G2 patch files: 3

PostPosted: Tue Feb 02, 2010 7:38 am    Post subject: Reply with quote  Mark this post and the followings unread

Yes, it should be noted that the amount of outs and ins needs to be set at startup. If you really want to use a output per shred you could use something like;

Code:
some_ugen => dac( me.id() );


...in every shred. That will connect the shred to the dac output channel with the same number as the shred's id. This would require you to know ahead of time how many channels you will use. If you really want to you can but it doesn't sound like a very good strategy to me. I'd rather plan ahead and give all shreds a channel manually. That way you could -for example- send all drums to a single output so that would work as a "submix" even while they might be coming from different shreds.

It all depends on what you want and need. the above line sounds to me like something that's "too clever for it's own good".

_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Antimon



Joined: Jan 18, 2005
Posts: 3734
Location: Sweden
Audio files: 277
G2 patch files: 96

PostPosted: Tue Feb 02, 2010 8:52 am    Post subject: Reply with quote  Mark this post and the followings unread

Also if Jack is giving you grief you can skip the shredding and record each track by itself into Aurdour - recording the first ChucK thing into the first track, then the next ChucK thing into the next track. Kind of like you'd do with a bunch of synths being played by MIDI into a single DAW Audio input.

A bit dull, but it might work if all else fails.

/Stefan

_________________
Antimon's Window
@soundcloud @Flattr home - you can't explain music
Back to top
View user's profile Send private message Visit poster's website
DrumAliens



Joined: Jul 10, 2008
Posts: 26
Location: UK
Audio files: 1

PostPosted: Tue Feb 02, 2010 3:52 pm    Post subject: Reply with quote  Mark this post and the followings unread

Just done the --probe to see what options I/O I have

[chuck] # output channels = 2
[chuck] # input channels = 2
[chuck] # duplex channels = 2

So this is why I can't get anything beyond the 2 channels to run. So will have to resort to recording each shred separately ... or buying a decent sound card

Thanks all for help
Back to top
View user's profile Send private message
Antimon



Joined: Jan 18, 2005
Posts: 3734
Location: Sweden
Audio files: 277
G2 patch files: 96

PostPosted: Wed Feb 03, 2010 12:00 am    Post subject: Reply with quote  Mark this post and the followings unread

I haven't used Jack that much myself but shouldn't you be able to set an amount of inputs and outputs on Jack?

Googling around I foun this man page:

http://linux.die.net/man/1/jackd

where you can see for the Alsa driver that there are options called --outchannels and --inchannels.

/Stefan

_________________
Antimon's Window
@soundcloud @Flattr home - you can't explain music
Back to top
View user's profile Send private message Visit poster's website
DrumAliens



Joined: Jul 10, 2008
Posts: 26
Location: UK
Audio files: 1

PostPosted: Wed Feb 03, 2010 7:06 am    Post subject: Reply with quote  Mark this post and the followings unread

I have tried to increase the number of input and output channels in the Jack Control GUI. But it wouldn't let me apply without an error (assuming that I did it correctly). So I am guessing that have to have a physical device behind it which is capable of running the requested changes.

I will have another look
Back to top
View user's profile Send private message
Antimon



Joined: Jan 18, 2005
Posts: 3734
Location: Sweden
Audio files: 277
G2 patch files: 96

PostPosted: Wed Feb 03, 2010 7:30 am    Post subject: Reply with quote  Mark this post and the followings unread

OK.

Computers... can't live with them, can't live without em. Rolling Eyes

/Stefan

_________________
Antimon's Window
@soundcloud @Flattr home - you can't explain music
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [10 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » ChucK programming language
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
e-m mkii

Please support our site. If you click through and buy from
our affiliate partners, we earn a small commission.


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use