Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: squidgetx on June 11, 2010, 08:50:59 pm

Title: Sound in Axe
Post by: squidgetx on June 11, 2010, 08:50:59 pm
I was wondering if anyone knows which frequency arguments for SinReg correspond to the traditional pentatonic scale's notes

like to play a C, what value would you use and then how much would I increment to value to raise it a half (or whole) step?

Thanks
Title: Re: Sound in Axe
Post by: Quigibo on June 11, 2010, 10:00:23 pm
Try this:
http://www.phy.mtu.edu/~suits/notefreqs.html

Use the wavelength column (not frequency) near the bottom that are less than 255.
Title: Re: Sound in Axe
Post by: ztrumpet on June 11, 2010, 10:38:42 pm
A lot of those at the bottom have decimal values.  Is there any way to use these, or would these notes always be a little flat or sharp?
Title: Re: Sound in Axe
Post by: cooliojazz on June 11, 2010, 10:43:24 pm
When the notes get tha high in axe, you can't really hear them that well anyways... probably stick with the lower ones... =P
Title: Re: Sound in Axe
Post by: DJ Omnimaga on June 11, 2010, 11:15:59 pm
Btw on a real calc,  does the notes sound like triangles like on Wabbitemu and Final Fantasy 1, or will they sound like squares like in Super Mario Bros 1?
Title: Re: Sound in Axe
Post by: Hot_Dog on June 12, 2010, 02:00:27 am
Btw on a real calc,  does the notes sound like triangles like on Wabbitemu and Final Fantasy 1, or will they sound like squares like in Super Mario Bros 1?

What in the world do you mean?
Title: Re: Sound in Axe
Post by: DJ Omnimaga on June 12, 2010, 02:13:01 am
mhmm actually it's not triangle but more something like saw sound. That video might help


Else here's sound from FF1
and SMB
(except of course the jumping sound and when mario eats a mushroom)
Title: Re: Sound in Axe
Post by: squidgetx on June 14, 2010, 05:04:26 pm
meh, the sound quality is ~

ztrumpet, at first i had the same doubts you had, but if you round to the nearest whole number, you really still can't tell the difference (unless you have perfect pitch...)
Title: Re: Sound in Axe
Post by: willrandship on June 14, 2010, 05:10:47 pm
Perhaps axe could support external .wav files in the future! It couldn't be used for music, too big, but you could have really high quality sound.

Maybe MIDI for the music.....
Title: Re: Sound in Axe
Post by: Galandros on June 14, 2010, 05:23:00 pm
Perhaps axe could support external .wav files in the future! It couldn't be used for music, too big, but you could have really high quality sound.

Maybe MIDI for the music.....
That looks CPU expensive.

Very interesting table Quigibo.

And I will hear the Youtube videos to understand what is triangle and square sounding. It got me almost as surprised as after reading that some physic particles have flavours... There is also stories of a person that can taste colours. simply wtf in this confusion of senses.
Title: Re: Sound in Axe
Post by: DJ Omnimaga on June 14, 2010, 11:39:09 pm
wav would be cool. However it might be rather large indeed. About two seconds of 8 bit 32 kbps audio at 11 KHz is like 20 KB if I remember when converted to calc format.
Title: Re: Sound in Axe
Post by: squidgetx on June 15, 2010, 09:27:56 am
Yeah, I remember RealSnd making those HUGE apps...I think a 1 minute Pokemon theme song took just as much space as the pokemon TiBoy app :P
But midi would be awesome..
Title: Re: Sound in Axe
Post by: Raylin on June 15, 2010, 09:47:51 am
Midi WOULD be awesome.
Title: Re: Sound in Axe
Post by: SirCmpwn on June 15, 2010, 10:35:42 am
Yeah, I remember RealSnd making those HUGE apps...I think a 1 minute Pokemon theme song took just as much space as the pokemon TiBoy app :P
There is a project that you might be able to find somewhere to stream real sound off of a flash drive.  Go ask the right people.
Title: Re: Sound in Axe
Post by: DJ Omnimaga on June 15, 2010, 11:20:24 am
BrandonW?
Title: Re: Sound in Axe
Post by: SirCmpwn on June 15, 2010, 12:28:45 pm
Yeah, he has a copy of it.  As do I, but I'm not too comfortable sharing it, seeing as it was never released.
Title: Re: Sound in Axe
Post by: DJ Omnimaga on June 15, 2010, 12:32:35 pm
You may need to ask him permission then, first, in case.
Title: Re: Sound in Axe
Post by: ztrumpet on June 15, 2010, 12:58:10 pm
What's it called?  It sounds pretty interesting. :)
Title: Re: Sound in Axe
Post by: Quigibo on June 15, 2010, 01:45:17 pm
I really do want to add wav support eventually.  I'm really not that knowledgeable with sound though, so I'd either have to learn how waveforms of sound are converted to digital audio or I'd have to have someone explain it to me.

This was done on a z80 cpu by the way with the most minimal of sound chip:


This and the ProjectM sound (from what I've heard) make be believe that it will eventually be possible.  When I support reading from archive, you'll be able to play some pretty large files.
Title: Re: Sound in Axe
Post by: Raylin on June 15, 2010, 01:50:20 pm
That would be effin' AWESOME for the calc!
Title: Re: Sound in Axe
Post by: ztrumpet on June 15, 2010, 03:07:57 pm
That would be awesome!  I can't wait for that to happen! :D
Title: Re: Sound in Axe
Post by: squidgetx on June 15, 2010, 03:36:16 pm
:DDDDDDDD that would be greaat
Title: Re: Sound in Axe
Post by: calcdude84se on June 15, 2010, 09:35:06 pm
Cool! I like the video...
Yeah, without support for external drives, an SE (83+SE or 84+SE) could hold one low-quality song...
Title: Re: Sound in Axe
Post by: DJ Omnimaga on June 15, 2010, 09:38:34 pm
I really do want to add wav support eventually.  I'm really not that knowledgeable with sound though, so I'd either have to learn how waveforms of sound are converted to digital audio or I'd have to have someone explain it to me.

This was done on a z80 cpu by the way with the most minimal of sound chip:


This and the ProjectM sound (from what I've heard) make be believe that it will eventually be possible.  When I support reading from archive, you'll be able to play some pretty large files.
this is nice. My concern about Axe sound is efficiently do multiple channels at once. I tried alternating very quickly once, but the sound got really weird. Could it have been because I was using an emulator?
Title: Re: Sound in Axe
Post by: _player1537 on June 22, 2010, 09:40:31 am
I tried the same thing on calc (alternating between two sounds [3 also]) and it didn't sound wierd, sounded almost like normal, just different pitches.  My guess is yes, it was the emulator doing it.  I think my code was something similar to:
Code: [Select]
100->A->B
repeat getkey(15)
sinreg(A,1000
if getkey(54)
sinreg(B,1000
end
if A!=255 and getkey(3)
A+1->A
End
if A!=0 and getkey(2)
A-1->A
End
if B!=255 and getkey(1)
B+1->B
End
if B!=0 and getkey(4)
B-1->B
End
end
this code should work, I haven't tested it however, but it is pretty close to what I used for testing multiple channels.
Title: Re: Sound in Axe
Post by: SirCmpwn on June 22, 2010, 11:14:17 am
I'm going to write a library to allow users to play sound in their games.  It will come with a designer to make music.  Should be fun.
I was messing around last knight to make sound in different pitches and made a C Major scale pretty easy.
Title: Re: Sound in Axe
Post by: squidgetx on June 22, 2010, 11:33:03 am
I see what you did thar...

Yeah, the only issue with sound it seems is that you can't play a pitch for longer than ~65k microseconds

Title: Re: Sound in Axe
Post by: SirCmpwn on June 22, 2010, 11:34:04 am
Yeah, the only issue with sound it seems is that you can't play a pitch for longer than ~65k microseconds
You can make it longer if you loop it.
Title: Re: Sound in Axe
Post by: _player1537 on June 22, 2010, 12:57:08 pm
Code: [Select]
For(C,0,100
sinreg(100,1000)
End
just an example.
Title: Re: Sound in Axe
Post by: SirCmpwn on June 22, 2010, 01:32:11 pm
So I figure I will make a library that will let you use 6MHz for your game, and it would use 7 for music.  Ideas?
I also recently started work on a music editing program for Axe as an application.
Title: Re: Sound in Axe
Post by: DJ Omnimaga on June 22, 2010, 02:33:22 pm
7 MHz?

A lib and music editor (with testing the song) would be nice, though
Title: Re: Sound in Axe
Post by: SirCmpwn on June 22, 2010, 02:38:03 pm
Well, if the music takes up 7MHz, then that leaves 6MHz to the game, which will make adding the music easier.
Title: Re: Sound in Axe
Post by: DJ Omnimaga on June 22, 2010, 03:00:05 pm
Mhmm...

well my concern was more: what about the remaining 2 MHz? (15 MHz - 7 MHz - 6 Mhz = 2 remaining MHz, right?)
Title: Re: Sound in Axe
Post by: SirCmpwn on June 22, 2010, 03:14:10 pm
Oh, right.  *9MHz.
Title: Re: Sound in Axe
Post by: DJ Omnimaga on June 22, 2010, 03:16:02 pm
Aaah ok.

Well I would liek to see such routine for sure. Just make sure it is easy to make music and that you can play it to make sure it sounds right, and that it's easy to import.
Title: Re: Sound in Axe
Post by: SirCmpwn on June 22, 2010, 03:17:43 pm
Yep.  You can have my C Major scale demo if you like.
Title: Re: Sound in Axe
Post by: DJ Omnimaga on June 22, 2010, 03:47:19 pm
That would be nice, altough it's not a big hurry. I am experimenting with something else at the moment that would be too slow with sound anyway
Title: Re: Sound in Axe
Post by: LordConiupiter on June 22, 2010, 03:58:13 pm
well, I would also like your experiment in C. I think music is the coolest thing on the calc I can think of at the moment!
Title: Re: Sound in Axe
Post by: SirCmpwn on June 22, 2010, 03:59:48 pm
Later tonight I was thinking about making the Zelda theme as a demo, now I think I will.
Title: Re: Sound in Axe
Post by: DJ Omnimaga on June 22, 2010, 04:04:13 pm
Wow cool! I wish you good luck ^^
Title: Re: Sound in Axe
Post by: LordConiupiter on June 22, 2010, 04:08:32 pm
yeah! very cool! I wish you also good luck...
Title: Re: Sound in Axe
Post by: Keoni29 on June 03, 2011, 08:34:12 am
I try to play music ingame using subroutines after every action. Then add some reverb with my computer so that it plays smooth notes. Maybe it will work.
Title: Re: Sound in Axe
Post by: Ashbad on June 03, 2011, 09:44:59 am
I try to play music ingame using subroutines after every action. Then add some reverb with my computer so that it plays smooth notes. Maybe it will work.

One suggestion to make it a bit more "stable" between musical phrases is to use an interrupt system to play the notes, that usually worked best for me when I tried adding it to games.
Title: Re: Sound in Axe
Post by: Keoni29 on June 03, 2011, 09:46:50 am
I'll check the interrupts tut :)
Title: Re: Sound in Axe
Post by: DJ Omnimaga on June 03, 2011, 08:55:09 pm
Holy necropost, batman! :O

On a side note is the sound in Wabbitemu exactly the same as on the calc now? I am really curious about if it's possible to play 2 notes together by quickly alternating between each others, or at least use combinations to form different sounds...
Title: Re: Sound in Axe
Post by: Keoni29 on June 04, 2011, 03:22:38 am
Well... arpeggio's are already a possibility :S
(btw:A soundchip for ti84 would be sooo cool! I'll check out what I can fix. I made a jackplug converter and I modified a set of earphones so a soundchip will be the next step :))
Edit:I disovered that the nes sends envelopes from it's cpu to the soundchip
We need to emulate this by converting variables into different output voltages in the linkport
Title: Re: Sound in Axe
Post by: Deep Toaster on June 04, 2011, 12:59:57 pm
HI am really curious about if it's possible to play 2 notes together by quickly alternating between each others, or at least use combinations to form different sounds...
KermM's media player can, so I'm guessing it is possible. I don't know how it works though.
Title: Re: Sound in Axe
Post by: Keoni29 on June 05, 2011, 04:55:57 am
I made a small sfx editor. It doesn't save anything yet.
Use the arrowkeys to move the cursor
Press 2nd to change the state
Press F1 to play

Bugs:Sometimes it just won't play anything anymore. Just restart the programme.

It runs at the highest possible speed with axe.
What do you think?
Title: Re: Sound in Axe
Post by: Keoni29 on June 13, 2011, 08:15:25 am
Midi for TI is released :D
Title: Re: Sound in Axe
Post by: Keoni29 on July 17, 2011, 01:29:59 pm
I'm learning how to program microcontrollers. When there is a proper way to let the TI communicate with one of the ports of the PIC microcontroller I can make a sound engine. 10 Mhz sound FX :D
Finally did it. Oh sh*t yes!