This file contains 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 characters
#include "ofMain.h" | |
#include "ofAppNoWindow.h" | |
#include "ofxGPIO.h" | |
// most of this code is copied and pasted from the adafruit mpr121 arduino library | |
// The default I2C address | |
#define MPR121_I2CADDR_DEFAULT 0x5A | |
#define MPR121_TOUCHSTATUS_L 0x00 |
This file contains 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 characters
'use strict' | |
import Operator from '../operator.js' | |
export default function OperatorU (orca, x, y, passive) { | |
Operator.call(this, orca, x, y, 'u', passive) | |
this.name = 'Uclid' | |
this.info = 'Bangs based on the Euclidean pattern.' |
This file contains 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 characters
#define TUNINGFREQ 440.0 | |
float p2f( float pitch ){ | |
return pow( 2.0, (pitch-69.0)/12.0 ) * TUNINGFREQ; | |
} | |
float f2p( float freq ){ | |
return (log2( freq / TUNINGFREQ ) * 12.0f ) + 69.0f; | |
} |
This file contains 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 characters
BEGIN_OPERATOR(delay) | |
LOWERCASE_REQUIRES_BANG; | |
PORT(0, -1, IN | PARAM); | |
PORT(0, 1, IN); | |
Usz rate = index_of(PEEK(0, -1)); | |
Usz mod_num = index_of(PEEK(0, 1)); | |
if (rate == 0) | |
rate = 1; | |
if (mod_num == 0) | |
mod_num = 8; |