31316 Parallax Inc, 31316 Datasheet - Page 9

Microcontroller Modules & Accessories AP-16 Audio Player

31316

Manufacturer Part Number
31316
Description
Microcontroller Modules & Accessories AP-16 Audio Player
Manufacturer
Parallax Inc
Series
Propeller™r
Datasheet

Specifications of 31316

Product
Microcontroller Accessories
Data Bus Width
16 bit
Clock Speed
44.1 KHz
Operating Supply Voltage
18 V
Board Size
107.95 mm x 114.3 mm
Main Purpose
Audio, Audio Processing
Embedded
Yes, MCU, 32-Bit
Utilized Ic / Part
P8X32A
Primary Attributes
Plays Stereo WAV Files (16-bit), Dual 20W Amps (1 Per Channel)
Secondary Attributes
-
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Syntax:
Reply:
The "PW" (play named WAV file) command is used to play a WAV file by name (which must conform to the
DOS 8.3 file naming convention). When using the "PW" command, the ".WAV" file extension is optional, but
the file name must be terminated with a carriage return (13). As with the other play commands, the loops
parameter is used to specify the number of times to play the file (0 to 255); typically once (1). To continuously
repeat the specified file until another play or reset command, use zero (0) as the loops parameter.
Prop-1 Example
In this example, the AP-16+ at address %11 will play WOLF.WAV two times, back-to-back. If the ambient
Loop switch (Q) is closed and AMBIENT.WAV is on the SD card, it will restart when WOLF.WAV has finished
playing both loops.
Note that if an invalid name is specified while the ambient file is playing, the ambient file will be restarted. The
AP-16+ must stop AMBIENT.WAV in order to search and verify the file specified in the "PW" command.
Syntax:
Reply:
The "L" (set levels) command is used to set the volume levels (0% to 100%) for each of the WAV channels.
Prop-1 Example
In this example, the AP-16+ at address %00 will change both the left and right channel levels to 50%.
Syntax:
Reply:
The "S" (set speed) command is used to set the playback speed (50% to 200%). Note that the maximum
sample rate is 44.1kHz so a 44.1kHz file cannot be made to play faster.
Prop-1 Example
In this example, the AP-16+ at address %00 will change the playback speed for subsequent files to 75%.
This will cause the pitch to be lower and the playback duration to be longer.
EFX-TEK ● www.efx-tek.com ● teamefx@efx-tek.com
"PW" :: Play Named WAV File
"L" :: Set Channel Volume Levels
"S" :: Set Playback Speed
SEROUT Sio, OT2400, ("!AP16", %11, "PW", "WOLF", 13, 2)
SEROUT Sio, OT2400, ("!AP16", %00, "L", 50, 50)
SEROUT Sio, OT2400, ("!AP16", %00, "S", 75)
NOTE: Any "P" command will always stop audio that is playing. Use the "G" command (get
status) to check on the AP-16+ if you do not desire this behavior
"!AP16", address, name, {CR}, loops
None
"!AP16", address, "L", left, right
None
"!AP16", address, "S", speed
None
9

Related parts for 31316