Plugin Layout Issue with 19/4 and eighth notes..

• Sep 10, 2012 - 00:03

I've run across a layout issue when writing notes in from a plugin using 19/4 as a time signature and eighth notes.

Its pretty likely I'll work around this by displaying the notes with different lengths values, but I wanted to know if I should file a bug report on this. (I'ven't tested it in 2.0.. I'm focusing my plugin efforts on 1.2 now, since I have UI access there..)

Nick

An example plugin that reproduces this is as follows:

//=============================================================================
// MuseScore
// Linux Music Score Editor
// $Id:$
//
// Test plugin
//
// Copyright (C)2008-2010 Werner Schweer and others
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//=============================================================================

//
// This is ECMAScript code (ECMA-262 aka "Java Script")
//

//---------------------------------------------------------
// init
// this function will be called on startup of
// mscore
//---------------------------------------------------------

function init()
{
// print("test script init");
};

function addNote(cursor, pitch, tpc, duration)
{
var chord = new Chord();
chord.tickLen = duration;
var note = new Note();
note.pitch = pitch;
note.tpc = tpc;
chord.addNote(note);

cursor.add(chord);

chord = cursor.chord();
chord.noStem = true;

cursor.next();
};

function run()
{
var score = new Score();
score.name = "Test-Score";
score.title = "Test-Score";
score.appendPart("Piano"); // create two staff piano part
score.appendMeasures(1); // append five empty messages
score.timesig = new TimeSig(17, 4);
var cursor = new Cursor(score);
cursor.staff = 1;
cursor.voice = 0;
cursor.rewind();

addNote(cursor,47,19,480);
addNote(cursor,47,7,480);
addNote(cursor,50,16, 480);
addNote(cursor,52,18, 480);
addNote(cursor,54,20, 480);
addNote(cursor,55,15, 480);
addNote(cursor,56,22, 480);
addNote(cursor,57,17, 480);
addNote(cursor,58,24, 480);
addNote(cursor,59,19, 480);
addNote(cursor,60,14, 480);

cursor.voice = 1;
cursor.staff = 0;
cursor.rewind();

addNote(cursor,62,16, 480);
addNote(cursor,63,23, 480);
addNote(cursor,64,18, 480);
addNote(cursor,66,20, 480);
addNote(cursor,67,15, 480);
addNote(cursor,68,22, 480);
addNote(cursor,69,17, 480);
addNote(cursor,70,24, 480);
addNote(cursor,71,19,480);
addNote(cursor,71,7,480);
addNote(cursor,73,21, 480);
addNote(cursor,74,16, 480);
addNote(cursor,75,23, 480);
addNote(cursor,76,18, 480);
addNote(cursor,77,13, 480);
addNote(cursor,81,17,480);
addNote(cursor,81,29,480);

};

//---------------------------------------------------------
// menu: defines were the function will be placed
// in the menu structure
//---------------------------------------------------------

var mscorePlugin = {
menu: 'Plugins.Score Write Test',
init: init,
run: run
};

mscorePlugin;

Do you still have an unanswered question? Please log in first to post your question.