weeks[5].toString(); // Navigation

First of all, the good news: I’ve passed the midterm evaluation, so the project goes on! 🙂

I want to thank Marc Sabatella for all his help and patience so far! He is a great mentor and I’m very happy to work with him! 🙂

This week I’ve continued working at the navigation commands.

1. Navigation

1.1 What I’ve done

– Finished the home command

– Finished the end command

– Finished the next element command

– Finished the previous element command

1.2 Problems

– There were some problems with the barlines, because they weren’t traversed just for the first staff, since the assigned voice was voice 0. To fix this problem I’ve created a variable that keeps the track of the previous element selected. In this way I can “look behind” and to find on what staff I am. I just finished writing the code for this, so I still need to do a bit of testing.

– I made a wrong assumption that in a ChordRest segment, on a staff can be either chords, or a rest. I fixed this problem, but I didn’t like the fact that I was jumping from one voice to another with my functions, so I used Marc Sabatella’s functions upAlt and downAlt.

– I found a solution to the segment problem that I’ve stated in the previous post. To find the segment for any element, for spanners I’m using the starting/ending segment – depending on the direction of navigation – and for other elements I’m going from parent to parent until I find the element that inherits the Segment class.

1.3 What else needs to be done

– I still need to implement a way to traverses articulations and annotations, but I think I will do this after I implement the screen-reader feedback. There are to ways to do this: either implement a diferent command, or add them to this command. For now, if an element from those to groups is selected the navigation command finds the first non-attached element and selects it. For note-attached elements, it goes to the note, for segment attached elements, it goes to the first element from that segment, etc. Like Marc said, it would be best to implement both variants and pick one after that, but I’m not yet sure how to do them, so as I said, I’m moving to the screen-reader feedback for now. This will also be a factor in deciding how to implement the traversing.

 

That’s all for this week! See you next Sunday!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s