Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

< Previous PageNext Page > Hide TOC

Design the Parameter Interface

In this section you work out the parameter portion of the programmatic interface between your audio unit and its view. End users will vary these parameters to control your audio unit in real time.

First, specify which sound attributes you’d like the user to be able to control. For this project, use the following:

Second, specify for each parameter:

The following tables specify the parameter design. You'll use most of these values directly in your code. Specifying a "Description" is for your benefit while developing and extending the audio unit. You can reuse the description later in online help or a user guide.

Table 5-1  Specification of tremolo frequency parameter

Parameter attribute

Value

User interface name

Frequency

Description

The frequency of the tremolo effect. When this parameter is set to 2 Hz, there are two cycles of the tremolo effect per second. This parameter’s value is continuous, so the user can set any value within the available range. The user adjusts tremolo frequency with a slider.

Programmatic name

kTremolo_Frequency

Unit of measurement

Hz

Minimum value

0.5

Maximum value

10.0

Default value

2.0

Table 5-2  Specification of tremolo depth parameter

Parameter attribute

Value

User interface name

Depth

Description

The depth, or intensity, of the tremolo effect. When set to 0%, there is no tremolo effect. When set to 100%, the tremolo effect ranges over each cycle from silence to unity gain. This parameter’s value is continuous, so the user can set any value within the available range. The user adjusts tremolo depth with a slider.

Programmatic name

kTremolo_Depth

Unit of measurement

Percent

Minimum value

0.0

Maximum value

100.0

Default value

50.0

Table 5-3  Specification of tremolo waveform parameter

Parameter attribute

Value

User interface name

Waveform

Description

The waveform that the tremolo effect follows. This parameter can take on a set of discrete values. The user picks a tremolo waveform from a menu.

Programmatic name

kTremolo_Waveform

Unit of measurement

Indexed

one value

Sine

another value

Square

Default value

Sine

It's easy to add, delete, and refine parameters later. For example, if you were creating an audio level adjustment parameter, you might start with a linear scale and later change to a logarithmic scale. For the tremolo unit you're building, you might later decide to add additional tremolo waveforms.



< Previous PageNext Page > Hide TOC


Last updated: 2007-10-31




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice