Created
November 26, 2012 14:59
-
-
Save lasconic/4148636 to your computer and use it in GitHub Desktop.
Lyrics
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import QtQuick 1.0 | |
import MuseScore 1.0 | |
MuseScore { | |
menuPath: "Plugins.pluginName" | |
onRun: { | |
var cursor = curScore.newCursor(); | |
for (var track = 0; track < curScore.ntracks; ++track) { | |
cursor.track = track; | |
cursor.rewind(0); // set cursor to first chord/rest | |
while (cursor.segment) { | |
if (cursor.element && cursor.element.type == Element.CHORD) { | |
var lyrics = cursor.element.lyrics; | |
for (var i = 0; i < lyrics.length; i++) { | |
var l = lyrics[i]; | |
console.log("Lyric " + l.text); | |
} | |
} | |
cursor.next(); | |
} | |
} | |
Qt.quit(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment