Omnimaga
Calculator Community => TI Calculators => Axe => Topic started by: Raylin on June 28, 2010, 07:36:06 pm
-
Is it possible to play BGM music in Axe if the following were true:
*If there was an AppVar that acted like a filetype and the bytes for the sound frequencies were stored inside.
*If it was played as frequently as an interrupt.
Comment and tell me what you think.
-
Funny you mention that. I was playing around with that as an idea for my example program, but I realized I need my note constants becasue its too tedious to type in the note values manually. There is something you have to realize however; The interrupts trigger more rapidly then you might think. According to WikiTI, at their slowest speed, the interrupts trigger around 100 times a second and at the fastest speed its closer to 1000 times a second! Your typical 16th note is 8 beats per second so you can see the problem that arises.
What you have to do is have the interrupt use a decreasing counter which only plays a note when the counter reaches 0. Then, you have to reset the timer to a next wait time, which should be part of your note data. This strategy works very well, I was able to get BGM into my games with no appreciable slow down at all. So to answer your question, yes, it is very possible, I've done it.
-
Also, is it possible to play multiple notes at once? o.o
-
From what he posted, you could give the illusion of it by having barely any cycles between the notes, but truly playing multiple notes... I'm not sure if that's possible.
-
I tried in Wabbitemu and it sounded crappy, but idk about on-calc. I heard it wasn't too great either, though. It would also be nice if someone made a music maker program to quickly produce VGM data to insert in your program then you just need to code a routine that'll play through the data using Freq()/SinReg() in an interrupt.
-
what would happen if, instead of this:
set output high
wait 2 ms
set output low
wait 2 ms
repeat
you did this:
set output high
wait 1 ms
set output low
wait 3 ms
repeat
what kind of sound would the second one make?
-
I am not too sure. I guess the only real way to check is to try.
One thing people can do if chords are impossible is to just alternate between notes repeatedly at a fast but slow enough to hear each notes separately well. This will give a Commodore 64 style sound, to a certain extent.
-
Did metroid use something like this in the NES games? Sounds similar! That would be cool: a metroid clone that has the same type of music.
The nes had 2-track music, I believe, which is why zelda 1 sounds worse when your hearts are low.
-
So, would you say that if you alternate the frequencies fast enough, you can give the illusion of 2-track music?
Also, can someone link me that note chart that someone gave SirCmpwn with the frequencies and what not?
-
If it didn't sounded terrible, then yes.
As for a note chart, do you mean this? http://www.phy.mtu.edu/~suits/notefreqs.html
-
Yes! :D
-
Thought I'd post this in this topic since its related. I rewrote the Freq() command so that it is actually a REAL square wave now and not that blippy thing it was. It is now significantly louder and higher quality and surprisingly its the same size as the original routine. I uploaded both the old and new executable of the AxeSound test program so that you can hear the difference.
-
Oooh nice! I will brb then test this ASAP!
EDIT: WOW nice, now it sounds exactly like in TI-Jukebox, CalcMOD and most other calc music players. I can't wait to test with new Axe version. I wonder if chords could now be possible...
-
Wow, that sound sounds great! I can't wait for 0.3.2, coming out today! ;D