Now keeping notes for todos and notes to help me work through problems. I'll keep notes for record keeping if/when I can be bothered.
todo Found an issue with bottom beam of 3rd/4th notes, last bar, 5th last line of rev etude (has stroke but no fill).
Working on controls that appear over the score with mouseover (currently bar for bar start/end).
Bar popup has the target bar and start/end toggle. Its DataContext is the ScoreEditVM (which has access to the UserToScore). UserToScore has current start/end bars.
There's only ever one bar popup in focus at the time. Could bind popup bar to ScoreEditVM CurrentBar and make IsStart/IsEnd, but that's getting messy.
Could create UserToScore DP in barpopup, bind it and call methods on UTS, but that subverts try/catches etc. I think the messiness above is required, but perhaps not in ScoreEditVM.
Process is:
Mouse moves over panel,
translate mouse coords to ScoreLine coords
find bar from coords (method in ScoreLine)
if (can/should show bar ui [ie not playing]), show it <---
on click, call set start bar with current bar [react to property change]
if (can/should show bar ui [ie not playing]), show it (mouseMovement when playing is ok, timer to hide ui)
IsPlaying comes from ScoreEditVM.
bool ScoreEditVM.ShowOverlayUI
on mouse leave etc similar.
Friday, January 29, 2010
Tuesday, January 19, 2010
Getting bored with daily notes now.
Over the past few days I've mainly worked on processing user midi events and that seems to be working. Little things like changing who plays what during a run are broken.
Got most of a midi diagnostics form running.
Removed last dependencies on ini file and now using config file for all app settings.
Did more work on midi diagnostics.
todo Scan input and output devices until one connects during initialisation (and swallow exceptions), save settings to db, add midi channel spinner.
Create save/ok/cancel dialog button control.
Trigger property changes when actions complete.
try/catches around input/output
Over the past few days I've mainly worked on processing user midi events and that seems to be working. Little things like changing who plays what during a run are broken.
Got most of a midi diagnostics form running.
Removed last dependencies on ini file and now using config file for all app settings.
Did more work on midi diagnostics.
todo Scan input and output devices until one connects during initialisation (and swallow exceptions), save settings to db, add midi channel spinner.
Create save/ok/cancel dialog button control.
Trigger property changes when actions complete.
try/catches around input/output
Saturday, January 16, 2010
Fixed problems in last post yesterday, and have spent until now debugging last issues with saving/loading (dots on notes were being thrown away, tied notes across lines failed etc). Op72 #1 first page and Rev etude seem to save and load completely now.
todo There might be a timing issue in the top stave of bar 52 in the Rev etude, and a note pitch issue in the 81st bar.
todo Some accidentals on grace notes aren't being picked up in bars 23 and 24 in the Op72 #1.
I guess it's time to add buttons for tutor/user plays. There's still no concept of left hand/right hand yet, but I'll make it default to top/bottom staves for now.
todo maybe Make PropertyChanged in try/catch + logged etc?
Working through old code for processing user input.
todo There might be a timing issue in the top stave of bar 52 in the Rev etude, and a note pitch issue in the 81st bar.
todo Some accidentals on grace notes aren't being picked up in bars 23 and 24 in the Op72 #1.
I guess it's time to add buttons for tutor/user plays. There's still no concept of left hand/right hand yet, but I'll make it default to top/bottom staves for now.
todo maybe Make PropertyChanged in try/catch + logged etc?
Working through old code for processing user input.
Wednesday, January 13, 2010
Tuesday, January 12, 2010
It turns out that obfuscated fonts cannot be deobfuscated without their original file name (which is a guid with a .odttf extension). I'll have to either package fonts with their filenames intact or as unobfuscated .ttf files. I think I'll go for option a.
Fucked about for ages, having trouble with weird behaviour (I think to do with WPF font cache or something). Too hot to keep proper notes (10:30pm, 32.5 degrees and no air con).
Working on UI and VM to open scores from DB. Need to make a generic modal dialog window that accepts a viewcontrol as content.
A viewModel object can now fire an event and pass another viewModel object (ie the vm for selecting a score from the database). The first vm's view may catch the event and create a new window. The window's content is set to the vm and its style is a global modal dialog window xaml style. The xaml for the window content is a datatemplate for the vm's type.
todo maybe: Actions need a default error message. A message like a null reference exception isn't very handy without a prefix for what failed.
todo maybe: Handle technical errors better such as with a message about an internal error and some reporting mechanism.
Fkn 11:25pm, 32.2 degrees.
Fucked about for ages, having trouble with weird behaviour (I think to do with WPF font cache or something). Too hot to keep proper notes (10:30pm, 32.5 degrees and no air con).
Working on UI and VM to open scores from DB. Need to make a generic modal dialog window that accepts a viewcontrol as content.
A viewModel object can now fire an event and pass another viewModel object (ie the vm for selecting a score from the database). The first vm's view may catch the event and create a new window. The window's content is set to the vm and its style is a global modal dialog window xaml style. The xaml for the window content is a datatemplate for the vm's type.
todo maybe: Actions need a default error message. A message like a null reference exception isn't very handy without a prefix for what failed.
todo maybe: Handle technical errors better such as with a message about an internal error and some reporting mechanism.
Fkn 11:25pm, 32.2 degrees.
Sunday, January 10, 2010
Friday, January 8, 2010
Using propertyChanged events means one event gets fired in the sender and a switch statement in the listener. I guess it's hard to make anything more optimal. A separate event for each property would get out of hand.
Using bindings within model/vm classes would be more simple than subscribing and unsubscribing to objects as they come and go.
Maybe something similar would work to push UI requests up to the UI layer. Another alternative is a static class to which objects can push requests and UI things can listen.
Using bindings within model/vm classes would be more simple than subscribing and unsubscribing to objects as they come and go.
Maybe something similar would work to push UI requests up to the UI layer. Another alternative is a static class to which objects can push requests and UI things can listen.
Linking objects to parents/siblings etc as they are instantiated and deserialised helps. It two objects are related, I link the later objects to earlier objects (in terms of the serialisation/des process). If objects have Next and Prev properties, I make the Prev property set the other object's Next property too.
I might have a problem with notes that have multiple stems depending on the order of the stems.
I just found 'MusicXML'. A WPF app that can open and display scores from this format sounds good for v2.
Finally have all data and fonts packed up in binary stream and compressed. Most of the deserialisation code is written, will start testing it tomorrow.
I might have a problem with notes that have multiple stems depending on the order of the stems.
I just found 'MusicXML'. A WPF app that can open and display scores from this format sounds good for v2.
Finally have all data and fonts packed up in binary stream and compressed. Most of the deserialisation code is written, will start testing it tomorrow.
Thursday, January 7, 2010
Wednesday, January 6, 2010
Tuesday, January 5, 2010
Almost finished serialising stuff.
Lots of properties of things are derived or only necessary in parsing phase. When I finish simple deserialisation I'll make StemParsed and NoteParsed sub classes to clean parsing stuff out of Stem and Note classes. That seemed to work ok for bars and lines. I think I'll need a ScoreParsed too.
Properties in the base class can be simple get/set (or cached get) and derived classes can derive value each time (which is good when editing).
Lots of properties of things are derived or only necessary in parsing phase. When I finish simple deserialisation I'll make StemParsed and NoteParsed sub classes to clean parsing stuff out of Stem and Note classes. That seemed to work ok for bars and lines. I think I'll need a ScoreParsed too.
Properties in the base class can be simple get/set (or cached get) and derived classes can derive value each time (which is good when editing).
Monday, January 4, 2010
todo: Fix sort order based on X or tick (long story).
It is tempting to store score data as a big blob rather than using tables for all of the different elements. The biggest cons are debugging and that elements cannot be updated and saved individually. It should be faster to implement and perform better.
In either case, need to serialise graphical elements first.
Serialising Paths is just path.Data.ToString(). For Glyphs I'll need to serialise a few sub-properties and reconstruct them. I also need to save fonts for Glyphs.
Glyphs can use obfuscated fonts ok, and the only reason we had to crack them open was to get the unicode value for chars (which was a partial success).
Glyphs and Path elements now serialisable (I think).
todo: Link to tuplet count Glyphs if it is found and used but is not part of a tuplet bracket.
It is tempting to store score data as a big blob rather than using tables for all of the different elements. The biggest cons are debugging and that elements cannot be updated and saved individually. It should be faster to implement and perform better.
In either case, need to serialise graphical elements first.
Serialising Paths is just path.Data.ToString(). For Glyphs I'll need to serialise a few sub-properties and reconstruct them. I also need to save fonts for Glyphs.
Glyphs can use obfuscated fonts ok, and the only reason we had to crack them open was to get the unicode value for chars (which was a partial success).
Glyphs and Path elements now serialisable (I think).
todo: Link to tuplet count Glyphs if it is found and used but is not part of a tuplet bracket.
Saturday, January 2, 2010
Subscribe to:
Posts (Atom)