Week 2 Report

Accomplishments this week:

As discussed last week, we were to layout the details of the swing plugin framework this week. There was a consensus that having certain ‘properties’ for NoteEvents would be beneficial, which could be exposed to plugins.

Hence it was decided to make NoteEvent ontime, NoteEvent len and  NoteEvent pitch (which are ‘fields’ of a ‘noteveent’) as ‘properties’ (in the MuseScore sense) of ‘noteevent’.

The idea was to have them as MuseScore properties (defined in property.h/property.cpp) as well as Qt properties.  For example, we would have
P_ONTIME, P_EVENT_PITCH, P_LEN

This would also make it easy to add them to the Inspector. Other than that, it would have potential benefits like:

Getting “undo” done easily, as we have “automatic undo” for MuseScore properties, recovering default value easily, and so on.

But unfortunately, it turned out that NoteEvent is not capable of being ‘MuseScore-property’ enabled. The reason behind this is that the methods writeProperty, getProperty, setProperty, etc. are declared in element.h and the property system is only available to element. It can be seen here: https://github.com/shredpub/MuseScore/tree/noteevent-properties/libmscore

So rather than exposing the NoteEvent to the inspector, maybe it is a good idea to expose a fake ontime/len on a note, but that would work only if it has a single element. This restriction is what makes the problem trickier.

Tasks for next week:

It was decided that it is a better idea to start working on implementing the swing in MuseScore itself rather than worrying about having a plugin.
The tentative plan is to implement a basic version of it, so that we can get on par with MuseScore 1.3. The idea is to get a score to swing completely if a boolean is set.

For undo, we could remove the swing text and invoke rendermidi again, which would not be a big deal, as we are storing the information about what is user applied.

The current design of how the swing playback should be implemented is illustrated well in this write up by Marc Sabatella:
https://docs.google.com/document/d/1-JDM1ZKbKV-yjH7wvpFLZl8FIuBgBhhlKumBMnKVLiM/edit#

The first task would be to study this write up and understand how the swing will be implemented.  After that, a basic implementation as mentioned earlier is to be coded.

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