Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
SSAW14 第1回 - Mozziを使ってみる
Search
Atsushi Tadokoro
April 12, 2014
Technology
1
5.6k
SSAW14 第1回 - Mozziを使ってみる
Atsushi Tadokoro
April 12, 2014
Tweet
Share
More Decks by Atsushi Tadokoro
See All by Atsushi Tadokoro
デザイン言語総合講座 - クリエイティブ・コーディング
tado
0
2.7k
Tumblrを使う4 - Webサイトを構成する、固定ページとタグ
tado
0
1.8k
Tumblrを使う3- カスタムHTMLテーマの作成
tado
0
420
Processing.jsによるデータの可視化と生成的表現
tado
1
1.7k
Tumblrを使う2 - テーマをカスタマイズする
tado
0
340
Touchéの仕組みを理解 - ProcessingとArduinoの連携
tado
0
2.3k
Github Pagesで作品を公開、Automatic Page Generatorでサイトを生成
tado
0
1.5k
TumblrでWebサイトを作成
tado
0
690
bmaw14 第2回: Touchéセンサーを使う1 Touchéセンサーを作成する
tado
0
2.1k
Other Decks in Technology
See All in Technology
Python(PYNQ)がテーマのAMD主催のFPGAコンテストに参加してきた
iotengineer22
0
500
SREが投資するAIOps ~ペアーズにおけるLLM for Developerへの取り組み~
takumiogawa
1
430
飲食店データの分析事例とそれを支えるデータ基盤
kimujun
0
160
適材適所の技術選定 〜GraphQL・REST API・tRPC〜 / Optimal Technology Selection
kakehashi
1
690
プロダクト活用度で見えた真実 ホリゾンタルSaaSでの顧客解像度の高め方
tadaken3
0
180
Terraform Stacks入門 #HashiTalks
msato
0
360
Why App Signing Matters for Your Android Apps - Android Bangkok Conference 2024
akexorcist
0
130
OCI Vault 概要
oracle4engineer
PRO
0
9.7k
複雑なState管理からの脱却
sansantech
PRO
1
150
The Role of Developer Relations in AI Product Success.
giftojabu1
0
140
BLADE: An Attempt to Automate Penetration Testing Using Autonomous AI Agents
bbrbbq
0
320
AWS Lambdaと歩んだ“サーバーレス”と今後 #lambda_10years
yoshidashingo
1
180
Featured
See All Featured
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
Intergalactic Javascript Robots from Outer Space
tanoku
269
27k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
A Philosophy of Restraint
colly
203
16k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
720
Building a Scalable Design System with Sketch
lauravandoore
459
33k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
10 Git Anti Patterns You Should be Aware of
lemiorhan
655
59k
Code Review Best Practice
trishagee
64
17k
Art, The Web, and Tiny UX
lynnandtonic
297
20k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Transcript
44"8 ୈճ.P[[JΛͬͯΈΔ ݄ ଟຎඒज़େֶใσβΠϯֶՊϝσΟΞܳज़ίʔε ాॴ३
ࠓͷ༰ ‣ 44"8ɺՐ༵ͷ֓ཁ ‣ .P[[Jͷಋೖ ‣ "SEVJOP .P[[JͰԻ͕ग़Δͱ͜Ζ·ͰΛඪʹ
44"8ʹ͍ͭͯ
44"8Ր༵ͷඪ ‣ "SEVJOP .P[[J ޙड़ Ͱαϯυϓϩάϥϛϯά ‣ σόΠε ίʔυͰɺΦϦδφϧʮָثʯΛ࡞Δ
ࢀߟਤॻ ‣ )BOENBEF&MFDUSPOJD.VTJDʕख࡞Γిࢠճ࿏͔Βੜ·Ε ΔԻͱԻָ ‣ /JDPMBT$PMMJOT ஶ ٱอాߊ߂ ༁ ༁
ધా ༁
44"8Ր༵ͷ༰ ‣ ΞϰΝϯΪϟϧυͷ๏ଇ ‣ ʮ)BOENBEF&MFDUSPOJD.VTJDʯQΑΓ ! ‣ ୈɿٯΛΕ ‣ ୈɿࢥ͍Γڹ͔ͤΖ
‣ ୈɿͤ͘͘Α
.P[[Jʹ͍ͭͯ
.P[[Jʹ͍ͭͯ ‣ .P[[Jˠ"SEVJOPͷͨΊͷԻڹ߹ϥΠϒϥϦ ‣ "SEVJOP୯ମͰɺߴͳԻڹ߹Λ࣮ݱ ‣ IUUQTFOTPSJVNHJUIVCJP.P[[J
.P[[Jʹ͍ͭͯ ‣ ιʔείʔυɺ(JUIVCͰެ։͞Ε͍ͯΔ ‣ IUUQTHJUIVCDPNTFOTPSJVN.P[[J
.P[[Jʹ͍ͭͯ ‣ .P[[JͰͲΜͳԻ͕ੜͰ͖Δͷ͔ ‣ αϯϓϧΛฉ͍ͯΈΔ ‣ IUUQTFOTPSJVNHJUIVCJP.P[[J
.P[[Jͷ४උ
.P[[Jͷ४උ ‣ ͦͦ"SEVJOPͷͲ͔͜ΒԻ͕ग़Δͷ͔ ‣ "SEVJOPʹɺεϐʔΧʔΦʔσΟΦδϟοΫແ͍
εςϨΦϛχδϟοΫͷͱΓ͚ͭ ‣ "SEVJOP͔ΒԻΛग़ྗ͢ΔʹɺΦʔσΟΦग़ྗͷͨΊͷ ύʔπΛࣗ࡞ͯ͠ଓ͠ͳͯ͘ͳΒͳ͍ ‣ ࠓճɺळ݄ͷʮNNεςϨΦϛχδϟοΫ%*1ԽΩο τʯΛ༻ ‣ IUUQBLJ[VLJEFOTIJDPNDBUBMPHHH,
εςϨΦϛχδϟοΫͷͱΓ͚ͭ ‣ NNεςϨΦϛχδϟοΫ%*1ԽΩοτΛϒϨουϘʔυ Ͱ༻͢ΔʹɺՃ͕ඞཁ ‣ ·ͣɺύʔπΛ֬ೝ εςϨΦϛχδϟοΫ มج൫ ϐον
εςϨΦϛχδϟοΫͷͱΓ͚ͭ ‣ Ճ͍͢͠Α͏ɺϒϨουϘʔυΛར༻ ‣ ϐονΛຊͣͭΓͯ͠ɺҎԼͷਤͷΑ͏ʹஔ
‣ l"&1)0/&+"$,%1zͱ͍͏จࣈ͕ॻ͍ͯ͋Δ໘Λ্ʹ ͯ͠ج൫ΛϐονͷҐஔʹ͋ΘͤͯࡌͤΔ εςϨΦϛχδϟοΫͷͱΓ͚ͭ
‣ શͯͷϐονΛϋϯμ͚ͮ εςϨΦϛχδϟοΫͷͱΓ͚ͭ
‣ εςϨΦϛχδϟοΫΛͷҐஔʹ͋ΘͤͯࡌͤΔ εςϨΦϛχδϟοΫͷͱΓ͚ͭ
‣ ϒϨουϘʔυ͔ΒऔΓ֎͠ɺཪଆͷΛશͯϋϯμ͚ͮ εςϨΦϛχδϟοΫͷͱΓ͚ͭ
‣ εςϨΦϛχδϟοΫͷͱΓ͚ͭ
εςϨΦϛχδϟοΫͷͱΓ͚ͭ ‣ ࣍ʹϒϨουϘʔυଆͷઢ ‣ ҎԼͷΑ͏ʹઢ͢Δ
εςϨΦϛχδϟοΫͷͱΓ͚ͭ ‣ Ճͨ͠εςϨΦϛχδϟοΫΛஔ
εςϨΦϛχδϟοΫͷͱΓ͚ͭ ‣ "SEVJOPͱଓ ‣ (/%ͱɺ%JHJUBM0VUΛҎԼͷਤͷͱ͓Γଓ
εςϨΦϛχδϟοΫͷͱΓ͚ͭ ‣ ४උྃ
.P[[JͷμϯϩʔυͱΠϯετʔϧ
.P[[JͷμϯϩʔυͱΠϯετʔϧ ‣ .P[[JΛҎԼ͔Βμϯϩʔυ ‣ .P[[J[JQΛอଘ͢Δ ίί
.P[[JͷμϯϩʔυͱΠϯετʔϧ ‣ "SEVJOPΛىಈ ‣ 4LFUDI*NQPSU-JCSBSZ"EE-JCSBSZ ‣ ઌ΄Ͳμϯϩʔυͨ͠ɺ.P[[J[JQΛબ
.P[[JͷμϯϩʔυͱΠϯετʔϧ ‣ *NQPSU-JCSBSZͷཝʹ.P[[J͕ग़͖ͯͨΒΠϯετʔϧྃ
.P[[Jϓϩάϥϛϯά ɺ͡ΊͷҰา
#include <MozziGuts.h> #include <Oscil.h> #include <tables/sin2048_int8.h> ! Oscil <2048, AUDIO_RATE>
aSin(SIN2048_DATA); ! void setup(){ startMozzi(CONTROL_RATE); aSin.setFreq(440); } ! void updateControl(){ } ! int updateAudio(){ return aSin.next(); } ! void loop(){ audioHook(); } .P[[Jϓϩάϥϛϯά ɺ͡ΊͷҰา ‣ ԼهͷϓϩάϥϜΛ"SEVJOPʹهೖ
.P[[Jϓϩάϥϛϯά ɺ͡ΊͷҰา ‣ ϓϩάϥϜΛهೖͰ͖ͨΒɺ"SEVJOPʹVQMPBE ! ! ! ! ‣ ΠϠϗϯΛδϟοΫʹͯ͠ΈΔ
‣ ͲΜͳԻ͕͢Δ͔ ίί
.P[[Jϓϩάϥϛϯά ɺ͡ΊͷҰา ‣ ͜ͷαϯϓϧɺ4JOΛੜ͢ΔϓϩάϥϜ ‣ ͨͩ͠ɺ"SEVJOPͷܭࢉεϐʔυΛߟྀͯ͠ɺ༷ʑͳ͕ ͞Ε͍ͯΔ ‣ ϓϩάϥϜͷৄࡉΛཧղͯ͠ΈΑ͏
.P[[JϓϩάϥϜߏ ‣ ϓϩάϥϜͷߏҰൠతͳ"SEVJOPϓϩάϥϜ TFUVQ MPPQ ॳظઃఆ ϧʔϓ
.P[[JϓϩάϥϜߏ ‣ ϓϩάϥϜͷߏ.P[[JϓϩάϥϜ TFUVQ MPPQ VQEBUF$POUSPM VQEBUF"VEJP
ॳظઃఆ ϧʔϓ ίϯτϩʔϧߋ৽ ΦʔσΟΦߋ৽
ίϯτϩʔϧͱΦʔσΟΦ ‣ ʮίϯτϩʔϧ৴߸ʯͱʮΦʔσΟΦ৴߸ʯͭͷछྨͷ৴ ߸͕ଘࡏ͢Δ ‣ ༻్ʹԠ͍ͯ͡Θ͚Δ ! ‣ ίϯτϩʔϧ৴߸ ‣
Ώͬ͘Γͱͨ͠มԽɺԻྔɺԻఔͷมԽͳͲ ‣ ܭࢉྔ͕গͳ͍ ! ‣ ΦʔσΟΦ৴߸ ‣ ԻΛੜ͢ΔܗͷมԽ ‣ ܭࢉྔ͕ଟ͍
ίϯτϩʔϧͱΦʔσΟΦ ‣ ͦΕͧΕͷ৴߸ͷࡉ͔͞ɺϓϩάϥϜͰఆٛͰ͖Δ ! ‣ ίϯτϩʔϧ৴߸ ‣ $0/530-@3"5& ‣ ॳظ
! ‣ ΦʔσΟΦ৴߸ ‣ "6%*0@3"5& ! ‣ ͨͩ͠ɺͲͪΒͷႈΛࢦఆ͠ͳ͍ͱ͍͚ͳ͍ ‣ ʜ
! ! ! ‣ ඞཁͳ෦ ϔομϑΝΠϧ ΛಡΈࠐΜͰ͍Δ ! ‣ .P[[J(VUTI.P[[JͷίΞػೳ
‣ 0TDJMIΦγϨʔλ ‣ UBCMFTTJO@JOUIαΠϯͷΛςʔϒϧʹอ࣋ #include <MozziGuts.h> #include <Oscil.h> #include <tables/sin2048_int8.h> .P[[Jϓϩάϥϛϯά ɺ͡ΊͷҰา
! ! ‣ αΠϯͷΦγϨʔλΛఆ͍ٛͯ͠Δ ! ‣ ΦγϨʔλͷαϯϓϧ ‣ "6%*0@3"5&ΦʔσΟΦϨΠτ ‣
4*/@%"5"TJO@JOUIͰఆٛ͞ΕͨαΠϯͷ ςʔϒϧͷ Oscil <2048, AUDIO_RATE> aSin(SIN2048_DATA); .P[[Jϓϩάϥϛϯά ɺ͡ΊͷҰา
! ! ! ‣ ॳظઃఆ ! ‣ $0/530-@3"5& Λࢦఆͯ͠ɺ.P[[JΛ։࢝
‣ ΦγϨʔλͷपΛɺ)[ʹ void setup(){ startMozzi(CONTROL_RATE); aSin.setFreq(440); } .P[[Jϓϩάϥϛϯά ɺ͡ΊͷҰา
! ! ! ‣ ίϯτϩʔϧ৴߸ͷߋ৽ ‣ ݱঢ়ɺͳʹࢦఆ͍ͯ͠ͳ͍ void updateControl(){ !
} .P[[Jϓϩάϥϛϯά ɺ͡ΊͷҰา
! ! ! ‣ ΦʔσΟΦ৴߸ͷߋ৽ ‣ αΠϯͷ࣍ͷαϯϓϧͷΛܭࢉͯ͠ग़ྗ int updateAudio(){ return
aSin.next(); } .P[[Jϓϩάϥϛϯά ɺ͡ΊͷҰา
! ! ! ‣ ϧʔϓ ‣ ݱࡏͷ.P[[JͰੜ͞ΕͨԻΛग़ྗ ‣ BVEJP)PPL Λ༻͍Δ
void loop(){ audioHook(); } .P[[Jϓϩάϥϛϯά ɺ͡ΊͷҰา
.P[[JΫΠζ
.P[[JΫΠζ ‣ ݱࡏͷαϯϓϧϓϩάϥϜΛվͯ͠ҎԼͷػೳʹ ! ‣ 2 ॳڃ ‣ ੜ͞ΕΔԻͷपΛมԽͤ͞Δ
‣ )[ )[ )[ʜFUD ! ‣ 2 தڃ ‣ )[͔Β։࢝ͯ͠ɺঃʑʹप͕ߴ͘ͳΔ ! ‣ 2 Ԡ༻ ‣ αΠϯʹɺϏϒϥʔτ ԻఔͷมԽ Λ͚ͭͯΈΔ
.P[[JΫΠζ ‣ ࣍ि·Ͱͷ՝ʹ͠·͢