Free Web Hosting Provider - Web Hosting - E-commerce - High Speed Internet - Free Web Page
Search the Web

aopcode oscil(table t, asig freq [,ivar loops]) kopcode koscil(table t, ksig freq [,ivar loops])

aopcode aphasor(asig cps)

kopcode kphasor(ksig cps)


algorithm:

phase pointer p initialized to
zero during the first call to
buzz, and incremented by cps/arate
(for aphasor) or cps/krate (for
kphasor) on subsequent calls. if p is
greater that 1 after an increment,
p is set to its fractional value.

negative cps values are permitted,
and act to decrement p.

opcode returns phase pointer p.

mp4-sa-> the mp4-sa book-> advanced opcodes->sound synthesis core opcodes

 

aopcode doscil(table t)

table t(sample, size,
"name.wav" [,skip]);

table t(sample, size,
"name.aif" [,skip]);


algorithm:

monaural AIFF or WAV file is read into
table. skip is an optional parameter,
that specifies how many samples to skip
over at the beginning of the file.

file sample rate is table sample rate.

if size is set to -1, table size is
the number of samples in the file,
minus skip (if specified). if size is
specified, audio file is truncated
or zero-padded as needed.

table values lie between -1.0 and
+1.0, by scaling 16-bit signed
integers from the file by 1/32768

globals {
table cyc0(harm, 128, 1);
table cyc1(harm, 128, 0.5, 0.25);
table cyc2(harm, 128, 0.5, 0.1);
}

instr test {

imports exports table cyc0;// form 1
imports table cyc1, cyc2; // form 2

}

table t(polynomial, size, xmin, xmax,
a0 [,a1, a2, a3);

algorithm:

for x in [0, size-1]:

y(x) = a0 + a1*y + a2*y*y + ...

where

y = xmin +
(xmax - xmin)*((size - x)/size)

error if xmin = xmax