SetTonePolyphony/developers

From Wiring

Jump to: navigation, search
This page is intended as a reference for core developers only, and the content is only changed after a consensus has been reached through discussion of any such changes. Please use the Discussion page to talk about any changes or issues you have with the current implementation.
setTonePolyphony()
Classification Tone Generator
Suggested location WTone.h
C++ required No
Timing constraints None
Version introduced 1.0 (0100)
Framework dependencies None
Prototype(s)
void setTonePolyphony(uint8_t polyphony)
Required? Yes
Issues None


Contents

Description

The setTonePolyphony method sets the max number of tones to play.

Black Box Input

The max number of tones is provided.

Black Box Output

No output. The max number of tones is set to the provided number.

Overloading

None. Single signature only.

Notes

The max number of tones is limited by the number of timers on the board.

If a previous tone command is playing, and a new pin is specified, and tonePolyphony has been set to > 1, and there are available timers, a simultaneous tone will be played on the new pin.

Avoid using Timer0 because it is used for millis etc.

Proposed Changes

Personal tools