Author Topic: Some music with the Orion TI-84 Plus  (Read 12190 times)

0 Members and 2 Guests are viewing this topic.

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Some music with the Orion TI-84 Plus
« on: September 09, 2013, 08:26:46 am »
Hi everyone,

You may have read our recent news about the hand-on review of the Orion TI-84 Plus, and… maybe you thought if you're a programmer especially, about the not-so-normal possible uses of the Orion module, for example user-controlled sound output ? ;-)

Of course, for now, one can think about making it read numbers and words, which is not very difficult and it was shown in the video on the news linked above.

But .... already on the traditional TI-83+ and 84+, some programmers have released solutions from relatively simple to a bit more complex but realistic in order to get music from the calculator via the 2.5mm Jack I/O port.

Anyway, there has always been some joy for the programmers to tinker with that, maybe especially for the ones more hackers than others, for offering a new dimension to their creations, and in general for those who want to impress their friends with music coming out of their calculator ;-)


Here is a music whose name I won't probably need to state, which I was able to "compose" when thinking about the fact that the calculator has the ability to "read graphs" :


You'll have to excuse me for a few false notes, I certainly heard them too, but ... I can't actually do better, or at least with this method. Indeed, the height of the sound depends directly on the y-coordinate of the pixel, but the change is not by semitone as in our traditional tempered scales ; in fact, the increase in pitch of the sounds are done by a few commas and therefore we don't always get on a well-defined note ... I put the closest ones, which may bother some who have a good ear like me, but it won't prevent anyone from recognizing the Mario theme ;-)

For technical details on the calculator side :
- The calculator reads the current pixel with a sound corresponding to its height (y-coordinate). I had to find a way to jump from one height to another (not going through the pixels in between)
- To do that, we can draw a graph in Plot mode with a list of points :-) In Trace mode with a plot drawn, moving with the left / right arrow jumps from point to another and thus switches from a height to another directly !
- So : just define a list (here, L2) of y-coordinate representing the notes (pitch), and L1 the simple list of X values ?? (a trivial seq(A,A,1,dim(L2->L1 will suffice)

Mario's notes (y-coordinates) are, in order :
Code: [Select]
39,39,39,33,39,44,25,33,25,21,29,32,29,27,26,39,
44,47,41,44,40,34,37,32,14,44,42,41,38,40,27,29,
34,29,34,37,14,44,43,41,38,39,52,52,52,14,44,42,
41,38,40,27,29,34,29,34,37,38,37,34,34,34,34,34,
37,39,34,28,25,39,39,39,33,39,44

Some technical obstacles :
- You are limited to 95 points, so 95 notes, for each Plot. We can thus have 285 notes in total by combining 3 Plots with 3 ordered lists (to go from one to the other, use the up / down arrows)
- It is not with this method that we can have rhythm (on the video, you see that I'm doing it manually). Perhaps with the program Xeda made (IIRC), it can perform a sequence of keystrokes to automate the process ? Or maybe with another way I have not yet found via basic programs to display a point to be read ... (granted, I have not yet tried much).
- It is not like this that we get several notes at once. But hey, just buy several Orion ....  ;D



See you soon for some more … peculiar experiments ? ;)


Source : http://tiplanet.org/forum/viewtopic.php?f=41&t=12949&lang=en
« Last Edit: September 09, 2013, 12:15:27 pm by adriweb »
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

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: Some music with the Orion TI-84 Plus
« Reply #1 on: September 09, 2013, 09:37:49 am »
Why did i expect a rickroll <_<
So yeah, nice one :D

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

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: Some music with the Orion TI-84 Plus
« Reply #2 on: September 09, 2013, 10:06:47 am »
Haha, pretty neat little demonstration there Adriweb! :D

Offline ElementCoder

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 611
  • Rating: +42/-2
    • View Profile
Re: Some music with the Orion TI-84 Plus
« Reply #3 on: September 09, 2013, 10:23:06 am »
Nice demonstration, that thing is pretty neat.

Some people need a high five in the face... with a chair.
~EC

Offline critor

  • Editor
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2079
  • Rating: +439/-13
    • View Profile
    • TI-Planet
Re: Some music with the Orion TI-84 Plus
« Reply #4 on: September 09, 2013, 10:42:10 am »
Great Adriweb! :)

But please, add some line breakes in your code bbcode, as it makes the Omnimaga home page being distorted.
TI-Planet co-admin.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Some music with the Orion TI-84 Plus
« Reply #5 on: September 10, 2013, 12:43:20 am »
Why did i expect a rickroll <_<
So yeah, nice one :D
Same, but nice anyway lol :P. Also it would definitively be cool if there was an ASM program that automated keypresses to make the music more consistent and not require pressing keys :P

Offline critor

  • Editor
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2079
  • Rating: +439/-13
    • View Profile
    • TI-Planet
Re: Some music with the Orion TI-84 Plus
« Reply #6 on: September 10, 2013, 07:18:58 am »
We just need to export the new B-Calls from OS 2.55/ORk.
« Last Edit: September 10, 2013, 07:19:26 am by critor »
TI-Planet co-admin.

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Some music with the Orion TI-84 Plus
« Reply #7 on: September 12, 2013, 10:29:50 am »
The automated keystrokes was precisely what I was thinking of yesterday after seeing this video.

The Tutor App can be found here, along with descriptions of the functions.

However, now that I think about it.... You said that you used stat plots to jump to pixels, so what if the key hook instead just jumped to a pixel directly? Edit (penrow) while in Trace mode. You might still have to move the arrow up/down, though.

Here is some code I started, designed for an app:
Code: [Select]
SetHook:
     ld hl,keysequence
     ld (keyseqloc),hl
     ld hl,HookStart
     in a,(6)
     bcall(4F7Bh)
     ret
HookStart:
     .db 83h
     cp 1Bh
     ret nz
     ld hl,(keyseqloc)
     ld a,(hl)
     or a
     jr nz,$+6
Exithook:
       or 1
       ld a,b
       ret
;commands are:
; bit 7 set means press Key, reset means set penrow
; if setting penrow and bit6 set, causes UP to be pressed, too.
     inc hl
     ld (keyseqloc),hl
     jp p,$+8
       and 7Fh
       ld b,a
       jr exithook
     bit 6,a
     ld b,0
     jr z,$+4
     ld b,4      ;skup
     and 3Fh
     ld (penrow),a
     jr exithook
keysequence:
     .db 0
;Use 0 to end the simulation.
;Use 1 to 127 for regular keypresses. The OS defines them like skUp, skEnter, et cetera.
;Use bit 7 set to set the pen-col coordinate, to [0,63] and bit 6 set as well will cause it to set the coordinate and simulate an UP keypress.

I have not tested that code and I think there are a few issues with it.

Offline utz

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 161
  • Rating: +28/-0
    • View Profile
    • official hp - music, demos, and more
Re: Some music with the Orion TI-84 Plus
« Reply #8 on: September 12, 2013, 10:53:01 am »
Hahahahaaa, the true purpose of the Orion has been revealed. Awesome ;)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Some music with the Orion TI-84 Plus
« Reply #9 on: September 12, 2013, 12:20:41 pm »
Imagine now if games could be made so that if someone has the Orion module, then the games send it data to play sound. However, I doubt many calc gamers would spend $600 just to be able to play music D:.

Offline critor

  • Editor
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2079
  • Rating: +439/-13
    • View Profile
    • TI-Planet
Re: Some music with the Orion TI-84 Plus
« Reply #10 on: September 12, 2013, 04:56:40 pm »
If you manage to buy the module separately, it should be less expensive.
TI-Planet co-admin.

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: Some music with the Orion TI-84 Plus
« Reply #11 on: September 13, 2013, 05:55:21 am »
but it would still be like $480, right? Because you get the 84+ in stores for $120 iirc.

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

Offline critor

  • Editor
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2079
  • Rating: +439/-13
    • View Profile
    • TI-Planet
Re: Some music with the Orion TI-84 Plus
« Reply #12 on: September 13, 2013, 06:51:43 am »
I know - it's clearly overpriced.

Probably they never expected to sell many of them, and set a high price because of that.

They totally forgot about us. I'm sure many of us would have bought the module if it was at a lower price, to add speech synthesis and sound/music in their programs or games.
« Last Edit: September 13, 2013, 06:52:06 am by critor »
TI-Planet co-admin.

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: Some music with the Orion TI-84 Plus
« Reply #13 on: September 13, 2013, 10:25:49 am »
We could always poke them about that. :P

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Re: Some music with the Orion TI-84 Plus
« Reply #14 on: September 14, 2013, 12:15:49 am »
I think that it's because everything that is either medical-related or used to help visually impaired people and other people with physical limitations is expensive to begin with. See for example wheelchairs, guide dogs, glasses, antibiotics, health care services (with no insurance). As a result, the Orion creators probably followed the trend.