Jump to content
IGNORED

Press Play on Tape, generating TI-99/4a cassette sounds in Javascript


Fredrik Öhrström

Recommended Posts

I just added a little hack to http://nivelleringslikaren.eu/ti994a_basic/

 

You can now press "Play Tape" and it will play audio that is compatible with your cassette interface on your TI99/4a.

I.e. just plug the cassette cable into your laptop, crank the volume up, OLD CS1, press "Play Tape".

As before, you can upload/download TIFILES into the editor.

 

It works nicely for me. Tested with Firefox on my MacBook. Curious how/if it works on Windows/Explorer etc....

 

//Fredrik

 

 

  • Like 5
Link to comment
Share on other sites

I expect that it will work well, but some Windows-specific laptops may have issues as a lot of them (Dell, HP, Toshiba, in my experience) actually cut the volume when something is plugged into the headphone port. It should work fine as the output from a real tape player is headphone level.

Link to comment
Share on other sites

I expect that it will work well, but some Windows-specific laptops may have issues as a lot of them (Dell, HP, Toshiba, in my experience) actually cut the volume when something is plugged into the headphone port. It should work fine as the output from a real tape player is headphone level.

 

 

Back in my Amateur Radio days, we had sound cards like this one....

slusb.gif

It's a little over kill for our use on the TI, but maybe something less expensive like the one pictured below with the supplied link MIGHT do the job if someone is interested.

 

 

$_35.JPG

 

eBay Auction -- Item Number: 3806657502961?ff3=2&pub=5574883395&toolid=10001&campid=5336500554&customid=&item=380665750296&mpt=[CACHEBUSTER]

Link to comment
Share on other sites

 

 

$_35.JPG

 

<< EBAY LINK >>

Has anyone tried something like this one with success?

 

Was used similar at a bar for the DJ computer. Worked just fine. Nice thing about it was the lack of digital noise which often accompanies on-board sound cards.

 

Also, in case you had not seen it:click-through revenue for AtariAge eBay links

  • Like 2
Link to comment
Share on other sites

 

Was used similar at a bar for the DJ computer. Worked just fine. Nice thing about it was the lack of digital noise which often accompanies on-board sound cards.

 

Also, in case you had not seen it:click-through revenue for AtariAge eBay links

 

I'd love to do that, I know the proper button on AA, but how do I get the proper number to stick in? Once I know how to do that, I'll go back, edit the OM and do that from now on.

Link to comment
Share on other sites

Well, the audio requirements for the TI is not really HIFI, more like: 2758 samples per second at 1 bit per sample.

 

But the smallest audio file is 8bits unsigned, so I flip betwee 0 and 255.

 

Interestingly, when I tried 2758 samples/s, something in the Browser/OS thought that it should help out and improve the audio, thus making a continuous curve of the samples, effectively low pass filtering the sound and this prevented the TI to understand it. I had to increase the sample rate with a factor four, to a whopping 11032 samples/s to make sure that it was enough of a square wave even after the smoothing. :-)

  • Like 1
Link to comment
Share on other sites

Well, the audio requirements for the TI is not really HIFI, more like: 2758 samples per second at 1 bit per sample.

 

But the smallest audio file is 8bits unsigned, so I flip betwee 0 and 255.

 

Interestingly, when I tried 2758 samples/s, something in the Browser/OS thought that it should help out and improve the audio, thus making a continuous curve of the samples, effectively low pass filtering the sound and this prevented the TI to understand it. I had to increase the sample rate with a factor four, to a whopping 11032 samples/s to make sure that it was enough of a square wave even after the smoothing. :-)

 

Does the original sound recorded from a TI have a positive bias? I noticed when sampling from a few arcade games (well, from MAME) that the sound is all on the positive side. That could just be MAME doing that, though.

 

I wonder if the smoothing is part of the Mac sound system. I might be able to give this a shot on my Windows machine tomorrow or so. Lots of stuff going on right now.

Link to comment
Share on other sites

Do you get read errors, or nothing found?

 

Nothing found. But I have to say, I don't have a tape recorder so I haven't tried to use that cable before. I wasn't even sure which end to stick into the PC, but I found out it was the white one. I guess there could also be a problem with the cassette port? I will try again tonight.

 

This was just the type of program I was looking for when I first got interested in the TI-99/4a again and had bought an unexpanded console.

Link to comment
Share on other sites

 

Nothing found. But I have to say, I don't have a tape recorder so I haven't tried to use that cable before. I wasn't even sure which end to stick into the PC, but I found out it was the white one. I guess there could also be a problem with the cassette port? I will try again tonight.

 

This was just the type of program I was looking for when I first got interested in the TI-99/4a again and had bought an unexpanded console.

When the TI is reading, you should be able to hear the cassette audio through the tv speaker and the loudness should be similar to the default beeps when starting the TI.

 

If you have to turn up your TVs volume significantly to hear it, so that the TI beeps become unbearable, then the output from the laptop is not enough.

Link to comment
Share on other sites

Well, it works... but only with READABLE BASIC programs. I have one here that is partly unreadable (created with the Playground utilities), and here it seems like only the readable part is being put out on tape. I've attached it for investigation, in TI files fomat because that's what the Javascript program reads. To test it, you would have to load it as a BASIC program from TI BASIC and then run it. Then it needs the speech synthesizer attached to run properly (but nothing else). ;-) I've zipped it because Atariage won't accept TI files without an extension.SPEECHBAS.zip

Link to comment
Share on other sites

Well, it works... but only with READABLE BASIC programs. I have one here that is partly unreadable (created with the Playground utilities), and here it seems like only the readable part is being put out on tape. I've attached it for investigation, in TI files fomat because that's what the Javascript program reads. To test it, you would have to load it as a BASIC program from TI BASIC and then run it. Then it needs the speech synthesizer attached to run properly (but nothing else). ;-) I've zipped it because Atariage won't accept TI files without an extension.attachicon.gifSPEECHBAS.zip

 

Indeed, and the reason is that the web-editor actually decodes the TIFILE first, displays the text, the recompiles into the binary when you press play tape. Any superfluous data not found in the line number table will be lost at the first decode.

 

However, it would be cool to support hardwired binary data as well. It would be easy to upload into an editor mode that is pure hex.

And then press play would play that exact binary data, no decode/recompile etc.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...