How to make a song with mid2smps

Discussion in 'Tutorials Archive' started by NiphFM, Jun 16, 2016.

  1. NiphFM

    NiphFM Host of the Mega Drive Music Contest Member

    Joined:
    Jun 5, 2015
    Messages:
    430
    Location:
    Music Plant Zone
    I remember when I first started with SMPS music here, I used mid2smps. And I sucked to put it lightly... I used to simply just convert them straight through, without doing anything to loop or edit the MIDI. I'm guessing that a lot of you here are newbs with mid2smps and its capabilities, or maybe you're just viewing it because you want a refresher, or maybe just browsing through the tutorial, just because it's a new post.

    Anyway, for those of you who don't know where to start, we will go through a quick tutorial.

    First, open MID2SMPS up and load a Instrument Library using the button, “Load Inst. Lib.” These are “.gyb” files and the original zip file would have contained one of those files. Then, open up “mid2smps_MidiDrv.7z”, go into “data” and extract the file “S1neko_DAC.lst”, “S1neko_Map.map” and “S1_PSG.lst” Switch back to mid2smps and open the Mappings Editor. In the editor, press “Load DAC Names” and load “S1neko_DAC.lst”, then press “Load PSG Envel.” and load “S1_PSG.lst”. Finally, press “Load Mappings” and load “S1neko_Map.map”.

    We've finally completed setup! You're thinking, "Lets run a midi through the program!!" Well, that's not quite the case yet, as we have to set up the midi to work well through conversion.

    The SMPS sound driver has 5 FM Channels responsible for making the instrument sounds, 3 PSG Channels responsible for the square waves and 1 DAC Channel for playing drum sounds and PCM sounds. Each can only play one note at a time however, so midis with more than one note on a single channel will need to be split into 2.

    You're thinking, how do I do that?! Well, you will need a midi tracker. I personally prefer Anvil Studio though you may use a different tracker which is better. This tutorial will be using Anvil Studio.

    Remove any unnecessary channels from the track. These are channels that have things like empty channels, echoes and tracks with the same notes but different instruments. Then split channels with more than one notes into however many tracks need be. Reassign channel numbers to 1-5 for FM channels, 11-12 for PSG channels and channel 10 for the DAC channel.

    You will now need to make your track loop. You will need Nineko's MIDI Event Editor. First, make 2 markers at the start and at the end of your desired loop point in Anvil Studio, then open nineko's MIDI Event Editor. Find your 2 markers and add an event at each one with parameters 111, 0 for a loop start and 111, 1 for a loop end. Do this for every channel in the track. Once you are finished, save the midi.

    Your midi is now ready for conversion! If the tempo sounds too slow in the SMPS file, set the Tempo Divider on the main mid2smps window to 1 (Setting it at 0 defaults it to 2 causing slowness in some conversions).

    Volume levels may also be out of whack. You will need a hex editor to change volumes. In hex, bytes 02 and 03 refer to the number of channels being used. This is usually 06 03 (06 being the FM channels + the DAC channel and the 03 being the number of PSG channels). These numbers are important in telling you how many channels are there and therefore, the size of the header. Always starting at bytes 06 and 07 is the location of the DAC channel layout, followed by two bytes of 00. Afterwards, the FM channels start. At the end of every long-word (four bytes), you will find the volume. The higher the number, the louder the track is, though a good gauge to tell if you've got the balance right is if you can hear the drums clearly without trying hard (Thanks JoenickROS for the tip). Continue with the FM channels until you get to the PSG channels. These have an extra word (2 bytes) on the end of them, for the PSG instrument used (That's for the last byte, at least). If these are set to anything other than 00 for the first 2 channels, it may have undesired results in-game (crackly sounding for any above PSG instrument $09).

    If you want to transpose a track, the byte before the volume meter will set it. 01 and upwards transpose up, while FF down transpose down. Common transpositions by me are 0C (+12), F4 (-12) mainly just to normalize the bass or lead tracks.

    If you still aren't happy with the tempo, you can always manually edit it at bytes 04 and 05. Common speeds are 02 00 and 01 03. Anything higher than 2 in byte 04 may cause sync errors though.

    When you are satisfied with your edits, save your work!

    To further enhance your track, use these tips and tricks:
    1. Use instrument changes to your advantage to make your song sound a lot more fuller. It may take a bit more time and effort but it's worth it in every way.
    2. In the instrument editor, there is an import instrument feature. It supports many different file formats, including .x3v files and .x3i files which can hold many, many different instruments.
    3. Vladikomper's MegaPCM driver allows a quite a lot of DAC samples ($2F, I believe), so you can add many different drums to make your track sound more complicated in terms of percussion.
    4. VGMusic (vgmusic.com) has a myriad of midis to convert (30,702 not even counting the new submissions) so you can make plenty of SMPSs from your favourite games.
    5. Before re-converting a song, it's best to keep note of your current tempo, volume, and/or transposition values so you don't forget. Nothing's worse than when you get the values perfect before realizing you don't like the instrument used or messing up a loop point and forgetting what you had in the first place...
    6. SMPSPlay is a good tool (also created by ValleyBell) to test your SMPSs before putting them in game. It makes creating ports easier to experiment on in hex because you don't have to constantly build a ROM to test it.
    Now you know how to make a mid2smps song! Also, yay for my first tutorial! If you'd like to suggest additions or edits, please reply and I'll get the tutorial updated ASAP.

    EDIT: Added Tempo Divider, Volume, Transposition and Manual Tempo Editing segments to the tutorial.
    EDIT 2: Changed title by removing "decent" at MarkeyJester's request.
     
    Last edited: Jun 16, 2016
  2. ValleyBell

    ValleyBell Well-Known Member Member

    Joined:
    Dec 23, 2011
    Messages:
    166
    If you download the full mid2smps release package (mid2smps_030.7z), then you can find .lst in the "ListFiles" folder.

    Also, something semi-related: I made a video (43 MB MKV file) of how to set up mid2smps/the MIDI driver. (I made that a few years ago and I never got around making the planned second part - nor uploading it to YouTube.)
    It shows what effects each of the files have and explains a few things about the mappings editor.
     
  3. Ashuro

    Ashuro Anti-Cosmic Metal Of Death Member

    Joined:
    Sep 27, 2014
    Messages:
    550
    Location:
    France
    Thanks for this tutorial but i prefer Sekaiju instead of Anvil Studio.
     
  4. amphobius

    amphobius spreader of the pink text Member

    Joined:
    Feb 24, 2008
    Messages:
    970
    Location:
    United Kingdom
    I appreciate the effort you went into writing this -- this does have information that to some perhaps isn't so obvious and does detail some of what you need to do. One thing I think you've missed is covering the Ticks/Quarter and TempoDiv sections in mid2smps, since people I've personally taught initially had trouble with that.

    However, it doesn't really cover some of the finesse needed to make some of the more technical stuff possible and assumes you know how to use your MIDI editor/DAW. I've been considering writing up exactly how I'd cover a more technical conversion but it'd heavily use FL Studio and probably wouldn't be of much use to the majority of people here. If people want it, though, I'll definitely consider it.
     
  5. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    I'm not sure you can claim this as a tutorial on how to make "a decent song", if it were how to make "a song", sure, but this is rather edgy to me. I'm no musician but I do know there's more to it than that.

    ...that's not to discredit your efforts though, it's quite informative and quite a handy piece of information, and some of those tips and tricks I would agree with, such as instrument changes during the tune.

    Well done.
     
    NiphFM likes this.
  6. FохConED

    FохConED Join to Digital Resistance! Member

    Joined:
    Dec 13, 2014
    Messages:
    206
    Location:
    Konakovo
    I'm using FL Studio to edit notes, and Cakewalk Pro Audio 9 for edit Events.
     
    kenny0989 likes this.
  7. NiphFM

    NiphFM Host of the Mega Drive Music Contest Member

    Joined:
    Jun 5, 2015
    Messages:
    430
    Location:
    Music Plant Zone
    Updated the OP with updates (Jaw dropping, updates being updated with updates, ain't it?). Also added 2 more tips and tricks, just because I can.
     
  8. ValleyBell

    ValleyBell Well-Known Member Member

    Joined:
    Dec 23, 2011
    Messages:
    166
    IMO changing the channel volume by hex-editing the SMPS is a highly questionable solution, especially since mid2smps allows you to do the same in 3 different ways in the MIDIs: note velocity, "Main Volume" controller (CC #7) and "Effect 3 (Chorus)" controller (CC #93). The last one is a bit unintuitive though, as it acts as volume boost and you shouldn't use it unless you know what you're doing.

    Same for transposition - this is something every MIDI editor can do via drag and drop and menu entries.

    And something I forgot to mention earlier: Why do you need nineko's MIDI Event Editor when Anvil Studio already has an event editor? (I have nothing against nineko's editor, but you're using an additional tool for something you can already do with what you have.)


    Finally, let me recommend to have a look at Sekaiju, which is a MIDI editor that has a nice-looking Piano Roll (you can draw pitch bend/volume stuff with the mouse there, too) and an Event List with nice filters.
    And it supports RPG-Maker style looping. (It gets confused by mid2smps' Loop End markers though.)
     
    NiphFM likes this.
  9. NiphFM

    NiphFM Host of the Mega Drive Music Contest Member

    Joined:
    Jun 5, 2015
    Messages:
    430
    Location:
    Music Plant Zone
    I guess I've used Nineko's EE so much that I've become used to it. I've honestly only had tiny peeks at the event editor in Anvil Studio, as I only use the Mixer and Piano Roll editors. I have checked whether controller 111 appears and I never seem to see it in the Event tab. But, meh. Probably me being a bonehead. I also find manual volume and transposition a lot easier to apply, seeing as in the midi editor, you have to edit the midi, save the midi, convert the song again, and if you still haven't got it right, you have to do it all again (It also doesn't help that my computer is as slow as shit). I just find it easier, that's all. Also, about Sekaiju, it seems like a nice editor, but I still prefer Anvil Studio due to experience with it.
     
    nineko likes this.
  10. ValleyBell

    ValleyBell Well-Known Member Member

    Joined:
    Dec 23, 2011
    Messages:
    166
    A few small tips about mid2smps:
    • use the Tempo Calculator to preview the resulting BPM
    • Enforce a "Tempo Divider" of 1 if required. It defaults to a tempo range of <225 BPM, based on the Ticks/Quarter value.
    • modify the "Ticks per Quarter" value to adjust the BPM range
      There are a few things to keep in mind:
      - If your song has a base rhythm of 8th or 16th notes, use multiples of 4.
      - If your song uses 8th triplets use multiples of 3.
      Using odd numbers just to get the tempo 100% right is a bad idea, because it makes the song jittery. (That's similar to the "broken tempo" problem with mid->xm->smps, but in a less extreme way.)
    • "Ticks per Quarter" influences the smoothness of MIDI pitch bends. Higher value = smoother pitch bends, but bigger files
    • An alternative to MIDI pitch bends is to use SMPS modulation. (You need an event editor for that.) Those require some time to learn, but allow for 100% smooth pitch slides and nice modulation effects.
      MarkeyJester's SMPS Guide covers them in part 13 in a very nice and detailed way.
     
  11. ValleyBell

    ValleyBell Well-Known Member Member

    Joined:
    Dec 23, 2011
    Messages:
    166
    Two more, just because I've seen people doing it wrong recently:
    • Never. Ever. slide the Modulation Controller. SMPS modulation knows just 2 states - ON and OFF.
      And every modulation controller resets the modulation effect, so in the worst case you won't get any modulation at all during the time of the slide.
    • Optimize your SMPS files with SMPSOpt, because raw mid2smps output is huge and the average compression ratio is 40-60%.
      You're getting in trouble if your SMPS files are larger than 30 KB and you're using Z80-based SMPS drivers anyway.
     
  12. FateForWindows

    FateForWindows Newcomer Trialist

    Joined:
    Oct 17, 2015
    Messages:
    3
    I'm new at this and I'm wondering how I am supposed to make markers in Anvil Studio. Embarrassingly, I cannot figure it out. Please tell me where I can find the option to make one.
     
  13. jubbalub

    jubbalub Mania fanboy Member

    Joined:
    Dec 25, 2014
    Messages:
    286
    While editing your track with the piano roll, go to where you want your loop to start. Then click the Edit tab, then select "Insert Midi Event".

    upload_2016-8-7_2-28-25.png

    Check "Include all controller events", then scroll down the list until you see the event "b06f", which is recognized as a loop point. Then set the value of the event to 0.

    upload_2016-8-7_2-27-47.png

    Then go to where you want the loop to end, and insert the same event, but set the value to 1 instead of 0. Repeat this for every channel.
     

    Attached Files:

    KCEXE and NiphFM like this.
  14. Ziro_

    Ziro_ Mentally Skewed Member

    Joined:
    Aug 1, 2016
    Messages:
    59
    Location:
    What are you a cop
    Do you know where I can get this the links are down?
     
  15. Stardust Gear

    Stardust Gear A Programmer Member

    Joined:
    Apr 27, 2014
    Messages:
    134
    Use Wayback Machine to download.
    They surprisingly allowed me to download mid2smps v3.0.
     
    Ziro_ likes this.
  16. Ziro_

    Ziro_ Mentally Skewed Member

    Joined:
    Aug 1, 2016
    Messages:
    59
    Location:
    What are you a cop
    Wow Thanks man. :)
     
  17. ValleyBell

    ValleyBell Well-Known Member Member

    Joined:
    Dec 23, 2011
    Messages:
    166
    Alternatively you can just replace the vgm.mdscene.net part of the link with vgmrips.net and the link will work.
    (The redirection is broken due to a recent server move and I'm still waiting for the vgmrips server admin to fix it.)
    Anyway, I fixed the mid2smps links in the SSRG topic.
     
  18. Deactivated Account

    Deactivated Account Well-Known Member Exiled

    Joined:
    Aug 26, 2016
    Messages:
    244
    Some games they use 6 channels FM and 1 DAC, for example:
    Level 5 Theme from Earthworm Jim, Ayers Rock and if my memory does not fail Auckland from Top Gear 2, Neon City and The Neverglades from Bubble and Squeak, something interesting.
    I've seen the waves ripped from vgm files and i discovered how work the channel-6.
    Some cases the Hi-Hat FM is used in the first channel to six channel but, i've seen the DAC and the FM6 and the results are, Both channels never they put together i mean, when is edited channel 10 in the midi, closed and open Hi-Hat is together with the Kick and Snare.
     
  19. GenesisDoes

    GenesisDoes What Nintendont Member

    Joined:
    Jan 2, 2016
    Messages:
    159
    Location:
    Pittsburgh, PA
    I don't like the phrase "midi tracker" here; it's more like "MIDI editor" or "sequencer" software, since "trackers" refer to a different type of music editing software used for creating module tunes (.mod, .xm, .s3m, etc).

    I would also add under the tip/tricks sections a word about finding good MIDI files for conversion, Some MIDIs from vgmusic.com can have way too many channels with complex chords (much more than the 5FM+1DAC+3 PSG hw limits of the Genesis) and will be very hard to edit to fit within the channel limits, while other MIDI files for the same song will be simpler with less channels and easier to edit.

    Other than that, great guide!
     
    NiphFM likes this.
  20. LuigiXHero

    LuigiXHero Well-Known Member Member

    Joined:
    Mar 22, 2014
    Messages:
    280
    I use the phrase DAW personally.
     
    EMK-20218 likes this.