Csound Csound-dev Csound-tekno Search About

tempest

Date1998-06-17 23:38
FromJean-Michel DARREMONT
Subjecttempest
Dear Csounders,

How do you use "tempest" opcode.
I use the following orchestra and score but it works like a metronome, I mean
that CSound doesn't follow the audio file's beats. It follows ,instead, the
second argument passed to "tempo" opcode and run it straight.

What table value have I to pass to the ifn argument in "tempest"? The manual says:

"ifn - table number of a stored function (drawn left-to-right) by which the
short-term memory data  is attenuated over time."


Here are orc and sco:

;ORCHESTRA
; ********************************************************

sr = 44100
kr   = 441
ksmps =100
nchnls = 1

instr  1 
; **************************************************
 asig	 					soundin		"IndPerc#6-91.1mloop"				; get external audio
 ksig		     rms 	asig 
 ktemp				tempest	   ksig, .02, .1, 3, 2, 800, .005, .3, 91, 4	; and look for beats
 tempo    ktemp, 91
 
; ************************************************

idur  =  p3
iamp  =  p4
ifq1  =  p5
if1   =  p6 ; free choice of envelope
if2   =  p7 ; and waveform

   a2  oscili  iamp, 1/idur, if2
   a1  oscili  a2, ifq1, if1

       out     a1
endin

instr 2

asig1	 					soundin		"IndPerc#6-91.1mloop"
				 
idur  =  p3

       out     asig1

endin




;UNINTERESTING SCORE JUST MADE TO TEST THE BEATS
 
; Wave
f2 0  1024 10   1 .2 .05                               ; three harmonics

; exponential envelopes: post-normalized (2**10)
f51 0  513   5  1024  512 1                                  ; plucked

; table for tempest
;f4 0  513   5  1024  512 1; exponentielle
  f4 0  513   7  1024  512 1; linéaire

; score ******************************************************************
;                                      wav  env
;   start  idur  iamp ifq1  if1   if2

i2    0     42
i1    0     1    9000  440   2     51     ; carriers with percussive env
i1	  +      .         .       .      .        .
i1    +      .         .       .      .        .
i1    +
i1    +
i1    +
i1    +
i1    +
i1    +
i1    +
i1    +
i1    +
i1    +
i1    +
i1    +
i1    +
i1    +
i1    +
i1    +
i1    +
i1    +
i1    +
i1    +
i1    +
i1    +
i1    +
i1    +
i1    +
i1    +
i1    +
i1    +
i1    +
i1    +
i1    +
i1    +
i1    +
i1    +
i1    +
i1    +
i1    +
i1    +
i1    +
e


-- 
Jean-Michel DARREMONT