lily4jedit-devel Mailing List for LilyPondTool for JEdit (Page 11)
Brought to you by:
fodber
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(13) |
Jun
(23) |
Jul
(7) |
Aug
(3) |
Sep
|
Oct
(5) |
Nov
(46) |
Dec
(28) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(36) |
Feb
(4) |
Mar
(67) |
Apr
(12) |
May
|
Jun
|
Jul
(8) |
Aug
|
Sep
(2) |
Oct
|
Nov
(11) |
Dec
(3) |
2006 |
Jan
(10) |
Feb
(3) |
Mar
(5) |
Apr
(2) |
May
(8) |
Jun
(1) |
Jul
(1) |
Aug
(3) |
Sep
(3) |
Oct
(3) |
Nov
(1) |
Dec
|
2007 |
Jan
|
Feb
(3) |
Mar
|
Apr
|
May
(4) |
Jun
(5) |
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2008 |
Jan
(3) |
Feb
|
Mar
(14) |
Apr
(11) |
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(5) |
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
2011 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Bertalan F. <fo...@fr...> - 2004-12-07 11:14:25
|
LilyPondTool requires jEdit 4.2 final - jedit 04.02.99.00 - you have pre13 ErrorListPlugin 1.3.2 SideKickPlugin 0.3.1 TemplatesPlugin 3.3.0 ConsolePlugin 3.7.1 JakartaCommonsPlugin 0.4.3 Bert |
From: Joshua K. <zz...@la...> - 2004-12-07 00:48:34
|
This happens not only on my school's pc but my home's pc too. Its seems to have a little versioning problems. When i downloaded the latest lilyjhelp, ant complained that the class version is not compatible also. (something like should be .48 rather than .49.... cant remember the details though... i'll shall update the cvs... i'll still testing on the note converter because it seems buggy for me for now [notice] jEdit: Loading edit mode C:\Program Files\jEdit 4.2pre13\jEdit\modes\lilypond.xml [notice] jEdit: Loading edit mode C:\Program Files\jEdit 4.2pre13\jEdit\modes\scheme.xml [debug] jEdit: Loading services from jeditresource:/SideKick.jar!/services.xml [debug] EditBus: BufferUpdate[what=PROPERTIES_CHANGED,view=null,source=bbc5m3.ly (C:\TEMP\)] [debug] EditBus: BufferUpdate[what=LOADED,view=null,source=bbc5m3.ly (C:\TEMP\)] [debug] EditBus: BufferUpdate[what=PROPERTIES_CHANGED,view=null,source=buffer.ly (C:\TEMP\lily\)] [error] EditPlugin$JAR: Error while starting plugin lilytool.LilyToolPlugin [error] EditPlugin$JAR: java.lang.UnsupportedClassVersionError: lilytool/LilyToolPlugin (Unsupported major.minor version 49.0) [error] EditPlugin$JAR: at java.lang.ClassLoader.defineClass0(Native Method) [error] EditPlugin$JAR: at java.lang.ClassLoader.defineClass(Unknown Source) [error] EditPlugin$JAR: at java.lang Thanks, Joshua ======= At 2004-12-06, 19:52:59 you wrote: ======= > > >Joshua Koo wrote: > >>I'm not sure if the problem lies only with this computer, but during startup, >> >>It shows: >>Plugin Error >> >>....UnsupportedClassVersionError: lilytool.... >>Try updating to the newer version of the plugin. >> >> >> >What's in the activity log? At me it works. > >>Also about the NoteIterator, >> mes="a\\set tupletSpannerDuration = #(ly:make-moment 2 8\na )"; >> iter=new NoteIterator(mes); >> assertEquals("a a", appendElems(iter)); >> >> >> mes=" \\grace { \n\\override Stem #'stroke-style = >>#\"grace\"\ne'16(\\revert Stem #'stroke-style }\nfis'2)~"; >> iter=new NoteIterator(mes); >> assertEquals("e'16 fis'2", appendElems(iter)); >> >>fails the NoteIteratorTest. >> >> >> >Would you put these among the unit tests? > >Bert > > = = = = = = = = = = = = = = = = = = = = Best regards. Joshua KooOOoOOo zz...@la... 2004-12-07 Created with Foxmail 5.0 e-mail client. You can get it at http://www.GoodFreeSoftware.netfirms.com |
From: Bertalan F. <fo...@fr...> - 2004-12-06 11:50:51
|
Joshua Koo wrote: >I'm not sure if the problem lies only with this computer, but during startup, > >It shows: >Plugin Error > >....UnsupportedClassVersionError: lilytool.... >Try updating to the newer version of the plugin. > > > What's in the activity log? At me it works. >Also about the NoteIterator, > mes="a\\set tupletSpannerDuration = #(ly:make-moment 2 8\na )"; > iter=new NoteIterator(mes); > assertEquals("a a", appendElems(iter)); > > > mes=" \\grace { \n\\override Stem #'stroke-style = >#\"grace\"\ne'16(\\revert Stem #'stroke-style }\nfis'2)~"; > iter=new NoteIterator(mes); > assertEquals("e'16 fis'2", appendElems(iter)); > >fails the NoteIteratorTest. > > > Would you put these among the unit tests? Bert |
From: Joshua K. <jos...@gm...> - 2004-12-06 02:38:48
|
I'm not sure if the problem lies only with this computer, but during startup, It shows: Plugin Error ....UnsupportedClassVersionError: lilytool.... Try updating to the newer version of the plugin. After this jEdit hangs and I have to kill javaw from the task manager. Also about the NoteIterator, mes="a\\set tupletSpannerDuration = #(ly:make-moment 2 8\na )"; iter=new NoteIterator(mes); assertEquals("a a", appendElems(iter)); mes=" \\grace { \n\\override Stem #'stroke-style = #\"grace\"\ne'16(\\revert Stem #'stroke-style }\nfis'2)~"; iter=new NoteIterator(mes); assertEquals("e'16 fis'2", appendElems(iter)); fails the NoteIteratorTest. |
From: Bertalan F. <fo...@fr...> - 2004-12-01 22:21:03
|
Wow! It is great you invest so much work in our project. Bert |
From: Joshua K. <zz...@la...> - 2004-12-01 21:10:26
|
Updates. Added more junit tests. Managed to trace why the converter didnt work previously There was a bug in the method getRelativeOctave() of NoteIterator and I got stuck at there for 4 hours. I created 2 workarounds in which in chose the second. The 1st doesnt seem to work very well. You might want to modify it again. Added getPitchPos as getPos do not take into consideration of octaves. Added 2 methods for retreving duration from Note class. I think Fraction can be a good way of storing the duration. Thanks for your Notes. Its now implemented in the AbsoluteRelative file. About all for now. Joshua ======= At 2004-12-01, 16:19:33 you wrote: ======= >Very nice! > >>I added a AbsoluteToRelative class to attempt converting a string of >>absolute notes to relative notes. For now, it does not seems >>successful, so I would spend some time on this. >> >> >> >I have three notes: >- I'm not sure if this needs a separate class, but I don't know either >in what class is should be. >- your main method is the very thing you should exchange with unit >tests, like the tests you've already added. >- your TODO (leave articulations alone): NoteTokens have a pos member >that means their original position relative to the original text. Look >at the appendNotes.bsh macro to see, how to change only the NoteToken, >and leave anything else other. The main idea should be like this: > >iter=new NoteIterator(oldText); >pos=0; >while (iter.hasNext()) { > tok=iter.next(); > newText.append(text.substring(pos, tok.pos)); // the text between >the last token and this one > newText.append(theNewRelativeTokenString); // like c' instead of c''''' > pos=tok.pos+tok.getLength(); // the end of the original token >} > > |
From: Bertalan F. <fo...@fr...> - 2004-12-01 08:17:30
|
Very nice! >I added a AbsoluteToRelative class to attempt converting a string of >absolute notes to relative notes. For now, it does not seems >successful, so I would spend some time on this. > > > I have three notes: - I'm not sure if this needs a separate class, but I don't know either in what class is should be. - your main method is the very thing you should exchange with unit tests, like the tests you've already added. - your TODO (leave articulations alone): NoteTokens have a pos member that means their original position relative to the original text. Look at the appendNotes.bsh macro to see, how to change only the NoteToken, and leave anything else other. The main idea should be like this: iter=new NoteIterator(oldText); pos=0; while (iter.hasNext()) { tok=iter.next(); newText.append(text.substring(pos, tok.pos)); // the text between the last token and this one newText.append(theNewRelativeTokenString); // like c' instead of c''''' pos=tok.pos+tok.getLength(); // the end of the original token } |
From: Joshua K. <jos...@gm...> - 2004-12-01 02:40:26
|
Hi, Last night I update the CVS. Some changes: ConvertToLilypond finally seems to run. However, I have not found out how to use the VFS browser. 1 problem is that the xml2ly should run separatly, if not the jedit cannot be use while the converting is going on. Output from xalan can be captured too. MidiPlayer is updated. Now it should detect Tempo changes, Key Signature, and Time signature and display the bar number close to accurate (Although not really, because there are cases of repeats and bar number resets). It also have a beat label but I didnt realise the flaws before Bert pointed out. Anyway test the midi player with your files, esp. those with multiple tempo changes. I await your comments and how the midiPlayer should be changed. I added a AbsoluteToRelative class to attempt converting a string of absolute notes to relative notes. For now, it does not seems successful, so I would spend some time on this. Joshua |
From: Bertalan F. <fo...@fr...> - 2004-11-30 10:37:36
|
> public Note toNote() { > Note note = new Note(getPitchPos()); > note.setDuration(getDurFraction()); // Is there a better way to store >duration in the note class, eg. using singer integer and can be >converted to string or fraction easily? > > What would you do with a note duration of 13/64? What integer would you use? There should not be a toNote() in the NoteToken class, because all code constructing Note objects is to be encapsulated in the Note class. If I need a Note object, I look at the constructors of it... I know that toNote() would not make harm, but that would be a nasty duplication in the logic. For other attributes, like dynamics, etc. I don't know if the current class structure is enough. Actually a Note should only have pitch and duration. There is some musical structure that can contain markups, etc. assigned to that Notes. It is very likely that for this purpose an Articulation class exists, that is associated unidirectly by the Note class. The NoteToken class may contain not just the Note's textual representation, but the Articulation's as well. Or an Articulation Token should exist. I must distinguish again with Tokens, because Tokens always contains attributes that are only related to there concrete position, structure in the text. Bert |
From: Joshua K. <jos...@gm...> - 2004-11-30 07:55:30
|
Sorry its my mistake I didnt understand the sources well enough and asked a silly question again. The name string is the pitch. If the following code is okay with you, -------code start ------- //to end to the back of NoteToken Class public String getPitch() { return name; } public int getPitchPos() { return NoteNameMap.NM.getPos(getPitch()); } public Note toNote() { Note note = new Note(getPitchPos()); note.setDuration(getDurFraction()); // Is there a better way to store duration in the note class, eg. using singer integer and can be converted to string or fraction easily? //todo //Note Class - constructor for creating a note object with pitch, duration, and extras (slurs, dynamics, ...) return note; /* // is it better for conversion to be in this method or inside Note constructor? return new Note(this); */ } ------ code end---- then I can commit it when I back at home. After this it would be easier to write an absolute to relative converter. Joshua On Tue, 30 Nov 2004 11:51:57 +0800, Joshua Koo <jos...@gm...> wrote: > Bert, > > I would like to know whats the way to getting note position from Note Token. > > eg. c4 would get 0, c' to 12, d to 2 and so on... > > Since notetoken has a method for obtaining its duration fraction, > should there be a method in NoteToken for obtaining its note position. > Or would it better to have a "NoteToken to Note" converter. > > I assume that after parsing the notetoken to get the note string, it > would be easily to convert the position using the NoteNameMap class. > > Joshua > |
From: Bertalan F. <fo...@fr...> - 2004-11-30 07:41:21
|
Joshua Koo wrote: >Cool... > >But here's small bug. When you enter | after | without any notes in >between, this error will show > >java.util.NoSuchElementException > at lilytool.macrohelp.NoteIterator.next(NoteIterator.java:171) > > > Ok, one more feature missing. This exception is thrown from the constructor, if I remember clearly. Thanks, I will fix it. >What do you think if we are able to see the beat on any note rather >than at the barline? >Will it be easier to read the beat in numbers rather than fraction, >eg. Beat 1, beat 2, beat 3? > > No, I don't think so. In a 12/8 score, what does Beat 1 mean? I'd even like to be consistent with the emacs what-beat. Bert |
From: Joshua K. <jos...@gm...> - 2004-11-30 03:53:13
|
Bert, I would like to know whats the way to getting note position from Note Token. eg. c4 would get 0, c' to 12, d to 2 and so on... Since notetoken has a method for obtaining its duration fraction, should there be a method in NoteToken for obtaining its note position. Or would it better to have a "NoteToken to Note" converter. I assume that after parsing the notetoken to get the note string, it would be easily to convert the position using the NoteNameMap class. Joshua |
From: Joshua K. <jos...@gm...> - 2004-11-30 00:59:54
|
Cool... But here's small bug. When you enter | after | without any notes in between, this error will show java.util.NoSuchElementException at lilytool.macrohelp.NoteIterator.next(NoteIterator.java:171) What do you think if we are able to see the beat on any note rather than at the barline? Will it be easier to read the beat in numbers rather than fraction, eg. Beat 1, beat 2, beat 3? Joshua On Thu, 25 Nov 2004 23:37:14 +0100, Fodor Bertalan <fod...@fr...> wrote: > Hello, the new what-beat macro is in CVS now. It works not only after |, > and also with notes that have their length from previous measures: > > c4 c d8 e f g | f g e d c4 d4 | > > So perhaps a menu item could be added, to make it able to be set to a > shortcut. > > 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: Johannes S. <Joh...@gm...> - 2004-11-28 21:52:22
|
Hi, On Sat, 27 Nov 2004, Joshua KooOOoOOo wrote: > However, is there really no way we can know which bars the score is at? > Maybe by detecting the bar numbers or bar lines... If you want to know which graphical elements can be connected to some line:column information, hit 'e' in the DVI viewer... > Maybe I leave that thought till later when the midiplayer more accurate > at counting the beats. Isn't tick/quarter doing what you want? Ciao, Dscho |
From: Joshua K. <zz...@la...> - 2004-11-27 01:02:13
|
Thanks for explaining the concepts of midi, it gave me a clearer view of what to do... Anyway I went to jsresources.org I found some good examples of working java and midi. I now working the MidiPlayer to detect Tempo, Time / Key Signature changes, lilypond does a good job of placing all these change infomation into the midi, so it shouldnt be a problem to detect them :) That webpage also have some samples on how to take in midi input like when u press your midi keyboard, should wouldnt be a problem if we decides to add midi input feature for lilypond. However, is there really no way we can know which bars the score is at? Maybe by detecting the bar numbers or bar lines... Maybe I leave that thought till later when the midiplayer more accurate at counting the beats. Joshua >Yes, this would be useful. However, I think we need a more precise method. >A lot of my lilypondings change tempo. See what I wrote about that below. > >> Dscho, if this works, the midiplayer can trigger the page flip in jdvi? >> this will make the page seems to be following the music. > >Yes, that's easy ;-). The LilyToolPlugin has a static member >"jdviInstance" of class jdvi.JDvi, which has a public member "dvi" of >class JDviViewerPanel, which has a member "page" of class JDviPanel. It is >relatively easy to write a method (I would do that) to search for a >certain special:src (those are the anchors for point-and-click) and make >sure that it is visible. Maybe the interface would look something like > > public void assureSrcIsVisible(int line,int column) > >I think the best place for this would be in JDvi, so that you can call > > jdviInstance.assureSrcIsVisible(line,column); > > >There are two problems: You have to find out line and column, not the beat >(and if there is more than one voice, this is ambiguous). And if you use >phrases, i.e. > >leloup = \notes \relative c' { d4 g8.( b16-.) d8-. e-. d8.-\>( b16) } > >then the jumping around could lead to confusion, as the phrase can be used >multiple times, thus being ambigous, too. So you should add a checkbox >"Try to follow score" to MidiPlayer. > >> 1 more question which i could figure the ans myself is what's the >> seekFirstTick method in the midiplayer for? > >In a MIDI file, the time is not measured in milliseconds, but rather in >ticks. A MIDI file normally says right at the beginning how many ticks are >supposed to be one quarter note. Thus, when the tempo changes, the quarter >note still has the same amount of ticks, and you just changed the duration >of one tick. When you record a MIDI, the MIDI file typically doesn't care >about that standard, but Lilypond does. So you could use the ticks instead >of calculating the time and dividing by the tempo, assuming that the tempo >hasn't changed. > >For ease of computation, some MIDI generators don't start at tick 0, >because there can be partial notes at the beginning. In order to start >with the first note, you call "getFirstTick()" to know what is the first >tick. > >Hth, >Dscho > |
From: Joshua K. <zz...@la...> - 2004-11-26 15:52:27
|
Sorry about that. My project folder is in the wrong location. But I wanted to add was this line <include name="**/*.xsl"/> so that the stylesheets will be placed into the jar files. >First something else: >In build.xml install.dir _must_ be '..' (See >http://plugins.jedit.org/building.php) Always check out lily4jedit to >jEdit/jars For the same purpose jedit.install.dir should be "../.." >So please keep our original directory settings or use your own build >file. I've committed back the original build file. > |
From: Fodor B. <fod...@fr...> - 2004-11-25 22:37:29
|
Hello, the new what-beat macro is in CVS now. It works not only after |, and also with notes that have their length from previous measures: c4 c d8 e f g | f g e d c4 d4 | So perhaps a menu item could be added, to make it able to be set to a shortcut. Bert |
From: Johannes S. <Joh...@gm...> - 2004-11-25 20:39:51
|
Hi, On Fri, 26 Nov 2004, Joshua KooOOoOOo wrote: > Opps that was a typo in my email. The log file shows the lilypond > command. I guess why it doesnt run is because the \ got replaced with a > \\ in the 2nd part of the command. i only method i tried to modifed was > unixname.i guess other methods are affected and responsible for it to > work. I saw that you write toUnix() doesn't work. Is the problem that spaces are not escaped? If yes, try .replaceAll(" ", "\\ "); in the method toUnix(). You can append this directly after .replaceAll("\\\\", "/") > + Trial test for displaying which beats and bars player is currently running > > About the latest feature, I find this very usefully, because I find its > a nice way to spot errors in the scores just by listening and then > checking the display for which bar the mistake could be and correct > them, without staring at the scores always while playing back the midi. Yes, this would be useful. However, I think we need a more precise method. A lot of my lilypondings change tempo. See what I wrote about that below. > Dscho, if this works, the midiplayer can trigger the page flip in jdvi? > this will make the page seems to be following the music. Yes, that's easy ;-). The LilyToolPlugin has a static member "jdviInstance" of class jdvi.JDvi, which has a public member "dvi" of class JDviViewerPanel, which has a member "page" of class JDviPanel. It is relatively easy to write a method (I would do that) to search for a certain special:src (those are the anchors for point-and-click) and make sure that it is visible. Maybe the interface would look something like public void assureSrcIsVisible(int line,int column) I think the best place for this would be in JDvi, so that you can call jdviInstance.assureSrcIsVisible(line,column); There are two problems: You have to find out line and column, not the beat (and if there is more than one voice, this is ambiguous). And if you use phrases, i.e. leloup = \notes \relative c' { d4 g8.( b16-.) d8-. e-. d8.-\>( b16) } then the jumping around could lead to confusion, as the phrase can be used multiple times, thus being ambigous, too. So you should add a checkbox "Try to follow score" to MidiPlayer. > 1 more question which i could figure the ans myself is what's the > seekFirstTick method in the midiplayer for? In a MIDI file, the time is not measured in milliseconds, but rather in ticks. A MIDI file normally says right at the beginning how many ticks are supposed to be one quarter note. Thus, when the tempo changes, the quarter note still has the same amount of ticks, and you just changed the duration of one tick. When you record a MIDI, the MIDI file typically doesn't care about that standard, but Lilypond does. So you could use the ticks instead of calculating the time and dividing by the tempo, assuming that the tempo hasn't changed. For ease of computation, some MIDI generators don't start at tick 0, because there can be partial notes at the beginning. In order to start with the first note, you call "getFirstTick()" to know what is the first tick. Hth, Dscho |
From: Bertalan F. <fo...@fr...> - 2004-11-25 20:13:27
|
I've tried the MIDI player. It's very nice! But it's a bit too large, don't you have a giant display? What if the MIDI player were a small dockable window? Bert |
From: Bertalan F. <fo...@fr...> - 2004-11-25 20:09:03
|
First something else: In build.xml install.dir _must_ be '..' (See http://plugins.jedit.org/building.php) Always check out lily4jedit to jEdit/jars For the same purpose jedit.install.dir should be "../.." So please keep our original directory settings or use your own build file. I've committed back the original build file. >Just update e cvs. Now import macro can be run under the wizard menu. Bert, do you think this is the right place for the macro? > > Yes, probably, but it shouldn't be the first in the wizards (because I think it is not the must frequently used one). The order of menu items should be the usage frequency. And consider making also a browser-actions.xml and use the normal file open dialog to convert the files. >Some new improvement to MidiPlayer, >+ very slight change to the ui >+ Allow tempo adjustment. >+ Mute / Solo Tracks >+ Trial test for displaying which beats and bars player is currently running > > > Wow! I rarely use the midi player, but I will more often, if it has so many features :-) I'm happy you're using unit tests as well. That'll help making much better maintainable code. It is very good work you've done! Bert |
From: Joshua K. <zz...@la...> - 2004-11-25 17:55:47
|
Hi >> 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? Opps that was a typo in my email. The log file shows the lilypond command. I guess why it doesnt run is because the \ got replaced with a \\ in the 2nd part of the command. i only method i tried to modifed was unixname.i guess other methods are affected and responsible for it to work. Just update e cvs. Now import macro can be run under the wizard menu. Bert, do you think this is the right place for the macro? The macro should run the commandline midi, etf, abc, muse converters. However, the xml2ly doesnt seems to be running... running main method works though... Some new improvement to MidiPlayer, + very slight change to the ui + Allow tempo adjustment. + Mute / Solo Tracks + Trial test for displaying which beats and bars player is currently running About the latest feature, I find this very usefully, because I find its a nice way to spot errors in the scores just by listening and then checking the display for which bar the mistake could be and correct them, without staring at the scores always while playing back the midi. However, the method i'm using is by extracting the tempo from the midi. Please tell me if the way I'm doing is wrong so I wont put in so much time and effort for something that wont work out.. Dscho, if this works, the midiplayer can trigger the page flip in jdvi? this will make the page seems to be following the music. 1 more question which i could figure the ans myself is what's the seekFirstTick method in the midiplayer for? Joshua |
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: 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: 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 |
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. |