(maxmsp) basic synth controls

Uploaded example patchers: BasicSynthNumbers.maxpat and BasicSynthEnvelopes.maxpat

Both of the example patchers show how to control frequency to an oscillator using a float number box into a line object. The two patchers also show how to create a simple ADSR amplitude envelope control.

The “numbers” patcher uses number boxes to specify segment length in ms, and amplitude targets in floats. All the numbers are fed to a pak object with the final target amplitude of 0. specified. Pak is like pack, but it outputs the list whenever any list value changes. The list is output to a message box (right inlet, sets without outputting), then a bang message can trigger the note playback.

The “envelopes” patcher uses a function object to create the amplitude envelope. The function object is a graphic break-point function editor. You click to add break points; shift-click on a break point to remove it. The default y range is 0.0 to 1.0 (ideal for amplitude). The default x range, or domain, is 1000. You can change the domain with the domain message. Sending a bang message to the function object sends out all points in target-time format out the 2nd outlet. Connect that to a line object and you have amplitude control.

The preset object can store the contents of user interface objects, which includes number boxes, sliders, umenus, and function editors. It is recommended that you specify either explicitly the objects you want to include in the preset, or explicitly specify the objects you want to exclude. I favor the former for small patchers. Either way, you want to exclude the number boxes you use for storing and recalling presets. If you add any interface object after storing a preset you will need to re-save presets with the new object included (if you desire that). Recall the preset you want, set the additional user interface object the way you want, and the re-save the prest at the same location.


Comments

Leave a Reply