Author Topic: MP3's from flash drive  (Read 6372 times)

0 Members and 1 Guest are viewing this topic.

Offline boathouse2112

  • LV2 Member (Next: 40)
  • **
  • Posts: 23
  • Rating: +0/-0
    • View Profile
MP3's from flash drive
« on: September 25, 2012, 06:03:41 pm »
We can already play MP3's as shown here: http://www.ticalc.org/archives/files/fileinfo/354/35424.html
And we can already download from flash drives as shown here: http://www.ticalc.org/archives/news/articles/13/139/139572.html

So why not combine the 2? You would have a program that downloads "chunks" of data from the drive, plays them, and then deletes them. This would obviously have problems, the first coming to mind is speed, but does this seem like a possiblity?

Offline shmibs

  • しらす丼
  • Administrator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2132
  • Rating: +281/-3
  • try to be ok, ok?
    • View Profile
    • shmibbles.me
Re: MP3's from flash drive
« Reply #1 on: September 25, 2012, 06:28:45 pm »
mp3s use complex compression algorithms to reduce file sizes, so an on-calc player for them isn't feasible, let alone one that reads usb and playss at the same time. you could write an application to read and play simpler files, maybe something that reuses code directly from usb8x when it's on the calculator, but it would be difficult, time consuming, and, with the proclivity of smaller, cheaper devices with larger internal storage space and the ability to decode better compression formats, ultimately pointless.
it would be cool, though :P
« Last Edit: September 25, 2012, 06:29:13 pm by shmibs »

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: MP3's from flash drive
« Reply #2 on: September 25, 2012, 06:46:58 pm »
I remember SirCmpwn did this before, but unfortunately he deleted his Youtube video showcasing it (and there wasn't any download link)

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: MP3's from flash drive
« Reply #3 on: September 25, 2012, 07:25:52 pm »
It would be pretty cool if that would be possible. Maybe the song could be loaded into a different format before the calc starts reading&playing it?

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

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: MP3's from flash drive
« Reply #4 on: September 25, 2012, 07:53:08 pm »
I remember SirCmpwn did this before, but unfortunately he deleted his Youtube video showcasing it (and there wasn't any download link)
Yeah :/
Sir was good at what he did and everything, but that made him power hungry. (or at least that's what it looked like to me)
I wish he would have been a better friend around here.
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

Offline boathouse2112

  • LV2 Member (Next: 40)
  • **
  • Posts: 23
  • Rating: +0/-0
    • View Profile
Re: MP3's from flash drive
« Reply #5 on: September 25, 2012, 09:45:46 pm »
damn it. I swore there was a video of it. I just assumed the first links i got were the right ones without looking into it much.

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: MP3's from flash drive
« Reply #6 on: September 25, 2012, 11:34:05 pm »
It was probably his vid. After the bans he took anything he had calc-related down from Youtube D:

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: MP3's from flash drive
« Reply #7 on: September 26, 2012, 12:14:56 am »
We can already play MP3's as shown here: http://www.ticalc.org/archives/files/fileinfo/354/35424.html
And we can already download from flash drives as shown here: http://www.ticalc.org/archives/news/articles/13/139/139572.html

So why not combine the 2? You would have a program that downloads "chunks" of data from the drive, plays them, and then deletes them. This would obviously have problems, the first coming to mind is speed, but does this seem like a possiblity?

Well, first of all, I'd like to point out that the "MP3's" you are talking about are similar to MIDI files. (Old cell phone ringtones).


The 84+ has been able to play music for quite some time now. It started real Real Sound (the video is gone) which could only work on the calculators with the extra ram. Then I made TruSound (youtube) which allowed the newer calculators to play sounds as well.

Now, both of these programs played .WAV files. If you know much about song formats, you know that .WAV files can be around 5x as big as MP3 files. The reason for this is that MP3 files are compressed to a smaller size. Like shmibs said, this compression algorithm is very complex and some computers running windows 2000 cannot even play them properly without skipping. What makes .WAV files convenient is that they are already in the format that is required to play sound while MP3 is not.

The obvious solution to the MP3 problem would be to decode the files ahead of time, but the 84+ only has 48KB or 128KB of ram (HW differences) and at 128Kbps, that means you'll get either 3 seconds or 8 seconds of song before the program would have to decode the next section which could take another 3 to 8 seconds. (TruSound uses a little compression, but it only cuts off around 20% of the file size)


Anyways, that's why MP3 doesn't work. As far as the USB half of it, I didn't think it was possible, but SirCmpwn proved us wrong. The trouble with sound over USB is that you have to try to get the USB port to cooperate with you fast enough to keep up with the song. Not only that, but you have to manage your cpu time because playing sound requires around 60% of the processor time when optimally configured and USB is a finicky thing that doesn't like to be interrupted.

Now, I say SirCmpwn proved us wrong, but like everyone has said, he never actually released his program. So while his youtube video made the music sound nice, I would honestly bet that it was a little scratchy. But, to be fair, he did manage to play recognizable music from a flash drive.


Finally, since you seem to be excited about playing songs on your calculator, I'll have to point you to another one of my projects, TruVid. (youtube)
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: MP3's from flash drive
« Reply #8 on: September 26, 2012, 05:09:42 am »
The program linked to in the first post is a BASIC program, and it isn't using MP3's.

I'm pretty sure I've seen video being played from usb before, so I don't know why music would be much different (it's all data that has to be decoded afterall). IIRC the video I saw was a TI-85 using USB8x.

Here's what I found with a bit of looking: http://www.ticalc.org/archives/news/articles/13/130/130297.html . I seem to remember there being a video of it being rigged on a TI-85 as well (and more recent), but I can't seem to find it.

Offline Axeisareligion

  • LV0 Newcomer (Next: 5)
  • Posts: 4
  • Rating: +0/-0
    • View Profile
Re: MP3's from flash drive
« Reply #9 on: January 18, 2014, 02:59:02 pm »
Is it very hard to just constantly download data from a USB to the calculator ARC or RAM and delete every byte when it has been played and could the same ever be possible for video? Because that would mean that the amount of data you can use becomes unlimited :w00t: :banghead:

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: MP3's from flash drive
« Reply #10 on: January 18, 2014, 08:51:15 pm »
Holy necropost, Batman! (Generally speaking, try to avoid posting to old topics. Create a new one)
Is it very hard to just constantly download data from a USB to the calculator ARC or RAM and delete every byte when it has been played and could the same ever be possible for video?
That requires you to read from USB pretty much continuously. However, because of the need to play sound, you can't just always be reading data. Also, video is possible, though not very good. http://www.engadget.com/2005/08/17/the-ti-84-gets-down-with-usb-peripherals/. From thepenguin77:
Quote from: thepenguin77
The trouble with sound over USB is that you have to try to get the USB port to cooperate with you fast enough to keep up with the song. Not only that, but you have to manage your cpu time because playing sound requires around 60% of the processor time when optimally configured and USB is a finicky thing that doesn't like to be interrupted.

Quote
Because that would mean that the amount of data you can use becomes unlimited :w00t: :banghead:
That's one of the motivations for a flash drive, yep :). Once again, though, the main challenge with video and audio is the speed.
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.