Max
Dynamic view of bpatcher
The bptatcher object allows you to show a view of a portion of a subpatch inside the main patch.
You can change the visible portion of the bpatcher with an offset message to a thispatcher object in the bpatcher's subpatch, and you can change the size of your bpatcher with a script size message to a thispatcher object in the parent patch.
Dial Min/Max Demo
Detect the end of a phasor~ cycle
This example demonstrates how to detect the end/beginning of a phasor~ cycle.
Controlling sfplay~ speed with line~
You can use the line~ object to supply a changing speed value to the right inlet of the sfplay~ object. The second outlet of the function object sends out a list message intended to describe the function to a line~ object.
Append data to coll
A reasonable way to append an item in the coll object is to keep track of the last or highest index. This can be done using a counter object or an i (int) object just above coll. Then increment the counter or i by one each time you add a new item to the coll object.
Slideshow folders in Jitter
To switch between folders of a slideshow in jitter (explained here) you can set the prefix or folder (i.e. the file path) of the umenu object with the prefix message, then clear and populate it.
Smooth Output of Peakamp~
The peakamp~ object can be used to take the amplitude of one signal and have it control the amplitude of another. Peakamp~ takes a low-frequency sample of the peak amplitude of the signal, which is then smoothed by the line~ object. This gives an intuitively much more accurate representation of the audio signal one is envelope-following than does smoothing the audio signal itself, which tends to smooth out — and thus lose — all the more interesting characteristics of the signal. Here’s an example that lets you compare.
Sigmoid vs Sinusoid acceleration control
You can calculate the desired acceleration/deceleration curve using expr. The smoothest acceleration/deceleration is exhibited by simple harmonic motion (like the swinging of a pendulum), which would be a sinusoidal curve rather than a sigmoid curve (and a sigmoid is theoretically asymptotic, i.e. never truly reaches its goal). You can calculate either with expr. Here’s an example comparing the two.
Change color of selected messages
Utilizing the message box’s bgcolor attribute, it's possible to change a message’s color in when it is selected, so as to indicate which message is currently selected.