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

0 Members and 1 Guest are viewing this topic.

Offline Vogtinator

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1193
  • Rating: +108/-5
  • Instruction counter
    • View Profile
Re: Nspire Audio player!
« Reply #60 on: July 03, 2014, 11:30:07 am »
Without your changes nobody can help you..

Offline l6979630

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 6
  • Rating: +0/-0
    • View Profile
Re: Nspire Audio player!
« Reply #61 on: November 06, 2014, 07:46:47 am »
How to set the timer to 32bit?
http://hackspire.unsads.com/wiki/index.php/Memory-mapped_I/O_ports#900D0000_-_Second_timer
It says Set to 32 by the OS.but how?
« Last Edit: November 06, 2014, 08:04:38 am by l6979630 »

Offline Vogtinator

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1193
  • Rating: +108/-5
  • Instruction counter
    • View Profile
Re: Nspire Audio player!
« Reply #62 on: November 06, 2014, 08:09:26 am »
It doesn't mean 32bit, it means that the timer load value is "32".
You can simply write it to the port (32 bit write)
« Last Edit: November 06, 2014, 08:36:28 am by Vogtinator »

Offline InventorX

  • LV0 Newcomer (Next: 5)
  • Posts: 3
  • Rating: +0/-0
    • View Profile
Re: Nspire Audio player!
« Reply #63 on: January 23, 2016, 10:22:48 pm »
Vogtinator,

I am fairly new to programming , and the only languages that I've had experience with are Java and the Arduino's language. I managed to make a capacitive-sensor piano with the Arduino, but it is rather clunky. I realized that the Ti-inspire calculator already has a built-in keypad and that I might be able to play tones with the nspire. I was wondering if you have any directions, tips, or references that would help me with this project. Also, should I be using Assembly or Lua? I would also like to mention that in the future, I would like to add a synthesizer as well, where I might be able to use waveform equations to creates the timbre and/or the ability to draw the wave. Any information that you could give me would be helpful!

Sincerely,
InvX

Offline Vogtinator

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1193
  • Rating: +108/-5
  • Instruction counter
    • View Profile
Re: Nspire Audio player!
« Reply #64 on: January 24, 2016, 05:44:13 am »
Hi InvX,

"pwmtest" is written in ARM assembler and C ("the Arduino's language"), so you have to learn them to fully understand and work with pwmtest.
You have to setup your calc as usual (solder to a dock pin or connect to it in a different way) before you can try pwmtest.
There is a fairly high-level API exposed by audio.c you can use to play your synthesized tones.

Offline InventorX

  • LV0 Newcomer (Next: 5)
  • Posts: 3
  • Rating: +0/-0
    • View Profile
Re: Nspire Audio player!
« Reply #65 on: January 24, 2016, 12:52:00 pm »
Thanks, this helps me out a lot!  ;D

One more thing; would it be possible to remove the static from the audio? Maybe with some kind of low-pass filter?
« Last Edit: January 24, 2016, 01:18:54 pm by InventorX »

Offline Vogtinator

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1193
  • Rating: +108/-5
  • Instruction counter
    • View Profile
Re: Nspire Audio player!
« Reply #66 on: January 24, 2016, 03:21:09 pm »
Quote
One more thing; would it be possible to remove the static from the audio? Maybe with some kind of low-pass filter?
Some part of it, yes. It only has 8 bit resolution (I tried 9 and even 10 bit, didn't work out well) so you won't get rid of the resulting inaccuracies.

Offline InventorX

  • LV0 Newcomer (Next: 5)
  • Posts: 3
  • Rating: +0/-0
    • View Profile
Re: Nspire Audio player!
« Reply #67 on: January 30, 2016, 09:55:32 pm »
Where do your common.h and os.h libraries come from?
« Last Edit: January 31, 2016, 07:30:00 pm by InventorX »

Offline Legimet

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +29/-0
    • View Profile
Re: Nspire Audio player!
« Reply #68 on: January 31, 2016, 11:10:40 pm »
common.h and os.h used to be in the SDK. After the Newlib transition, they are no longer used, although there is an os.h for compatibility. You'll have to figure out what to replace them with, I personally haven't looked at this code.

Offline MichaelaJoy

  • LV0 Newcomer (Next: 5)
  • Posts: 3
  • Rating: +0/-0
    • View Profile
Re: Nspire Audio player!
« Reply #69 on: April 02, 2016, 01:05:53 pm »
Awesome!

A suggestion. You might want to use a capacitor to couple the audio from the pin. Then, a low impedance load won't adversely affect the calculators' operation.
Try a 0.1 uf ceramic capacitor. 50 volt rating is fine. You can use a poly cap too.

The signal might be low, but a small amp (LM386) would bring the level up and allow you to drive a speaker.

I hope this helps.