Csound Csound-dev Csound-tekno Search About

[Cs-dev] opcode intypes/outypes and the void* param of opadr/iopadr

Date2012-05-08 13:38
FromAdam Puckett
Subject[Cs-dev] opcode intypes/outypes and the void* param of opadr/iopadr
Hey everyone,

I'm not quite sure I understand just how opcodes get their arguments.
I know that the orchestra is parsed and the opcode seems to "just
work" whenever I run them.

How does the structure (e.g. OSC *p etc) know what its in/outtypes
are? Does it have something to do with "alignment", or an OPDS h, or
perhaps both?

Thanks.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2012-05-08 14:17
FromTito Latini
SubjectRe: [Cs-dev] opcode intypes/outypes and the void* param of opadr/iopadr
AttachmentsNone  

Date2012-05-08 15:17
Fromjpff@cs.bath.ac.uk
SubjectRe: [Cs-dev] opcode intypes/outypes and the void* param of opadr/iopadr
> The answer is in the `instance' function in Engine/insert.c


Arh!  Tito, I was going to say it was magic, like all computing.

The outputs and inputs to an opcode are at the start of the opcode
structure like OSC, following the OPDS structure.  The compiler checks
that there are the correct number of outs and ins so matching them to the
args is just counting.

ARgs are passed by reference which makes some things easier.

But read the code and look at the -v output top see what is happening.

==John ff
>
> On Tue, May 08, 2012 at 08:38:42AM -0400, Adam Puckett wrote:
>> Hey everyone,
>>
>> I'm not quite sure I understand just how opcodes get their arguments.
>> I know that the orchestra is parsed and the opcode seems to "just
>> work" whenever I run them.
>>
>> How does the structure (e.g. OSC *p etc) know what its in/outtypes
>> are? Does it have something to do with "alignment", or an OPDS h, or
>> perhaps both?
>>
>> Thanks.
>>
>> ------------------------------------------------------------------------------
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and
>> threat landscape has changed and how IT managers can respond.
>> Discussions
>> will include endpoint security, mobile security and the latest in
>> malware
>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
>



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2012-05-08 19:10
FromAdam Puckett
SubjectRe: [Cs-dev] opcode intypes/outypes and the void* param of opadr/iopadr
So basically it's just pointer arithmetic?

On 5/8/12, jpff@cs.bath.ac.uk  wrote:
>> The answer is in the `instance' function in Engine/insert.c
>
>
> Arh!  Tito, I was going to say it was magic, like all computing.
>
> The outputs and inputs to an opcode are at the start of the opcode
> structure like OSC, following the OPDS structure.  The compiler checks
> that there are the correct number of outs and ins so matching them to the
> args is just counting.
>
> ARgs are passed by reference which makes some things easier.
>
> But read the code and look at the -v output top see what is happening.
>
> ==John ff
>>
>> On Tue, May 08, 2012 at 08:38:42AM -0400, Adam Puckett wrote:
>>> Hey everyone,
>>>
>>> I'm not quite sure I understand just how opcodes get their arguments.
>>> I know that the orchestra is parsed and the opcode seems to "just
>>> work" whenever I run them.
>>>
>>> How does the structure (e.g. OSC *p etc) know what its in/outtypes
>>> are? Does it have something to do with "alignment", or an OPDS h, or
>>> perhaps both?
>>>
>>> Thanks.
>>>
>>> ------------------------------------------------------------------------------
>>> Live Security Virtual Conference
>>> Exclusive live event will cover all the ways today's security and
>>> threat landscape has changed and how IT managers can respond.
>>> Discussions
>>> will include endpoint security, mobile security and the latest in
>>> malware
>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>> ------------------------------------------------------------------------------
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and
>> threat landscape has changed and how IT managers can respond. Discussions
>> will include endpoint security, mobile security and the latest in malware
>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>
>>
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net