pptime

Define time-based plug-in parameter

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.

pptime has three required arguments plus numerous optional ones. The three required arguments are the parameter indices for the ms/Hz value, the multiplier value, and the unit index. Following these are the same optional keywords as for pp: hidden, fixed, and c2- c5. Following these are the parameter name, the minimum and maximum ms/Hz values (default 0 and 1), and either Hz or ms to specify the Free and User-Defined Tempo output mode and label (default ms). Finally, you can specify the minimum and maximum unit multiplier values (default 0 and 1). In Free mode, pptime works like pp for the ms/Hz parameter using the leftmost inlet and outlet. In Host sync mode, the eggslider display changes to a smaller slider plus a unit-value pop-up menu. When a change to either the slider or menu is made, the beat value output (rightmost) produces a value you can feed to a rate~ object. Pluggo Sync mode works like Host Sync mode. The User-Defined Tempo mode expects a tempo value to be fed to pptime via the tempo message (you can use pptempo for this). pptime then calculates the ms/Hz value based on the current tempo, unit multiplier, and unit value and outputs the value out the leftmost outlet.

The pptime object takes three required arguments plus numerous optional ones. They are listed in the order that they need to appear in the "Arguments" section.

Arguments

Name Type Opt Description
ms/Hz-indices multiplier and unit-index float Obligatory. The three required float arguments are the parameter indices for the ms/Hz value, the multiplier value, and the unit-index.
'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. This is appropriate for gain parameters, where randomization usually produces irritating results.
'c2-c4' symbol opt If c2, c3, or c4 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, and c4 is Harvest Gold.
parameter-name symbol opt The next symbol after any of the optional keywords names the parameter. This name appears in the Name column of the Parameters view and in the pop-up menu generated by the plugmod object.
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 pptime object's outlets, as well as the displayed value in the Parameters view. 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 pptime object's outlets, as well as the displayed value in the Parameters view.
parameter-unit-labels symbol opt After the minimum and maximum values, a symbol sets the label used to display the units of the parameter. Examples include Hz for frequency, dB for amplitude, and ms for milliseconds.

Messages

bang Sends the current value of the parameter out the object's left outlet.
int Converted to float.
float In left inlet: Sets the parameter indices for the ms/Hz value.

In second inlet: Sets the unit multiplier value. Values are in the range 0.0- 15.0.

In third inlet: Sets the unit index. The unit index is expressed in terms of float or int values between 0 and 18, with each number representing a unit of musical subdivision.

The unit indices are defined as follows:

unit-index : note-value

0 : 1
1 : 1/2
2 : 1/2. (dotted half)
3 : 1/2t (1/2 triplet)
4 : 1/4
5 : 1/4. (dotted 1/4)
6 : 1/4t (1/4 triplet)
7 : 1/8
8 : 1/8. (dotted 1/8)
9 : 1/8t (1/8 triplet)
10 : 1/16
11 : 1/16. (dotted 1/16)
12 : 1/16t (1/16 triplet)
13 : 1/32
14 : 1/32. (dotted 1/32)
15 : 1/32 (1/32 triplet)
16 : 1/64
17 : 1/64. (dotted 1/64)
18 : 1/64 (1/64 triplet)

In fourth inlet: Sets the unit-value input.
mode host-sync-mode (0 through 3) [int]
In left inlet: The word mode, followed a number in the range 0-3, specifies the host sync mode. Host sync modes are defined as follows: 0=Free, 1=Host Sync, 2=Pluggo Sync, 3=User-Defined Tempo. The default is 1 (Free mode).
rawfloat parameter-value [float]
The word rawfloat, followed by a number between 0 and 1.0 sets the current parameter value to the number without scaling it by the object's minimum and maximum. The value is then sent out the right and left outlets of the object as described above for the bang message.
rawlist parameter-value [list]
The word rawlist, followed by three numbers, sets the parameter as follows: the first argument is a millisecond-value, the second argument is the unit-index, and the third argument is a multiplier.
text text-content [symbol]
Sets the description-text-field for the parameter.
set parameter-value [list]
Sets the parameter-value without outputting it.
tempo current-tempo [float]
In left inlet: If the pptime object is in User-determined Tempo mode, the word tempo, followed by a number, specifies the current tempo, and sends the ms/Hz value associated with that tempo out the left outlet.
timesig time-signature [list]
In left inlet: The word timesig, followed by two numbers, are used to specify the time signature. The time signature (composed of a numerator and denominator) is used to calculate the beat value in sync modes and the ms/Hz value in User-Defined Tempo mode. This list can be fed from the output of the plugsync~ object. The default is 4/4 (timesig 4 4).

Information for box attributes common to all objects

Inspector

Object-Settings: Choosing Get Info... from the Object menu opens an Inspector window 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. This command is not available in the runtime plug-in environment.

A parameter description can be assigned to a pptime 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 pptime object displays the pptime 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

int or float: Out left outlet: The scaled value of the 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 inlet. 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 second outlet: The unit multiplier value. Values are in the range 0.0- 15.0.

Out third outlet: The unit index. The unit index is expressed in terms of float or int values between 0 and 18.

Out fourth Outlet: The beat value output.

Examples

Use pptime to control beat-and/or time-syncronized parameters

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
pptempo Define plug-in tempo and sync parameters
plugin~ Define a Max for Live device's audio inputs
plugout~ Define a plug-in's audio outputs