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
110
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
690
ブラウザアプリを自作してわかったWebViewの扱い方/iOS Meetup in 福岡
kyome22
1
3.2k
iOSのウィジェットでも猫走らせたい / iOSDC Japan 2022 Day2 Unconference
kyome22
3
1.1k
Hacking Xcode Behaviors / macOS native symposium #08
kyome22
2
1.5k
AppKitでお絵描きをしてみよう / macOS native symposium #06
kyome22
2
670
Finder Sync Extension で Mac 向け便利ツールを作ろう / iOSDC Japan 2021
kyome22
6
4.4k
iOS Custom Keyboardsでできること/できないこと/やってはいけないこと / iOSDC Japan 2020 LT
kyome22
3
1.9k
Other Decks in Programming
See All in Programming
ピラミッド、アイスクリームコーン、SMURF: 自動テストの最適バランスを求めて / Pyramid Ice-Cream-Cone and SMURF
twada
PRO
9
1k
Outline View in SwiftUI
1024jp
1
110
Server Driven Compose With Firebase
skydoves
0
400
Vitest Browser Mode への期待 / Vitest Browser Mode
odanado
PRO
2
1.7k
現場で役立つモデリング 超入門
masuda220
PRO
12
2.9k
From Subtype Polymorphism To Typeclass-based Ad hoc Polymorphism- An Example
philipschwarz
PRO
0
170
ECS Service Connectのこれまでのアップデートと今後のRoadmapを見てみる
tkikuc
2
210
Boost Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
830
Realtime API 入門
riofujimon
0
110
ECSのサービス間通信 4つの方法を比較する 〜Canary,Blue/Greenも添えて〜
tkikuc
11
2.3k
Macとオーディオ再生 2024/11/02
yusukeito
0
150
生成 AI を活用した toitta 切片分類機能の裏側 / Inside toitta's AI-Based Factoid Clustering
pokutuna
0
570
Featured
See All Featured
Side Projects
sachag
452
42k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
22k
Product Roadmaps are Hard
iamctodd
PRO
48
10k
The Cult of Friendly URLs
andyhume
78
6k
BBQ
matthewcrist
85
9.3k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
7
150
Designing the Hi-DPI Web
ddemaree
280
34k
Why Our Code Smells
bkeepers
PRO
334
57k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
231
17k
Docker and Python
trallard
40
3.1k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Large-scale JavaScript Application Architecture
addyosmani
510
110k
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!