note2Freq()
Purpose
Find the frequency of the specified note
Description
Finds the corresponding frequency for the specfied musical note
Syntax
frequency = note2Freq( note )
Arguments
frequency frequency 10Hz to 20Khz (10 - 20000)
note Int 0 to 128. 0 is C-1, 60 is C4 (Middle C)
Example
freq = []
for i = 0 to 7 loop
freq[i] = note2Freq( i * 2 + 40 )
repeat
for i = 0 to 7 loop
clear()
printAt( 0, 0, "Frequency: ", freq[i] )
update()
playNote( 0, 0, freq[i], 0.5, 1, 0.5 )
sleep( 1 )
repeat
Associated Commands
audioLength(), getChannelStatus(), loadAudio(), playAudio(), playNote(), setClipper(), setFilter(), setPan(), setVolume(), startChannel(), stopChannel()