Omnimaga

Calculator Community => Other Calculators => Topic started by: thepenguin77 on July 24, 2010, 08:37:09 pm

Title: Sound for calculators with bad ram
Post by: thepenguin77 on July 24, 2010, 08:37:09 pm
So I caddy during the summer, which meant that today I had 4+ hours of just thinking. And here is the result.

I have made a program that will play sound on the 84+'s with the bad ram. I just started it a few hours ago, so I'm still working on it. But I have gotten near perfect sound quality from my calculator. It uses pulse width modulation (turning the link port on and off really fast) to get the amount of voltage it needs to play a note. I currently have it set up for 44.1khz, because I wanted to keep this on off above the human level of hearing. But then shortly after I made it I realized that it is playing a 44khz note and not a 22khz note. So I'll be working on 22khz because 44kb/s really eats up calculator memory.

I also have proven to myself that my speed program was right when it said my calculator runs at 15.8 mhz and not 14.9 mhz like the first speed test program said. I figured this out because I have the song set to play at 15.5 mhz and on my calculator and it runs too fast.

I'll put a video on youtube once I get 22khz working. If you are going to test this, don't use wabbitemu. Your sound card doesn't know what to do with a 44khz note and it will sound awful. So make sure you test it on a real calculator. It is currently set up in an app and a program, the app is the music, and the program is the program. This is so I don't have to resend it every time I change it.

If you want to make your own song. You have to put it in 44,100 hz, mono, 8bit. Then use a hex editor to cut off the header, replace all zeros with ones, and put a zero at the end. (Song starts 4 bytes after "DATA"). Then you have to find a way to convert it to an app and send it to your calculator. I used brandonW's new binTo8xk and then used wappsign.

I have also included the little demo I made for myself. It's only 5 seconds long but it's 340,000 bytes on calculator. Oh, and someone please laugh at the source, the technique I used has max sound quality at the cost of the programmer. (255 subroutines each 1 t-state different from each other.
Title: Re: Sound with bad ram
Post by: apcalc on July 24, 2010, 08:43:49 pm
This looks nice! ;)

Sadly, I can't try this program since I don't have an 84. :( :(
Title: Re: Sound with bad ram
Post by: alberthrocks on July 24, 2010, 08:45:50 pm
That's awesome! :D

I need to either: 1) Find my cable converter 2) Buy another one :P
Title: Re: Sound for calculators with bad ram
Post by: calcdude84se on July 24, 2010, 09:20:51 pm
Nice, the demo sounds awesome. (Your recording, I don't have a converter)
Too bad for the complete lack of compression (That won't fit on on 83+ and not an 84+ either IIRC)
Interesting to see where you'll take this. Good luck! :)
Title: Re: Sound for calculators with bad ram
Post by: yunhua98 on July 24, 2010, 09:50:04 pm
that's epic.  Someone should convert a rickroll.  :P
Title: Re: Sound for calculators with bad ram
Post by: calcdude84se on July 24, 2010, 09:54:03 pm
but right now you could only do 25 seconds...
That's more than enough, actually... :P
Title: Re: Sound for calculators with bad ram
Post by: thepenguin77 on July 24, 2010, 09:58:13 pm
Those 25 seconds take 15 minutes to send to calc. But I guess that makes it even more funny if someone does it.

Oh well, 22khz coming soon. I just did the preliminary copying and pasting for my routines. The source is over 8,000 lines long now.
Title: Re: Sound for calculators with bad ram
Post by: yunhua98 on July 24, 2010, 10:01:55 pm
When your done, I think you could have a POTY in the bag.  ;)
Title: Re: Sound for calculators with bad ram
Post by: calcdude84se on July 24, 2010, 10:18:22 pm
oh, wow x.x
But yes, it'd be totally worth it ;D
I agree, this'd deserve a POTY award, especially if you get some compression in there.
Title: Re: Sound for calculators with bad ram
Post by: thepenguin77 on July 24, 2010, 10:25:46 pm
Idk about poty because I am doing almost the exact same thing that realSound does. That is where I got the idea.

But I realized that when I'm doing 22khz, I actually burn 82 t-states per byte. I'll have to look into compression because that would be awesome. I have 4 more hours coming up tomorrow. So I'll probably figure it out.
Title: Re: Sound for calculators with bad ram
Post by: calcdude84se on July 24, 2010, 10:32:06 pm
cool, can't wait to see what you come up with! :D
Title: Re: Sound for calculators with bad ram
Post by: yunhua98 on July 24, 2010, 10:34:42 pm
Idk about poty because I am doing almost the exact same thing that realSound does. That is where I got the idea.

But I realized that when I'm doing 22khz, I actually burn 82 t-states per byte. I'll have to look into compression because that would be awesome. I have 4 more hours coming up tomorrow. So I'll probably figure it out.

Yeah, but RealSound was already epic, yours though, hopefully, yours will work for all SE's.  (Wait...  Will this work for 83SE?)
Title: Re: Sound for calculators with bad ram
Post by: calcdude84se on July 24, 2010, 10:39:35 pm
It should work for the 83+SE AFAICT.
Unless he gets compression, though, any song more than a few seconds will be SE-only due to the storage space required.
Title: Re: Sound for calculators with bad ram
Post by: thepenguin77 on July 24, 2010, 10:57:49 pm
It would definitely work for the 83+ SE. The only problem with compression is that I'm out of ram and out of pages. Flash is swapped into $4000 and that's where I read from. $8000 is ram $83 has a subroutine every 64 bytes. And $C000 has page $81 and is where I am executing from.

The options for compression I see are: a form of reading the data from flash that gains more space, this would basically be a look up table type thing. Or saying screw it to user ram and using page $81 for buffering with LZ77.

But the best, and scariest way I see to do it, store sector 0 to the swap sector and use page 0 as my executing space. This would let me save user ram as well as give me both page $80 and $81 to use as storage.
Title: Re: Sound for calculators with bad ram
Post by: calcdude84se on July 24, 2010, 11:52:08 pm
That'd give you access to all 64KB of address space, but it might not be worth it.
You'd have to do two or three erases every time you wanted to play a file, which makes it slow to start up and puts wear and tear on the flash.
But if you must, I suggest you make it optional ;D
Ignore my skepticism and continue. :P Keep up the good work!
Edit: 700th post!
Title: Re: Sound for calculators with bad ram
Post by: thepenguin77 on July 26, 2010, 06:36:46 pm
A lot of frustration has occurred since my last post. Although no one really cares, here is what happened.

1. I got 22khz working.
2. Ti-connect refused to send the 1250k app via usb.
3. After 30 minutes via silverlink, my batteries died.
4. I got compression with LZ77 working, (uses past 16k as a reference for copying)
5. .wav files compress .5% via LZ77.
6. New compression algorithm cuts 5%-10%
7. New batteries, sent via silverlink in 30 min, invalid
8. Installed tilp, spent lots of time working it out.
9. Tilp crashes on 1250k but sends smaller ones.
10. Those smaller ones are invalid.
11. Got wabbitsign instead of wappsign and signing works.
12. Tilp stops working all together.
13. Reinstall Ti-Connect, and send the new 1 minute sample.

Here is the video I promised.


After my complete failure with LZ77, I looked at the hex of the .wav files to see what I could do. I noticed that there were lots of numbers in the $70's and $80's. So my compressor writes numbers between 79 and 87 as nibbles to save space. So instead of 79 7A 7B 7C 7D 7E 7F 80 81 82. It writes 00 12 34 56 78 9A 00. The 00's are flags telling when compression starts and stops. This works decently, especially with quiet sections.

If anyone has any suggestions to compression techniques I'd love to hear them. The only problem is that they have to be able to get the next byte in exactly 108 t-states. But I do have a whole 16k ram page to work with.
Title: Re: Sound for calculators with bad ram
Post by: calcdude84se on July 26, 2010, 06:49:25 pm
That. Sounds. Awesome! Excellent work! :D
Hm... compression techniques...
At any rate, excellent. Should've done a different song, though :P
Title: Re: Sound for calculators with bad ram
Post by: Builderboy on July 26, 2010, 07:03:31 pm
What about Huffman coding?  I remember it was used for a previous sound player... although i dont remember which.  It seems to be the type which would help with this type of data tho.
Title: Re: Sound for calculators with bad ram
Post by: thepenguin77 on July 26, 2010, 07:57:17 pm
I was thinking about huffman before, but it wasn't untill I just went to the wikipedia page that I fully understood how it works. I'll see if I can get that working. Though it might be hard with 108 t-states.

Edit:
   These monster apps screw with your calc. Mirage crashes, my zStart crashes. All items are selected in mode menu. Weird...
Title: Re: Sound for calculators with bad ram
Post by: calc84maniac on July 26, 2010, 08:09:33 pm
Did you forget to restore IY?
Title: Re: Sound for calculators with bad ram
Post by: thepenguin77 on July 26, 2010, 08:29:26 pm
Yes.

My program used to jump to 0000 when it was done, it doesn't now.
Title: Re: Sound for calculators with bad ram
Post by: TIfanx1999 on July 27, 2010, 08:26:12 am
Cool stuff! Quality is quite good too. What size was the sample heard in the video?
Title: Re: Sound for calculators with bad ram
Post by: thepenguin77 on July 27, 2010, 09:07:50 am
1,196,032 bytes. The first 1 is cut off in the memory menu. But this number makes sense as divides to 73 pages.

Anyways, I am going to use huffman compression. I am hoping that 13 bits is enough for a maximum. I would then multiply that to 14 bits and use a 16k look up table. I am also going to cut the rate to 20,000 so that I will have 74 extra t-states to work with.
Title: Re: Sound for calculators with bad ram
Post by: Galandros on July 27, 2010, 10:06:51 am
Thank you for your effort, to bring "true sound" to new TI-84+SEs.

Compression is really useful to something like this.
You are really on the limit of the z80 CPU at 15MHz. ;D
Title: Re: Sound for calculators with bad ram
Post by: SirCmpwn on July 27, 2010, 11:02:18 am
Wow, this is awesome.  If you would be so kind as to send me the source code ;) I may be able to use it to play sound off a flash drive, which would be epic.
Title: Re: Sound for calculators with bad ram
Post by: thepenguin77 on July 27, 2010, 11:23:05 am
Sure, I'll send it to you when I'm done. The only problem is that you have only and exactly 182 t-states to get a byte. I'm not exactly sure how you'd do that with usb. But if you pull it off, that'd be nice.

Actually, the playing part is finished, compression's all I'm working on. You'll have to modify it a bit to fit your needs, but here's how it works. You have to figure out exactly how many t-states you have to work with. You do this by taking your processor speed and dividing it by your sample frequency. Mine is 15,800,000 / 22,050 = 716 t-states. Then you have to subtract the length of the subroutine, which is 516 delay + 41 = 557. You also have to subtract the code that makes the jump, 51. This leaves you with 716 - 557 - 51 = 108. But your not finished, you also have to exx out your code. So 108 - 4 - 4= 100. 100 t-states for 22,050. Going to 20,000 hz will give you an extra 74. So 174 is the magic number to work with.

As far as the source, you can delete all of the _44100: data. I just keep it because it took so long to make. You should also delete the _0: _1: stuff as that is my Huffman decompressor.

Memory wise. The whole thing runs in C000-FFFF. Which means that 4000-BFFF are free to use.
Title: Re: Sound for calculators with bad ram
Post by: Galandros on July 27, 2010, 01:31:55 pm
If we are reading from a usb flash drive, decompression shouldn't be needed, that could help.
Title: Re: Sound for calculators with bad ram
Post by: TIfanx1999 on July 27, 2010, 03:10:30 pm
1,196,032 bytes. The first 1 is cut off in the memory menu. But this number makes sense as divides to 73 pages.

Anyways, I am going to use huffman compression. I am hoping that 13 bits is enough for a maximum. I would then multiply that to 14 bits and use a 16k look up table. I am also going to cut the rate to 20,000 so that I will have 74 extra t-states to work with.
Wow, that's actually pretty large. O_o Are you going to allow an option on your converter to select different sample rates so that people can include longer pieces?
*edit* this reminds me alot of Jim E's Realsound. =)
Title: Re: Sound for calculators with bad ram
Post by: calcdude84se on July 27, 2010, 04:30:23 pm
This was inspired by Realsound ;D
Nice to see you have compression. I can't wait to see how much the size goes down :P
Title: Re: Sound for calculators with bad ram
Post by: thepenguin77 on July 28, 2010, 04:28:56 pm
Prepare for epicness. I wrote my huffman compressor, (which was actually somewhat hard), and it got a ratio of 60%. That means 2 min and 20 seconds of music.

But!... Some of the numbers are encoded as 19 bits. 12 bits has pushed my decompressor 8 t-states over my max, which is acceptable, but 19 is just out of the question. So I am going to try to sound clip the edges of the song to fix the problem. I'll make a cut off of say 30 instances, and anything with less than 30, gets bumped closer to $80. I'm hoping that this can give me a smaller prefix and thereby make this possible.

Edit:
    That number is more like 400, not 30.
Title: Re: Sound for calculators with bad ram
Post by: DJ Omnimaga on July 29, 2010, 05:40:28 pm
Darn, awesome!

And will you support lower sound quality too? It would be nice to be able to use sound effects or small songs inside games, or maybe have some sort of beatbox/music maker
Title: Re: Sound for calculators with bad ram
Post by: thepenguin77 on July 31, 2010, 02:31:00 pm
There were some problems. First, that 60%, came from my compressor not working. It actually does more like 20%. And second, the 20khz that it had to run at was too low of a frequency. My program does the voltage control by turning the link port on and off once per sample. One side of the delay is bigger than the other which means that a note about 10% lower than the frequency is played. This means that you are listening to music and the mosquito sound at the same time.

So I just went back to my old replace 78-88 with 1-15. It works nicely. I sent another song to my calc and had it run at 22700hz and it sounds basically like a cheap mp3 player.

Once I get my c++ program so it can take .wav files, I'll have to post it all. But currently it takes quite a bit of doing to get the song to convert.

@DJ, I don't see how I can do lower sound quality, I guess I could let it be 7 bit or 6 bit, but then there wouldn't be any compression. Also, the song has to be the only thing running, you wouldn't be able to play a game in the background. But if stalls are ok, then it would work.
Title: Re: Sound for calculators with bad ram
Post by: DJ Omnimaga on July 31, 2010, 06:07:36 pm
Ah ok, I thought lower quality would be easier than higher x.x. Weird

I was asking since someone did it with Guitar Hero 83+. It's up to you, though.
Title: Re: Sound for calculators with bad ram
Post by: alberthrocks on October 16, 2010, 10:52:34 am
This project is awesome.... yet it became stale on July 31st, 2010. :P
You do realize that this is an awesome alternative to RealSound, which requires those missing pages of RAM.
If we can fit a whole track of music in the calc, this will be the best! :D

So, can we revive this project? :D
Title: Re: Sound for calculators with bad ram
Post by: thepenguin77 on October 16, 2010, 12:48:54 pm
There's not much to work on. It's basically done. Full length tracks wouldn't work because they are too big, but 1 min ones do. I guess I could write a batch file or something to put the song together, but I'm not really sure what else I can work on.
Title: Re: Sound for calculators with bad ram
Post by: alberthrocks on October 16, 2010, 02:31:08 pm
There's not much to work on. It's basically done. Full length tracks wouldn't work because they are too big, but 1 min ones do. I guess I could write a batch file or something to put the song together, but I'm not really sure what else I can work on.

Meh, I was looking for that supposed compression you were talking about. :P
At the very least, get a little script and a link on the main page so I can find this project easier. :)
Title: Re: Sound for calculators with bad ram
Post by: calcdude84se on October 16, 2010, 02:47:39 pm
There's not much to work on. It's basically done. Full length tracks wouldn't work because they are too big, but 1 min ones do. I guess I could write a batch file or something to put the song together, but I'm not really sure what else I can work on.

Meh, I was looking for that supposed compression you were talking about. :P
At the very least, get a little script and a link on the main page so I can find this project easier. :)
There's compression; it's just not as good as you'd like it to be. I don't think it can be made any better, actually, without making it too slow, IIRC.
Title: Re: Sound for calculators with bad ram
Post by: ztrumpet on October 16, 2010, 04:52:50 pm
Wow, I can't wait for a user friendly version of this.  Cool! ;D
Title: Re: Sound for calculators with bad ram
Post by: DJ Omnimaga on October 17, 2010, 03:49:53 am
There's not much to work on. It's basically done. Full length tracks wouldn't work because they are too big, but 1 min ones do. I guess I could write a batch file or something to put the song together, but I'm not really sure what else I can work on.
It would be nice if a script was written to create the songs and release on ticalc.org. I wouldn't be surprised if this was newsworthy considering it supports new calcs as well. Was RealSound ever released on Ticalc anyway?
Title: Re: Sound for calculators with bad ram
Post by: thepenguin77 on November 14, 2010, 01:54:38 am
It's about time I finally put this one to rest.



And actually, this sounds a lot better in person, my digital camera doesn't have a good speaker.

Included are all the tools you'll need to make your own songs. I tried to make it as simple on the end user as possible, and I feel that with a youtube video (in 1080p btw (youtube only shows 720p though)) and a thorough readme, almost anyone can put songs on their calculator.
Title: Re: Sound for calculators with bad ram
Post by: DJ Omnimaga on November 14, 2010, 02:14:48 am
Wow amazing! Although it is cam recording the sound quality seems pretty good. I'll have to try this at one point. Great job! Are you planning to upload this on ticalc.org?

EDIT: Problem... sighs... stupid 64-bit Windows 7...

When I type convert MAGICHC (MAGICHC.wav is located under the wav directory), I get the following error:

"The program can't start because MSVCR100.dll is missing from your computer. Try reinstalling the program to fix this problem."

I get this even though I have MSVCR100.dll on my computer (under System32). I tried putting it in SysWOW64 instead and still got that error message. Same if I put it in the truSound directory. :/

Any help?

EDIT: Nvm, I finally figured out: truSound is dependent on Visual C++ runtimes, so you need to install this (http://www.microsoft.com/downloads/en/details.aspx?familyid=A7B7A05E-6DE6-4D3A-A423-37BF0912DB84&displaylang=en) to run it if you don't have Visual C++ installed.

EDIT 2: Btw, newer versions of Audacity (such as the Windows 7 compatible one) have a different Microsoft 8 bit PCM setting (Unsigned) and it doesn't appear to play the song at the right speed when converted to truSound. What I finally did is just doubling the speed of my song file in Audacity.

EDIT 3: Actually, 16 bit Signed PCM produces the same 8xk file size. Anyway, attached file below. (One of my last song)
Title: Re: Sound for calculators with bad ram
Post by: FinaleTI on November 14, 2010, 10:22:16 am
There's not much to work on. It's basically done. Full length tracks wouldn't work because they are too big, but 1 min ones do. I guess I could write a batch file or something to put the song together, but I'm not really sure what else I can work on.
It would be nice if a script was written to create the songs and release on ticalc.org. I wouldn't be surprised if this was newsworthy considering it supports new calcs as well. Was RealSound ever released on Ticalc anyway?
Realsound was released, and I think it was featured.

I just tried this in Wabbit and I love it! I just need to clean out my archive a little and I'll be using this on my calc.
Title: Re: Sound for calculators with bad ram
Post by: thepenguin77 on November 14, 2010, 11:23:33 am
DJ, thanks for finding the bug with the C++ runtime libraries. I've had several people tell me they weren't necessary, but I guess they are.

With the microsoft 8 bit pcm, I don't know what other format they could have used. 8 bit seems pretty straight forward to me. One possibility is that my speed test actually finds a glitch in wabbitEmu. The instruction ADC HL,BC runs 4 t-states too fast. WabbitEmu is supposed to run at 15,000,000 Hz which gives a proper sample rate of 15,000,000/696=21,552. But if you say that you had to double the speed, then there's a different problem.

So are you saying that an 8 bit song playing at twice the speed was the same size as a 16 bit file playing at the right speed?

And finally, wabbitEmu tends to add some really nasty high pitch noises into the song. (It might be the sound card too). So don't think that those are final. But surprisingly, you're song didn't do it DJ, that might be because it was made with a computer.
Title: Re: Sound for calculators with bad ram
Post by: ztrumpet on November 14, 2010, 11:29:37 am
This looks great.  Nice job ThePenguin!  How much space does about one second of sound take?
Title: Re: Sound for calculators with bad ram
Post by: thepenguin77 on November 14, 2010, 11:31:28 am
It takes a sample rate of bytes per second. So most calculators average around 23,000Hz making for 23,000 bytes per second. (This makes DCS look tiny :D)
Title: Re: Sound for calculators with bad ram
Post by: DJ Omnimaga on November 14, 2010, 01:20:55 pm
DJ, thanks for finding the bug with the C++ runtime libraries. I've had several people tell me they weren't necessary, but I guess they are.

With the microsoft 8 bit pcm, I don't know what other format they could have used. 8 bit seems pretty straight forward to me. One possibility is that my speed test actually finds a glitch in wabbitEmu. The instruction ADC HL,BC runs 4 t-states too fast. WabbitEmu is supposed to run at 15,000,000 Hz which gives a proper sample rate of 15,000,000/696=21,552. But if you say that you had to double the speed, then there's a different problem.

So are you saying that an 8 bit song playing at twice the speed was the same size as a 16 bit file playing at the right speed?

And finally, wabbitEmu tends to add some really nasty high pitch noises into the song. (It might be the sound card too). So don't think that those are final. But surprisingly, you're song didn't do it DJ, that might be because it was made with a computer.
8 bit unsigned PCM songs play at the exact same speed as the 16 bit signed ones. I wonder if it's because it's unsigned? Unfortunately Audacity got rid of the compression settings in preferences and you now select them when exporting to wav. However, 8 bit signed is not present there, neither is 16 bit unsigned.
Title: Re: Sound for calculators with bad ram
Post by: thepenguin77 on November 15, 2010, 03:05:11 pm
The reason you can't select 8 bit signed and 16 bit unsigned is because 8 bit unsigned and 16 bit signed are the default values.The unsigned 8 bits go from 0 to 255 and the signed 16 bits go from -32,767 to 32,768. In reality, it doesn't really matter whether it is signed or unsigned, as long as you know which one it is.

The 16 bit and 8 bit should come out to the same size and speed because my program converts the 16 bit to 8 bit. It also converts stereo to mono
Title: Re: Sound for calculators with bad ram
Post by: DJ Omnimaga on November 15, 2010, 10:06:47 pm
Oh ok, so then it was pointless from me to convert it to 8 bit, as I notice the quality is slightly better when converting a 16 bit WAV to 8xk than a 8 bit to 8xk.

Regardless, nice job on this. :)
Title: Re: Sound for calculators with bad ram
Post by: thepenguin77 on November 19, 2010, 11:29:35 pm
Question: I'm going to upload this to ticalc.org tonight, but, would it be ok to put the youtube link with the video?

I can't really post a proper screenshot of this, and the video makes it look amazing. So I'm kind of stuck because I feel like ticalc.org doesn't like links.
Title: Re: Sound for calculators with bad ram
Post by: DJ Omnimaga on November 20, 2010, 01:53:08 am
Travis Evans told you on IRC the other night to not put the link in the file description, so you would probably have to put it in the readme. I think links messes up their description systems. Just put a link in the readme and they'll be fine.
Title: Re: Sound for calculators with bad ram
Post by: TravisE on November 20, 2010, 04:47:10 am
Travis Evans told you on IRC the other night to not put the link in the file description, so you would probably have to put it in the readme. I think links messes up their description systems. Just put a link in the readme and they'll be fine.

Thanks for passing the word along. Until this question was asked, I hadn't really thought much about URLs in ticalc.org file descriptions; I just went ahead and approved them. But when I looked back in the logs, it turns out that some file archivers in the past did reject files for having URLs in the descriptions. There are a couple of issues: first, they can't be formatted as links (so users would have to manually copy and paste the URL to get to the page), and if the URL happened to be really long it could screw up the page formatting. So my conclusion is that it's maybe best to have the links in the readme or as a link in an HTML file in the ZIP somewhere or something similar that the description can point to.
Title: Re: Sound for calculators with bad ram
Post by: DJ Omnimaga on November 20, 2010, 05:05:15 am
Back in the days, MaxCoderz staff would put links to their site in all their descriptions and they would get through. Eventually, I tried doing the same but the URL (even if without the http://www part) was usually removed. With Youtube I can see how this would distort the page, though. Plus it makes the description a bit hard to read IMHO.
Title: Re: Sound for calculators with bad ram
Post by: thepenguin77 on November 21, 2010, 12:28:32 pm
Ok, thanks for telling me. I missed Travis's message on IRC so the file is already in the upload queue with the link in the description. If that is going to get rejected, should I just upload it again with a different description?

Edit:
   RealSound has a link in its description.
Title: Re: Sound for calculators with bad ram
Post by: DJ Omnimaga on November 21, 2010, 06:19:27 pm
Btw, coincidentially, the upload form hasn't been working for two days, now. It says an error. ???

If it has the description, you may want to update the upload (use the same file name) when the upload form works again.
Title: Re: Sound for calculators with bad ram
Post by: TravisE on November 23, 2010, 04:15:21 pm
I went ahead and approved the file since I haven't been rejecting files with links in descriptions in the past. If you want to remove the URL from the description, let me know and I can do it, or you can simply upload an update with an updated description (file upload form should be working again now).
Title: Re: Sound for calculators with bad ram
Post by: DJ Omnimaga on November 23, 2010, 11:09:38 pm
I thought he re-uploaded it? O.O

I guess update will do the job, then.

That reminds me, was RealSound ever uploaded to ticalc.org?
Title: Re: Sound for calculators with bad ram
Post by: JosJuice on November 24, 2010, 10:50:37 am
That reminds me, was RealSound ever uploaded to ticalc.org?
Yeah. I downloaded it from there.
Title: Re: Sound for calculators with bad ram
Post by: thepenguin77 on November 24, 2010, 11:20:06 am
Thanks Travis :D

RealSound (http://www.ticalc.org/archives/files/fileinfo/385/38513.html)
Title: Re: Sound for calculators with bad ram
Post by: DJ Omnimaga on November 24, 2010, 05:24:05 pm
That reminds me, was RealSound ever uploaded to ticalc.org?
Yeah. I downloaded it from there.
Ah ok, thanks for confirming. I wasn't sure since Revsoft staff don't always upload their releases there. (Wabbitemu)

Title: Re: Sound for calculators with bad ram
Post by: qazz42 on November 25, 2010, 11:05:58 am
Hmm, just got this from ticalc and I could use some help locating some castlevania wavs x.x

I tried everywhere and could use some help. thanks in a advance
Title: Re: Sound for calculators with bad ram
Post by: JosJuice on November 25, 2010, 11:13:51 am
Hmm, just got this from ticalc and I could use some help locating some castlevania wavs x.x

I tried everywhere and could use some help. thanks in a advance
Do you have any non-wav Castlevania music? Converting might be simpler than finding existing wav files.
Title: Re: Sound for calculators with bad ram
Post by: DJ Omnimaga on November 25, 2010, 08:46:48 pm
If you  find MP3s, you could just use Audacity software and convert them to WAV files.
Title: Re: Sound for calculators with bad ram
Post by: qazz42 on November 25, 2010, 08:50:44 pm
If you  find MP3s, you could just use Audacity software and convert them to WAV files.

ohh, audacity can do that? :O

thanks!
Title: Re: Sound for calculators with bad ram
Post by: Happybobjr on November 25, 2010, 09:01:50 pm
what exactly is meant by "bad ram" ?
Title: Re: Sound for calculators with bad ram
Post by: calcdude84se on November 25, 2010, 09:04:43 pm
That they only have 48KiB of RAM (as opposed to previous hardware versions which had 128KiB)
Title: Re: Sound for calculators with bad ram
Post by: Happybobjr on November 25, 2010, 09:06:52 pm
do you mean the ones w/o the extra ram pages?
Title: Re: Sound for calculators with bad ram
Post by: calcdude84se on November 25, 2010, 09:12:16 pm
Exactly :)
They only have 3 RAM pages instead of 8.
Title: Re: Sound for calculators with bad ram
Post by: DJ Omnimaga on November 25, 2010, 09:25:11 pm
If you  find MP3s, you could just use Audacity software and convert them to WAV files.

ohh, audacity can do that? :O

thanks!
You may need Lame MP3 encoder, but maybe not, since I recall Audacity being able to import MP3s without it. It's to export to MP3 that you need it, if I remember.
Title: Re: Sound for calculators with bad ram
Post by: qazz42 on November 25, 2010, 09:30:28 pm
perfection! Got it to work! thanks guys!
Title: Re: Sound for calculators with bad ram
Post by: DJ Omnimaga on November 25, 2010, 09:33:29 pm
Glad to hear! Keep in mind only like 1 minute of audio will fit on a 84+SE, though. I wonder if this could work with USB8x?
Title: Re: Sound for calculators with bad ram
Post by: FloppusMaximus on November 25, 2010, 11:14:00 pm
Glad to hear! Keep in mind only like 1 minute of audio will fit on a 84+SE, though. I wonder if this could work with USB8x?
Interesting question.  Maybe.  USB itself would certainly be fast enough, and I assume most Flash drives would be fast enough; the question is whether the calculator CPU is fast enough to push the bits around at the required rate.  I'm wondering whether you would need to buffer the data, or whether you could, through some extreme wizardry, read the bytes directly from the USB controller.  Either way, it would be an interesting and tricky program to write.
Title: Re: Sound for calculators with bad ram
Post by: DJ Omnimaga on November 26, 2010, 12:26:58 am
Yeah my concern was how fast could the calc could read the sound data from USB. Maybe quality could be decreased more, but at 4 bit it starts sounding weird and under that it just sounds awful.
Title: Re: Sound for calculators with bad ram
Post by: thepenguin77 on November 26, 2010, 01:03:07 am
I think it could be possible, it would just have to be a lot quieter. I currently use 2 t-states to differentiate between byte values. So that steals 512 t-states from my 696 t-state loop leaving me with 184 t-states. But only about 100 of those are usable. At this rate, I don't think usb communication would be possible. But, if I change it to 1 t-state per byte value. That would free up an extra 256 t-states. With 356, there is probably enough time to read stuff off of a flash drive. The only cost is that since all of the voltages are closer together, there would be less sound produced.
Title: Re: Sound for calculators with bad ram
Post by: DJ Omnimaga on November 26, 2010, 01:04:44 am
Ah ok, so it would be something involving sound volume? Or do you mean lowering quality would make it quieter?
Title: Re: Sound for calculators with bad ram
Post by: thepenguin77 on November 26, 2010, 01:09:17 am
It would be quieter because there would be less time devoted to actually playing the music. The way it is now, 3/4 of the time is spent messing with the link port, and the other 1/4 is used to get the next byte. But if I need to take longer to get the byte, that means that only 1/3 of the time is used to mess with the link port.

So basically, just to put some random numbers in, instead of the voltage range being 1-5 V, it's now 2-4 V since it's being changed very quickly.
Title: Re: Sound for calculators with bad ram
Post by: DJ Omnimaga on November 26, 2010, 01:16:29 am
Oh ok. Would this cause some sort of crunchy sound or will it still sound the same?

I guess it would still be ok, though, if someone got loud headphones or something.
Title: Re: Sound for calculators with bad ram
Post by: thepenguin77 on November 26, 2010, 11:12:05 am
The sound quality should probably be the same as long as the flash drive cooperates. But for every delay the flash drive pulls out, you'll hear a click.
Title: Re: Sound for calculators with bad ram
Post by: qazz42 on November 26, 2010, 12:07:37 pm
Hmm, interesting. I still need to find a USB converter if that were to be made possible, anyone know a good converter?

EDIT: Aww, I had a typo and no one told me ;.;
Title: Re: Sound for calculators with bad ram
Post by: tloz128 on November 26, 2010, 02:06:17 pm
@thePenguin77
So if the sound is quieter because of the extra processing going on, couldn't you just amplify the sound in hardware?
Title: Re: Sound for calculators with bad ram
Post by: JosJuice on November 26, 2010, 02:20:34 pm
@thePenguin77
So if the sound is quieter because of the extra processing going on, couldn't you just amplify the sound in hardware?
Yes, but not in the hardware of the calculator. You would need something external.
Title: Re: Sound for calculators with bad ram
Post by: calcforth on November 26, 2010, 06:33:17 pm
Hmm, interesting. I still need to find a USB converter if that were to be made possible, anyone know a good converter?
There are quite a few offers (http://shop.ebay.com/i.html?_nkw=%22mini+a%22+usb+otg&_sacat=0&_stpos=&_sop=15&gbr=1&_odkw=mini+usb+otg) but it's hard to say which are usable and which are not...
Title: Re: Sound for calculators with bad ram
Post by: DJ Omnimaga on November 26, 2010, 07:14:56 pm
I wonder how loud can sound be on a TI-Nspire, assuming we manage to figure out how to have sound in Nspire mode...
Title: Re: Sound for calculators with bad ram
Post by: Happybobjr on November 27, 2010, 02:40:35 pm
i ran Asm(trusound   It gave me 2H
What does that mean?
Title: Re: Sound for calculators with bad ram
Post by: alberthrocks on November 27, 2010, 03:11:24 pm
USB support would be awesome! :D

Also, I'm really looking forward to a version that doesn't crash my calc, and can be created with a program (and not hex editing!)
Title: Re: Sound for calculators with bad ram
Post by: thepenguin77 on November 27, 2010, 08:06:52 pm
i ran Asm(trusound   It gave me 2H
What does that mean?

What did you even do? I don't see how you could possibly run an app with Asm(.

USB support would be awesome! :D

Also, I'm really looking forward to a version that doesn't crash my calc, and can be created with a program (and not hex editing!)

There's no hex editing involved. Just some audacity stuff, which is unavoidable. And how does it crash?
Title: Re: Sound for calculators with bad ram
Post by: ztrumpet on November 27, 2010, 08:15:25 pm
Hmm, interesting. I still need to find a USB converter if that were to be made possible, anyone know a good converter?

EDIT: Aww, I had a typo and no one told me ;.;
Here's what I have: https://serialio.com//store/product_info.php?products_id=456&osCsid=7386c8b72d3d3738d41885be5c210cd5
Title: Re: Sound for calculators with bad ram
Post by: Happybobjr on November 27, 2010, 08:51:21 pm
i ran Asm(trusound   It gave me 2H
What does that mean?

What did you even do? I don't see how you could possibly run an app with Asm(.

USB support would be awesome! :D

Also, I'm really looking forward to a version that doesn't crash my calc, and can be created with a program (and not hex editing!)

There's no hex editing involved. Just some audacity stuff, which is unavoidable. And how does it crash?


I meant Truspeed.

Also, I got it fixed. I had to change my mode to classic instead of math print.
Title: Re: Sound for calculators with bad ram
Post by: Happybobjr on November 28, 2010, 08:58:15 pm
so is music through the usb being worked on? or was that just wishing around?
Title: Re: Sound for calculators with bad ram
Post by: thepenguin77 on November 28, 2010, 09:07:32 pm
I'm not currently working on it. Maybe some other time, but as of now, no.
Title: Re: Sound for calculators with bad ram
Post by: qazz42 on November 28, 2010, 09:20:50 pm
wait, what is t
Hmm, interesting. I still need to find a USB converter if that were to be made possible, anyone know a good converter?

EDIT: Aww, I had a typo and no one told me ;.;
Here's what I have: https://serialio.com//store/product_info.php?products_id=456&osCsid=7386c8b72d3d3738d41885be5c210cd5

Oh, pretty nice! I plan to get this then :D
Title: Re: Sound for calculators with bad ram
Post by: FloppusMaximus on November 29, 2010, 11:11:44 pm
I might give the audio-from-a-USB-drive idea a try.  I guess I need to learn how the MSD protocol works, though. :P

(Does anybody know where to find a 2.5mm-to-3.5mm adapter that fits in an 84+'s link port?)
Title: Re: Sound for calculators with bad ram
Post by: calc84maniac on November 29, 2010, 11:26:53 pm
(Does anybody know where to find a 2.5mm-to-3.5mm adapter that fits in an 84+'s link port?)
If you have a standard 2.5mm TI link cable, you can put an adapter on one end of that and put the other end in the link port. It's pretty reliable (and gives more flexibility) :)
Title: Re: Sound for calculators with bad ram
Post by: FloppusMaximus on November 29, 2010, 11:28:21 pm
I'll give that a try.  Thanks.
Title: Re: Sound for calculators with bad ram
Post by: thepenguin77 on November 29, 2010, 11:28:48 pm
I recently got mine from radio shack, (I lost my old one). It was $10. Overpriced, but it works. It also has a third band for a microphone, but it didn't interfere.
Title: Re: Sound for calculators with bad ram
Post by: DJ Omnimaga on November 30, 2010, 04:27:14 am
I got mine there for $5 a few years ago, before all Radio Shacks in Canada got renamed to The Source by Circuit City then later The Source. Afterward, most cables/adapters prices doubled.

Xbox headsets (not the 360) also work but there's only one earphone.

Alternatively, you can use the old-skool way described on most ancient TI-83+ websites: an AM radio on a channel with static, but beware: quality is terrible. :P
Title: Re: Sound for calculators with bad ram
Post by: Happybobjr on November 30, 2010, 04:55:36 pm
I might give the audio-from-a-USB-drive idea a try.  I guess I need to learn how the MSD protocol works, though. :P

(Does anybody know where to find a 2.5mm-to-3.5mm adapter that fits in an 84+'s link port?)

you can buy one from radio shack for $6.
Just make sure you have a sander and a steady hand, so you can remove some plastic from it.  As it is a tiny bit to big.

Note: NOT the plastic bands on the jack.
Title: Re: Sound for calculators with bad ram
Post by: ztrumpet on November 30, 2010, 04:59:15 pm
I bought mine from Radio Shack about a year ago for about $7.  It's stereo (not mono) and did not require any modification to fit into my calcs. :)
Title: Re: Sound for calculators with bad ram
Post by: Happybobjr on November 30, 2010, 05:35:54 pm
what calc you got?
Title: Re: Sound for calculators with bad ram
Post by: FinaleTI on November 30, 2010, 06:01:16 pm
I got my first one from Radioshack for 2-3 dollars I think (it was couple years ago, so...). Guess I got lucky.
More recently I've been using phone headphones, and when the pair that came with my phone broke, I bought a pair of headphones from our Verzion store.
I got really lucky and it turns out it was a pair of regular headphones with an adapter, and the adapter works better than anything else I'd used before.
Title: Re: Sound for calculators with bad ram
Post by: DJ Omnimaga on December 01, 2010, 04:40:34 am
I might give the audio-from-a-USB-drive idea a try.  I guess I need to learn how the MSD protocol works, though. :P

(Does anybody know where to find a 2.5mm-to-3.5mm adapter that fits in an 84+'s link port?)

you can buy one from radio shack for $6.
Just make sure you have a sander and a steady hand, so you can remove some plastic from it.  As it is a tiny bit to big.

Note: NOT the plastic bands on the jack.
really? ???
With my 83+ I did not need to modify my adapter at all to fit it in. It's a bit loose, though...
Title: Re: Sound for calculators with bad ram
Post by: Happybobjr on December 01, 2010, 06:02:44 pm
The 84+SE (and 84+ i think)  Have an indent of about half an inch into the calc.
Title: Re: Sound for calculators with bad ram
Post by: JustCause on December 01, 2010, 06:23:20 pm
I might give the audio-from-a-USB-drive idea a try.  I guess I need to learn how the MSD protocol works, though. :P

(Does anybody know where to find a 2.5mm-to-3.5mm adapter that fits in an 84+'s link port?)

you can buy one from radio shack for $6.
Just make sure you have a sander and a steady hand, so you can remove some plastic from it.  As it is a tiny bit to big.

Note: NOT the plastic bands on the jack.
really? ???
With my 83+ I did not need to modify my adapter at all to fit it in. It's a bit loose, though...
I ran into this problem too. Happily, the Pulse smartpen comes with a flawless set of 2.5mm headphones.
Title: Re: Sound for calculators with bad ram
Post by: DJ Omnimaga on December 02, 2010, 12:25:10 am
The 84+SE (and 84+ i think)  Have an indent of about half an inch into the calc.
Ouch, I see now. :/
Title: Re: Sound for calculators with bad ram
Post by: FloppusMaximus on December 11, 2010, 11:05:51 pm
I've been mulling this over for the past couple weeks.  I think it should just barely be possible to play 8-bit, monophonic audio at 44.1 kHz, if the USB drive is fast enough at responding to commands.  (Hopefully it should be, seeing as these devices are designed to work at high speed, but I'm not sure.  It would be interesting to know how long the 84+'s USB controller waits to retry after receiving a NAK.)

This is, however, going to be a very difficult program to write: even though I know all the pieces, and more-or-less how they'll fit together, I expect it'll take a couple of months even to get to the point of being able to test it.  So don't expect this to be finished right away. :)
Title: Re: Sound for calculators with bad ram
Post by: DJ Omnimaga on December 13, 2010, 12:38:51 am
It would be cool if you succeed. I hope you don't have too much troubles getting it working. Good luck :D
Title: Re: Sound for calculators with bad ram
Post by: qazz42 on December 18, 2010, 09:25:39 am
I've been mulling this over for the past couple weeks.  I think it should just barely be possible to play 8-bit, monophonic audio at 44.1 kHz, if the USB drive is fast enough at responding to commands.  (Hopefully it should be, seeing as these devices are designed to work at high speed, but I'm not sure.  It would be interesting to know how long the 84+'s USB controller waits to retry after receiving a NAK.)

This is, however, going to be a very difficult program to write: even though I know all the pieces, and more-or-less how they'll fit together, I expect it'll take a couple of months even to get to the point of being able to test it.  So don't expect this to be finished right away. :)

If there is something testable, I will be glad tot help

I really must get of my lazy ass and get myself a usb converter... I still need to know which would be the best ocnverter
Title: Re: Sound for calculators with bad ram
Post by: thepenguin77 on December 18, 2010, 11:16:17 am
If you don't want to buy anything, you can just do this (http://ourl.ca/7646/142328). But you have to have a usb female big A adapter lying around.
Title: Re: Sound for calculators with bad ram
Post by: FloppusMaximus on December 18, 2010, 10:49:59 pm
If there is something testable, I will be glad tot help

I really must get of my lazy ass and get myself a usb converter... I still need to know which would be the best ocnverter
Thanks.  I will definitely let you guys know when I have something that can be tested.

As far as USB adapters go, they can indeed be tricky to find.  I have one that was part of an adapter kit, which I believe I got from Target, and which was ridiculously overpriced.  I did get a nice long standard-A extension cable out of it, though.

Another option would be to find a small USB hub with a mini-B socket; you could connect that to the calculator using a calc-to-calc cable, and connect whatever peripheral you like to the other side.
Title: Re: Sound for calculators with bad ram
Post by: ralphdspam on February 01, 2011, 01:14:56 am
I can't convert the wav file  ???
I am running 64 bit Windows 7 Home Premium.
I DO have the C++ runtime installed.
For some reason, the doubleclickme.bat says I do not have MSVCR100.dll.
When I checked C:\Windows\System32 there IS MSVCR100.dll
 :banghead:  Can somebody tell me what i am doing wrong?
Title: Re: Sound for calculators with bad ram
Post by: qazz42 on February 01, 2011, 03:04:29 pm
I think you might need to move it into the directory of the file it looks for it in...
Title: Re: Sound for calculators with bad ram
Post by: thepenguin77 on February 01, 2011, 03:10:05 pm
That's odd.

Try installing both the x86 and x64 versions. I have no idea where I heard it, but I feel like sometimes it errors on 64 bit machines that only installed one.

x86 (http://www.microsoft.com/downloads/details.aspx?FamilyID=a7b7a05e-6de6-4d3a-a423-37bf0912db84&displaylang=en)
x64 (http://www.microsoft.com/downloads/details.aspx?familyid=BD512D9E-43C8-4655-81BF-9350143D5867&displaylang=en)
Title: Re: Sound for calculators with bad ram
Post by: DJ Omnimaga on February 01, 2011, 03:24:33 pm
Yeah I had such issues before with dll files under Windows 7. often I have to copy them in the directory. They say it's a bad practice but sometimes we're left with no other choice. :/

Welcome on the forums by the way ralphdspam!
Title: Re: Sound for calculators with bad ram
Post by: ralphdspam on February 01, 2011, 10:30:28 pm
That's odd.

Try installing both the x86 and x64 versions. I have no idea where I heard it, but I feel like sometimes it errors on 64 bit machines that only installed one.

x86 (http://www.microsoft.com/downloads/details.aspx?FamilyID=a7b7a05e-6de6-4d3a-a423-37bf0912db84&displaylang=en)
x64 (http://www.microsoft.com/downloads/details.aspx?familyid=BD512D9E-43C8-4655-81BF-9350143D5867&displaylang=en)

Thanks.  I just had to install the 32 bit version.    ::)
Title: Re: Sound for calculators with bad ram
Post by: DJ Omnimaga on February 01, 2011, 11:41:43 pm
Could they actually be swapped? I think I had this happen with java programs before, my computer could run 32 bit java programs but not 64 bit ones, even though I run a 64 bit OS...
Title: Re: Sound for calculators with bad ram
Post by: ralphdspam on February 02, 2011, 12:19:52 am
Could they actually be swapped? I think I had this happen with java programs before, my computer could run 32 bit java programs but not 64 bit ones, even though I run a 64 bit OS...

No, I already had the x64 version installed (I actually reinstalled it and re-downloaded it multiple times).  I just installed the x86 version of the MSV C++, and the program worked.  (For a lot of codecs and libraries I end up having to install both the 32 bit and 64 bit for the program/file to run properly.)
Title: Re: Sound for calculators with bad ram
Post by: DJ Omnimaga on February 02, 2011, 12:20:56 am
Ah ok I see. Well I'm glad it works at least. :)
Title: Re: Sound for calculators with bad ram
Post by: z80man on February 24, 2011, 09:13:06 pm
I just ran truspeed and got 16487412 Hz. That seems to be quite high to me because I thought all 84's were at 15 MHz
Title: Re: Sound for calculators with bad ram
Post by: thepenguin77 on February 24, 2011, 10:53:24 pm
The 84+'s are supposed to be 15MHz. But the careful technique I use in that program shows that they are much faster than that. I know it works because if wabbitemu had the proper clock cycles for adc a, imm8, it would show exactly 15,000,000Hz, which is exactly what it's clocked to. (I forget the math, but if you adjust the number, it comes out right.)

And if you're still not a believer, take a song clocked for your calculator and run it in wabbitemu or vice versa. In wabbitemu it will crawl and on your calculator it will go way too fast.
Title: Re: Sound for calculators with bad ram
Post by: z80man on February 24, 2011, 11:01:02 pm
Thanks. Also when trying to convert a song I can not get through because page 7 starts with FF. Do you know anyway to get rid of that. I also tried running through the steps one at a time and I tried over riding the error with -f, but then the app became invalid when I tried to send it through TI - connect.
Title: Re: Sound for calculators with bad ram
Post by: thepenguin77 on February 24, 2011, 11:05:52 pm
That's an annoying problem with a super easy fix by me, but it's not worth the re-release. So what I would recommend is to go into audacity and change anything. Just about any change you do should fix this problem because FF is about the rarest byte in the whole program. It is eliminated at first, then it is only used for marking the end of the song. But I guess theoretically it could pop up in compression.
Title: Re: Sound for calculators with bad ram
Post by: z80man on February 24, 2011, 11:24:48 pm
Even with a ton of changes I still get the error. I think I will just try a different song, but I will miss Still Alive on my calc.  :(
Title: Re: Sound for calculators with bad ram
Post by: DJ Omnimaga on February 28, 2011, 01:46:38 am
The 84+'s are supposed to be 15MHz. But the careful technique I use in that program shows that they are much faster than that. I know it works because if wabbitemu had the proper clock cycles for adc a, imm8, it would show exactly 15,000,000Hz, which is exactly what it's clocked to. (I forget the math, but if you adjust the number, it comes out right.)

And if you're still not a believer, take a song clocked for your calculator and run it in wabbitemu or vice versa. In wabbitemu it will crawl and on your calculator it will go way too fast.

With RealSound songs they seem to play a bit faster than the original in WabbitEmu, though. ???
(Old video btw. I no longer have this file)