[Csnd] sfplay, microtuning
Date | 2011-02-28 08:03 |
From | Stefan Thomas |
Subject | [Csnd] sfplay, microtuning |
Dear community, I've read in the manual about sfplay: ar1, ar2 sfplay ivel, inotenum, xamp, xfreq, ipreindex [, iflag] [, ioffset] [, ienv] I would like to ask: how can I use a microtonal-scale generated with cpstmid e.g. with this opcode? Send bugs reports to the Sourceforge bug tracker https://sourceforge.net/tracker/?group_id=81968&atid=564599 Discussions of bugs and features can be posted here To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" |
Date | 2011-02-28 14:22 |
From | Joel Ross |
Subject | Re: [Csnd] sfplay, microtuning |
Hi Stefan, It seems that there is not a frequency to midi converter opcode, but something like this will do it: ifreq cpstmid itable inotevalue = (69. + (1./.057762265) * log( ifreq / 440.)) (modified from the max manual) - Joel On 28 February 2011 09:03, Stefan Thomas |
Date | 2011-02-28 16:05 |
From | Aaron Krister Johnson |
Subject | Re: [Csnd] sfplay, microtuning |
Stefan, This is (somewhat) equivalent to what Joel is saying: inotenum = int(round((log(ifreq/440)/log(2))*12))+69 I just want to point out that you want to feed the 'inotenum' so the nearest sample to the target pitch is chosen in the sample bank....of course, the actual frequency is fed into the 'xfreq' parameter....make sure 'iflag' is set to '1' so that 'xfreq' is interpreted correctly as the literal pitch you want (i.e. 'inotenum' is just there so that the nearest sample is chosen, really) Caveat emptor---certain soundfonts I've tried (notably Campbell's tuned harpsichord) seem REALLY loud when used by sfplay, to the point of distortion. I don't know if it's a bug, but I've found by experiement that if you have a really distorted, loud sound, it helps to put a 'xamp' correction factor in there, where xamp is between 0 and 1.... AKJ On Mon, Feb 28, 2011 at 8:22 AM, Joel Ross <joel.binarybrain@gmail.com> wrote: Hi Stefan, -- Aaron Krister Johnson http://www.akjmusic.com http://www.untwelve.org |
Date | 2011-03-01 21:07 |
From | Stefan Thomas |
Subject | Re: [Csnd] sfplay, microtuning |
Dear Aaron, thanks very much! I will try Your code! 2011/2/28 Aaron Krister Johnson |