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
Keeping different looped parts in sync
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [9 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
widdly



Joined: Jun 25, 2007
Posts: 268
Location: singapore
G2 patch files: 2

PostPosted: Thu Apr 10, 2008 12:11 am    Post subject: Keeping different looped parts in sync Reply with quote  Mark this post and the followings unread

Hi, I'm wondering how people go about playing/editing different parts and keeping them synced. "Replace Shred" is no good because it just starts anywhere.

I've worked out a system using machine.add and different files. This way I can edit each file and when I save the next loop will play the new file. I don't think this is a good system because of all the disk file reading going on, especially for small loops.

Is there some way of using events to do this?

Here's an example of my method. Load the loop.ck and it will do the rest. You can edit the other files independently.


loop.ck
 Description:

Download
 Filename:  loop.ck
 Filesize:  110 Bytes
 Downloaded:  198 Time(s)


kick.ck
 Description:

Download
 Filename:  kick.ck
 Filesize:  611 Bytes
 Downloaded:  195 Time(s)


hihi.ck
 Description:

Download
 Filename:  hihi.ck
 Filesize:  555 Bytes
 Downloaded:  164 Time(s)


drum_mach.ck
 Description:

Download
 Filename:  drum_mach.ck
 Filesize:  1.28 KB
 Downloaded:  211 Time(s)


snare.ck
 Description:

Download
 Filename:  snare.ck
 Filesize:  694 Bytes
 Downloaded:  195 Time(s)


Last edited by widdly on Thu Aug 05, 2010 10:15 pm; edited 1 time in total
Back to top
View user's profile Send private message
widdly



Joined: Jun 25, 2007
Posts: 268
Location: singapore
G2 patch files: 2

PostPosted: Thu Apr 10, 2008 12:11 am    Post subject: Reply with quote  Mark this post and the followings unread

..oops forgot one


cow.ck
 Description:

Download
 Filename:  cow.ck
 Filesize:  814 Bytes
 Downloaded:  181 Time(s)


Last edited by widdly on Thu Aug 05, 2010 10:15 pm; edited 1 time in total
Back to top
View user's profile Send private message
Kassen
Janitor
Janitor


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

PostPosted: Thu Apr 10, 2008 12:15 am    Post subject: Re: Keeping different looped parts in sync Reply with quote  Mark this post and the followings unread

widdly wrote:
Hi, I'm wondering how people go about playing/editing different parts and keeping them synced. "Replace Shred" is no good because it just starts anywhere.


Hi, Widdly!

Have a look at the "otf" examples in the /examples/ dir, there are 6 of those that can be run together, started at any moment and they'll sync up in a really cleaver way, check it out.

(hint, the percentage (%) sign refers to "modulo")

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



Joined: Jun 25, 2007
Posts: 268
Location: singapore
G2 patch files: 2

PostPosted: Thu Apr 10, 2008 2:07 am    Post subject: Reply with quote  Mark this post and the followings unread

ha!
Smart. thanks for that. Makes things much easier.

Last edited by widdly on Thu Aug 05, 2010 10:15 pm; edited 1 time in total
Back to top
View user's profile Send private message
widdly



Joined: Jun 25, 2007
Posts: 268
Location: singapore
G2 patch files: 2

PostPosted: Thu Apr 10, 2008 3:12 am    Post subject: Reply with quote  Mark this post and the followings unread

Any tricks for removing shreds in sync?

I'm thinking you could write a file that takes a shred id as an argument then removes the shred using the modulo time trick.

if ( me.args() == 1)
{
me.arg(0)=>string text;
Std.atoi(text) => int shred_id;

.5::second => dur beat;
8::beat => dur bar;
bar - (now % bar) => now;

Machine.remove( shred_id );
}

Last edited by widdly on Thu Aug 05, 2010 10:15 pm; edited 1 time in total
Back to top
View user's profile Send private message
radarsat1



Joined: Mar 14, 2008
Posts: 85
Location: Montreal

PostPosted: Fri Apr 11, 2008 9:55 am    Post subject: Reply with quote  Mark this post and the followings unread

for keeping in sync i usually have a common clock based on broadcast events. each of my loops waits for a clock signal with a certain modulo before starting.

for removing i just try to time it by ear, or turn down the volume on that shred first.
Back to top
View user's profile Send private message
widdly



Joined: Jun 25, 2007
Posts: 268
Location: singapore
G2 patch files: 2

PostPosted: Fri Apr 11, 2008 8:17 pm    Post subject: Reply with quote  Mark this post and the followings unread

How do you turn down the volume on an individual shred?
Last edited by widdly on Thu Aug 05, 2010 10:15 pm; edited 1 time in total
Back to top
View user's profile Send private message
Kassen
Janitor
Janitor


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

PostPosted: Sat Apr 12, 2008 5:03 am    Post subject: Reply with quote  Mark this post and the followings unread

Code:
Gain master_fader => dac;

stuff => master_fader;
more_stuff => master_fader => dac;

.5 => master_fader.gain;


Where "stuff" refers to the Ugens you are using.

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



Joined: Mar 14, 2008
Posts: 85
Location: Montreal

PostPosted: Sat Apr 12, 2008 9:05 am    Post subject: Reply with quote  Mark this post and the followings unread

exactly. in other words, you just program the shred so you can turn it down. i do a lot of my chuck control over OSC and MIDI, so "turning down the volume" amounts to turning a physical knob to the left.
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 [9 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