Skip to content

Instantly share code, notes, and snippets.

@lgvr123
lgvr123 / StTimeLine.sc
Last active January 7, 2021 09:49
SuperCollider StTimeLine.sc
StTimeline {
var <id;
var <>nodes;
var <>debug=false;
classvar <notifTypes;
*new {
^super.newCopyArgs(UniqueID.next,[]);
}
@lgvr123
lgvr123 / note enricher.qml
Last active January 7, 2021 10:05
Musecore plugin qml code for enriching a note with a name and octave ("A4", "Cb5", ...), and accidental name
function enrichNote(note) {
// accidental
var id = note.accidentalType;
note.accidentalName = "NONE";
if (id != 0) {
for (var i = 0; i < accidentals.length; i++) {
var acc = accidentals[i];
if (id == eval("Accidental." + acc.name)) {
note.accidentalName = acc.name;
break;
/**
* Search for the right program by parsing the desktopfile
*
* @param desktopfile
*
* @return
*/
private String getProgramFromDesktopFile(String desktopfile) {
// -- Identify all the places where the desktop file could be stored
Path userhome = Paths.get(System.getProperty("user.home"));
@lgvr123
lgvr123 / boilerplate.qml
Last active March 15, 2023 10:01
Musescore dialog plugin boilerplate
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import QtQuick.Dialogs 1.2
import QtQuick.Window 2.3
import Qt.labs.settings 1.0
import MuseScore 3.0
MuseScore {
menuPath: "Plugins." + qsTr("Plugin Name")