[Cs-dev] Fwd: Inside CSound code : encoding connections in the patch
Date | 2006-01-28 23:00 |
From | Nicolas =?iso-8859-1?Q?Castagn=E9?= |
Subject | [Cs-dev] Fwd: Inside CSound code : encoding connections in the patch |
Hi all ! I am currently trying to get a bit into CSound 5 code. I ve read the article available on the csounds web site ("extending Csound", "inside Csound"), and looked at the code carefully. I still do not figure out well how the Orchestra patch is encoded in memory after parsing, and before performance. More precisely, how are encoded the connection between opcodes in an instrument ? A bit more detail... opcodlst in the struct CSOUND_ has is a table of used (declared) opcodes. INSTRTXT encodes an instrument. Within INSTRTXT, nxtop points to a linked list of TEXT structures. TEXT correspond with an opcode in the instrument. It points to the global opcodlst of used opcodes. Though, I am unable to see where the connexion between the various opcodes of the instrument (ie : the 'patch' itself') is encoded... Similarly, I don't understand where the rates of the connecting datas are encoded... Could anyone give me some details ? I would also ask a similar question during performance : I understand the code of (at least simple !) opcodes, but I can't figure out where the dynamic datas interconnecting opcodes (the signals) are... Any advice of a place to look at ? Finally, I wondered if there a structural diagram of the main CSound structures (UML, for example) is available. It would help, for sure ! Thx much in advance, all the very best Nicolas -- ------------------------------------------------------------------- Dr Nicolas CASTAGNE, ACROE-ICA, Association pour la Création et la Recherche sur les Outils d'Expression, laboratoire Informatique et Création Artistique, INPG 46 av. Félix Viallet 38 000 Grenoble http://acroe.imag.fr Tel : (33) 4 76 57 46 60 ------------------------------------------------------------------- -- ------------------------------------------------------------------- Dr Nicolas CASTAGNE, ACROE-ICA, Association pour la Création et la Recherche sur les Outils d'Expression, laboratoire Informatique et Création Artistique, INPG 46 av. Félix Viallet 38 000 Grenoble http://acroe.imag.fr Tel : (33) 4 76 57 46 60 ------------------------------------------------------------------- ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642 _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2006-02-06 13:54 |
From | Nicolas =?iso-8859-1?Q?Castagn=E9?= |
Subject | [Cs-dev] How the connections in the patch are encoded in the code? |
Hi all ! I am currently trying to get a bit into CSound 5 code. Two questions in this message. ******* QUESTION 1 How are encoded in memory the connection between opcodes in an instrument template or a patch, after parsing and before performance ? A bit more detail... opcodlst in the struct CSOUND_ has is a table of used (declared) opcodes. struct INSTRTXT encodes an instrument. Within INSTRTXT, nxtop points to a linked list of TEXT structures. struct TEXT correspond with an opcode in the instrument. It points to the global opcodlst of used opcodes. Though, I am unable to see where the connection between the various opcodes of the instrument template (ie : the 'patch' itself') is encoded... ******* QUESTION 2 I would also ask a similar question during performance : I understand the code of (at least simple !) opcodes, but I can't figure out where the dynamic data interconnecting opcodes (the signals, or variables) are... Is there some sort of global list of dynamic variables ? Any advice of a place to look at ? I ve read the article available on the csounds web site ("extending Csound", "inside Csound"), and looked at the code carefully... but did not succeed to find answers to my question. Note that I posted on this subject last week, but I got no answer. Given the fact that csound 5 release came up at the same time, I guess it was difficult for you to answer... and allow myself to repost. . BTW, thank to you for this release. Have you ever been told that CSound is some sort of great software ? ;) Thx much in advance, all the very best Nicolas -- ------------------------------------------------------------------- Dr Nicolas CASTAGNE, ACROE-ICA, Association pour la Création et la Recherche sur les Outils d'Expression, laboratoire Informatique et Création Artistique, INPG 46 av. Félix Viallet 38 000 Grenoble http://acroe.imag.fr Tel : (33) 4 76 57 46 60 ------------------------------------------------------------------- -- ------------------------------------------------------------------- Dr Nicolas CASTAGNE, ACROE-ICA, Association pour la Création et la Recherche sur les Outils d'Expression, laboratoire Informatique et Création Artistique, INPG 46 av. Félix Viallet 38 000 Grenoble http://acroe.imag.fr Tel : (33) 4 76 57 46 60 ------------------------------------------------------------------- ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd_______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/csound-devel -- ------------------------------------------------------------------- Dr Nicolas CASTAGNE, ACROE-ICA, Association pour la Création et la Recherche sur les Outils d'Expression, laboratoire Informatique et Création Artistique, INPG 46 av. Félix Viallet 38 000 Grenoble http://acroe.imag.fr Tel : (33) 4 76 57 46 60 ------------------------------------------------------------------- ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642 _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2006-02-06 15:08 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] How the connections in the patch are encoded in the code? |
At 13:54 06/02/2006, you wrote: >Hi all ! > >I am currently trying to get a bit into CSound 5 code. Two questions in >this message. > >******* QUESTION 1 >How are encoded in memory the connection between opcodes in an instrument >template or a patch, after parsing and before performance ? > >A bit more detail... > >opcodlst in the struct CSOUND_ has is a table of used (declared) opcodes. >struct INSTRTXT encodes an instrument. >Within INSTRTXT, nxtop points to a linked list of TEXT structures. > >struct TEXT correspond with an opcode in the instrument. It points to the >global opcodlst of used opcodes. I'll hazard a guess, since you've asked this here before and no one answered. Perhaps you can't see it because there is no such connection. As far as I can see, Csound will allocate the space for each variable used in the code, then the instrument will read and write to these, according to the orchestra code. In that case, there is no connection, in a way. I'm not sure whether this answer your question, but at least opens the way to more informed responses. >Though, I am unable to see where the connection between the various >opcodes of the instrument template (ie : the 'patch' itself') is encoded... >Nicolas >-- >------------------------------------------------------------------- >Dr Nicolas CASTAGNE, > >ACROE-ICA, >Association pour la Création et la Recherche sur les Outils d'Expression, >laboratoire Informatique et Création Artistique, > >INPG >46 av. Félix Viallet >38 000 Grenoble >http://acroe.imag.fr > >Tel : (33) 4 76 57 46 60 >------------------------------------------------------------------- > > >-- >------------------------------------------------------------------- >Dr Nicolas CASTAGNE, > >ACROE-ICA, >Association pour la Création et la Recherche sur les Outils d'Expression, >laboratoire Informatique et Création Artistique, > >INPG >46 av. Félix Viallet >38 000 Grenoble >http://acroe.imag.fr > >Tel : (33) 4 76 57 46 60 >------------------------------------------------------------------- > > >------------------------------------------------------- >This SF.net email is sponsored by: Splunk Inc. Do you grep through log files >for problems? Stop! Download the new AJAX search engine that makes >searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! >http://sel.as-us.falkag.net/sel?cmd_______________________________________________ >Csound-devel mailing list >Csound-devel@lists.sourceforge.net >https://lists.sourceforge.net/lists/listinfo/csound-devel > > >-- >------------------------------------------------------------------- >Dr Nicolas CASTAGNE, > >ACROE-ICA, >Association pour la Création et la Recherche sur les Outils d'Expression, >laboratoire Informatique et Création Artistique, > >INPG >46 av. Félix Viallet >38 000 Grenoble >http://acroe.imag.fr > >Tel : (33) 4 76 57 46 60 >------------------------------------------------------------------- > > >------------------------------------------------------- >This SF.net email is sponsored by: Splunk Inc. Do you grep through log files >for problems? Stop! Download the new AJAX search engine that makes >searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! >http://sel.as-us.falkag.net/sel?cmdlnk&kid3432&bid#0486&dat1642 >_______________________________________________ >Csound-devel mailing list >Csound-devel@lists.sourceforge.net >https://lists.sourceforge.net/lists/listinfo/csound-devel Victor Lazzarini Music Technology Laboratory Music Department National University of Ireland, Maynooth ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642 _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2006-02-06 15:21 |
From | Nicolas =?iso-8859-1?Q?Castagn=E9?= |
Subject | Re: [Cs-dev] How the connections in the patch are encoded in the code? |
Thx much Victor for your 'opening' answer ! ;) >As far as I can >see, Csound will allocate the space for each variable used in the code, then >the instrument will read and write to these, according to the orchestra code. >In that case, there is no connection, in a way. Indeed, this is what I was guessing ;) : the patch is "encoded" in memory by directly referring the IN/OUT of an opcode to the place where the value is to be read/written. Possible more detailed questions are : - in the instrument templates, where are the **pointers** (or reference id) to the variables to be read/written ? - during synthesis, in the allocated instruments, where are the **pointers** to the allocated variables? I guess it uses through C pointers within the private data of opcodes... - is there a 'variable space' ? Something like a dynamically allocated float array in struct CSOUND_ ? - when/where does the allocation of the variables occur ? >At 13:54 06/02/2006, you wrote: >>Hi all ! >> >>I am currently trying to get a bit into CSound >>5 code. Two questions in this message. >> >>******* QUESTION 1 >>How are encoded in memory the connection >>between opcodes in an instrument template or a >>patch, after parsing and before performance ? >> >>A bit more detail... >> >>opcodlst in the struct CSOUND_ has is a table of used (declared) opcodes. >>struct INSTRTXT encodes an instrument. >>Within INSTRTXT, nxtop points to a linked list of TEXT structures. >> >>struct TEXT correspond with an opcode in the >>instrument. It points to the global opcodlst of >>used opcodes. > >Victor Lazzarini |
Date | 2006-02-06 16:14 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] How the connections in the patch are encoded in the code? |
I'd say the variable space is a list of AUXCH structures for each instrument. These would be allocated when the first performance of an instrument occurs; subsequent performance (if not concomitant) would take over that space. At 15:21 06/02/2006, you wrote: >- is there a 'variable space' ? Something like a dynamically allocated >float array in struct CSOUND_ ? Victor Lazzarini Music Technology Laboratory Music Department National University of Ireland, Maynooth ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2006-02-06 16:58 |
From | Istvan Varga |
Subject | Re: [Cs-dev] How the connections in the patch are encoded in the code? |
Attachments | None |