new opcodes (diskgrain, pvsdiskin) in CVS

Responding to a request by Jonathan Murphy, I have added a couple
of new opcodes that read directly from disk. Now you can timestretch
your favourite Wagner opera.

DISKGRAIN, a version of syncgrain that reads from disk

asig diskgrain    Sfname, kamp,kfreq,kpitch,kgrsize,kprate,ifn,iolaps[,ioffset,imaxgrsiz]

SFname is the source soundfile name in double-quotes
kamp,kfreq,kpitch,kgrsize,kprate,iolaps  as in syncgrain
ifn is the envelope function table
ioffset is the start offset in secs from the beginning of the file (default 0)
imaxgrsize is the maximum grainsize in secs, used for buffer allocation (default 1.0)

example:
iomax = 2
kol = 2            /* number of overlapped grains */
kgr = 0.05         /* grain size in secs */
kfr = kol/kgr      /* freq or density in gr/sec */
kps = 1/kol        /* pointer rate scaling */

asig diskgrain  “Rheingold.wav”,150/kol, kfr, 1, kgr, kps,3, iomax

   out   asig

PVSDISKIN, a wrap-around pvocex file reader

fsig  pvsdiskin  Sfname,ktimescale, kgain[,ioffset, ichannel]

Sfname is the pvocex file name.
ktimescale controls the readout pointer speed (1 is normal speed, < 1 slower (timestretch),
> 1 faster (timecompress), negative is backwards)
ioffset is the start offset (secs, default 0)
ichannel is the channel number for multi-channel files (default 1)

example:
fsig pvsdiskin “Siegfried.pvx”,1,0.5,0,2
aout pvsynth fsig

    out aout

Now in CVS. Manual page to follow soon (well, hopefully…)

Victor

Victor Lazzarini
Music Technology Laboratory
Music Department
National University of Ireland, Maynooth

Leave a Comment.

This site uses Akismet to reduce spam. Learn how your comment data is processed.