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 pattrstorage object.
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 incremental integers as many times as presets you need
6. To see what is stored, send the message storagewindow to the left inlet of pattrstorage
7. To recall the presets, send an integer to the left inlet of pattrstorage
autopattr object finds all objects in the patch with scripting name and pattrstorage access to the values of these named objects in order to store their current value for later use. If you want to recall a preset continously, connect a float object to the inlet of pattrstorage.
When you save a patch with a pattrstorage object in it, after saving the patch you will se a dialog to save an xml file, which store the data of pattrstorage.
preset object stores and recall the settings of other objects, when you mouse over the buttons, you will see the number (default 24 presets)
● click on a circle to recall
● shift + click on a circle to store
● 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 experiment with the attribute Sliders Output Values.
umenu object can be used to display text associated to incoming numbers that start at 0
coll (collection) behaves as a table in the sense that stores values at indexes, but both values and indexes can be anything e.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 index and the second is the value e.g. 3 23 4 56 stores the list 23 4 56 on the index 3.
To recall the data, send the index to the inlet.
When sending the following messages to the inlet:
● clear erases everything
● remove 1 deletes the thing associated with the index 1
● delete 1 as remove but decrementing higher indices
● write writes to a file
● read reads from a file (optional filename argument specifies file in Max's search path) If you want to save coll data in the patch, don’t give it a name.
qlist is a container that holds a table of events. Each event can start with a symbol (name) in which case, it will be sent not only to the left outlet but to the receive with the same name. To see the content of qlist, like coll double click the object to see or edit the contents. This is an example, each row represents an event:
Each row represents an event. The events that start with a name, like variable1 can be received in a r object:
buffer~ object stores audio samples
● first argument names the sample to use by other objects
● send read message to inlet to open a sound file
● filename optional second argument specifies file to read in Max’s search path
● buffer-duration optional argument in ms
● to see the wave stored on the buffer~ object, double click it
● when clicking or dragging over a sample, left outlet reports the mouse position in milliseconds
In this example, it is shown how can we load different samples and create an interface to play each of them separately:
Sending the message import and a file name to the inlet of buffer~ it is possible to store any file compatible with quicktime (for example .mp3 or .caf)
polybuffer~ object allows you to store several buffers in the same object. The buffers can be played with groove~ as usual.
Clicking the message open a dialog will appear inviting you to drop a folder with audio files:
It works with any sound file quicktime can play. Here is an example on how to control which file is being played with a number object:
capture~ object stores the values of a signal in a text file
● to see the text file, double click the capture~ object
● the capture only starts when the signal is routed to the speakers
● 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)
● 2nd argument: number of values to capture (default 4100)
● 3rd argument: decimal precision (default 4 decimals)
● 4th argument: a list of up to 10 indices within a signal vector (default records the entire signal vector)
● send the message write to save the data to a text file
● send clear to erase the data in the object
Important note: the text window that appears when we double click the object may only hold a limited amount of data. In the written file you can see all the data.
To start storing, just click the ezdac~ object (speaker). This activates the audio (DSP on). Then, when capture~ is double clicked, the 101 first samples of a 440Hz cosine signal appear in the text window:
dropfile object lets you define a region of the patcher to drag and drop a file/folder
● send message type with the extensions you want to allow (default accepts all files)
● left outlet sends full path of the dropped file/folder
● right outlet sends extension (type code)
jit.cellblock object provides storage, viewing and editing of two-dimensional data in a spreadsheet-similar format. The current cell location, format, display and contents within jit.cellblock can be set with the mouse or using Max messages:
● click a cell to send its location and data to the left outlet
● send the message select with the column number and row number to the left inlet to select it and to retrive a cell’s data
● a bang to the left linlet retrieves the information of the selected cell
● the output format when you click a cell is a list with three values: column number, row number and information stored in cell
● clear followed by the column number and the row number deletes the value stored
● to set the value of a cell, send a select message followed by three values: column number, row number and value
● to synchronize two different instances of jit.cellblock, connect the third outlet of each with the right inlet of the other
● readonly message will prevent value changes if set to 1. If the jit.cellblock is in "inline edit" mode, no editing will take place on readonly cells
● to prevent value changes on the entire spreadsheet, send the message readonly 1 to the left inlet
jit.cellblock can serve as a visualization of coll object. As the coll's contents change, the format and contents of jit.cellblock are changed to match: