Csound Csound-dev Csound-tekno Search About

[Cs-dev] Latest API Additions

Date2005-07-19 23:53
FromSteven Yi
Subject[Cs-dev] Latest API Additions
AttachmentsNone  

Date2005-07-20 11:10
FromIstvan Varga
SubjectRe: [Cs-dev] Latest API Additions
Steven Yi wrote:

> Could you explain a little bit about the latest API Additions? 
> Particularly all of those that involve getting opcode information
> (name, args, argTypes, arg name, etc.), and what a use-case might be?

These functions generally allow opcodes to get information about
the number, type, and name of arguments, note parameters, etc.
without depending on the use of internal structures which may possibly
change between releases of Csound.
Here are some common examples (the list is not complete, there are
more functions):

p->INOCOUNT                    csound->GetInputArgCnt(p)
p->OUTOCOUNT                   csound->GetOutputArgCnt(p)
p->XINCODE                     csound->GetInputArgAMask(p)
p->XOUTCODE                    csound->GetOutputArgAMask(p)
p->XSTRCODE                    csound->GetInputArgSMask(p)
p->XOUTSTRCODE                 csound->GetOutputArgSMask(p)
p->h.optext->t.inlist->arg[n]  csound->GetInputArgName(p, n)
p->h.optext->t.outlist->arg[n] csound->GetOutputArgName(p, n)
p->h.insdshead->m_pitch        csound->GetMidiNoteNumber(p)
p->h.insdshead->m_veloc        csound->GetMidiVelocity(p)
p->h.insdshead->relesing       csound->GetReleaseFlag(p)
p->h.insdshead->offtim         csound->GetOffTime(p)
p->h.insdshead->m_chnbp        csound->GetMidiChannel(p)

Of course, it may turn out that using the macros and structures is safe
(and is definitely much faster) even when mixing binaries from different
versions of Csound 5, so the functions may very well be removed if they
are not useful in practice.


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2005-07-20 11:30
FromSteven Yi
SubjectRe: [Cs-dev] Latest API Additions
AttachmentsNone