Omnimaga
Calculator Community => TI Calculators => Axe => Topic started by: goodegg610 on April 16, 2012, 08:18:47 pm
-
How does the frequency command work? If we wanted to play a C for a period of time, what would you put in and why?
-
I believe it works like Freq(wavelength,period).
And it uses to produce sound.
EDIT: Freq(314,10000) produces A3 note (I think)
-
Freq(1.29,1000)
-
Can freq( take decimal value?
-
I'm assuming no, since Axe doesn't work natively with decimals. Also, for smaller questions like these maybe you want to post them in the Axe Q&A thread here? (http://ourl.ca/9165455)
-
Leafy you silly, Axe supports converting decimal numbers like 1.29 into 8x8 format :D
INT.DEC The non-integer decimal number as an 8.8 fixed point number. Maximum 3 decimal places allowed.
-
The Freq() command takes two arguments: wavelength and time. TBO_Yeong and linuxgeek96, I'm not sure where you got your wavelength numbers from, but neither of them appear to be correct. The approximate value that I got was 487, using this formula for the wavelength argument with middle C's frequency, 261.63Hz:
Wavelength argument = (6000000/frequency - 62)/47
Now, to deal with the time argument. The formula for this is a little more complex, since it doesn't have an explicit form, only implicit:
Desired duration = (47*time argument + 48*floor(time argument/wavelength argument) + 71)/6000000
However, if we give floor(time argument/wavelength argument) an approximate constant value instead (I'll give it about 50), we can get an explicit form:
Time argument = (6000000/desired duration - 2500)/47
If we wanted a note length of 1/4 of a second, this would give us a time argument of approximately 31900.
Putting it all together, to play middle C for about 1/4 of a second, you would use the following code: Freq(487,31900).
-
Oops. What I meant was A2, not A3. XP
Also, for wavelength, here: http://www.phy.mtu.edu/~suits/notefreqs.html
It works. :D