Library for the scopitone workshop
npm install scop --save
var Scop = ScopNotes = Notes// new instance of the arduino controlerscop = '/dev/ttyACM0';// bpm and sequence to be playedvar bpm = 180;var seq =id: NotesAid: NotesAid: NotesAid: NotesBid: NotesCid: NotesB duration: Notesblancheid: NotesA duration: Notesblancheid: NotesCid: NotesBid: NotesBid: NotesA;// only start playing when the serial port is openscop;
A class that instanciate a serial port communication with the arduino. When the serial port is opened, it sends a 'ready' event.
Play sequentially the motors. The sequence provided is an array of numbers. Each of this numbers corresponds to a combination of motors to play during the measure. If you put a 0 (or scop.none) on the array it means no motor will be played during the measure. When the sequence is finished, an event is sent.
Motor combinations representing notes and chords. And note durations