Re: [Bluemusic-devel] Some feature requests to help me write LilyPond aware instruments
Brought to you by:
kunstmusik
From: Steven Y. <ste...@gm...> - 2008-04-03 04:17:59
|
Hi Bernard, Thanks for mentioning the bug with the pre block processing (number 1). I took a look and have fixed the processing. It is now passing the lines with original formatting (it was previously trimming all lines). This is in CVS and I have placed a build at: http://www.kunstmusik.com/blue_0.123.0_beta_installer.jar http://www.kunstmusik.com/blue_0.123.0_beta.zip As for 2, I'm not sure I could get to anything like that anytime soon. Number 3, well, I could probably add something like a top. As a side note, what I'm wondering is, why use macros when you could use UDO's? Thanks, steven On Tue, Apr 1, 2008 at 2:39 PM, Bernard Hurley <be...@ph...> wrote: > Hi All, > > First I will explain what I am doing. I am into music for electronic + > live instruments. The basic idea is that some instruments could > "represent" live instruments and could produce actual sound while I am > composing, but could go into "LilyPond" mode, turning off their sound > output but producing a LilyPond score instead when I finally produce my > audio output. > > I am developing a "LilyWriter" instrument: > > A] In it's global ORC tab it would contain stuff like: > > ;[pre]{ > #define LilyWriter #<INSTR_ID># > pyinit > pyruni {{ > def hello(): > \t print "hello - let's see if this works!!!" > #------- lots of python code goes here ------- > }} > ;} > > "What's the '\t' for?" I hear you ask. Well, if it is not there, the > python ends in the CSD file as: > > def hello(): > print "hello - let's see if this works!!!" > -- etc -- > > Python doesn't like this at all!! This leads to my first request: > > Request 1: would it be possible for blue NOT to reformat the > code in an instrument's global ORC tab? - At least inside a > Csound string of the form {{ ---- }} > > If you actually type this code into blue you will find that the Python > gets highlighted as if it were Csound. Leading to: > > Request 2: Could syntax highlighting be turned off inside such > strings? > > B] The "LilyWriter" global SCO tab contains: > > i <INSTR_ID> 0 <TOTAL_DUR> > > Now other instruments can be made LilyPond aware, just by using > constructions like: > > #ifdef $LilyWriter > ----- some stuff > #endif > > This can be done inside the instrument itself or in the global ORC tab > of the instrument. The upshot of this is that if the "LilyWriter" > instrument is included in the orchestra, then it can write the LilyPond > score. I won't go into details but I it is starting to work! If it is > not included then no score is produced and maybe the Lily-aware > instruments can produce sound. All this requires is ticking one box in > blue - quite cool! > > However there is one place where this trick doesn't work - this is in > the Global orchestra for the whole project. Code typed into the "Global > Orchestra" box on the "global" tab for the project appears in the CSD > file BEFORE code tagged with [pre] in an instrument - so it is not > possible to use the macro $LilyWriter at this point. This leads to my > third request: > > Request 3: Could [pre] be implemented so that it placed code > BEFORE the project's global orchestra code? On second thought > this might break some people's blue projects - so maybe a new > tag [top] could be implemented. > > Requests 1 and 2 are not that urgent - being a matter of an ugly hack > and eye candy respectively, but it would be REALLY USEFUL to me if 3, > could be implemented. > > Thanks for reading all this! > > Regards, > > Bernard > > > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > _______________________________________________ > Bluemusic-devel mailing list > Blu...@li... > https://lists.sourceforge.net/lists/listinfo/bluemusic-devel > |