SlideShare a Scribd company logo
1 of 27
Creating Music
                            Instruments on iOS
                                      Greg Cerveny
                                      @gmcerveny
                                greg.cerveny@gmail.com




Tuesday, September 11, 12
Music on iOS

                    • Apple Design Award Apps
                     • DM 1, Djay, Tab Toolkit
                    • Companies: Smule, Tonara, Khush
                    • Great Apps: Figure, Lemur, Animoog, ...
                    • Apple Store

Tuesday, September 11, 12
Tuesday, September 11, 12
Tuesday, September 11, 12
Max Mathews Radio Baton Video Demo:
                               http://www.youtube.com/watch?
                                 v=3ZOzUVD4oLg#t=4m46s




Tuesday, September 11, 12
Core Audio
                    • Audio and MIDI support
                    • Low Latency & Dynamic
                    • Objective C and C
                     • Proxy Objects
                    • Audio Toolbox, Audio Unit, Core MIDI
                            Frameworks


Tuesday, September 11, 12
Introduction to
                            Computer Music




Tuesday, September 11, 12
Introduction to
                            Computer Music

                    • Notes



Tuesday, September 11, 12
Introduction to
                            Computer Music

                    • Notes
                    • Signals


Tuesday, September 11, 12
Sonata No. 14, 'Moonlight'
                                                                                                              Ludwig van Beethoven
              Adagio sostenuto                                                                                        Op. 27, No. 2
                                Si deve suonare tutto questo pezzo delicatissimamente e senza sordini



                                        3 5                                                             2 4             3 5
                                1       3                                                           1

                                sempre pianissimo e senza sordini                                                   5




            4                                                                           pp
                                        5
                                    2         3 5       4 5   3 5
                                                                            4       3
                                                                        1
                            4                       5
                                                                    4




                                                                                         5
            7                                       5                           4               3

Tuesday, September 11, 12
1. Music File




Tuesday, September 11, 12
2. Set Up Music Sequence

                    • Create a new music sequence
                            NewMusicSequence(MusicSequence *outSequence)


                    • Load a music file
                            MusicSequenceFileLoad(
                                MusicSequence inSequence,
                                CFURLRef inFileRef,
                                MusicSequenceFileTypeID inFileTypeHint,
                                MusicSequenceLoadFlags inFlags)




Tuesday, September 11, 12
3. Load Into Music Player

                    • Create a new music player
                            NewMusicPlayer(MusicPlayer *outPlayer)


                    • Load sequence into player
                            MusicPlayerSetSequence(MusicPlayer inPlayer,

                                MusicSequence inSequence)


                    • Play
                            MusicPlayerStart(myMusicPlayer)




Tuesday, September 11, 12
DEMO



Tuesday, September 11, 12
Music Player Types

                • MusicPlayer
                  • MusicEventIterator
                • MusicSequence
                • MusicTrack



Tuesday, September 11, 12
Notes


                • MIDI Notes
                       MIDINoteMessage {
                           UInt8 channel;
                           UInt8 note;
                           UInt8 velocity;
                           UInt8 releaseVelocity;
                           Float32 duration; }




Tuesday, September 11, 12
Signal




Tuesday, September 11, 12
8 Steps to an Audio Graph
                    1.      Configure an Audio Session

                    2.      Create an Audio Processing Graph

                    3.      Create and Describe Audio Nodes for Each Unit

                    4.      Open the Audio Processing Graph to Instantiate the Audio Units

                    5.      Obtain Pointers and Configure Each Unit

                    6.      Connect the Nodes

                    7.      Initialize the Graph

                    8.      Start the Audio




Tuesday, September 11, 12
8 Steps to an Audio Graph

                • Create an Audio Processing Graph
                            NewAUGraph(AUGraph *outGraph)


                • Describe Audio Node
                            AudioComponentDescription {
                                componentType;
                                componentSubType;
                                componentManufacturer;
                                componentFlags;
                                componentFlagsMask;
                            }



Tuesday, September 11, 12
8 Steps to an Audio Graph


                • Add Node to Graph
                            AUGraphAddNode(
                                AUGraph inGraph,
                                AudioComponentDescription *inDescription,
                                AUNode *outNode )


                • Open the graph
                            AUGraphOpen(AUGraph inGraph)




Tuesday, September 11, 12
8 Steps to an Audio Graph
                • Pointers to Nodes
                            AUGraphNodeInfo(
                                AUGraph inGraph,
                                AUNode inNode,
                                AudioComponentDescription *outDescription,
                                AudioUnit *outAudioUnit)

                • Connect Nodes
                            AUGraphConnectNodeInput(
                                AUGraph inGraph,
                                AUNode inSourceNode,
                                UInt32 inSourceOutputNumber,
                                AUNode inDestNode,
                                UInt32 inDestInputNumber)


Tuesday, September 11, 12
8 Steps to an Audio Graph


                • Initialize Graph
                            AUGraphInitialize(!
                                              AUGraph inGraph)


                • Start Audio
                            AUGraphStart(AUGraph inGrap)




Tuesday, September 11, 12
DEMO



Tuesday, September 11, 12
Audio Graph

                    • Audio Graph
                     • Creation, Opening, and Starting
                    • Nodes and Descriptions
                    • Audio Units

Tuesday, September 11, 12
Resources
                    • Learning Core Audio by Adamson
                    • WWDC
                     • 2011: Music in iOS and Lion
                     • 2010: Audio Development for iOS1/2
                    • Core Audio Programming Guide
                    • Audio Unit Hosting/Programming Guide
Tuesday, September 11, 12
Other Libraries


                    • C Sound
                    • LibPD - Pure Data


Tuesday, September 11, 12
Creating Music
                            Instruments on iOS
                                      Greg Cerveny
                                      @gmcerveny
                                greg.cerveny@gmail.com




Tuesday, September 11, 12

More Related Content

Viewers also liked

Viewers also liked (7)

Test
TestTest
Test
 
荒木おいだしスライド
荒木おいだしスライド荒木おいだしスライド
荒木おいだしスライド
 
Evaluacion halcones (1)
Evaluacion halcones (1)Evaluacion halcones (1)
Evaluacion halcones (1)
 
Building A Streaming Apple TV App (CocoaConf DC, Sept 2016)
Building A Streaming Apple TV App (CocoaConf DC, Sept 2016)Building A Streaming Apple TV App (CocoaConf DC, Sept 2016)
Building A Streaming Apple TV App (CocoaConf DC, Sept 2016)
 
論文口試
論文口試論文口試
論文口試
 
Cytogenetics
Cytogenetics Cytogenetics
Cytogenetics
 
Digital marketing case study patanjali ppt
Digital marketing case study patanjali pptDigital marketing case study patanjali ppt
Digital marketing case study patanjali ppt
 

Recently uploaded

MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 

Recently uploaded (20)

MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 

iOS as a Music Instrument

  • 1. Creating Music Instruments on iOS Greg Cerveny @gmcerveny greg.cerveny@gmail.com Tuesday, September 11, 12
  • 2. Music on iOS • Apple Design Award Apps • DM 1, Djay, Tab Toolkit • Companies: Smule, Tonara, Khush • Great Apps: Figure, Lemur, Animoog, ... • Apple Store Tuesday, September 11, 12
  • 5. Max Mathews Radio Baton Video Demo: http://www.youtube.com/watch? v=3ZOzUVD4oLg#t=4m46s Tuesday, September 11, 12
  • 6. Core Audio • Audio and MIDI support • Low Latency & Dynamic • Objective C and C • Proxy Objects • Audio Toolbox, Audio Unit, Core MIDI Frameworks Tuesday, September 11, 12
  • 7. Introduction to Computer Music Tuesday, September 11, 12
  • 8. Introduction to Computer Music • Notes Tuesday, September 11, 12
  • 9. Introduction to Computer Music • Notes • Signals Tuesday, September 11, 12
  • 10. Sonata No. 14, 'Moonlight' Ludwig van Beethoven Adagio sostenuto Op. 27, No. 2 Si deve suonare tutto questo pezzo delicatissimamente e senza sordini 3 5 2 4 3 5 1 3 1 sempre pianissimo e senza sordini 5 4 pp 5 2 3 5 4 5 3 5 4 3 1 4 5 4 5 7 5 4 3 Tuesday, September 11, 12
  • 11. 1. Music File Tuesday, September 11, 12
  • 12. 2. Set Up Music Sequence • Create a new music sequence NewMusicSequence(MusicSequence *outSequence) • Load a music file MusicSequenceFileLoad( MusicSequence inSequence, CFURLRef inFileRef, MusicSequenceFileTypeID inFileTypeHint, MusicSequenceLoadFlags inFlags) Tuesday, September 11, 12
  • 13. 3. Load Into Music Player • Create a new music player NewMusicPlayer(MusicPlayer *outPlayer) • Load sequence into player MusicPlayerSetSequence(MusicPlayer inPlayer, MusicSequence inSequence) • Play MusicPlayerStart(myMusicPlayer) Tuesday, September 11, 12
  • 15. Music Player Types • MusicPlayer • MusicEventIterator • MusicSequence • MusicTrack Tuesday, September 11, 12
  • 16. Notes • MIDI Notes MIDINoteMessage { UInt8 channel; UInt8 note; UInt8 velocity; UInt8 releaseVelocity; Float32 duration; } Tuesday, September 11, 12
  • 18. 8 Steps to an Audio Graph 1. Configure an Audio Session 2. Create an Audio Processing Graph 3. Create and Describe Audio Nodes for Each Unit 4. Open the Audio Processing Graph to Instantiate the Audio Units 5. Obtain Pointers and Configure Each Unit 6. Connect the Nodes 7. Initialize the Graph 8. Start the Audio Tuesday, September 11, 12
  • 19. 8 Steps to an Audio Graph • Create an Audio Processing Graph NewAUGraph(AUGraph *outGraph) • Describe Audio Node AudioComponentDescription { componentType; componentSubType; componentManufacturer; componentFlags; componentFlagsMask; } Tuesday, September 11, 12
  • 20. 8 Steps to an Audio Graph • Add Node to Graph AUGraphAddNode( AUGraph inGraph, AudioComponentDescription *inDescription, AUNode *outNode ) • Open the graph AUGraphOpen(AUGraph inGraph) Tuesday, September 11, 12
  • 21. 8 Steps to an Audio Graph • Pointers to Nodes AUGraphNodeInfo( AUGraph inGraph, AUNode inNode, AudioComponentDescription *outDescription, AudioUnit *outAudioUnit) • Connect Nodes AUGraphConnectNodeInput( AUGraph inGraph, AUNode inSourceNode, UInt32 inSourceOutputNumber, AUNode inDestNode, UInt32 inDestInputNumber) Tuesday, September 11, 12
  • 22. 8 Steps to an Audio Graph • Initialize Graph AUGraphInitialize(! AUGraph inGraph) • Start Audio AUGraphStart(AUGraph inGrap) Tuesday, September 11, 12
  • 24. Audio Graph • Audio Graph • Creation, Opening, and Starting • Nodes and Descriptions • Audio Units Tuesday, September 11, 12
  • 25. Resources • Learning Core Audio by Adamson • WWDC • 2011: Music in iOS and Lion • 2010: Audio Development for iOS1/2 • Core Audio Programming Guide • Audio Unit Hosting/Programming Guide Tuesday, September 11, 12
  • 26. Other Libraries • C Sound • LibPD - Pure Data Tuesday, September 11, 12
  • 27. Creating Music Instruments on iOS Greg Cerveny @gmcerveny greg.cerveny@gmail.com Tuesday, September 11, 12