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
#pragma once | |
/*! | |
* @brief template class for inertial variable | |
* @note class T must implement operator=(T), operator+(T), and operator/(float). | |
* | |
* @usage | |
* Lazy<float> value(SIZE); | |
* value = 0; | |
* cout << value << endl; // 0 |
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 "Osc.h" | |
#include "ofxOscSender.h" | |
#include "ofxOscReceiver.h" | |
namespace osc { | |
ofxOscSender sender_; | |
ofxOscReceiver receiver_; | |
map<string, ofEvent<ofxOscMessage>> events_; | |
} | |
void osc::setupSender(const string& hostname, int port) |
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
preg_replace("/<([^ >]*)([^\>]*)\/>\n?/", "<\\1\\2></\\1>\n", $dom->saveXml()); |
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
#pragma once | |
template <bool B, size_t T, size_t F> | |
struct binarywrap_t { static const size_t size = T; }; | |
template <size_t T, size_t F> | |
struct binarywrap_t<false, T, F> { static const size_t size = F; }; | |
template <size_t n, size_t m = 1> | |
struct binarywrap { |
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
#pragma once | |
#include "ofxOscReceiver.h" | |
class OscIn : public ofxOscReceiver | |
{ | |
private: | |
struct Value { | |
enum { | |
INT,FLOAT,STRING, |
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 "Dialog.h" | |
#include <Cocoa/Cocoa.h> | |
std::string systemComboBoxSelector(const std::string &question, const std::vector<std::string> &list) | |
{ | |
NSAlert *alert = [[[NSAlert alloc] init] autorelease]; | |
[alert addButtonWithTitle:@"OK"]; | |
// [alert addButtonWithTitle:@"Cancel"]; | |
[alert setMessageText:[NSString stringWithCString:question.c_str() | |
encoding:NSUTF8StringEncoding]]; |
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
#pragma once | |
#include "ofUtils.h" | |
class SimpleFrequencyDetector : public vector<float> | |
{ | |
public: | |
SimpleFrequencyDetector():buffer_size_(0) { | |
timestamp_ = ofGetElapsedTimef(); | |
} |
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
#pragma once | |
#include "ofEventUtils.h" | |
#include "ofEvents.h" | |
#include "ofAppRunner.h" | |
template<typename T> | |
class Animation | |
{ | |
public: |
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
/** | |
* レイヤー名置換 JSX | |
*/ | |
var _layers = []; | |
function main(dialog){ | |
var document = activeDocument; | |
var layers = document.layers; | |
getLayer(layers); |
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
#pragma once | |
class TapTempo | |
{ | |
public: | |
void tap() { | |
float time = ofGetSystemTime(); | |
interval_ = mark_-time; | |
mark_ = time; | |
} |
OlderNewer