Csound Csound-dev Csound-tekno Search About

Re: pitch type opcode

Date2007-08-22 15:34
FromMichael Bechard
SubjectRe: pitch type opcode
You know, this question seems to come up allot (myself included), and it seems to be a fairly reasonable opcode to expect from CSound. I mean let's face it, most people aren't going to be able to come up with what's in those UDO's on their own (including me), but should they have to turn to the internet or a UDO database for such a fundamental bit of computation? Certainly it wouldn't be too difficult to add this to the code-base?

Michael Bechard

----- Original Message ----
From: Steven Yi 
To: csound@lists.bath.ac.uk
Sent: Tuesday, August 21, 2007 2:05:38 PM
Subject: Re: [Csnd] pitch type opcode

Hi Greg,

There's UDO's for this here:

http://www.csounds.com/udo/displayOpcode.php?opcode_id=64
http://www.csounds.com/udo/displayOpcode.php?opcode_id=94

steven

On 8/21/07, Greg Thompson  wrote:
> Ok - I'm tired of looking - I've been searching the manual hoping to find a
> convenient opcode for converting a MIDI note number into a frequency such as
>
> iPitch   notetohz 60
>
> There has to be an existing opcode that handles this type of request?  I'm
> just lost amongst the large list right?
>
> To do this, I've just been using the following, which is unsightly at best.
>
> iPitch = 8.17579891564 * exp(0.0577622650 * p4)
>
>
> greg
-- 
Send bugs reports to this list.
To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk





       
____________________________________________________________________________________
Got a little couch potato? 
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz 

Date2007-08-22 15:58
Fromjpff@cs.bath.ac.uk
SubjectRe: pitch type opcode
But MIDI is not fundamental to Csound!  Many users never touch MIDI.
Personally if/whren I have to translate the odd MIDI note numbers to use 
in ocillators etc I use cpspch usually with teh trivial integer 
arithmentic (100*(M-60)/12) ->x
 	cpspch((int(x/12)+(x%12)/100)
I seem to remember, but I do not use MIDI

==John ff

Date2007-08-22 16:09
FromAnthony Kozar
SubjectRe: pitch type opcode
I agree whole-heartedly.  I had a similar struggle back when I was writing
my first Csound piece -- and I got the conversion wrong.  (Being a "purist",
I did not change the piece years later when I discovered the error).

I will attempt to add a set of built-in opcodes for this by the end of the
week.

Anthony Kozar
anthonykozar AT sbcglobal DOT net
http://anthonykozar.net/

Michael Bechard wrote on 8/22/07 10:34 AM:

> You know, this question seems to come up allot (myself included), and it seems
> to be a fairly reasonable opcode to expect from CSound. I mean let's face it,
> most people aren't going to be able to come up with what's in those UDO's on
> their own (including me), but should they have to turn to the internet or a
> UDO database for such a fundamental bit of computation? Certainly it wouldn't
> be too difficult to add this to the code-base?