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
Accelerate.vDSPとSwift Chartsでぶち上がろう!/サイボウズモバイル ...
Search
Kyome (Takuto Nakamura)
December 20, 2023
Programming
0
120
Accelerate.vDSPとSwift Chartsでぶち上がろう!/サイボウズモバイル Meetup 2023.04.20
Kyome (Takuto Nakamura)
December 20, 2023
Tweet
Share
More Decks by Kyome (Takuto Nakamura)
See All by Kyome (Takuto Nakamura)
Swiftで高速フーリエ変換してオーディオビジュアライザーを作る / iOSDC Japan 2024 Day1 Track D
kyome22
3
790
ブラウザアプリを自作してわかったWebViewの扱い方/iOS Meetup in 福岡
kyome22
1
3.3k
iOSのウィジェットでも猫走らせたい / iOSDC Japan 2022 Day2 Unconference
kyome22
3
1.1k
Hacking Xcode Behaviors / macOS native symposium #08
kyome22
2
1.6k
AppKitでお絵描きをしてみよう / macOS native symposium #06
kyome22
2
710
Finder Sync Extension で Mac 向け便利ツールを作ろう / iOSDC Japan 2021
kyome22
6
4.6k
iOS Custom Keyboardsでできること/できないこと/やってはいけないこと / iOSDC Japan 2020 LT
kyome22
3
1.9k
Other Decks in Programming
See All in Programming
Jakarta EE meets AI
ivargrimstad
0
230
ドメインイベント増えすぎ問題
h0r15h0
1
220
StarlingMonkeyを触ってみた話 - 2024冬
syumai
3
270
Итераторы в Go 1.23: зачем они нужны, как использовать, и насколько они быстрые?
lamodatech
0
710
As an Engineers, let's build the CRM system via LINE Official Account 2.0
clonn
1
670
なまけものオバケたち -PHP 8.4 に入った新機能の紹介-
tanakahisateru
1
120
Refactor your code - refactor yourself
xosofox
1
260
rails stats で紐解く ANDPAD のイマを支える技術たち
andpad
1
290
PHPとAPI Platformで作る本格的なWeb APIアプリケーション(入門編) / phpcon 2024 Intro to API Platform
ttskch
0
150
これでLambdaが不要に?!Step FunctionsのJSONata対応について
iwatatomoya
2
3.6k
Mermaid x AST x 生成AI = コードとドキュメントの完全同期への道
shibuyamizuho
0
160
CSC305 Lecture 26
javiergs
PRO
0
140
Featured
See All Featured
Building Applications with DynamoDB
mza
91
6.1k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
Building Adaptive Systems
keathley
38
2.3k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
29
2k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
510
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
Typedesign – Prime Four
hannesfritz
40
2.4k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
32
2.7k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
17
2.3k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Transcript
Kyome αΠϘζϞόΠϧ Meetup in େࡕ 2023/06/16 Accelerate.vDSPͱSwift ChartsͰͿ্͕ͪΖ͏ʂ Mobile Meetup
#cybozu_mobile ࣗݾհ IUUQTLZPNFJP ,ZPNF ,ZPNFTVLF CybozuͰkintoneϞόΠϧͷiOSΛ୲ ۀޮԽOSSϥΠϒϥϦͷ։ൃӡ༻ʹੵۃత झຯͰmacOS͚ͷϢʔςΟϦςΟΞϓϦ։ൃ
#cybozu_mobile Audio Visualizer 🎵
#cybozu_mobile Audio Visualizer 🎵 ԻΛՄࢹԽ͢Δͭ Χοί͍͍ʂʂ
#cybozu_mobile Audio Visualizer 🎵 ԻΛՄࢹԽ͢Δͭ Χοί͍͍ʂʂ ࡞ͬͯΈΑ͏🔨
#cybozu_mobile ࣮ͷํ
#cybozu_mobile 1. ϛϡʔδοΫΞϓϦ͔ΒۂͷϦετΛऔಘ 2. ۂͷ࠶ੜ࣌ʹԻݯσʔλΛऔಘͯ͠దٓՃ 3. ԻݯσʔλΛجʹ SwiftUI Ͱ Audio
Visualizer Λදࣔ ࣮ํ
#cybozu_mobile MediaPlayer Framework Λ͏ MPMediaLibrary.requestAuthorization() ͰϛϡʔδοΫΞϓϦͷ ϥΠϒϥϦͷΞΫηεΛཁٻͰ͖Δ Info.plist ʹ NSAppleMusicUsageDescription
Λهड़͢Δඞཁ͕͋Δ MPMediaQuery.songs().items ͰۂҰཡΛऔಘͰ͖Δ λΠτϧɺΞʔτϫʔΫɺԻݯϑΝΠϧͷύεͳͲ͕ೖखՄೳ ࣮ํɿϛϡʔδοΫΞϓϦ͔ΒۂͷϦετΛऔಘ
#cybozu_mobile ࣮ํɿۂͷ࠶ੜ࣌ʹԻݯσʔλΛऔಘͯ͠దٓՃ ۂ AVFoundation Framework ͷ AVAudioPlayerNode() Ͱ࠶ੜ͢Δ Իݯσʔλ AVAudioNode.installTap(onBus:
bu ff erSize: format: ) Ͱ AVAudioPCMBu ff er ΛऔಘͰ͖Δ Accelerate Framework ͷ vDSP Λར༻ͯ͠ৼ෯εϖΫτϧ RMSʢԻͷฏۉΤωϧΪʔʣΛࢉग़͢Δ ৼ෯εϖΫτϧΛಘΔʹ FFTʢߴϑʔϦΤมʣΛߦ͏
#cybozu_mobile ࣮ํɿۂͷ࠶ੜ࣌ʹԻݯσʔλΛऔಘͯ͠దٓՃ ۂ AVFoundation Framework ͷ AVAudioPlayerNode() Ͱ࠶ੜ͢Δ Իݯσʔλ AVAudioNode.installTap(onBus:
bu ff erSize: format: ) Ͱ AVAudioPCMBu ff er ΛऔಘͰ͖Δ Accelerate Framework ͷ vDSP Λར༻ͯ͠ৼ෯εϖΫτϧ RMSʢԻͷฏۉΤωϧΪʔʣΛࢉग़͢Δ ৼ෯εϖΫτϧΛಘΔʹ FFTʢߴϑʔϦΤมʣΛߦ͏ ֶྗ͕ඞཁ 📐
#cybozu_mobile ࣮ํɿԻݯσʔλΛجʹ SwiftUI Ͱ Audio Visualizer Λදࣔ iOS 16͔Β͑Δ Charts
Framework Λ׆༻͢Δ ંΕઢάϥϑɺάϥϑɺࢄਤΛར༻͢Δ ࢄਤͰɺChartSymbolShape ʹ४ڌͨࣗ͠༝ͳਤܗΛࢦఆͨ͠࠲ඪʹ ϓϩοτͰ͖Δʢˡͱʹ͔͘ڧྗɻແݶͷՄೳੑΛײ͡Δʣ Charts ొҎલ Path Canvas (GraphicsContext) Λར༻ͯ͠ άϥϑΛࣗલ࣮͠ͳ͍ͱ͍͚ͳ͔ͬͨͷͰศརʹͳͬͨ
#cybozu_mobile σϞ
#cybozu_mobile σϞ Source: https://github.com/Kyome22/ShootingStar.git
#cybozu_mobile গ͠ղઆ LineMark Λ༻͍ͨγϯϓϧͳંΕઢάϥϑ .foregroundStyle() Ͱ .linearGradient() Λࢦఆ ͢Δͱάϥσʔγϣϯ͖ͷંΕઢάϥϑ ʹͳͬͯΧοί͍͍
Source: https://github.com/Kyome22/ShootingStar.git
#cybozu_mobile গ͠ղઆ BarMark Λ༻͍ͨάϥϑ BarMark ͷ stacking Λ .center ʹ͢Δͱ
ઢରশͳάϥϑΛඳ͚Δ Source: https://github.com/Kyome22/ShootingStar.git
#cybozu_mobile গ͠ղઆ άϥϑʹݟ͑Δ͔͠Εͳ͍͕ɺ ͜Εࢄਤ Prot ͱ PointMark Λ༻ͯ͠ঢ়ʹํܗ ͷجΛஔ͢Δ ֤ํܗ֯ͱ͞ΛมߋͰ͖ΔΑ͏ʹ
͓ͯ͘͠ தԝͷԁRMSʹ߹Θͤͯ scaleE ff ect Ͱ େ͖͞ΛมԽ͍ͤͯ͞ΔʢάϥϑͰͳ͍ʣ Source: https://github.com/Kyome22/ShootingStar.git
#cybozu_mobile Thank you!