GetTonePolyphony/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.
getTonePolyphony()
Classification Tone Generator
Suggested location WTone.h
C++ required No
Timing constraints None
Version introduced 1.0 (0100)
Framework dependencies None
Prototype(s)
uint8_t getTonePolyphony(void)
Required? Yes
Issues None


Contents

Description

The getTonePolyphony method returns the max number of tones to play.

Black Box Input

No input.

Black Box Output

Returns the max number of tones to play.

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