Csound Csound-dev Csound-tekno Search About

adsyn

Date1998-10-15 00:39
FromSergey
Subjectadsyn
Hi!  
Can anybody explain how to use adsyn? I tried to do something with 
winsound=>Utilities=>Hetrodyne Analysis. A short (2.1 sec.) guitar.wav (sr
44100)
was defined as input, and guitar.ads - as output.
 Flags: Sample rate= 0, Begin time=0, Duration=0, Fundamental=100,
Harmonic=10,
Max=32767, min=64, Number=256, Filters=0. The result guitar.ads was about 9
kb
(something unreadable). Then I made orc+sco (sorry, couldn't invent smth.
better):

;Orc
sr = 44100
kr = 4410
ksmps = 10
nchnls = 1

instr 1
   a1   adsyn	1, 1, 1,  "guitar.ads" ;in current folder
        out     a1
endin
 
;Sco
f0 5
e

There was no error messages, but the result wav file contents only silence.

Please, send any simple but RIGHT example of hetro+adsyn!

   Thank you,

Date1998-10-15 00:42
FromErik Spjut
SubjectRe: adsyn
At 2:39 AM +0300 10/15/98, Sergey wrote:
>Hi!
>Can anybody explain how to use adsyn?

A little fancier than you need but here:

 sr = 22050
 kr = 2205
 ksmps = 10

       instr    1 ; plays a note of length p3 from an analysis file of
length p6
     ; p3 - usual note duration
     ; p6 - length of note analyzed for adsyn file. You either have to know
this
     ;        from when you ran "hetero" or you have to find the length
     ;        from trial and error.
 idur =  p6/p3
 a1    adsyn    1, p5, idur, "nhtest2.adsyn"
      out    a1
      endin

     instr    2 ; plays a note of length p3 from an analysis file of length p6
     ; Unlike instr 1, it dynamically varies the file-read rate.
     ; p3 - usual note duration
     ; p6 - length of note analyzed for adsyn file. You either have to know
this
     ;        from when you ran "hetero" or you have to find the length
     ;        from trial and error.
     ;p7 - initial playback rate. Must be positive.
 ib = (2*p6-p7*p3)/2
 k1 line p7, p3, ib
 a1    adsyn    1, p5, k1, "nhtest2.adsyn"
      out    a1
      endin

sco:
i1 0 .5 0 2.8284 1
i1 .5 1 0 2.6697 1
i1 1.5 2 0 2.5198 1
i1 3.5 .25 0 2.6697 1
i1 3.75 2.1 0 2.8284 1

i2 6 .5 0 2.8284 1 5.0
i2 6.5 1 0 2.6697 1 0.5
i2 7.5 2 0 2.5198 1 2.3
i2 9.5 .25 0 2.6697 1 1
i2 9.75 2.1 0 2.8284 1 0.1
e

Enjoy!

-------------------------------------------------------------------------------
Erik Spjut (spyoot, rhymes with cute) - Associate Professor of Engineering
and  Associate Director for Engineering Computing,  Center for Design Education
Harvey Mudd College, Claremont, CA 91711-5990  USA
Erik_Spjut@hmc.edu      Ph & Voice mail (909) 607-3890      Fax (909) 621-8967