Low Pass Filter-IIR Demo

Location

$CAFE_ROOT/system/src/demo/ax

Description

Demonstrates how to use a low pass IIR filter per voice.

The following are required for this demo.

Ten samples are included in PCM16 audio format. When the demo is invoked, it will commence playback of a sound and by default the filter is OFF.

This demo is interactive. Follow the on-screen instructions to turn ON the filter, change the filter type and the cut-off frequency, and change the sound to be played back.

Console Output

When invoked, the program will display the following output:

    Loading SP file axdemo/filter/lpfdemo.spt
    Running AI Recorder on Core #1
    Loading SP file axdemo/filter/lpfdemo.spd
    SPInitSoundTable: loaded samples @ 0x11f06e80, samples_size=2762193

This is followed by instructions for the interactive controls:

    ********************************************************
    ********************************************************
    *               Lpf filter demo                        *
    ********************************************************
    ********************************************************
    *    PAD Buttons are:                                  *
    *    Home        Quit Program                          *
    *    Up/Dn       move parameter selection cursor       *
    *    Rt/Lt       change selected parameter             *
    *    A           Switch LPF filter ON/OFF              *
    *    B           Start/Stop playing current tone       *
    *    X           Cycle through samples                 *
    *    Zr          Toggle between DSP and PPC Renderer   *
    *    Substick Y  Change Cut-Off Frequency of filter    *
    ********************************************************
    ********************************************************

TV Output

The current parameter settings are displayed to the TV:

                axfilter.c built 15:55:50 Jan 25 2012
                
             B Play       On                        
             X Voice      GuitarScape              
             A Lpf on    >Off                            
    Substick Y Cut-off    16000 Hz                
            Zr Render     PPC                         
                                                     Home       Quit
                                                     Up/Dn      move cursor
                                                     Left/Right Toggle Value

The two left columns display per-voice parameters. The lower right describes the PAD navigation controls.

Navigating With the GamePad

Parameters

Play Start or stop playing the current sound. Pressing B will also toggle this value.
Voice Selects which sound sample to be played. Pressing X will also cycle through the available sound samples.
Render Selects the renderer (PPC or DSP) to use. Pressing Zr will switch the voice between DSP and PPC.
Lpf on Selects if the Lpf should be applied or not. Pressing A will toggle ON/OFF.
Cut-off Selects the cut-off frequency of the filter. Twenty-four steps are provided. Choose the cut-off using Substick Y.

Files

$CAFE_ROOT/system/src/demo/ax/axfilter.c Demo source code.
$CAFE_ROOT/system/src/demo/ax/lpfdemo.h Filter coefficients header.
$CAFE_ROOT/data/disc/content/axdemo/filter/lpfdemo.spt Sound Pipeline table file.
$CAFE_ROOT/data/disc/content/axdemo/filter/lpfdemo.spd Sound Pipeline sample file.

See Also

AXAcquireVoice
AXSetVoiceState
AXSetVoiceLpfCoefs
AXSetVoiceLpf

Revision History

2013/05/08 Automated cleanup pass.
2012/01/26 Updated for SDK 2.02 Release


CONFIDENTIAL