Sonic and Sega Retro Message Board: mid2smps - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
  • 5 Pages +
  • 1
  • 2
  • 3
  • Last ►
    Locked
    Locked Forum

mid2smps with proper PitchBend support, and MIDI driver

#1 User is offline ValleyBell 

Posted 22 May 2011 - 03:41 PM

  • Posts: 234
  • Joined: 08-September 10
  • Gender:Male
  • Project:researching SMPS sound drivers
  • Wiki edits:10
Latest build:
mid2smps 0.3.5 binary, source (Visual Basic 6), MIDI driver binary, source

SMPSPlay with configuration files for SMPS preview


Original post
Today I present you the opposite tool of smps2mid: mid2smps.

You can download the tool with some example files here.
Demo songs are: FF4 Boss Theme, The Final Countdown, Tales Of Phantasia: Boss Theme

Features:
- full support for Pan, PitchBend and Tempo changes
- support for volume changes via note velocity and Main Volume controller (no Expression-Controller)
- support for ymx instrument files
- per-channel looping (with Controller 111, value 0 is loop start, 1-127 is loop end)
- force E7 flag between notes (Portatemento Controller 65, Off <=63, On >=64)
- export to binary smps-file or directly into a ROM

How to use:
1. [optional] load a ROM (recommended for quick testing) and select the song you want to overwrite from the list
2. load YMX Instrument file (must only be done once)
3. set Tick/Qrtr and TempoDiv values, if wanted
4. click MID2SMPS

Notes:
- The tool will NOT ask you if you want to save the ROM. It will just silently overwrite the data.
- Instruments are assinged in order they are used.
- You <I>can</I> convert files without loading any instruments. It just won't attach any instrument data to the smps file.
- Currently the channel mapping is hardcoded. See table below:
MIDI   SMPS
 1-5  FM 1-5 (no 6th FM channel)
  10  DAC and PSG Noise
11-13 PSG 1-3 (3rd channel used for noise)
  14  PSG Noise (for additional controllers)

-Drum mapping:
DAC Drums: 2x Bass Drum, 2x Snare Drum, Clap, 2x Cymbal, all Toms
Noise Drums: all Hi-Hats, 2xRide Cymbal, Ride Bell

- PSG instrument selection is done with Bank Select LSB. An (ignored) patch change message must follow the Bank Select message to confirm it.
- Modulation isn't yet implemented
- only Sonic 1 support (will care about the others later)
- The conversions are quite unoptimized. I'll write an optimized sometime in the future.

Thanks to:
- all the people who contributed to the Music Hacking Guide
- nineko for the tempo calcuation algorithm
- Oerg866 for the SMPS Player and info about the PSG envelopes (that helped me to make the example files)
- Rob Jinnai for notes on SMPS flags
- Tamkis for making a terrible FF4 Boss conversion that convinced me that I had to make a better one (that's why I wrote mid2smps)

The Music Hacking Guide has quite some misinformation that caused me trouble.
I took some notes and will correct these things.

Now listen to the demo files, try the tool and comment! (tool and demo files)

EDIT: Added notes about demo songs, volume change support and thanks to Tamkis
EDIT2: Updated the tool with instrument editor.
EDIT3: added link to mid2smps 0.3 bin+src+driver
EDIT4: Added SMPS preview package.
This post has been edited by ValleyBell: 02 November 2018 - 01:14 AM

#2 User is offline Tweaker 

Posted 22 May 2011 - 03:49 PM

  • Posts: 12389
  • Joined: 27-June 04
  • Gender:Male
Holy fuck. HOLY FUCK.

I FUCKING LOVE YOU.

EDIT: Will you be able to add velocity/volume change support? That would be fantastic.

Also, re:the music guide, I haven't updated it in years and other people have discovered nuances in the SMPS engine that surely exceed my own knowledge. Anything you or anyone else could do to make that document more coherent, accurate and easy to understand is more than welcome in my eyes.

#3 User is offline Aerosol 

Posted 22 May 2011 - 03:51 PM

  • FML and FU2
  • Posts: 10039
  • Joined: 27-April 08
  • Gender:Male
  • Location:Not where I want to be.
  • Project:Sonic (?): Coming summer of 2055...?
Someone explain this to the layman.

I can make a midi and it can go ingame just like that?

#4 User is offline amphobius 

Posted 22 May 2011 - 03:53 PM

  • where are the japanese shaman girls, lintahlo?
  • Posts: 2120
  • Joined: 19-February 08
  • Gender:Male
  • Location:Northern Ireland, Belfast
  • Project:life
  • Wiki edits:165
FUCK FUCK FUCK.

All I need is x3v and tfi support and I'll be game to move away from XM files forever.

Oh, and .asm output. Certainly I'll want that.

#5 User is offline Spanner 

Posted 22 May 2011 - 04:00 PM

  • The Tool
  • Posts: 3174
  • Joined: 02-June 07
  • Gender:Male
  • Location:United Kingdom
  • Project:Sonic Hacking Contest
  • Wiki edits:2,193
Well this'll certainly help for those who prefer MIDI over XM. Now, if you can produce a layout similar to XM3SMPS, this'll be a lot better.

#6 User is offline Oerg866 

Posted 22 May 2011 - 04:00 PM

  • Posts: 1767
  • Joined: 07-September 06
  • Gender:Male
  • Location:Frankfurt, Germany
  • Wiki edits:3
This is very nice indeed!

Great to see new evolvements in this sector.

And hopefully, this will spawn some more decent stuff finally smile.png

Cheers!

EDIT: Oh, and:

QUOTE
- Oerg866 for the SMPS Player and info about the PSG envelopes (that helped me to make the example files)


Thanks, great to have (indirectly) helped :D
This post has been edited by Oerg866: 22 May 2011 - 04:01 PM

#7 User is offline Irixion 

Posted 22 May 2011 - 04:03 PM

  • Posts: 1521
  • Joined: 30-December 04
  • Gender:Male
  • Location:Ontario, Canada
  • Project:Life
  • Wiki edits:152
Massive boner right now.

#8 User is offline ValleyBell 

Posted 22 May 2011 - 04:31 PM

  • Posts: 234
  • Joined: 08-September 10
  • Gender:Male
  • Project:researching SMPS sound drivers
  • Wiki edits:10
I made some small edits to the first post. Volume changes work. (one of the things that caused me some headache)

QUOTE (AerosolSP @ May 22 2011, 10:51 PM)
I can make a midi and it can go ingame just like that?
Yes, that works, although it currently supports only plain Soinc 1 and the SMPS Player.

QUOTE (SOTI @ May 22 2011, 11:00 PM)
Well this'll certainly help for those who prefer MIDI over XM. Now, if you can produce a layout similar to XM3SMPS, this'll be a lot better.
I'll make a proper layout later. This version is enough for basic conversion, but I want it more customizable. (drum mapping editor etc.)
nineko said he'd write a new YM2612 instrument editor. Until then you can use SOME. It's quite buggy, but has a voice preview function.

#9 User is online nineko 

Posted 22 May 2011 - 04:42 PM

  • I am the Holy Cat
  • Posts: 5648
  • Joined: 17-August 06
  • Gender:Male
  • Location:italy
  • Project:I... don't even know anymore :U
  • Wiki edits:5,251
QUOTE (ValleyBell @ May 22 2011, 11:31 PM)
nineko said he'd write a new YM2612 instrument editor
I didn't start yet, but I will look into this soon. You should know I'm a terribly lazy person, my "yes I will do it" usually implies a procrastination of a couple of weeks.

But seriously I'll try to get something done soon.

*opens VB*

#10 User is offline Varion Icaria 

Posted 22 May 2011 - 05:58 PM

  • He's waiting....
  • Posts: 1009
  • Joined: 26-August 03
  • Gender:Male
  • Project:S4: Cybernetic Outbreak
  • Wiki edits:1
This is rather interesting it may make my deal with music a lot easier now. Yes this and other things have caused a slight preview of my return. Keep up the great work everybody!

#11 User is offline Oerg866 

Posted 23 May 2011 - 05:15 AM

  • Posts: 1767
  • Joined: 07-September 06
  • Gender:Male
  • Location:Frankfurt, Germany
  • Wiki edits:3
Valleybell: If you want you can use the Instrument editor I wrote in VB6 until nineko finishes his. Only thing missing is a proper preview function. (Right now, it uses Rob Jinnai's C Player for previewing, which is using a very incomplete and inaccurate YM2612 core).

Cheers!

#12 User is offline Mr Lange 

Posted 23 May 2011 - 05:56 PM

  • A wise guy eh. I know how to DEAL with wise guys.
  • Posts: 1287
  • Joined: 27-August 10
  • Gender:Male
  • Location:The Land of Waldos
  • Project:Sonic Utopia, Sonic Overture
  • Wiki edits:1
I can't wait to try this. Also, whats the deal with ymx? I don't even recognize that format. Is that for FM instruments? How do I make those? All I got are tfi and vopm formats.

#13 User is online nineko 

Posted 23 May 2011 - 06:37 PM

  • I am the Holy Cat
  • Posts: 5648
  • Joined: 17-August 06
  • Gender:Male
  • Location:italy
  • Project:I... don't even know anymore :U
  • Wiki edits:5,251
I can answer this.
YMX was the instrument format used by Saxman's Sonic QX, the first tool dedicated to music editing. It is indeed an outdated format, although still perfectly functional. You don't need to worry about that for much longer, anyway, as I am working on a new instrument editor specific for this converter (and my own mid2vgm), and it's coming along quite nicely, I can spoil some features here: it will let you create a bank of FM instruments, importing them from existing files in various formats (ymx, tfi, mvs, ... basically all the formats supported by xm3smps), and creating/editing them by hand. Once you have a bank of several FM instruments, you map them to the 128 General Midi instruments. Multiple General Midi instruments can be mapped to the same FM instrument so you won't need a complete bank of 128 FM instruments to convert your songs, even if that would be preferable to get more variety of course. I hope to have something releasable within a couple of days, stay tuned.
This post has been edited by nineko: 26 May 2011 - 01:12 PM

#14 User is offline Mr Lange 

Posted 23 May 2011 - 06:44 PM

  • A wise guy eh. I know how to DEAL with wise guys.
  • Posts: 1287
  • Joined: 27-August 10
  • Gender:Male
  • Location:The Land of Waldos
  • Project:Sonic Utopia, Sonic Overture
  • Wiki edits:1
Well thank you nineko, that does answer my question, and I look forward to those conversion tools, except this mid2smps tool is completely useless since clearly there is no way to make ymx instruments or rip them from games/songs. Thus the ymx import button is a waste of space and all midis converted will result in silence.

#15 User is online nineko 

Posted 23 May 2011 - 06:47 PM

  • I am the Holy Cat
  • Posts: 5648
  • Joined: 17-August 06
  • Gender:Male
  • Location:italy
  • Project:I... don't even know anymore :U
  • Wiki edits:5,251
You can create YMX files with the aforementioned Sonic QX, and xm3smps has an option to export ymx files as well.
Anyway, as I said, within a couple of days I'll release a powerful dedicated instrument editor.

  • 5 Pages +
  • 1
  • 2
  • 3
  • Last ►
    Locked
    Locked Forum

4 User(s) are reading this topic
0 members, 4 guests, 0 anonymous users