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 
go to the radio page Live at electro-music.com radio 1 Please visit the chat
poster
 Forum index » DIY Hardware and Software » ChucK programming language
drum loops in miniaudicle
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
dd182



Joined: Apr 20, 2010
Posts: 2
Location: cambridge

PostPosted: Tue Apr 20, 2010 8:45 am    Post subject: drum loops in miniaudicle
Subject description: who do i make a simple audio loop of a snare wav file
Reply with quote  Mark this post and the followings unread

can some please help me make a drum loop, how would i get a snare noise to go every second?

also is there a place to download lots of sherds???

cheers

david
Back to top
View user's profile Send private message
kurtk



Joined: Jan 27, 2010
Posts: 8
Location: usa

PostPosted: Tue Apr 20, 2010 9:40 am    Post subject: Reply with quote  Mark this post and the followings unread

Here is a simple version:

Code:

//change this next line to point to a snare sample
"path/to/snare.wav" => string filename;

SndBuf buf => dac;
filename => buf.read;
1 => buf.rate;

while( true ) {
    0 => buf.pos;
    second => now;
}


there are lots of shreds on the wiki and on this list if you poke around:
http://wiki.cs.princeton.edu/forums.html/ChucK
The other forum is another place to find code:
http://chuck.cs.princeton.edu/community/
There is also the examples directory that came with ChucK
Hope that helps.
Later.
Kurt

_________________
.............................................
http://kurtkotheimer.com
.............................................
Back to top
View user's profile Send private message Visit poster's website
dd182



Joined: Apr 20, 2010
Posts: 2
Location: cambridge

PostPosted: Tue Apr 20, 2010 10:02 am    Post subject: Reply with quote  Mark this post and the followings unread

kurtk wrote:

//change this next line to point to a snare sample
"path/to/snare.wav" => string filename;
Kurt


cheers

but i have the snare.wav file on my desktop on my mac and i cant get it to load

help Smile
Back to top
View user's profile Send private message
kurtk



Joined: Jan 27, 2010
Posts: 8
Location: usa

PostPosted: Tue Apr 20, 2010 10:07 am    Post subject: Reply with quote  Mark this post and the followings unread

You need the path to it, something like:
"Users/yourname/Desktop/snare.wav"
where yourname is the name of your home directory and snare.wav is the name of the audio file.
Later.

_________________
.............................................
http://kurtkotheimer.com
.............................................
Back to top
View user's profile Send private message Visit poster's website
kurtk



Joined: Jan 27, 2010
Posts: 8
Location: usa

PostPosted: Tue Apr 20, 2010 10:09 am    Post subject: Reply with quote  Mark this post and the followings unread

whoops...
"/Users/yourname/Desktop/snare.wav"

/Users not Users.

_________________
.............................................
http://kurtkotheimer.com
.............................................
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 [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