Last active
January 10, 2018 13:49
-
-
Save polyclick/34bcc062a3883a96e16b0d4615e339fa to your computer and use it in GitHub Desktop.
Revisions
-
polyclick revised this gist
Jan 10, 2018 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,10 +2,10 @@ float timeDiff = ofGetElapsedTimef() - lastPitchChangeTime; if(roundedCurrPitch != roundedPrevPitch && pitchConfidence > minimumConf && timeDiff > pitchRelease) { // first, send [off note] for previous note midiOut.sendNoteOff(channel, roundedPrevPitch); // send current note value over midi // scale the ascii values to midi velocity range 0-127 // see an ascii table: http://www.asciitable.com/ velocity = 127 * pitch.pitchConfidence; -
polyclick renamed this gist
Dec 6, 2017 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
polyclick created this gist
Dec 6, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ float timeDiff = ofGetElapsedTimef() - lastPitchChangeTime; if(roundedCurrPitch != roundedPrevPitch && pitchConfidence > minimumConf && timeDiff > pitchRelease) { // send off note of previous note midiOut.sendNoteOff(channel, roundedPrevPitch); // send current note over midi // scale the ascii values to midi velocity range 0-127 // see an ascii table: http://www.asciitable.com/ velocity = 127 * pitch.pitchConfidence; midiOut.sendNoteOn(channel, roundedCurrPitch, velocity); prevPitch = currPitch; lastPitchChangeTime = ofGetElapsedTimef(); }