Abstract-Codex | | index | | works | | bio | |> memory | | network | | contact |
import tactu5.*; import tactu5.Tactu5SimpleSequencer; // creating an instance of Tactu5 Tactu5 tactu5; // creating an aggregator instance Aggregator aggregator; void setup() { Tactu5Utilities tactu5utilities = new Tactu5Utilities(); // define various frequencies float freqA = 440.000; float freqC = tactu5utilities.noteToFreq ( T5Notes.C, 4 ); float freqE = tactu5utilities.noteToFreq ( T5Notes.E, 4 ); float freqG = tactu5utilities.noteToFreq ( T5Notes.G, 3 ); // declaring some notes Note noteA = new Note(freqA,200,1,1,100,false); Note noteC = new Note(freqC,200,1,1,100,false); Note noteE = new Note(freqE,200,1,1,100,false); Note noteG = new Note(freqG,200,1,1,100,false); // declaring a sequence Sequence sequence = new Sequence(); // add notes to sequence to create an arpeggio sequence.addNote(noteA); sequence.addNote(noteC); sequence.addNote(noteE); sequence.addNote(noteG); aggregator = new Aggregator(); //add the sequence to aggregator aggregator.addSequence(sequence); // initializing and feed internal sequencer, boolean value inidicate if it will loop tactu5 = new Tactu5(this,aggregator.getScore(),true); // start sequencer tactu5.start(); } void draw() { // do something } void noteReceiver(Note n){ // send data to a synth println(n.getFrequency()); Tactu5 class contains a sequencer and a controller to interact with it. Tactu5(processing.core.PApplet p, InternalSequence s) Web and application. Sequence ClusterSequence > closeSequencer() > rewind() > rewindAndStop() > start() > stop() > updateSequence() closeSequencer() Close the sequencer. tactu5.closeSequencer(); nothing ^ up rewind() Rewind sequncer to initial loop position. tactu5.rewind(); nothing ^ up rewindAndStop() Rewind and stopo sequncer to initial loop position tactu5.rewindAndStop() ; nothing ^ up start() Start internal sequencer. tactu5.start() ; nothing ^ up stop() Stop internal sequencer tactu5.stop() ; nothing ^ up updateSequencer() Update in real time the sequencer content, it plays the new sequence without interruption calculating the exact timing. tactu5.updateSequencer(InternalSequence s) ; example: tactu5.updateSequencer(aggregator.getScore()) ; nothing ^ up |
||||||
<<
back^page-up |
||||||
> memory >Tactu5 | ||||||