Thread: [Lily4jedit-devel] My near plans
Brought to you by:
fodber
From: Joshua K. <jos...@gm...> - 2004-11-23 03:14:20
|
Hi, here is some stuff I planning to work on for lilytool. 1. Convert To Lilypond macro. and support for MusicXML. A macro which allow user to chose a file (eg. midi or musicxml) and convert it into a new file or replace the buffer file, something like the convert to newer version function. I have tried Xalan on the command line with xml2ly. I'm not sure if i should import the jars into lilytool. One way i think of doing is to allow user to specify path to the jar (or maybe to another xslt processor). I tried to create some transcent classes with XSLTC but didnt work out for me. I also find that inserting a \version "1.7.0" from the generate ly is quite usefully as it can be converted to the newest version easily (xml2ly was using a slightly older syntax). As xml2ly give absolutes pitches, I tempted now to write a macro to convert absolute pitches in selection to relative pitches. 2. Learning how to use the macrohelper classes - to find out whats the pitch/duration of the note in the buffer so its possible to edit it, and to be able to insert relative notes from the "Piano input mode". - improving someother functions that uses the helper classes. Bert, do you think for articulations/appendnotes macro, instead of checking if cursor is infront of notes, but notes behind the selection/cursor should be placed into the iterator maybe by search for the next space. This way, a selection of notes hightlighted, by not hightlighted thru out would work as well. eg. {a b c}is can covert correctly to a-> b-> cis-> instead of a-> b-> c->is {} is where highlight stops and end. About the what beat, is it possible to backmatch more to find the duration of the notes if not yet known. Or could the values of note be stored in the sidekick parser? 3. Note visualiser I'm thinking of modifing Nifty from http://niffty.sourceforge.net for displaying notes. What do you think? 4. After all these, I can work on to integrate these into the Keyboard class to make sure all is working esp. the Keybindings Actions. 5. Then, I'll try to improve on the playback experience - score and midi. I'll hope to bring good news in time to come! Joshua |
From: Bertalan F. <fo...@fr...> - 2004-11-23 10:09:33
|
Joshua Koo wrote: >Convert To Lilypond macro. and support for MusicXML. > > > That's a good idea. Xalan is included in the XSLT plugin, so we can make a dependency and use it. XSLTC is somehow too rigorous, but JDK 5 uses this as default xslt processor. >2. Learning how to use the macrohelper classes > - to find out whats the pitch/duration of the note in the buffer so >its possible to edit it, and to be able to insert relative notes from >the "Piano input mode". > > I hope that won't be too difficult. But perhaps they need some more hacking. If you decide to change something important, please ask me. >This way, a selection of notes hightlighted, by >not hightlighted thru out would work as well. >eg. {a b c}is can covert correctly to a-> b-> cis-> instead of a-> b-> c->is >{} is where highlight stops and end. > > Have you updated your installation to the last CVS version? That does work exactly like that. And I'd like to note that a growSelection() method has been added that will expand the current selection to the notes. >About the what beat, is it possible to backmatch more to find the >duration of the notes if not yet known. Or could the values of note be >stored in the sidekick parser? > > Yes, I will make the what-beat macro work this way. >3. Note visualiser >I'm thinking of modifing Nifty from http://niffty.sourceforge.net for >displaying notes. What do you think? > > Lilypond's syntax is so flexible, that our visualization will be very limited. But it really can be useful. >4. After all these, I can work on to integrate these into the Keyboard >class to make sure all is working esp. the Keybindings Actions. > > Great, however, I'd prefer quick insert mode on visualization. >5. Then, I'll try to improve on the playback experience - score and midi. > > Fine, as you wish :-) Thanks, Bert |
From: Joshua K. <jos...@gm...> - 2004-11-24 00:50:58
|
Thanks Bert for your reply. > > > That's a good idea. Xalan is included in the XSLT plugin, so we can make > a dependency and use it. XSLTC is somehow too rigorous, but JDK 5 uses > this as default xslt processor. > > >2. Learning how to use the macrohelper classes > > - to find out whats the pitch/duration of the note in the buffer so > >its possible to edit it, and to be able to insert relative notes from > >the "Piano input mode". > > > > > I hope that won't be too difficult. But perhaps they need some more > hacking. If you decide to change something important, please ask me. > > >This way, a selection of notes hightlighted, by > >not hightlighted thru out would work as well. > >eg. {a b c}is can covert correctly to a-> b-> cis-> instead of a-> b-> c->is > >{} is where highlight stops and end. > > > > > Have you updated your installation to the last CVS version? That does > work exactly like that. And I'd like to note that a growSelection() > method has been added that will expand the current selection to the notes. > > >About the what beat, is it possible to backmatch more to find the > >duration of the notes if not yet known. Or could the values of note be > >stored in the sidekick parser? > > > > > Yes, I will make the what-beat macro work this way. > > >3. Note visualiser > >I'm thinking of modifing Nifty from http://niffty.sourceforge.net for > >displaying notes. What do you think? > > > > > Lilypond's syntax is so flexible, that our visualization will be very > limited. But it really can be useful. > > >4. After all these, I can work on to integrate these into the Keyboard > >class to make sure all is working esp. the Keybindings Actions. > > > > > Great, however, I'd prefer quick insert mode on visualization. > > >5. Then, I'll try to improve on the playback experience - score and midi. > > > > > Fine, as you wish :-) > > Thanks, > > Bert > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://productguide.itmanagersjournal.com/ > _______________________________________________ > Lily4jedit-devel mailing list > Lil...@li... > https://lists.sourceforge.net/lists/listinfo/lily4jedit-devel > |
From: Joshua K. <jos...@gm...> - 2004-11-24 01:22:25
|
ARrr.. sorry my pc in school ran out of memory and then the mail was accidently sent before i could finish my mail.. > > That's a good idea. Xalan is included in the XSLT plugin, so we can make > > a dependency and use it. XSLTC is somehow too rigorous, but JDK 5 uses > > this as default xslt processor. Thanks for the info, I found out that Xalan in included in JDK 2 (1.2) too... so actually there is not need to download the xslt plugin as it will be an extra 2.1 MB for users. However, now I run into new problems... where should i place Guido Amoruso's xml2ly files? If they are placed in the jar files, i cant run the command line on them. And im not sure how the getClass().getResource() will work with the classes, but i'll just try... that why i was thinking using XSLTC would solve the problem because it would generate the translet classes so u wont need to specify the stylesheets. > > >2. Learning how to use the macrohelper classes > > > - to find out whats the pitch/duration of the note in the buffer so > > >its possible to edit it, and to be able to insert relative notes from > > >the "Piano input mode". > > I hope that won't be too difficult. But perhaps they need some more > > hacking. If you decide to change something important, please ask me. Sure... I think the classes are quite usefully now... I'll ask you when items come to my mind. > > >This way, a selection of notes hightlighted, by > > >not hightlighted thru out would work as well. > > >eg. {a b c}is can covert correctly to a-> b-> cis-> instead of a-> b-> c->is > > >{} is where highlight stops and end. > > > > > > > > Have you updated your installation to the last CVS version? That does > > work exactly like that. And I'd like to note that a growSelection() > > method has been added that will expand the current selection to the notes. Thats great! > > >About the what beat, is it possible to backmatch more to find the > > >duration of the notes if not yet known. Or could the values of note be > > >stored in the sidekick parser? > > > > > > > > Yes, I will make the what-beat macro work this way. Cool > > >3. Note visualiser > > >I'm thinking of modifing Nifty from http://niffty.sourceforge.net for > > >displaying notes. What do you think? > > > > > > > > Lilypond's syntax is so flexible, that our visualization will be very > > limited. But it really can be useful. Ha... after trying to study their sources... i got a little scared... They have many class files just for displaying... It may take me some time to understand using it. Btw have you tired Roudoudou ( http://roudoudou.sourceforge.net/ )? Seems a pity that the project is not complete. Their method of rendering is using images. Anyway, if you are wondering why Alt-Tab sometimes dun return jedit view from J-Dvi, I guess is because everytime u move ur mouse over the jdvi, focus is returned to the jdvi window. |
From: Joshua K. <jos...@gm...> - 2004-11-25 00:04:54
|
Thanks Bert again... Actually I sort of figured that yesterday (getting url was the key point)... but I got too sleepy before I could send another mail or update the cvs. Anyway my way of implementation was writing the result stream into a completely new file, i thought that adding to the buffer was make the ly file messy esp. huge musicxml imports. anyway, I have just commited an "unstable" version into the cvs , so u might like to check it out. about the UnixName thingy... you are correct... I did run into problems... after using my regex to replace the characters all the spaces with a backslash infront, the command seems ok. except the lilypond process do not starts. I check the activity log, its says, lilypond cygdrive/c/folder\ with\ spaces/test.ly <--- this is okay cd cygdrive/c/folder\ with\ spaces/ ; cygdrive/c/folder\\ with\\ spaces/test.ly <--- nothing happens after this typing the first line into the bash would work. but i do not know why is there double slashes in the second line. Time to rush to school! see Ya Joshua On Wed, 24 Nov 2004 20:55:40 +0100, Bertalan Fodor <fo...@fr...> wrote: > > >However, now I run into new problems... where should i place Guido > >Amoruso's xml2ly files? > > > Nowhere. We should really use XSLT, but no translet classes but the XSL > stylesheets. I'm sure they work with the XSLT classes. > See, that's all (in a draft): > factory=TransformerFactory.newInstance(); > source=new > StreamSource(getClass().getResource("something.xsl").openStream()); > (or: source=new StreamSource(new > URL("jeditresource://LilyPondTool.jar!/something.xsl").openStream())) > transformer=factory.newTransformer(source); > writer=new StringWriter(); > transformer.transform(new > StreamSource(getClass().getResource("file.xml").openStream), new > StreamResult(writer)); > textArea.setText(writer.toString()); > > Quite simple, isn't it? > > > >Sure... I think the classes are quite usefully now... I'll ask you > >when items come to my mind. > > > > > > > OK. > > >Ha... after trying to study their sources... i got a little scared... > >They have many class files just for displaying... It may take me some > >time to understand using it. > > > > > The problem is the syntax. Many lexer states, lots of token types etc. > > >Btw have you tired Roudoudou ( http://roudoudou.sourceforge.net/ )? > >Seems a pity that the project is not complete. Their method of > >rendering is using images. > > > > > I don't think that that project is ever could be finished, because it > was conceptionally bad. > > >Anyway, if you are wondering why Alt-Tab sometimes dun return jedit > >view from J-Dvi, I guess is because everytime u move ur mouse over the > >jdvi, focus is returned to the jdvi window. > > > > > Yeah! That's a good idea! > > Bert > |
From: Johannes S. <Joh...@gm...> - 2004-11-25 12:23:34
|
Hi, On Thu, 25 Nov 2004, Joshua Koo wrote: > I check the activity log, its says, > lilypond cygdrive/c/folder\ with\ spaces/test.ly <--- this is okay > cd cygdrive/c/folder\ with\ spaces/ ; cygdrive/c/folder\\ with\\ > spaces/test.ly <--- nothing happens after this In the second line, did you leave out "lilypond" on purpose? Hth, Dscho P.S.: You do awesome work! I am busy until the end of the year, but after that I plan to participate more actively in lily4jedit again... |
From: Bertalan F. <fo...@fr...> - 2004-11-24 19:55:56
|
>However, now I run into new problems... where should i place Guido >Amoruso's xml2ly files? > Nowhere. We should really use XSLT, but no translet classes but the XSL stylesheets. I'm sure they work with the XSLT classes. See, that's all (in a draft): factory=TransformerFactory.newInstance(); source=new StreamSource(getClass().getResource("something.xsl").openStream()); (or: source=new StreamSource(new URL("jeditresource://LilyPondTool.jar!/something.xsl").openStream())) transformer=factory.newTransformer(source); writer=new StringWriter(); transformer.transform(new StreamSource(getClass().getResource("file.xml").openStream), new StreamResult(writer)); textArea.setText(writer.toString()); Quite simple, isn't it? >Sure... I think the classes are quite usefully now... I'll ask you >when items come to my mind. > > > OK. >Ha... after trying to study their sources... i got a little scared... >They have many class files just for displaying... It may take me some >time to understand using it. > > The problem is the syntax. Many lexer states, lots of token types etc. >Btw have you tired Roudoudou ( http://roudoudou.sourceforge.net/ )? >Seems a pity that the project is not complete. Their method of >rendering is using images. > > I don't think that that project is ever could be finished, because it was conceptionally bad. >Anyway, if you are wondering why Alt-Tab sometimes dun return jedit >view from J-Dvi, I guess is because everytime u move ur mouse over the >jdvi, focus is returned to the jdvi window. > > Yeah! That's a good idea! Bert |