Biquad-IIR Demo

Location

$CAFE_ROOT/system/src/demo/ax

Description

Demonstrates how to use a biquad IIR filter per voice. The demo has option to change the type of filter, LPF, HPF and BPF.

The following are required for this demo.

Ten samples are included in PCM16 audio format. When the program 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 to 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:

    ********************************************************
    ********************************************************
    *               Biquad filter demo                     *
    ********************************************************
    ********************************************************
    *    PAD Buttons are:                                  *
    *    Home        Quit Program                          *
    *    Rt/Lt       move parameter selection cursor       *
    *    Up/Dn       +/- selected parameter                *
    *    A           Switch Bi-quad filter ON/OFF          *
    *    B           Start/Stop playing current tone       *
    *    X           Cycle through samples                 *
    *    Y           Cycle through filter Types            *
    *    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:

                biquad.c built 16:05:13 Oct 20 2011
                
             B Play       On                        
             X Voice      GuitarScape              
             Y Type       LPF                   
             A Biquad 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.
Type Selects the type of filter to use. Available are LPF, HPF and BPF. Pressing Y will cycle through the options.
Biquad on Selects if the biquad 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/biquad.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
AXSetVoiceBiquadCoefs
AXSetVoiceBiquad

Revision History

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


CONFIDENTIAL