Author Topic: MIDI To Axe Music Converter  (Read 66446 times)

0 Members and 2 Guests are viewing this topic.

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: MIDI To Axe Music Converter
« Reply #15 on: July 03, 2010, 02:44:36 am »
Did you try doing chords too? Either way, nice to hear ^^

_player1537

  • Guest
Re: MIDI To Axe Music Converter
« Reply #16 on: July 03, 2010, 02:48:00 am »
no >.>  I actually haven't set up the stuff to make it.  I deleted a few parts of the example code, so I could use some other music, however I must have deleted something important, I'll resend it and try to fix it some ;)

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: MIDI To Axe Music Converter
« Reply #17 on: July 03, 2010, 02:50:19 am »
aaah ok x.x

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: MIDI To Axe Music Converter
« Reply #18 on: July 03, 2010, 03:27:33 am »
If anyone wants some more epic music, here are some more demos.  They really push the player to its limits though.  You can erase the first data structure in the example file, recall this into the code, and store it to Str4 to use the 4 button to test these.

The first one is from Pokemon Gold/Silver the surfing theme
The second one is from Big Blue in the original F-Zero.
« Last Edit: July 03, 2010, 03:28:00 am by Quigibo »
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Magic Banana

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 371
  • Rating: +77/-1
  • It's not an apple, it's a ... magic banana.
    • View Profile
Re: MIDI To Axe Music Converter
« Reply #19 on: July 03, 2010, 04:18:33 am »
This is just so amazing!  :D

I do have a question though, would it be possible to have sound effects as well as music, or would any sound cause the music to pause until the sound finished playing?

btw, love that last song.  ;)
I do sprites and stuff, so yeah.

Quote from: yunhua98
i'M NOT SURE WHAT A SWORD SKILL IS BUT HERE'S THE SWORD ANIMATION FROM THE TWO SPRITES ON PG 13

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: MIDI To Axe Music Converter
« Reply #20 on: July 03, 2010, 04:41:20 am »
Yes, you can have sound effects as well.  There are many options.

One way is to include it separate from the interrupts.  To play the sound effect you would just write the routine using whatever combinations of freq() you need, and then use that when you need it in the code.  The routine doesn't have to have interrupts disabled when playing the sound effect as long as you don't mind having your sound be interrupted by the music which may or may not be desirable.

Another way would be to modify the interrupt routine so that it queues all the sounds that need to be played every time one is loaded.  That would prevent simultaneous playing however.

Uploaded one more, this one is from .hack, never played the game, but it sounds cool and it shows how the tempo can be changed.

EDIT: By the way, you can change the interrupt frequency to speed up the music.  4 is slightly faster, 2 sounds nice but its really sped up, 0 is just insane.
« Last Edit: July 03, 2010, 04:50:58 am by Quigibo »
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Magic Banana

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 371
  • Rating: +77/-1
  • It's not an apple, it's a ... magic banana.
    • View Profile
Re: MIDI To Axe Music Converter
« Reply #21 on: July 03, 2010, 04:57:13 am »
So if I had several sound effects, would I be able to play them whenever using an interrupt while having the music interrupt going at the same time or would it be better to just have the interrupt for music and play the sound in a normal sub routine?

I plan on playing sounds simultaneously so I think the way you mentioned will work just fine.

Also, for music looping, how would I be able to do custom looping so that the beginning of some songs don't play more than once?
I do sprites and stuff, so yeah.

Quote from: yunhua98
i'M NOT SURE WHAT A SWORD SKILL IS BUT HERE'S THE SWORD ANIMATION FROM THE TWO SPRITES ON PG 13

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: MIDI To Axe Music Converter
« Reply #22 on: July 03, 2010, 05:04:27 am »
The way I have it set up now you load songs into the music player using the L variable.  However, the routine also uses the P variable to figure out what to play after the sound has finished.  If its the same song as before, that's how it creates a loop.  If it is zero however, it will be loading the stop command into the player which will halt all sound once the original track has finished.  You can even do more exotic things with it.  Lets say you have some music which has an intro part and a loop part.  You can load the intro part into L to get it going and then load the loop section into P so that it will continually call the loop section after the music reaches the end.  Its a pretty cool system.
« Last Edit: July 03, 2010, 05:04:58 am by Quigibo »
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Magic Banana

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 371
  • Rating: +77/-1
  • It's not an apple, it's a ... magic banana.
    • View Profile
Re: MIDI To Axe Music Converter
« Reply #23 on: July 03, 2010, 05:14:46 am »
Woah, that is pretty impressive. I got to get myself more familiar with this awesome feature. ;D

EDIT:I got my midis to work with the converter.  ;)
Here's the Dragon Warrior 3 overworld theme, although it sounds better when the delay on freq() is set to 2000.

EDIT2:Just wondering, how much space can you fit into a single string?
« Last Edit: July 03, 2010, 06:03:56 am by Magic Banana »
I do sprites and stuff, so yeah.

Quote from: yunhua98
i'M NOT SURE WHAT A SWORD SKILL IS BUT HERE'S THE SWORD ANIMATION FROM THE TWO SPRITES ON PG 13

Offline kindermoumoute

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 836
  • Rating: +54/-3
    • View Profile
Re: MIDI To Axe Music Converter
« Reply #24 on: July 03, 2010, 06:26:17 am »
great! i like this sound =)
when in a game z80 with good music background?
I am impatient ;)
Projects :

Worms armageddon z80 :
- smoothscrolling Pixelmapping : 100%
- Map editor : 80%
- Game System : 0%

Tutoriel français sur l'Axe Parser
- 1ère partie : en ligne.
- 2ème partie : en ligne.
- 3ème partie : en ligne.
- 4ème partie : 10%
- Annexe : 100%

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: MIDI To Axe Music Converter
« Reply #25 on: July 03, 2010, 11:09:39 am »
Silly Kindermoumoute. ;D   Here, try this: http://ourl.ca/4008
Although not written in Axe, it's still by Quigibo. :D

As for the sound, this is epic!  Excellent job Quigibo! ;D  Wow. ^-^
« Last Edit: July 03, 2010, 11:09:54 am by ztrumpet »

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: MIDI To Axe Music Converter
« Reply #26 on: July 03, 2010, 11:10:56 am »
* calcdude really wants that adapter
I'll say "keep up the good work!" even though I'm not judging it myself :P
« Last Edit: October 09, 2010, 05:35:40 pm by calcdude84se »
"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.

Offline squidgetx

  • Food.
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: MIDI To Axe Music Converter
« Reply #27 on: July 03, 2010, 03:48:07 pm »
ZOMG YES!
I do believe this is the first midi player for 83+/84+ series that is usable (ie, low music file sizes)


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: MIDI To Axe Music Converter
« Reply #28 on: July 03, 2010, 04:09:19 pm »
Did I just... get rick roll'D?

Regardless awesome stuff lol
« Last Edit: July 03, 2010, 04:09:40 pm by DJ Omnimaga »

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: MIDI To Axe Music Converter
« Reply #29 on: July 03, 2010, 04:22:25 pm »
Kerm wrote one but I'm not sure what the compression is.

I too was surprised at the compression of the MIDI to Axe converter.  1KB of data in the executable at a medium speed with many chords is about an entire minute of music!  Of course, the quality certainly suffers from this extremely tiny compression, but since Axe is designed for games and most games need the music in the background, it has to be quick and small so I think this is a good thing.  This is about as minimal as it gets to still sound awesome.  In the future, you will be able to write your own freq() commands using direct port output to make the notes sound like another instrument instead of just a square wave.
« Last Edit: July 03, 2010, 04:23:30 pm by Quigibo »
___Axe_Parser___
Today the calculator, tomorrow the world!