Advanced Multimedia Development - PowerPoint PPT Presentation

About This Presentation
Title:

Advanced Multimedia Development

Description:

Learn how to reverse engineer. Learn how to read manuals. Learn how to think. Ichiro Fujinaga ... Phone: 398-4535x00944. Office: 550 Sherbrooke W. ... – PowerPoint PPT presentation

Number of Views:18
Avg rating:3.0/5.0
Slides: 22
Provided by: ichirof
Category:

less

Transcript and Presenter's Notes

Title: Advanced Multimedia Development


1
Advanced Multimedia Development
  • MUMT 402
  • E-230 (MTCL)
  • Tuesday 435pm725pm
  • Ichiro Fujinaga
  • Ich_at_music.mcgill.ca

2
Introduction
  • Overview of this class
  • Review
  • First object bang

3
Overview of class
  • Design, programming, and deployment of music and
    audio in multimedia production. Topics include
  • complex MIDI programming
  • Low-level audio synthesis algorithms
  • interactive music
  • timing and scheduling
  • Most of programming will be performed within the
    context of Max/MSP environment by developing
    external objects in C.

4
Objectives
  • Learn low-level MIDI/audio manipulation concepts
  • Learn how to debug
  • Learn how to progressively write code
  • Learn how to meet deadlines
  • Learn how to reverse engineer
  • Learn how to read manuals
  • Learn how to think

5
Mark distribution
  • 15 Mid-term exam 
  • 25 Final exam 
  • 10 Participation  
  • 50 Assignments

6
Assignments
  • Weekly assignments
  • Assignment policy
  • All assignments are due at midnight of the due
    date.
  • Late assignments within 48 hours past the
    deadline will be given either D or F.
  • Assignments submitted after 48 hours past the
    deadline will be given F.
  • Collaboration (www.mcgill.ca/integrity)
  • Neatness, elegance, documentation

7
Contact
  • Email ich_at_music.mcgill.ca
  • Webpage www.music.mcgill.ca/ich
  • Phone 398-4535x00944
  • Office 550 Sherbrooke W.
  • Office hours Any time via email or by appointment

8
Music Technology Computer Lab (E230) and linux
accounts
  • Get MTCL account from Darryl Cameron
    (darryl_at_music.mcgill.ca)
  • Get linux (shell, sftp) account on
    music.mcgill.ca, if you dont have one yet. Ill
    contact Alain Terriault (alaint_at_music.mcgill.ca)
    (with your preferred login name).
  • Create your web home page (assignment 1)
  • Basic personal info
  • Links to your classes
  • Place to post your assignments

9
Review I
  • What is
  • Max
  • MSP
  • OOP
  • Class
  • Objects
  • Messages
  • Encapsulation
  • Inheritance (not implemented in Max/MSP)

10
Review II
  • What is a
  • Compiler
  • Library
  • Linker
  • Shared library
  • DLL
  • Plugin
  • External objects

11
Writing Max External Objects
  • Initialization
  • main()
  • Definition of methods to create new object
  • Definition of methods to bind to other messages

12
Preparation
  • Documentation
  • Max/MSP Externals Tutorial v3.2
  • External Objects for Max and MSP 4.5
  • Programming environment
  • Xcode 2.3

13
The bang object Initialization
  • include "ext.h // Required for all Max
    external objectsvoid this_class // Required.
    Global pointing to this class
  • Required for all objects
  • ext.h in Max/MSP SDK
  • contains other header files
  • prototypes
  • this_class is used as a pointer to this class

14
The bang object Initialization (data)
  • typedef struct _bang // Data structure for this
    object t_object b_ob // Must always be the
    first field
  • // used by Max void b_out // Pointer
    to an outlet t_bang
  • Must start with t_object (see ext_mess.h)
  • Max convention first letter followed by
    underscore
  • Every object has an inlet
  • b_out is a pointer to an outlet

15
The bang object Initialization (methods)
  • // Prototypes for methods
  • // need a method for each incoming message
  • void bang_new(void) // object creation
    method void bang_bang(t_bang bang) // method
    for bang message
  • Declaration of class methods that will respond
    to Max messages
  • Objects respond to messages from the Max
    environment
  • Objects receive messages (integer, float,
    symbol) in their inlets
  • Objects methods will process these messages in
    some way and then    send out messages
    using the objects outlets
  • This bang object responds to new and bang
    messages

16
The bang object main()
  • When an object is created for the first time
  • External object is loaded into memory
  • main() is executed once and only once
  • main() specifies how the object should be
    initialized
  • Setup the class
  • Allocate memory for the object
  • Specify method for the creation of instances of
    the object
  • Define messages that the object can respond to
    and bind each message to a method

17
The bang object main() cont.
  • void main(void)
  • // set up our class create a class definition
  • setup(this_class, (method)bang_new, 0L,
    (short)sizeof(t_bang), 0L, 0)
  • // bind method "bang_bang to the "bang" message
  • addbang((method)bang_bang)
  • Setup creates the class
  • Get pointer to the class, specify instance
    creation method, instance free method, size of
    each instance, GUI object.
  • addbang binds the method to bang message
    coming into the left inlet (addint, addinx,
    addmess, addft, and addftx)  

18
The bang object main() cont.
  • int main(void)
  • // set up our class create a class definition
  • setup(this_class, (method)bang_new, 0L,
    (short)sizeof(t_bang), 0L, 0)
  • // bind method "bang_bang to the "bang" message
  • addbang((method)bang_bang)
  • return (0)
  • Setup creates the class
  • Get pointer to the class, specify instance
    creation method, instance free method, size of
    each instance, GUI object.
  • addbang binds the method to bang message
    coming into the left inlet (addint, addinx,
    addmess, addft, and addftx)  

19
The bang object The object creation function
  • void bang_new(void)
  • t_bang bang
  • // create the new instance and return a pointer
    to it
  • bang (t_bang )newobject(this_class)
  • bang-gtb_out bangout(bang) // create a bang
    outlet
  • return(bang)// must return a pointer to the new
    instance
  • Creates an instance of the class by newobject()
  • Outlet is created by bangout() and assigned in
    the object s struct

20
The bang object Handling the bang message
  • void bang_bang(t_bang bang)
  • // send a bang to the outlet bang-gtb_out
  • outlet_bang(bang-gtb_out)
  • This method is called when bang message is
    received at the left inlet, because of addbang()
  • The bang_bang method simply sends a bang
    messages via the outlet via a max method,
    outlet_bang()
  • The outlet, bang-gtb_out was created by bangout()

21
Ichs C style
  • no space before commas and semicolons
  • no space after function names
  • space after commas and semicolons
  • space before and after an operator
  • space after keywords
  • vertically align matching braces (optional)
  • no magic numbers
Write a Comment
User Comments (0)
About PowerShow.com