[Cs-dev] separated csoundParseOrc and csoundCompileOrc
Date | 2012-04-25 10:05 |
From | Tito Latini |
Subject | [Cs-dev] separated csoundParseOrc and csoundCompileOrc |
Attachments | None |
Date | 2012-04-25 10:32 |
From | Tito Latini |
Subject | Re: [Cs-dev] separated csoundParseOrc and csoundCompileOrc |
Attachments | None None |
> - to write csoundCompileSco
sorry, it is a misname; it is necessary a function to set csound->scorestr tito |
Date | 2012-04-25 10:42 |
From | Tito Latini |
Subject | Re: [Cs-dev] separated csoundParseOrc and csoundCompileOrc |
Attachments | None |
Date | 2012-04-25 10:47 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] separated csoundParseOrc and csoundCompileOrc |
Sounds like a good first step. To keep (for the moment) backwards compatibility with frontends we could have csoundCompile() to call these two in a sequence. I guess you were probably already planning that. Victor On 25 Apr 2012, at 10:05, Tito Latini wrote: > I have separated (not applied) `csoundParseOrc' and `csoundCompileOrc'. > > changes: > > - moved ORCTOKEN and TREE in csound.h > > - new API: > PUBLIC TREE *csoundParseOrc(CSOUND *csound, char *str); > PUBLIC int csoundCompileOrc(CSOUND *csound, TREE *root); > > - removed `new_orc_parser' and `csound_orc_compile' > > > next steps: > > - to think a way to call `csoundLoadExternals' and > `csoundInitModules' from the API > > (I think that csoundPreCompile is not a good place) > > - to write csoundCompileSco > > - to think a way to call `musmon' from the API > > After these steps, it is possible to parse and compile orchestra > and score using the API, without osc/sco files. The old behavior > (orc+sco) is unchanged. > > tito > > ------------------------------------------------------------------------------ > 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 |
Date | 2012-04-25 12:37 |
From | Tito Latini |
Subject | Re: [Cs-dev] separated csoundParseOrc and csoundCompileOrc |
Attachments | None |
Date | 2012-04-25 12:58 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] separated csoundParseOrc and csoundCompileOrc |
what about? csoundLoadModules() csoundReadScore() or csoundSortScore() Victor On 25 Apr 2012, at 12:37, Tito Latini wrote: > Applied. > > The next step is only a problem with the function-names for the API. > We have need of > > - a name for a function that calls `csoundLoadExternals' > and `csoundInitModules' > > - a name for a function that sets `csound->scorestr' > and calls `scsortstr' > > I think that csoundParseSco is securely a misname. > > - a name for a function that calls `musmon' > > tito > > ------------------------------------------------------------------------------ > 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 |
Date | 2012-04-25 13:00 |
From | Tito Latini |
Subject | Re: [Cs-dev] separated csoundParseOrc and csoundCompileOrc |
Attachments | None |
Date | 2012-04-25 13:11 |
From | Michael Gogins |
Subject | Re: [Cs-dev] separated csoundParseOrc and csoundCompileOrc |
Sounds good! The next thing I would like to see is hook functions to be called whenever Csound (a) needs to create an instrument template and (b) needs to create a new instance of an instrument from that template (and (c), (d), etc. whatever Csound needs to call to manage the whole lifecycle of the instrument instance), together with such other types and functions that an externally written and compiled instrument template would need to be managed by Csound. We already pretty much have this for opcodes with plugin opcodes and the module system. The module loading functions are kind of generic and perhaps they can do some of this work if there are suitable instrument template and instance management functions in the API that the just loaded module could call, e.g. to install template creation and instr instantiation callbacks. Regards, Mike On Wed, Apr 25, 2012 at 5:05 AM, Tito Latini |
Date | 2012-04-25 13:34 |
From | Tito Latini |
Subject | Re: [Cs-dev] separated csoundParseOrc and csoundCompileOrc |
Attachments | None |
Date | 2012-04-25 13:45 |
From | Michael Gogins |
Subject | Re: [Cs-dev] separated csoundParseOrc and csoundCompileOrc |
Yes, that is what I was talking about. But the module that is loaded, which in this use case contains an instrument template written and compiled in another language, needs to write this template up with Csound for performance. So there need to be API functions to register callbacks that Csound will call, and Csound needs to have tables of these callbacks and hooks to call them during performance. Regards, Mike On Wed, Apr 25, 2012 at 8:34 AM, Tito Latini |
Date | 2012-04-25 13:56 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] separated csoundParseOrc and csoundCompileOrc |
Oh, yes, of course. I think the existing csoundLoadModules() should be renamed csoundLoadLibraries(). Victor On 25 Apr 2012, at 13:34, Tito Latini wrote: > `csoundLoadModules' already exists in csmodule.c > > On Wed, Apr 25, 2012 at 12:58:09PM +0100, Victor Lazzarini wrote: >> what about? >> >> csoundLoadModules() >> csoundReadScore() or csoundSortScore() >> >> Victor >> On 25 Apr 2012, at 12:37, Tito Latini wrote: >> >>> Applied. >>> >>> The next step is only a problem with the function-names for the API. >>> We have need of >>> >>> - a name for a function that calls `csoundLoadExternals' >>> and `csoundInitModules' >>> >>> - a name for a function that sets `csound->scorestr' >>> and calls `scsortstr' >>> >>> I think that csoundParseSco is securely a misname. >>> >>> - a name for a function that calls `musmon' >>> >>> tito >>> >>> ------------------------------------------------------------------------------ >>> 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 >> 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 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 |
Date | 2012-04-25 14:09 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] separated csoundParseOrc and csoundCompileOrc |
In fact, a bit of refactoring here is in order. We have two functions that do similar jobs: csoundLoadExternals() called from argdecode.c and main.c (command-line libraries) and csoundLoadModules() called in csoundPreCompile() (csound.c) (libraries in OPCODEDIR) I am pretty sure these can be merged somehow into a single csoundLoadModules(). Victor On 25 Apr 2012, at 13:56, Victor Lazzarini wrote: > Oh, yes, of course. > > I think the existing csoundLoadModules() should be renamed csoundLoadLibraries(). > > Victor > > On 25 Apr 2012, at 13:34, Tito Latini wrote: > >> `csoundLoadModules' already exists in csmodule.c >> >> On Wed, Apr 25, 2012 at 12:58:09PM +0100, Victor Lazzarini wrote: >>> what about? >>> >>> csoundLoadModules() >>> csoundReadScore() or csoundSortScore() >>> >>> Victor >>> On 25 Apr 2012, at 12:37, Tito Latini wrote: >>> >>>> Applied. >>>> >>>> The next step is only a problem with the function-names for the API. >>>> We have need of >>>> >>>> - a name for a function that calls `csoundLoadExternals' >>>> and `csoundInitModules' >>>> >>>> - a name for a function that sets `csound->scorestr' >>>> and calls `scsortstr' >>>> >>>> I think that csoundParseSco is securely a misname. >>>> >>>> - a name for a function that calls `musmon' >>>> >>>> tito >>>> >>>> ------------------------------------------------------------------------------ >>>> 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 >>> 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 > > 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 > 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 |
Date | 2012-04-25 14:16 |
From | jpff@cs.bath.ac.uk |
Subject | Re: [Cs-dev] separated csoundParseOrc and csoundCompileOrc |
All part of the clash of the original csound5 design to load modules that were needed and the alternative to load everything > In fact, a bit of refactoring here is in order. We have two functions > that do similar jobs: > > csoundLoadExternals() called from argdecode.c and main.c (command-line > libraries) > and > csoundLoadModules() called in csoundPreCompile() (csound.c) (libraries in > OPCODEDIR) > > I am pretty sure these can be merged somehow into a single > csoundLoadModules(). > > Victor > On 25 Apr 2012, at 13:56, Victor Lazzarini wrote: > >> Oh, yes, of course. >> >> I think the existing csoundLoadModules() should be renamed >> csoundLoadLibraries(). >> >> Victor >> >> On 25 Apr 2012, at 13:34, Tito Latini wrote: >> >>> `csoundLoadModules' already exists in csmodule.c >>> >>> On Wed, Apr 25, 2012 at 12:58:09PM +0100, Victor Lazzarini wrote: >>>> what about? >>>> >>>> csoundLoadModules() >>>> csoundReadScore() or csoundSortScore() >>>> >>>> Victor >>>> On 25 Apr 2012, at 12:37, Tito Latini wrote: >>>> >>>>> Applied. >>>>> >>>>> The next step is only a problem with the function-names for the API. >>>>> We have need of >>>>> >>>>> - a name for a function that calls `csoundLoadExternals' >>>>> and `csoundInitModules' >>>>> >>>>> - a name for a function that sets `csound->scorestr' >>>>> and calls `scsortstr' >>>>> >>>>> I think that csoundParseSco is securely a misname. >>>>> >>>>> - a name for a function that calls `musmon' >>>>> >>>>> tito >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> 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 >>>> 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 >> >> 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 >> 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 > 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 |
Date | 2012-04-25 14:25 |
From | Tito Latini |
Subject | Re: [Cs-dev] separated csoundParseOrc and csoundCompileOrc |
Attachments | None |
Date | 2012-04-25 14:27 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] separated csoundParseOrc and csoundCompileOrc |
Should we try to implement some sort of dynamic loading? Modules on OPCODEDIR and command-line could be parsed and then loaded only if an opcode is used. Victor On 25 Apr 2012, at 14:16, jpff@cs.bath.ac.uk wrote: > All part of the clash of the original csound5 design to load modules that > were needed and the alternative to load everything > > >> In fact, a bit of refactoring here is in order. We have two functions >> that do similar jobs: >> >> csoundLoadExternals() called from argdecode.c and main.c (command-line >> libraries) >> and >> csoundLoadModules() called in csoundPreCompile() (csound.c) (libraries in >> OPCODEDIR) >> >> I am pretty sure these can be merged somehow into a single >> csoundLoadModules(). >> >> Victor >> On 25 Apr 2012, at 13:56, Victor Lazzarini wrote: >> >>> Oh, yes, of course. >>> >>> I think the existing csoundLoadModules() should be renamed >>> csoundLoadLibraries(). >>> >>> Victor >>> >>> On 25 Apr 2012, at 13:34, Tito Latini wrote: >>> >>>> `csoundLoadModules' already exists in csmodule.c >>>> >>>> On Wed, Apr 25, 2012 at 12:58:09PM +0100, Victor Lazzarini wrote: >>>>> what about? >>>>> >>>>> csoundLoadModules() >>>>> csoundReadScore() or csoundSortScore() >>>>> >>>>> Victor >>>>> On 25 Apr 2012, at 12:37, Tito Latini wrote: >>>>> >>>>>> Applied. >>>>>> >>>>>> The next step is only a problem with the function-names for the API. >>>>>> We have need of >>>>>> >>>>>> - a name for a function that calls `csoundLoadExternals' >>>>>> and `csoundInitModules' >>>>>> >>>>>> - a name for a function that sets `csound->scorestr' >>>>>> and calls `scsortstr' >>>>>> >>>>>> I think that csoundParseSco is securely a misname. >>>>>> >>>>>> - a name for a function that calls `musmon' >>>>>> >>>>>> tito >>>>>> >>>>>> ------------------------------------------------------------------------------ >>>>>> 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 >>>>> 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 >>> >>> 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 >>> 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 >> 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 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 |
Date | 2012-04-25 21:48 |
From | Michael Gogins |
Subject | Re: [Cs-dev] separated csoundParseOrc and csoundCompileOrc |
I believe "module" is technically correct. Libraries may be statically linked, dynamically linked, or dynamically loaded. A module is a library that is not dynamically linked, it is dynamically loaded. That is what all the plugins in Csound are. Regards, Mike On Wed, Apr 25, 2012 at 8:56 AM, Victor Lazzarini |
Date | 2012-04-26 02:16 |
From | Adam Puckett |
Subject | Re: [Cs-dev] separated csoundParseOrc and csoundCompileOrc |
What's the difference between dynamic linking and dynamic loading? On 4/25/12, Michael Gogins |
Date | 2012-04-26 02:54 |
From | Michael Gogins |
Subject | Re: [Cs-dev] separated csoundParseOrc and csoundCompileOrc |
Attachments | None None |
Dynamic linking is done by the compiler and linker at compile time, dynamic loading is done by the application at run time. I'll try to make this clear. Code contains objects, named areas of memory. The object thus consists of a "symbol" or name plus an address pointing to the area of memory where the value of the object is stored. Functions are important objects -- the symbol is the function name and the object is the executable code for the function, which is located somewhere in memory.
When the compiler and linker build a program, one of the important things that the linker does is to bind functions by taking their names and finding out the actual addresses of the code for those functions. For a static library, this is done by the linker at link time. All the code for all the functions is simply built right into the program and so the addresses are fixed for all time. For a shared library, this is done by a part of the operating system called the linking loader.
For a dynamic library, the linker has already created the symbols in the application just as with a statically linked library, but it has left the addresses blank. The linker has also embedded the name of the shared library in the application. The linking loader automatically reads this name, finds the library somehow (that's a whole story unto itself), loads the library, finds the actual addresses of all the symbols, and writes those addresses into the blank values of the symbols. That's runtime binding.
For a module, i.e. for dynamic loading, the compiler and linker do not know in advance the name of the shared library, and have not built any shared library names or import symbols into the application. The application get this name, or names, by scanning a directory, reading a configuration file, or something like that. Then the application loads the shared library (using dlopen on Linux), and the application binds the address of a function in the library to a symbol, usually a function pointer (using dlsym on Linux).
So the difference between dynamic linking and dynamic loading is that with dynamic linking the functions are linked at compile time and automatically bound by the operating system at run time, but with dynamic loading the functions are both linked and bound at run time by the application itself.
Hope this helps, Mike On Wed, Apr 25, 2012 at 9:16 PM, Adam Puckett <adotsdothmusic@gmail.com> wrote:
What's the difference between dynamic linking and dynamic loading? Michael Gogins Irreducible Productions http://www.michael-gogins.com Michael dot Gogins at gmail dot com |
Date | 2012-04-26 13:45 |
From | Felipe Sateler |
Subject | Re: [Cs-dev] separated csoundParseOrc and csoundCompileOrc |
I'd like to add one thing to Michaels (very complete) explanation. The reasons dynamic loading exists (or, more accurately, why it is relevant for csound) are mainly two: 1. You cannot mark a _linked_ library as optional, thus the whole application fails if one library cannot be loaded (think the python opcodes lib requiring the python library). A _loaded_ library can just be discarded if it fails. 2. You need to know at build time to which libraries you will link against. This means third parties cannot provide plugins unless they are dynamically loaded at runtime. On Wed, Apr 25, 2012 at 22:54, Michael Gogins |
Date | 2012-04-26 14:29 |
From | Andres Cabrera |
Subject | Re: [Cs-dev] separated csoundParseOrc and csoundCompileOrc |
Hi, On OS X you can do some sort of dynamic linking which doesn't bind the symbols of the dynamic library until they are used. This is a nice facility which simplifies distribution of applications with optional dependencies. Does Linux have something like that? Cheers, Andrés On Thu, Apr 26, 2012 at 1:45 PM, Felipe Sateler |
Date | 2012-04-26 14:54 |
From | Felipe Sateler |
Subject | Re: [Cs-dev] separated csoundParseOrc and csoundCompileOrc |
You mean lazy loading + weak symbols? As far as I can tell, this helps with using different versions of a library (ie, use a newer API function only if the library installed is actually new), but it doesn't help when the library is absent. Do you have a name for that facility that I can google? On Thu, Apr 26, 2012 at 10:29, Andres Cabrera |
Date | 2012-04-26 15:06 |
From | Michael Gogins |
Subject | Re: [Cs-dev] separated csoundParseOrc and csoundCompileOrc |
Attachments | None None |
It is case 2 that is most relevant for Csound. We have plugin opcodes and hope to have plugin instruments and perhaps plugin other things (drivers, parsers, ...?). Regards, Mike
On Thu, Apr 26, 2012 at 8:45 AM, Felipe Sateler <fsateler@gmail.com> wrote: I'd like to add one thing to Michaels (very complete) explanation. The Michael Gogins Irreducible Productions http://www.michael-gogins.com Michael dot Gogins at gmail dot com |
Date | 2012-04-26 15:12 |
From | Andres Cabrera |
Subject | Re: [Cs-dev] separated csoundParseOrc and csoundCompileOrc |
Hi, You may be right that it's just that. I haven't used the facility, it's something I've heard... Cheers, Andrés On Thu, Apr 26, 2012 at 2:54 PM, Felipe Sateler |