ep-341 Max/MSP – Spring 2015 week 7

The Live Object Model in Max for Live.

Screen Shot 2015-03-04 at 12.43.39 PM

Several ways of working with Ableton Live parameters in a M4L patch. (This is an improved version of the patch we built in class) https://reactivemusic.net/?p=18401

The Live Object Model description: https://cycling74.com/docs/max5/refpages/m4l-ref/m4l_live_object_model.html

In the coming weeks we will build synthesizers and work with control surfaces in M4L

Assignment

Build 3 or more M4L devices, including one of each of the following

  • An audio effect
  • An instrument
  • A Midi effect

Its ok to adapt and “improve” an existing device.

Please bring in your work in progress for next week and be prepared to demonstrate something. The entire assignment will not be due until March 31.

 

The Live Object Model in Max for Live

Introduction to getting, setting, and observing Live parameters with Max for Live.

Screen Shot 2015-03-04 at 11.48.03 AM

download

https://github.com/tkzic/max-for-live-projects

folder: lom

patch: aaa-lom-examples

tutorial

This example device shows several ways of working with Ableton Live parameters in a M4L patch. It can be a confusing process. And there are many different ways to accomplish the same result.

The examples here will use the LOM (Live Object Model) directly, and via builtin LiveAPI abstractions and choosers – available from the context menu that appears when you <ctrl> click inside of an open patcher window.

live.observer

Screen Shot 2015-03-04 at 11.57.45 AM

The snippet above shows how to continuously monitor Live’s tempo.

  • live.this.device sends out a bang when the device loads
  • the “path live_set” message tells live.path to get an id number for the current set. This id is sent to the right inlet of live.observer, telling it we want to observe the current Live set
  • the “property tempo” message asks live.observer for the current tempo value
  • If the tempo changes it will be automatically updated
live.object (set)

Screen Shot 2015-03-04 at 12.09.49 PM

The snippet above shows how to set Live’s tempo.

  • Get the Live set path id using the same method as shown for live.observer
  • the “set tempo” message sends a tempo value to live.object
live.object (get)

Screen Shot 2015-03-04 at 12.15.57 PM

The snippet above shows how to get Live’s tempo.

  • Get the Live set path id using the same method as shown for live.observer
  • the “get tempo” message requests the current tempo value from live.object
live.object (call)

Screen Shot 2015-03-04 at 12.23.11 PM

The snippet above shows how to start or stop the Live transport by calling functions.

  • Get the Live set path id using the same method as shown for live.observer
  • the “call start_playing” message tells live.object to start the Live transport. “start_playing” is the name of a function builtin to the Live set.
LiveAPI abstractions

The LiveAPI abstractions provide convenient shortcuts to working with Live parameters. Copy them into your patch by <ctrl> clicking inside an open (unlocked) patcher window – and selecting “Paste from -> LiveAPI abstractions”

Screen Shot 2015-03-04 at 12.30.25 PM

Observing the Live transport

Screen Shot 2015-03-04 at 12.31.49 PM

The snippet above shows how to monitor whether the Live transport is running

  • paste the abstraction into your patch as explained above
Selecting the master track

Screen Shot 2015-03-04 at 12.34.07 PM

The snippet above shows how to select the Master track

  • paste the abstraction into your patch as explained above
LiveAPI choosers

The LiveAPI choosers provide convenient shortcuts to selecting Live parameters from menu objects. Copy them into your patch by <ctrl> clicking inside an open (unlocked) patcher window – and selecting “Paste from -> LiveAPI choosers”

Screen Shot 2015-03-04 at 12.36.43 PM

Setting device parameters remotely with live.remote

Screen Shot 2015-03-04 at 12.38.29 PM

The snippet above shows how to remotely set the volume on the master track

  • paste the chooser into your patch as explained above
  • connect the left outlet of “substitute” to the right inlet of live.remote
  • send values to live.remote to change the selected parameter

Boids sonification in Max

“Boids is a bird flight and animal flock simulator. It is based on the same algorithm which was used in “Jurassic Park” for herding dinosaurs.”

Max external by Singer, Jasch, Sier and Smith. Tutorial by dude837

download

https://github.com/tkzic/max-projects

folder: boids

project: boids23

patch: main-tz.maxpat (slight modification to enable existing presets to work)

Screen Shot 2015-03-02 at 9.49.09 AM

externals
  • Download version 1.1 from http://s373.net/code/ (in the section called “boids for max”)
  • Then add the path to the downloaded folder to Max objects | file preferences

Screen Shot 2015-03-02 at 10.02.09 AM

Patches for Cycling 74 “Programming in Max for Live” videos

These are my versions of some of the patches. Not Cycling 74’s. If you find ‘official’ versions please let me know. The list isn’t complete. The simpler (beginning) patches are not included, but the interesting ones are.

Screen Shot 2015-02-23 at 12.50.20 PM

download

https://github.com/tkzic/max-for-live-projects

folder: c74-video-tutorials

Sub-folders:

  • API-step-sequencer
  • dub-delay
  • poly-synth
  • velocity-sequencer
  • wobble-bass
Instructions

In Live, create new Max for Live devices, as instructed in the videos – and then copy and paste from these patches into your new patches.

 

 

Fractal drawing in Max

Fractal geometry with Jitter.

By Peter Elsea

Screen Shot 2015-02-23 at 11.14.14 AM

“Fractal geometry is the study of objects that have a property known as self- similarity – They are made up of smaller copies of the overall shape. One of the most popular is called the Sierpinski triangle”

The Max patches were developed (stolen) from Elsea’s lecture notes at http://peterelsea.com/Maxtuts_jitter/Fractals_in_Max.pdf. The first patch draws Sierpinski triangles. The second patch is generalized to circular shapes with N corners.

Screen Shot 2015-02-23 at 11.14.57 AM

download

https://github.com/tkzic/max-projects

folder: fractals

patches:

  • fractal1.maxpat (triangle)
  • fractal-n-corners.maxpat (N corners)
external dependencies

You will need to download Elsea’s Lobjects abstractions and add the path to Max in Options | File Preferences: http://peterelsea.com/lobjects.html

 

Random dots in Max

Draw random colored dots on a 2d plane.

Screen Shot 2015-02-23 at 8.52.02 AM

Dots are superimposed on a world map using the lcd object.

download

https://github.com/tkzic/max-projects

folder: random-oval-paint

patch: random-oval-paint.maxpat

additional files: worldMap.jpg

Instructions

Load the patch and click the toggle in the upper left corner to begin drawing. Number boxes allow you change rate and dot size. Click the purple “clear” message to start over.

 

ep-426 Interactive video – Spring 2015 week 3

The matrix

(under construction)

matrix01

Review of Jitter tutorials:

tutorial 1: play a Quicktime movie
  • bang sends a matrix (once)
  • jit.fpsgui for debugging
  • How would you play a movie play backwards?
tutorial 2: build a single plane matrix
  • Anything can be transformed into a matrix
  • Create a matrix, row by row, using math (p fillmatrix)
  • How to get and set individual cells in a matrix
  • jit.matrix
  • How would you make pixel art? a drawing program? a spectrum display?
  • A lot of specialized Jitter objects are abstractions that do what this tutorial demonstrates – i.e.., building or transforming the planes of a matrix
tutorial 3:  math operations on entire matrix/plane
  • @op (is an attribute) : was it good design in Max to have both messages and attributes?
  • scalar, vector
  • pass
  • integer/float
  • What happens in a jit.pwindow with display size smaller than the matrix?
  • upsampling/downsampling
tutorial 4:  movie playback.
  • jit.qt.movie will play back URL’s (audio and images) – but you can’t work with the sound in Max without Soundflower
  • scrubbing and looping produces interesting fx
  • hardware controllers
tutorial 5: ARGBI
  • Rearranging planes
  • 8 bit char data type 0-255
  • line object (grain size)
tutorial 6 : color
  • scalebias:  normalized 0.->1. values, not with 0-255 values (look at the subpatcher)
  • planemap attribute for jit.matrix
tutorial 7: hue and BRCOSA
  • 2 very different ways of transforming (i.e., filtering) color and light
  • Why do we seen green with emphasis and detail?
  • hue angle is a way of gradually shifting around the color wheel.
tutorial 8: simple mixing
  • jit.xfade
  • line object
tutorial 9 – more mixing
  • Using various operators to transition, with jit.op, and using jit.scalebias to scale the input values to prevent clipping
tutorial 10 – chromakey
  • doesn’t need to be green.
  • Could you do a performance where you paste yourself into a band video.
  • napoleon dynamite
  • actual green screen

Experiments

Max 7 lessons review

  • fantastic sounds
  • RGB music
  • geometric dreams

State of the art:

8W62Swc

Assignment

Design a project that will be due at the mid-term. Send me an email next week describing the project.

Continue working through the Jitter tutorials 4-12

Design a prototype of a synthesizer that generates accompaniment for animated GIF’s

News

There will be no class next week February 10th

References

Andrew Benson’s Jitter recipes: https://cycling74.com/search-results/#gsc.tab=0&gsc.q=jitter%20recipes

Screen Shot 2015-02-02 at 12.47.05 AM

Screen Shot 2015-02-02 at 12.47.30 AM