SlideShare une entreprise Scribd logo
1  sur  14
Télécharger pour lire hors ligne
Yet Another
 Max/MSP - Cocoa
    Integration
cocoa-send / cocoa-receive external objects

                Nao Tokui




                                              1
Why Integrate?

• Max/MSP
 ○ Useful for Audio / MIDI / Images .... !!
    Scalability
  × Hard to manage big data set.



                                              2
Why Integrate?
• Cocoa - Native OS X Environment
 ○ Lots of useful frameworks and easy-to-use
   tools for them.
   • Frameworks - CoreData, Bonjour, QuartzComposer...
   • Tool - Xcode, InterfaceBuilder...
 ×  Audio / MIDI API is very very complicated.
   • Core Audio / Core MIDI / Quick Time


                                                         3
Max/MSP                Cocoa

             Bonjour
    Audio

              CoreData
     MIDI

            OpenGL




                               4
Conventional Ways

• MIDI?
 • CoreMIDI - Simply Overkill!
• Open Sound Control
 • Very flexible, but clumsy implementation
 • Not easy to use in Cocoa

                                             5
NE
                       W


cocoa_send / receive
   external object


                           6
Features
○ Simple to implement and Just works!
○ No need to “connect” explicitly (Always
  Connected!!)
× Limited to local use
       OK                                      NG!
                                                                   Cocoa
     Max   Cocoa
                          Max


                         http://commons.wikimedia.org/w/index.php?title=Image:MacBook_Pro_transparency.png


                                                                                                             7
Technical Details

• cocoa_send/receive use OS X’s Inter-
  Application Communication called
  “Distributed Notifications”
 • eg.) Preference Pane
 •   http://developer.apple.com/documentation/UserExperience/Conceptual/
     PreferencePanes/Tasks/Communication.html




                                                                           8
How to Use #1
1. Download cocoa_send/receive objects and
   sample application from www.naotokui.com
2. Set “Channel Names”
   •   These names will be used to identify
       communication channels. They must be shared
       between Max objects and Cocoa project.



                             Max ← Cocoa
       Max → Cocoa

                                                     9
How to Use #2
3. Open Cocoa_SR_Test folder
   and include Cocoa_SR_Test.h/
   m in your own Cocoa Project.
4. Set the same Channel Names
    #define CH_NAME_FROM_COCOA

 @quot;FROM_Cocoaquot;
    #define CH_NAME_TO_COCOA

 @quot;TO_Cocoaquot;


5. Use -sendString: -sendFloat:/-
   sendInteger methods to send.




                                                 10
Sending from Cocoa
•   Use -send**: methods.
      - (void) sendString: (NSString *) str;

      - (void) sendFloat: (float) number;

      - (void) sendInteger: (int) number;




                                               11
Receiving in Cocoa
• Customize callbackWithNotification:
            a callback function:
  - (void)
- (void) callbackWithNotification:(NSNotification *)myNotification
{

 NSDictionary *dict = [myNotification userInfo];


  // a string value received
 
 NSString *string = [dict valueForKey:SHARED_DICTIONARY_KEY_FOR_ANYTHING];

 if (string) {
       // Do something
  } .....




    • Dictionary Keys:
                                 SHARED_DICTIONARY_KEY_FOR_FLOAT
                                 SHARED_DICTIONARY_KEY_FOR_INT
                                 SHARED_DICTIONARY_KEY_FOR_ANYTHING


                                                                               12
Usage Cases
• Phonethica Rondo / VoiceCosmos


  http://www.ntticc.or.jp/Archive/2006/Openspace/network/phonethica_j.html




• Matarisama Binary 1.2 (by N.Nagano)
                                                                             13
Links


• Download
 • www.naotokui.com/home/Downloads.html


                                          14

Contenu connexe

Similaire à Yet Another Max/MSP-Cocoa Communication

iPhone Development For .Net Dev
iPhone Development For .Net DeviPhone Development For .Net Dev
iPhone Development For .Net DevAlex Hung
 
Between Cocoa and Cocoa Touch: A Comparative Introduction
Between Cocoa and Cocoa Touch: A Comparative IntroductionBetween Cocoa and Cocoa Touch: A Comparative Introduction
Between Cocoa and Cocoa Touch: A Comparative Introductionlukhnos
 
Pronounced S-pro-ut-Co-re (Introduction to SproutCore)
Pronounced S-pro-ut-Co-re (Introduction to SproutCore)Pronounced S-pro-ut-Co-re (Introduction to SproutCore)
Pronounced S-pro-ut-Co-re (Introduction to SproutCore)Julio Javier Cicchelli
 
Absolute Beginners Guide to iPhone dev
Absolute Beginners Guide to iPhone devAbsolute Beginners Guide to iPhone dev
Absolute Beginners Guide to iPhone devBarry Ezell
 
Getting started with open mobile development on the Openmoko platform
Getting started with open mobile development on the Openmoko platformGetting started with open mobile development on the Openmoko platform
Getting started with open mobile development on the Openmoko platformJean-Michel Bouffard
 
Import golang; struct microservice
Import golang; struct microserviceImport golang; struct microservice
Import golang; struct microserviceGiulio De Donato
 
Quickstart: Qt for Windows, Symbian and Maemo / Meego v2.0.8 (January 10th, 2...
Quickstart: Qt for Windows, Symbian and Maemo / Meego v2.0.8 (January 10th, 2...Quickstart: Qt for Windows, Symbian and Maemo / Meego v2.0.8 (January 10th, 2...
Quickstart: Qt for Windows, Symbian and Maemo / Meego v2.0.8 (January 10th, 2...Andreas Jakl
 
Разработка cloud-native Java-приложений для Kubernetes, Егор Волков,Senior Ja...
Разработка cloud-native Java-приложений для Kubernetes, Егор Волков,Senior Ja...Разработка cloud-native Java-приложений для Kubernetes, Егор Волков,Senior Ja...
Разработка cloud-native Java-приложений для Kubernetes, Егор Волков,Senior Ja...DataArt
 
Scaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceScaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceBen Hall
 
State ofappdevelopment
State ofappdevelopmentState ofappdevelopment
State ofappdevelopmentgillygize
 
nokia and opensource n800
nokia and opensource n800nokia and opensource n800
nokia and opensource n800winsopc
 
Monorepo: React Web & React Native
Monorepo: React Web & React NativeMonorepo: React Web & React Native
Monorepo: React Web & React NativeEugene Zharkov
 
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)Fabien Potencier
 
Nagios Conference 2012 - Eric Loyd - Nagios Implementation Case Eastman Kodak...
Nagios Conference 2012 - Eric Loyd - Nagios Implementation Case Eastman Kodak...Nagios Conference 2012 - Eric Loyd - Nagios Implementation Case Eastman Kodak...
Nagios Conference 2012 - Eric Loyd - Nagios Implementation Case Eastman Kodak...Nagios
 

Similaire à Yet Another Max/MSP-Cocoa Communication (20)

iPhone Development For .Net Dev
iPhone Development For .Net DeviPhone Development For .Net Dev
iPhone Development For .Net Dev
 
Between Cocoa and Cocoa Touch: A Comparative Introduction
Between Cocoa and Cocoa Touch: A Comparative IntroductionBetween Cocoa and Cocoa Touch: A Comparative Introduction
Between Cocoa and Cocoa Touch: A Comparative Introduction
 
Iphone Dev
Iphone DevIphone Dev
Iphone Dev
 
Pronounced S-pro-ut-Co-re (Introduction to SproutCore)
Pronounced S-pro-ut-Co-re (Introduction to SproutCore)Pronounced S-pro-ut-Co-re (Introduction to SproutCore)
Pronounced S-pro-ut-Co-re (Introduction to SproutCore)
 
X Means Y
X Means YX Means Y
X Means Y
 
Absolute Beginners Guide to iPhone dev
Absolute Beginners Guide to iPhone devAbsolute Beginners Guide to iPhone dev
Absolute Beginners Guide to iPhone dev
 
How to Use OpenMP on Native Activity
How to Use OpenMP on Native ActivityHow to Use OpenMP on Native Activity
How to Use OpenMP on Native Activity
 
Getting started with open mobile development on the Openmoko platform
Getting started with open mobile development on the Openmoko platformGetting started with open mobile development on the Openmoko platform
Getting started with open mobile development on the Openmoko platform
 
JavaFX Uni Parthenope
JavaFX Uni ParthenopeJavaFX Uni Parthenope
JavaFX Uni Parthenope
 
Import golang; struct microservice
Import golang; struct microserviceImport golang; struct microservice
Import golang; struct microservice
 
Quickstart: Qt for Windows, Symbian and Maemo / Meego v2.0.8 (January 10th, 2...
Quickstart: Qt for Windows, Symbian and Maemo / Meego v2.0.8 (January 10th, 2...Quickstart: Qt for Windows, Symbian and Maemo / Meego v2.0.8 (January 10th, 2...
Quickstart: Qt for Windows, Symbian and Maemo / Meego v2.0.8 (January 10th, 2...
 
Разработка cloud-native Java-приложений для Kubernetes, Егор Волков,Senior Ja...
Разработка cloud-native Java-приложений для Kubernetes, Егор Волков,Senior Ja...Разработка cloud-native Java-приложений для Kubernetes, Егор Волков,Senior Ja...
Разработка cloud-native Java-приложений для Kubernetes, Егор Волков,Senior Ja...
 
Scaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceScaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container Service
 
State ofappdevelopment
State ofappdevelopmentState ofappdevelopment
State ofappdevelopment
 
nokia and opensource n800
nokia and opensource n800nokia and opensource n800
nokia and opensource n800
 
Monorepo: React Web & React Native
Monorepo: React Web & React NativeMonorepo: React Web & React Native
Monorepo: React Web & React Native
 
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)
 
Nagios Conference 2012 - Eric Loyd - Nagios Implementation Case Eastman Kodak...
Nagios Conference 2012 - Eric Loyd - Nagios Implementation Case Eastman Kodak...Nagios Conference 2012 - Eric Loyd - Nagios Implementation Case Eastman Kodak...
Nagios Conference 2012 - Eric Loyd - Nagios Implementation Case Eastman Kodak...
 
Scaling Django
Scaling DjangoScaling Django
Scaling Django
 
mekentosj.com - building Papers
mekentosj.com - building Papersmekentosj.com - building Papers
mekentosj.com - building Papers
 

Plus de Nao Tokui

massh - 2008
massh - 2008massh - 2008
massh - 2008Nao Tokui
 
FITC Tokyo 2014
FITC Tokyo 2014FITC Tokyo 2014
FITC Tokyo 2014Nao Tokui
 
コミュニケーションツールの未来 - 2013.12.1 at IMPACT HUB Tokyo
コミュニケーションツールの未来 - 2013.12.1 at IMPACT HUB Tokyoコミュニケーションツールの未来 - 2013.12.1 at IMPACT HUB Tokyo
コミュニケーションツールの未来 - 2013.12.1 at IMPACT HUB TokyoNao Tokui
 
Techcrunch hackathon 2013
Techcrunch hackathon 2013Techcrunch hackathon 2013
Techcrunch hackathon 2013Nao Tokui
 
Tokyo Niche プレゼンテーション
Tokyo Niche プレゼンテーションTokyo Niche プレゼンテーション
Tokyo Niche プレゼンテーションNao Tokui
 
Design Strategy Tokuil
Design Strategy TokuilDesign Strategy Tokuil
Design Strategy TokuilNao Tokui
 
Audible Realities活動報告
Audible Realities活動報告Audible Realities活動報告
Audible Realities活動報告Nao Tokui
 
サウンドプログラミング演習 '08 5/29
サウンドプログラミング演習 '08 5/29サウンドプログラミング演習 '08 5/29
サウンドプログラミング演習 '08 5/29Nao Tokui
 
サウンドプログラミング演習 '08 5/8
サウンドプログラミング演習 '08 5/8サウンドプログラミング演習 '08 5/8
サウンドプログラミング演習 '08 5/8Nao Tokui
 
'Sound Programming '08 5/1
'Sound Programming '08 5/1'Sound Programming '08 5/1
'Sound Programming '08 5/1Nao Tokui
 
デジタルコンテンツ研究会
デジタルコンテンツ研究会デジタルコンテンツ研究会
デジタルコンテンツ研究会Nao Tokui
 
Technology and Music - Designing Music Part 2 (in Japanese)
Technology and Music - Designing Music Part 2 (in Japanese)Technology and Music - Designing Music Part 2 (in Japanese)
Technology and Music - Designing Music Part 2 (in Japanese)Nao Tokui
 
Technology and Music - Designing Music (in Japanese)
Technology and Music - Designing Music (in Japanese)Technology and Music - Designing Music (in Japanese)
Technology and Music - Designing Music (in Japanese)Nao Tokui
 

Plus de Nao Tokui (13)

massh - 2008
massh - 2008massh - 2008
massh - 2008
 
FITC Tokyo 2014
FITC Tokyo 2014FITC Tokyo 2014
FITC Tokyo 2014
 
コミュニケーションツールの未来 - 2013.12.1 at IMPACT HUB Tokyo
コミュニケーションツールの未来 - 2013.12.1 at IMPACT HUB Tokyoコミュニケーションツールの未来 - 2013.12.1 at IMPACT HUB Tokyo
コミュニケーションツールの未来 - 2013.12.1 at IMPACT HUB Tokyo
 
Techcrunch hackathon 2013
Techcrunch hackathon 2013Techcrunch hackathon 2013
Techcrunch hackathon 2013
 
Tokyo Niche プレゼンテーション
Tokyo Niche プレゼンテーションTokyo Niche プレゼンテーション
Tokyo Niche プレゼンテーション
 
Design Strategy Tokuil
Design Strategy TokuilDesign Strategy Tokuil
Design Strategy Tokuil
 
Audible Realities活動報告
Audible Realities活動報告Audible Realities活動報告
Audible Realities活動報告
 
サウンドプログラミング演習 '08 5/29
サウンドプログラミング演習 '08 5/29サウンドプログラミング演習 '08 5/29
サウンドプログラミング演習 '08 5/29
 
サウンドプログラミング演習 '08 5/8
サウンドプログラミング演習 '08 5/8サウンドプログラミング演習 '08 5/8
サウンドプログラミング演習 '08 5/8
 
'Sound Programming '08 5/1
'Sound Programming '08 5/1'Sound Programming '08 5/1
'Sound Programming '08 5/1
 
デジタルコンテンツ研究会
デジタルコンテンツ研究会デジタルコンテンツ研究会
デジタルコンテンツ研究会
 
Technology and Music - Designing Music Part 2 (in Japanese)
Technology and Music - Designing Music Part 2 (in Japanese)Technology and Music - Designing Music Part 2 (in Japanese)
Technology and Music - Designing Music Part 2 (in Japanese)
 
Technology and Music - Designing Music (in Japanese)
Technology and Music - Designing Music (in Japanese)Technology and Music - Designing Music (in Japanese)
Technology and Music - Designing Music (in Japanese)
 

Dernier

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 

Dernier (20)

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 

Yet Another Max/MSP-Cocoa Communication

  • 1. Yet Another Max/MSP - Cocoa Integration cocoa-send / cocoa-receive external objects Nao Tokui 1
  • 2. Why Integrate? • Max/MSP ○ Useful for Audio / MIDI / Images .... !! Scalability × Hard to manage big data set. 2
  • 3. Why Integrate? • Cocoa - Native OS X Environment ○ Lots of useful frameworks and easy-to-use tools for them. • Frameworks - CoreData, Bonjour, QuartzComposer... • Tool - Xcode, InterfaceBuilder... × Audio / MIDI API is very very complicated. • Core Audio / Core MIDI / Quick Time 3
  • 4. Max/MSP Cocoa Bonjour Audio CoreData MIDI OpenGL 4
  • 5. Conventional Ways • MIDI? • CoreMIDI - Simply Overkill! • Open Sound Control • Very flexible, but clumsy implementation • Not easy to use in Cocoa 5
  • 6. NE W cocoa_send / receive external object 6
  • 7. Features ○ Simple to implement and Just works! ○ No need to “connect” explicitly (Always Connected!!) × Limited to local use OK NG! Cocoa Max Cocoa Max http://commons.wikimedia.org/w/index.php?title=Image:MacBook_Pro_transparency.png 7
  • 8. Technical Details • cocoa_send/receive use OS X’s Inter- Application Communication called “Distributed Notifications” • eg.) Preference Pane • http://developer.apple.com/documentation/UserExperience/Conceptual/ PreferencePanes/Tasks/Communication.html 8
  • 9. How to Use #1 1. Download cocoa_send/receive objects and sample application from www.naotokui.com 2. Set “Channel Names” • These names will be used to identify communication channels. They must be shared between Max objects and Cocoa project. Max ← Cocoa Max → Cocoa 9
  • 10. How to Use #2 3. Open Cocoa_SR_Test folder and include Cocoa_SR_Test.h/ m in your own Cocoa Project. 4. Set the same Channel Names #define CH_NAME_FROM_COCOA @quot;FROM_Cocoaquot; #define CH_NAME_TO_COCOA @quot;TO_Cocoaquot; 5. Use -sendString: -sendFloat:/- sendInteger methods to send. 10
  • 11. Sending from Cocoa • Use -send**: methods. - (void) sendString: (NSString *) str; - (void) sendFloat: (float) number; - (void) sendInteger: (int) number; 11
  • 12. Receiving in Cocoa • Customize callbackWithNotification: a callback function: - (void) - (void) callbackWithNotification:(NSNotification *)myNotification { NSDictionary *dict = [myNotification userInfo]; // a string value received NSString *string = [dict valueForKey:SHARED_DICTIONARY_KEY_FOR_ANYTHING]; if (string) { // Do something } ..... • Dictionary Keys: SHARED_DICTIONARY_KEY_FOR_FLOAT SHARED_DICTIONARY_KEY_FOR_INT SHARED_DICTIONARY_KEY_FOR_ANYTHING 12
  • 13. Usage Cases • Phonethica Rondo / VoiceCosmos http://www.ntticc.or.jp/Archive/2006/Openspace/network/phonethica_j.html • Matarisama Binary 1.2 (by N.Nagano) 13
  • 14. Links • Download • www.naotokui.com/home/Downloads.html 14