Sound Functions
Sound
 
Image bm924.GIF number of bits per sample (8 or 16)
 
The number of bits per sample element returns the number of bits per sample for a sound entered as a parameter. For the PCM sound format a value of 8 or 16, for the Microsoft ADPCM a value of 4, for other formats mostly 0 will be returned.
 
Image bm925.GIF sample frequency (Hz)
 
The sample frequency element returns the sample frequency for a sound entered as a parameter. For the PCM sound format value of 11025, 22050 or 44100 will be returned.
 
Image bm926.GIF is sound stereophonic?
 
The is sound stereophonic? element returns a logic flag for a sound entered as a parameter, indicating, whether the sound is stereophonic (2 channels) or monophonic (1 channel).
 
Image bm927.GIF length of sound (seconds)
 
The length of sound element returns the sound length in seconds for a sound entered as a parameter.
 
Image bm928.GIF convert to 8 bits
 
The convert to 8 bits element converts a sound entered as an input parameter to an 8 bits per sample format and presents it as a new sound on the output. PCM format sounds only can be converted; other formats will be converted to PCM automatically.
 
Image bm929.GIF convert to 16 bits
 
The convert to 16 bits element converts a sound entered as an input parameter to a 16 bits per sample format and presents it as a new sound on the output. PCM format sounds only can be converted; other formats will be converted to PCM automatically.
 
Image bm930.GIF convert to stereo
 
The convert to stereo element converts a sound entered as an input parameter to a stereophonic format (2 channels) and presents it as a new sound on the output. PCM format sounds only can be converted; other formats will be converted to PCM automatically.
 
Image bm931.GIF convert to mono
 
The convert to mono element converts a sound entered as an input parameter to a monophonic format (1 channel) and presents it as a new sound on the output. PCM format sounds only can be converted; other formats will be converted to PCM automatically.
 
Image bm932.GIF convert to 11 kHz
 
The convert to 11 kHz element converts a sound entered as an input parameter to the sample frequency of 11025 Hz and presents it as a new sound on the output. PCM format sounds only can be converted; other formats will be converted to PCM automatically.
 
Image bm933.GIF convert to 22 kHz
 
The convert to 22 kHz element converts a sound entered as an input parameter to the sample frequency of 22050 Hz and presents it as a new sound on the output. PCM format sounds only can be converted; other formats will be converted to PCM automatically.
 
Image bm934.GIF convert to 44 kHz
 
The convert to 44 kHz element converts a sound entered as an input parameter to the sample frequency of 44100 Hz and presents it as a new sound on the output. PCM format sounds only can be converted; other formats will be converted to PCM automatically.
 
Image bm935.GIF sound decompression
 
The sound decompression element converts a compressed format (as ADPCM or MP3) sound to the PCM format, which can be played mixed with other sounds or can be converted. If necessary, the conversion functions will decompress the sound automatically. Only those formats can be decompressed for which a decoder (codec) is installed in the Windows system. These are all formats that can be played in the Windows system.
 
Image bm936.GIF change speed of sound
Image bm937.GIF sound to conversion
Image bm938.GIF relative change of speed (1=unchanging)
 
The change speed of sound element converts the playback speed of a sound entered on the input, and presents it as a new sound on the output. The coefficient of the relative change of speed can have negative value as well, in this case the sound is played in the reverse direction. The value of 1 meaning no speed change. PCM format sounds only can be converted; other formats will be converted to PCM automatically.
 
Image bm939.GIF tone generator
Image bm940.GIF frequency of tone (1 to 11025 Hz)
Image bm941.GIF length of tone (seconds)
 
The tone generator element creates a sine wave tone having an entered frequency and an entered length, and presents it as a new sound on the output. The output sound has a PCM format, 16 bits per sample, 22050 Hz, mono. The admissible frequency range is 1 Hz till 11025 Hz. The tone length is corrected to generate an integral number of tone waves, thus enabling a smooth link-up of different tones (without formation of disturbing beats).

Full Html Context Help of The Peter - Gemtree Software & Children Programming