Sie sind auf Seite 1von 80

practicalstartingguidetomax/msp/jitter

bodsiinhtarvaproject

forewordandmethodologicalapproach
It is a commonly spread theidea that the learning curve in Maxisquitehighwhencompared
toothersimilarcomposingsoftwarelikeAbletonorReasontomentionsome.
We would like to present here an approach to learn Max targeted mainlytobeginnersbased
onsomeprinciples:
1. quick anddirty: ourobjectiveisthatthenewbiestartsasapexperimentingwithMax,so
wehadtoreduceprofusionandorder
2. divergent: our approach is to learn by doing, not always necessarily explaining
conceptsinaconstructivewaybutlettingtheuserexplore
3. no patches: although we could have include them,we donotdeliveranypatcheswith
theguide,allofthemmustbebuiltbyyou,thereasonsare:
a. webelievethebestwaytolearnistocreatepatchesfromscratch
b. in a patch usually there is hidden info (inspector, values inside hidden
elements, dependencies, configurations...) critical for its understanding that
couldmisleadyou
c. apatchletsyouoperatesomething,butyouusually dontlearnhowtobuildthis
something
4. but lots of images: we propose lots of Max patches in this guide and provide
(hopefully) the additional textual information foranewbietoimplementithim/herselfin
Max
a. objectsarewritteninboldletters
b. messagesarewritteninitalic
c. images shouldcontain everydetail you need to buildthepatch,ifnotaskusto
changeit
5. you: this is the important part, asthismethodrequiresprobablyalotofinterestinMax
fromyoursideandsomefaithleaps
6. not complete: sorry, but we do not haveenough resources,thisisonlyaselectivebite
tothehugeMaxcake
The objective of this guide is that a newbie can feel comfortable enough to make a deeper
use of the excellent available documentation like the Max documentation itself, Cycling74
tutorialsandforums,CNMATtutorialsortheexcellentBAZandPADtutorialsinyoutube.
This project is a work in progress and more modules are being thought. We will be glad to
receivefeedbackinourgmailnamedbodsiin,butnowletsstart:

programmingandmusic,why?
Actually programming music mustnot be always so difficult as it may seemandin exchange
we will have quite a number of advantages. Nowadays sound and visual artists can benefit

from a number of intuitive (at least more than programming itself) graphical programming
environmentssuchasPuredataandMax/MSP.
Instead writing the lines of code which describe what the program does, youwill be able to
manipulate visual objects onscreen. Your program will be called patch and you willdesignit
by placing objects (functions or methods that deliver a result) on thescreen. These objects
are clever enough to understand some instructions that we will call messages and also
interactwitheachotherwhenconnectingthem.
Furthermore, all this works in real time. That means that certain changescanbemadeinthe
objects even as the programis running so you can see or hear the resultsimmediately.This
makesitapowerfultoolalsoforartistswhoperformlive.

how a real time graphical programming environment


lookslike?
Programmers are typically able to abstract the idea of objectoriented programming but it is
also in everyday life. You can think about an object as a person with a certain profession or
qualification. That person is able to understand a task (method) in a certain language and
perform it. The complex interaction of a good number of persons with different qualifications
candeliveraninterestingresult.
With this analogy inmind,programmingwouldbelikeorganizingandcoordinatingtheworkof
lotsofpeople.Theorganizer(programmer)thusmusthaveagoodknowledgeabout:

thepeopleavailable(objectsinstantiated)
thetasksthatdifferentobjectsunderstand(messages)
alenguagetoexpressthetasktotheperson(methodsandarguments)
acommunicationchanneltodeliverthemessage(patchcords)
whichears(inlets)receiveinformationandwhichmouths(outlets)sendinformation

Lets make a nonMaxexampleinMaxtoillustrateit.Letssupposeweorganizetheworkina


hospital. A patient arrives and we need to know his diagnosis. We want to design a general
procedure. How do we proceed? First of all we decide that we will use the doctor object to
perform this task because we know in advance that a doctor can deliver us a report. We
designthenthepartoftheprogramtosendthenecessaryinformationtotheobject:
1. Create a doctor object (lets supposethatthesyntaxis ID oftheobjectfollowedbythe
nameoftheobject)
2. Create a message with the task (method) to perform (in this case diagnose) followed
bythesurnameandnameofthepatient(arguments)
3. Createacommunicationchannelbetweenthemessageandtheobject(patchcord)

Note:thisexampleisshownforpedagogicalpurposesandofcoursedoesnotworkinMax)

Thenwedesignthepartoftheprogramtoreceivetheinformationweneedfromtheobject:
1. Createabellthatringsinourofficewhenthetaskisfinished(bang)
2. Leave space for anewincomingreportinourofficewiththedetailedinformationofthe
diagnose
Theprogramwouldlookmoreorlesslikethis:
(textboxeswithdottedbordersarethecommentsoftheprogram)

OK, the program seemstobeready,butnow,howweexecuteit?Wehavetoswitchfromthe


designing mode (unlocked) to the operation mode (locked). Theprogram looks pretty much
similarasbeforeexceptwecannoteditanymoreandthemessagesareclickable.

In operation mode by clicking on the message diagnose followed by the arguments we


triggerthefollowing:
1. sends the message with method and arguments (task to perform and patient) tothe
doctorwithIDp
2. doctor p knows that when he receives a patient (argument) and the task diagnose
(method)mustmakeareportandwhenfinished:
a. ringthebelltotherightoutlet(bangilluminates)
b. sendamessagewiththereportcontenttotheleftoutlet(reportappears)

So, every time weprograminMax,wehavetwofaces:onefaceistheoneoftheprogrammer


and the other is the one of the program operator. This is the mainadvantage ofMaxagainst
other music programs that allow you onlyto operate the program butnot to createyour own
program.
It is important to know in detail which tasks can perform which objects. In our imaginary
example, we could not send the method diagnose like this to a person that repair bikes, it
must be directed to a doctor object, or maybe a nurse object. The person that repair bikes
maybe accept the methodscheckbrakes orchangewheel butdefinitelynotdiagnose(atleast,
notinthesenseofmedicaldiagnose)
Thus,thestepstogainknowledgeofMaxcouldbe:
knowingthedifferentobjects
knowingitsmainmethodsandarguments(ormaintaskstheycanperform)
knowing the responses (in which format, through which outlet) the main methods
triggerfordifferentobjects
learndifferentpracticalwaysofinteractionbetweenobjects
Soletsgetstarted.OpenMax.

firststepsinMaxandshortcuts
Here we present some useful shortcuts that you will use more and more as soon as you get
usedtoMaxenvironment.
Note:replaceApplewithCTRLinwindows

Shortcuts
Duplicateobjectsmanytimesinageometricallypleasingmanner:
1. optionshiftdragforthesecond
2. apple+dfortherest
ClearMaxwindow:
1. apple+m(showsMaxwindow)
2. apple+a(selectalllines)
3. delete
Helpfiles:
selectanobjectandpressapple+shift+h

Othershortcuts:

Pressmtoinstantiatenewmessages
Pressitoinstantiateanumberobject(integer)
Pressftoinstantiateaflonumobject(float)
3isanintegerwhile3.isafloat(noticethepoint)
Selectanobjectandpressapple+shift+htoshowhelp
Pressctoinstantiateacommentbox
Pressbtoinstantiateabang
Pressttoinstantiateatrigger
Pressptoshowobjectpalette
Pressrtoshowobjectpalette/recents
Pressjtocreateajitterobject
Pressltocreatealiveobject
Connect one outlet to many inlets by holding the shift button beforeyou click on the
outlet
Shiftandclicktocreateanonlinealpatch
Apple+btoshowthefilebrowser
Apple+etolock/unlockthepatch
Controloptionclick any object to see a complete list of messages that theobjectwill
accept.
unlock:appleclickonanyemptyspaceofpatch

When you locate the pointer over aninlet,aredcircleappearsstatinginfoaboutfunctionand


data type permitted. Moreover, if you clickinsidetheredcircle, appearsalistofallmessages
that can be sent to this particular inlet, if you click any element of the list, it creates the
appropriatemessagewithapatchconnectedtotheinlet.

newdocument
By now probablyyou would like to create your first program. Creating aprogramisthesame
ascreatinga newdocument(orpatch).Pressingapple+n,youwillcreatea window similarto
this:


The name of the Max document (hereinafter patch) is located at the top barofthedocument
and by default is Untitled followed by a number that depends on how many documents you
createdinthecurrentsession.

lock/unlockmode
By default you also see in brackets the word unlocked, that means that you can edit the
patch. To operate the patch you have to lock the patch clicking the padlock. Click now the
padlock on andofftogetfamiliarwiththisfeature.Anotherwayoflocking/unlockingisclicking
withtheApplekeypressedinanemptyspaceofthepatch.Anotherwayisapple+e.

objects
TheydosomethinginMax/MSP,usuallytakessomethinginandputssomethingout.
You create a new object pressing n in an empty space onadocument(patch)andtypingthe

name of the object. (Be aware that the object will be inserted in theplacewhereyouhad the
pointerwhennwaspressed)
Max 5 has implemented an autocomplete feature that brings alistasyoutype.Youjusthave
to select the objectfromthe list, give some arguments if needed (leaveaspacebetweenthe
objectnameandthefirstargumentandalsobetweenthedifferentarguments)andhitenter.

You can also create an object bringing the object palette, pressing p (aswhenyoucreatean
object directly, theobjectwill be inserted in the place where you had thepointerwhenpwas
pressed)
Theinlets(alwaysup)receiveinformationandtheoutlets(alwaysdown)sendinformationout.
In this example, the+objectreceivestwonumbersinitsinlets(above)andreturnsthesumin
theoutlet(below)

As a general rule, the bangs are received in the left inlet, when information received inother
inlets,willnottriggertheoutletsoftheobject.(Exceptions:gate,funnelandpak)
Note: a bang is an undifferentiated, unqualified event, whichmostobjectsinterpretasacommandtotrigger
whateveritisthatactiontheyperformasmaxobjects

When objects have more than one inlet, the right inlets are usually for setting values
(arguments) before the left inletinputcausesareaction.Theseargumentsdodifferentthings.
You should always check the help patch for the object to learn what arguments the object
acceptsandtodowhat.
When editing a patch (unlocked mode), moving themouseoveranyinletoroutletyouwillget
asmalldialogdescribingwhatthatinput/outputdoes.
Abstractions are similar to objects, buttheir componentsareotherobjects,example:createa
newobjectpressingnandtypepan2thenpressenter
Tocreateanewpatchpressapple+norclickFileNewPatcherinthemainmenu.

Pressntoinstantiatenewobjectsordoubleclickinthecanvastorecalltheobjectmanager.
The data that comes after the name of an object is called argument, and usually sets upthe
initial behaviour of the object. Maybe you can try to make a patch similar to this one, the
speakerisanaudiooutobjectcalledezdac~

draganddropfromthefilebrowser
When pressing apple + b, the file browser window appears. This is a useful tool to find the
objects, patches, audio...youwanttouseinyourpatch.Youcanbrowseontheleftcolumnor
use the search engine and drag and drop to the patch the file selected, take your time to
exploreabitthefilebrowser:

messages
Technically, messages are objects also, but we will see them separately. They usually tell
other objects to do something. They travel instantly alongpatchcords.Theycanalsoreceive

variables(numbers,symbols,lists...)viainletandusethemwith$1,$2andsoon:

Wecansendtwomessagestogetherseparatingthembyacomma.
The special symbol semicolon inside a message box tells that the next item will be the
nameofareceiveobject,wecanincludeasmanyaswewantinamessage:

A receive or r objectisaspecialobjectthatallows toreceivemessageswithoutapatchcord,


theotherwaytosendremotelyamessageinMaxistouseasendorsobject:

Note:inMax,thereceiveobjecthasexactlythesameeffectasrandsendass.

The yellow triangle on thefloatobject(thenumberbox ontheleft)indicatesthatitisselected.


A float object is an object that we can instantiate (create an actual copy of the object in our
patch) by pressing f anywhere in the patch window and offers an interface to generate float
(real)numbers.
Note: a real number is a value that represents a quantity along a continuum of numbers, herewe show
someexamplesofrealnumbers:

5isanintegerorjustanumber

3/4 is arationalnumber,thismeansthatthatcanbeexpressedasthequotientorfractiona/boftwo
integers,withthedenominatorbnotequaltozero

8.6isarationalnumberexpressedindecimalrepresentation
pi is 3.1415926535..., anirrationalnumber,meaningthathasaninfinitenumberofdecimalswithno
pattern,mostoftherealnumbersareofthistype.
Inthecase of piorrational numberswithalargeamountof decimals,youwillrealizethattheyaretruncated
to 6, thisis duetotheprecisionthatMax supports bydefault. So,in factwemainly will bedealinginMax
onlywithrationalnumbersexpressedindecimalrepresentation.

A message can receive the message color space number (between 0 and15) to set up its
backgroundcolor:

Othermessagesyoucansendtotheleftinletofamessage:
set sends whatever follows asthe content of the message (set 1 35 7totheleftinlet
willsetthemessageto1357)
setaloneclearsthemessage

inspectorandattributes
When you select an object in a patch and click apple + i, the inspector window shows up. It
shows the default attributes of the object organized in tabs presenting the attributes row by
row, colourcoded for clarity, with font selectors, colour swatches, menus and tick boxes as
appropriate. From the inspector you can change any aspect you desire from each object in
Max.Itispossiblealso
Lets see anexample: wehave created a metro object in a new patch by pressing n, typing
metroandclickingenter,oncedonethepatchshouldlooklikethis:


Now if we select the object and click Apple + i to show the inspector, we see all available
attributesthatwecanchangeforthegivenobject.


To change attributes in this way you must be in edit mode, but there is a (sometimes less
known) way to change attributes also when operating the patch inlocked mode. One of the
design aims of the attribute system wasthat an object should be ableto accept an attribute
change by receiving a message via a patch cord. Now, if you drag a row from the inspector
window onto the object, Maxwill magically createamessageboxwiththecorrecttexttoalter
thatattribute.


This is particularly useful forJitterusers,whereattributesaresocrucialto thecontrolofvideo
and matrix objects, but is also a really handy shortcut in the Max world, allowing to control
attributesthatmodifytheobjectbehavioritself,appearanceandsoon.

lists
A list consists of a group of integers, floats or symbols separated by spaces. The zl object
withitsdifferentparametersoffersmanywaystooperateonlists:


The List package is anothergood tool to work with lists with readytouse java objects. They
arelocatedintheCycling74folderofyourMaxinstalation,inCycling'74/java/help
Locate the file named listpackage.maxpat and open it. In general, a good way of knowing
whatispossibletodowithanobjectisbyopeningthefilewithextension.maxhelp

patchcords
When you click in an outletandmove themouse,you willsee thatapatchstartstoappearin
the screen, take it to theinletofanotherobjectandreleasethebutton.Yourfirstpatchcordis
created. Three types of cords: Max cords(black)transport information, MSP (dotted yellow)
audiosignalandJitter(dottedgreen)videosignal:

Hold down the shift key, click on the outlet you want to connect, release the shift key, use
mouse clicks to create segmented patch cords (alternatively youcanchecksegmentedpatch
cords in the main menu by selecting Options segmented patch cords). Segmented patch
cordscancauseproblemswhenyoutrytorearrangethepositionofthingslater:

MaxworksatcontrolrateandMSPataudiorate
Most parameters controlling a transformation do not change very fast. The control rate is
typically no more than about 1 kHz, which results in a time granularityofapproximately1ms
(control tick). This is supposed to be fast enough for typical nonaudio data. Furthermore,the
data flow at control rate is asynchronous, which means that data can be passed, but if a
parameter value is constantoveralongerperiodoftime neednotbesentateverycontroltick
butonlywhenachangeofthevalueoccurs.
MSP objectsworkwithaudioratethatusuallyissetupto44.1kHz,whichisthesamplingrate
used for Compact Disc and it issynchronous, meaning that whenever audio is on, there will
beaflowofdata.
The message domain in Max objects is for most systems also capable of handling
nonnumericaldata.

Max/MSPobjects
messengers
printobjectprintsinthemaxwindowthemessagereceivedinitsinlet.
printitprintsinadditionacompletebreakdownofamaxdatastructure
timer reports in its left outlet theelapsed time between two events. The time starts counting
by sending a bang to the left inlet. The elapsed time outputeach time a bang is sent to the
right inlet can besetfor milliseconds or ticks (the smallest incrementoftimeas measuredby
acomputersystem).

unpackobjectreceivesalistandbreaksitintoindividualmessages:
Thenumberofargumentsdeterminesthenumberofoutlets
Abangobjectconnectedtotheinletoutputsofwhatisstoredinunpack
This is how the help file looks like(create an unpack object and selectit, then press apple+
shift+h):

Conversely, the pack object creates a list from separate elements. Try to reproduce the
patches shown intheimages(withoutthecommenttext)fromnow on.Inthisoneyouhaveto
presstwicef,oncenandtypepack,oncemandmaketheconnections.

pakobjectoutputsacombinedlistwhenanyelementchanges:


tortriggerputsouttheargumentnomatterwhatgoesin:

Check the max window to see the results. i stands for integer, f for float, s for symbol,b for
bangandlforlist.Anotherexample:thesameoutputcangeneratedifferenttypesofdata:

gateobjectpassesthemessagefromtherightinlettotheoutletifthegateisopen.

Anonzerointegersenttotheleftinletopensthegate,zeroclosesit
Theintegersenttotheleftinletspecifiestheopenoutlet
Theargumentisthenumberofoutletsandbydefaultis1
Iftheinputisbiggerthantheargument,thelastoutletwillbeactive
Can take a secondargument that is the default gate open before sending anythingto
theleftinput


funnel object receives data in the number of inlets given by its argument and outputs an
indexed list withtwo elements, the first one is the number of the inlet(index)andthesecond
isthevaluereceived.
spray object takes a listas input. The first number is taken as theoutletnumber,andoneor
more numbers that follow are sent out that outlet and those to its right, in righttoleft order.
The argument sets thenumber of outlets (there is no set limit).The defaultnumberofoutlets
is2.

switchobjectswitchesbetween2ormoreinputs
Firstargumentisnumberofswitches
SecondargumentisnumberofinletONbydefault
Anumbersenttotheleftinletopensthecorrespondingswitch(if0closesall)

There is also a graphical version called gswitch under buttons section in new object palette
(doubleclickinanemptyspaceofapatchtoaccessnewobjectpalette)

route object takes an incoming message in inlet and tries to match its first argument to the
object'sownarguments,sendingtheresulttotheoutlet
receivesintheinletalist
if the first element of the listmatches with any of the arguments, the rest of the list is
senttotheappropriateoutlet
ifanumberisreceived,sendsabangtotheappropriateoutlet
thereareasmanyoutletsasarguments+1
the last outlet is reserved in case the first element of the list does not match any
argument

matrix~ isan array of signal connectors andmixers,aneasywaytocontrolitisconnectinga


matrixctrlobjecttoitsinlet
first argument: the columns of matrixctrl represent the number of incoming signals
(andinlets)
secondargument:therowsofmatrixctrlrepresenttheoutputs
dump message in the left inlet sends the current gains of all connections out the
rightmostoutlet,inlistsofthisform:<inputoutputvalue>
ramp message with an argument in ms sets ramping time over which the gain values
arechanged
signalsenteringateachinletcanberoutedtooneormoreoftheoutlets


router objectletsyoupatchmultiplesourcesofMaxdatatomultipledestinationsdynamically,
as matrix the first argument is the numberof inputs andthesecondisthenumberofoutputs.
It is designed to work best with the matrixctrl user interface object that we saw above and
usesasyntaxequivalenttotheMSPobjectmatrix~
select orselobjectoutputsabangintheleftoutletiftheinputmatchesargumentandoutputs
the value in the right outlet ifdifferent. Set a value to be sent to theright inlet and see what

happenswhenyoumovetheleftslider.

Note:theobjectsthatfeedthefloatsaresliderobjects.

split object receives a value inthe left inletandoutputsitthroughtheleftoutletifthevalueis


intherangedefinedbythearguments.Ifnot,itsendsittotherightoutlet.

change object stores the number that we send to the inlet. If a new number is sent, it will
output it to theleftoutlet only if it is different from thestorednumberandwillresetthestored
numbertothatdifferinginputnumber
midoutletsendsthevalue"1"forlogicaltransitionsfromzerotononzerovalue
rightoutletsends1ifthetransitionwasfromnonzerovaluetozero
loadbang object sends a bangtoitsoutletwhenthepatchthatincludesitisloaded.Usefulto

setsomeinitialconditions.
loadmessobjectsendsamessage(argument)totheoutletwhenthepatchisloaded.
send or sandreceiveorrobjectsallowmessagetransmissionwithoutconnectors.Thesend
object receives a message in theinlet that is sent to the outlet of the receive object with the
samename(argument).
The equivalents send~ and receive~ transport audio signals instead of messages but they
have a CPU cost since theycopytheaudiointomemory.Theeffectwill notbenoticedunless
therearehundredsofsend~andreceive~

generators
buttonobject(shortcutb)sendsabangwhenanymessageisreceived initsinletorwhenthe
buttonitselfisclickedinunlockedmode.
opendialog objectopensadialogwindowtoaskforafileor folderwhenabangisreceivedin
itsinlet.

argument(s)specifyfiletype(s)(AIFF,AIFFC,Wave...)
ifnoargumentanyfilecanbeopened
tospecifyafolder,setfoldasargument
takes a list of one or morefile typesand allows you to select a filefromamongthose
types
when bang received in inlet, the entire pathname of the file or folder chosen is
outputted
this path can be passed to any Max object after the word read orload (dependingon
theobjectthatreads/loads)
bangreportedtotherightoutletwhenusercancelsanddoesnotchooseafile
when a file type is received in the inlet (for example TEXT), this file type is enabled
andopensdialog
set message followed by a file type to the inlet (for example JSON), sets file type but
dontopenthedialogwindow
soundtotheinletsetsthesoundfiletypesandopensthedialog


uzi object generates a specific number of bang messages when a abang is received in its
inlet.

1stargumentisthenumberofbangmessagestosend
bangsarereceivedintheleftinletandindexintherightinlet
2ndoptionalargumentsetsoffsetindex(default1)
pauseandbreakstopsendingbangs
resumeorcontinuestartsendingbangsagain

counterobjectwithoutarguments:givenabanginleftinlet,incrementallyincreasesnumber.
counter116with2argumentsthatindicatesminandmax.
2ndinletsetsdirectionofcounter0=up1=down2=updown

3rdinletresetscounteronnumbersentnextbang
4rd inlet resets counter immediately (if a number above the range is sent and you're
goingdownwardsthenitreacheszeroandstaysintherange)
5thinletsetscountmaximum(alsocanbedoneby2ndparameter)

metro object outputs a bang at regular intervals determined by the argument (in
milliseconds):
startswithabangintheleftinlet
theargumentcanbemodifiedsendingamessagetotherightinlet

tempoobjectoutputnumbersatametronomictempo
bangontheleftinletactivatesit
number to the second inlet (first argument for initial value) sets beats per minute
(BPM)
numbertothethirdinlet(secondargumentforinitialvalue)setsbeatmultiplier
number to the fourth inlet (third argument for initial value) sets divisions of a whole
note(default16,range196)
del ordelayobjectreceivesabangandthenholds ontoitforaspecifiedamountoftimeinms

before sending the bang to the next object. Optional int or float argument to initialize delay
time.
zl group creates a list made with the stream of items received in the left inlet after a given
numberofitems(senttotherightoutlet)isreceived:

Note:seemorezlobjectstooperatewithlistsinthehelpfile.

pipe object delaysnumbersorlists.Numbersaresenttotheinletsbutthelast,thelastinletis


reservedtocontrolthedelaytimeinms.

lineobjectoutputnumbersinarampfromonevaluetoanotherinanspecifiedtimeinms:
firstargumentsetsinitialvalueandoutputtype(intorfloat)
second argument sets timegrain (int or float regardless of the outputtype), default is
20ms.Int/floatinrightinletsetsthetimegrain
int/floatinmiddleinletsetsramptime
bangintherightoutletisoutputwhentherampisover

random object when triggered by a bang in the left inlet causes a random number output
within0andtheargument1.

drunk object also causes a random number output but the difference between two
consecutivenumbersmustbeinthestepsizespecifiedbythe2ndargument

urn object generates random numbers but without duplicates, when all numbers is arange
havebeengenerated,outputsabangintherightoutlet.

decideobjectchoosesrandomlybetweenon/off(0/1)


prob object accepts a list of three numbers, the third number represents the weight of the
probabilityofgoingfromthestatesrepresentedbythefirsttothesecondnumber

mousestate object reports the status and location of the mouse, all data shown in pixels.
Deltaisthevariationinthisexampleevery200ms.Themousebuttonissampledevery50ms.
Sendingthemessagepoll,outputvaluesasthemousecreatethosevalues.

key object reports key presses on the computer keyboard in 4 formats corresponding to 4
outlets:


keyupobjectreportskeysreleasesonthecomputerkeyboard
matrixctrl object is amatrix switch control operated by cells that live in arectangulargridas
wesaw,hereismoredetailofitsbehaviour:

cleartotheinletdeleteseverycellinthematrix
Allofthecellsinamatrixctrlobjecthavethesameappearanceandbehavior
Bydefault,thecellshavetwostates0/1
Youcancreatecellswithanynumberofstates
Clickingonacellincreasesitsstatebyone
Alternatively, you can change the cell state by sending a message witha list of three
numberstotheinlet:
1stnumber:xcoordinate
2ndnumber:ycoordinate
3rd number: how much will the state increase (can be also dec for
decrementingorincforincrementinginoneunit)
youcanalsocomposemorethanonetriadinonesinglelist
everytimethestateofacellischanged,alistwiththetriadisreturnintheleftoutlet
Afteracellreachesitslaststate,itreturnstoitszerostatewhenclickedagain
themessageactivefollowedby0deactivatestheobjectandfollowby1activatesit
getrow message and a number retrievesthevaluesoftheappropriaterowontheright
inlet
getcolumn message and a number retrieves the values of the appropriate column on
therightinlet

dateobjectacceptsthreemessagesintheinlet:data,timeandticks.Objectreports:
dateasalistofthreenumbers(day,month,year)inthefirstinlet
timeasalistofthreenumbers(hour,minute,second)inthesecondinlet
numberof1/60thofasecondtickssincestartupasanintegerinthethirdinlet
makenoteobjectcreatesanotewithargumentsMIDIamplitude(range0127)anddurationof
thenoteinms.
1stinletsetspitch(range0127)andstartsthenote
2ndinletsetsMIDIamplitude(range0127)

3rdinletsetsdurationinms
1stoutletsendsthepitchwhenthenotestartsandagainwhenthenoteends
2ndoutletsendstheamplitudewhenthenotestartsand0whenitends
noteout object plays a MIDI note, usually you connect the two outlets of makenote to the 2
first inlets of noteout (MIDI pitch and amplitude). The third inlet of noteout can receive the
MIDIchannel.

Note:tocreatethekeyboard,instantiatetheksliderobject.

lorenz object is an external designed at CNMAT that generates a lorenz attractor. This is a
curve in 3 dimensional space that recalculates its position every given timestep h, the
coordinatesofthenewpointare:
xnew=x+(10h(yx))
ynew=y+(h(28xy))
znew=z+(h((xy)((8/3)+z)))
A bang in the left trigger generates the next pointonthegraph.Valuesofxyzhareinserted
asargumentsanddefaultare0.60.60.60.01

storage
value object takes asymbol as argument through which all value objects of the same name
arelinked


lcd object draw graphics in a patcher window receiving in its inlet messages with four
arguments (left, top, right, bottom) and sometimes a fifth (color index range 0255) or fifth to
seventhtospecifyRGB.

frameovaldrawsacircle/ellipse
paintovalthesamebutfilled
framerectdrawsarectangle
paintrectdrawsitfilled
linesegmentdrawsaline(argumentsstartX,startY,endX,endY)

It is possible also to draw other shapes and to draw with the mouse inthe object, in which
case the mouseposition (in pixels, being 0 0 the top left cornerofthelcd)isretrievedbythe
leftoutlet.

bucket object passes numbers received from outlet to outlet in order. Thenumber of outlets
is initialized by its argument and controlled by sending the message set andanumbertothe
leftinlet:


tableobjectallowstostorenumbersbyacertainindex
tablesizeisthesizeoftheindex(youcanseeitalsoasthexaxis)
table range is thetherangeofpossiblevalues(youcanseeitastheyaxisifyouthink
intermsofafunction)
to store values in a table, send to the left inletalistof 2numbers,thefirstistheindex
andthesecondisthevalue
store also a value sending it to the right inlet and after sending theindex to the right
inlet
to recall values from atable,sendanintegertotheleftinlet,thevaluewillbeshownin
theleftoutlet
to see the table,doubleclickthetableobject,awindowwillappearwhereyoucanedit
directlythetableinagraphicalway
toseethetableitispossiblealsotosendtheopenmessagetotheleftinlet
youmaynamethetablegivinganargumenttothetableobject
Sending a bang to the left inlet of the table object, we receive in the left outlet an index that
belongs tothetablesize.Thehigheritsvalueonthetable,themoreprobabilitiesfortheindex
to be shown. Theindexes with value 0 cannot be reached with a bang no matter how many
times we bang the table object. So, used in this way, table can be a generator object that
storesaprobabilisticfunctionthatisusedtodecideamongtheindexeswithnonzerovalue:


pattrobjectisanameddatawrapper
firstargumentisthenameofthepattrobject
second argument specifies the named object to which pattr left outled is bound by
default
to change the 2nd argument, send a message bindto and the name of the new
argument
pattrstorageobjectisusedtostorepresetsofmultipleinterfaces.Dothis:
1.
2.
3.
4.

Giveanametotheinterfaceobjectsyouwanttoremember(scriptingname)
Createapattrstorageobjectandnameitwithanargument
Createanautopattrobject
Connect the left outlet of autopattr to the inlets of every interface object you want to
remember

To check that everything is OK so far, send the message clientwindow to the inlet of your
pattrstorage object. A window should appear with the name you gave to every interface
object and the current value. If everything went fine, lets start to store values in the
pattrstorageobject.
5. To store the first value, first select in the interfaces the positions you want to store,

then send the message store 1 to the left inlet of pattrstorage. Repeat this with
incrementalintegersasmanytimesaspresetsyouneed
6. To see what is stored, send the message storagewindow to the left inlet of
pattrstorage
7. Torecallthepresets,sendanintegertotheleftinletofpattrstorage

autopattr object finds all objects inthepatchwithscriptingname and pattrstorageaccessto


the values of these named objects in order to store their current value for later use. If you
wanttorecallapresetcontinously,connectafloatobjecttotheinletofpattrstorage.


When you save a patch with a pattrstorage object in it, after saving the patch you will se a
dialogtosaveanxmlfile,whichstorethedataofpattrstorage.
preset object stores and recall the settings of other objects, when you mouse over the
buttons,youwillseethenumber(default24presets)

clickonacircletorecall
shift+clickonacircletostore
If no objects are connected to a preset's outlet, all objects in the patcher window are
stored
multislider object can receive a number and show the value in the slide, conversely it is
possible to move the slide and send the value to the outlet. Open the inspector and
experimentwiththeattributeSlidersOutputValues.


umenuobjectcanbeusedtodisplaytextassociatedtoincomingnumbersthatstartat0

coll (collection)behavesasatableinthesensethatstoresvaluesatindexes,butbothvalues
andindexescanbeanythinge.g.int,flot,symbol,list...
Like in a table, you store things by sending two things to the inlet where the first thing is the
indexandthesecondisthevaluee.g.323456storesthelist23456ontheindex3.
Torecallthedata,sendtheindextotheinlet.
Whensendingthefollowingmessagestotheinlet:

cleareraseseverything
remove1deletesthethingassociatedwiththeindex1
delete1asremovebutdecrementinghigherindices
writewritestoafile
readreadsfromafile(optionalfilenameargumentspecifiesfileinMax'ssearchpath)

Ifyouwanttosavecolldatainthepatch,dontgiveitaname.
qlist is a container that holdsa table ofevents.Each eventcanstartwithasymbol(name)in
which case, it will be sentnot only totheleftoutletbuttothereceivewiththesamename.To
see the content of qlist, like coll doubleclicktheobjecttoseeoreditthecontents.Thisisan
example,eachrowrepresentsanevent:

Each row represents an event. The events that start with a name, like variable1 can be
receivedinarobject:

buffer~objectstoresaudiosamples
firstargumentnamesthesampletousebyotherobjects

sendreadmessagetoinlettoopenasoundfile
filenameoptionalsecondargumentspecifiesfiletoreadinMaxssearchpath
bufferdurationoptionalargumentinms
toseethewavestoredonthebuffer~object,doubleclickit
when clicking or dragging over a sample, left outlet reports the mouse position in
milliseconds

In this example, it isshownhowcanweloaddifferentsamplesandcreateaninterfacetoplay


eachofthemseparately:

Sending the message import and a file name to the inlet of buffer~itispossible tostoreany

filecompatiblewithquicktime(forexample.mp3or.caf)

polybuffer~ object allows you to store several buffersinthesameobject.Thebufferscanbe


playedwithgroove~asusual.

Clickingthemessageopenadialogwillappearinvitingyoutodropafolderwithaudiofiles:


It works with any sound file quicktime can play. Here is an example on howto control which
fileisbeingplayedwithanumberobject:

capture~objectstoresthevaluesofasignalinatextfile
toseethetextfile,doubleclickthecapture~object
thecaptureonlystartswhenthesignalisroutedtothespeakers
1st argument: optional f to enable first mode, it collects the data up to a specified
number since the signal starts (default last mode so the new data replaces the old
values)
2ndargument:numberofvaluestocapture(default4100)
3rdargument:decimalprecision(default4decimals)
4th argument: a list ofupto10indiceswithinasignalvector(defaultrecordstheentire
signalvector)
sendthemessagewritetosavethedatatoatextfile
sendcleartoerasethedataintheobject
Important note: the text window that appears when we double click the object may only hold a limited
amountofdata.Inthewrittenfileyoucanseeallthedata.

To start storing, just click the ezdac~ object (speaker). This activates the audio (DSP on).
Then, when capture~ isdoubleclicked,the101firstsamplesofa440Hzcosinesignalappear
inthetextwindow:


dropfileobjectletsyoudefinearegionofthepatchertodraganddropafile/folder
sendmessagetypewiththeextensionsyouwanttoallow(defaultacceptsallfiles)
leftoutletsendsfullpathofthedroppedfile/folder
rightoutletsendsextension(typecode)
jit.cellblock object provides storage, viewing and editing of twodimensional data in a
spreadsheetsimilar format. The current cell location, format, display and contents within
jit.cellblockcanbesetwiththemouseorusingMaxmessages:
clickacelltosenditslocationanddatatotheleftoutlet
send the message select with the column number and row number to theleftinlet to
selectitandtoretriveacellsdata
abangtotheleftlinletretrievestheinformationoftheselectedcell
the outputformat when you click acell is a listwiththreevalues:columnnumber,row
numberandinformationstoredincell
clearfollowedbythecolumnnumberandtherownumberdeletesthevaluestored
to set the value of a cell, send a select message followed by three values: column
number,rownumberandvalue
to synchronize two different instances of jit.cellblock, connect the third outlet of each
withtherightinletoftheother
readonly message will prevent value changes if set to 1. If thejit.cellblock is in"inline
edit"mode,noeditingwilltakeplaceonreadonlycells
to prevent value changes on the entire spreadsheet, send the message readonly 1to
theleftinlet
jit.cellblock can serve as a visualization of coll object. As the coll's contents change, the
formatandcontentsofjit.cellblockarechangedtomatch:

1. namethecollobjectgivingitanargument
2. send the message refer followed by the name of the coll object to the left inlet of
jit.cellblock(ifyouwanttostopthevisualizationofcoll,sendderef)
3. all values in coll will be reflectedin the jit.cellblock object, also when coll ismodified
withanewvalue

freesoundsearch external (noncomercial extension object developed by Nao Tokui) allows


to search and preview an audio file from Freesound, a collaborative database of Creative
Commonslicensedsounds.Downloaditfromhere:
http://www.sonasphere.com/blog/?p=1201
Once installed, you can recall it as any other object pressing n in an empty space of your
patch:
sending login to the inlet with arguments username and password sets the
authentication
whenloginiscorrect,the3rdoutletsendsa1
sending search with argument search query terms (with quotation marks) sets the
seachtext
min_durationfollowedbyafloatsetstheminimumdurationofthesample
max_durationfollowedbyafloatsetsthemaximumdurationofthesample
thesamewithmin_bitrate,min_bitdepth,min_samplerate
messagesavailabletospecifythesearchtarget(adding0or1):
search_descriptions
search_tags
search_filenames
search_usernames
download_dir and the path (beware: you must specify a UNIX path instead of a Max
path)

"/Users/bodsiin/Experiments"good!
"SnowLeopard:/Users/bodsiin/Experiments"notgood
searchresultisavailableintheleftoutlet
whensearchisfinished,abangissenttothe4thoutlet
jit.uldlobjectuploadsanddownloadsfrominternet

jit.str.regexp perform regular expression analysis with Jitter matrices. As an application, it


canparseanHTMLpreviouslydownloadedwithjit.uldltoextractforexampleagiffile.

conversors
fromsymboltransformsasymbolintoindividualnumbersormessages.
tosymbolconvertsmessages,numbers,orliststoasinglesymbol.
sampstoms~convertstimefromsamplestomillisecondsandmstosamps~theopposite.
sprintfcombinessymbols,organizelistsofnumbers,orformatmessagesormenuitems.

regexpobjectsearchesforinthestringortextsenttoitandcanperformseveraloperations:


patcherorpobjectcreatesasubpatchthatlivesinthepatcherobject.
Toseethecontentofthepatcherdoubleclickit
The number of inlets in a patcher object is determined by the number of inlet objects
containedwithinitssubpatchwindow.
The messaging which the patcher object can handle depends upon the patch you
embedwithinit.
apple+shift+eencapsulatesselectedelementsinapatchobject.

apple+shift+ddecapsulatesselectedpatchobject.
poly~object is similar topatcherbutallowsoneormoreinstances(copies)ofapatcherto be
loaded.
Thepatcherfilenameandthenumberofinstancesarearguments.
Themaximumnumberofinstancesis1023.
Youcanhavemultipleinandoutobjectwiththesameindex.
zl is alistprocessingobject,withtheargumentdelacedeinterlievesalist.Forexample,given
the list a 6 d 6 f 9 n 3 j 6 intheleftinlet,wouldsendthelist withtheoddelementsadfnj
totheleftinletandthelistwiththeevenelements66936totherightinlet.
ftomobjectconvertsfrequencyinHztoMIDIpitchornotenumber(0127).
mtofobjectconvertsMIDInotenumbertoHz
Bothftomandmtofhavesignalequivalentsftom~andmtof~
atodbobjectconvertslinearamplitude(0.to1.)todecibels(infto0.)
dbtoaobjectsconvertsdecibelstoamplitude
iterobjectbreaksupalistintoaseriesofnumbers.
scaleobjectmapsagivenrangeofvaluesintoadifferentone.
scale 0 127 1. 1. accepts in the left inlet any number (integer) from 0 to 127 and
transformsitinafloatbetween1.and1.inalinearway
The 5th argument that scale can take is exponential base value (default 1 means
linear)
Ifall4firstargumentsareintegers,theoutputwillbeinteger,otherwisefloat
jit.rgb2luma object converts the RGB video signal that receives in the inlet tomonochrome
videosignalthatsendstotheleftoutlet.
function object transforms values from a certain range to another following a breakpoint
injectivefunction,sof(x)f(x)forallx,xthatbelongstothedomain(xaxis)
toaddanewpoint,justclick(inlockedmode)onthefunctionobjectcanvas
sending a message with a list of two values, adds the point (first value=x, second
value=y)
sendingclearmessagetotheinletweerasethefunction
sending dump message to the inlet sends all points out dump outlet (third outlet),
optionalargumentnamesreceiveobject
listdump message send all points out dump outlet as one list, optional argument
namesreceiveobject

floatintheleftinletproducesinterpolatedyforthisxatleftoutlet
bang in the left inletoutputsallbreakpointsinlineformat(initialvaluefollowedbyalist
ofdeltatimevaluepairs)inthesecondoutlet
banginthe4thoutletisreceivedwhenfunctionischangedbymouseaction

notein object converts received MIDI notes (for example played with a MIDI keyboard) to
numbers where the pitch or frequency of the note (range 0127) is sent to thefirstoutlet,the
velocity which is more or less the volume of the note (range 0127) is sent to the second
outletandtheMIDIchannelissenttothethirdoutlet.

operators
arithmetic

Youcanfliptheorderoftheoperationwiththecharacter!


sumlistisaJaschexternalthatcalculatesthesumofalist.

Note:downloadJaschexternalsfromhttp://www.jasch.ch/dl/

exprobjectevaluatesanexpressioninvolvingthefirst(upto)nineinlets.
Inlets can receive variables or constants: integers($i1$i9),floats ($f1$f9)orsymbols
($s1$s9)
Theoperatorsare+,,*,/,&,|,&&,||,!,~,and^

vexprobjectbehaveslikeexprbutwecanoperatewithlistsalso:

when scalarmode 1 issent to vexpr, input of length 1 is applied to each elementoftheother


lists:

logic
Evaluatingiftwonumbersareequal:

Thesameisvalidfornotequal,greater,greaterorequalandsoon...

LogicalANDOR:

statistics
meanfindstherunningaverageofastreamofincomingnumbers.

streaminputcanbenumbersorfloats
whenalistisreceived,pastnumbersareclearedandgivesaverageoflist
averagefloatisreceivedinleftoutlet
right outlet keeps track of the number of elements considered in the average
computation

audiosignals
cycle~objectisanoscillatorwhichitsdefaultwaveformisonecycleofacosinewave.
Frequencyissetinitiallybytheargumentandcanbemodifiedbytheleftinlet.
Phasecanbecontrolledviatherightinlet.

noise~ generates a signal consisting of uniformly distributed random whitenoise values


between1and1
sig~objectconvertsafloatorinttoasignal.(Italsoacceptsasignalin,whichitignores)

snapshot~convertssignalvaluestonumbers

signalgoesontheleftinlet
atriggerontheleftinletsendstheconvertedvaluetotheoutlet
ontherightinletispossibletosetupasamplingintervalinms
when sampling time is set, turn clock on/off sending start or 1 to left inlet (by default,
theclockwillbeonifanonzerointervalissuppliedontherightinlet)

biquad~ implementsa twopole, twozero filter specified by 4 coefficientsa0,a1,a2,b1, and


b2assignalsorfloatsfollowingtheequation:
y(n)=a0*x(n)+a1*x(n1)+a2*x(n2)b1*y(n1)b2*y(n2)
wherey(n)istheresultingsignalandx(n)theincomingsignalatsamplen.
Thecoefficientsarereceivedonthe2nd5thinlet
If the filter explodes by making the b coefficients too high, you can recover (after
lowering them) sending the clear message to the left inlet or by turning the audio on
andoff)


Experiment with different inputs and values of the different coefficients, that accept also
streamvaluesasintheexampleaboveasinusoidalwaveof25Hzascoefficienta0.
groove~objectisavariablerate, looping,sampleplaybackobjectwhichreferencestheaudio
informationstoredinabuffer~objecthavingthesamename.

leftinletsetsspeedplaybackin,fornormalspeedsendtheobjectsig~1.
themidinletsetsminlooppointinms
therightinletsetsmaxlooppointinms
sendingloop1totheleftinletweactivatetheloop
sendstartlooptotriggerit

waveform~objectcanbeusedtoviewandeditthecontentofabuffer~object.


Wecancreateasimplepatchtovisualizeanaudiofile:

play~ object plays an audio file and receiveswhichsampletimetoplayinms,this iswhyit is


typicallyusedwithline~


sfplay~ object plays audio files (aiff, au, wav and raw of 132 tracks). Is possible to send
messagestotheleftinlettocontrolthewayitworks:

openmessageopensanaudiofilefromharddisk
sending1playscurrentfilefrombeginningtoend
2playscue2ifdefinedandsoon...
0stopsplaying
to define a cue,sendthemessagepreload, thenumberofcue,thestartingpointinms
andtheendingpointinms(optional)
thefirstoutletischannel1,thesecondchannel2andsoon...
thelastoutletisreservedtosendbangs,forexamplewhentheplaybackended
sendingafloattotherightinletsetstheplaybackspeed
the message seek and two values to the left inlet plays current file from one value to
another(valuesareunderstoodinms)
ifseekissendonlywithonevalue,itplaysfromthatvalueuntiltheendofthefile

Argumentsofsfplay~

(optionalsflist~name)
channels
diskbuffersize(0=default)
#ofpositionoutlets(outputpositioninmilliseconds)
(optionalnameforsfplay~)

In this example, we cut all the slices of a sound file that are above 25dB, withthe preload
messagewestoretheminsfplay~andplaythembackrandomly.

In collobjectwestorethedataofthedifferentcues,withanindex,startingpointandendpoint

bothinms:

In this other example key and scale objects are used to control the playback speed of the
audiofile:


avg~reportstheaverageamplitudeoftheinputsignalreceivedwhensentabang

info~ object reports information about a sample named astheargumentvia8outletswhena


bangisreceivedininlet


sfinfo~ object reports also audio file information, here itis used to retrieve the length of the
audiofileanduseittosetadelay:


dspstate~objectreportsthecurrentDSPsettingswhenabangisreceivedinitsinlet:


mute~ provides an easy way to disable the signal objects in a subpatcher (encapsulated
patch p) by connecting its outlet to the inlet of the patcher and sending a boolean 1 to the
inlet:

Thisisanexampleofanecho:


pass~ object eliminates noise in a muted subpatcher and should be placed before theoutlet
asshowninthesubpatcherabove.
peek~ object writes sample values received as a list in the inlet. 44100 sample values are
neededtohave1secondbufferatnormalspeedatsamplingrate44.100KHz

signaloperation
filtergraph~objectisagraphicalfiltereditor
*~objectmultipliestwosignalsinthetimedomain(convoluteinfrequencydomain)


tapin~andtapout~objectsmakeadelay,theargumentisthedelaytimeinms

line~generatesasignalramporanenvelope:
int/floatreceivedinleftinletsetsvalueimmediately
optionalargumentsetsinitialvalue(default0)
ramp: initial value plus comma plusa list with pairs of destination values and timesin
ms


lores~objectisaresonantlowpassfilter

firstinletreceivestheaudiosignal
secondinletreceivesthelowpasscutofffrequency
thirdinletreceivestheresonance(signalorfloat)
firstargument:initiallowpasscutofffrequency(default0.)
secondargument:initialresonance(range0.1.default0~.)


comb~objectisanaudiofilteraccordingtotheformula:
y(n)=a*x(n)+b*x(n(DR/1000))+c*y(n(DR/1000))
where x(n) is theoriginalsignalandy(n)isthecombedsignal,wecansetuptheobjectwith5
arguments:

1st:maxdelaytimeinms(default10)
2nd:initialdelaytime(controlledby2ndinlet)
3rd:acoefficient(gaincontrolledby3rdinlet)
4th:bcoefficient(feedforwardcontrolledby4thinlet)
5th:ccoefficient(feedbackcontrolledby5thinlet)
signalinputgoestothe1stinlet

Asanexercise,trytobuildapatchsimilartotheonewepresentedwithbiquad~

signalvisualization
scope~objectmonitorsvisualprogressionofasignalwaveform:
thesignalgoesintotheleftinput
a number in left inlet changes calccount (buffers per display pixel range 28092,
default128)
anumberinrightinletchangessamplesperbuffer(range8256,default128)
a message to theleftinlet with range followed by two numbers, changesthe minand
maxdisplayedyvalue(default1to1)
a message to theleftinlet with delay followed by a number sets delay between each
traceofoscilloscope,inmilliseconds(default0)
To changethecolorsofthescope,sendmessagesto theleftinletwithbgcolor,bordercoloror
fgcolorfollowedby4floats(R,G,Bandalpha):
bgcolor=Backgroundcolor(abovethecurve)
bordercolor=Bordercolor
fgcolor=Phosphorcolor
The triggermodecanbesetsendingamessage totheleftinletwithtriggerandanumberthat
canbe:
0notriggermode
1uptriggermode
2downtriggermode
XYmodeisavailablewhenbothleftandrightinletreceiveasignalpatchcord.
meter~object is a simple signal level meter thatcanbeattachedtoanysignalwhoselevelis
between1and1
Signalswithgreaterlevelsshouldbescaledfirst
meter~outputsgraphicallythepeaksignalvaluereceivedeveryredrawinginterval
Each "LED" on the meter represents by default a change of 3dB from the previous
step
The red "over" LED comes on if the signal is greater than or equal to 1 and lasts for
aboutasecond
You can change the redrawing interval sending interval to the inlet followed by the
redrawingintervalinms
Resizing the meter gives itsverticalorhorizontalorientation,dependingonwhetherits
heightisgreaterthanitswidthorviceversa
Additional appearance settings, such as number of LEDs, and their colors can be set

usingtheobject'sInspector
levelmeter~objectshowstheRMSleveloftheincomingsignal,itoutputsthevolumeindB:

minmax~ computes the minimum and the maximum value of a signal. It is useful to check
thatthesignalsweareworkingwithdonthavetoomuch(ortooless)gain.
2firstoutletsoutputsignalvaluesforminandmax
outlets3and4outputfloatvalues

number~objecthastwodifferentmodes:
Signal Monitor Mode (indicated by a blue tilde) displays the value of the signal
receivedintheleftinlet
Signal Output Mode (indicated by a blue downward arrow) displays the valueof the
floatorintegermostrecentlyreceivedintheleftinlet
In the Signal Output Mode, you can type directly into the number~ box to store it and
thesignalissentouttheleftoutlet.
In Signal Output Mode ispossible to set a ramp time sending a float to therightinlet.
Then the signal sentgoes from the numberstored tothereceivednumberintheramp

timespecified.

spectroscope~ object provides the visual spectogramor sonogram for signal analysis. The
displaymodecanbespectogramorsonogramandcanbesetupfromtheinspector.
Inthespectogrammodeshowspeaksofamplitudeatcertainfrequencies:
xaxisrepresentsfrequencyandcanbeshowninalinearorlogarithmicscale
yaxisrepresentsamplitudeandcanbeshowninalinearorlogarithmicscale
This default orientation canbe changedsendingthemessageorientation1totheinlet, sothe
frequencywouldberepresentedintheyaxis.
Inthesonogrammodeshowsfrequencyvs.timewithamplitudedisplayedascolor:
The drawing style of the fonogram can be controled sending the following messages to the
inlet:

scroll0forwarddrawmode
scroll1reversedrawmode
scroll2forwardscrollmode
scroll3reversescrollmode

To change thecolorsofthesonogram,sendmessagestotheleftinletfollowedby4floats(R,
G,Bandalpha):

bordercolor=Bordercolor
curvecolor=Curvecolor
markercolor=Markercolor
peakcolor=Peakcolor
peakcurvecolor=Peakcurvecolor
sonolocolor=Sonogramcolor(low)
sonomedlocolor=Sonogramcolor(mediumlow)

sonomedcolor=Sonogramcolor(medium)
sonomdehicolor=Sonogramcolor(mediumhi)
sonohicolor=Sonogramcolor(high)
Herearethebasicwaystovisualizeawave:

videosignals(jitterobjects)
jit.qt.movieobjectplayandeditaquicktimemovie

readmessageallowstoplayafilewechoosefromtheharddisk
stopmessagestopsthemovie
sendingabangoutputsaframeofthemovie
tocontrolthevolumeoftheaudio,sendvolmessagewithafloatbetween0.and1.

Once a movie file is opened, you can hear the audio, that is being played externally by
Quicktime.
imovie object playsa QuickTimemoviein apatcherwindow.Withan unlockedpatcher,drag
and drop a moviefile from the FileBrowseror use the imove object's Inspector toread in or

changethemoviefile.Thenameofthelastfileusedissavedinthepatcher.
playbar object is a QuickTime movie controller. Justconnect it to a imovie object and ryto
play,pauseavideo:

spigot~objectletsyouusetheaudioofamovieinternallyinMSP.
spigot~objectalwaysneedsitsownnamesetbythenameargument
spigot~ object work~s with a sound file, exported and cached from a movie loaded in
thejit.qt.movieobject
thisaudiofileisplayedinsyncwiththemovie
to activate it,sendthemessagesocfollowedbythenameofspigotsobjecttotheinlet
ofjit.qt.movie
sendthemessagesocalonetodetachfromspigot~
thetwooutletscarrythe2audiochannelsofthemovie
jit.pwindowobjectallowstopreviewamovieinaresizablescreeninsidethepatch
jit.windowobjectcreatesinMaxanexternalwindowtothepatchtoseetheincomingmovie


jit.qt.grab objectfromJitterthatdigitizesvideofromanexternalsource,forexampleafirewall
videocameraorawebcam:


jit.rotaobjectscalesandrotatesavideosignal


jit.rgb2lumaobjectconvertsaRGBcolorvideointograyscale
jit.change is an objectparticularly useful forreducing the density of dataflow and for motion
tracking applications. Only pass the next frame if the difference of thecurrentmatrixwiththe
upcomingmatrixislessthanacertainthreshold(computedpercell,notperplane).
jit.op @op absdiff computes the difference between the video matrices received in inlet 2
andinlet1


jit.iterobjectreturnscoordinates(2ndoutlet)andvalues(1stoutlet)ofagivenmatrix
jit.3m object reports the minimum, mean, and maximum pixel values for each plane (Alpha,

R,G,B)ofagiveninputmatrixaslistsofsizeplanecount,onevalueforeachplane.
thelistofminimumvaluesaresentouttheleftoutletoftheobject
thelistofmeanvaluesaresentoutthemiddleoutlet
thelistofmaximumvaluesissentouttherightoutlet
jit.vcr records a video/audio signal, inlets 1 and2aretoreceivetheaudioandthe3rdinletis
toreceivethevideosignal.
write message to the first inletshows upadialogtosavetheresultantfileinyourhard
disk
stopmessagetothefirstinletstopstherecording
jit.matrixsetobjectkeepsasetofinternalmatriceswhichmaybewritten toorreadfrom.This
isusefulfordatastorageand/ormatrixresequencing.
arguments: number of matrices stored, planes (4 for RGBA), type (default char),
dimensions(listinpixelse.g.1024768)
to store the matrix anindexisused,sendamessagewithindexandanumbertostore
inthatindexthenextframe(datainmatrices)
indexmustbeintherangesetbythefirstargument
jit.matrixallowstostorageandretrievevideoframesstoresinmatrices.
jit.hsltorgb
jit.rgbtohsl
jit.slideupanddown

todolist
z.parseConfig in storage, z.grid and z.mousegrid in generators, speedlim,split, aka.speech,
pictslider,forward
practicalstartingguidetomax/msp/jitter
forewordandmethodologicalapproach
programmingandmusic,why?
howarealtimegraphicalprogrammingenvironmentlookslike?
firststepsinMaxandshortcuts
Shortcuts
newdocument
lock/unlockmode
objects

draganddropfromthefilebrowser
messages
inspectorandattributes
lists
patchcords
MaxworksatcontrolrateandMSPataudiorate
Max/MSPobjects
messengers
generators
storage
conversors
operators
Arithmetic
logic
audiosignals
signaloperation
signalvisualization
videosignals(jitterobjects)
todolist

Das könnte Ihnen auch gefallen