(maxmsp) the transport and musical time, part 1

Download the demo patcher, MusicalTime1-day06.maxpat.

New Objects and Messages

The transport object. The transport object is an object that allows for time to be represented musically in bars:beats:ticks. You can control the transport window (Extras | GlobalTransport) and control the transport with start, stop, and rewind buttons, and set the tempo. You can also use a transport object in your patcher and communicate with it directly. Changes to the transport object show up in the GlobalTransport window.

The umenu object. The umenu object creates a drop down menu box. Choosing a selection causes the index location of the selection to be sent out the left outlet (an integer), and the actual text of the selection is sent out the middle outlet. You populate the umenu by editing the the menu items attribute in the umenu inspector. Separate menu items with a comma.

The message object with a changeable argument. The message object usually sends a fixed message, either by clicking on the message object, or by triggering it with another message. The $1 argument ($number) takes an incoming message (the number indicates which item in a list) and replaces the $, outputting the message with the other text in the message box.

Attributes. The “at sign,” @, used typed in the manner of an argument in an object box sets an attribute for the object. Attributes are often set in the object’s Inspector panel, but they can also be set directly in the object.

The Basic Metro

The first part of the patcher is a copy of our basic metro usage triggering a note number to makenote. You will probably have to enter in a number larger than zero to hear the output well. Time is expressed in milliseconds for both metro and makenote, with an integer object allowing for the initial time arguments to be changed.

The Transport

The second part of the patcher introduces the transport object. If you open the GlobalTransport window you can see that your actions on the transport object are reflected in the GlobalTransport window. The toggle object starts and stops the transport in the same manner that it does with a metro. (specifically, any non-zero number starts the transport; zero stops it.)

If you send a bang message to the transport, it will output its current state. The demo shows the output of bars, beats and ticks in the three integer boxes. The transport does not automatically, or continuously report its location or any other state. You have to trigger that output with a bang message.

If you send a number to the right-most inlet of transport, you set the transport location in ticks. The demo uses a 0. to rewind the transport to 0 | 0 | 0 (tick 0).

The message “tempo” followed by a number sets the transport’s tempo. You can see the integer sending the number to the message box that contains “tempo $1.” The message to the right is just there to show you the output of the tempo $1 message. Sending a message to the right inlet of a message object changes the message without outputting anything. It’s being used as a display source in this part of the patcher.

Musical Time

When you are using a transport in your patcher it opens up the possibilities of expressing time in formats other than milliseconds. The MaxMSP reference pages list all the possible time formats. Most of our usage will focus on the musical time format. Musical time expresses durations in note values, such as 4n equalling a quarter note. Any object that makes use of time arguments or messages, such as metro and makenote in our patcher, can accept a musical time value message/argument.

This part of the patcher is also using the bang out of metro to have the transport regularly report its current location.

Running the Metro in Synch with the Transport

This last part of the patcher dispenses with the toggle to start the metro, setting the metro to start and stop with the transport. The synchronization is achieved by the use of attribute settings to the metro object.

To make this part of the patcher work as expected, rewind the transport by clicking on the 0.

The metro object has a duration argument set in musical time (4n), which is followed by an attribute setting. The @active attribute is set to true (1), which means that the metro will start when the transport is started. (This is a change from in class. The @autostart attribute expects an @autostarttime attribute. The @active attribute just tells metro to start and stop with the transport.)

The final addition is a umenu object to send changes in musical time durations to the metro and makenote objects.


Comments

One response to “(maxmsp) the transport and musical time, part 1”

  1. […] reading here: TeachingMusic » (maxmsp) the transport and musical time, part 1 Comments […]

Leave a Reply