Csound Csound-dev Csound-tekno Search About

notenumber to pan

Date1998-09-30 15:05
FromJrgen Schmitt
Subjectnotenumber to pan
;I never came across this one, so in case anyone is thinking about
;{"notenumber" (here in cps) to panorama position}:
,this is a very easy way to get a full stereo image whithout having to 
add any special parameters
;**************************************************************************
**************************
;orchestra
sr = 44100
kr = 4410
ksmps = 10
nchnls = 2

	instr 1 


	 ipan =(.0005681*p4)  ;multiplier:"notenumber"(cps!) to pan / adapt for 
greater values:1/freq;(cps)
  a1 oscil 12000, p4, 1
  outs a1*ipan, a1*(1-ipan)

	 endin
;**************************************************************************
**************************
;score

f1 0 8192 10 1
i1 0 10 55
i1 0 10 110
i1 0 10 220 
i1 0 10 440	
i1 0 10 880	
i1 0 10 1760