Csound Csound-dev Csound-tekno Search About

[Cs-dev] Instantiation - when?

Date2012-09-12 00:29
FromMichael Gogins
Subject[Cs-dev] Instantiation - when?
This is about both csound 5 and csound 6.

During a Csound performance, after the orchestra is compiled, there is
a linked list of INSDS *, instrument instances, each with a linked
list of opcodes, OPDS *. The performance appears to consist of calling
iterating down each opcode list on each instrument instance list, and
calling each opcode opadr in turn.

My question is this:exactly when are new opcodes and new instrument
instances inserted into these lists? Does this happen while the
above-mentioned iteration is taking place, or only after one iteration
is complete and before the next one begins?

Similarly for deactivation... are instances deactivated during the
traversal of the instrument instance list or only afterwards?

Similarly for removal from the active list... are instances removed
from the list during traversal or only afterwards?

Three, count 'em, three questions... hoping to receive three answers!

Six answers actually, 3 for 5 and 3 for 6, though I think the answers
should be the same.

Regards,
Mike
-- 
Michael Gogins
Irreducible Productions
http://www.michael-gogins.com
Michael dot Gogins at gmail dot com

------------------------------------------------------------------------------
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-09-12 09:34
FromVictor Lazzarini
SubjectRe: [Cs-dev] Instantiation - when?
On 12 Sep 2012, at 00:29, Michael Gogins wrote:

> This is about both csound 5 and csound 6.
> 
> During a Csound performance, after the orchestra is compiled, there is
> a linked list of INSDS *, instrument instances, each with a linked
> list of opcodes, OPDS *. The performance appears to consist of calling
> iterating down each opcode list on each instrument instance list, and
> calling each opcode opadr in turn.
> 
> My question is this:exactly when are new opcodes and new instrument
> instances inserted into these lists? Does this happen while the
> above-mentioned iteration is taking place, or only after one iteration
> is complete and before the next one begins?

The insertion of instruments happens when sensevents() is called in performKsmps()  at block boundaries (Top/csound.c).
This eventually calls process_score_event()  (Engine/musmon.c0 and that one issues a call to insert() (Engine/ insert.c).

> Similarly for deactivation... are instances deactivated during the
> traversal of the instrument instance list or only afterwards?

Similarly handled by sensevents(), calling timexpire() etc from Engine/insert.c, which also call deact() in the same file.

> 
> Similarly for removal from the active list... are instances removed
> from the list during traversal or only afterwards?
> 
> Three, count 'em, three questions... hoping to receive three answers!
> 
> Six answers actually, 3 for 5 and 3 for 6, though I think the answers
> should be the same.
> 
> Regards,
> Mike
> -- 
> Michael Gogins
> Irreducible Productions
> http://www.michael-gogins.com
> Michael dot Gogins at gmail dot com
> 
> ------------------------------------------------------------------------------
> 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

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




------------------------------------------------------------------------------
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