|
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" :
https://www.youtube.com/watch?v=42dquq3eOB8
(sorry for the block :( )
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 :- 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/viewto ... t=12949&lang=en |
|