I'm working on a project called "NoteMan". Basically, it allows you to write simple 1-channel audio tracks in TI-BASIC files and it will play them.
Here is an example of "Twinkle Twinkle Little Star":
Code:
Basically, each note is written like this:
Code:
The first two "##"s is how long you want the note to play. "00" doesn't do anything. "01" is pretty short. "02" is twice as long. "03" is three times as long as "01", and so on and so forth. You can also think of this as how many beats per note.
The "$" is the note. This can be A, B, C, D, E, F, or G. You can also write them in lowercase if you want to get the flat of it. Such as, "g" is "Gb" while "G" is just a regular G. There is no way to designate sharps. Just go to the next note and make it flat. That's the same thing.
The final "#" is your octave. Currently, there are three octaves. And they work like this:
Code:
New octaves here start on C.
So, in conclusion, to, let's say, play a B flat on the second octave for four-times the length of a normal note, you would do this:
Code:
You also are supposed to separate the notes by commas. But you can separate them by anything.
The point of this project is simply for me to figure out how to use audio. But other people will be able to use it to easily create audio files on-calc, since you can write them in TI-BASIC.
I have most of it working and I'll post a download link sooner or later. And once it's finished I'll probably try to submit it to the archives.
Here is an example of "Twinkle Twinkle Little Star":
Code:
"02C1,02C1,02G1,02G1,02A1,02A1,04G1,02F1,02F1,02E1,02E1,02D1,02D1,04C1,02G1,02G1,02F1,02F1,02E1,02E1,04D1,02G1,02G1,02F1,02F1,02E1,02E1,04D1,02C1,02C1,02G1,02G1,02A1,02A1,04G1,02F1,02F1,02E1,02E1,02D1,02D1,06C1"
Asm(prgmNOTEMAN)
Basically, each note is written like this:
Code:
##$#
The first two "##"s is how long you want the note to play. "00" doesn't do anything. "01" is pretty short. "02" is twice as long. "03" is three times as long as "01", and so on and so forth. You can also think of this as how many beats per note.
The "$" is the note. This can be A, B, C, D, E, F, or G. You can also write them in lowercase if you want to get the flat of it. Such as, "g" is "Gb" while "G" is just a regular G. There is no way to designate sharps. Just go to the next note and make it flat. That's the same thing.
The final "#" is your octave. Currently, there are three octaves. And they work like this:
Code:
C0
D0
E0
F0
G0
A0
B0
C1
D1
E1
F1
G1
A1
B1
C2
D2
E2
F2
G2
A2
B2
New octaves here start on C.
So, in conclusion, to, let's say, play a B flat on the second octave for four-times the length of a normal note, you would do this:
Code:
04b1
You also are supposed to separate the notes by commas. But you can separate them by anything.
The point of this project is simply for me to figure out how to use audio. But other people will be able to use it to easily create audio files on-calc, since you can write them in TI-BASIC.
I have most of it working and I'll post a download link sooner or later. And once it's finished I'll probably try to submit it to the archives.