[jmsl] Re: addNote bug

jmsl at music.columbia.edu jmsl at music.columbia.edu
Sat Nov 1 08:48:06 EDT 2008


Hi Georg

Thanks VERY much for discovering and reporting this bug!  It was caused 
by not rounding the pitch before calculating the level, so 47.75 staying 
in the neighborhood of the previous octave instead of joining the octave 
beginning at 48. The sound was correct but the level was calculated 
incorrectly. This would be true of all pitches that should round up to 
the octave break, like 23.75, 35.77, and 47.75 (and pitches between the 
eighth tones as well)

I believe I have fixed the bug and I posted a prerelease at 
http://www.algomusic.com/prerelease/

I know you are working urgently on a piece so I did not spend as much 
time crunching through tests before posting this build.
Please test this with your current piece and any other projects you can 
throw at it.
Watch the console and please verify that you are not seeing some 
debugging code spew out while a piece is playing, for example.

Once you've tested this and I've had more time to test this build I will 
post it as the next release.

Changes since last release are pasted below...

Thanks
Nick Didkovsky

06/14/08    ScoreEditPanel now offers x, bb, 1/4#, 1/4b menu items. 
Also, entering C or F with b selected spells pitch enharmonically now.
            Entering E or B with # selected spells pitch enharmonically 
now.  Changes were made in NoteFactory.  Thanks Peter McCullough
06/22/08    The following Score fields and their getters and setters, 
were changed from static to local. Thanks Peter McCullough
              showInstrumentNames
            showTempo
            showStaffNumbers
            showMeasureNumbers
            showSectionBrackets
            showTimeSignatures
            showClefs           
06/29/08    Removed static Staff.set/getActiveTrackindex(). When using 
GUI like ScoreFrame, active track is determined by EditManager
            by get()ting its value from ScoreEditPanel. When you are 
using API, use score.set/getActiveTrackNumber(), like in 
jmsltestsuite.TwoTracksPerStaff
            for example.  This way multiple score editors can maintain 
their own active track instead of setting one global static Staff field.
            Note that ScoreCanvasAdapter no longer reacts to 
EditStateChanged (it used to set Staff.activetrackindex). For Peter 
McCullough; glad
            to clean this up. Note that selecting the track in 
ScoreEditPanel does NOT change the score's active track index! It simply 
provides the
            track index for operations managed by EditManager (ie UI 
interactions)
           
07/12/08    BUG FIX: If a Note's UserBean cannot be instantiated when 
Score is loaded (for example if the userbean class is not in the 
classpath),
            noteXMLLoader mistakenly added NULL to Note's user beans, 
which resulted in not being able to save score any more (null pointer 
exception killed the save).
            Note NoteXMLLoader does not add NULL to user beans, which is 
correct behavior.
            IMPORTANT: saving this score will result in a score stripped 
of the references to thge original user beans so be careful.
            Scenario: user creates UserBeanX on one machine, creates a 
score with it and saves the score. This score contains references
            to UserBeanX class. Now load the score on a different 
machine without UserBeanX on it, and none of these beans will load.
            Save the score on this machine and there will be no 
references to UserBeanX any more.
07/12/08    Feature: new NoteOrnament abstract class. Define your own 
drawing ornament for a note. Add it to a note with addUserBean.
            Saves and loads back with the score. NoteOrnaments are 
scanned and loaded as plug-ins. Show up in Note menu of ScoreFrame.
            Wrapped in notePropertiesTransform so they are un/redoable.
            See jmsltestsuite.NoteOrnamentTest and 
jmsltestsuite.DrippyNoteOrnament and jmsltestsuite.SquigglyNoteOrnament
            To test plug-ins, compile Drippy and Squiggly and copy their 
.class files to a "jmsltestsuite" subdirectory of jmsl_plugins
           
09/06/08    Score.setScorePainter() is now a public method (for Peter 
McCullough). Warning this will probably disappear soon.
09/27/08    Track has user beans now, thanks Peter McCullough
11/01/08    Fixed bug where pitches 23.75, 35.75, 47.75 were rendered 
one octave too low. Thanks Georg Hajdu
            See jmsltestsuite.EighthTones for testing.

Georg Hajdu wrote:
> Hi Nick,
>
> I'm reporting a pretty serious bug with addNote. When you add a note 
> with pitch 47.75, this note will be displayed as a c an octave lower 
> than expected. This also holds for 35.75 and for 23.75, but not for 
> 59.75 and higher.  Interestingly, the XML code still shows the correct 
> pitch.
> I noticed this as scores exported as MusicXML as well as MIDI 
> exhibited this strange discrepancy, with the MusicXML score showing 
> the same wrong pitch, whereas the MIDI file seemed correct.
>
> This bug is also present in the Java standalone.
>
> It would be great if you could correct this soon.
>
> Thank you,
>
> Georg


More information about the jmsl mailing list