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 Live music with Twyndyllyngs - Bill Fox and Howard Moscovitz
Please visit the chat
 Forum index » DIY Hardware and Software » Supercollider
Free Buffer Automatically
Post new topic   Reply to topic Moderators: v-un-v
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
fadeddata



Joined: Dec 27, 2004
Posts: 43
Location: Nashville TN

PostPosted: Sun Feb 21, 2010 8:31 pm    Post subject: Free Buffer Automatically Reply with quote  Mark this post and the followings unread

Messing about with SuperCollider again. I have a need to do some offline processing and I would like to be able to have it rendered to disk and only record a specific amount of time. I've found away to do that with a little bit of test code but I can't get the server to free the buffer after the Envelope closes. I was hoping for somekind of call back function or something but I can't seem to find anything. Here is the code:

Code:

(
SynthDef("bubbles", {
   var f, zout, env, b;
   
   b = Buffer.alloc(s, 65536, 2);

   // create an output file for this buffer, leave it open
   b.write("~/diskouttest.aiff".standardizePath, "aiff", "int16", 0, 0, true);

   
   env = Env.new([0,1,1,0], [0.1,10, 0.1],[-5,0,5]);
   f = LFSaw.kr(0.1, 0, 24, LFSaw.kr([8,7.23], 0, 3, 80)).midicps; // glissando function
   zout = CombN.ar(SinOsc.ar(f, 0, 0.04), 0.2, 0.2, 4); // echoing sine wave
   DiskOut.ar(b, EnvGen.kr(env, 1.0, doneAction: 14) * zout);
}).send(s);
)
x = Synth.new("bubbles");


The only way to free the file buffer is to kill the server.

Any ideas?

Thanks much all,
-dustin
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic Moderators: v-un-v
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 » Supercollider
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