Cycling '74 Max Tutorial
Mar 1, 2009 12:00 PM, By Jeffrey Stolet
HOW TO GET STARTED WITH CYCLING '74 MAX GRAPHICAL PROGRAMMING SOFTWARE
advertisement
|
CURRENT NEWSSTAND ISSUERead the full Table of Contents for the issue on sale now! Click here Subscribe for only $1.84 an issue! Please tell us about yourself so we can better serve you. Click here to take our user survey. |
| |
![]() |
Life in the Fast Lane This collection of St.CroixÕs columns was assembled during the two years following his death of cancer in May 2006. Included are many of his most-read columns, as well as personal notes, drawings and photographs. Click for more books |
![]() Listen to these latest podcasts and more: |
|
eDeals Newsletter for Discounts on GearGet First Dibs on Hot Gear Discounts, Manufacturer Close-Outs and Job Opportunities when you sign up to receive eDeals E-newsletter, sent twice a month. Check out an issue get advertising info or subscribe |
|
Getting Ticked
FIG. 2: The same patch as in Fig. 1, but with tempo control added.
Max can control the tempo of the seq Object in real time by sending it “tick” messages at varying rates. To use this method, create a message box Object with the word tick in it and place it between the metro and seq Objects. Next, connect the outlet of the metro Object to the inlet of the message box (with the tick message), and connect the outlet of the message box to the inlet of the seq Object. By sending the seq Object tick messages rapidly, you play the sequence rapidly; by sending tick messages more slowly, you play the sequence more slowly.
To make the seq Object respond to tick messages, you must first send it the “start -1” message before you begin playing back the sequence. To deliver the start -1 message automatically each time you start a sequence playing, create a message box Object that contains the message start -1, position it to the right of the read message box, and connect it to the seq Object. Directly above the start -1 message box, place a new select Object and put in the Argument 1. Connect the left outlet of the select Object to the left inlet of the start -1 message box, and connect the toggle Object to the left inlet of the select Object. Every time the toggle Object is turned on, it outputs a 1; that 1 is sent to the select Object, which responds by sending out a Bang to the start -1 message box, which sends out the message “start -1” to the seq Object. Concurrently, the 1 from the toggle Object is sent to the metro Object so that it will start Banging out tick messages at the rate of one every 20.83 ms.
Finally, you'll want to add real-time tempo control to your seq Object. Hitting the F key is a shortcut for creating a floating-point number box. Hit F to create a number box that you will use to control the tempo. Position the number box above the metro Object and to the right of the toggle Object. Then connect the outlet of the number box to the right inlet of the metro Object. You can now change the playback rate of the seq Object by scrolling with your mouse in this number box. The value 20.83 will yield the sequence at its normal rate, 10.415 will cause the playback to be twice as fast, and 41.66 will cause it to be half as fast.
Your patch should look like Fig. 2. Save your work.
Once Is Not Enough
In its current state, your patch allows you to read SMFs into a seq Object, to start and stop playback of this seq Object by pressing Q on the computer keyboard (the Q key results in the output of 113 from the key Object), and to control the tempo with your mouse. The final step is to create two more copies of the sequencer mechanism and connect these copies to two of the outlets of the select Object.
FIG. 3: Here’s a completed Max patch that plays back three Standard MIDI Files under control of a computer keyboard, with tempo control for all three seq Objects.
Start by selecting all the Objects from toggle down through midiout by clicking-and-dragging your mouse across the area where those Objects are positioned. Next, choose the Duplicate command under the Edit menu. The resulting copy will already be selected, so drag it carefully to the right so that it does not overlap the original. Now connect the left-center outlet of the upper select Object to the toggle Object of this copied sequencer.
Make another copy in the same manner and connect this copy to the right-center outlet of the upper select Object. If you want, you can now change the Argument of each seq Object so that each one loads a different sequencer file. Your completed patch should look something like Fig. 3.
To operate your Max patch, you must first lock it. You can lock a Patcher window by Command-clicking in the open area of that window or by clicking on the Lock button in the lower left-hand corner of the window.
Sampling in Max
A good way to begin a discussion about audio in Max is by looking at the software's sampling capabilities. Using a variety of Objects, audio files can be played back from RAM or from disk. One such Object is sfplay~ (sound file play).
Want to use this article? Click here for options!
© 2009 Penton Media, Inc.
Acceptable Use Policy blog comments powered by Disqus












