Csound is a software synthesis package in the tradition of so-called music-N languages, among which the best-known is Music V. It consists of an orchestra- and score-driven executable, written in C for portability. Since Csound is a computational language, it is highly flexible and efficient; complexity is gained only at the expense of computation time. Basically Csound reads some files and creates the result as a file on disk or, on faster machines, through a DAC in real time. Package provided by Ben Collver in pkg/11759, with an overhaul by me.
54 lines
1.8 KiB
Text
54 lines
1.8 KiB
Text
$NetBSD: patch-af,v 1.1.1.1 2001/03/13 13:18:24 wiz Exp $
|
|
|
|
--- extract.c.orig Thu Sep 21 21:55:32 2000
|
|
+++ extract.c
|
|
@@ -6,7 +6,7 @@
|
|
static char inslst[INSMAX]; /* values set by readxfil */
|
|
static int onsect, offsect; /* " " " */
|
|
static MYFLT onbeat, offbeat; /* " " " */
|
|
-static MYFLT ontime, offtime; /* set by readxfil, mod by w-stmnt */
|
|
+static MYFLT ontime, cs_offtime; /* set by readxfil, mod by w-stmnt */
|
|
|
|
static SRTBLK *frstout, *prvout; /* links for building new outlist */
|
|
|
|
@@ -56,7 +56,7 @@
|
|
for(ip = &inslst[0]; ip < &inslst[INSMAX]; *ip++ = 1);
|
|
}
|
|
ontime = a0.newp3 = a0.p3val = onbeat;
|
|
- offtime = f0.newp2 = f0.p2val = offbeat;
|
|
+ cs_offtime = f0.newp2 = f0.p2val = offbeat;
|
|
}
|
|
|
|
void extract(void) /* extract instr events within the time period */
|
|
@@ -101,7 +101,7 @@
|
|
if (sectno == onsect && warped)
|
|
ontime = a0.newp3 = realt(onbeat);
|
|
if (sectno == offsect && warped)
|
|
- offtime = f0.newp2 = realt(offbeat);
|
|
+ cs_offtime = f0.newp2 = realt(offbeat);
|
|
include(bp);
|
|
break;
|
|
case 't':
|
|
@@ -110,7 +110,7 @@
|
|
case 'f':
|
|
casef: if (sectno == onsect && bp->newp2 < ontime)
|
|
bp->newp2 = ontime;
|
|
- else if (sectno == offsect && bp->newp2 > offtime)
|
|
+ else if (sectno == offsect && bp->newp2 > cs_offtime)
|
|
break;
|
|
if (sectno == onsect && !a0done) {
|
|
if (onbeat > 0)
|
|
@@ -137,10 +137,10 @@
|
|
}
|
|
}
|
|
if (sectno == offsect) {
|
|
- if (bp->newp2 >= offtime)
|
|
+ if (bp->newp2 >= cs_offtime)
|
|
break;
|
|
- if (turnoff > offtime) {
|
|
- bp->newp3 = offtime - bp->newp2;
|
|
+ if (turnoff > cs_offtime) {
|
|
+ bp->newp3 = cs_offtime - bp->newp2;
|
|
bp->p3val = offbeat - bp->p2val;
|
|
}
|
|
}
|