Omnimaga
Calculator Community => TI Calculators => General Calculator Help => Topic started by: p2 on June 14, 2011, 11:36:41 am
-
If I want to create a BASIC-Program, which should contain sound, I'll have to use Axe.
BUT how to create a program with sounds, if it should run on a TI-84+ without any special APPs, too? ???
Maybe I need to sent 2 PRGMs to another TI:
One BASIC-program and one ASM-subprogram
(Michael Lee has told me that)
But I've never learned ASM-programming, just Basic. :banghead:
-
If I want to create a BASIC-Program, which should contain sound, I'll have to use Axe.
BUT how to create a program with sounds, if it should run on a TI-84+ without any special APPs, too? ???
If you compile a program in Axe, you should be able to run it among all 83+ family calculators without the Axe app.
Axe is a compiled language, meaning that the parser reads your source file and creates an Asm program. You can run that Asm program on any calculator without the parser (given that your program does not need a shell).
Maybe I need to sent 2 PRGMs to another TI:
One BASIC-program and one ASM-subprogram
In order to run an Asm program from BASIC, you use "Asm(" (without quotes) followed by the name of the program.
But I've never learned ASM-programming, just Basic.
You don't really need to know Asm to make a program in Assembly; Axe compiles into Assembly. Well, if you really want to learn Asm, Hot_Dog made a wonderful, well-worded tutorial. http://www.omnimaga.org/index.php?action=downloads;sa=downfile&id=594
If you would like any clarifications, feel free to ask. :)
BTW, welcome to Omnimaga!
-
So I could create a program with sounds with Axe.
And if i'll send it somebody, he'll be able to hear the sounds even he hasn't loaded Axe on his TI?
That's super!
-
But how to make sounds?
I just know that I should use freq( for it.
-
So I could create a program with sounds with Axe.
And if i'll send it somebody, he'll be able to hear the sounds even he hasn't loaded Axe on his TI?
That's super!
Yes. All he has to do is to use the Asm( command to run the program. :)
-
OK
So he must write
asm( prgmSOUND
But what to do for sounds?
freq( ???, ???
-
freq(number, time
The higher the number, the lower the frequency. Time is in microseconds (if I am right), and if number > time, you won't hear anything
example: try this:
:Repeat Getkey(15)
:freq(10,100
:End
That should give sound untill you press clear
-
Cool, thanks! :)
And how to create ditterent sounds?
For example this scale: C D E F G A H C
How to modifi the high of a sound?
-
Try changing the first argument (You can use a variable for that).
But don't set the time argument (2nd argument) to something very high. It would make your program react very slowly on key presses.
-
For what is the second Var in the Command freq( A , B?
A is the high of the tone.
But B?
-
B is for how long to play the tone.
If you set that to something too low, you won't hear anything, but too high and your program will become very slow.
Try to use something in between.
-
OK Thanks.
I'll try it. :) :)
If I get my headphones... :-\
The freq( command is like For( , or?
I mean, that it won't work in backround, so that the PROG could do other things during the sound.
That isn't possible, or is it??
-
Now I've opened Axe the first time on my TI.
In the menue I've chosen COMPILE
Then I've chosen NO SHELL
It didn't react.
After one minute it reacted:
My screen became barker (contrast changed) and dhere was written "ERR:MEM"
BUT: It was written Upside down!!!!!!! ??? ???
After a few seconds there was written:
∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ
ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ
∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ
ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ
∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ
ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ
∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ
ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ
Then It was:
:banghead: :banghead: :banghead: :banghead: :banghead: :banghead: :banghead:
:banghead: TI 84+ :banghead:
:banghead: Ram Cleared :banghead:
:banghead: :banghead: :banghead: :banghead: :banghead: :banghead: :banghead:
Is that normal, or is it because I have had more than 60 half-finishd PRGMs on my TI?
-
Now I'v choosen the same things again.
No reaction yet.
The same like a minute ago....
-
Did you have any Axe source code programs?
-
This time there are Lines on my screen:
.._ .._ .._ .._ .._ .._ .._
:. . ._ :._ .._ .._ .._ .._
And so on.
But this lines are colour-inverting; in the bachground I can see COMPLETE No Shell.
Don't looks good...
-
Note: With the Asm() command, sounds will slow down your game considerably, even if the program containing sounds is in pure assembly language, such as Playwav. The best way IMHO to have sound in BASIC is to use Omnicalc, as its parser hook-based sound command is much faster to execute.
-
I've pressed enter and now the screen is darker agan.
I'm an the menue, but at the right side still are the lines and points.
AND EVERYTHING IS UPSIDE DOWN
who has made thiss APP, which is killing my TI??
-
I ask again: Did you have any Axe source code programs?
-
Cool!
After I've pressed the down-key, I've the menue upside down on the left AND the same menue upside down and mirrored on the right side.
Is that a good sign?
-
No, I've just the APP
looks funny, all upside down.
-
AND EVERYTHING IS UPSIDE DOWN
I had that too once. Turn your calc of to avoid that your ram will get cleared when pulling a battery, then pull a battery, and when you turn your calc back on, everything should be right again.
-
You need to write some Axe code using the calculator's program editor before you compile using the Axe app.
-
What should I do?
Quit the APP?
-
I've selectet EXIT
Now It's again:
ERR:MEMORY
1:Quit
I've preassed Enter.
TI is off
Pressed on.
The same as before:
∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ
ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ
∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ
ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ
∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ
ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ
∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ
ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ∫ŋ
and then
TI 84+
2.43
Ram Cleared
-
Install an other version of the app
-
I should write a PRGM with some AXE-Codes in it, before I start Axe?
I don't have the Command freq(
Ind this is the only one, I know!
-
Okay, stop.
First, get out of the app, then go to the memory menu and clear your ram (don't forget to archive programs you want to keep).
Then, copy the code you were writing here and let us look at it.
-
Ive version 0.5.3
Where could I get another version?
searching in the Axe-forum?
-
Version 0.5.3 is fine -- I think it might be your program that's the problem.
-
You have to run the axe app, and then, you should have new tokens in the catalog ( [2nd] [ 0 ] ).
-
Er....
I havn't written anything:
I should write a new prgm.
-ok
With axe-codes in it.
-In CATALOG under F is no command FREQ(
What now?
-
You can find Freq( under S.
What Axe does is that it takes the tokens you normally use, and temporarily transforms them.
-
Augment
bal
connected
degree
DependAsk
...
there are some new commands.
Are they from axe?
-
try this as your program: (The //'s are just coments, don't type them in your program)
:.SOUND //header
:repeat Getkey(15) //repeat and Getkey from the prgm menu
:Freq(10,100 //Search the catalog after running the axe app
:End //prgm menu
And compile this. Then type Asm(prgmSOUND in the home screen. This should give a sound untill you press clear
-
should I write a new PRGM with one of the new commands in it?
what command should I use?
-
The :.SOUND
should that be in Text mode?
Freq should be under S
Freq is with F at the beginning and I cant find it at S and also not at F
-
Axe helloworld program:
:.HELLO
:Disp "Hello Wolld
Compile and run that
-
Clarification on ben_g's post: Don't add anything after the '//' marks: those are comments.
And yes, Axe does add new tokens.
Also, 10 is a bit of a low number: try using Freq(264, 528) or something.
Edit
1] Go to the home screen
2] Hit [PGRM] and make a new program
3] Copy the program ben_g gave you.
4] Hit [APPS] and scroll until you see Axe.
5] Open Axe, and select 'Compile'
6] Choose the program you just wrote.
7] Select it, and wait until it finishes.
8] Go to the home menu, and type in 'Asm(pgrmSOUND)'.
-
As a rule of thumb p2: Don't double-post on the forums unless it has been 6 hours between your two consecutive posts. Instead, use the edit button. ;)
-
The :.SOUND
should that be in Text mode?
Yes, you just type that. It's the axe header. It tells the compiler how to name the compiled program. Do not use the same name as the program itself
Freq should be under S
Freq is with F at the beginning and I cant find it at S and also not at F
As a rule of thumb p2: Don't double-post on the forums unless it has been 6 hours between your two consecutive posts. Instead, use the edit button. ;)
Sorry, i just quickly clicked 'quote'
-
I can't find Freq(
The APP has never shown a list where I should have been searching for the Program.
I've just choosed NO SHELL and then it started with doing strange things.
Should the
:.HALLO
be in Text mode?
OK.
I'm doing it.
-
Should the
:.HALLO
be in Text mode?
Yes
-
To find Freq(, click [STAT], [RIGHT ARROW]. Scroll down.
-
COOL!
Now I can choose the PRGM AXESND
(I've called it so)
Backing up..
Ready!
There I have:
1-Var Stats
2-Var Stats
Med-Med
LinReg(ax+b)
QuadReg
CubicReg
QuartReg
LinReg(a+bx)
LnReg
ExpReg
PwrReg <----That is new!!!!
Logistic
SinReg
Manual-Fit
-
What should have the APP made?
I can't open the prgmAXESND
:.Hello is an Error in basic; " should be there
And I can't open it with asm(prgmAXESND
Whatr should I do now?
-
You have to run asm(pgrmHELLO) -- the name at the top after the period is the new name of the program.
So let's say you make a program named "TEST" and you type in:
.HELLO
Disp "Hello"
The program you select in Axe is 'TEST', and the program that you run on the homescreen is 'HELLO'.
-
Called it AXETEST:
PRGM:AXETEST
:.HALLO
:Disp("HALLO
Starte AXE
...
...
Defragmenting...
...Ready.
asm(HELLO
ERR:SYNTAX
1:QUIT
2:GOTO
asm(prgmHELLO
ERR:INVALID
1:Quit
2:Goto
-
Go to the Axe app. Press compile. Select AXESND. Quit the app. Now when you're on the homescreen enter asm(HELLO
-
Didn't you name your program 'HALLO', not 'HELLO'?
-
ERR:SYNTAX
But In AXE I've seen, that I've new programs:
COMPILE
:AXESND
:AXETEST
:#AXESND
:#AXETEST
No.
In each of the 2 PROGs i've written HELLO
You speak German???
-
Those are programs backuped by axe (to prevent that you'll lose programs on ram clears).
by the way, are you sure you aren't compiling for a shell? You could also try to set the shell to application, and run it from the 'apps' menu
-
I've an APP with the Name HELLO!
But if I start it, nothing happens.
shoud I try the same again, but with a PAUSE after the DISP("HELLO
prgmHALLO
:.HALLO
:Disp("HALLO
:Pause
Nothing.
But now, asm(prgmHELLO
has no ERR!!!
But just because nothing happens.
-
Add a 'Pause 1000' -- that should pause it briefly.
Also, don't forget to close your parentesis and quotation mark.
Do this:
.HELLO
Disp("HELLO")
Pause 1000
Do not do this:
.HELLO
Disp("HELLO
Pause 1000
-
remember: pause doesn't work the same as in basic. In axe, it's Pause Milisecs, where milisecs is the number of milisecounds
EDIT: Ninja'd...
-
If you want use BASIC for sound, why not use the music capabilities in Omnicalc? Its easier to use than axe and all you need is the Omnicalc app, which most calc techies should have anyways.
-
No...
:banghead:
nothing happens.
But no ERR :o ;D
-
Don't give your source file and your executable the same name. so do something like
prgmHALLO
.HELLO
Disp ("Hello")
Pause 1000
And it sounds like you're compiling to an app. Make sure under options you selected no shell or the shell of your choice.
-
IT WORKS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
It was just, because I've chosen Doors_CS7 and not ASM.
NOW I HAVE MY FIRST APP.
COOL.
thanks for helping.
But I have still one Question:
STAT -> CALC
1-Var Stats
2-Var Stats
Med-Med
LinReg(ax+b)
QuadReg
CubicReg
QuartReg
LinReg(a+bx)
LnReg
ExpReg
PwrReg <----That is new!!!!
Logistic
SinReg
Manual-Fit
WHERE IS FREQ(
-
If I press STAT and then RIGHT (CALC)
Which number should be the freq( command?
-
When you writing a program, Axe replaces 'SinReg' with 'Freq'.
When you are NOT writing a program, it just displays 'SinReg'.
-
ahh....
I see.
I thought my TI was not ok.
thanks.
I'll test it out to make apps and PRGMs with AXE.
If I need help for the differents between BASIC and ASM, could I write you a PM?
p2
-
If you need any help, you can just ask it on the forums (or on IRC if you have 40 posts)
-
What do you mean with IRC...
I don't know everything about Omnimaga :-\
-
Don't worry about IRC -- when you get 40 posts, you'll see it. You can't miss it. It's invisible right now.
Feel free to PM me at any time!
-
ok.
thanks.
Bye.
p2