Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
20 June, 2013, 03:45:43 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: 1 [2] 3   Go Down
  Print  
Author Topic: An Axe piano with 5 octaves -  (Read 2426 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
ZippyDee
LV8 Addict (Next: 1000)
********
Offline Offline

Gender: Male
Last Login: 09 June, 2013, 20:37:11
Date Registered: 21 March, 2011, 03:15:07
Location: Yes.
Posts: 704


Total Post Ratings: +73

View Profile
« Reply #15 on: 28 April, 2011, 22:28:40 »
0

supporting "real" multiple notes is what I really want in Axe.
Conceptually that's pretty simple. Say you have the equation for three notes, f(t) g(t) h(t). The amplitude at any given t would just be f(t)+g(t)+h(t). Sum them all up. But it's not quite as easy when it comes to actually writing that out so it runs fast enough to produce the correct sound output with a chip like the z80 Tongue
Logged

There's something about Tuesday...


Pushpins 'n' stuff...

Munchor
LV13 Extreme Addict (Next: 9001)
*************
Offline Offline

Gender: Male
Last Login: 13 June, 2013, 19:29:09
Date Registered: 16 October, 2010, 15:39:13
Location: Position
Posts: 6209


Total Post Ratings: +174

View Profile
« Reply #16 on: 28 April, 2011, 22:29:22 »
0

Does Wabbit record sound, too?

It does, you just have to 'tick' that option in the menu.
Logged
adriweb
Editor
LV9 Veteran (Next: 1337)
*
Offline Offline

Gender: Male
Last Login: 14 June, 2013, 17:56:38
Date Registered: 13 April, 2011, 18:42:59
Location: South of France
Posts: 1202


Total Post Ratings: +186

View Profile WWW
« Reply #17 on: 28 April, 2011, 22:34:55 »
0

Nice !

Looks like what I programmed back in the days ...
http://www.ticalc.org/archives/files/fileinfo/405/40553.html



EDIT :

Actually, this composer is what I meant :
http://ti.bank.free.fr/index.php?mod=archives&ac=voir&id=986
« Last Edit: 28 April, 2011, 22:37:13 by adriweb » Logged


TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation
ralphdspam
LV8 Addict (Next: 1000)
********
Offline Offline

Gender: Male
Last Login: 14 May, 2013, 09:10:11
Date Registered: 01 February, 2011, 07:58:40
Location: California, USA
Posts: 841


Total Post Ratings: +36

View Profile
« Reply #18 on: 29 April, 2011, 04:39:48 »
0

Sounds like a great program!  I'm so glad to see the new programs with sound.  Smiley
« Last Edit: 29 April, 2011, 04:42:31 by ralphdspam » Logged

ld a, 0
ld a, a
Michael_Lee
LV9 Veteran (Next: 1337)
*********
Offline Offline

Gender: Male
Last Login: 31 May, 2013, 15:08:36
Date Registered: 05 August, 2010, 01:00:06
Posts: 1020

Total Post Ratings: +115

View Profile
« Reply #19 on: 29 April, 2011, 07:42:55 »
0

This is great! I was thinking about making a guitar program at some point. Tongue I'll have to find a way to defy reality and play 6 notes at once though xD


?!.
How can you make two sounds with axe ?
If two notes are pressed, only the higher is played.

One way is to alternate back and forth between the two frequencies very quickly.

The problem with oscillation is that if you go too fast, it sounds like crap, but if you go too slow, it doesn't sound blended.

The problem becomes even worse if you press like five keys at the same time X.X
Logged

My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.
zero44
LV4 Regular (Next: 200)
****
Offline Offline

Gender: Male
Last Login: 16 June, 2013, 13:07:00
Date Registered: 24 January, 2011, 17:34:18
Location: France
Posts: 113


Topic starter
Total Post Ratings: +18

View Profile WWW
« Reply #20 on: 07 May, 2011, 20:54:14 »
0

how to use interrupts in axe ?
I could make a better sound ...

-_-" I lost the pic needed by the program ...
I have to remake it.
Logged

____________
thepenguin77
z80 Assembly Master
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: 18 June, 2013, 05:33:45
Date Registered: 14 December, 2009, 04:21:52
Location: Purdue
Posts: 1490


Total Post Ratings: +778

View Profile
« Reply #21 on: 07 May, 2011, 21:14:31 »
0

supporting "real" multiple notes is what I really want in Axe.
Conceptually that's pretty simple. Say you have the equation for three notes, f(t) g(t) h(t). The amplitude at any given t would just be f(t)+g(t)+h(t). Sum them all up. But it's not quite as easy when it comes to actually writing that out so it runs fast enough to produce the correct sound output with a chip like the z80 Tongue

Yep, that is all it takes to play multiple notes at once. Just add up all the sine waves and output the new weird looking wave.

However, the calculator can only output a 1 or a 0, so how do you pull off all the intermediate steps of the new wave? That is where the real trouble comes in to play. For this, you would have to make your own version of freq() whereby using Pulse Width Modulation, (turning the link port on and off really fast), you simulate say, 32 different voltage steps. (That might be the most grammatically strange sentence I've written on Omni)
Logged

zStart v1.3.012 6-10-2013  zStart fully works on 83+BE's (except custom font)
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
ralphdspam
LV8 Addict (Next: 1000)
********
Offline Offline

Gender: Male
Last Login: 14 May, 2013, 09:10:11
Date Registered: 01 February, 2011, 07:58:40
Location: California, USA
Posts: 841


Total Post Ratings: +36

View Profile
« Reply #22 on: 07 May, 2011, 22:16:24 »
0

how to use interrupts in axe ?
I could make a better sound ...

Yep, just use FnInt(LBL, FREQ)
Freq is 0-6, 6 being the slowest.
Make sure that the LBL location is formatted as a sub program (with a Return at the end).

Also, you can't use L2 while you are running custom interrupts.

At the end of the program, make sure to use LnReg.  If you don't, it will cause a ram clear.  Wink
« Last Edit: 07 May, 2011, 22:18:20 by ralphdspam » Logged

ld a, 0
ld a, a
zero44
LV4 Regular (Next: 200)
****
Offline Offline

Gender: Male
Last Login: 16 June, 2013, 13:07:00
Date Registered: 24 January, 2011, 17:34:18
Location: France
Posts: 113


Topic starter
Total Post Ratings: +18

View Profile WWW
« Reply #23 on: 08 May, 2011, 21:24:40 »
0

What do FnOn and FnOff ?
I tried with interupts, I had sound for 2 seconds, but I don't remember if I used FnOn or FnOff ...  Roll Eyes
I remade the picture, I give you codes .


* piano.7z (0.14 KB - downloaded 30 times.)
Logged

____________
Munchor
LV13 Extreme Addict (Next: 9001)
*************
Offline Offline

Gender: Male
Last Login: 13 June, 2013, 19:29:09
Date Registered: 16 October, 2010, 15:39:13
Location: Position
Posts: 6209


Total Post Ratings: +174

View Profile
« Reply #24 on: 09 May, 2011, 13:30:14 »
0

Actually, aeTIos made a music composer & player in Axe, looking very good.
Logged
Yeong
Eternally Young Scarlet Moon
LV12 Extreme Poster (Next: 5000)
************
Offline Offline

Gender: Male
Last Login: Yesterday at 00:24:25
Date Registered: 15 October, 2010, 04:29:49
Location: Arden, NC
Posts: 3705


Total Post Ratings: +260

View Profile
« Reply #25 on: 09 May, 2011, 13:53:05 »
0

really? Can I haz a link?
Logged

Project Redemption....

My project progresses:HERE
My Pastebin stuffs:HERE
Check your rate: HERE
My Animations: HERE
Spoiler for Images :D:

ノ◕ヮ◕)ノ:・゚ PENGUIN WAVE!!:„ø¤º°¨ ¨°º¤KEEP THE PENGUIN GOING ¸„ø¤º°¨ ¨°º¤øº LETS GO PENGUIN !¤¤º°¨¨°º¤øº¤ø„¸¸ø¤º°¨„ ø¤º°¨¨°º
ZippyDee
LV8 Addict (Next: 1000)
********
Offline Offline

Gender: Male
Last Login: 09 June, 2013, 20:37:11
Date Registered: 21 March, 2011, 03:15:07
Location: Yes.
Posts: 704


Total Post Ratings: +73

View Profile
« Reply #26 on: 09 May, 2011, 14:09:45 »
0

Yep, that is all it takes to play multiple notes at once. Just add up all the sine waves and output the new weird looking wave.

However, the calculator can only output a 1 or a 0, so how do you pull off all the intermediate steps of the new wave? That is where the real trouble comes in to play. For this, you would have to make your own version of freq() whereby using Pulse Width Modulation, (turning the link port on and off really fast), you simulate say, 32 different voltage steps. (That might be the most grammatically strange sentence I've written on Omni)

It's exactly as thepenguin77 said: use Pulse Width Modulation. To explain PWM a bit better, why don't I give an example of some basic PWM.
An nice, simple example would be something like having an LED fade on and off. LEDs have two states: ON and OFF. So how do you fade it? The idea is the same as grayscale on a monochrome calculator screen: some of the time it's turned on, and some of the time it's turned off. But the switch is done very quickly. You can think of it as pulsing on and off. Pulse Width Modulation means changing the width (length) of the on/off pulses.

In this case, thepenguin77 mentioned simulating 32 voltage steps. Basically, that means that every 32 1's or 0's you send represents one pulse. You then change how much of that time you're sending a 1 or sending a 0 to change the pulse frequency. So for fading an LED, the pulses would look something like:


1
2
3
4
5
6
7
8
9
10
11
12
13
00000000000000000000000000000000 (Lowest possible step);
10000000000000000000000000000000
11000000000000000000000000000000
...
11111111111111110000000000000000
11111111111111111000000000000000
11111111111111111100000000000000
...
all the way up to
...
11111111111111111111111111111100
11111111111111111111111111111110
11111111111111111111111111111111 (Highest possible step)

That would fade it from being completely off, to completely on. The same idea goes for varying the frequencies that you are playing, though it's obviously a lot less linear.
Logged

There's something about Tuesday...


Pushpins 'n' stuff...

zero44
LV4 Regular (Next: 200)
****
Offline Offline

Gender: Male
Last Login: 16 June, 2013, 13:07:00
Date Registered: 24 January, 2011, 17:34:18
Location: France
Posts: 113


Topic starter
Total Post Ratings: +18

View Profile WWW
« Reply #27 on: 09 May, 2011, 14:51:00 »
0

How do you find the piano ?
I'm trying interrupts, with what ralphdspam said.

EDIT: I've no headphones here ... -_-'
« Last Edit: 09 May, 2011, 15:35:55 by zero44 » Logged

____________
aeTIos
You got stair'd!
LV12 Extreme Poster (Next: 5000)
************
Offline Offline

Gender: Male
Last Login: Yesterday at 23:17:47
Date Registered: 15 September, 2010, 06:00:00
Location: Netherlands, Overijssel
Posts: 3146


Total Post Ratings: +120

View Profile
« Reply #28 on: 09 May, 2011, 15:26:24 »
0

Actually, aeTIos made a music composer & player in Axe, looking very good.
It was Michael_Lee i think, I never made a sound program. Smiley
Logged

If something above sounds rude, feel free to vote it down, it was not meant to be rude<<lolol
--Always stay relAXEd!--


Spoiler for Hidden:


[







Spoiler for Still Alive:
This was a triumph.
I'm making a note here: HUGE SUCCESS.
It's hard to overstate my satisfaction.

Aperture Science:
We do what we must because we can.
For the good of all of us
Except the ones who are dead.

But there's no sense crying over every mistake
You just keep on trying till you run out of cake
And the science gets done and you make a neat gun
For the people who are still alive.

I'm not even angry.
I'm being so sincere right now.
Even though you broke my heart and killed me.
And tore me to pieces.
And threw every piece into a fire.
As they burned it hurt because
I was so happy for you.

Now these points of data make a beautiful line
And we're out of beta we're releasing on time.
So I'm GLaD I got burned think of all the things we learned
For the people who are still alive.

Go ahead and leave me.
I think I prefer to stay inside.
Maybe you'll find someone else to help you.
Maybe Black Mesa -
THAT WAS A JOKE. HA HA, FAT CHANCE.
Anyway, this cake is great:
It's so delicious and moist.

Look at me still talking when there's science to do.
When I look out there it makes me GLaD I'm not you.
I've experiments to run there is research to be done
On the people who are still alive

And believe me I am still alive.
I'm doing science and I'm still alive.
I feel FANTASTIC and I'm still alive.
While you're dying I'll be still alive.
And when you're dead I will be still alive.

Still alive
Still alive
zero44
LV4 Regular (Next: 200)
****
Offline Offline

Gender: Male
Last Login: 16 June, 2013, 13:07:00
Date Registered: 24 January, 2011, 17:34:18
Location: France
Posts: 113


Topic starter
Total Post Ratings: +18

View Profile WWW
« Reply #29 on: 09 May, 2011, 20:27:54 »
0

Interrupts does not work.
Logged

____________
Pages: 1 [2] 3   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 1.199 seconds with 31 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.