Skip to content

Instantly share code, notes, and snippets.

View unohee's full-sized avatar

Heewon Oh unohee

View GitHub Profile
@unohee
unohee / abstract.js
Created November 9, 2019 08:37
An abstraction for Max JS Objects - mainly focusing on input processing.
autowatch = 1;
inlets = 2
outlets = 2
var myval=0;
//conviniently, most of message and lists are stored in an abtrary array, called jsarguments.
//whenever JS object receives any number / message, it starts from arrays 1.
//the first index is always occupied by its name.
if (jsarguments.length>1)
@unohee
unohee / interval.js
Created November 9, 2019 08:34
Max/MSP JS object script for calcuating harmonic ratios
autowatch = 1 //this make max keeping updates in external editor realtime
inlets = 2 //object's inlets
outlets = 2 //object's outlets
var myval //global variable for receiving various messages from inlets
var newHarm = [] //global array variable for list messages.
var fund //my fundamental
if (jsarguments.length>1)
@unohee
unohee / GCD.py
Created December 25, 2017 11:51
finding GCD in python
class GCD(object):
def __init__(self):
pass
def gen(self, first, second):
self.first = first
self.second = second
if(first > second):
self.result()
@unohee
unohee / collection.nml
Created December 14, 2017 14:33
An anatomy of rekordbox xml and traktor nml
//header
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<NML VERSION="19"><HEAD COMPANY="www.native-instruments.com" PROGRAM="Traktor"></HEAD>
<MUSICFOLDERS></MUSICFOLDERS>
<COLLECTION ENTRIES="3806">
//collection entries
<ENTRY MODIFIED_DATE="2017/5/11" MODIFIED_TIME="50780" AUDIO_ID="AAgVmqqpmZiHiIiZiHd4h4iIiZmHiIiHiIiKu5iIiHeZiImIh3d3eIiIiHd2Zmd3ZndmZ3d3d3iIiIh4d3iIiIiIiHd3d3iHeHd3iHiIiIiIiIiIiIiIiIiIiIiIiIiIiIh1REREREREREMzMzMzMzMzIiIiIiIiIiIREREREREREREREREREREREREREREREQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==" TITLE="HORN"><LOCATION DIR="/:Users/:unohee/:Music/:PioneerDJ/:Sampler/:OSC_SAMPLER/:PRESET ONESHOT/:" FILE="HORN.wav" VOLUME="OSX" VOLUMEID="OSX"></LOCATION>
<MODIFICATION_INFO AUTHOR_TYPE="user"> </MODIFICATION_INFO>
float time = 0; /* This is going to function as a clock. We'll update it with a value every time a frame gets drawn*/
float cycle_sin = 0;
float position = 0;
float cycle_cos = 0;
float carte1 = 0;
float carte2 = 0;
void setup() {
size(1280,800);
@unohee
unohee / makeArray.cpp
Last active August 13, 2016 03:19
Midi Note Array in c++
//Create midi note array...
void makeArray{
vector<bool> notes
int octave;//octave is 0 - 8;
const string note_substring[12] =
{
"C","C#","D","D#",
"E","F","F#","G",
"G#","A","A#","B"
@unohee
unohee / Circle.h
Created July 1, 2016 01:04
Best circle drawing in openFrameworks
#pragma once
#include "ofMain.h"
class Circle{
public:
ofPath c;
ofPath inner;
int x,y, lineWidth;
//NETWORK
#include "ofMain.h"
#include "ofxOsc.h"
#ifndef Network_h
#define Network_h
struct Note{
void InfinityMatrix::init(int start_val, int interval, int size){
//This is the Pool of Scale. in initialization, it creates multiple Infinity series which will be sonified and visualized.
if(size > 0){
series.resize(size);
int level = 0;
do{
if(level==0){
//first, generate origin series.
series[0].generate(start_val,interval,size);
}else{
int InfinityMatrix::play(bool trigger, bool random, int mode){
bool output = false;
//instead of calling elements by rows & cols. this gives serialistic method to play over matrices.
//1. Prime (original sequence)
//2. Retrograde (reversed sequence)
//3. Inverted Prime (vertically inversed Prime sequence)
//4. Inverted Retrograde (vertically inverssed Retrograde)
//--------