Author Topic: Grammer 2-The APP  (Read 160795 times)

0 Members and 2 Guests are viewing this topic.

Offline Xeda112358

  • they/them
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Grammer 2-The APP
« Reply #135 on: November 29, 2011, 08:49:25 am »
Thanks, guys :)
@Yeong: If I make a custom error, I believe it cannot have a Goto option, but I can add it :)

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Grammer 2-The APP
« Reply #136 on: November 29, 2011, 10:29:17 am »
Cool! Updates!
* Sorunome downloads

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Xeda112358

  • they/them
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Grammer 2-The APP
« Reply #137 on: November 29, 2011, 08:53:04 pm »
So after many requests to add a sound routine and a request to add a custom error, I have finally added them  :w00t:

For now, the sound routine may change unless I get approval from yeong and no better ideas are brought forth, but have fun with the examples. Unfortunately, I cannot take a screenshot of sound with the technology I have here, so you will either need to take my word or try it yourself (I suggest using Wabbit and enabling sound, though it sounds the same on a calc if you have headphones).

So the syntax:
conj(Duration,DataLoc,DataSize
This will play the sound for the data at DataLoc. DataSize is the number of bytes to play. Duration is how long to play each note (256 is fast, 65535 is really slow)

Alternatively, you can play just one sound using the ' operator followed by a note value. The notes are 1 to 127 and 129-255 are silence:
conj(Duration,'Value

And for custom error messages, just add another argument to the CallError command and use error code 2:
Code: [Select]
solve(4,2,"Something
Also, I was wrong before, I did manage to get the Goto option to work, too :

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Grammer 2-The APP
« Reply #138 on: November 29, 2011, 08:53:36 pm »
oh right!
first download!
now let's mess with sound XD
Sig wipe!

Offline Xeda112358

  • they/them
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Grammer 2-The APP
« Reply #139 on: November 29, 2011, 08:54:30 pm »
hehe, have fun! I hope you can figure out what I did there .__. Feel free to ask questions :)

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Grammer 2-The APP
« Reply #140 on: November 30, 2011, 07:09:49 am »
I will say that Grammer's sound routine is kinda....limited compared to axe sound routine D:

Well, this could be kinda off tune, but here's the value for C3(Min)~C6(Max) if anyone is interested.

380→C3
372→C#3
364→D3
359→D#3
354→E3
348→F3
342→F#3
337→G3
332→G#3
328→A3
324→A#3
320→B3

316→C4
312→C#4
309→D4
307→D#4
304→E4
301→F4
298→F#4
296→G4
294→G#4
292→A4
290→A#4
288→B4

286→C5
284→C#5
283→D5
282→D#5
280→E5
278→F5
276→F#5
275→G5
274→G#5
273→A5
272→A#5
271→B5

270→C6

Also, you can subtract all these number by 255 and get the same results (saving space, too ;) )
« Last Edit: November 30, 2011, 07:10:28 am by TBO_Yeong »
Sig wipe!

Offline Xeda112358

  • they/them
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Grammer 2-The APP
« Reply #141 on: November 30, 2011, 10:15:19 am »
Ah, okay, I was wondering why you were using numbers above 255 XD
Are you taking advantage of the duration, too? Because that gives you some pretty nice control (in my opinion).

EDIT: Also,  :thumbsup: That is very useful :) Did you come by these values through trial and error or did you use some kind of math?

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Grammer 2-The APP
« Reply #142 on: November 30, 2011, 11:25:32 am »
trial and error XD
Sig wipe!

Offline Xeda112358

  • they/them
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Grammer 2-The APP
« Reply #143 on: November 30, 2011, 03:31:59 pm »
Ah XD Well I currently trying to integrate the Axe version as an alternative so that I can see what the difference is. I need to figure out all the inputs .__.

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Grammer 2-The APP
« Reply #144 on: December 02, 2011, 09:46:34 pm »
Whoa custom fonts O.O Sweet language there :D




Offline Xeda112358

  • they/them
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Grammer 2-The APP
« Reply #145 on: December 02, 2011, 10:15:13 pm »
Haha, I plan to add parser hooks, too, and you can make a custom error handler (in Grammer code), too >:D That can really come in handy when you don't want certain errors to exit the program.

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Grammer 2-The APP
« Reply #146 on: December 02, 2011, 10:15:58 pm »
Like try/catch statements? Sounds useful :D
« Last Edit: December 02, 2011, 10:16:04 pm by Deep Thought »




Offline Xeda112358

  • they/them
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Grammer 2-The APP
« Reply #147 on: December 02, 2011, 10:19:58 pm »
Well actually, when an error occurs, code can be redirected to an error handler. If the error handler tells it to call a Grammer error or exit, it will, but otherwise you can send it back to the code (and Ans and whatnot are restored properly).

Offline Xeda112358

  • they/them
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Grammer 2-The APP
« Reply #148 on: December 11, 2011, 12:15:32 am »
So not much of an update, but I added inString( as a command. The arguments are:
inString(Offset,SearchStart,SearchString
I don't think the first argument is really needed so I might remove it before the next update. The outputs have theta prime containing the size of the search string and Ans has the location of the first match (or 0 if there is no match).

okay, back to studying for finals/sleeping/programming

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Grammer 2-The APP
« Reply #149 on: December 12, 2011, 07:39:40 am »
erm why do I see LD in the program? O.O
Sig wipe!