pptempo

Define plug-in tempo and sync parameters

Description

Note: plug-in building for hosts other than Ableton Live is no longer supported. For more information to help you make the transition to creating plug-ins in Max for Live, see Max for Live for Pluggo Developers.

The pptempo object manages plug-in tempo and synchronization paramater values.

Arguments

Name Type Opt Description
tempo-parameter-index int Obligatory. A number greater than or equal to 1 sets the parameter index of the tempo parameter.
sync-parameter-index int Obligatory. A number greater than or equal to 1 sets the parameter index of the sync mode parameter.
'hidden' symbol opt If the word hidden appears as an argument, the parameter will not be given an egg slider in the plug-in edit window and will not appear in the pop-up menu generated by the plugmod object.
'fixed' symbol opt If the word fixed appears as an argument, the parameter will not be affected by the Randomize and Evolve commands in the parameter pop-up menu available in the plug-in edit window when the user holds down the command key and clicks in the interface.
'c2-c5' symbol opt If c2, c3, c4, or c5 appears as an argument, the color of the egg slider is set to something other than the usual purple. Currently c2 is Wild Cherry, c3 is Turquoise, c4 is Harvest Gold, and c5 is Peaceful Orange.
tempo-parameter-name symbol opt The next symbol after any of the optional keywords names the tempo parameter. This name appears in the Name column of the Parameters view and in the pop-up menu generated by the plugmod object. The name of the sync mode parameter will be the name of the tempo parameter followed by the word mode. The default parameter name is ParamN, where N is the index assigned to the tempo parameter by the first argument to pptempo.
minimum-value float or int opt After the parameter name, a number sets the minimum value of the parameter. The minimum and maximum values determine the range of values that are sent into and out of the pptempo object's left inlet and outlet, as well as the displayed value in the Parameters view of the plug-in edit window. The type of the minimum value determines the type of the parameter values the object accepts and outputs. If the minimum value is an integer, the parameters will be interpreted and output as integers. If the minimum value is a float, the parameters will be interpreted and output as floats.
maximum-value float or int opt After the minimum value, a number sets the maximum value of the parameter. The minimum and maximum values determine the range of values that are sent into and out of the pptempo object's left inlet and outlet, as well as the displayed value in the Parameters view of the plug-in edit window.

Messages

bang Sends the current value of the mode parameter (0 to 3) out the object's right outlet and then sends the current value of the tempo parameter out the object's left outlet.
int Converted to float.
float In left inlet: Sets the current value of the tempo parameter and then sends the new value out left outlet. The incoming number is constrained between the minimum and maximum values of the object.

In right inlet: Sets the current value of the mode parameter and then sends the new value out the right outlet. The number is constrained between 0 and 3. Mode values are as follows:

0 - Free Mode. If there is an egg slider display associated with this parameter, it is disabled. It's assumed that another parameter will set the "tempo" in units of milliseconds or Hertz. 1 - Host Mode. If there is an egg slider display associated with this parameter, it is enabled but the user cannot change it. Instead the tempo is set by the host and merely displayed by the slider. The patch should enable synchronizing to the host in some way (probably by using the plugsync~ or plugphasor~ objects). 2 - PluggoSync Mode. This mode functions similarly to Host mode in that the egg slider is enabled but cannot be changed by the user. Instead the tempo is set by the host and merely displayed by the slider. The patch should enable synchronizing to PluggoSync in some way. 3 - User-Defined Tempo (UDT) Mode. In this mode, there is no synchronization and the user can change the tempo slider to any desired value. The patch should use this value to calculate some sort of time-based behavior.
rawfloat tempo/sync-mode [float]
In left inlet: The word rawfloat, followed by a number between 0 and 1, sets the tempo to a value scaled between the minimum and maximum values scaled by the number. For example, if the minimum tempo were 100 and the maximum were 200, the message rawfloat 0.5 would set the tempo to 150.

In right inlet: The word rawfloat, followed by a number between 0 and 1, sets the sync mode parameter to a value based on multiplying the number by 3 and truncating. Numbers below 0.33 set the sync mode to 0 (Free), numbers between 0.33 and 0.66 set it to Host, numbers at or above 0.67 and less than 1 set it to PluggoSync, and numbers equal to 1 set it to User- Defined Tempo.
text text-content [symbol]
Sets the description-text-field for the parameter.
set sync-mode [list]
In right inlet: The word set, followed by a number, sets the sync mode parameter to the number but does not output the sync mode and the tempo.
rawlist tempo/sync-mode [list]
The word rawlist, followed by two numbers, is equivalent to sending the rawfloat message with the first number to the left inlet and the rawfloat message with the second number to the right inlet.

Information for box attributes common to all objects

Inspector

Object-Settings: Choosing "Get Info..." from the Object menu opens an Inspector for editing a description of the parameter that is displayed in the Parameters view of the plug-in edit window when the user moves the cursor over the egg slider corresponding to the parameter.
A parameter description can be assigned to a pptempo object and can be edited using its Inspector. If you have enabled the floating inspector by choosing Show Floating Inspector from the Windows menu, selecting any pptempo object displays the pptempo Inspector in the floating window. Selecting an object and choosing Get Info... from the Object menu also displays the Inspector. Typing in the "Describe Parameter" text area specifies the parameter description. The Revert button undoes all changes you've made to an object's settings since you opened the Inspector. You can also revert to the state of an object before you opened the Inspector window by choosing Undo Inspector Changes from the Edit menu while the Inspector is open.

Output

float or int: Out left outlet: The scaled value of the tempo parameter is output when it is changed within the runtime environment or when a bang, int, float, or rawfloat message is received in the object's inlets. The parameter value can be changed in the runtime environment in the following ways: the user moves an egg slider, the parameter is being automated by the host mixer, or the user has selected a new effect program for the plug-in within the host mixer.

Out right outlet: The value of the sync mode parameter, between 0 and 3, when the parameter is changed within the runtime environment, an int, float, or rawfloat message is received in the object's right inlet, or a bang message is received in the object's inlets. The modes are described above in the Input section.

Examples

pptempo provides tempo and synchronization information to pptime

See Also

Name Description
plugconfig Configure the behavior of a plug-in
plugmidiin Receive MIDI events from a plug-in host
plugmidiout Send MIDI messages to a plug-in host
plugmod Modify plug-in parameter values in other plug-ins
plugmorph Generate parameter values created by morphing between other presets
plugmultiparam Define an array of plug-in parameters
plugstore Store multiple plug-in parameter values
pp Define a plug-in parameter
pptime Define time-based plug-in parameter
plugin~ Define a Max for Live device's audio inputs
plugout~ Define a plug-in's audio outputs