Skip to content

Instantly share code, notes, and snippets.

@lasconic
lasconic / youtube-resolver.js
Created June 25, 2011 21:48
Youtube resolver for tomahawk
function getSettings()
{
var settings = new Object();
settings.name = "Youtube Resolver";
settings.weight = 50;
settings.timeout = 5;
settings.maxResults = 5;
return settings;
}
@lasconic
lasconic / processLilypond.js
Created May 17, 2011 05:17
Call an external command line tool - Example with lilypond
//---------------------------------------------------------
// init
// this function will be called on startup of mscore
//---------------------------------------------------------
function init()
{
}
//-------------------------------------------------------------------
@lasconic
lasconic / gist:975969
Created May 17, 2011 04:47
Applying a function to each note in a selection
// Apply the given function to all notes in selection
function applyToNotesInSelection(func)
{
var cursor = new Cursor(curScore);
var selectionEnd = new Cursor(curScore);
cursor.goToSelectionStart();
selectionEnd.goToSelectionEnd();
var startStaff = cursor.staff;
var endStaff = selectionEnd.staff;