Creates an instance of the PolyTone class with a specified pitch, duration, and volume for each tone in the sequence.
public PolyTone( int Pitch, int Duration, int Volume, [...0 to N more tones as shown above] );
Pitch
The tone's frequency specified in cycles-per-second (Hertz), subject to range limits defined by Tone.PITCH.
Duration
The tone's duration in milliseconds, subject to range limits defined by Tone.DURATION.
Volume
The tone's volume. Range is 0 to 100. See the Notes below for more information.
When using integer values to set the volume, be aware that computers may have different volume values and ranges. Integer Volume values outside of the range VOLUME.OFF to VOLUME.VERY_LOUD are clamped to the nearest end of the range without generating an error or raising an exception.
The integer value 0 may be used in place of VOLUME.OFF, and the value 100 may be used in place of VOLUME.VERY_LOUD. However, these values do not represent the actual numeric range on any specific computer (in other words, the integer values represented by LOW, NORMAL, and LOUD cannot be interpolated from the range 0 to 100).
As seen in the example below, use the Volume value -1 to generate a rest or pause between tones.
[C#] PolyTone Ptone1 = new PolyTone( 300, 100, 2 , 400, 100, 2 , 500, 100, 2 , 600, 75, 2 , 0, 175, -1, // Rest (pause) for 175 milliseconds. 500, 75, 2 , 600, 400, 2 );