I have a couple of vars and functions I have in my cminit file to do this for me:

(defparameter *pad* 0)

(defparameter *lasttime* 0)

;; and this will calculate pad times
(defun padcalc (time dur)
  (progn
    (if (> (+ time dur) (+ *lasttime* *pad*))
        (progn
          (if (> time *lasttime*)
              (setf *lasttime* time))
          (setf *pad* (+ dur (- time *lasttime*)))
          ))
    (if (> time *lasttime*)
        (progn
          (setf *pad* (- *pad* (- time *lasttime*)))
          (setf *lasttime* time)))
    )
  nil)

whenever I create an sc-object, I run padcalc with the events starttime and duration. Then, use *pad* as the pad argument in events.

Hope that helps

Josh

On May 13, 2007, at 12:00 PM, [EMAIL PROTECTED] wrote:

Send Cmdist mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist
or, via email, send a message with subject or body 'help' to
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Cmdist digest..."


Today's Topics:

   1. sc-objects, duration (Johannes Quint)
   2. Re: sc-objects, duration (Johannes Quint)
   3. Re: sc-objects, duration (todd ingalls)

--__--__--

Message: 1
To: [email protected]
From: Johannes Quint <[EMAIL PROTECTED]>
Date: Sun, 13 May 2007 18:10:46 +0200
Subject: [CM] sc-objects, duration


--Apple-Mail-1-1049466984
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
        charset=US-ASCII;
        format=flowed

when i try to create some sc-objects, i never get longer sounds.
i.e. with sc-object 'simple':

(events (new simple :time 0 :freq 300 :dur 100) "Desktop/test.osc")

stopps after ~ 5 secs.
of course, the same in supercollider works without problems.
any help? thanks, johannes
_________________________

Johannes Quint
Rilkestr.55
D-53225 Bonn
0228 468256
[EMAIL PROTECTED]
http://www.johannes-quint.de


--Apple-Mail-1-1049466984
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
        charset=ISO-8859-1

<HTML><BODY style=3D"word-wrap: break-word; -khtml-nbsp-mode: space; =
-khtml-line-break: after-white-space; ">when i try to create some =
sc-objects, i never get longer sounds.<DIV>i.e. with sc-object =
'simple':</DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>(events (new simple :time 0 =
:freq 300 :dur 100) "Desktop/test.osc")=A0</DIV><DIV><BR =
class=3D"khtml-block-placeholder"></DIV><DIV>stopps after ~ 5 =
secs.</DIV><DIV>of course, the same in supercollider works without =
problems.</DIV><DIV>any help? thanks, johannes<BR><DIV> <SPAN =
class=3D"Apple-style-span" style=3D"border-collapse: separate; =
border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Arial Narrow; = font-size: 18px; font-style: normal; font-variant: normal; font- weight: = normal; letter-spacing: normal; line-height: normal; text-align: auto; =
-khtml-text-decorations-in-effect: none; text-indent: 0px; =
-apple-text-size-adjust: auto; text-transform: none; orphans: 2; =
white-space: normal; widows: 2; word-spacing: 0px; "><SPAN =
class=3D"Apple-style-span" style=3D"border-collapse: separate; =
border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Arial; =
font-size: 11px; font-style: normal; font-variant: normal; font- weight: = normal; letter-spacing: normal; line-height: normal; text-align: auto; =
-khtml-text-decorations-in-effect: none; text-indent: 0px; =
-apple-text-size-adjust: auto; text-transform: none; orphans: 2; =
white-space: normal; widows: 2; word-spacing: 0px; "><SPAN =
class=3D"Apple-style-span" style=3D"border-collapse: separate; =
border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Arial; =
font-size: 11px; font-style: normal; font-variant: normal; font- weight: = normal; letter-spacing: normal; line-height: normal; text-align: auto; =
-khtml-text-decorations-in-effect: none; text-indent: 0px; =
-apple-text-size-adjust: auto; text-transform: none; orphans: 2; =
white-space: normal; widows: 2; word-spacing: 0px; "><SPAN =
class=3D"Apple-style-span" style=3D"border-collapse: separate; =
border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Arial; =
font-size: 11px; font-style: normal; font-variant: normal; font- weight: = normal; letter-spacing: normal; line-height: normal; text-align: auto; =
-khtml-text-decorations-in-effect: none; text-indent: 0px; =
-apple-text-size-adjust: auto; text-transform: none; orphans: 2; =
white-space: normal; widows: 2; word-spacing: 0px; "><SPAN =
class=3D"Apple-style-span" style=3D"border-collapse: separate; =
border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; = font-size: 12px; font-style: normal; font-variant: normal; font- weight: = normal; letter-spacing: normal; line-height: normal; text-align: auto; =
-khtml-text-decorations-in-effect: none; text-indent: 0px; =
-apple-text-size-adjust: auto; text-transform: none; orphans: 2; =
white-space: normal; widows: 2; word-spacing: 0px; "><DIV =
style=3D"font-family: Helvetica; font-size: 12px; "><SPAN =
class=3D"Apple-style-span" style=3D"font-family: Helvetica; font- size: =
12px; "><SPAN class=3D"Apple-style-span" style=3D"font-family: =
Helvetica; font-size: 12px; "><SPAN class=3D"Apple-style-span" =
style=3D"font-family: Helvetica; font-size: 12px; "><SPAN =
class=3D"Apple-style-span" style=3D"font-family: Helvetica; font- size: = 12px; ">_________________________</SPAN></SPAN></SPAN></SPAN></ DIV><DIV =
style=3D"font-family: Helvetica; font-size: 12px; "><BR style=3D"; =
font-family: Times New Roman; font-style: italic; ; font-size: 11px; =
"></DIV><DIV style=3D"font-family: Helvetica; font-size: 12px; "><SPAN = class=3D"Apple-style-span" style=3D"font-family: Helvetica; font- size: =
12px; "><SPAN class=3D"Apple-style-span" style=3D"font-family: =
Helvetica; font-size: 12px; "><SPAN class=3D"Apple-style-span" =
style=3D"font-family: Helvetica; font-size: 12px; "><SPAN =
class=3D"Apple-style-span" style=3D"font-family: Helvetica; font- size: =
12px; ">Johannes Quint</SPAN></SPAN></SPAN></SPAN></DIV><DIV =
style=3D"font-family: Helvetica; font-size: 12px; "><SPAN =
class=3D"Apple-style-span" style=3D"font-family: Helvetica; font- size: =
12px; "><SPAN class=3D"Apple-style-span" style=3D"font-family: =
Helvetica; font-size: 12px; "><SPAN class=3D"Apple-style-span" =
style=3D"font-family: Helvetica; font-size: 12px; "><SPAN =
class=3D"Apple-style-span" style=3D"font-family: Helvetica; font- size: =
12px; ">Rilkestr.55</SPAN></SPAN></SPAN></SPAN></DIV><DIV =
style=3D"font-family: Helvetica; font-size: 12px; "><SPAN =
class=3D"Apple-style-span" style=3D"font-family: Helvetica; font- size: =
12px; "><SPAN class=3D"Apple-style-span" style=3D"font-family: =
Helvetica; font-size: 12px; "><SPAN class=3D"Apple-style-span" =
style=3D"font-family: Helvetica; font-size: 12px; "><SPAN =
class=3D"Apple-style-span" style=3D"font-family: Helvetica; font- size: =
12px; ">D-53225 Bonn</SPAN></SPAN></SPAN></SPAN></DIV><DIV =
style=3D"font-family: Helvetica; font-size: 12px; "><SPAN =
class=3D"Apple-style-span" style=3D"font-family: Helvetica; font- size: =
12px; "><SPAN class=3D"Apple-style-span" style=3D"font-family: =
Helvetica; font-size: 12px; "><SPAN class=3D"Apple-style-span" =
style=3D"font-family: Helvetica; font-size: 12px; "><SPAN =
class=3D"Apple-style-span" style=3D"font-family: Helvetica; font- size: =
12px; ">0228 468256</SPAN></SPAN></SPAN></SPAN></DIV><DIV =
style=3D"font-family: Helvetica; font-size: 12px; "><SPAN =
class=3D"Apple-style-span" style=3D"font-family: Helvetica; font- size: =
12px; "><SPAN class=3D"Apple-style-span" style=3D"font-family: =
Helvetica; font-size: 12px; "><SPAN class=3D"Apple-style-span" =
style=3D"font-family: Helvetica; font-size: 12px; "><SPAN =
class=3D"Apple-style-span" style=3D"font-family: Helvetica; font- size: =
12px; ">johannes.quint@<A =
href=3D"http://web.de";>web.de</A></SPAN></SPAN></SPAN></SPAN></ DIV><SPAN = class=3D"Apple-style-span" style=3D"font-family: Helvetica; font- size: =
12px; "><SPAN class=3D"Apple-style-span" style=3D"font-family: =
Helvetica; font-size: 12px; "><SPAN class=3D"Apple-style-span" =
style=3D"font-family: Helvetica; font-size: 12px; "><A =
href=3D"http://www.johannes-quint.de";>http://www.johannes-quint.de</ A></SP=
AN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN> =
</DIV><BR></DIV></BODY></HTML>=

--Apple-Mail-1-1049466984--


--__--__--

Message: 2
From: Johannes Quint <[EMAIL PROTECTED]>
Subject: Re: [CM] sc-objects, duration
Date: Sun, 13 May 2007 18:15:12 +0200
To: [email protected]

(events (new simple :time 0 :freq 300 :dur 100) "Desktop/
test.osc" :pad 100)

... sorry

when i try to create some sc-objects, i never get longer sounds.
i.e. with sc-object 'simple':

(events (new simple :time 0 :freq 300 :dur 100) "Desktop/test.osc")

stopps after ~ 5 secs.
of course, the same in supercollider works without problems.
any help? thanks, johannes


--__--__--

Message: 3
Cc: Johannes Quint <[EMAIL PROTECTED]>
From: todd ingalls <[EMAIL PROTECTED]>
Subject: Re: [CM] sc-objects, duration
Date: Sun, 13 May 2007 09:25:18 -0700
To: Common Muisc List <[email protected]>

supercollider will stop rendering after the last event in the score.
when writing out the score from cm
a dummy event is written 5 seconds after the last event. this is
settable with the pad keyword . so the following should work.

(events (new simple :time 0 :freq 300 :dur 100) "Desktop/
test.osc" :pad 100)

as far as i know this is the only way to get around this problem.




On May 13, 2007, at 9:10 AM, Johannes Quint wrote:

when i try to create some sc-objects, i never get longer sounds.
i.e. with sc-object 'simple':

(events (new simple :time 0 :freq 300 :dur 100) "Desktop/test.osc")

stopps after ~ 5 secs.
of course, the same in supercollider works without problems.
any help? thanks, johannes
_________________________

Johannes Quint
Rilkestr.55
D-53225 Bonn
0228 468256
[EMAIL PROTECTED]
http://www.johannes-quint.de




--__--__--

_______________________________________________
Cmdist mailing list
[email protected]
http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist


End of Cmdist Digest

******************************************
Joshua Parmenter
University of Washington
Center for Digital Arts and Experimental Media
School of Music
Seattle, Washington 98195

http://www.realizedsound.net/josh/
http://www.dxarts.washington.edu



_______________________________________________
Cmdist mailing list
[email protected]
http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist

Reply via email to