Parent Directory | Revision Log
|Links to HEAD:||(view) (annotate)|
Work-in-progress hooks for drawing routines, used for now for tenuto and staccato articulation marks. The quality of the graphical rendering of the marks is not really up to scratch; horizontal placement seems to be off by somewhere between half and one pixel, and of course a note with both marks on at once gets an ugly graphical clash. As I say, "work in progress".
Fixed the problem with stem direction for a beam group. It was just a typo: instead of calling bot-note-pos to get the position of the bottom note of each cluster, top-note-pos was called.
Fixed the first problem reported by Taylor Campbell, namely that the locations of certain notes compared to the stem are not computed correctly. The main problem was that compute-element-parameters was called only for elements that have been modified. However, those parameters might change as a result of beaming with other elements, so we need to call compute-element-parameters on all elements. While searching for the cause of this problem, I also noticed that a stem direction that was forced to change as a result of beaming with a subsequent element (such that the stem direction for the entire beam group was different from the nominal one for the cluster) did not return to its nominal stem direction when the subsequent element was deleted. The reason for this problem was that compute-final-stem-direction was not called unless any of the elements of the beam group was marked as modified. When the subsequent element was removed, none of the remaining elements was marked that way. The fix was to always call compute-final-stem-direction. I also discovered another problem from Taylor's example, namely that sometimes, the stem direction of a beam group in which each cluster has the same nominal stem direction can be different from the nominal stem direction of the individual clusters. The reason for this problem seems to be that the algorithm for computing the stem direction of a beam group is just wrong. I am still working on this problem.
Better final accidentals: * look back through the current bar / layer, no further than the currently active key signature, to find a note on the same staff with the same pitch: if there is one, and the accidentals are the same, no need to have an accidental displayed. Remaining to do: * more or less any editing action should invalidate the already-computed final accidentals of the current bar. At present, final accidentals aren't recomputed often enough.
Gave the stealth mixin code the right name. Removed unused variable to remove a compiler warning.
Alright, let's try this: more correct key signatures, I hope. The major change to the protocol is that REMOVE-ELEMENT takes as a required argument the bar as well as the element; this allows more symmetric methods to be written for the various stealth mixin bits of functionality. Key signatures are elements, as before, within a layer. However, they are also kept on a list sorted by sequence in a slot of the staff, and KEYSIG is responsible for checking the relevant staff for other key signature elements. Editing actions or commands are also responsible for maintaining this list sorted in the right order. New almost-correct function for testing the temporal-and-logical ordering of elements. Drawing code now computes the correct key signature for the each staff; linebreaking is done with a conservative assumption for how wide the key signature will be. Please test.
Support for semi/sesqui sharp/flat. * don't declare the type of the accidentals slot any more; we can put that back in a little, after we work out a declarative way of defining all properties of accidentals. * microsharpen and microflatten commands and functions; define sharpen and flatten in terms of those (and knowing which accidentals are the tonal ones). Keybindings for the commands. * a more declarative table-based system for kerning accidentals, along with the ability to specify a per-glyph default (and a default default). Choose a sensible default default; also alter the :sharp/:sharp table when +4 steps away, as the previous value was colliding a little too much. * support for playing the semi accidentals in equal temperament. No support in linear temperament, as I don't know what they mean. * glyphs defined with a little too much liberal cut'n'paste. Some FIXMEs note the essential differences between the related glyphs.
Dots! Specifically, augmentation dots. Get their x- and y- positions more right, which sometimes entails not drawing a dot at all, sometimes adjusting the position for a dot downwards, and (when a flag is drawn or there is a suspended note in a flag-up situation) involves shifting the entire column of dots rightwards. Add an example score full of things we got wrong.
Merge keysigN patch, with all its attendant horribleness.
Fixed a bug in the page breaking algorithm that made the page way to sparse. Fixed a bug in the page layout algorithm that made Gsharp attempt to divide the measures of a page into more lines than there are measures.
Page break modifications.
Implement octaviated treble clefs. This isn't terribly general, I concede; the clef protocol might need to be rethought. However, it does capture functionality which was previously expressed in multiple places in the functions B-POSITION, F-POSITION and BOTTOM-LINE.
Added an :after method to the append-char generic-function so that the buffer is marked as modified when lyrics change.
The default key signature of a staff is now represented by an instance of the new class `key-signature', rather than by just a vector. The commands `com-more-sharps' and `com-more-flats' now call new protocol generic functions on the key signature. I used the suggestion from the patch by Christophe Rhodes to introduce a new class `rhythmic-element' below `element' and move slots that have to do with duration to that new class (rbeams, lbeams, dots). The `key-signature' class does not inherit from `rhythmic-element', but instead directly from `element'. In order to avoid having to alter the external format yet again, the reader tests whether a vector was read as the key signature, and if so, replaces it by an instance of the new class. As a nice side effect, I was able to remove the symbol `invalidate-everything-using-staff' from the list of exported symbols of `measure.lisp', because it is now used by the :after methods on `more-sharps' and `more-flats', defined in the same package. What I haven't done (I'll let Christophe do it, unless he takes too long) is to incorporate the parts from Christophe's patch that make it possible to insert key signatures as elements into layers.
Fixed a problem that made zero-duration elements generate zero-elasticity timelines, which is not acceptable. Fixed a problem that messed up the timelines when there were two consecutive zero-duration elements.
The conversion to allow Gsharp to deal with elements (and thus timelines) and measures of zero duration should now be complete. Of course, there might still be some issues, since I haven't really tested it with elements of zero duration.
Removed some dead code. Prepared Gsharp for handling timelines and measures of zero duration. This conversion is not entirely finished yet, but there is not much left.
Fixed a bug reported by Christophe Rhodes. The symptoms were that the stems were not recomputed when the clef of the staff was changed. In fact, all elements that display on a staff need to be invalidated when the clef of the staff changes. Again, I used only the CLIM Desktop to accomplish this modification.
Make the C clef have the right octave. (FIXME: why are there two identical NOTE-POSITION methods?)
Gsharp can now do multiple beams, partial beams and fractional beams. There are still some quirks, however: * there is an off-by-one-pixel error that sometimes makes the beam not attach to one of its stems; * I am still using the algorithm for a single beam to compute the beaming, even when there are multiple beams. Also fixed a bug that did not set the modified-p flag on an element when the stem direction was explicitly altered as a result of a user interaction.
Fixed a bug in the computation of the timelines. Added elasticity.lisp to gsharp.asd. Prepared the MEASURE class for holding an elasticity function.
Fixed a bug in the code for creating the timelines. The calculation of the start times of the timelines was wrong.
Improved the computation of the bulge of a lyrics element. This improvement will allow me to test that the gaps between elements is calculated correctly. Also fixed a spelling error (was compute-bar-parameter, should be compute-bar-parameters) that made Gsharp fail on a score with lyrics.
More code towards a better spacing algorithm
Added explicit timelines which will be used for a better spacing algorithm.
Move the computation of final relative accidental x offsets from drawing.lisp to measure.lisp.
moved the computation of the final accidental (determine whether one should be displayed or not according to the key signature) from drawing.lisp to measure.lisp.
moved the computation of relative x offsets of notes from drawing.lisp to measure.lisp. This required some reorganization of packages.lisp and gsharp.asd as well.
moved computation of final stem direction from drawing.lisp to measure.lisp
Moved some more code from drawing.lisp to measure.lisp
Started moving code from drawing.lisp to measure.lisp in order to prepare for computing physical widths earlier.
Prepare for a separation of the functionality in drawing.lisp into two parts: 1. A part that computes stem directions and x offsets of notes and accidentals relative to the x offset of the element. These computations will be used to determine physical widths of elements. 2. A part that computes exact x and y positions, beam slants, etc. for the final drawing phase. The first part will precede the line-breaking phase, so that the line-breaking algorithm can take physical widths into account.
Finished (?) adding comments to measure.lisp.
More comments to improve maintainability.
added more comments to improve maintainability
Got rid of ELEMENT-DURATION in favor of just DURATION by converting a :before method to an :around method.
These current modifications are not in a good state yet. Some of them are terribly kludgy, but I do not think anything is broken. New files: modes.lisp containing key bindings sequence-dico.lisp: a dictionary that searches for objects associated with sequences (lists really). Utilities: Added some horribly kludgy Unicode support. Buffer: New types: lyrics-staff, melody-element, lyrics-element, melody-bar, lyrics-bar, melody-layer, lyrics-layer Layers are no longer ordered. Cursor: Removed functionality that used layer ordering. Gui: Removed commands that used layer ordering. Added new commands to navigate, insert, and delete layers. Factored out and improved command processing. Some menus in menu bar work better. Added new presentation methods and types. Still no support for typing lyrics, but you can see them if they are already in a .gsh file. Input state: It no longer contains the staff. Instead the current staff is the first in the list of staves in the current layer. Drawing: We can now draw lyrics. Score pane: Now has a lyrics-staff presentation type.
Updates since 0.2 release.
import of 0.2
This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, select a symbolic revision name using the selection box, or choose 'Use Text Field' and enter a numeric revision.
|Powered by ViewVC 1.1.5|