Csound Csound-dev Csound-tekno Search About

Bug in r statement?

Date1998-07-12 23:56
FromPaul Winkler
SubjectBug in r statement?
So today I decide it's time to start doing some rhythmic composition 
using sections and repeats. And what do you know, I think I found a bug.

First of all, this score works fine:

f1 0  32769 1 "drumachines/kicks/bit1bassdrum.aiff" 0 0 0

#define LOKIK	#1	8.00#
#define SHK 	#5	8.00#
i1 0	.5	8.00	80	$LOKIK.
i1 1	.5	8.02	75	$LOKIK.
i1 2.5	.5	8.03	77	$LOKIK.
i1 3.5	.5	8.05	82	$LOKIK.
e


But if I add this statement just before the i statements:

    r 4

...the first i statement is left out of all 4 repeats.

If I add this in as well, just after the r 4 statement:

   f0 0

...the first note of each repeat now gets performed OK.

Further experimentation seems to suggest that the first statement 
following an r statement is ignored regardless of what it is. The f0 
statement can be anything; an empty comment just after the r statement 
is sufficient to ensure that all notes are played.

And no, I'm not getting any warnings or errors at perf-time.

Here's the orc I used:

sr = 44100
kr = 2205
ksmps = 20
nchnls = 1

	instr 1 ; basic mono sampler, no looping
; pfields: 4 = pitch, 5 = db, 6 = ftable, 7 = base freq
icps = cpspch(p4)
iamp = ampdb(p5)
kamp linenr iamp, 0, 0.1, .01 ; release
print iamp, icps
a1 loscil kamp, icps, p6, cpspch(p7),
out a1
	endin

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com