Unexplained run-loop behavior

Larry Troxler lt@westnet.com
Fri, 19 Sep 1997 23:07:59 -0400 (EDT)


I'm really not having much luck with CLM tonight :-(

I've got these two instruments:

--------
(definstrument (grump :parallel t) (start)
  (let* ((beg (floor (* start sampling-rate)))
	 (end (1+ beg)))
    (run
     (loop for samp from beg below end do
	   (clm-print "~&~D~&" beg)
	   (outa samp 0.0)))))
(make-instance 'grump)

(definstrument (grump2 :parallel t) (start d)
  (let* ((beg (floor (* start sampling-rate)))
	 (end (+ 1 beg (floor (* d sampling-rate)))))
    (run
     (loop for samp from beg below end do
	   (clm-print "~&~D~&" beg)
	   (outa samp 0.0)))))
(make-instance 'grump2)

----------

The first instrument, I would expect to print its start time once.

Instead, nothing gets printed, and the output file size is about 69MB:

Stella [T1]: new grump 3
Slots and values: rhythm 0.001
New object position: (<cr>=T1) 

Stella [T1]: mix
Mix objects: (<cr>=T1) 
Start time offset:(<cr>=None) 
File: test.snd
Channels: 1
Srate: 22050.0
Reverb: None
grump 0.000 grump 0.001 grump 0.002 test.snd: 
  Duration: 0.0002 (4 samples), Last begin time: 0.0020 (sample 44)
  Compute time: 0.103, Compute ratio: 567.79
  OutA max amp: 0.000 (near 0.000 secs)

Stella [T1]: 


    Pretty strange. I then thought that CLM perhaps needs to see a
   duration parameter, hence "grump2": 

Stella [T1]: new grump2 3
Slots and values: rhythm 0.001 d 0
New object position: (<cr>=T1) 

Stella [T1]: open test.snd statistics t verbose t
Stream: #<File: "test.snd">
Stella [T1]: mix
Mix objects: (<cr>=T1) 
Start time offset:(<cr>=None) 
File: test.snd
Channels: 1
Srate: 22050.0
Reverb: None
grump2 0.000 grump2 0.001 
0

0

<snip>

0

0
grump2 0.002 
0

22

0
<snip>

0

44
test.snd: 
  Duration: 0.0022 (49 samples), Last begin time: 0.0020 (sample 44)
  Compute time: 0.503, Compute ratio: 226.35
  OutA max amp: 0.000 (near 0.000 secs)

Stella [T1]

   Now, it seems like the run loop is being called not only on the
   instrument start times, but for each sample in between, with "beg" 
   bound to 0!

What's going on here?!?!?

Larry


--  Larry Troxler  --  lt@westnet.com  --  Patterson, NY USA  --