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
Apply gain envelope to SndBuf whilst playing
Post new topic   Reply to topic Moderators: Kassen
Page 1 of 1 [1 Post]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
dcjim



Joined: Nov 03, 2012
Posts: 8
Location: brooklyn

PostPosted: Sat May 09, 2015 5:29 am    Post subject: Apply gain envelope to SndBuf whilst playing Reply with quote  Mark this post and the followings unread

Hello

I'm new to ChucK so haven't entirely got my head round the whole paradigm yet!

I'm looping a sample using SndBuf, code boils down to

Code:

SndBuf buf => dac;
me.sourceDir() + "breakeditlong.wav" => buf.read;

while( true )
{
    // code calculating i and p omitted
    p => buf.pos;
    i::samp => now;
}


I want to add a gain envelope to the playback every n samples (i know when every n samples is, that's the code omitted above)

I've found the documentation/example

http://chuck.cs.princeton.edu/doc/examples/basic/envelope.ck

But I'm not sure how to apply that also it seems to suggest it's dependent on a key press. surely not?

Thanks
Jim
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 [1 Post]
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