Author Topic: Sound with nspire Lua  (Read 21725 times)

0 Members and 2 Guests are viewing this topic.

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: Sound with nspire Lua
« Reply #15 on: July 26, 2011, 12:09:34 pm »
I can do that, but that would be no use it it only will work for very high tones. I don't have full control over the port, so its not easy. I can't even send one empty byte (000).

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: Sound with nspire Lua
« Reply #16 on: July 26, 2011, 12:14:11 pm »
Congrats, this is awesome :)

Now I should port my Music Composer (for 83+/84) to Nspire Lua :P
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: Sound with nspire Lua
« Reply #17 on: July 26, 2011, 12:21:48 pm »
Thanks adriweb!

I just realized I have a little timing issue in my code. It's not big though, but ill fix it as soon as I get on a good comp :)

Offline Loulou 54

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 165
  • Rating: +39/-0
    • View Profile
    • Mes programmes sur TI bank.
Re: Sound with nspire Lua
« Reply #18 on: July 27, 2011, 06:27:19 am »
I have to try that as soon as possible ! :D
I imagine I could edit melodies on calc with oclua ? :)
Some of my program available here.. :)
http://ti.bank.free.fr/index.php?mod=archives&ac=voir2&id=1471

     

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Sound with nspire Lua
« Reply #19 on: July 27, 2011, 06:35:38 am »
I seriously think this deserves a News post ;)

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: Sound with nspire Lua
« Reply #20 on: July 27, 2011, 09:51:33 am »
Loulou, only if you type the whole thing on your calculator :)

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: Sound with nspire Lua
« Reply #21 on: July 27, 2011, 11:50:26 am »
That's why I'm planning to make a Music composer :)

it will be basic (about the features, the difficulty :P, 'coz it will obviously be Lua) but will probably be able to have some rhythm, support the whole range possible, able to save/load to external strings (var.store) etc.

Also, I'll probably (as soon as I have everything I need) be soon making (more like building) some hardware piece fir the Nspire that will be über-cool, but I can't tell you more about that, it's a secret :P
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: Sound with nspire Lua
« Reply #22 on: July 27, 2011, 03:26:35 pm »
Whooo, you are making my curious :p
Well, good luck with it :)

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: Sound with nspire Lua
« Reply #23 on: July 28, 2011, 01:11:30 am »
Thanks, but it might take some time :P
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline Loulou 54

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 165
  • Rating: +39/-0
    • View Profile
    • Mes programmes sur TI bank.
Re: Sound with nspire Lua
« Reply #24 on: July 29, 2011, 09:26:46 am »
I have just tried on my CX. But I Have only a very high tone.. (I launch the script with oclua)
Has anyone tried with a CX?  :)
Some of my program available here.. :)
http://ti.bank.free.fr/index.php?mod=archives&ac=voir2&id=1471

     

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: Sound with nspire Lua
« Reply #25 on: July 29, 2011, 09:29:41 am »
Are you sure everything is correct? Also, you can try if changing \255 in the beginning to \127 helps.

Offline Loulou 54

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 165
  • Rating: +39/-0
    • View Profile
    • Mes programmes sur TI bank.
Re: Sound with nspire Lua
« Reply #26 on: July 29, 2011, 09:40:50 am »
I'm wondering too.. But I've already used this speaker to make sound with my TI 89. So I don't think that the problem is here.
Thank you I'll see if that change anything. :)
Some of my program available here.. :)
http://ti.bank.free.fr/index.php?mod=archives&ac=voir2&id=1471

     

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: Sound with nspire Lua
« Reply #27 on: July 29, 2011, 09:46:44 am »
Oh, and congratulations with your new CX :)

Edit: or wait, I'm confusing you with someone else
« Last Edit: July 29, 2011, 09:47:22 am by jimbauwens »

Offline Loulou 54

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 165
  • Rating: +39/-0
    • View Profile
    • Mes programmes sur TI bank.
Re: Sound with nspire Lua
« Reply #28 on: July 29, 2011, 10:12:32 am »
ok ^^
I have changed the value to 127 and it works very good now ! :D
That sounds very good finally. :)
I think I've understood how you code your melody, so I'll try to create a little music ! ;)
Some of my program available here.. :)
http://ti.bank.free.fr/index.php?mod=archives&ac=voir2&id=1471

     

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: Sound with nspire Lua
« Reply #29 on: July 29, 2011, 10:32:46 am »
Well, I still need to fix the timing part, as I make a wrong calculation there. But most of the things work, so its not really a problem. Anyway, I'm glad it works :)

Have fun!