| If you want the impulse at the start of the file, the orc is easy:
;impulse.orc
sr = 44100
kr = 44100
ksmps = 1
nchnls= 1
gaimp init 32767 ; or whatever
instr 1
asig = gaimp
out asig
gaimp = 0
endin
I haven't tried it with ksmps > 1, but it should still do what you need.
To offset the impulse, I guess you would need to maintain a counter.
Richard Dobson
David Ogborn wrote:
>
>
> I have a question. How does one insert a single value at a
> specified offset into an a-rate audio buffer? The application is the
> need for a single impulse that is fed to a comb filter, i.e. so that the
> very first sample of the buffer is set to some value, and all other
> values are 0. At present, I have defined a function table using
> GEN02 that contains the values 1 and 0 in order, which I
> subsequently access with osciln. Is there something more straight
> forward than this?
>
> Thanks!
>
> David Ogborn
--
Test your DAW with my Soundcard Attrition Page!
http://wkweb5.cableinet.co.uk/rwd (LU: 19th May 1999) |