Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Spotify物理リモコンがほしい v0.2
Search
田中みそ
May 26, 2022
Technology
420
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Spotify物理リモコンがほしい v0.2
2022/5/26 Music LT Vol.2 登壇スライド
田中みそ
May 26, 2022
More Decks by 田中みそ
See All by 田中みそ
アレをアレに完全に埋め込むアレを作ってみた
miso
0
300
アレをアレに埋め込むアレを作ってみた
miso
0
170
プラレールのめちゃくちゃ良く折れるアレをできる限り手抜きして3Dプリンターでなんとかしようとした
miso
0
150
子どもの写真からデフォルメフィギュアを作ってみた
miso
1
1.4k
LINE x IoT 入門ハンズオン
miso
0
350
M5ATOMでNintendo Switchを自動化してみた
miso
0
790
ngrokを使ったLINE Bot開発を超絶楽ちんにする「linegrok」のご紹介
miso
0
540
opnizのご紹介
miso
0
980
ルービックキューブスクランブラーが欲しかったので作ってみた
miso
0
1.1k
Other Decks in Technology
See All in Technology
アカウント統制の健康診断
kenichinakamura
1
160
日本AIベンチャーレポート2026
kentarofujii
0
180
macOS Golden Gate 時代のMac管理
tategami
0
140
シンプルな設定ファイルで実現する AWS IAM Identity Center の ユーザー管理Terraformフレームワークを公開しました / Simplifying AWS IAM Identity Center User Management: An Open-Source Terraform Framework
yamaguchitk333
0
250
Claude for Google Workspaces ポン出し/claude-for-google-workspace-slide-conversion
emiki
0
5.9k
Let's Change Our World—Again
snoozer05
PRO
6
560
Teaching Python with three kinds of AI
reuven
0
110
Steerable Visual Representations
sansantech
PRO
0
330
コンテナ運用におけるネットワーク・コンテナコストの削減方法/How to Reduce Network and Container Costs in Container Operations
masakiokuda
2
400
AI駆動開発におけるハーネスエンジニアリングの勘所
tsukuboshi
1
630
LLM-as-a-Judgeは本当に信頼できるのか――評価器を評価する話
taka_aki
3
1.1k
Adversary Infrastructure Hunting101
disconinja
0
110
Featured
See All Featured
The agentic SEO stack - context over prompts
schlessera
0
980
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
590
Docker and Python
trallard
47
4.2k
4 Signs Your Business is Dying
shpigford
187
23k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.9k
The World Runs on Bad Software
bkeepers
PRO
72
12k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
Facilitating Awesome Meetings
lara
57
7.2k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Thoughts on Productivity
jonyablonski
76
5.4k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
710
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3.1k
Transcript
Spotify物理リモコンがほしい v0.2 田中みそ 2022/5/26 Music LT Vol. 2
自己紹介 田中 みそ (田中 大樹) Qiita: miso_develop Twitter: miso_develop Facebook:
田中みそ Music LT主催 LINE API Expert IoT界隈やスマートスピーカー界隈に よくいます
Spotify物理リモコンがほしい背景 • 普段スマートスピーカーからSpotifyで音楽を流すけど、 曲選択や音量調整といった操作は音声ではやりづらい • なのでWeb Playerを使ってPCから操作してるけど、 PCのあるところに行かないといけなかったり、 ウインドウ切り替えたりと地味にめんどくさい
コンポのリモコンみたいなので操作したい 理想はコンポ(死語?)のリモコン感覚で物理ボタンを ポチポチしてSpotifyをコントロールできたらいいな
(余談)こんなのもあるらしい https://www.itmedia.co.jp/news/articles/2202/23/news041.html より
ソフトウェア実装
Spotify Web API https://developer.spotify.com/documentation/web-api/reference/#/operations/transfer-a-users-playback より
Spotify Web API • シンプルなREST API • Spotify for Developersにログインするとプロジェクト
(APP)を作成でき、Client ID/Secretが発行される • 曲情報やアルバム情報取得APIなんかがあり、 Player APIも一通り揃ってる • ただし無料プランだとPlayer APIは動かない…
(余談)初回3ヶ月無料キャンペーン中! https://www.spotifypremium.jp/ より
Web Consoleがとても便利 https://developer.spotify.com/console/get-user-player/?market=ES&additional_types= より
Web Consoleがとても便利 https://developer.spotify.com/console/get-user-player/?market=ES&additional_types= より
Web Consoleがとても便利 https://developer.spotify.com/documentation/general/guides/authorization/code-flow/ より
Use Caseに合わせたクラスを作成 Use Case • 再生/停止 • 次の曲へ • 前の曲へ
• 音量アップ • 音量ダウン • リピート • シャッフル https://github.com/thelinmichael/spotify-web-api-node より
ハードウェア実装
物理コントローラーどうするか • ひとまずM5Stackでプロトタイプ実装 • 3ボタンあるので組み合わせでUse Caseは網羅できる • 前の曲へ A •
再生/停止 B • 次の曲へ C • 音量ダウン A B • 音量アップ B C • リピート A C • シャッフル A B C
物理コントローラーどうするか
プロトタイプのシステム構成 Web API JavaScriptでマイコンを制御できるIoTフレームワーク。 M5Stackから直接Web API叩けるけど、Cで実装し たくなかったのでopnizを使ってTypeScriptで実装。 ボタン信号
本番構成 マイコン: M5ATOM or M5Stamp ソフトウェア実装:Spotify Web API & opniz
物理ボタン:どうしよう… https://www.switch-science.com/catalog/7360/ より
物理ボタン案その1 • 4x3キーパッド作成キット • 350円 • 小さすぎるかも? https://akizukidenshi.com/catalog/g/gK-12229/ より
物理ボタン案その2 • 100均のUSBテンキーボード • 330円! https://note.com/tomorrow56/n/n9e9a02586d76 より https://lang-ship.com/blog/work/usb-numeric-keypad/ より
物理ボタン案その3 • 謎の赤外線リモコン • 多分昔買った電子パーツ詰め合わ せみたいのについてきたやつ • ボタンいっぱいあるし最適解かも
物理ボタン案その3 https://lang-ship.com/blog/work/m5sitckc-daiso-remote-led/ より https://akizukidenshi.com/catalog/g/gM-07245/ より