Save 37% off PRO during our Black Friday Sale! »

Rubyと戯れるOSS DTM

Rubyと戯れるOSS DTM

TokyuRuby会議10 (http://regional.rubykaigi.org/tokyu10/) (2016-05-29)

E3d8c68398580685ee7ef4ec2cc1cfc2?s=128

Hirofumi Wakasugi

May 31, 2016
Tweet

Transcript

  1. 3VCZͱٔΕΔ 044%5. Playing the computer music with OSS via Ruby

    Hirofumi Wakasugi (@5t111111)
  2. Hirofumi Wakasugi (@5t111111) ϓϩάϥϚʔ

  3. 04$ 0QFO4PVOE$POUSPM OSC Host Address (like URI) Message /oscillator/frequency 44100

    /foo/bar/baz:12345 440 0.1 “Hello!” w ओʹԻָؔ࿈Ͱ࢖ΘΕΔ௨৴ϓϩτίϧ w 6%15$1Λ࢖ͬͯωοτϫʔΫܦ༝Ͱૹड৴Ͱ͖Δ w .*%*Λ୅ସ͢Δ΋ͷͱͯ͠։ൃ͞Εͨ
  4. RUBY OSS DTM

  5. 1VSF%BUB 1E w ։ൃͨ͠ͷ͸.BYͷ։ൃऀͰ ΋͋Δ.JMMFS1VDLFUUF Իڹ߹੒ϚϧνϝσΟΞͷͨΊͷάϥϑΟΧϧ ϏδϡΞϧ  ϓϩάϥϛϯάݴޠ w

    ഑ஔͨ͠ΦϒδΣΫτಉ࢜Λ ݁ઢ͠ϝοηʔδΛ΍ΓͱΓ ͢Δ͜ͱͰϓϩάϥϜΛ࡞Δ
  6. ruby-puredata https://github.com/nagachika/ruby-puredata

  7. ruby-puredata https://github.com/nagachika/ruby-puredata

  8. ·ͣϦϕϯδͰSVCZQVSFEBUBಉࠝͷαϯϓϧԻݯΛ໐Β͢ IUUQTHJUIVCDPNUURSLMUCMPCNBTUFSQFOUBOHMFFYBNQMFSC

  9. ࣍ʹγϯϓϧͳαΠϯ೾ͷγϯηΛىಈ IUUQTHJUIVCDPNUURSLMUCMPCNBTUFSQFOUBOHMFTZOUISC ͨͩ͜Ε͸୯ମͰ͸ Ի͕໐Βͤͳ͍ͨΊɺ ผͷϓϩάϥϜ͔Β 04$ϝοηʔδΛૹΔ

  10. +3VCZ"SU $PEFBT"SU w ·ͩ৽͍͠ϓϩδΣΫτͰɺ 1SPDFTTJOH͸SVCZQSPDFTTJOH 1SPDFTTJOH8SBQQFS-JCSBSZGPS3VCZ +3VCZ w ϏδϡΞϧΞʔτ޲͚ͷϓϩάϥ ϛϯάݴޠ1SPDFTTJOHΛ3VCZͰ

    ॻ͘͜ͱ͕Ͱ͖Δ https://ruby-processing.github.io
  11. +3VCZ"SUͰॻ͍ͨ04$ίϯτϩʔϥʔͰԋ૗ IUUQTHJUIVCDPNUURSLMUCMPCNBTUFSKSVCZ@BSUPTD@DPOUSPMMFSSC ΫϦοΫͨ͠࠲ඪʹ Ԡͨ͡04$ϝοηʔδ͕ ૹ৴͞ΕͯԻ͕໐Δ

  12. ͭͣͭ঺հ͍ͯ͘͠ͷ͸͜ͷลʹͯ͠ ΍ͬͺΓۂԋΓ·͢

  13. OJMTUFQT "O04$DMJFOUXIJDIQSPWJEFTWFSZTJNQMFTUFQTFRVFODFS https://github.com/5t111111/nilsteps # C1 for 1st note and D1

    for 8th note of 16 steps in a bar seq = Nilsteps::Sequencer.new(bpm: 128) seq.setup_steps(0 => 'C1', 8 => 'D1') seq.play(4) # Drum machine like sequence DSL kick 'oxxxoxxxoxxxoxox', times: 1 w υϥϜϚγϯͷΑ͏ͳ୯७ͳεςοϓγʔέϯαʔ w ϋογϡͰεςοϓΛࢦఆͯ͠04$ϝοηʔδΛૹ৴Ͱ͖Δ
  14. ಉ࣌ʹͭͷԻ͔͠ ໐Βͤ·ͤΜ o w8 it sux cuz

  15. ΅͘͸͜ͷOJMTUFQTΛ ˒ฒߦ࣮ߦ͍ͨ͠ w ͳͥͳΒಉ࣌ʹෳ਺ͷԻΛ໐Β͍͔ͨ͠Βͩ ˒ґଘؔ܎Λࢦఆ͍ͨ͠ w ͳͥͳΒ࣮ߦͷॱ൪Λࢦఆͯ͠ۂΛߏ੒͍͔ͨ͠Βͩ ˒3VCZͰॻ͖͍ͨ w ͳͥͳΒ3VCZͰॻ͖͍͔ͨΒͩ

  16. None
  17. 3VLBXB )ZQFSTJNQMFXPSLqPXFOHJOFGPS3VCZ https://github.com/joker1007/rukawa ˒ ฒߦ࣮ߦ‎Ͱ͖Δ ˒ ґଘؔ܎Λࢦఆ‎Ͱ͖Δ ˒ 3VCZͰ‎ॻ͚Δ

  18. 1MBZBSPVOEXJUIFDPTZTUFN 3VLBXBͰ OJMTUFQTͷδϣϒΛίϯτϩʔϧͯ͠ 1VSF%BUBͷԻΛग़͢͜ͱͰ ۂʹ͢Δͱ͍͏ͷΛ΍Γ·͢

  19. CVOEMFFYFDSVLBXBSVO4POH4FRVFODF IUUQTHJUIVCDPNUURSLMUUSFFNBTUFSTFRVFODF

  20. ͝ਗ਼ௌ͋Γ͕ͱ͏ ͍͟͝·ͨ͠