Hi Everyone!
I ran into a little problem concerning the grain opcode in class today and I could not figure out what was going on,
maybe you can help:
Whenever the pitch in the example below is not exactly the base frequency as calculated via
sr / ftlen()
I’m getting aliases or similar artefacts.
I can’t seem to figure out what I’m doing wrong.
Any hint would be much appreciated!
Cheers
Max
sr = 44100
ksmps = 32
nchnls = 1
0dbfs = 1
instr 1
insnd = 1
ibasfreq = sr / ftlen(insnd)
kPitchoff = p4
kAmp = 0.5
kPitch = ibasfreq
kDens = 15
kAmpoff = 0.0
kGrainDur = 0.5
igfn = insnd
iwfn = 2
imgdur = 0.8
asig grain kAmp, kPitch, kDens, kAmpoff, kPitchoff, kGrainDur, igfn, iwfn, imgdur
out asig
endin
f1 0 524288 1 “instrument.aif” 0 0 0; read soundfile with Gen01 into f-table
f2 0 16384 20 6 1 ;Gaussian window
i1 0 5 0
i1 5 5 .01