Jump to content

A.L. sound converter


Recommended Posts

Spent the majority of the day yesterday working on a new tool to convert XB "CALL SOUNDs" to AL format to be CALL LOADed. With some learning pains and with some marvellous help from Tursi, I was able to complete the program in a day.

I had a soundlist in XB, Tursi wrote me a little tutorial on how to convert it by hand, and Mark Wills inspired me to write a converter tool. It started as just a little text input and output and grew from there. Now it is done for the most part (it does the job) but it has a couple little bugs, for instance--it is not safeguarded against user error.... If you don't input the info correctly and receive an ERROR, you will have to reatart the program.... But it's pretty fast. As this is the BETA release, I am hoping some of you would be willing to give me some debug ideas. Feel free to suggest changes, whatnot. Version 1BETA (the current version) supports 1 CALL SOUND at a time, and copies directly to the CLIP in Classic99. This version is primary for emulation, as I have not implemented DV80 DSK support yet for saving your assembly BYTE list. It WILL run on a real TI, but you would have to write the converted values down, as they can not yet be saved to DSK. I would love some suggestions for V1.1, which I intend to release at the Faire as part of a special package I'm working on. Here are the planned upgrades for the next version...


1) Added DSK support

2) Ability to convert multiple CALL SOUNDs At once

3) "Import" function.... Load a pre-saved XB MERGE file into the program and it will kick out the info automatically.

4) a complete automation of the AL implementation. I want the next version to not just give you the BYTEs, but to write a complete sourcefile and save it to DV80 format.


As of now, it's a bit tedious to type all the fields in by hand, but it is MUCH MUCH faster than doing it by hand. :). I'll attach the zipfile to my next post here containing the program. Thanks to Tursi again for being a teacher and to Mark Wills for inspiring this program.


I hope some of you XBers can get some use out of this. I am in the process of writing the short "How To" manual for using the program and how to convert the output BYTEs into an assembly sourcefile.



Link to comment
Share on other sites

Hmmm... Really?? Go to theharmlesslion.com and DL the newest version. It should come totally set up and ready to go. Send me your email address and I'll send you the code to paste into Classic99.... It's a bit long for me to want to paste it here, but I'd be happy to send you the program, text style

Link to comment
Share on other sites


You can use TI99Dir to view file contents, copy them, and then paste it into Classic99. :)


The goal of this project, as I saw it, was to allow XB programmers to be able to create source code (and subsequently object code) to run their music via CALL LOAD, CALL LINK so that it would play in the background of their XB games while the XB program functions normally... This is the first step--- with the manual (which is in the works) this will be a pseudo-complete conversion tool for that purpose. In the next release, I plan to make it a fully complete tool---outputting true assembly source code. :)

Edited by Opry99er
Link to comment
Share on other sites

Thanks Owen, got it to work with your suggestion of pasting from TI99Dir. That's slick! Here are the only suggestions I have at this point:


(1) A key that lets you skip the intro text once you've run the program a few times.

(2) Additional text with each prompt that shows you the valid ranges, such as "PLEASE ENTER THE VOLUME OF YOUR FIRST CHANNEL (0-30)".

(3) Far more ambitious, it would be cool if this was eventually a kind of form, where it would keep the values and let you edit them or play them, so that you could use it as a kind of synth tool. Here's a code snippet that mocks up what I mean.


320 DISPLAY AT(2,2):"[D] DURATION  ="
330 DISPLAY AT(2,18):"1000"
350 DISPLAY AT(4,2):"[1] CH 1 FREQ ="
360 DISPLAY AT(4,18):"600"
380 DISPLAY AT(6,2):"[2] CH 1 VOL  ="
390 DISPLAY AT(6,18):"10"
400 DISPLAY AT(8,2):"[3] CH 2 FREQ ="
410 DISPLAY AT(8,18):"1200"
420 DISPLAY AT(10,2):"[4] CH 2 VOL  ="
430 DISPLAY AT(10,18):"15"
440 DISPLAY AT(12,2):"[5] CH 3 FREQ ="
450 DISPLAY AT(12,18):"850"
460 DISPLAY AT(14,2):"[6] CH 3 VOL  ="
470 DISPLAY AT(14,18):"5"
830 CALL KEY(0,K,S)
840 IF S<>1 THEN 830


Anyway, good tool, however you pursue it. Thanks for sharing it!

Link to comment
Share on other sites

Great suggestions!!! I had included all the field values in my manual--- but having them on screen would be great as well. I'll have to test out your code later today to see what you're talking about... I can gather the general idea by looking at the code. Great suggestion! :). I am hoping to be able to release the true Version 1 right after Honeycomb is complete... I will be adding a few of these ideas to the existing program as well as safeguarding it from user error. V1.1, as I wrote earlier, will hopefully have "IMPORT" and "CREATE SOURCE" options as well... Really streamline it! :). Thanks, your suggestions are most welcome.

Link to comment
Share on other sites


Your suggestionS #2 and #3 will be implemeted today... The program stores the input values into the following variables


1) DURA=duration

2) FREQ1

3) VOL1

4) FREQ2

5) VOL2

6) FREQ3

7) VOL3


these are already stored and are easily accessible for modification. The following will appear before it plays the sound::






upon pressing "E", the prompt to enter the values will recycle, but the pre-existing values will remain on the screen until they are changed. This will be easy to do, and I wouldn't have thought about it without your suggestion. :). Thanks!!!

Link to comment
Share on other sites

I actually wrote an article a few years ago when I was doing sound work for my CRPG... Once you get used to it, the assembly sound system is pretty much like the BASIC one, and with a lot more control.


The only downside is that for advanced sounds (looping, reverb), the ISR routine isn't the best choice, since it's a data-only approach.


You can read the article here: http://www.adamantyr.com/crpg/article_09.htm



Link to comment
Share on other sites

Thanks for the info! I'll be updating this BETA version throughout the next week or so until I get it complete enough to do a "Version 1" official release. It won't be the V1.1 that will include all the new functions I stated previously, but I will probably be able to have DSK access and the ability to edit and modify before converting. I also just discovered that Ben Yates (brilliant programmer) has written a utility that has a similar function to this one which is available at ftp.whtech.com. However, I have not tried it out yet. =) I'll be posting "paste" updates to this thread as new features become available... You will be able to just copy what I post and paste it into your existing "CONVERT" program to add the new features. Thanks for all the support and suggestions so far. I hope this utility helps some of you XB programmers out there.



Link to comment
Share on other sites



Paste this over your existing program code. =)



160 CALL SOUND(200,220,3,330,3,554,1) :: CALL SOUND(200,220,3,330,3,494,1) :: CALL SOUND(800,220,3,330,3,554,1)

340 DISPLAY AT(20,1):DURA;

370 DISPLAY AT(20,6):FREQ1;

400 DISPLAY AT(20,10):VOL1;

430 DISPLAY AT(20,13):FREQ2;

460 DISPLAY AT(20,18):VOL2;

490 DISPLAY AT(20,22):FREQ3;

520 DISPLAY AT(20,27):VOL3;


522 CALL KEY(0,K,S)

523 IF S=0 THEN 522

524 IF K=80 THEN 570 :: IF K=67 THEN 590 :: IF K=69 THEN 320 ELSE 522





575 goto 521



This is the first change to the program. Thanks, Codex... makes the user interface alot more slick!

Edited by Opry99er
Link to comment
Share on other sites

Nice, it makes tuning the sound much easier! Good work man!


Just curious, is it possible to have it keep the old value for an input if you just press ENTER, or is that a nightmare with TI keyreading in BASIC? I seem to remember key input handling was less than friendly in my days of coding. :)

Link to comment
Share on other sites

Alright... I thought rather than keep posting updates... I'll just set you up here with another zipfile.




**Now gives on-screen values of valid ranges for each field.


Will get to the actual ON ERROR stuff later... that's not the fun part. =) Easy, but dull


Download::: CONVERT V1(BETA.2)




Edited by Opry99er
Link to comment
Share on other sites

Here are some ideas:


1. Add possibility to skip introduction screens.

2. Add possibility to save to disk instead of clip device (for those people that still develop on the real deal)


By the way, can I include a version of your utility in the next version of SPECTRA ?


It has a sound player that replaces the ISR version (for those people who don't want to use ISR) and your program

is a great way to generate the required sound lists ;)

Link to comment
Share on other sites


Thanks for the suggestions!!!! I appreciate you taking the time to try this out. :). I am currently adding several small features to this current program--- DSK support is one of them. I'll write a quick bypass for the intro text this morning. :). You are MORE than welcome to use this program for SPECTRA... I'd be honored. If you read one if the first posts on this thread, you can read the upgrades that I am planning to make--- IMPORT, DSK access, OUTPUT into source code..... I'm hoping to make this a quality utility that will be useful to the community. :). Again, thanks man.

Link to comment
Share on other sites

Well--- lots of new updates coming.... Mark Wills is taking this little program and running with it--- He hasn't even told me what he has been working on, so all I know is that he will be completing his portion of the programming and sending it to me. :). According to Willsy, and I'm quoting here...... "You're gonna piss your pants.". :). I guess that's a good thing. :). Hehehe---


Hoping to have a postable updated version later today... :)

Link to comment
Share on other sites

V1(BETA.2) is pretty nice.... It's not fully featured yet, but it's much more slickly presented, fucntions more seamlessly, and makes the whole

process more understandable... Lord only knows what Willsy will do with it. When he gets bent on something, it can get pretty ridiculous, pretty fast. I've learned to trust him. :)

Link to comment
Share on other sites

  • 8 months later...

Update::: Willsy has taken over the modifications and add-ons to this program. :). Was wondering when that Uzbekistani pirate would start workin on it. :). Hehe <jk> Mark. Anyway, with Mark Wills on the job, you guys can expect this program to exceed all expectations. :)

I'll be looking into this area (see topic) in the near future. I was wondering what route this were taking ? :)

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.

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.

  • Recently Browsing   0 members

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