electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
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 
 Forum index » DIY Hardware and Software » ChucK programming language
How to load multiple sndbuf
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [5 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
disablek



Joined: May 11, 2007
Posts: 10
Location: disablekville

PostPosted: Fri May 11, 2007 9:39 pm    Post subject: How to load multiple sndbuf Reply with quote  Mark this post and the followings unread

First post!

I've been trying out chuck and in the examples for sndbuf, a fully qualified pathname is required to read in a sound file. Is that supposed to be the case?

I've also got this idea for storing a bunch of files in various folders, based on some kind of group similarity and having chuck randomly pick one to play. But i can't seem to find any native file handling/string handling capability with chuck. Is there any way around it?

The only other way i can think of, is to use perl or bash and randomly feed this to chuck. But this kind of sucks because if you want to attach a midi controller to alter parameters, this won't work because there's no way to marshal all sounds to go through one chuck program.

Any thoughts????
Back to top
View user's profile Send private message
kijjaz



Joined: Sep 20, 2004
Posts: 765
Location: bangkok, thailand
Audio files: 4

PostPosted: Sat May 12, 2007 2:28 pm    Post subject: Reply with quote  Mark this post and the followings unread

Actually, full path will definitely work well,
but it's not very flexible, so here i go:

The file name you're gonna refer to is based on the 'Current Directory'
mainly, it's the place you're at when running ChucK or miniAudicle or Audicle..

for example, (on Windows)
let's say, i'm at
F:\kijjaz\music\chuck
and the sound file is in
F:\kijjaz\music\sample

I can just refer to the file name by using "..\sample\the-file-name"
so it might be easy if you can start the executable where you're working..
and put the .ck file and all the sound file not for from where you work.

for example i'm in
F:\kijjaz\music\chuck

i might wanna put in some drum samples in
F:\kijjaz\music\chuck\samples\drum

and i can refer to the file by
"samples\drum\the-file-name"

i'll come to talk to you more, take care and have fun chuckin! ..
(i'm a newbie, still hahah)
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
spencer



Joined: Aug 16, 2006
Posts: 53
Location: northern california

PostPosted: Mon May 21, 2007 2:05 am    Post subject: Reply with quote  Mark this post and the followings unread

Hey,
yeah, to reinforce what kijjaz said, be sure that you "cd" to the correct directory before running chuck or Audicle. If you are using miniAudicle, you can head to the "Preferences" menu and then change the "current directory" (under the miscellaneous tab) to whatever that needs to be.

Also, ChucK does support string concatenation with the "+" operator. E.g.
Code:
<<< "a" + "b" >>>;
prints out "ab". So that might be sufficient to implement your idea.

spencer
Back to top
View user's profile Send private message
disablek



Joined: May 11, 2007
Posts: 10
Location: disablekville

PostPosted: Mon May 21, 2007 7:44 am    Post subject: Reply with quote  Mark this post and the followings unread

Hey great!

I didn't notice that as an example in the chuck documentation.
Back to top
View user's profile Send private message
spencer



Joined: Aug 16, 2006
Posts: 53
Location: northern california

PostPosted: Mon May 21, 2007 10:32 am    Post subject: Reply with quote  Mark this post and the followings unread

yeah, its a new feature in the most recent release, and unfortunately its really only documented in the examples/ directory of whatever ChucK download package you have.

spencer
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [5 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


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