seq::seq(int id, SUBDIV subdiv, func_cb cb) : _id(id), _stopped(true) { setsubdiv(subdiv); callback(cb); setcurrentstep(0); setsteps(0); }
seq::seq(int id, SUBDIV subdiv, int steps, SEQ_LOOP_TYPE loop, bool reverse) : _id(id), _stopped(true) { setchannel(Midi.midiChannel); setsubdiv(subdiv); setsteps(steps); setlooptype(loop); if(reverse) { setreverse(true); setposition(steps-1); } else { setreverse(false); setposition(0); } setbegin(0); if(steps <= MAX_STEPS) setend(steps-1); else setend(MAX_STEPS); for(int i = 0; i < MAX_STEPS; i++) { // _notes[i] = 36 + 3 * i; _notes[i] = 0; _velocity[i] = 127; } setinternal(true); setexternal(true); _lastposition = 0; }
seq::seq(int id, SUBDIV subdiv, int steps, int channel) : _id(id), _stopped(true) { setchannel(channel); setsubdiv(subdiv); setsteps(steps); setlooptype(LOOP); setreverse(false); setposition(0); setbegin(0); if(steps <= MAX_STEPS) setend(steps-1); else setend(MAX_STEPS); for(int i = 0; i < MAX_STEPS; i++) { _notes[i] = 36 + 3 * i; _velocity[i] = 127; } setinternal(true); setexternal(true); _lastposition = 0; }