|
Castle Paradox
|
View previous topic :: View next topic |
Author |
Message |
Mike Caron Technomancer
Joined: 26 Jul 2003 Posts: 889 Location: Why do you keep asking?
|
Posted: Tue Nov 08, 2005 11:57 pm Post subject: Music Code |
|
|
Ok, so not usually two words you hear in such close proximity to eachother. However...
As a few of you know, the next version of the OHR will feature Midi music in addition to BAM (in the windows/Linux ports only...).
However, Midi doesn't have any sort of method of doing proper looping. Just blindly looping the song doesn't help either (victory fanfares, anyone?)
So, I invented a solution: http://gilgamesh.hamsterrepublic.com/wiki/ohrrpgce/index.php/Music_Code. I want some feed back, and C&C.
I bet some of you are wondering why I posted this here, as opposed to, say, Announcements. Well, this deals directly with the musician, as the current proposal allows for some very neat effects.
For example, take Dancing Mad from Final Fantasy VI. For those not in the know, Dancing Mad is the Final Battle song. The final battle has four parts, and the song has four sections. When you defeat a section, you move on to the next, and the music changes accordingly.
But, it doesn't just change. Oh no. It plays until a natural break in the song (say, when it would loop), and then switches. This means that it goes to the next section while you're in the middle of that section. It's a really cool effect, having seamless music transitions.
Well, a similar thing could be done here by using the conditional jumps (is this tag set? If it is, continue on. Otherwise, loop.)
And, the opera scene from the same game could be done too using the tag-setting (or variable setting) commands at each voice note, and having a plotscript checking the tag continuously until it's set, and then reseting it when it shows the next lyric.
So... yeah. _________________ I stand corrected. No rivers ran blood today. At least, none that were caused by us.
Final Fantasy Q
OHR Developer BLOG
Official OHRRPGCE Wiki and FAQ |
|
Back to top |
|
|
Artimus Bena Admiral
Joined: 17 Aug 2004 Posts: 637 Location: Dreamland.
|
Posted: Wed Nov 09, 2005 12:51 am Post subject: |
|
|
I'm not really going to read through the whole wiki section, (I had a very long day), but the proposal is very very very very very very appealing, and from my experiences with programming, it seems very doable at this point. I say go for it dude. _________________ SACRE BLEU!
|||Compositions!
|||Eldardeen Soundtrack!
|||Red Mercury! |
|
Back to top |
|
|
Moogle1 Scourge of the Seas Halloween 2006 Creativity Winner
Joined: 15 Jul 2004 Posts: 3377 Location: Seattle, WA
|
Posted: Wed Nov 09, 2005 4:58 am Post subject: |
|
|
Sexy. _________________
|
|
Back to top |
|
|
LeRoy_Leo Project manager Class S Minstrel
Joined: 24 Sep 2003 Posts: 2683 Location: The dead-center of your brain!
|
Posted: Wed Nov 09, 2005 10:09 am Post subject: |
|
|
Hells yeah, this is a good idea!
Will this mean I can loop from a fanfare before a victory piece into the victory piece and every sequential loop will skip the fanfare? _________________ Planning Project Blood Summons, an MMORPG which will incinerate all of the others with it's sheer brilliance...
---msw188 ---
"Seriously James, you keep rolling out the awesome like gingerbread men on a horror-movie assembly line. " |
|
Back to top |
|
|
Mike Caron Technomancer
Joined: 26 Jul 2003 Posts: 889 Location: Why do you keep asking?
|
Posted: Wed Nov 09, 2005 11:21 pm Post subject: |
|
|
Artimus & Moogle1: Thanks!
Leroy: Yes, and even better. Say someone in the game does something great, and you want to play just the fanfare (not the looping part), you could set a tag, and then put "if tag set: stop song" at the beginning of the loop, so it won't play the rest if the tag is set.
The possibilities are night almost endless _________________ I stand corrected. No rivers ran blood today. At least, none that were caused by us.
Final Fantasy Q
OHR Developer BLOG
Official OHRRPGCE Wiki and FAQ |
|
Back to top |
|
|
msw188
Joined: 02 Jul 2003 Posts: 1041
|
Posted: Thu Nov 10, 2005 4:56 pm Post subject: |
|
|
Sound effects?
Even more complicated (I assume), will it be possible to have plotscripting (or something) change volumes midsong? And/or would it be possible to have more than one song playing at once? Together, these could make songs fade into each other...
Sorry if these requests are rediculous, I do not know anything about midi or programming. |
|
Back to top |
|
|
SilentAngel The Angel of Silence
Joined: 16 Dec 2003 Posts: 122 Location: The comfiest chair in #CastleParadox
|
Posted: Thu Nov 10, 2005 8:06 pm Post subject: |
|
|
This sounds like an excellent idea, actually, and it's kinda the missing piece in the puzzle for a project I've been wanting to work on for a while. Being able to set tags during any part of the song could trigger anything, be it an NPC, lyrics, whatever. Sounds spiffilicious. I say go for it _________________ Current Projects:
Hikari no Senshi - Inperiaru Taisen: ~10% Complete
http://www.castleparadox.com/forum/download.php?game=392
Stepmania Online Stats:
Next song to pass on Stepmania: Paranoia Survivor Max (Heavy)
Next song to pass on DDR: MaxX Unlimited(Standard)
|
|
Back to top |
|
|
Mike Caron Technomancer
Joined: 26 Jul 2003 Posts: 889 Location: Why do you keep asking?
|
Posted: Fri Nov 11, 2005 2:47 pm Post subject: |
|
|
msw188 wrote: | Sound effects?
Even more complicated (I assume), will it be possible to have plotscripting (or something) change volumes midsong? And/or would it be possible to have more than one song playing at once? Together, these could make songs fade into each other...
Sorry if these requests are rediculous, I do not know anything about midi or programming. |
Alas, more than one song is not possible in the implementation I'm creating. Allegro can only play one song at a time. However, volume is possible, as will be seeking to arbitrary parts in the song.
However, I just discovered something with Allegro. It uses an measurement called "beats" for midis. I'm not sure how long a beat is, but I suspect that it has something to do with a song event. I dunno.
My point is that it's not as fine a measurement as I would like. I made a simple victory fanfare loop thing, but when it loops, the label is slightly off (a beat is a bit shorter than a second of play time, so that's a fairly wide margin) _________________ I stand corrected. No rivers ran blood today. At least, none that were caused by us.
Final Fantasy Q
OHR Developer BLOG
Official OHRRPGCE Wiki and FAQ |
|
Back to top |
|
|
SilentAngel The Angel of Silence
Joined: 16 Dec 2003 Posts: 122 Location: The comfiest chair in #CastleParadox
|
Posted: Fri Nov 11, 2005 2:56 pm Post subject: |
|
|
Maybe you could do it with music being counted by ticks rather than seconds? Might be a bit more accurate, I'm not sure. _________________ Current Projects:
Hikari no Senshi - Inperiaru Taisen: ~10% Complete
http://www.castleparadox.com/forum/download.php?game=392
Stepmania Online Stats:
Next song to pass on Stepmania: Paranoia Survivor Max (Heavy)
Next song to pass on DDR: MaxX Unlimited(Standard)
|
|
Back to top |
|
|
PlayerOne
Joined: 07 Sep 2005 Posts: 143 Location: UK
|
Posted: Fri Nov 11, 2005 3:23 pm Post subject: |
|
|
When I was reading up about MIDI for the conversion routine in WinOHR, a beat was equivalent to a quarter note. The default tempo is 120 bpm, which is half a second per beat, but the MIDI tick resolution is usually much finer. |
|
Back to top |
|
|
Joe Man
Joined: 21 Jan 2004 Posts: 742 Location: S. Latitude 47°9', W. Longitude 123°43'
|
Posted: Sat Nov 12, 2005 9:08 am Post subject: |
|
|
Ooh, does this mean the limit of 100 songs would be eliminated through special looping tags and tricks?
Oh, and if that limit was already resolved with some version of OHR already, sorry for being ignorant. The question sill applies, however, though with a much bigger number. _________________ "Everyone has 200,000 bad drawings in them, the sooner you get them out the better."
~Charles Martin Jones
Last edited by Joe Man on Fri Dec 13, 1957 1:21 am; edited 2,892 time in total |
|
Back to top |
|
|
Mike Caron Technomancer
Joined: 26 Jul 2003 Posts: 889 Location: Why do you keep asking?
|
Posted: Tue Nov 15, 2005 10:35 am Post subject: |
|
|
SilentAngel wrote: | Maybe you could do it with music being counted by ticks rather than seconds? Might be a bit more accurate, I'm not sure. |
If I could, I would. However, that would require haxoring up the Allegro library, which is something I really don't want to do.
If I had my way, it would be counted in Midi ticks, which is 240 to the quarter beat, which should be fine enough for everyone.
JoeMan wrote: | Ooh, does this mean the limit of 100 songs would be eliminated through special looping tags and tricks?
Oh, and if that limit was already resolved with some version of OHR already, sorry for being ignorant. The question sill applies, however, though with a much bigger number. |
Not really, and no.
The song limit is in the process of being removed. That's all I can say at this point. _________________ I stand corrected. No rivers ran blood today. At least, none that were caused by us.
Final Fantasy Q
OHR Developer BLOG
Official OHRRPGCE Wiki and FAQ |
|
Back to top |
|
|
Artimus Bena Admiral
Joined: 17 Aug 2004 Posts: 637 Location: Dreamland.
|
|
Back to top |
|
|
Mike Caron Technomancer
Joined: 26 Jul 2003 Posts: 889 Location: Why do you keep asking?
|
Posted: Fri Nov 18, 2005 12:23 am Post subject: |
|
|
http://ohrdev.com/miditest.zip
Well, here is a sort of "test bed" for music code. It implements the whole spec, with the following exceptions:
* variables are not implemented, and any "set variable" or "if variable" commands will be ignored. This will change in the next version.
* Tags are limited to 8 (I was lazy and used 1 byte). However, you can change them with the left and right arrows, and space.
* Chorus is not implemented (no one uses it, right?). Laziness again. This will also be rectified soon.
Anyway, a description of what you see:
The top of the window shows the current position of the song, in beats. As the song plays, that goes up.
Below that are two columns. The column on the left shows the label positions. They default to 0, of course. The column on the right shows the Jump counters. If a limited jump is encountered, a jump counter is set, and everytime thereafter, when that jump is hit, the counter goes down by one. When it reaches zero, it ignores the jump, and resets the jump to undefined.
Below that are the tags. An unset tag is blue, a set one is green, and the highlighted tag is flashing. Use Left and Right to select another tag, and use Space to toggle.
Finally, the far right is the volume. Use Up and Down to change that.
Use Escape to quit.
This is a command line program, and *requires* an argument, the midi to play. And, don't be fooled by the window it spawns; it'll still hog the console until it quits.
I included the Final Fantasy Fanfare, looped, for your listening enjoyment. Sorta. You'll notice what I mean in regards to the "beat" measurement not being fine enough, but, there's not much I can do, and the benefits outweigh the negatives, right? Thought so. _________________ I stand corrected. No rivers ran blood today. At least, none that were caused by us.
Final Fantasy Q
OHR Developer BLOG
Official OHRRPGCE Wiki and FAQ |
|
Back to top |
|
|
DomGallo Is a master. And you?
Joined: 18 Nov 2005 Posts: 85 Location: COMING THROUGH YOUR BATHROOM WINDOW
|
Posted: Mon Dec 05, 2005 3:45 am Post subject: |
|
|
Actually, I think with creative tags and looping, you probably could bypass the 100 song limit, by segmenting songs and only activating tags when you needed them, pretty easily. After all, it's a 100 song limit, you make one or two songs a bit bigger, split 'em in half and tag 'em right, and you've got 200. I'm no expert, but it seems feasible if you have any kind of a creative mind in your body. _________________ The turkey: God's most noble creature.
Don't eat Turkey for Christmas. I WILL FIND OUT. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|