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
Inside mml2wav.rb
Search
HORINOUCHI Masato
February 16, 2016
Technology
0
86
Inside mml2wav.rb
社内LT大会 0x64物語 #05 Number 資料
HORINOUCHI Masato
February 16, 2016
Tweet
Share
More Decks by HORINOUCHI Masato
See All by HORINOUCHI Masato
balenaCloud
thermes
0
74
Church Numerals
thermes
0
47
CPS & CTO
thermes
0
250
FM synthesis
thermes
0
36
A440
thermes
0
61
Scheme Interpreter in Ruby
thermes
0
70
Clock / Timer
thermes
0
160
Hash Tree
thermes
0
75
POSIX Threads
thermes
0
56
Other Decks in Technology
See All in Technology
Cosmos World Foundation Model Platform for Physical AI
takmin
0
890
Ruby版 JSXのRuxが気になる
sansantech
PRO
0
150
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
10k
CDKで始めるTypeScript開発のススメ
tsukuboshi
1
430
AWS Network Firewall Proxyを触ってみた
nagisa53
1
230
AIと新時代を切り拓く。これからのSREとメルカリIBISの挑戦
0gm
0
1.1k
Kiro IDEのドキュメントを全部読んだので地味だけどちょっと嬉しい機能を紹介する
khmoryz
0
200
Digitization部 紹介資料
sansan33
PRO
1
6.8k
15 years with Rails and DDD (AI Edition)
andrzejkrzywda
0
190
Context Engineeringの取り組み
nutslove
0
350
プロダクト成長を支える開発基盤とスケールに伴う課題
yuu26
4
1.3k
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
13k
Featured
See All Featured
RailsConf 2023
tenderlove
30
1.3k
How to train your dragon (web standard)
notwaldorf
97
6.5k
Skip the Path - Find Your Career Trail
mkilby
0
56
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.7k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.3k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.3k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
430
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
830
Six Lessons from altMBA
skipperchong
29
4.1k
Git: the NoSQL Database
bkeepers
PRO
432
66k
We Have a Design System, Now What?
morganepeng
54
8k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.9k
Transcript
Inside mml2wav.rb 2016/02/16 0x64 Tales #05 Number Livesense Inc. HORINOUCHI
Masato
σϞ • εϖϥϯΧʔ ϝΠϯςʔϚ ΄͛ • spelunker.wav • h0p:/ /lifecycle.s165.xrea.com/mml1.html
͔ΒҾ༻ • FF4 ௨ৗઓಆۂ • ff4_bu0le.wav • h0p:/ /www.geociDes.jp/Dfa_adiru/57ff4 ͔ΒҾ༻
MML ઌఔͷԻσϞͷ MML 1. T120 V15 O4 L4 R CDEF
GAB>C< R C1& C1 F1& F1 G1& G1 2. T120 V15 O4 L4 R C1& C1& R R4E2.& E1 R4A2.& A1 R4B2.& B1 3. T120 V15 O4 L4 R R1 R1 R R2G2& G1 R2>C2& C1 R2D2& D1 track 1ʙ3 Ͱಉ࣌ൃԻ 3 ͱͳΔ ← ޡ༻͚ͩͲ͍ΘΏΔ 3Իɻ
ػೳ (1) • ྔࢠԽϏοτ: 8bit / 16bit • αϯϓϦϯάप: 8kHz
/ 44.1kHz / 48kHz (ҙมߋՄ) • ܗ: ਖ਼ݭ / ϊίΪϦ / ۣܗ
ػೳ (2) • ղೳ(ppq): 48 / 96 / 480 (ҙมߋՄ)
• τϥοΫ: ແݶ (ੑೳґଘ) • εςοϓ: ແݶ (ੑೳґଘ) • Իߴ: A440 / A442 / A444 (ҙมߋՄ) • Ի: 12ฏۉ / ७ਖ਼
Ͱ͖ͳ͍͜ͱ • εςϨΦग़ྗ • ࡾ֯ • Τϯϕϩʔϓ • ϊΠζग़ྗ •
σϡʔςΟʔൺมߋ
ରԠίϚϯυ • MML ͷओͳίϚϯυ΄ͱΜͲରԠɻ • O > < • C
D E F G A B + - • R • [0-9]+ (ࣈ) . (dot) • T L V Q &
ॲཧϑϩʔ 1. MML → ؆қ MIDI γʔέϯεσʔλʹม • note number
/ step5me / gate5me / velocity 2. γʔέϯεσʔλ → -1.0 ʙ 1.0 ͷܗσʔλʹม 3. τϥοΫຖͷܗσʔλΛ߹ 4. ߹ޙͷܗσʔλΛ WAV ʹΤϯίʔυ
·ͱΊ • MML ͷύʔε؆୯ɻ • ֤ॲཧΛநԽ͢ΔͱɺػೳΛޙ͚͍͢͠ɻ • ͦͷͨΊ࠷దԽ͕͞Ε͓ͯΒͣॲཧ͕Ͱॏ͍ɻ • ΑΓਖ਼֬ʹγʔέϯεԽ͢Δͱ
.mid ͷมͰ͖Δ༧ײɻ • ςʔϚ͔Βܹ͘͠ઢͨ͠ɻ • ͱ͍͑ͱָͯ͠ΊͨͷͰେຬɻ
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠