Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Creative coding x Music

Creative coding x Music

Atsushi Tadokoro

March 08, 2014
Tweet

More Decks by Atsushi Tadokoro

Other Decks in Technology

Transcript

  1. ࣗݾ঺հ ‣ ాॴ३ ͨͲ͜Ζ͋ͭ͠  ‣ ϑϦʔϥϯε ZPQQBPSH  ‣

    େֶඇৗۈߨࢣ ଟຎඒज़େֶɺ౦ژ᥁ज़େֶ ͳͲ ‣ ΫϦΤΠςΟϒɾίʔμʔ
  2. ʮΫϦΤΠςΟϒɾίʔσΟϯάʯͱ͸ ‣ ʮΫϦΤΠςΟϒɾίʔμʔʯ  ! ‣ ίʔσΟϯά ϓϩάϥϛϯά  ‣

    ͦΕࣗମ͕ΫϦΤΠςΟϒͳ׆ಈ ! ‣ Ͱ͸ʮΫϦΤΠςΟϒɾίʔσΟϯάʯͱ͸Կ͔
  3. ʮΫϦΤΠςΟϒɾίʔσΟϯάʯͱ͸ ‣ ྫ͑͹ɺPQFO'SBNFXPSLTͰ͸ɺ༷ʑͳػೳΛܨ͗͋Θͤ Δʮކʯͱදݱ͍ͯ͠Δ OpenGL GLUT FreeImag FreeType fmod RtAudio

    QuickTime OpenCV main.cpp testApp.h testApp.cpp ofSimpleApp, ofGraphics, ofImage, ofTrueTypeFont, ofVideoPlayer, ofVideoGrabber, ofTexture, ofSoundPlayer, ofSoundStream, ofSerial, ofMath, ofUtils ...etc.
  4. ʮΫϦΤΠςΟϒɾίʔσΟϯάʯͱ͸ ‣ ྫ͑͹ɺPQFO'SBNFXPSLTͰ͸ɺ༷ʑͳػೳΛܨ͗͋Θͤ Δʮކʯͱදݱ͍ͯ͠Δ OpenGL GLUT FreeImag FreeType fmod RtAudio

    QuickTim OpenCV main.cpp testApp.h testApp.cpp ofSimpleApp, ofGraphics, ofImage, ofTrueTypeFont, ofVideoPlayer, ofVideoGrabber, ofTexture, ofSoundPlayer, ofSoundStream, ofSerial, ofMath, ofUtils ...etc. ! ϓϩάϥϜ։ൃͷͨΊͷ ކ (MVF
  5. ओཁͳ։ൃϑϨʔϜϫʔΫ ‣ ։ൃϑϨʔϜϫʔΫ͝ͱͷܝࡌ݅਺ ೥݄ ։ൃϑϨʔϜϫʔΫ ݅਺ 1 openFrameworks 305 2

    Processing 300 3 Flash 88 4 Javascript 64 5 Max/MSP 56 6 Cinder 54 7 vvvv 49 8 Java 16 9 Quartz Composer 10 10 Unity 9 11 Three.js 6
  6. ओཁͳ։ൃϑϨʔϜϫʔΫ ‣ ΫϦΤΠςΟϒίʔσΟϯάͷ ͓ͦΒ͘ ൣᙝ͸ ։ൃϑϨʔϜϫʔΫ ݅਺ 1 openFrameworks 305

    2 Processing 300 3 Flash 88 4 Javascript 64 5 Max/MSP 56 6 Cinder 54 7 vvvv 49 8 Java 16 9 Quartz Composer 10 10 Unity 9 11 Three.js 6
  7. ֦ுܕ ‣ ֦ுػೳΛར༻ͯ͠ɺԻڹ߹੒ػೳΛڧԽ͢Δ ! ‣ ྫɿ ‣ 1SPDFTTJOH .JOJN ‣

    1SPDFTTJOH 4POJB ‣ PQFO'SBNFXPSLT PGY6HFO ‣ PQFO'SBNFXPSLT PGY5POJD ! ‣ .JOJNͱPGY5POJDΛ࣮ࡍʹ঺հ
  8. ‣ '.߹੒1SPDFTTJOH .JOJN import ddf.minim.*; import ddf.minim.ugens.*; Minim minim; AudioOutput

    out; Oscil fm; ! void setup(){ size(640, 480, P3D); minim = new Minim( this ); out = minim.getLineOut(); Oscil wave = new Oscil(200, 0.8, Waves.SINE); fm = new Oscil(130, 400, Waves.SINE); fm.patch(wave.frequency); wave.patch(out); } ! void draw(){ } ֦ுܕ
  9. ‣ '.߹੒PQFO'SBNFXPSLT PGY5POJD #include "testApp.h" ! void testApp::setup(){ ofSoundStreamSetup(2, 0,

    this, 44100, 256, 4); float basePitch = 400; float index = 200; SineWave car = SineWave(); SineWave mod = SineWave(); mod.freq(130); Generator frequency = basePitch + (mod * index); car.freq(frequency); synth.setOutputGen(car); } ! void testApp::update(){ } ! void testApp::draw(){ } ֦ுܕ
  10. ‣ PGY1Eίʔυαϯϓϧ #include "testApp.h" ! void testApp::setup() { ofSetFrameRate(60); ofSoundStreamSetup(2,

    1, this, 44100, 2048, 4); pd.init(2, 1, 44100); Patch patch = pd.openPatch("pd/osc.pd"); pd.start(); } void testApp::update() { } void testApp::draw() { } ! void testApp::exit() { pd.stop(); } ! void testApp::mouseMoved(int x, int y) { float freq = ofMap(y, ofGetHeight(), 0, 100, 8000); pd.sendFloat("freq", freq); } ಺แܕ
  11. ‣ PGY1Eίʔυαϯϓϧ void testApp::audioReceived (float * in, int buf, int

    n) { pd.audioIn(in, buf, n); } ! void testApp::audioRequested (float * out, int buf, int n) { pd.audioOut(out, buf, n); } ಺แܕ
  12. ‣ PGY4VQFS$PMMJEFSίʔυαϯϓϧ #include "testApp.h" ! #include "ofxSuperCollider.h" #include "ofxSuperColliderServer.h" !

    ofxSCSynth *synth = NULL; ! void testApp::setup(){ ofxSuperColliderServer::init(); synth = new ofxSCSynth("test_inst"); synth->create(); } ! void testApp::update(){ } ! void testApp::draw(){ } ! void testApp::mouseMoved(int x, int y ){ if(synth){ synth->set("freq", ofMap(y, ofGetHeight(), 0, 100, 8000)); } } ಺แܕ