Author Topic: Nspire Audio player!  (Read 54607 times)

0 Members and 1 Guest are viewing this topic.

Offline Rhombicuboctahedron

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 437
  • Rating: +41/-6
    • View Profile
Re: Nspire Audio player!
« Reply #15 on: March 01, 2013, 07:28:45 am »
I used audacity, change project rate to 10000 (after import), convert it to mono
and export it as raw data (unsigned 8-bit pcm).
I did that and it is much better, though it is really slow for some reason, even with nover

Offline Vogtinator

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1193
  • Rating: +108/-5
  • Instruction counter
    • View Profile
Re: Nspire Audio player!
« Reply #16 on: March 01, 2013, 08:58:43 am »
Quote
even with nover
With nover you can only decrease the pwm speed. I don't know how (and whether) you can change the speed of the second timer (~31 kHz) which is used for setting the pwm output value.

Offline Rhombicuboctahedron

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 437
  • Rating: +41/-6
    • View Profile
Re: Nspire Audio player!
« Reply #17 on: March 01, 2013, 09:09:15 am »
Though mine is very slow, like 50%-80%, and vocals sound ridiculous, while your's seem just fine
« Last Edit: March 01, 2013, 09:09:26 am by Rhombicuboctahedron »

Offline Vogtinator

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1193
  • Rating: +108/-5
  • Instruction counter
    • View Profile
Re: Nspire Audio player!
« Reply #18 on: March 01, 2013, 09:14:01 am »
Is the length reported correct? It should be the exact (rounded) duration in seconds
« Last Edit: March 01, 2013, 09:14:12 am by Vogtinator »

Offline critor

  • Editor
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2079
  • Rating: +439/-13
    • View Profile
    • TI-Planet
Re: Nspire Audio player!
« Reply #19 on: March 01, 2013, 04:33:53 pm »
We have to add sound support in gbcnspire, gpSP and nDoom ! ;)
Except that I'll probably won't have any time to work on nDoom in the next few months.
TI-Planet co-admin.

Offline Rhombicuboctahedron

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 437
  • Rating: +41/-6
    • View Profile
Re: Nspire Audio player!
« Reply #20 on: March 01, 2013, 04:55:37 pm »
We have to add sound support in gbcnspire, gpSP and nDoom ! ;)
Except that I'll probably won't have any time to work on nDoom in the next few months.
And nspire movie player most of all!
Is the length reported correct? It should be the exact (rounded) duration in seconds
It is 181s for 2000000 bytes, like yours was, because I accidentally went over
It is slow, and I think the scratchy noise just might be my bad speakers.
But I send the mp3 files to audacity change it to 8000, export it as Other compressed files with Raw (header-less) and unsigned 8 bit PCM selected in the options

Maybe you could post one of your files for me to see?

Offline Vogtinator

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1193
  • Rating: +108/-5
  • Instruction counter
    • View Profile
Re: Nspire Audio player!
« Reply #21 on: March 01, 2013, 05:52:01 pm »
Quote
But I send the mp3 files to audacity change it to 8000,
8000, that should be too fast  ???. 10000 is correct (you can type in any value you want)

Quote
Maybe you could post one of your files for me to see?
If it doesn't work with this version, I'll post some free stuff here.

We have to add sound support in gbcnspire, gpSP and nDoom ! ;)
Except that I'll probably won't have any time to work on nDoom in the next few months.
And nspire movie player most of all!
All of them :) But I think it might get a bit complicated with tone generation :-\

I made a newer version, resolved some bugs and copied nTxt/hoffa's file browser:
-24000 samples per seconds (second timer is only 24 kHz  >:( )
-Doesn't crash anymore
-Loads file only once (Limit is now at 5 MB)
-Works with ndless.cfg.tns
-Source code (Not very well commented - yet  :-[ )

16 bit pwm is not possible, 500 Hz is a bit too slow  >:(
A higher samplerate would only be possible with a lower pwm frequency as I would have to abuse the fiq handler for pwm, but I think we don't need 64000 samples per second  ::)

I also made a few tests with nover, it plays fine (even at the right speed) with 162/81/40 MHz.. Does the second timer have a seperate clock source?
« Last Edit: March 01, 2013, 06:26:03 pm by Vogtinator »

Offline Rhombicuboctahedron

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 437
  • Rating: +41/-6
    • View Profile
Re: Nspire Audio player!
« Reply #22 on: March 01, 2013, 07:25:59 pm »
Thank you
This is much faster, but for some reason this still isn’t fast enough for vocals.
I also like that I don’t have to keep changing the name of the file to monsta.raw.tns :)

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: Nspire Audio player!
« Reply #23 on: March 01, 2013, 11:41:35 pm »
Wow, that is looking pretty awesome!
And *yay* german :D
* Sorunome isn't alone anymore

I just like how much stuff is made for the nspire, that makes me wish I had one >.<
« Last Edit: March 01, 2013, 11:42:03 pm by Sorunome »

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

Offline Vogtinator

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1193
  • Rating: +108/-5
  • Instruction counter
    • View Profile
Re: Nspire Audio player!
« Reply #24 on: March 02, 2013, 05:51:48 am »
Quote
This is much faster, but for some reason this still isn’t fast enough for vocals.
Whoops, now I see.. :banghead: It's really just 16000, I swapped the files.. sorry  :-[
16000 is indeed a bit low, I'll search for a better way to load it (Fast timer No.2 maybe?)

Quote
And *yay* german
* Sorunome isn't alone anymore
Ich bin hier doch schon 'ne ganze Weile xD

Quote
I just like how much stuff is made for the nspire, that makes me wish I had one >.<
Wishing alone doesn't work (except for christmas), you may have to buy one  :P

Edit:
Newer version:
-WAV support (mono, 8-bit pcm)
-samplerate up to 33 MHz xD
-fixed small bug with GPIOs
-Max file size = free ram
« Last Edit: March 02, 2013, 10:42:24 am by Vogtinator »

Offline Rhombicuboctahedron

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 437
  • Rating: +41/-6
    • View Profile
Re: Nspire Audio player!
« Reply #25 on: March 02, 2013, 11:20:03 am »
Okay, I went to audacity selected stereo to mono, changed it to 10000 saved it as other compressed file, unsigned 8 bit wav, and sent it to my calculator.
The player just stays at zero seconds now, and doesn't play the song.
Quote
And *yay* german
* Sorunome isn't alone anymore
Ich bin hier doch schon 'ne ganze Weile xD
Und ich spreche kleine Deutsch :)
« Last Edit: March 02, 2013, 11:25:54 am by Rhombicuboctahedron »

Offline Vogtinator

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1193
  • Rating: +108/-5
  • Instruction counter
    • View Profile
Re: Nspire Audio player!
« Reply #26 on: March 02, 2013, 11:25:37 am »
Quote
Okay, I went to audacity selected stereo to mono, changed it to 10000 saved it as other compressed file, unsigned 8 bit wav, and sent it to my calculator.
The player just stays at zero seconds now.
Hmm, theres a bug: You have to start it twice after rebooting..

Offline Rhombicuboctahedron

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 437
  • Rating: +41/-6
    • View Profile
Re: Nspire Audio player!
« Reply #27 on: March 02, 2013, 11:29:03 am »
When I do that it still stays at 0 seconds, but I get a constant buzz sound.

Offline Vogtinator

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1193
  • Rating: +108/-5
  • Instruction counter
    • View Profile
Re: Nspire Audio player!
« Reply #28 on: March 02, 2013, 11:30:38 am »
Strange, does escape still work?
I made a reset on my calc, opened a wav in pwmtest, pressed escape, opened it again an it plays as it should.

Offline Rhombicuboctahedron

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 437
  • Rating: +41/-6
    • View Profile
Re: Nspire Audio player!
« Reply #29 on: March 02, 2013, 11:33:53 am »
Escape works, but what you said doesn’t work.