| instr 1
ifn = 1
istart = p4
idur = ftlen(ifn)/sr
ipos = istart/idur
a1 phasor 1/idur, ipos
asig tab a1, ifn, 1
out asig
endin
f1 is your soundfile table (deferred alloc) and p4 is the start time.
Not tested, but should work
Victor
----- Original Message -----
From: "jpff"
To:
Sent: Monday, June 23, 2008 5:53 PM
Subject: [Csnd] My brain is on holiday..
>I want an instrument that can play a section from a soundfile starting
> at an arbitrary point (as a parameter) for some time. At present I
> am using diskin2 which is clearly stupid as i am reading the same two
> files hundreds of times. There must be a simpler way! I tried to use
> table but I could not work out how to do it. There is no sr change
> and no interpolation needed, but I am out of ideas. There must be a
> simpler way than me writing a new opcode in C.
> Please help a tired mind. I get so little time to compose and this
> is really holding me up!
> ==John ffitch
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
|