Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Scroll Documents: Update page title prefix

Overview

Find peaks of input data

Discussion

This module finds a number of peaks per audio block as determined by the value of numPeaks. The module outputs the values of the found peaks and has an optional output pin to output at what index the peaks were found. The module will output peaks in descending order, and ignore nearby values as set by minDistanceSpacing. The output pin will have a block size the size of numPeaks with the same number of channels as the input.

Type Definition

Code Block
typedef struct _ModulePeakFinder
{
    ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
    INT32 minDistanceSpacing;                     // Number of samples to ignore around found peak
    INT32* histSkip;                              // Array indicator that indicies should be skipped when peak searching
} ModulePeakFinderClass;

Variables

Properties

Name

Type

Usage

isHidden

Default value

Range

Units

minDistanceSpacing

int

parameter

0

1

0:32

histSkip

int*

state

1

[32 x 1]

Unrestricted

Pins

Input Pins

Name: in

Description: Input Histogram

...

Sample rate range: Unrestricted

Complex support: Real

Output Pins

Name: out

Description: Peak Values

Data type: float

MATLAB Usage

File Name: peak_finder_module.m

...