SlideShare ist ein Scribd-Unternehmen logo
1 von 19
Downloaden Sie, um offline zu lesen
Web & Sound
Playing with Sound APIs recently introduced to the Web
Overview + Demo
New Sound APIs
◇ Web Audio (http://webaudio.github.io/web-audio-api/)
■ Real-time audio synthesis
○ cf. SuperCollider, Pure Data, Max/MSP
■ SFX (Pan, Delay, Filter, etc)
◇ Web MIDI (http://webaudio.github.io/web-midi-api/)
■ Real-time communication
○ Web ⇄ Musical Instruments
● Synths, DJ and lighting controllers
◇ WebRTC (http://w3c.github.io/webrtc-pc/)
■ Camera & Microphone
Web Audio Demo
◇ Web Audio Playground (http://webaudioplayground.appspot.com/)
■ Straight-forward GUI wrapper
◇ WebPd (https://github.com/sebpiq/WebPd)
■ Pure Data clone
◇ CoffeeCollider (https://github.com/mohayonao/CoffeeCollider)
■ Coffee Script + SuperCollider
◇ T’SS JS edition (https://github.com/toyoshim/tss)
■ Chiptune sound emulation (demo, tsdsp)
MIDI is old, and new
◇ 30th anniversary
◇ MIDI is not only SMF but a protocol
■ SMF: Standard MIDI File
○ Protocol dump file with timestamps
■ Real-time communication - lighting and more
○ 冨田勲×初音ミク「イーハトーヴ」@ YouTube
◇ De facto for music production tools
■ Software Synth in DAW: Audio Unit, VSTi, DXi
■ Hardware: DIN, USB, FireWire, RTP, Bluetooth(*)
○ (*): supported by Yosemite, Windows 10, Android M
Web MIDI Demo
◇ Physical controller for online sound systems
■ Web Audio Synth v2 (http://aikelab.net/websynthv2/)
■ Web FM Synthesizer (http://www.taktech.org/takm/WebFMSynth/)
■ Online DAW: audiotool (http://www.audiotool.com/)
■ Online VJ: MajVj (GGT 2014 demo)
◇ Demo and Productions by YAMAHA
■ Pocket Miku (Product page & Web App)
■ Web Music Platform (toyoshim’s fork)
■ Reface + Soundmondo (Product page)
○ Social to share your sound and music via Web MIDI
WebRTC
◇ microphone
■ getUserMedia({audio:true}, …)
○ Can connect to Web Audio via
createMediaStreamSource()
◇ camera
■ getUserMedia({video: true}... )
○ Can use it as a texture for WebGL
Web Apps be Secure!
◇ Hardware is hard to use securely
■ What happens on WebGL?
○ Need GPU process and GPU command validator
■ Recent APIs to use hardware
○ Permission prompt (infobar/bubble UI)
○ Secure origin, e.g. https or localhost, is mandatory
■ Real P0 issue happened on Web MIDI
○ Microsoft GS Wavetable SW Synth crashes
● on receiving a special valid sequence
● outside Chrome sandbox, inside the driver
How to learn
◇ Web Audio
■ Getting Started with Web Audio API html5rocks
■ Web Audio API Ryoya Kawai
■ Web Audio API 解説 g200kg
◇ Web MIDI
■ Web MIDI API (x-webmidi編) Ryoya Kawai
■ ブラウザで電子楽器を作ってみよう HTML5 Experts
■ 最高に乱暴なWeb MIDI API利用方法 tadfmac
Lesson: Web Audio 1
◇ Simple sine wave
var audio = new AudioContext();
var osc = audio.createOscillator();
osc.frequency.value = 440; // in Hz
osc.connect(audio.destination);
osc.start(0);
Lesson: Web Audio 2
◇ Other nodes
■ Audio source
○ AudioBufferSourceNode (from Audio resources, e.g., mp3, m4a)
○ MediaElementAudioSourceNode (from DOM media object)
○ MediaStreamSource (from microphone via getUserMedia)
○ ScriptProcessorNode (deprecated) => AudioWorkerNodeProcessor (from JS)
○ OscillatorNode (from various kinds of oscillators)
■ Effect
○ GainNode
○ DelayNode
○ (Stereo)PannerNode / AudioListener
○ ConvolverNode (e.g., Vocoder, Reverb, and so on)
○ DynamicsCompressorNode / WaveShaperNode
○ BuquadFilterNode (e.g., LPF, HPF, BPF, and so on)
■ Misc
○ AnalyserNode (FFT)
○ ChannelSplitterNode / ChannelMergerNode (Mixer)
Lesson: Web MIDI 1
◇ Device Query
var promise = navigator.requestMIDIAccess();
promise.then(function(midi) {
for (var input of midi.inputs.values())
console.log(input); // MIDIInput
for (var output of midi.outputs.values())
console.log(output); // MIDIOutput
});
Lesson: Web MIDI 2
◇ MIDIInput
for (var input of midi.inputs.values())
input.onmidimessage = handler;
function handler (e) {
// Single MIDI message in Array.
console.log(e.data);
}
Lesson: Web MIDI 3
◇ MIDIOutput
for (var output of midi.outputs.values()) {
// Send single MIDI message or multiple
// MIDI messages.
output.send([0x90, 0x40, 0x7f]); // Note ON
}
Lesson: Promise
◇ New replacement for callbacks
foo(successCallback, errorCallback);
↓
foo().then(successCallback, errorCallback);
foo().then(bar)
.then(baz)
.catch(qux);
◇ Chaining
Promise.all([foo(),
bar()])
.then(baz, qux);
◇ Wait multiple async functions
Lesson: Maplike
◇ readonly maplike<DOMString, MIDIInput> inputs
◇ readonly maplike<DOMString, MIDIOutput> outputs
◇ keys() … MIDIPort.id is used as an unique key
◇ values() … MIDIInput / MIDIOutput
for (var input of inputs.values()) {
// New syntax for ES6 iterable
}
Lesson: Web MIDI 4
◇ Hotplug
midi.onstatechange = function (e) {
var newport = e.port;
if (newport.state == “connected”)
console.log(newport.name + “ is attached”;
else if (newport.state == “disconnected”)
console.log(newport.name + “ is detached”;
};
Fine ||
References
◇ Slide template
■ from Slides Carnival
○ http://www.slidescarnival.com/imogen-free-
presentation-template/399

Weitere ähnliche Inhalte

Andere mochten auch

Benefits of yoga
Benefits of yogaBenefits of yoga
Benefits of yogaaayuclinics
 
Strengthening Revenue Cycle Partnerships
Strengthening Revenue Cycle PartnershipsStrengthening Revenue Cycle Partnerships
Strengthening Revenue Cycle PartnershipsHealthfuse
 
Post demonetization-auto-sales-will-settle-during-dec
Post demonetization-auto-sales-will-settle-during-decPost demonetization-auto-sales-will-settle-during-dec
Post demonetization-auto-sales-will-settle-during-decShailesh Saraf
 
20160120 gpsロガーアプリを作ろう
20160120 gpsロガーアプリを作ろう20160120 gpsロガーアプリを作ろう
20160120 gpsロガーアプリを作ろう史識 川原
 
150 business-jargon-fixes 0
150 business-jargon-fixes 0150 business-jargon-fixes 0
150 business-jargon-fixes 0StraightNorthIM
 
2015 Who Went Where Survey Presentation - Jamie Grigsby
2015 Who Went Where Survey Presentation - Jamie Grigsby2015 Who Went Where Survey Presentation - Jamie Grigsby
2015 Who Went Where Survey Presentation - Jamie GrigsbyAMA DocSIG
 
【SoftLayer事例】株式会社データテック
【SoftLayer事例】株式会社データテック【SoftLayer事例】株式会社データテック
【SoftLayer事例】株式会社データテックsoftlayerjp
 
いよいよ本番(斜め上)活用例から見るWebVRの使いドコロ @JSおじさん
������� ������������ ���������いよいよ本番(斜め上)活用例から見るWebVRの使いドコロ @JSおじさん������� ������������ ���������いよいよ本番(斜め上)活用例から見るWebVRの使いドコロ @JSおじさん
いよいよ本番(斜め上)活用例から見るWebVRの使いドコロ @JSおじさんKazuya Hiruma
 
20160824 isao meetup_vol2
20160824 isao meetup_vol220160824 isao meetup_vol2
20160824 isao meetup_vol2Rammaru Akagawa
 
いまからでも遅くない Docker事始め&愉快な仲間達
いまからでも遅くない Docker事始め&愉快な仲間達いまからでも遅くない Docker事始め&愉快な仲間達
いまからでも遅くない Docker事始め&愉快な仲間達softlayerjp
 
OnsenUI + AngularJS + CloudEndpointsで作るSPA 地雷処理の巻
OnsenUI + AngularJS + CloudEndpointsで作るSPA 地雷処理の巻OnsenUI + AngularJS + CloudEndpointsで作るSPA 地雷処理の巻
OnsenUI + AngularJS + CloudEndpointsで作るSPA 地雷処理の巻Hiroshi Furuyama
 
How To Build A High Performance Lead Generation Website
How To Build A High Performance  Lead Generation WebsiteHow To Build A High Performance  Lead Generation Website
How To Build A High Performance Lead Generation WebsiteStraightNorthIM
 
10 Ways to Make Your Lead Generation Website Convert On the First Visit
10 Ways to Make Your Lead Generation Website Convert On the First Visit10 Ways to Make Your Lead Generation Website Convert On the First Visit
10 Ways to Make Your Lead Generation Website Convert On the First VisitStraightNorthIM
 

Andere mochten auch (14)

Benefits of yoga
Benefits of yogaBenefits of yoga
Benefits of yoga
 
Strengthening Revenue Cycle Partnerships
Strengthening Revenue Cycle PartnershipsStrengthening Revenue Cycle Partnerships
Strengthening Revenue Cycle Partnerships
 
Post demonetization-auto-sales-will-settle-during-dec
Post demonetization-auto-sales-will-settle-during-decPost demonetization-auto-sales-will-settle-during-dec
Post demonetization-auto-sales-will-settle-during-dec
 
20160120 gpsロガーアプリを作ろう
20160120 gpsロガーアプリを作ろう20160120 gpsロガーアプリを作ろう
20160120 gpsロガーアプリを作ろう
 
150 business-jargon-fixes 0
150 business-jargon-fixes 0150 business-jargon-fixes 0
150 business-jargon-fixes 0
 
2015 Who Went Where Survey Presentation - Jamie Grigsby
2015 Who Went Where Survey Presentation - Jamie Grigsby2015 Who Went Where Survey Presentation - Jamie Grigsby
2015 Who Went Where Survey Presentation - Jamie Grigsby
 
【SoftLayer事例】株式会社データテック
【SoftLayer事例】株式会社データテック【SoftLayer事例】株式会社データテック
【SoftLayer事例】株式会社データテック
 
いよいよ本番(斜め上)活用例から見るWebVRの使いドコロ @JSおじさん
������� ������������ ���������いよいよ本番(斜め上)活用例から見るWebVRの使いドコロ @JSおじさん������� ������������ ���������いよいよ本番(斜め上)活用例から見るWebVRの使いドコロ @JSおじさん
いよいよ本番(斜め上)活用例から見るWebVRの使いドコロ @JSおじさん
 
20160824 isao meetup_vol2
20160824 isao meetup_vol220160824 isao meetup_vol2
20160824 isao meetup_vol2
 
いまからでも遅くない Docker事始め&愉快な仲間達
いまからでも遅くない Docker事始め&愉快な仲間達いまからでも遅くない Docker事始め&愉快な仲間達
いまからでも遅くない Docker事始め&愉快な仲間達
 
OnsenUI + AngularJS + CloudEndpointsで作るSPA 地雷処理の巻
OnsenUI + AngularJS + CloudEndpointsで作るSPA 地雷処理の巻OnsenUI + AngularJS + CloudEndpointsで作るSPA 地雷処理の巻
OnsenUI + AngularJS + CloudEndpointsで作るSPA 地雷処理の巻
 
How To Build A High Performance Lead Generation Website
How To Build A High Performance  Lead Generation WebsiteHow To Build A High Performance  Lead Generation Website
How To Build A High Performance Lead Generation Website
 
Dr. Samad sir_Assignment dehydration_Ok
Dr. Samad sir_Assignment dehydration_OkDr. Samad sir_Assignment dehydration_Ok
Dr. Samad sir_Assignment dehydration_Ok
 
10 Ways to Make Your Lead Generation Website Convert On the First Visit
10 Ways to Make Your Lead Generation Website Convert On the First Visit10 Ways to Make Your Lead Generation Website Convert On the First Visit
10 Ways to Make Your Lead Generation Website Convert On the First Visit
 

Ähnlich wie Web &amp; sound

Making Music on the Web with MIDI Technology - Music China
Making Music on the Web with MIDI Technology - Music ChinaMaking Music on the Web with MIDI Technology - Music China
Making Music on the Web with MIDI Technology - Music ChinaRyoya Kawai
 
Web MIDI API - the paster, the present, and the future -
Web MIDI API - the paster, the present, and the future -Web MIDI API - the paster, the present, and the future -
Web MIDI API - the paster, the present, and the future -Takashi Toyoshima
 
Let's Make Some Noise with Web Audio API
Let's Make Some Noise with Web Audio APILet's Make Some Noise with Web Audio API
Let's Make Some Noise with Web Audio APIGlobalLogic Ukraine
 
Linux & Open Source - Alternative Software
Linux & Open Source - Alternative SoftwareLinux & Open Source - Alternative Software
Linux & Open Source - Alternative SoftwareSebastiano Merlino (eTr)
 
VA-API rust-binding (GStreamer Conference 2017)
VA-API rust-binding (GStreamer Conference 2017)VA-API rust-binding (GStreamer Conference 2017)
VA-API rust-binding (GStreamer Conference 2017)Igalia
 
Breakout@TPAC 2013 (Entertain Web with Musical Instruments)
Breakout@TPAC 2013 (Entertain Web with Musical Instruments)Breakout@TPAC 2013 (Entertain Web with Musical Instruments)
Breakout@TPAC 2013 (Entertain Web with Musical Instruments)Ryoya Kawai
 
Android taipei 2016 03-21.pptx
Android taipei 2016 03-21.pptxAndroid taipei 2016 03-21.pptx
Android taipei 2016 03-21.pptxKentPon Wang
 
WebRTC Reborn SignalConf 2016
WebRTC Reborn SignalConf 2016WebRTC Reborn SignalConf 2016
WebRTC Reborn SignalConf 2016Dan Jenkins
 
Twilio Signal 2016 WebRTC Reborn
Twilio Signal 2016 WebRTC RebornTwilio Signal 2016 WebRTC Reborn
Twilio Signal 2016 WebRTC RebornTwilio Inc
 
Guitar Effects with the HTML5 Audio API
Guitar Effects with the HTML5 Audio APIGuitar Effects with the HTML5 Audio API
Guitar Effects with the HTML5 Audio APICathy Lill
 
Create fun & immersive audio experiences with web audio
Create fun & immersive audio experiences with web audioCreate fun & immersive audio experiences with web audio
Create fun & immersive audio experiences with web audiodavrous
 
Push the web with HTML5
Push the web with HTML5Push the web with HTML5
Push the web with HTML5Stoyan Zhekov
 
Deep dive into Android’s audio latency problem
Deep dive into Android’s audio latency problemDeep dive into Android’s audio latency problem
Deep dive into Android’s audio latency problemSirawat Pitaksarit
 
Internet of Things
Internet of ThingsInternet of Things
Internet of ThingsAndy Gelme
 
Gracenote API - MusicHackDay
Gracenote API - MusicHackDayGracenote API - MusicHackDay
Gracenote API - MusicHackDayOscar Celma
 
MIDI is Staging a Comeback… in Your Browser!
MIDI is Staging a Comeback… in Your Browser!MIDI is Staging a Comeback… in Your Browser!
MIDI is Staging a Comeback… in Your Browser!FITC
 
MIDI is Staging a Comeback... In Your Browser!
MIDI is Staging a Comeback... In Your Browser!MIDI is Staging a Comeback... In Your Browser!
MIDI is Staging a Comeback... In Your Browser!Jean-Philippe Côté
 

Ähnlich wie Web &amp; sound (20)

Songbird
SongbirdSongbird
Songbird
 
Making Music on the Web with MIDI Technology - Music China
Making Music on the Web with MIDI Technology - Music ChinaMaking Music on the Web with MIDI Technology - Music China
Making Music on the Web with MIDI Technology - Music China
 
Web MIDI API - the paster, the present, and the future -
Web MIDI API - the paster, the present, and the future -Web MIDI API - the paster, the present, and the future -
Web MIDI API - the paster, the present, and the future -
 
Let's Make Some Noise with Web Audio API
Let's Make Some Noise with Web Audio APILet's Make Some Noise with Web Audio API
Let's Make Some Noise with Web Audio API
 
Linux & Open Source - Alternative Software
Linux & Open Source - Alternative SoftwareLinux & Open Source - Alternative Software
Linux & Open Source - Alternative Software
 
Dronecode: software open source em drones
Dronecode: software open source em dronesDronecode: software open source em drones
Dronecode: software open source em drones
 
VA-API rust-binding (GStreamer Conference 2017)
VA-API rust-binding (GStreamer Conference 2017)VA-API rust-binding (GStreamer Conference 2017)
VA-API rust-binding (GStreamer Conference 2017)
 
Breakout@TPAC 2013 (Entertain Web with Musical Instruments)
Breakout@TPAC 2013 (Entertain Web with Musical Instruments)Breakout@TPAC 2013 (Entertain Web with Musical Instruments)
Breakout@TPAC 2013 (Entertain Web with Musical Instruments)
 
Android taipei 2016 03-21.pptx
Android taipei 2016 03-21.pptxAndroid taipei 2016 03-21.pptx
Android taipei 2016 03-21.pptx
 
WebRTC Reborn SignalConf 2016
WebRTC Reborn SignalConf 2016WebRTC Reborn SignalConf 2016
WebRTC Reborn SignalConf 2016
 
Twilio Signal 2016 WebRTC Reborn
Twilio Signal 2016 WebRTC RebornTwilio Signal 2016 WebRTC Reborn
Twilio Signal 2016 WebRTC Reborn
 
Guitar Effects with the HTML5 Audio API
Guitar Effects with the HTML5 Audio APIGuitar Effects with the HTML5 Audio API
Guitar Effects with the HTML5 Audio API
 
Create fun & immersive audio experiences with web audio
Create fun & immersive audio experiences with web audioCreate fun & immersive audio experiences with web audio
Create fun & immersive audio experiences with web audio
 
Mashup Y! widget
Mashup Y! widgetMashup Y! widget
Mashup Y! widget
 
Push the web with HTML5
Push the web with HTML5Push the web with HTML5
Push the web with HTML5
 
Deep dive into Android’s audio latency problem
Deep dive into Android’s audio latency problemDeep dive into Android’s audio latency problem
Deep dive into Android’s audio latency problem
 
Internet of Things
Internet of ThingsInternet of Things
Internet of Things
 
Gracenote API - MusicHackDay
Gracenote API - MusicHackDayGracenote API - MusicHackDay
Gracenote API - MusicHackDay
 
MIDI is Staging a Comeback… in Your Browser!
MIDI is Staging a Comeback… in Your Browser!MIDI is Staging a Comeback… in Your Browser!
MIDI is Staging a Comeback… in Your Browser!
 
MIDI is Staging a Comeback... In Your Browser!
MIDI is Staging a Comeback... In Your Browser!MIDI is Staging a Comeback... In Your Browser!
MIDI is Staging a Comeback... In Your Browser!
 

Mehr von Takashi Toyoshima

第2回html5jゲーム部勉強会 Oh! JavaScript 夢の続きを語ろうよ〜emscriptenの逆襲 - html5編
第2回html5jゲーム部勉強会   Oh! JavaScript 夢の続きを語ろうよ〜emscriptenの逆襲 - html5編第2回html5jゲーム部勉強会   Oh! JavaScript 夢の続きを語ろうよ〜emscriptenの逆襲 - html5編
第2回html5jゲーム部勉強会 Oh! JavaScript 夢の続きを語ろうよ〜emscriptenの逆襲 - html5編Takashi Toyoshima
 
z-music.js - AudioProcessorNode can do it
z-music.js - AudioProcessorNode can do itz-music.js - AudioProcessorNode can do it
z-music.js - AudioProcessorNode can do itTakashi Toyoshima
 
Oh! java script 夢の続きを語ろうよ〜emscriptenの逆襲
Oh! java script 夢の続きを語ろうよ〜emscriptenの逆襲Oh! java script 夢の続きを語ろうよ〜emscriptenの逆襲
Oh! java script 夢の続きを語ろうよ〜emscriptenの逆襲Takashi Toyoshima
 
Audio Context+ at WebAudio.tokyo #1
Audio Context+ at WebAudio.tokyo #1Audio Context+ at WebAudio.tokyo #1
Audio Context+ at WebAudio.tokyo #1Takashi Toyoshima
 
子供と使う便利ツール
子供と使う便利ツール子供と使う便利ツール
子供と使う便利ツールTakashi Toyoshima
 

Mehr von Takashi Toyoshima (9)

楽しいロリコン
楽しいロリコン楽しいロリコン
楽しいロリコン
 
第2回html5jゲーム部勉強会 Oh! JavaScript 夢の続きを語ろうよ〜emscriptenの逆襲 - html5編
第2回html5jゲーム部勉強会   Oh! JavaScript 夢の続きを語ろうよ〜emscriptenの逆襲 - html5編第2回html5jゲーム部勉強会   Oh! JavaScript 夢の続きを語ろうよ〜emscriptenの逆襲 - html5編
第2回html5jゲーム部勉強会 Oh! JavaScript 夢の続きを語ろうよ〜emscriptenの逆襲 - html5編
 
z-music.js - AudioProcessorNode can do it
z-music.js - AudioProcessorNode can do itz-music.js - AudioProcessorNode can do it
z-music.js - AudioProcessorNode can do it
 
Oh! java script 夢の続きを語ろうよ〜emscriptenの逆襲
Oh! java script 夢の続きを語ろうよ〜emscriptenの逆襲Oh! java script 夢の続きを語ろうよ〜emscriptenの逆襲
Oh! java script 夢の続きを語ろうよ〜emscriptenの逆襲
 
Audio Context+ at WebAudio.tokyo #1
Audio Context+ at WebAudio.tokyo #1Audio Context+ at WebAudio.tokyo #1
Audio Context+ at WebAudio.tokyo #1
 
Chrome Web MIDI 2015
Chrome Web MIDI 2015Chrome Web MIDI 2015
Chrome Web MIDI 2015
 
子供と使う便利ツール
子供と使う便利ツール子供と使う便利ツール
子供と使う便利ツール
 
Web MIDI API update
Web MIDI API updateWeb MIDI API update
Web MIDI API update
 
USB MIDI - DMX bridge
USB MIDI - DMX bridgeUSB MIDI - DMX bridge
USB MIDI - DMX bridge
 

Kürzlich hochgeladen

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 

Kürzlich hochgeladen (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

Web &amp; sound

  • 1. Web & Sound Playing with Sound APIs recently introduced to the Web
  • 3. New Sound APIs ◇ Web Audio (http://webaudio.github.io/web-audio-api/) ■ Real-time audio synthesis ○ cf. SuperCollider, Pure Data, Max/MSP ■ SFX (Pan, Delay, Filter, etc) ◇ Web MIDI (http://webaudio.github.io/web-midi-api/) ■ Real-time communication ○ Web ⇄ Musical Instruments ● Synths, DJ and lighting controllers ◇ WebRTC (http://w3c.github.io/webrtc-pc/) ■ Camera & Microphone
  • 4. Web Audio Demo ◇ Web Audio Playground (http://webaudioplayground.appspot.com/) ■ Straight-forward GUI wrapper ◇ WebPd (https://github.com/sebpiq/WebPd) ■ Pure Data clone ◇ CoffeeCollider (https://github.com/mohayonao/CoffeeCollider) ■ Coffee Script + SuperCollider ◇ T’SS JS edition (https://github.com/toyoshim/tss) ■ Chiptune sound emulation (demo, tsdsp)
  • 5. MIDI is old, and new ◇ 30th anniversary ◇ MIDI is not only SMF but a protocol ■ SMF: Standard MIDI File ○ Protocol dump file with timestamps ■ Real-time communication - lighting and more ○ 冨田勲×初音ミク「イーハトーヴ」@ YouTube ◇ De facto for music production tools ■ Software Synth in DAW: Audio Unit, VSTi, DXi ■ Hardware: DIN, USB, FireWire, RTP, Bluetooth(*) ○ (*): supported by Yosemite, Windows 10, Android M
  • 6. Web MIDI Demo ◇ Physical controller for online sound systems ■ Web Audio Synth v2 (http://aikelab.net/websynthv2/) ■ Web FM Synthesizer (http://www.taktech.org/takm/WebFMSynth/) ■ Online DAW: audiotool (http://www.audiotool.com/) ■ Online VJ: MajVj (GGT 2014 demo) ◇ Demo and Productions by YAMAHA ■ Pocket Miku (Product page & Web App) ■ Web Music Platform (toyoshim’s fork) ■ Reface + Soundmondo (Product page) ○ Social to share your sound and music via Web MIDI
  • 7. WebRTC ◇ microphone ■ getUserMedia({audio:true}, …) ○ Can connect to Web Audio via createMediaStreamSource() ◇ camera ■ getUserMedia({video: true}... ) ○ Can use it as a texture for WebGL
  • 8. Web Apps be Secure! ◇ Hardware is hard to use securely ■ What happens on WebGL? ○ Need GPU process and GPU command validator ■ Recent APIs to use hardware ○ Permission prompt (infobar/bubble UI) ○ Secure origin, e.g. https or localhost, is mandatory ■ Real P0 issue happened on Web MIDI ○ Microsoft GS Wavetable SW Synth crashes ● on receiving a special valid sequence ● outside Chrome sandbox, inside the driver
  • 9. How to learn ◇ Web Audio ■ Getting Started with Web Audio API html5rocks ■ Web Audio API Ryoya Kawai ■ Web Audio API 解説 g200kg ◇ Web MIDI ■ Web MIDI API (x-webmidi編) Ryoya Kawai ■ ブラウザで電子楽器を作ってみよう HTML5 Experts ■ 最高に乱暴なWeb MIDI API利用方法 tadfmac
  • 10. Lesson: Web Audio 1 ◇ Simple sine wave var audio = new AudioContext(); var osc = audio.createOscillator(); osc.frequency.value = 440; // in Hz osc.connect(audio.destination); osc.start(0);
  • 11. Lesson: Web Audio 2 ◇ Other nodes ■ Audio source ○ AudioBufferSourceNode (from Audio resources, e.g., mp3, m4a) ○ MediaElementAudioSourceNode (from DOM media object) ○ MediaStreamSource (from microphone via getUserMedia) ○ ScriptProcessorNode (deprecated) => AudioWorkerNodeProcessor (from JS) ○ OscillatorNode (from various kinds of oscillators) ■ Effect ○ GainNode ○ DelayNode ○ (Stereo)PannerNode / AudioListener ○ ConvolverNode (e.g., Vocoder, Reverb, and so on) ○ DynamicsCompressorNode / WaveShaperNode ○ BuquadFilterNode (e.g., LPF, HPF, BPF, and so on) ■ Misc ○ AnalyserNode (FFT) ○ ChannelSplitterNode / ChannelMergerNode (Mixer)
  • 12. Lesson: Web MIDI 1 ◇ Device Query var promise = navigator.requestMIDIAccess(); promise.then(function(midi) { for (var input of midi.inputs.values()) console.log(input); // MIDIInput for (var output of midi.outputs.values()) console.log(output); // MIDIOutput });
  • 13. Lesson: Web MIDI 2 ◇ MIDIInput for (var input of midi.inputs.values()) input.onmidimessage = handler; function handler (e) { // Single MIDI message in Array. console.log(e.data); }
  • 14. Lesson: Web MIDI 3 ◇ MIDIOutput for (var output of midi.outputs.values()) { // Send single MIDI message or multiple // MIDI messages. output.send([0x90, 0x40, 0x7f]); // Note ON }
  • 15. Lesson: Promise ◇ New replacement for callbacks foo(successCallback, errorCallback); ↓ foo().then(successCallback, errorCallback); foo().then(bar) .then(baz) .catch(qux); ◇ Chaining Promise.all([foo(), bar()]) .then(baz, qux); ◇ Wait multiple async functions
  • 16. Lesson: Maplike ◇ readonly maplike<DOMString, MIDIInput> inputs ◇ readonly maplike<DOMString, MIDIOutput> outputs ◇ keys() … MIDIPort.id is used as an unique key ◇ values() … MIDIInput / MIDIOutput for (var input of inputs.values()) { // New syntax for ES6 iterable }
  • 17. Lesson: Web MIDI 4 ◇ Hotplug midi.onstatechange = function (e) { var newport = e.port; if (newport.state == “connected”) console.log(newport.name + “ is attached”; else if (newport.state == “disconnected”) console.log(newport.name + “ is detached”; };
  • 19. References ◇ Slide template ■ from Slides Carnival ○ http://www.slidescarnival.com/imogen-free- presentation-template/399