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
730
ブラウザアプリを自作してわかった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
690
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
ヤプリ新卒SREの オンボーディング
masaki12
0
130
.NET のための通信フレームワーク MagicOnion 入門 / Introduction to MagicOnion
mayuki
1
1.6k
CSC509 Lecture 09
javiergs
PRO
0
140
LLM生成文章の精度評価自動化とプロンプトチューニングの効率化について
layerx
PRO
2
190
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
1
260
Jakarta EE meets AI
ivargrimstad
0
180
Better Code Design in PHP
afilina
PRO
0
130
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
880
初めてDefinitelyTypedにPRを出した話
syumai
0
410
役立つログに取り組もう
irof
28
9.6k
OSSで起業してもうすぐ10年 / Open Source Conference 2024 Shimane
furukawayasuto
0
110
【Kaigi on Rails 2024】YOUTRUST スポンサーLT
krpk1900
1
330
Featured
See All Featured
The Art of Programming - Codeland 2020
erikaheidi
52
13k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Making the Leap to Tech Lead
cromwellryan
133
8.9k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Speed Design
sergeychernyshev
25
620
Side Projects
sachag
452
42k
Done Done
chrislema
181
16k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
Scaling GitHub
holman
458
140k
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!