From sc-users-owner@bga.com Fri Aug 16 02:14:56 1996 Received: (from daemon@localhost) by zoom.bga.com (8.6.12/8.6.12) id CAA05322 for sc-users-outgoing; Fri, 16 Aug 1996 02:14:56 -0500 Received: from berlin.shuttle.de (berlin.shuttle.de [194.95.246.252]) by zoom.bga.com (8.6.12/8.6.12) with ESMTP id CAA05308 for ; Fri, 16 Aug 1996 02:14:49 -0500 Received: from 194.95.246.124 (p124.b.shuttle.de [194.95.246.124]) by berlin.shuttle.de (8.7.1/8.7.1) with SMTP id JAA08072; Fri, 16 Aug 1996 09:14:14 +0200 (MET DST) Message-ID: <32142093.77AB@musik.b.shuttle.de> Date: Fri, 16 Aug 1996 09:17:39 +0200 From: Staatliches Institut fuer Musikforschung PK <---@---.---> Organization: SIM - Berlin X-Mailer: Mozilla 2.01 (Macintosh; I; 68K) MIME-Version: 1.0 To: sc-users@bga.com CC: iani@musik.b.shuttle.de Subject: Recording into Audio Buffer in SC Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-sc-users@bga.com Precedence: bulk Reply-To: sc-users@bga.com How does one stop recording into an audiobuffer that started by running a function created by recorder = Arecord(thebuf, `dspRemove); --- and then executed by: recorder.value(Lin); ??? This is essential for controlling start and stop time when trying to record in real time from audio in. Note: since dspRemove takes no arguments there seems to be no way of removing a function from the DSP queue other than executing the dspRemove call from whithin the frame of the executing function itself. This however is not possible in the case of Arecord, since unlike envelope generators or such, it takes no duration argument. (A while ago there was a discussion about in(Lin) yet it is not clear what kind of buffers are used for it. Furthermore it is not clear from the documentation what size an AudioBuffer has at creation time, and if that size is dynamic. ) Thanks in advance, if anybody can help me realize an elementary real-time sampler with Super Collider by solving the above problem. Ioannis Zannos Staatliches Institut fuer Musikforschung Tiergartenstr. 1, D-10785 Berlin, Germany fax: +49 30 25481 172 From sc-users-owner@bga.com Sat Aug 17 16:22:43 1996 Received: (from daemon@localhost) by zoom.bga.com (8.6.12/8.6.12) id QAA07927 for sc-users-outgoing; Sat, 17 Aug 1996 16:22:43 -0500 Received: from maelzel.ircam.fr (maelzel.ircam.fr [129.102.1.10]) by zoom.bga.com (8.6.12/8.6.12) with ESMTP id QAA07911 for ; Sat, 17 Aug 1996 16:22:38 -0500 Received: from hildegard.ircam.fr (hildegard.ircam.fr [129.102.144.17]) by maelzel.ircam.fr (8.7.5/jtpda-5.2/ircam) with ESMTP id XAA03280 for ; Sat, 17 Aug 1996 23:22:03 +0200 (MET DST) Received: from [129.102.145.33] (mac-pedago-studio-assist.ircam.fr [129.102.145.33]) by hildegard.ircam.fr (8.7.5/jtpda-5.2/ircam) with SMTP id XAA04810 for ; Sat, 17 Aug 1996 23:22:23 +0200 (METDST) Message-Id: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Mailer: Eudora F1.5.1 Date: Sat, 17 Aug 1996 23:24:33 +0100 To: sc-users@bga.com From: Richard.Dudas@ircam.fr (dudas) Subject: Recording into Audio Buffer in SC Sender: owner-sc-users@bga.com Precedence: bulk Reply-To: sc-users@bga.com Ioannis Zannos writes: >How does one stop recording into an audiobuffer that started >by running a function created by > > recorder = Arecord(thebuf, `dspRemove); > --- and then executed by: > recorder.value(Lin); > >??? > >This is essential for controlling start and stop time when trying >to record in real time from audio in. I had exactly the same problem whe I first received SC. James McCartney replied to my question with the solution: ------------------------------- At 6:01 PM 5/25/96, Richard Dudas wrote: >rec1 { -- this function is called by a button in the GUI window > samp1 = Arecord(audiobuf1, play1); > samp1.value(in(Rin)); >} Part of the problem is that you must do a dspAdd() in order to get a function to run each control period. You are just evaluating the samp1 function one time which would only put 1 control period of data into the buffer. Another problem is that you call play1 rather than passing a pointer to it. But you also will need to call dspRemove to remove the recording task. So you should pass a function pointer like : { dspRemove; play1; } It should be more like: rec1 { samp1 = Arecord(audiobuf1, { dspRemove; play1; }); { samp1.value(in(Rin)); }.dspAdd(1); } ------------------------------- In the end I never automatically called the play function after recording (it's triggered by a switch). This is how it looks in the June-1-6 patch: init { allocAudio(audiobuf1, 200000); } rec1 { -- triggered by a radio button in the GUI window purgeAudio(audiobuf1, 200000); --there's probably a better way of clearing the buffer allocAudio(audiobuf1, 200000); samp1 = Arecord(audiobuf1, { dspRemove; }); { samp1.value(in(Rin)); }.dspAdd(0); } hope this helps -Richard Dudas From sc-users-owner@bga.com Mon Aug 19 02:49:36 1996 Received: (from daemon@localhost) by zoom.bga.com (8.6.12/8.6.12) id CAA20361 for sc-users-outgoing; Mon, 19 Aug 1996 02:49:36 -0500 Received: from berlin.shuttle.de (berlin.shuttle.de [194.95.246.252]) by zoom.bga.com (8.6.12/8.6.12) with ESMTP id CAA20339 for ; Mon, 19 Aug 1996 02:49:26 -0500 Received: from 194.95.246.124 (p124.b.shuttle.de [194.95.246.124]) by berlin.shuttle.de (8.7.1/8.7.1) with SMTP id JAA08282; Mon, 19 Aug 1996 09:49:15 +0200 (MET DST) Message-ID: <32181D4B.7BAF@musik.b.shuttle.de> Date: Mon, 19 Aug 1996 09:52:43 +0200 From: Staatliches Institut fuer Musikforschung PK <---@---.---> Organization: SIM - Berlin X-Mailer: Mozilla 3.0 (Macintosh; I; 68K) MIME-Version: 1.0 To: sc-users@bga.com CC: iani@musik.b.shuttle.de Subject: Re: Recording into Audio Buffer in SC References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-sc-users@bga.com Precedence: bulk Reply-To: sc-users@bga.com (Still not clear how to stop recording at a given moment.) dudas wrote: > > Ioannis Zannos writes: > >How does one stop recording into an audiobuffer that started > >by running a function created by > > > > recorder = Arecord(thebuf, `dspRemove); [...] This is how it looks in the June-1-6 patch: > > init { > allocAudio(audiobuf1, 200000); > } > > rec1 { -- triggered by a radio button in the GUI window > purgeAudio(audiobuf1, 200000); --there's probably a better way of > clearing the buffer > allocAudio(audiobuf1, 200000); > samp1 = Arecord(audiobuf1, { dspRemove; }); > { > samp1.value(in(Rin)); > }.dspAdd(0); > } > > hope this helps > > -Richard Dudas Thanks! This is a step forward but: It looks here like you are letting the recording run for the entire length of the buffer. I still see no hint as to how to stop the recording at a given moment. At the moment the only solution that occurs to me is to include some way a function that calls dspRemove after stopping (such as an envelope) but I have not tried it out yet. Any thoughts on that? (Some other SC users here heve the same question...) Iannis. From Majordomo-Owner@lists.realtime.net Sat Jan 10 11:42 CST 1998 Return-Path: Received: from mail2.realtime.net by clyde.as.utexas.edu (5.x/SMI-SVR4) id AA02724; Sat, 10 Jan 1998 11:42:12 -0600 Received: (qmail 17432 invoked by uid 201); 10 Jan 1998 17:36:46 -0000 Date: 10 Jan 1998 17:36:46 -0000 Message-Id: <19980110173646.21780.qmail@mail2.realtime.net> To: james@clyde.as.utexas.edu From: Majordomo@lists.realtime.net Subject: Majordomo file: list 'sc-users' file 'sc-users.9608' Reply-To: Majordomo@lists.realtime.net Content-Type: text Content-Length: 7471 Status: R -- From sc-users-owner@bga.com Fri Aug 16 02:14:56 1996 Received: (from daemon@localhost) by zoom.bga.com (8.6.12/8.6.12) id CAA05322 for sc-users-outgoing; Fri, 16 Aug 1996 02:14:56 -0500 Received: from berlin.shuttle.de (berlin.shuttle.de [194.95.246.252]) by zoom.bga.com (8.6.12/8.6.12) with ESMTP id CAA05308 for ; Fri, 16 Aug 1996 02:14:49 -0500 Received: from 194.95.246.124 (p124.b.shuttle.de [194.95.246.124]) by berlin.shuttle.de (8.7.1/8.7.1) with SMTP id JAA08072; Fri, 16 Aug 1996 09:14:14 +0200 (MET DST) Message-ID: <32142093.77AB@musik.b.shuttle.de> Date: Fri, 16 Aug 1996 09:17:39 +0200 From: Staatliches Institut fuer Musikforschung PK <---@---.---> Organization: SIM - Berlin X-Mailer: Mozilla 2.01 (Macintosh; I; 68K) MIME-Version: 1.0 To: sc-users@bga.com CC: iani@musik.b.shuttle.de Subject: Recording into Audio Buffer in SC Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-sc-users@bga.com Precedence: bulk Reply-To: sc-users@bga.com How does one stop recording into an audiobuffer that started by running a function created by recorder = Arecord(thebuf, `dspRemove); --- and then executed by: recorder.value(Lin); ??? This is essential for controlling start and stop time when trying to record in real time from audio in. Note: since dspRemove takes no arguments there seems to be no way of removing a function from the DSP queue other than executing the dspRemove call from whithin the frame of the executing function itself. This however is not possible in the case of Arecord, since unlike envelope generators or such, it takes no duration argument. (A while ago there was a discussion about in(Lin) yet it is not clear what kind of buffers are used for it. Furthermore it is not clear from the documentation what size an AudioBuffer has at creation time, and if that size is dynamic. ) Thanks in advance, if anybody can help me realize an elementary real-time sampler with Super Collider by solving the above problem. Ioannis Zannos Staatliches Institut fuer Musikforschung Tiergartenstr. 1, D-10785 Berlin, Germany fax: +49 30 25481 172 From sc-users-owner@bga.com Sat Aug 17 16:22:43 1996 Received: (from daemon@localhost) by zoom.bga.com (8.6.12/8.6.12) id QAA07927 for sc-users-outgoing; Sat, 17 Aug 1996 16:22:43 -0500 Received: from maelzel.ircam.fr (maelzel.ircam.fr [129.102.1.10]) by zoom.bga.com (8.6.12/8.6.12) with ESMTP id QAA07911 for ; Sat, 17 Aug 1996 16:22:38 -0500 Received: from hildegard.ircam.fr (hildegard.ircam.fr [129.102.144.17]) by maelzel.ircam.fr (8.7.5/jtpda-5.2/ircam) with ESMTP id XAA03280 for ; Sat, 17 Aug 1996 23:22:03 +0200 (MET DST) Received: from [129.102.145.33] (mac-pedago-studio-assist.ircam.fr [129.102.145.33]) by hildegard.ircam.fr (8.7.5/jtpda-5.2/ircam) with SMTP id XAA04810 for ; Sat, 17 Aug 1996 23:22:23 +0200 (METDST) Message-Id: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Mailer: Eudora F1.5.1 Date: Sat, 17 Aug 1996 23:24:33 +0100 To: sc-users@bga.com From: Richard.Dudas@ircam.fr (dudas) Subject: Recording into Audio Buffer in SC Sender: owner-sc-users@bga.com Precedence: bulk Reply-To: sc-users@bga.com Ioannis Zannos writes: >How does one stop recording into an audiobuffer that started >by running a function created by > > recorder = Arecord(thebuf, `dspRemove); > --- and then executed by: > recorder.value(Lin); > >??? > >This is essential for controlling start and stop time when trying >to record in real time from audio in. I had exactly the same problem whe I first received SC. James McCartney replied to my question with the solution: ------------------------------- At 6:01 PM 5/25/96, Richard Dudas wrote: >rec1 { -- this function is called by a button in the GUI window > samp1 = Arecord(audiobuf1, play1); > samp1.value(in(Rin)); >} Part of the problem is that you must do a dspAdd() in order to get a function to run each control period. You are just evaluating the samp1 function one time which would only put 1 control period of data into the buffer. Another problem is that you call play1 rather than passing a pointer to it. But you also will need to call dspRemove to remove the recording task. So you should pass a function pointer like : { dspRemove; play1; } It should be more like: rec1 { samp1 = Arecord(audiobuf1, { dspRemove; play1; }); { samp1.value(in(Rin)); }.dspAdd(1); } ------------------------------- In the end I never automatically called the play function after recording (it's triggered by a switch). This is how it looks in the June-1-6 patch: init { allocAudio(audiobuf1, 200000); } rec1 { -- triggered by a radio button in the GUI window purgeAudio(audiobuf1, 200000); --there's probably a better way of clearing the buffer allocAudio(audiobuf1, 200000); samp1 = Arecord(audiobuf1, { dspRemove; }); { samp1.value(in(Rin)); }.dspAdd(0); } hope this helps -Richard Dudas From sc-users-owner@bga.com Mon Aug 19 02:49:36 1996 Received: (from daemon@localhost) by zoom.bga.com (8.6.12/8.6.12) id CAA20361 for sc-users-outgoing; Mon, 19 Aug 1996 02:49:36 -0500 Received: from berlin.shuttle.de (berlin.shuttle.de [194.95.246.252]) by zoom.bga.com (8.6.12/8.6.12) with ESMTP id CAA20339 for ; Mon, 19 Aug 1996 02:49:26 -0500 Received: from 194.95.246.124 (p124.b.shuttle.de [194.95.246.124]) by berlin.shuttle.de (8.7.1/8.7.1) with SMTP id JAA08282; Mon, 19 Aug 1996 09:49:15 +0200 (MET DST) Message-ID: <32181D4B.7BAF@musik.b.shuttle.de> Date: Mon, 19 Aug 1996 09:52:43 +0200 From: Staatliches Institut fuer Musikforschung PK <---@---.---> Organization: SIM - Berlin X-Mailer: Mozilla 3.0 (Macintosh; I; 68K) MIME-Version: 1.0 To: sc-users@bga.com CC: iani@musik.b.shuttle.de Subject: Re: Recording into Audio Buffer in SC References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-sc-users@bga.com Precedence: bulk Reply-To: sc-users@bga.com (Still not clear how to stop recording at a given moment.) dudas wrote: > > Ioannis Zannos writes: > >How does one stop recording into an audiobuffer that started > >by running a function created by > > > > recorder = Arecord(thebuf, `dspRemove); [...] This is how it looks in the June-1-6 patch: > > init { > allocAudio(audiobuf1, 200000); > } > > rec1 { -- triggered by a radio button in the GUI window > purgeAudio(audiobuf1, 200000); --there's probably a better way of > clearing the buffer > allocAudio(audiobuf1, 200000); > samp1 = Arecord(audiobuf1, { dspRemove; }); > { > samp1.value(in(Rin)); > }.dspAdd(0); > } > > hope this helps > > -Richard Dudas Thanks! This is a step forward but: It looks here like you are letting the recording run for the entire length of the buffer. I still see no hint as to how to stop the recording at a given moment. At the moment the only solution that occurs to me is to include some way a function that calls dspRemove after stopping (such as an envelope) but I have not tried it out yet. Any thoughts on that? (Some other SC users here heve the same question...) Iannis.