Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math,...
Transcript of Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math,...
![Page 1: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/1.jpg)
Programming with Python: Math, Music and Art in Web
Based EnvironmentsGISA 2016
Session 233Marist School
Christopher Michaud
![Page 2: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/2.jpg)
Why Computer Science and Art?
• Intersection between the process of creating Art
• Language of Mathematics
• Tools of Computer Science
![Page 3: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/3.jpg)
Process of Creating Art
• Iterative interaction between the Artist and the Materials of Art• “What If . . . .?”• Artist creates art to embody non-verbal ideas, motion, flow• Artist reflects and refines the art during creation
• From Music Education• A Philosophy of Music Education, Bennett Reimer
![Page 4: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/4.jpg)
Language of Mathematics
• Spatial Relationships in 1D, 2D, 3D spaces• Temporal Thinking – how do properties change through time (rate of
change, derivative . . .)• Sequential Flow of Logic• Dynamics – how are parts of the system changing? How can we
control the change?
![Page 5: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/5.jpg)
Tools of Computer Science
• Data types• Variables• Arrays• Control• Functions• Classes• Recursion
![Page 6: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/6.jpg)
What is Programming?Allows humans to encode, refine, reflect, and share logical
thought in a dynamic moving system that changes over time.
Music and Programming (Computational Thinking) are the same Human Skill expressed to two different domains: nonverbal feelings in art/music and logical/motion thought in Programming or Computational Thinking
![Page 7: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/7.jpg)
Part One: Music Mixing with Python and EarSketch
Large population of students through which music is the primary vehicle for personal expression.
In CS – we tend to focus on:Graphics / Games / VisualText Processing / DatabaseLogic / Algorithmic / Mathematical Robotics and Kinesthetic
EarSketch seeks to engage students in CS through the art of music.
![Page 8: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/8.jpg)
Description of EarSketch•Programming Environment•Python Based•Web Based App or Installed System of Software•API built in Python for Music Mixing•NSF Funded project to encourage computational interest through the mixing and sharing of music.
•Curriculum and Social Media Site•http://earsketch.gatech.edu
![Page 9: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/9.jpg)
AuthenticRelevantExpressive
![Page 10: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/10.jpg)
EarSketch Website: Web based IDE and DAW
Coding Window: Programming
Music View: Display and PlaybackDocumentation and CurriculumSound Library
Toggle Views
![Page 11: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/11.jpg)
What is Python?•General purpose Computer Programming Language•Web development: Google and Yahoo•Game Development, Science, Graphics•In Business: National Weather Service, NASA, IBM, Disney, and Nokia
•Used in Development of the Google Car and other Robotic Systems
![Page 12: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/12.jpg)
How is Music Organized? How do we encode musical clips?
Tracks: Vertical Layers of Music
Layers: Music exists through time
![Page 13: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/13.jpg)
Data Types and Variables
![Page 14: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/14.jpg)
EarSketch Python FunctionsEarSketch Function Description
init() Start new Earsketch Mix and clear the DAW
setTempo(120) Sets the beats per minute (speed) of the Mix
println(“Hello”) Prints message to console
![Page 15: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/15.jpg)
EarSketch Python FunctionsMusic Mixing Functions
fitMedia(file, track, start, end)
makeBeat(file, track, measure, beatString)
setEffect(track, effect, parameter, sV, sM, eV, eM)
rhythmEffects(track, effect, parameter, list, measure)
![Page 16: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/16.jpg)
“fitMedia” FunctionfitMedia(file, track, start, end)
Location of MediaSound
Which Track in Reaper
Start measure.
End Measure
fitMedia(HIP_HOP_DRUMS1_2M, 1, 1, 9)
Example:
![Page 17: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/17.jpg)
Setting Volume EffectssetEffect(track, VOLUME, GAIN, level, start, level2, end)
• Example
setEffect(1, VOLUME, GAIN, -40, 1, 10, 5)
![Page 18: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/18.jpg)
Selected List of Effects and Parameters
Effect Parameter Min to Max ValuesVOLUME GAIN -60 to 12
DELAY DELAY_TIME 0 to 300.0
CHORUS CHORUS_LENGTH 1.0 to 15.0
CHORUS CHORUS_NUMVOICES 1.0 to 8.0
DISTORTION DISTO_GAIN 0.0 to 50.0
FILTER FILTER_FREQ 20.0 to 20000.0
PAN LEFT_RIGHT -100 to 100 (Left to Right)
Complete Effect list at: http://earsketch.gatech.edu/category/learning/reference/every-effect-explained
![Page 19: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/19.jpg)
“makeBeat” MethodmakeBeat(file, track, measure, BeatString)
Location of MediaSound
Which Track in Reaper
What measure.
Example: “0+++0+++0+0+0+++”
makeBeat(drums, 1, 1, “0+0+0+++00-00+++”)
Example:
![Page 20: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/20.jpg)
Beat String notation“0, 1, 2, 3 . . . “ = Which Media Sound you want for the segment
of beat. Correspond to placement in a List that is one based.
Note: 0 will refer to a sound if it is the only media file in the argument.
“+” Means extend or loop the Media sound 1/16th of a measure.
“-” Means 1/16th measure of rest.
![Page 21: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/21.jpg)
For Loops: Skip CountingfillDrum = HIP_HOP_SYNTHDRUMS2_2Mbeat = "0+++0+++0-000+00"
for measure in range(1, 9, 2):makeBeat(fillDrum, 1, measure, beat)
measure is the “index variable” = assigned values from therange()
(1, 9, 2) means start counting at 1, end before 9 [meaning 8] and skip count by 2:
(1, 3, 5, 7)
![Page 22: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/22.jpg)
Functions: Recycle and Reuse!
Now I can use this section anywhere!sectionA(1, 9)sectionA(17, 25)
![Page 23: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/23.jpg)
Exercises for Classroom
•Create EarSketch Account•Mix1: (AB Section Exercise)
• Use fitMedia and setEffect• Music in sections
•Mix2: (makeBeat and For Loop Exercise)• makeBeat• For Loop Structure
•Mix3: (Defining Functions Exercise)•Final Mix
![Page 24: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/24.jpg)
Control and Data StructuresIf Statement:
![Page 25: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/25.jpg)
Lists
![Page 26: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/26.jpg)
Part Two: Programming with Java and Processing
What is Processing?
● Java based programming environment (IDE) from MIT● Free!!!● Designed for creating interactive Art● Data Visualization● Prototyping Tool● Many libraries for interfacing with other hardware● Very High Ceiling and Clean interface● http://nebomusic.net/processinglessons/
![Page 27: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/27.jpg)
Screenshots: IntelliJ compared to Processing
![Page 28: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/28.jpg)
Processing Java Topics•Data Types•Two Functions in Processing•Comments•Canvas•Shape Drawing•Pen•Colors•Control Structures
A Side Note: Comments
•Comments are for humans
•Computer ignores comments
•Use lots of them in programming
–Graded on Comments
–Good style
–Allows code to be used by others
•// Single Line Comment
•/* Multi line comments
•*/
![Page 29: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/29.jpg)
Java Data Types
•int: Whole Numbers•float: Decimal Point Numbers
•String: Characters and Letters
•boolean: 1 Bit value storing ‘true’ or ‘false’ (Sometimes ‘1’ or ‘0’)
•char: 16 Bit Unicode character ranging from \u0000 to \uffff (Hexidecimal)
–This is a single Letter or character•String: (This is actually a class)–java.lang.String–‘string’ of characters: like “Mr.
Michaud”
![Page 30: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/30.jpg)
Operators and Logic•String name = “Bob”; // Used to Assign a value•name == “Bob” // ‘is equal to’•4 * 5 // multiply•20 / 4 // Divide•4 + 5 // Addition•4 – 5 // Subtraction•5 % 4 // Modulo•5 > 4 •4 < 5 •5 >= 4•4 <= 5
Logic:
&& // Means “and”|| // Means “or”
![Page 31: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/31.jpg)
Two Functions in Processing
•All Processing Programs must have these two functions:
–void setup()–void draw()
![Page 32: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/32.jpg)
setup() and draw()
•void setup()–Runs one time–Initialize Objects–Set Canvas size and Color–Still Images
•void draw()–Runs in a loop–Used in Animation–Moving Images by changing
properties over time
![Page 33: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/33.jpg)
Canvas
![Page 34: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/34.jpg)
Canvas Functions•size(width, height); // Sets the
Size of the Canvas•background(red, green, blue);
// Sets the color of the canvas
![Page 35: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/35.jpg)
2D Shape Functionsline(x1, y1, x2, y2);
rect(x, y, width, height);
ellipse(x, y, width, height);
triangle(x1, y1, x2, y2, x3, y3);
quad(x1, y1, x2, y2, x3, y3, x4, y4);
arc(x, y, width, height, start, stop);
Note: Arc start and stop are in RADIANSUse radians(deg) to convert.
![Page 36: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/36.jpg)
Color and Pen in Processingfill(red, green, blue); // inside of shape
fill(red, green, blue, alpha); // inside of shape
stroke(red, green, blue); // outside of shape
stroke(red, green, blue, alpha); // outside of shape
strokeWeight(10); // Thickness of shape
![Page 37: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/37.jpg)
Color Representations in Graphic Systems• Red, Green , Blue (Standard)
– Values from 0 to 255 (Base 10)• 0 is Dark (no light), 255 is maximum
– Values of 00 to ff (Hexadecimal)• #ff0000 is Red or same as (255, 0, 0)
– Mix Red, Green, and Blue to Create all Colors
• Standard in Computer Graphics (Apple, Android, Java, Maya . . )
![Page 38: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/38.jpg)
Color in Processing: H, S, B
• Hue, Saturation, Brightness• Device independent• Available in Processing
http://www.tomjewett.com/colors/hsb.html
![Page 39: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/39.jpg)
Functions in Java to Create Complex Shapes• Return types:
– void: Does not return a Value. Performs an action– int: Returns an integer value– float: Returns a float value– Any data type or object can be a function return type
• Parameters: Values passed into the function• Brackets {}
– Define regions of the Function
![Page 40: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/40.jpg)
Example Functions
Sample student created functions
![Page 41: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/41.jpg)
Objects in Processing: Modeling with Java ClassesWhat is a Class?Collection of Variables and Functions that model an object.Blueprint through which we build instances.
Remember:Variables store valuesFunctions store sequences of directionsClasses store models of objects with variables and functions.
![Page 42: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/42.jpg)
Parts of a ClassNameFields
-Variables and Data structures that store the properties of the object
Functions-Code that gives the Class the ability to perform actions-Accessors, Modifiers, Void(Getters, Setters, and Action)
Constructor-Builds the instance and returns it to the program
![Page 43: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/43.jpg)
The Actor ClassImplements the idea of the Sprite from Scratch.Models a 2D Character / Agent in the Animated World.Automates movements, collision, edge interaction, colors, rotation, scaling,
and polygons.Code is provided to students as a library.Actor code is open source to students so they can modify if desired.
http://nebomusic.net/processinglessons/Actor.txt
![Page 44: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/44.jpg)
Actor Class Fields and Functions
![Page 45: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/45.jpg)
For Loops•Repeats section of code while counting up or down with an index
variable•Example
for (int i = 0; i < 10; i++) {System.out.println(i);
}
![Page 46: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/46.jpg)
for (int i = 0; i < 10; i++) {println(i);
}•i++ means "i = i + 1"•int i means "integer i"•for (int i = 0; i < 10; i++) means "For index variable i starting at 0, while i is less than 10, count be 1."
![Page 47: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/47.jpg)
Conditional Statements
•‘if statement’: Checks if a given statement or expression is true and then executes a section of code
if (score > 9) {textScore.setText(“You Win”);
}
![Page 48: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/48.jpg)
User Input and Fields
![Page 49: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/49.jpg)
Overview of Computational Media Curriculum
Media: File Extensions - How computers store dataGraphics:
PhotoshopSketchUp
Programming:Processing: 2D Graphics
StillAnimation
EarSketch: MusicCode.org JavaScript Lessons in App Studio
![Page 50: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/50.jpg)
Sequence of Lessons Computational Media EarSketch
• AB Exercise: http://nebomusic.net/earsketchlessons/A_B_Exercise_EarSketch2.pdf
• makeBeat Exercise: http://nebomusic.net/earsketchlessons/makeBeat_practice_EarSketch_2.pdf
• Functions Exercise: http://nebomusic.net/earsketchlessons/Directions_EarSketch2_Function_Exercise.pdf
• List Exercise: http://nebomusic.net/earsketchlessons/Directions_EarSketch2_Lists.pdf
• Final Project: http://nebomusic.net/earsketchlessons/EarSketch_Final_Project_v2.pdf
![Page 51: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/51.jpg)
Sequence of Lessons Used in Computational Media Processing
• Boat Exercise: http://nebomusic.net/processinglessons/Processing_Exercise_03a_Functions_Written.pdf
• Function Exercise: http://nebomusic.net/processinglessons/Processing_Exercise_01a_Functions.pdf
• Actor Class Project: http://nebomusic.net/processinglessons/Class_Based_Exercise_Requirements_v4.pdf
• Simple Game Template: http://nebomusic.net/processinglessons/SimpleGameProcessing.pdf
• Particle Simulation (Make it Rain): http://nebomusic.net/processinglessons/Arrays_Loops_Act.pdf
• Final Design Process: http://nebomusic.net/processinglessons/Process_Processing_Final_Project.pdf
![Page 52: Programming with Python: Math, Music and Art in Web Based ... · Programming with Python: Math, Music and Art in Web Based Environments GISA 2016 Session 233. Marist School. ... Disney,](https://reader030.fdocuments.us/reader030/viewer/2022040301/5e794903629c485e8e1f2469/html5/thumbnails/52.jpg)
References
•Key Java Vocabulary: (http://docs.oracle.com/javase/tutorial/java/nutsandbolts/index.html)
•Processing Official Reference:http://processing.org/reference/