#include "scorecode.h" //create the interpreter, first arg is BPM, second is channels ScoreCode i = ScoreCode(120, 1); //register some callbacks //channels start at 0 i.registerNoteOnCallback(0, &somefunction); i.registerNoteOffCallback(0, &someotherfunction); //start the interpreter i.run(); //push a pattern to the interpreter //first arg is channel, pattern is a string i.pushPattern(0, "!o.+o.+o.+o.+o.+o.+o.+o.") //sleep for a few seconds to let it play sleep(5); //stop the interpreter i.stop()