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

Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 

Dernier (20)

Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 

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