| These have been committed now. They currently use the same lookup table as
cpspch and cpsoct, but that can be changed when the other functions are
changed.
Manual entries and examples still need to be written. Could someone who
uses Midi a lot check the output of the example CSD below (it prints a table
with corresponding values between all four pitch formats) to check that I
did not goof anything up?
Thanks.
Anthony Kozar
anthonykozar AT sbcglobal DOT net
http://anthonykozar.net/
instr 1
; i-time loop to print conversion table
imidiNN = 0
loop1:
icps = cpsmidinn(imidiNN)
ioct = octmidinn(imidiNN)
ipch = pchmidinn(imidiNN)
print imidiNN, icps, ioct, ipch
imidiNN = imidiNN + 1
if (imidiNN < 128) igoto loop1
endin
instr 2
; test k-rate converters
kMiddleC = 60
kcps = cpsmidinn(kMiddleC)
koct = octmidinn(kMiddleC)
kpch = pchmidinn(kMiddleC)
printks "%d %f %f %f\n", 1.0, kMiddleC, kcps, koct, kpch
endin
i1 0 0
i2 0 0.1
e
Dr. Richard Boulanger wrote on 8/23/07 10:10 AM:
> They look great.
>
> Please commit ASAP - I would like to see and use these opcodes on the
> OLPC machine and
> they are doing a trial in 2 weeks and a new build then.
>
> -dB
>
> On Aug 22, 2007, at 9:19 PM, Anthony Kozar wrote:
>
>> I have a working implementation of some value converting functions
>> for Midi
>> Note number to Csound's various pitch formats. (Just copied from the
>> existing value converters for the most part). I've put the opcodes in
>> entry1.c and aops.c in my local copy of the source so that they
>> will be
>> built-in opcodes like the existing converters. Here are the names and
>> syntax that I currently have:
>>
>> icps = cpsmidinn(imidiNN)
>> ioct = octmidinn(imidiNN)
>> ipch = pchmidinn(imidiNN)
>>
>> kcps = cpsmidinn(kmidiNN)
>> koct = octmidinn(kmidiNN)
>> kpch = pchmidinn(kmidiNN)
>>
>> Does this look OK to commit or are there any suggestions for changes?
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net |