On Friday 13 January 2006 19:20, Anthony Kozar wrote: > I think it was you who modified the existing pan opcode to output only two > channels. I got the code from ftp://ftp.cs.bath.ac.uk/pub/dream/BETA/pans.c > > I've attached a copy of it with some small modifications that I had made so > that it would compile for me. (I included pans as a plugin opcode with my > Mills Csound 4 releases last year). It is possible to do stereo panning with the already existing pan opcode, just set ky to a constant 1 and ignore the rear outputs. Here is also a user defined opcode that can pan with interpolation and takes a pan value in any range (using the optional arguments) instead of having mode and offset parameters: sr = 48000 ksmps = 32 nchnls = 2 0dbfs = 1 itmp ftgen 100, 0, 257, 9, 0.25, 1, 0 opcode pans, aa, akiop ain, kpan, ift, ileft, iright xin iscl = 1 / (iright - ileft) kpos = (kpan - ileft) * iscl kpanL tablei 1 - kpos, ift, 1 kpanR tablei kpos, ift, 1 apanL interp kpanL, 0, 1 apanR interp kpanR, 0, 1 xout ain * apanL, ain * apanR endop instr 1 kpan line -1, p3, 1 a1 vco2 0.5, 220 aL, aR pans a1, kpan, 100, -1, 1 outs aL, aR endin i 1 0 3 e ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net