kartikay.kumar.944's blog

GSoC 2020 - Tree Model - Work Product
8 months ago • 0 comments

Week 12 / Final Report

We have come to the end of the GSoC season for 2020, and this is my final report summarizing the results of my project, Tree Model for libmscore.

The main aim of the project was to formalise the tree structure of MuseScore’s objects and classes by adding a generic way to access children of an element (i.e. add a getChild(n) function to ScoreElement and derived classes). The secondary goal was to make use of

Read more
kartikay.kumar.944 GSoC 2020: Tree Model - Week 11
8 months ago • 0 comments

Hello all! This is probably my second last blog post for my GSoC project.


This week I managed to change the ScoreView to a QAbstractItemView. First I went through the chart example project for the View in the Qt documentation, and then I tried to implement it in the mscore code. I made class ScoreView inherit from QAbstractItemView, and I had to implement some virtual functions to make it work properly.

I started by implementing indexAt which tells Qt

Read more
kartikay.kumar.944 GSoC 2020: Tree Model - Week 10
8 months ago • 0 comments

Last week's update:

I added Tuplets and Spanners (ties, slurs, etc.) to the treeWrite() function and tried to reduce the diff with the previous code as much as I can, and here's what I ended up with.

So most of the file is matching now (about 80% of the lines are matching now), but still there are a lot of differences in the format.

To get it to this state I have only implemented the treeWrite() function in 7 functions

Read more

GSoC 2020: Tree Model - Week 9

9 months ago • 0 comments

Hi! This is another progress update blog for my GSoC project.

Last week I had my college vivas and seminar until Wednesday. After that, I have started working again on the write function refactoring.
The main progress I have made is, I have written from scratch a virtual treeWrite() function, and made it match somewhat with the current mscx format by reimplementing it in the top-level classes.

Here's a link to diffs between the original and new files produced by

Read more

GSoC 2020: Tree Model - Week 8

9 months ago • 0 comments

Hi all, Welcome to this week's GSoC progress blog!

I have been trying to refactor the write() function based on the tree model. The basic idea is very simple:
We will have a generic ScoreElement::write() function which will be something like the following:

void ScoreElement::write(XMLWriter& xml)
    for (p : properties()) {
Read more

GSoC 2020: Tree Model - Week 7 (finished scanElements refactoring)

9 months ago • 0 comments

Hello MuseScore blog readers!

Work done last week

Since my last blog on Wednesday, I have made some final changes to my PR and addressed all the review comments.

I tried testing the application after all the changes were made, and although 99% of the things seemed to be working fine I noticed a few small bugs and a bit bigger one.

The smaller bugs were related to the palette, some elements like spanners, glissandos and fret diagrams were not

Read more

GSoC 2020: Tree Model - Week 6

9 months ago • 0 comments

Hello! Sorry for the delayed blog post, I was busy making final changes to my pull request and squashing the 25 commits into 7 major ones. I thought it's going to be 1 hour's work and I'll write my blog post after finishing it, but it took 1-2 days. It really was a struggle against git... 😂

So here's what I have been working on this week:

  1. I have added MMRests (or rather, MMRest measures) to the tree model!

Read more

GSoC 2020: Tree Model - Week 5

10 months ago • 0 comments

Hi! This week I have been working on fixing the problem that I described in my last blog, i.e. newly added measures not getting included in the tree.

Some of the things I tried to fix the problem:

  1. First of all, I wanted to confirm that the problem is just due to these new Measures, so I tried to add the newly created measures to the tree in an ad-hoc way. I created a set in Score class, called

Read more

GSoC 2020: Tree Model - Week 4 (scanElements refactoring)

10 months ago • 3 comments

Hello there! This is the latest blog in my series of GSoC blog posts.

Last week, I had planned that I will be working on refactoring the scanElements function using the score tree functions. I was able to nearly complete it but just near the end of the week, I found an interesting bug, because of which I'll have to make some changes either to the tree model or some code in Page or Measure classes. So it'll probably take

Read more

GSoC 2020: Tree Model - Week 3 (Finished my first PR)

10 months ago • 0 comments

Work planned to do:

This week I had planned that I will finish all my work on the current PR and make it ready to merge.

Work done last week:

  1. I figured out a way to add spanner elements (Beams, ties, lines etc.) to the model. I have connected the spanners to their starting elements in the model. I used the SpannerMap in the Score class to find out whether a spanner begins at any element and added it to

Read more