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物理コントローラーがほしい
Search
田中みそ
May 17, 2022
Technology
630
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Spotify物理コントローラーがほしい
2022/5/17 IoTLT vol.87 @秋葉原+Youtube
田中みそ
May 17, 2022
Transcript
22 slides
Spotify物理コントローラーがほしい 田中みそ 2022/5/17 IoTLT vol.87 @秋葉原+Youtube
自己紹介 田中 みそ (田中 大樹) Qiita: miso_develop Twitter: miso_develop Facebook:
田中みそ LINE API Expert IoT界隈やスマートスピーカー界隈に よくいます
Spotify物理コントローラーがほしい背景 • 普段スマートスピーカーからSpotifyで音楽を流すけど、 曲選択や音量調整といった操作は音声ではやりづらい • なのでWeb Playerを使ってPCから操作してるけど、 PCのあるところに行かないといけなかったり、 ウインドウ切り替えたりと地味にめんどくさい
コンポのリモコンみたいなので操作したい 理想はコンポ(死語?)のリモコン感覚で物理ボタンを ポチポチすればSpotifyをコントロールできたらいいな
(余談)Spotify Web Playerは神 • Spotifyのスマホアプリは無料プランだとシャッフル再生しか できない制約がありますがWeb Playerだと自由に曲選択できる • 前は15時間/月の制限があったけど昨年1月のアップデートで その制限がなくなった…!
• 代わりにそのアプデ時期あたりから無料プランだと音声広告がちょ いちょい入るようになった (けど最近はあまり広告流れてこない気がする)
(余談)こんなのもあるらしい 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ヶ月980円キャンペーン中!(5/19まで) https://www.spotify.com/jp/comeback/ より
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
本番構成 マイコン: 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 • キャンドゥのUSBテンキーボード • 330円! https://note.com/tomorrow56/n/n9e9a02586d76 より https://lang-ship.com/blog/work/usb-numeric-keypad/ より
物理ボタン案その2 ここのユニバーサル基板用端子がほしい… (なんて名前でぐぐればいいのか分からないの でどなたかご教示ください…!><) https://lang-ship.com/blog/work/usb-numeric-keypad/ より
Music LT Vol.2 来週5/26(木)にあります!
More Decks by 田中みそ
See All by 田中みそ
AIコーディングはじめました
miso
0
190
アレをアレに完全に埋め込むアレを作ってみた
miso
0
320
アレをアレに埋め込むアレを作ってみた
miso
0
180
プラレールのめちゃくちゃ良く折れるアレをできる限り手抜きして3Dプリンターでなんとかしようとした
miso
0
160
子どもの写真からデフォルメフィギュアを作ってみた
miso
1
1.4k
LINE x IoT 入門ハンズオン
miso
0
370
M5ATOMでNintendo Switchを自動化してみた
miso
0
810
ngrokを使ったLINE Bot開発を超絶楽ちんにする「linegrok」のご紹介
miso
0
550
opnizのご紹介
miso
0
1k
Other Decks in Technology
See All in Technology
落とし穴にハマってわかった 開発生産性を測るときに気をつけたいこと
munakata
3
490
【Oracle AI SPOTLIGHT ウェビナー】AI時代、狙われるデータと止められない業務をどう守るか?
oracle4engineer
PRO
1
140
こんなに変わった! AWSネットワークの常識
shotashiratori
16
11k
設計手法を「道具」として使いこなすために
a_suenami
7
1.7k
メルカリの小規模チーム「Pod」で、 エンジニアがデータアナリストなしで、 AIを使ってデータ分析の自走を目指す取り組み
jackojacko_
1
350
業務の傍らで進める改善ループエンジニアリング
bengo4com
1
240
エンタープライズIAMについて - ID・権限をどう統制するか
oidfj
1
310
ポケモンバトルのAIエージェント
koji_kawamura
0
220
そのイメージ、どのCIが作った? Artifact Attestationsで来歴を固定する / Which CI system created that image? Pinning provenance with Artifact Attestations
chmikata
0
270
「正しいデータ」の定義をAI エージェントとつくるGoogleADKによるデータ品質定義の実践
takaha4k
0
130
人の努力に頼らないセキュリティをエンジニアリングする在り方 / An approach to engineering security that does not rely on human effort
carta_engineering
0
240
みん強Lightning! データ基盤ひとりでできるかな
endonanana
0
190
Featured
See All Featured
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
550
The Limits of Empathy - UXLibs8
cassininazir
2
800
So, you think you're a good person
axbom
PRO
2
2.3k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Navigating Weather and Climate Data
rabernat
0
600
Balancing Empowerment & Direction
lara
6
1.4k
A better future with KSS
kneath
240
18k
We Are The Robots
honzajavorek
0
460
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
1
310
4 Signs Your Business is Dying
shpigford
187
23k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
23k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k