Copyright © 2011 by Denny Lin1 Computer Music Synthesis Chapter 5 Based on “Excerpt from Designing Sound” by Andy Farnell Slides by Denny Lin.

Slides:



Advertisements
Similar presentations
Copyright © 2014 Pearson Addison-Wesley. All rights reserved. Chapter 17 Templates.
Advertisements

David Meredith Minim David Meredith
User Training. Step 1 Press Ctrl-I or choose File > Login, this will open the Login window. Figure 1-1 shows the Login window. Figure 1-1 Login Window.
 2005 Pearson Education, Inc. All rights reserved Introduction to Classes and Objects.
Objectives Understand the software development lifecycle Perform calculations Use decision structures Perform data validation Use logical operators Use.
The Web Warrior Guide to Web Design Technologies
Chapter 10 Introduction to Arrays
Copyright © 2011 by Denny Lin1 Simple Synthesizer Part 4 Based on Floss Manuals (Pure Data) “Building a Simple Synthesizer” By Derek Holzer Slides by Denny.
Copyright © 2011 by Denny Lin1 Simple Synthesizer Part 2 Based on Floss Manuals (Pure Data) “Building a Simple Synthesizer” By Derek Holzer Slides by Denny.
Programming with Objects: Class Libraries and Reusable Code.
Java Programming, 3e Concepts and Techniques Chapter 5 Arrays, Loops, and Layout Managers Using External Classes.
PowerPoint Presentation for Dennis, Wixom & Tegarden Systems Analysis and Design Copyright 2001 © John Wiley & Sons, Inc. All rights reserved. Slide 1.
ISBN Chapter 10 Implementing Subprograms.
A Guide to Oracle9i1 Creating an Integrated Database Application Chapter 8.
Chapter 3 - Introduction to Java Applets Outline 3.1Introduction 3.2Thinking About Objects 3.4A Simple Java Applet: Drawing a String 3.5Two More Simple.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
ASP.NET Programming with C# and SQL Server First Edition
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
C++ fundamentals.
Copyright © 2011 by Denny Lin1 Computer Music Synthesis Chapter 7 Based on “Excerpt from Designing Sound” by Andy Farnell Slides by Denny Lin.
McGraw-Hill© 2007 The McGraw-Hill Companies, Inc. All rights reserved. 1-1.
A First Program Using C#
Java™ How to Program, 9/e © Copyright by Pearson Education, Inc. All Rights Reserved.
Microsoft Visual Basic 2005: Reloaded Second Edition
An Object-Oriented Approach to Programming Logic and Design
Copyright © 2011 by Denny Lin1 Computer Music Synthesis Chapter 2 Based on “Excerpt from Designing Sound” by Andy Farnell Slides by Denny Lin.
Microsoft Visual Basic 2005 CHAPTER 9 Using Arrays and File Handling.
Using Visual Basic 6.0 to Create Web-Based Database Applications
Microsoft Visual Basic 2008 CHAPTER ELEVEN Multiple Classes and Inheritance.
Tutorial 111 The Visual Studio.NET Environment The major differences between Visual Basic 6.0 and Visual Basic.NET are the latter’s support for true object-oriented.
JavaScript, Fourth Edition
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
Chapter 6 Object-Oriented Java Script JavaScript, Third Edition.
Copyright © 2011 by Denny Lin1 Computer Music Synthesis Chapter 6 Based on “Excerpt from Designing Sound” by Andy Farnell Slides by Denny Lin.
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 13 Introduction to Classes.
Computers and Scientific Thinking David Reed, Creighton University Functions and Libraries 1.
Variables and ConstantstMyn1 Variables and Constants PHP stands for: ”PHP: Hypertext Preprocessor”, and it is a server-side programming language. Special.
More on Hierarchies 1. When an object of a subclass is instantiated, is memory allocated for only the data members of the subclass or also for the members.
Object-Oriented Design Simple Program Design Third Edition A Step-by-Step Approach 11.
1 Chapter 12: Form Builder Objects and Flexible Code.
ADTs and C++ Classes Classes and Members Constructors The header file and the implementation file Classes and Parameters Operator Overloading.
1 Chapter Nine Using GUI Objects and the Visual Studio IDE.
C++ Programming Basic Learning Prepared By The Smartpath Information systems
Covenant College November 27, Laura Broussard, Ph.D. Professor COS 131: Computing for Engineers Chapter 5: Functions.
Chapter 2: Variables, Functions, Objects, and Events JavaScript - Introductory.
C# Interfaces C# Class Version 1.0. Copyright © 2012 by Dennis A. Fairclough all rights reserved. 2 Interface  “A surface forming a common boundary between.
1 Chapter Four Creating and Using Classes. 2 Objectives Learn about class concepts How to create a class from which objects can be instantiated Learn.
Microsoft Visual Basic 2008 CHAPTER ELEVEN Multiple Classes and Inheritance.
1 Lecture 14 Functions Functions with Empty Parameter Lists Empty parameter lists  void or leave parameter list empty  Indicates function takes.
Programming with Java © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 1 McGraw-Hill/Irwin Chapter 5 Creating Classes.
Chapter 5 Introduction to Defining Classes
Copyright © 2011 by Denny Lin1 Computer Music Synthesis Chapter 3 Based on “Excerpt from Designing Sound” by Andy Farnell Slides by Denny Lin.
Copyright © 2011 by Denny Lin1 Simple Synthesizer Part 3 Based on Floss Manuals (Pure Data) “Building a Simple Synthesizer” By Derek Holzer Slides by Denny.
 2005 Pearson Education, Inc. All rights reserved Introduction to Classes and Objects.
Chapter 11: Advanced Inheritance Concepts. Objectives Create and use abstract classes Use dynamic method binding Create arrays of subclass objects Use.
Chapter 15. Copyright 2032, Paradigm Publishing Inc. CHAPTER 15 BACKNEXTEND 15-2 LINKS TO OBJECTIVES Create Comments View Comments Edit Comments Print.
1 Introduction to Pure Data (pd) Thomas Edwards
Programming Logic and Design Fifth Edition, Comprehensive Chapter 7 Using Methods.
ISBN Chapter 10 Implementing Subprograms.
Mr H Kandjimi 2016/01/03Mr Kandjimi1 Week 3 –Modularity in C++
Chapter 5 Introduction to Defining Classes Fundamentals of Java.
Music and Audio Computing I A Prof. Marcelo M. Wanderley Week 9.
Programming Logic and Design Seventh Edition
3 Introduction to Classes and Objects.
Multiple Classes and Inheritance
Tkinter GUIs Computer Science and Software Engineering
METHODS AND BEHAVIORS AKEEL AHMED.
Defining Classes and Methods
WORKING WITH SHARED DOCUMENTS
Sound Processing with Pure Data
Presentation transcript:

Copyright © 2011 by Denny Lin1 Computer Music Synthesis Chapter 5 Based on “Excerpt from Designing Sound” by Andy Farnell Slides by Denny Lin

Copyright © 2011 by Denny Lin2 Abstraction 5.1 Subpatches 5.2 Instantiation 5.3 Editing 5.4 Parameters 5.5 Defaults and states 5.6 Common abstraction techniques

Copyright © 2011 by Denny Lin3 5.1 Sub-patches Any canvas may contain sub-patches Sub-patches are: –stored in the same file as the main (or parent) patch –useful for hiding code, but do not provide local scope –created by naming an object that starts with pd. For example, when creating a pd envelope object, pd will open a new canvas to define the envelope sub-patch

Copyright © 2011 by Denny Lin4 A parent patch… Generate a 440Hz sine wave Scale the patch volume using the envelope sub-patch; 100 is attack, 500 is decay Send stereo output to speakers

Copyright © 2011 by Denny Lin5 …and its sub-patch The attack inlet receives 100, while the decay inlet receives 500 Trigger sends a bang to the delay object first The delay object waits 100 ms before banging the rightmost float object with 500ms After the delay object is banged, 100 is sent to leftmost float; this 100 is the first item ($1) in the leftmost list, so a message is sent to line~ At the end of the 100ms delay, the 500 in the rightmost float is the first item ($1) in the rightmost list, so a message is sent to line~ The output of line~ is sent to the outlet of the sub-patch

Copyright © 2011 by Denny Lin6 Inlets and Outlets Within a sub-patch, an inlet object is used for taking in data; an outlet object is used to send output The internal ordering (i.e. left to right) of the inlet and outlet objects, determines the external layout of the sub-patch inlet(s) and outlet(s) It is a good idea to name inlets and outlets

Copyright © 2011 by Denny Lin7 Copying and Deep sub-patches Can easily duplicate sub-patches that do not require uniquely-named objects (for example, message objects used in envelopes) Sub-patches can contain other sub- patches Principle of Abstraction: “Can define new objects, build bigger objects from those, and still bigger objects in turn.”

Copyright © 2011 by Denny Lin8 Example of Deep Sub-Patches

Copyright © 2011 by Denny Lin9 Abstractions An abstraction is a sub-patch that exists in a separate file Reusable Pd component that can be loaded many times by different patches Each instance of an abstraction has different internal namespaces Can take different creation arguments, so multiple instances of a sub-patch behave like functions called by other parts of a program By default, a patch has access to an abstraction saved in the same directory as itself

Copyright © 2011 by Denny Lin10 Scope and $0 Scope is the context with which an object (or variable) can be accessed Duplicating some PureData objects (i.e. arrays, table oscillators that reference arrays, etc) may lead to erratic behaviors The $0 variable is used to provide unique access to objects within a patch. For example, $0-array1 can be used to localize the array1 object Pd internally replaces $0 with a four-digit number unique to the patch or instance of abstraction

Copyright © 2011 by Denny Lin Instantiation To instantiate is to call on an instance of an abstraction Type the name of a patch (without the extension.pd) in an object box Click or open the abstraction in a new window to edit the instance Objects that require unique identifiers should be named with a prefix of $0 Message boxes treat $0 as a selector, so they cannot directly access objects that have a $0 prefix; use the send object (see Fig. 5.8)

Copyright © 2011 by Denny Lin12 Base and Abstract Table Oscillators

Copyright © 2011 by Denny Lin Editing Fig. 5.9 contains three instances of the abstract table oscillator Unsaved changes will affect the edited instance The behavior of all instances are affected only when changes are saved Use project or version-specific file prefixes for abstractions Create help files using Pd and comment objects (file must be name of abstraction with a - help.pd suffix)

Copyright © 2011 by Denny Lin Parameters An abstraction can pass creation arguments to local parameter variables $1, $2, $3… Similar to parameters in functions of other programming languages, these parameter variables have local scope

Copyright © 2011 by Denny Lin Defaults and states When a float object is used to access a parameter, and the parameter is undefined, the float object’s default value of 0 can be used: –directly, if it is desirable for the objects within the abstraction to treat 0 as the default input –to drive a select 0 object, whose output (given an input of 0) triggers a message containing the desired default value Abstraction classes will retain a persistent state for all instances of an abstraction, rather than for all instances of an object

Copyright © 2011 by Denny Lin Common abstraction techniques Graph On Parent (GOP) Using list inputs Packing and unpacking Control normalization Summation chains Routed outputs

Copyright © 2011 by Denny Lin17 Graph On Parent This technique is used to expose GUI control interfaces and display graphs while hiding normal patch objects

Copyright © 2011 by Denny Lin18 Using list inputs

Copyright © 2011 by Denny Lin19 Packing and unpacking A programmer, or collection of sliders connected to a pack object, can be used to send a new message each time a fader moves (see Fig. 5.16a) Can save preset values by pre-pending the keyword set to a list (see Fig. 5.16b)

Copyright © 2011 by Denny Lin20 Packing and unpacking

Copyright © 2011 by Denny Lin21 Control normalization All control surfaces in an interface can have a standard range of 0.0 to 1.0 Patches using normalized control surfaces may need to be pre- conditioned, so input parameters are adapted to use the normalized control data

Copyright © 2011 by Denny Lin22 Summation of chains

Copyright © 2011 by Denny Lin23 Routed inputs Inputs are messages that contain named parameters The named parameter contained by the banged message is channeled into destinations defined by route objects