Final Fantasy Hacktics

Modding => PSX FFT Hacking => Topic started by: pokeytax on March 21, 2013, 07:38:09 pm

Title: MIDI to SMD v0.5: FFT Music Converter
Post by: pokeytax on March 21, 2013, 07:38:09 pm
This is an Excel workbook (Excel-only, OpenOffice won't work) that converts MIDI files (.mid) to SMD files (.SMD), which FFT can play.

It is not finished, and 10% of what you put in will come out unlistenable, but for a lot of songs it sounds... surprisingly nice.  If you apply the patch and select New Game, that will give you an idea of what an ambitious MIDI sounds like right now.  Or just listen to the .mp3, which I recorded out of pSX: Test SMD (http://dl.dropbox.com/u/4580484/MIDI%20to%20SMD%20Test.mp3)

Important notes:
- You're going to get a bum instrument once in a while.  I might be able to sort these out, or it might have to be done in "post-production".
- The files are rather large and the sound is tinny.  You may need to overwrite one of the larger tracks to get even a small MIDI to fit.  Again, still under construction.

Instructions:
Open the notebook and change the file path as desired.  You can either leave the "Y" in the yellow box to have the spreadsheet automatically spit out an .xml file which will tell FFTorgASM to overwrite MUSIC99 into the same directory, or leave it blank and just let the spreadsheet produce raw hex.  Run the "Convert" macro.  If you didn't choose XML, copy the hex and overwrite an existing file using a hex editor, then use CDMage to import that file back to your FFT ISO.  Leaving the remainder of the existing file in there is fine, there's no need to zero it.

If you're going to be trying a bunch of midis, I suggest just plopping this into your FFTorgASM folder to streamline the process.  Change path, run macro, run FFTorgASM.

I thoughtlessly neglected to mention before that this is really little more than an implementation of the excellent work gomtuu did on this a while back.  I'm not sure if anyone else helped, but if so, thanks to them as well!

EDIT: Fixed some critical bugs with sustained notes and instrumentation.  It's sounding much improved.
3/3/2014 EDIT: I fixed a really stupid bug that threw errors sometimes, although the hex output was still okay. However, I'm not certain what's causing fdc's bug without seeing the midi file. I will be back in a month or two when my schedule is clearer to see if people are still having issues.

03/Dec/2020 NYZER EDIT: Fixed a bug in the macro that caused an issue when running the Convert macro. DO NOT change the file name or it'll return. Kept the original file as the one labeled "(Old)". Also added some further instructions in the Control Panel to help anyone who might not be familiar with Excel macros.
Title: Re: MIDI to SMD v0.3: FFT Music Converter
Post by: Pride on March 21, 2013, 08:20:11 pm
Need a like button for this. I hope the quality continues to improve, awesome work ^_^
Title: Re: MIDI to SMD v0.3: FFT Music Converter
Post by: Elric on March 21, 2013, 08:42:24 pm
This is an amazing find, Great work Pokeytax! I know it's still got some bugs, but the fact that we can do it at all now
is a HUGE step up and I'm sure many people will enjoy this.
:more:
Title: Re: MIDI to SMD v0.3: FFT Music Converter
Post by: Jumza on March 21, 2013, 09:30:35 pm
Dang, Pokeytax is there anything you can't do? This is so cool!
Title: Re: MIDI to SMD v0.4: FFT Music Converter
Post by: Choto on March 22, 2013, 08:12:20 am
Quote from: Pride on March 21, 2013, 08:20:11 pm
Need a like button for this. I hope the quality continues to improve, awesome work ^_^


I propose like buttons with associated values. This gets +1000. Gotta get my composing boots on!
Title: Re: MIDI to SMD v0.5: FFT Music Converter
Post by: pokeytax on March 23, 2013, 12:24:47 am
Thanks, guys.  Like I said, though, it's really just someone else's notes.  I hardly did any ASM at all.

It's been vastly improved since the first version and a lot of stuff sounds quite good.  The OP now includes a much more ambitious track.  It's not a perfect rendition, but it gives you a good idea of where we are at now.
Title: Re: MIDI to SMD v0.5: FFT Music Converter
Post by: Celdia on March 23, 2013, 02:05:11 pm
Someone else making notes is great and all but if they never did anything with them then it doesn't count for much. You're doing something with it and it can be used by others. Take your kudos, good sir. You earned them.
Title: Re: MIDI to SMD v0.5: FFT Music Converter
Post by: Elric on March 23, 2013, 03:25:31 pm
Quote from: Celdia on March 23, 2013, 02:05:11 pm
Someone else making notes is great and all but if they never did anything with them then it doesn't count for much. You're doing something with it and it can be used by others. Take your kudos, good sir. You earned them.


^^ Exactly this.

Just listened to the test song btw and it sounds great, would make some epic boss music
Title: Re: MIDI to SMD v0.5: FFT Music Converter
Post by: Jumza on March 23, 2013, 04:15:17 pm
Quote from: Elric on March 23, 2013, 03:25:31 pm
Just listened to the test song btw and it sounds great, would make some epic boss music

That's because it is :lol:
http://www.youtube.com/watch?v=hGmBKYI02yQ
(I'm sure you knew that though :) )
This is so boss Pokeytax, you deserve every compliment you get for sure.
Title: Re: MIDI to SMD v0.5: FFT Music Converter
Post by: Elric on March 23, 2013, 04:29:17 pm
Yep I knew what it was from, but it could easily be used for another epic boss other than Sephy :P
Title: Re: MIDI to SMD v0.5: FFT Music Converter
Post by: Jumza on March 23, 2013, 04:50:22 pm
I always thought that Ghetsis' theme from pokemon black / white (and BW2) was a rip off of Sephiroths, mostly because of the chanting, too bad no pokemon boss could ever be as epic as sephiroth.
Title: Re: MIDI to SMD v0.5: FFT Music Converter
Post by: Elric on March 23, 2013, 06:11:51 pm
I've still never played passed Silver/Gold (unless you count Leafgreen and Firered)
But Yeah Pokemon VS. Sephiroth XD

Title: Re: MIDI to SMD v0.5: FFT Music Converter
Post by: formerdeathcorps on September 21, 2013, 11:04:30 pm
I tried it with a .mid file from a song I wrote, Excel threw an exception error (Error 1004, Application or object-defined error.)  Not sure if this is relevant, but the overwrite process deletes the orgASM header.


Next i

Sort notes by timestamp.


    Range("F1").Select
    Range(Selection, Selection.End(xlToRight)).Select
    Range(Selection, Selection.End(xlDown)).Select
    ActiveWorkbook.Worksheets("MID").Sort.SortFields.Clear
->    ActiveWorkbook.Worksheets("MID").Sort.SortFields.Add Key:=Range(Cells(1, 6), Cells(CursorCmd - 1, 6)), _
        SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal <- (Breaks here)
    With ActiveWorkbook.Worksheets("MID").Sort
        .SetRange Range(Cells(1, 6), Cells(CursorCmd - 1, 13))
        .Header = xlGuess
        .MatchCase = False
        .Orientation = xlTopToBottom
        .SortMethod = xlPinYin
        .Apply
    End With
Title: Re: MIDI to SMD v0.5: FFT Music Converter
Post by: Heisho on February 08, 2017, 01:12:00 am
Hello everyone, I'm new in this and would like to know if thereĀ“s a specific way to open the file on excel, because I used Excel 07 and 10 and it says the following

" This workbook has lost its VBA project, ActiveX controls and any other programmability-related features."

Any clue regarding this?

Thanks in advance
Title: Re: MIDI to SMD v0.5: FFT Music Converter
Post by: CONMAN on February 09, 2017, 12:35:31 pm
I forgot about this topic completely!  I'm going to play around with this Heisho and I'll let you know what I find.  My excel skills have gone from poor to bad over the years, but I'll try any way.

EDIT:  I downloaded and opened this sheet.  If I remember right I was simply given the option to enable things...  I changed the file path. I pulled up view macro's and ran "convert".  Excel kind of freaked out and spit out a "music99" excel sheet and an xml sheet.  on a clean iso I attempted to patch twice (2 ct songs). I tried the first one on music27 (world map music). I did this because I figured I could test it faster.  It came out terrible- like a single beep every five seconds.  I tried again and got a quiet drum beat sort of sound.  The second one was shorter- after it finished the first song started to beep again (obvious once I heard it).  Once both songs ended the game froze.  Probably to long of a song I used?  I may keep messing around and try to find some music that comes out better...   

EDIT 2: tried again with a remix of ct frog's theme. It came out great, but was a little too high pitched for me.
Title: Re: MIDI to SMD v0.5: FFT Music Converter
Post by: Heisho on February 10, 2017, 02:34:50 am
Hey thanks for the reply man. Maybe I need to check my installed version since I removed a lo of things when installing Office for space sake. I'll try to give a try later since i just found the tunes I was looking for.

I'll keep you posted.
Title: Re: MIDI to SMD v0.5: FFT Music Converter
Post by: Dollface on September 22, 2018, 12:00:40 pm
i'm new to this site, and my terrible english don't help(biggest problem for me), but I wanted understood, how can you use FFTOrgASM Generator
to make others archives? I don't understand Excel's use, XML's use... I read and read multiple times, but I don't understand. What to do that archives?
Can you make a special tutorial for me? (Video preference) ~Thank you for your time! 
Title: Re: MIDI to SMD v0.5: FFT Music Converter
Post by: Basil on June 13, 2019, 11:28:49 pm
Hello!

How are you all, my name is Basil and I've been lurking around the place for several years now. I'm really astonished to see you guys have gone so far with moding fft. Now, what made me sign up today was because i've recently found Conman's youtube channel (btw if you read this: I like your mod man! Good work!) where he was able to successfully implement new soundtracks from outside the game, which really got me interested in converting some of my own favourite osts myself. It's been a few months now, i've had a chance to experiment with hundreds (plural :|) of midi files, and sometimes i ended up with something you can call "audible".

I just finished recording a video which demonstrate 2 of my early attempts, hope you enjoy it.


~Basil

https://youtu.be/GfyL5bbL75k
Title: Re: MIDI to SMD v0.5: FFT Music Converter
Post by: CONMAN on June 14, 2019, 02:48:22 pm
Thanks for the kind word Basil!  Music converting is a neglected aspect of fft modding.  It is very much a pain most of the time.  I would love to hear some more tracks that you have done.  I really should up load the better sounding tracks that I have done (I'm pretty sure I have a few I haven't bothered with).  Honestly I really haven't uploaded them because there seemed to be a lack of interest.
Title: Re: MIDI to SMD v0.5: FFT Music Converter
Post by: Nyzer on June 14, 2019, 07:46:52 pm
I think the only real lack of interest is due to the hit-or-miss complications of the music import tool. I know I'd personally love to see some new/remixed tracks in Jot5 (not that it'd be my call, especially considering that it would involve replacing existing tracks AFAIK).
Title: Re: MIDI to SMD v0.5: FFT Music Converter
Post by: Basil on June 21, 2019, 02:18:59 pm
Hello again.

I had a problem running the forum last friday, it appears that problem has been solved.

Quote from: CONMAN on June 14, 2019, 02:48:22 pm
Thanks for the kind word Basil!  Music converting is a neglected aspect of fft modding.  It is very much a pain most of the time.  I would love to hear some more tracks that you have done.  I really should up load the better sounding tracks that I have done (I'm pretty sure I have a few I haven't bothered with).  Honestly I really haven't uploaded them because there seemed to be a lack of interest.


I always thought fft music quality was on another level, and besides the fact you can't add new tracks unless you replace it with existing ones made it less appealing. Anyways, i'll probably gonna start recording some videos in the next few days and i'll upload them as soon as i can.
Title: Re: MIDI to SMD v0.5: FFT Music Converter
Post by: Basil on June 28, 2019, 08:37:22 pm
Hello.

Five more songs i've uploaded early on the day, it took me few days to learn how to edit events script.

1) https://youtu.be/szobyjbyOYA

2) https://youtu.be/o1kN9C9jgLo

3) https://youtu.be/m6ULb6zGavc

4) https://youtu.be/b9fuCbOz2gw

5) https://youtu.be/BHiPhqFThPc


And there will be more!
Title: Re: MIDI to SMD v0.5: FFT Music Converter
Post by: CONMAN on July 03, 2019, 02:22:11 pm
Nice Basil!  You surely had to adjust the song speed on at least some of these.  I was curious how frequently you had to pick new instruments with a hex editor on these songs.  I would often be purposefully choosing songs that were appropriately themed to increase the chances that the converter would kick out something usable. 
Title: Re: MIDI to SMD v0.5: FFT Music Converter
Post by: CONMAN on July 09, 2019, 10:39:03 pm
I've enjoyed the tracks that you have shared Basil.  I honestly only got 8 or 9 adjusted to a level I found satisfactory.  I pretty much stopped playing with the converter once I had covered the random battles songs and a small handful more.  Mostly I just focused on battle themed songs, because that's where most time is spent in this game.   

The size of converted songs is the real killer for me.  Perhaps I could adjust some of the sizes using Xifanie's Iso and I just don't have a good enough grasp of it.   Something that I would like to do is change up a few of the songs that have incredibly small sizes.  Music#27 is the world map song.  That thing is like 1.5 freaking kilobytes!  The roster screen music is like 2.8K.  I almost never find a song that converts that small!  Typically I convert a song with midi->smd and then grab my hex editor, pull the relevant data and paste it into a new file to check the real size of a song and rarely do I find songs under 6K.

I feel like being able to change some of the itty bitty tunes that see the most use would go a really long way towards making a mod feel fresh.  I feel like the Jot5 modders probably feel the same.

Anyway, here is what I think is the best of my tunes.  They are marked where I replaced original tracks.  I don't have the pure converter data just on hand because I usually have to get each song a few listens and tweak it with a hex editor.  I could pull that up if someone really wants it.

I rather enjoy battle on the big bridge/Gilgamesh and the atma weapon song from ff6 (I think it is decisive battle).  Atma's theme is actually my ringtone on my phone! Huge impression on my childhood!   







Edit:  I almost triple posted, but I wanted to note that I tried again to mess with the sizes of songs with the iso editor and this time did it without borking my file.  Slightly increased the size of song 27 and decreased 28.  I now have to find a tiny little song to replace the shop song, but a success!

Title: Re: MIDI to SMD v0.5: FFT Music Converter
Post by: Basil on July 12, 2019, 07:46:29 pm
Greeting Hackticians.  :lol:

I feel quite delighted that you enjoyed them CONMAN. In the past two weeks i had a chance to expirement with new songs, i couldn't finish most of them but i was able to comprehend basic stuff. It's worth noting that i'm using a midi editor software (you can find it here https://www.midieditor.org, there is so much you can do with this tool.) to edit midi files before i go through the converting process, i only use a hexeditor execlusively to past data from the generated files to the SMD files. By the way,  yesterday i came across your post and found that you already have a version of FF7 Weapon Ride theme done, i just want to say i'm working on a slightly better versions of that song plus the 7 songs that i've uploaded already which i'm going to finish them by the end of next week.

**********


Now, with brief details i'm going to show you the result of the process i've went through to convert one of my favourite ost of all time.

Here is how the theme plays when you run it throught the converter without editing the song first:

https://youtu.be/z0yGgWYFhBg

Surely not the kind of osts that plays in a castle where time has froze :? :?! Moving on, i grabbed the midi file and made some adjustments, here is what came out:

https://youtu.be/c4-mx1CUhSE

I'm somewhat pleased with the result, still, someday ago, Nyzer pointed on my birth by sleep song that it plays faster than it should, which made me realize that 95% of the songs that i tried to convert plays faster than normal speed after conversion comparing to the originals, so i had to grab my midi file again and adjusted the speed level, here is the result:

https://youtu.be/O2qofBLVGLY

Now this sounds more like the original, still not as good as when it played on the pipe organ  :cry: :cry: :cry:, but what can i say  :).

Here is a version plays even slower i uploaded for the sake of recording:

https://youtu.be/X83Y-qvyD6g

And here is birth by sleep from kingdom hearts played at low speed (thanks nyzer for the comment, i hope you enjoy this.):


https://youtu.be/N8egJDcnmOQ

Enjoy your weekend!
Basil,

Title: Re: MIDI to SMD v0.5: FFT Music Converter
Post by: Basil on July 12, 2019, 07:48:53 pm
Double posted when i shouldn't --__--
Title: Re: MIDI to SMD v0.5: FFT Music Converter
Post by: Nyzer on July 12, 2019, 09:18:42 pm
<3
Title: Re: MIDI to SMD v0.5: FFT Music Converter
Post by: CONMAN on July 16, 2019, 02:21:48 pm
That midi-editor is pretty cool.  I don't have a midi device for it to play on, but it is very useful for me to see what the actual instruments are and what order they play in.  This makes it much easier to edit the tunes where the converter made a terrible instrument choice.  It's still a little annoying that some songs call for instruments that simply aren't in found in the games selection.

:D You've got me having a lot more fun with importing music. When I have a couple more I really like I will post them here.
Title: Re: MIDI to SMD v0.5: FFT Music Converter
Post by: Neophyte Ronin on July 27, 2019, 11:19:36 pm
If the FFT instrument set is insufficient, would porting another set from another similar game be feasible, for instance from Vagrant Story or even the PSX Doom games?

The MIDI converter sounds interesting.  I looked up some software (https://www.lunaverus.com/ (https://www.lunaverus.com/)) called AnthemScore a free-30-day-trial-or-pay-$35 program designed to extrapolate sheet music from a recording.  Said sheet music can then be turned into a MIDI thanks to the simplicity of the format, allowing you to do your own scoring.  You can even make requests from a musician (such as Jon Babb, who has been on www.newgrounds.com (http://www.newgrounds.com) since the mid-2000's) to provide tracks you can then turn into MIDI and finally to an SMD.

Just be sure that you have a good ear or vision of your preferred soundtrack so that it doesn't interfere with the experience of playing a mod that sounds uniquely you.
Title: Re: MIDI to SMD v0.5: FFT Music Converter
Post by: Dollface on October 12, 2019, 10:25:04 am
Quote from: Dollface on September 22, 2018, 12:00:40 pm
i'm new to this site, and my terrible english don't work(first problem for me), I don't understand Excel's use, XML's use... I read and read many times, but I don't understand.
Can you help me with this? (Video lessons)
Title: Re: MIDI to SMD v0.5: FFT Music Converter
Post by: Dollface on October 12, 2019, 12:10:15 pm
I choose the file path, I run the 'Convert' macro, but the following message appears:
Run-time error '1004'
"Could not find C:\Users\** ** **\Desktop\MID to SMD v0.5.xls. Is it possible that it was moved, renamed or deleted?"
What should I do?
Title: Cool music visualization tool!
Post by: CONMAN on March 04, 2021, 12:46:32 pm
I've been poking around a lot at music/sound effects and such and found a tool that really breaks down how music is played by the game. https://github.com/vgmtrans/vgmtrans/wiki (https://github.com/vgmtrans/vgmtrans/wiki)

I haven't messed around too much with this program.  It is supposed to translate out videogame music into midi files.  The one I tested came out terrible, but still pretty cool. Very nice to have a visual aid when messing with a song that didn't quite come out right.  I could have sworn that it picked up a variable that is not listed in our wiki! I'll be messing around with this for at least a couple days.
Title: Re: MIDI to SMD v0.5: FFT Music Converter
Post by: ---HattoriIga--- on November 03, 2021, 08:16:24 pm
I use excel 2007 and it does not open to convert MIDI to SMD.
I active in the tab enable macro...
Title: Re: MIDI to SMD v0.5: FFT Music Converter
Post by: CONMAN on November 04, 2021, 12:26:03 am
I use an older excel as well and I open the view tab, then hit Macro, and then run macro.
Title: MIDI to SMD tool mini-update
Post by: CONMAN on November 11, 2021, 01:59:02 pm
I have been slowly trying to improve the instrument selection for the smd convertor tool created by Pokeytax.

The instrument page on the convertor tool has a description list that seemed to be checked by ear. I have updated this to the 128 "General MIDI Instrument List" for much easier comparison.  The A column simply listed midi numbers and the B column lists the selected instrument sounds.  The old instrument selection had many redundant and off sound selections.  Previously entire instrument midi groupings would direct to the same sound, ie all pianos selection converted to 16/17 "slap bass" or all guitar sounds were 5A synth strings.  These have quite a bit more variety in selection now.

I have edited abou 80-90 instrument selections. Unfortunately, lacking some proper instruments lead me to make some selection choices like these 3 guitars= high pitched bass guitar sounds.  Some sounds I really could not make a good selection for.  If you wanted a good sitar or ocarina sound you will have to settle.

Column "J" on this sheet has given me a pause.  This does not have a description. Based on the instrument selection, I believe this listing is the "General MIDI Drum Note Numbers."  This is 60 percussion sounds and they are grouped 27-87....https://soundprogramming.net/file-formats/general-midi-drum-note-numbers/ (https://soundprogramming.net/file-formats/general-midi-drum-note-numbers/) Not matching up well with the spreadsheet.  This will take further review.  Percussion sounds are listed on the general instrument list, but this looks like another round of sound selection.  I'm just not quite sure where to start with this one.

I'm going to upload the current excel sheet, but a few issues are simply not addressed with it's use.  I usually just make these adjustments with a hex editor.  Tempo is controlled by the variable A0. Usually setting this to ~AO66 will fix it pretty well some snes songs need to be pushed quite a bit lower or higher.  Pitch of certain notes can be far too high for the game instruments.  Commonly I will see a voice selection looking like this:  AC8E 9404  (ac=instrument, 94=octave) and simply change it out to AC8E 9402.

I've had one other issue that I simply haven't been able to fix and only occasionally pops up.  Sometimes I have had very quick notes not convert to play quick enough even with some tinkering.  I had a super fast bass for a dancing mad tune that should have played 1/24th of a note but I couldn't seem to shorten up with individual note adjustments. Might simply be misunderstanding on my part.
Title: MIDI to SMD Instrument edit 1.2
Post by: CONMAN on November 12, 2021, 03:00:42 pm
I have done what I can with the percussion instrument edits. Previously a shocking number of them had Drumroll set as the default.  I could not find a good instrument for a number of them.

Wish I had done this earlier. I have spent way too much time messing around in a hex editor picking different instruments.  This at least should pick the right sound far more often.

Another thing that I didn't note in the previous post (a triple!), volume selection for certain instruments can be a bit lacking. 

Anyway, this is a step Instrument edit 1.2: