Support for MML music notation format.

Discussion in 'Other' started by Havoc1337, Dec 6, 2013.

  1. TuefelHundenIV

    TuefelHundenIV Cosmic Narwhal

    Huh. Well now we know.

    Another idea then. Perhaps we can persuade the devs to make it so it can be modded.
     
  2. Fuurin

    Fuurin Space Hobo

    Well, it might just be me (probably not), but after I played around a little with my old MMLs and converted them to (rather flawless), very simple midi files, maestro was not able to keep breaks intact, messed up the song speed and had certain problems with depicting 1/16th notes correctly..

    So, given the little experimenting I was able to do right now, .abc has a way worse .midi support than MML has - then again saying, that most people that will use the music feature usually take a midi file and bash it into a converter as hard as they need to get something that sounds similar..

    Well, like most others in this thread, I'm a hobby bard in Mabinogi as well and therefore do have my experiences with MML.
    I cannot really tell if I just was using Maestro wrongly, but I learned how to use 3ML properly within just a few minutes..

    Example:
    I used a midi file with three tracks - okay.
    I inserted it into Maestro - okay
    Sounded well, despite the fact that changing it's initial instrument seems either hard to find or not possible - still okay
    Exporting the .abc file - okay
    Inserted into Starbound and tried it out with some of my instruments - threw out the aforementioned buggy musical gibberish.

    Somebody mentioned there were issues with .abc, this /might/ be the cause, though.

    I think it can work with .abc and people would need to learn how to use it, just like they did with MML, not a big deal, if you ask me.
    However, I think the quality of Maestro (seemingly the most-used and 'best' .abc converter out there) is far behind 3ML, which is by my experience a really powerful tool to get your midis sound well in Mabinogi.


    That's the little experience I can contribute right now.

    PS: As for the MML to .abc thing, you can just export your MML as .mid files from 3ML and then insert them to Maestro, this will not be that big of a deal, either, if the .abc conversions work well with SB someday.

    Hope they get a solution on either way :)
     
  3. Savok

    Savok Contact!

    God dammit, you guys have just killed a feature for me. It was my favourite part of the game but looking into MMLs, it could be vastly better. I'm aware the current ABC implementation is bare bones but even at 100% it is as you say, not really supposed to do this. Which was always rather apparent in LOTRO come to think of it, but you just hobbled along with it because there wasn't anything better.
     
  4. ninjanomnom

    ninjanomnom Void-Bound Voyager

    This is exactly what I was saying. If starbound was entirely outside the exe that would mean that it's open source. The game engine and associated parts are all inside the exe. Sure you can mod starbound, but you can't mod it in this specific way.

    EDIT: Glitched out and didn't see some responses

    If they were to make the game engines modable then they're really starting to enter the ground of open source. I'm not sure what their stance is on that but seeing as this is a commercial game I doubt they'll just suddenly make it open source.

    I have no idea how the game engine is set up but it would probably be difficult to split the abc interpreter from the rest of the game. I could go exploring the exe later if necesary though I'm sure a dev could answer this a lot better.
     
    Last edited: Dec 14, 2013
  5. Yireon

    Yireon Master Chief

    @Havoc1337 really liked the presentation of your post!
    I prefer MML for convenience reasons :D It would really be awesome if MML worked in-game.
    Changing it from abc to MML is probably low priority but I hope this post doesn't get too buried, and that someone sees it!
     
  6. Tremendo Dude

    Tremendo Dude Pangalactic Porcupine

    Well, people have been seeing (or at least hearing about it), but so far the devs have been against it for some reason. Probably because implementing ABC in the first place was a trying process for the developers. I can certainly imagine why, with all the issues laid out in this thread about ABC.

    I would think that implementing MML would be significantly easier than implementing ABC was, though.
     
    Treadlight likes this.
  7. thatnerdykid

    thatnerdykid Void-Bound Voyager

    Mayhaps if we talk of our interest about it on one of the update posts we can at least make sure they realize a portion of the community wants this. I want more than anything to play all my songs around my campfire in the Tir square i made on my home world with my friends.

    Ps.Tarlach<3
     
  8. Tremendo Dude

    Tremendo Dude Pangalactic Porcupine

    My MML library isn't quite the largest, but it's a system I know is easy to learn and works well when applied. I think the devs are aware that there's a bit of a following for MML, and probably have already noticed the thread. At this point, the best thing I could say is to keep the thread bumped and maybe spread the word.

    Tarlach ftw btw
     
  9. Disethas

    Disethas Orbital Explorer

    It seems that .abc files deeply struggle with playing notes in certain arrangements, particularly in the context we're trying to use them for in this game. (Not to mention the interval/pitch limitations.)

    In the short time I played around with mml, I was quickly able to figure out how to write it out, and found it fairly easy to notate music. The way the different simultaneous tracks are laid out, it's probably quite possible to assign each one to different band members for the band system.
     
  10. Baromeus

    Baromeus Scruffy Nerf-Herder

    Just found this Topic and would agree with the OP - I composed a lot of Songs in Mabinogi with 3ml and are very found of the Band-Spngs i made there. On the other hand i got a hard time dealing with abc... tried to compose some songs but never got it right.
    Rly Would like to seem my 1,5k Library moving to Starbound.

    (Well its a + for the Suggestion and a bumb :) )
     
  11. Tremendo Dude

    Tremendo Dude Pangalactic Porcupine

    Sadly, it seems this thread is dying off. The future of musical notation in this game continues to worry me. I may have to go through trial and error figuring out how to work with ABC once I actually find an instrument in Starbound, judging from the difficulty everyone else seems to have had getting midi to convert to ABC.
     
  12. Enrique

    Enrique Void-Bound Voyager

    I believe that since ABC is mostly a notation language, it HAS to quantize the MIDI in order to export a score. This is what I think is causing songs to have strange rhythms. It seems like converters like Maestro will quantize AS triplets or as straight notes, but not both. If there was an abc converter that did not quantize ( is that even possible? I find the LOTR converter, before maestro does less quantizing and keeps tempo changes as well ) that could alleviate some of the issues.

    The best bet right now is to use songs that have minimal triple and duple meter changes.

    As far as note ranges, there are tuning.config files in each instrument folder of the sfx folder (assets/sfx/instruments/) that determine which 'sample' is triggered by each note.

    Anyhow, just a few things to keep the conversation going.
     
    Last edited: Dec 21, 2013
  13. Jetter

    Jetter Subatomic Cosmonaut

    Ya, it seems we do need to bring more people into the topic. I still see a lot of people struggling with ABC and Starbound's limited implementation, so I'm gonna guess it's just a lack of awareness. I'm certain we could get a large number of people pushing for this if word gets spread.
     
  14. Piano

    Piano Starship Captain

    @Havoc1337
    Is there a guide or something that I can take a look at for MML?
    When I first started trying to put songs into the game, I didn't know who to use ABC notation at all. I knew what it was, but I had never tried it out. Now, as I learned it, it came pretty quickly. Obviously, having previous experience in music and knowing where your notes are on the staff helps. Still even if I weren't a musician, I think it would have been rather simple to learn.
    Keep in mind, all I know of MML is from your post, and a little on Wiki. I can't choose one or there other because I simply don't have enough information at the moment, so I'll make my opinion after learning how to write in MML.

    From looking at your post, and looking at the developers point of view: I would say that ABC looks a lot simpler for people who AREN'T musically inclined. As such, they probably wouldn't be worried about dynamics or other musical decorations. They just want to make their melody and put it into the game. ABC feels simple enough to do that, and if that was the goal for the developers, I understand their reasoning. I would assume that the number of people with no experience in music greatly outnumbers the amount of people who do.

    MML looks like its use fits people who are already experienced in music, and would only benefit those people. Note, this is just what I see from reading your post, which is why I'm asking about a place to learn how to use it.
    I'm going to assume that you read music fairly well, so, is this language something you could type quickly while looking at a piece of sheet music next to you?

    Also, ( this is where my knowledge becomes vague) would accepting this format and the extra features it brings affect the way the game runs as all?
     
  15. Rydian

    Rydian Big Damn Hero

    Because concepts like "play two notes at the exact same time" and "the background gets quieter at this part" are completely high-level stuff, right? :p

    In both types you still need to at least know the musical scale and what sharps and flats are, then you dictate the notes and their lengths to make the music.

    Nope, MML is quite close to MIDI in the first place so it might actually be easier in a technical sense.

    http://3ml.jp/download.html
    3MLE can be downloaded here. You'll also need a copy of MSXspirit.dls and to go into the program's settings to point to it.
    (This is the instrument sample/definition file for Mabinogi, which 3MLE will use if you have it installed, if not just grab it from the 'net and point 3MLE to it.)

    You may also want to change the view to show all the tracks at once.

    [​IMG]

    The, once you find some MML online, if it's in three different tracks just copy-paste them into the section for each track.

    [​IMG]

    Or if it's in the single-block format (starts with "MML@"), just use File -> Import MML From Clipboard (like the example MMLs linked in the youtube videos).
     
  16. Piano

    Piano Starship Captain

    Haha, not high level stuff, just probably not something I'd expect people to think about.

    This program looks simple enough, I'll download it and see what I can do, following your instructions.

    By any chance would this program allow me to hook a midi cable to an electronic keyboard and create something that way?

    Thank you again for the information! I look forward to seeing it work.
     
  17. TripN

    TripN Void-Bound Voyager

    Having the addition of MML should not interfere with abc, so long as 2 things are true:
    The code for each is kept separated (as in MML code is not thrown at the abc translator and vice versa) and both languages are designed to express the same parameters to the synthesizer doing the final playback.

    That statement could be said of many musical software, syntax, or writing scheme's, especially including abc.
    I certainly can state that with the way abc is, if it was the first musical language I encountered in 2008 I wouldn't have even been posting in this forum thread because I would not have learned music at all. With as much musical knowledge as I have today even, abc is to convoluted for me to really retain the information I have tried to retain about its musical construction process..
    About all I have retained about abc is that that it requires you to define things in a header that no other musical program, language, or otherwise, that I and many users have worked with ask you to define (talking about the key a song is in, and the time signature the song is in, all applications I've used have these as optional aspects not requirements for the software to be able to understand your musical information).
    I would in no way call MML a language only for people who already have musical experience.
    I say this because before MML I did not know music. Any music. At all.
    Before MML, I only had an appreciation for listening too and enjoying music.
    I have learned Music entirely through self research, research that started when I came in contact with MML in the game Mabinogi.
    Many people have cited Mabinogi in this topic most likely because Mabinogi was their first contact with MML as well.
    In my own personal case, the only prior knowledge I had of music before mabinogi was that notes were called abcdefg, I didn't know what a sharp was, and I didn't even know the correct order of the notes (cdefgab).
    I have some minor to intermediate learning impairments (I usually learn things very slowly, example: I could not spell words very well, nor construct sentences in a decent grammatical sense until i was about 20 years old... that was 9 years ago as of today)
    I am just one case, but I hope my case at least demonstrates that learning MML is quite easy.
    I learned how to work with MML and midi in 1 day thanks to a guide by a mabinogi user (Exandriel, for the mabinogians reading and wondering who wrote the guide I started with, a guide that is no longer online as far as I know).
    I was fighting with abc for about 2 weeks when starbound came out, and I gave up because abc and starbound music just are not interesting to me after the experience with abc and instrument creation for starbound (For the record, it wasnt abc, it was instrument creation that finalized my loss of interest).
    I know you don't know me (nor should you), but it seems a couple people viewing this thread have demonstrated that I have more of a reputation in mabinogi than I thought and it is purely through music because while mabinogi is a "game" that I log into... I don't really "play" the game, I just hang out and use the game for sharing music... Thist little back story of myself I hope at least gives some confidence to you and other readers that I do have musical experience of some sort, to which I have Music Macro Language to thank as it has been my learning platform for music in general.


    I think MML is extremely simple to use for fast basic, intermediate and even more complex composing.
    Simple enough where I shall write you a simple crash course right here, at this forum:

    Part 1 - MML Basics

    Things you will need for this crash course: Just one software called 3MLeditor2, and adobe flash player I think for the second part which will take place inside your web browser.

    3MLeditor2, Build 2.0.3.783 can be found at http://www.3ml.jp/download.html

    Now, This program, 3MLeditor, Was designed specifically as an Offline-composer for mabinogi, and as a much better alternative to the web-composer that the publisher of mabinogi (nexon) was providing. I use this program when creating SiON MML as well. It works wonderfully for helping to make SiON MML's even though it lacks the great vast majority of SiON MML commands and functions that are quite average to many MML structures. It's usefulness is that it has a user friendly GUI.
    All we need the program for in this crash course is for learning the basics of MML, none of the more advanced things you can do with SiON MML, just the basics. Mabinogi pretty much only uses basic MML anyways, so this application works perfectly for getting started with MML.
    With that in mind you should excuse a few quirks about the application during this demonstration:

    1: Because the programmer who created this software is Japanese, you will have to download this program from a Japanese website (which isn't that tough) and there is a chance the program will be in Japanese when you first load it up.

    If the program is in japanese when you load it up

    [​IMG]

    2: This application uses DLS (downloadable sounds, a type of instrument pack) for its instruments, this is the same format that GeneralMidi instruments are in, however the point is that when you first open the application it is going to look for the DLS pack that mabinogi uses (MSXspirit.dls). It looks for this instrument pack in the the typical directory that mabinogi is installed so if you don't have mabinogi your going to have to use a different instrument pack (and all windows users have General Midi).

    Here is how you can set up 3MLe2 to use the Roland General Midi DLS file that comes with every install of windows since 1995!

    [​IMG]


    Moving on to the crash course of 3MLe2 (a guide in a guide, huh, fun):

    In the Image Bellow I have numbered some things, Below the Image I will explain them:

    [​IMG]

    1: Instrument Selection Drop Box (The numbers refer to the 128 Instrument Patches of a DLS pack, the name "lute" is a preset for mabinogi and this list can be tailored for any specific DLS pack but it's fairly irreverent for this guide. I just explained it so you know why your "lute" sounds like the general midi piano).

    2: From Left to right = Track Mute/Unmute, Track Solo, Mute/Unmute All (broken Chain Link button next to the right button ties these 3 buttons muting and unmuting functions to tracks by group, but we arent going to discuss track groups in this guide).

    3: Track View Highlighting (Various Options, Lets stick to global highlight for the crash course).

    4: Track Tabs (Functions like Tabs in a Browser, but for your MML code tracks).

    6: Measures (Measurement of your Notes).

    7: Event List (The more you learn, The Handier this gets).

    8: The Music Macro Language Code Field. This is where you type out your Song in MML (typically Mabinogi MML only).

    That concludes the basic crash course of 3MLe2. The functions Play, stop, pause, return to beginning etc I think are self explanatory enough with the universal images for their buttons, and the point of this was to give the user basic knowledge of using the software and I think that has been accomplished with the information given.


    Now, Lets get started with the Basic List of Music Macro Language Statements:

    [​IMG]

    In the above Image you will see the string t150v12o3l4ab>cdefgab>cn48
    How do we understand this "gibberish" ? Let's find out:

    Basic Notes = cdefgab
    cdefgab I think is self explanatory, c-b calls on the notes of their respective pitch name. Now to the not so self explanatory stuff.
    Notes can be turned Sharp with a # symbol (example c# = Csharp) or + symbol (c+ = Same as c#).
    Flat is a - symbol (example e- = Eflat, also known as a Dsharp).
    By default, All notes are 1/4th a measure long unless you either change the default note length (L statement) or give the note a direct length value (example c+1 = Csharp 1 measure long).
    Note length is also pretty straight forward at this point, you just add a number to signify what the note's length is or add no number after the note to let the note be the length defined by the default setting.
    1 = 1 measure
    2 = 1 half measure
    4 = 1 quarter measure
    8 = 1 eighth measure
    16 = 1 sixteenth measure
    32 = 1/32th of a measure (how the hell would you properly pronounce this? thirty secondith? clueless! but anyways....)
    64 = 1/64th of a measure
    What you are doing by defining notes this way is dividing the value of a measure. 1 Equals 1 measure, so as you use larger numbers you are actually making smaller notes because they are fractions of "a measure".
    Note's can also be doted with a period symbol. Yeah, that one at the end of the last sentence is the right character.
    (example c+8. = Csharp 1/8th and 1/16th long).
    A dot will always equal 1/2 the length of the last length defined. Examples to make this as clear as I can:
    c. = 1/4th+1/8th measure long.
    c8. = 1/8th+1/16th measure long.
    And this final example cannot be done in 3MLe2 because mabinogi is not designed to take advantage of the dot function in this way, however I'm including it because SiON MML and many other MML syntax's do read it this way
    c... = 1/4th+1/8th+1/16th measure
    In other words, In more powerful MML schemes you can keep dotting a note (I suspect until you reach the minimum amount that can be appended to a note's length based on what the minimum divisible number is for a measure, in the case of SiON MML if memory serves me right that would be 1/256 a measure. Hope that is clear and not confusing.
    Note lengths can be defined with uneven lengths, such as 3, 6, 7, 9, 21, 48 etc etc (doing this is really more of an advanced composing technique anyways, so I wont explain this one in detail beyond the fact that, yes, variables between the standard are possible to use and are accepted by Mabinogi, 3MLe2, and SiON. How they are Handled varies, which is why the explanation of them ends here, stick to the basic, average, lengths used in composing for now).

    R# = Rest.
    Functions exactly like Notes, Example: r8 = 1/8th measure rest, r4. = doted 1/4th measure rest etc etc..
    Just Like Notes, Rest is subject to the L statement's default length variable.
    Not quite a Silent note. Rest is a Note Off signal. The difference is that if your instrument has a slow Release value in an ADSR envelope a Rest will allow you to hear this "release" where as using a silent-note (v0c or any note) Should do a fast mute to the release. Also, If the MML your programming for has limitations such as limited voice polyphony (only capable of specific number of note-on messages at any one time) using a v0c (silent note) may count towards this limit of note-on messages, something to think about but not real important for 3MLe2, mabinogi, or SiON MML (Just thought I'd drop it in for awareness).
    This Next Bit is just for mabinogi specifically, not even for 3MLe2: If you are coding for mabinogi specifically , there is an oddity of rests to be aware of. Rests have an effect on how your ticks add up (you can see this in 3MLe2 by checking the step and gate value's, they should always be the same got notes at tempo changes otherwise your songs ticks may not add up proper on tempo changes, even when the tempo is on the correct time stamps per score scroll. Even though you can see this information in the track view, it has no effect on 3MLe2, and is only a problem for mabinogi's Ingame engine.). Simple tip, if you have a mabi score that requires a tempo change just make sure you don't have R before or after the tempo change, use silent notes instead (v0c or any note).
    Later, Maybe I can add an example of this issue for reference and demonstration of inducing the bug and resolving it otherwise some readers will probably be confused, but for now I'll leave it there in case at least one person understands it and can use it.
    A typical situation where it happens though is after the tuning of a song on party jam scores.

    L# = Default Note length tag.
    L sets default length of a note following L that does not have a direct note length defined.
    Example code: l16cde8e8fga2
    In the example code C D F and G are all 1/16th measure long because l16 was set to a value of 16, while the two Es are 1/8th (8) and the A is a half measure long (2).
    The Variables for L are just like the variables for direct note length defining (1,2,4,8,16,32,64)
    By default, if you do not use the L statement to define the default length then notes will be 1/4th a measure long (or a value of 4).
    The variable of an L statement can be doted to reduce the use of code (example l4. to use doted quarters).

    T# = Tempo Tag.
    T sets the tempo of the song. T is the statement, and # is the 3 number variable. the minimum tempo in 3MLe2 is 32 (t32) and the maximum is 255 (t255). These values are based on Mabinogi's limitations.
    I don't recall what SiON MML's tempo limits are, but I think its probably 1-511 (512 because 0 counts as a number, but because 0 would cause your song to not play the choice is between 1-511..).
    By default, if you do not define a tempo with the T statement then the songs tempo will be 120 (t120).
    For Mabinogi Specifically: It's important to only keep your tempo tag's on the Melody track of a song score because a bug in how tempo is read from other tracks sometimes can cause a song to end prematurely (before it is supposed too end). No, It has nothing to do with a compose rank issue of code, it is just another little bug I have helped a few other composers with so I'm leaving a general awareness of how to avoid it (keep tempo info on the largest track of a score scroll).

    V# = Volume Tag.
    V sets volume of all notes following after it.
    There are 16 volume settings, 1 is the lowest, 15 is the highest, and 0 is silent (while there are situations where 0 is very helpful, I will not be discussing those here).
    an example is v15cccc, 4 quarter notes (1 measure) at a velocity (volume) of 15 (the maximum).
    Mabinogi and 3MLe2 do not use values higher than 15. In SiON MML values higher than 15 are used for distorting the sound of the notes. In SiON MML there is a function to increase or decrease volume by increments of 1, but not for mabinogi MML (which means not in 3MLe2 either unfortunately).

    O# = Octave Tag.
    Sets the Octave you are working on. Oddly, I could actually explain a Lot about this tag and how it functions, But most of what I would have to say applies pretty specifically to Mabinogi and it's use of DLS for constructing instruments, and since this guide is supposed to be basic I will refrain from this information as best I can but some is unavoidable IMO.
    The octave statement should be fairly self explanatory if you've been noticing how most of these statement commands work.
    In 3MLe2 and mabinogi, O1 corresponds to the lowest octave you can "see" in 3MLe2.
    By Default you are working on Octave 4 (o4). values are 1-8.
    However, in 3MLe2 you can use "octave 0" by two methods, actually typing o0 or by using N.
    Mabinogi can only use N for octave0 and this is part of a design flaw with how mabinogi communicates the N command and accesses the 128 notes supported in midi, and because of this flaw 3MLe2 reflects aspects of this in its own design because in the end 3MLe2 was designed for creating mabinogi MML's, not more advanced ones like SiON MML or FIMML even though it is still an excellent application for starting with these other MML's.

    N = Direct Note Call.
    This value is supposed to call on notes by their specific number in the scale.
    This character has varied scaling between Mabinogi/3MLe2 MML and SiON MML.
    In Mabinogi and 3MLe2, N reprisents midi note numbers (0-127 = 128 notes).
    In SiON... weeeell I dont see much of a use for N in SiON, usually I refrain from its use in SiON.
    In Mabinogi/3MLe2 N can save code characters when you are using sharps in specific instances. Typically this instance creates the syntax that goes t150l8v12g+>c+<g+ and N would be used to save code by going like this t150l8v12g+n60g+
    N saved 1 character of code in the example by removing the need to go up one octave with > to get to Csharp on octave 5 then using < to return to octave 4 for the Gsharp following it.
    The N character will ignore the O statements, as well as > and <.
    The N character cannot define note length, instead it is at the mercy of the default note length defined by L
    So in other words, N is used in specific situations to save code (like the example provided).
    This is all that needs to be said about N for this basic tutorial.

    Additionally, there is support in Mabinogi and 3MLe2 for incremental octave rising and dropping.
    In 3MLe2 and Mabinogi, > is up one octave and < is down one octave.
    In SiON MML however these symbols have the reverse effect, But this is ok. in SiON MML you can reverse them so they are the same as Mabinogi-MML by adding the statement #REV; at the start of your MML.
    The statement #REV; has the additional effect of reversing the function of the incremental volume up or down symbols which are the parentheses signs ( for up one and ) for down one, but after reversal ) because volume up one and ( becomes volume down one. > ) and < (... Makes sense to me, hopefully it's making sense to you (the reader).

    A trick for avoiding certain octave changes is to use + and -
    This works when your sequence of notes is something like this: b>dg>c<f
    Another way you could code the same string is to go: c-dgb+f
    I Saved 1 character of code by using Bsharp and not needing to do octave up 1 (>) C then octave down 1 (<) before F.
    The first note in the second example, Cflat, Wasn't really necessary, but the point was to demonstrate that it works in both directions. There are situations where Cflat can also be handy.


    So, with all that information given, we should now be able to understand that the MML code at the beginning part of this t150v12o3l4ab>cdefgab>cn48 = tempo150 volume12 octave3 Length-Default-Of-Notes-Is-1/4thMeasure A B Octave-Up1 C D E F G A B Octave-Up1 C Note#48 (#48 is C on octave 4).




    Part 2 - Putting the Macro into MusicMacroLanguage.
    This Next section is a bit brief and showcases a bit more of a higher level of MML than the basic mabi-MML stuff.
    In the above mini guide I explained the basics of using 3MLe2 and doing some very basic Music Macro Language... Or did I?
    Actually, In all that was discussed in the first part of this guide I never actually covered what a "macro" is.

    A macro is basically a shortcut.

    Mabinogi-MML is designed in a way where you could say that its MML code system is a series of midi macro's. By that, I mean that all the commands you type out in Mabi-MML are actually making calls to a midi-driven-synthesizer, so instead of knowing midi packet code values to send music messages you use something that translates your MML into midi messages. But this is not what we mean by "macro" when we say "Music Macro Language".

    When we say "Music Macro Language" we mean language for music that utilizes shortcuts for code optimization, shortcut functions to simplify song construction.

    SiON MML is my choice for this demonstration.
    (SiON or SiOPM, both valid refering to the same MML... I suppose I've interchanged them a bit in my posts on this forum, but I guess I usually say SiON because that was the first term for this MML that I saw, both terms have been used by the programmer of it so whatever floats your boat).

    An example of some MML I made for SiON goes like this
    Code:
    //Bassline1
    #REV;
    #EFFECT1{chorus};
    #A=[a8>aa|<]2[f8>ff|<]2[g8>gg|<]2[a8>aa|<]2;
    #B=[a8>aa|<]4;
    #C=(a8>aa(<a8>aa(<f8>ff(<f8>ff(<g8>gg(<g8>gg(<a8>aa(<a8>aa<(a8>aa(<a8>aa(<f8>ff(<f8>(ff;
    
    t140
    o2l16
    %1@4
    q2
    @v50,40,0,0
    AAAAAAAAAA
    AAAAAAAAAA
    BBBBBBBB
    AAAAAAAA
    C
    ;
    I don't want to explain everything going on there (because there are command statements not used in the part 1 guide, commands that are not in the Mabi-MML/3MLe2 list of usable characters), but this is the simplification:

    That code expresses the bass line for a cover song I first made in 3MLe2, then imported into SiON and optimized with macro's to shrink the code usage down.
    It is 66 measures long, but the code makes it look more simple compared to mabi-MML.

    In that code example, the macro's are defined at the top as #A=, #B= etc etc. and called on by A or B in the code. This is why you must use lower case characters for your notes cdefgab in SiON, because A-Z are macro calls.

    Every time you see the symbol "A" it is calling on the code string [a8>aa|<]2[f8>ff|<]2[g8>gg|<]2[a8>aa|<]2
    the brackets [ ] and | character are all apart of loop command statements, something that mabinogi-MML does not use, and they function nothing like abc's usage of brackets so don't get confused by thinking its anything similar to abc.
    Actually, there are few statements used in that code that mabinogi completely lacks.

    In Mabi-MML : a8>aa<a8>aa<f8>ff<f8>ff<g8>gg<g8>gg<a8>aa<a8>aa<
    Is the same as
    In SiON-MML: [a8>aa|<]2[f8>ff|<]2[g8>gg|<]2[a8>aa|<]2

    However, in Mabi-MML if i want that same string of notation to appear twice I have to do it like this
    a8>aa<a8>aa<f8>ff<f8>ff<g8>gg<g8>gg<a8>aa<a8>aa<
    a8>aa<a8>aa<f8>ff<f8>ff<g8>gg<g8>gg<a8>aa<a8>aa<

    In SiON I macro'd it to A, that is the meaning of the statement #A=[a8>aa|<]2[f8>ff|<]2[g8>gg|<]2[a8>aa|<]2;
    So in SiON to get the same string I would type this
    AA

    Yup, macro's are pretty powerful, and very simple to make. They are envelopes that expand when their assigned macro is called, in the example case I assigned A to that string that repeats as the bassline for the example song.

    The SiON editor is at http://mmltalks.appspot.com/editor
    The SiON reference is at http://mmltalks.appspot.com/document/siopm_mml_ref_05_e.html

    and the song that uses my example bassline can be found here http://mmltalks.appspot.com/m/ISdaX.

    Edit:
    You have no idea how much I wish it did. But it doesn't really need too, 3MLe2 has options for importing midi's, you just want to make sure none of the tracks you import have notes occupying the same step (basically, no two notes occupying the same space of time, monophonic tracks, move your chords to separate tracks etc etc.)

    @Rydian
    I was just starting to error check my post and then I got a notice of your post.. Hope our guides demonstrate enough MML and 3MLe2 usage to show how simple MML is to learn =D
     
    Last edited: Dec 25, 2013
    Tremendo Dude and Rydian like this.
  18. Piano

    Piano Starship Captain

    @TripN
    Wow, thank you. This is freaking awesome. Really.
    Okay, I'll start with a few questions I have conjured after reading your guide.

    1. Example code: l16cde8e8fga2
    Just to make sure this us correct. The default length is a sixteenth note. In the guide you stated that both E's were eighth notes, and the A was a half note. So my question, more of a confirmation, is in order to define a not length to be different from the default, the numbers always goes after the note it applies to?

    2. You stated that using these symbols "> <" you can go up or down an octave. If I want to go up more than one octave, would the symbol be added twice? So let's say O4L4ABC>>ABC
    Would that put the second set of notes in octave six?

    3. Along with that, is there a command like the N symbol that will allow me to define the note directly by it's octave as opposed the the note number?

    4. Being a pianist, my staves have a left hand and a right hand. How do I define which is which in the code? Do the separate hands need to be two different tracks when importing a midi file?

    5. Is there a command to add rests within a measure?

    6. What in the code tells me that I'm moving on to the next measure?

    I may think of more questions later as I try this out, but that's all for now. Thank you so much for this extremely detailed guide.

    Also, I want to say that I admire your will to push and learn even if it's troubling at times for you. I'm glad that you found something to help introduce you into the world of music, and I hope you continue to expand your musical knowledge. Whether it's coding notations, or reading music on a page, there are times where it can be really stressful, so I encourage you to stick with it, and grow as much as you can. You're right, I don't know you, but I can certainly give you my respect for something like that.

    Once again, thank you so much for the content. Between you and Rydian, this should do wonders to help me out in learning this.
    I do hope the developers follow your wishes to put this into the game.
     
  19. Mercury Gilado

    Mercury Gilado Existential Complex

    If MIDI is easily converted to MML, then I am all for this. I find using a notation editor more my speed, so that's all care about as far as MML files go.
     
  20. TripN

    TripN Void-Bound Voyager

    I am short on time, my answers will be brief for now.

    1: Correct.

    2: Correct, you may place several > or < symbols, but for code efficiency using O1-8 would save code if jumping more than 2 octaves at a time (in either direction).

    3: N does what you are asking. out of 128 notes, each note has its own unique number. Simply play with N to get a better idea if your still unsure.

    4:Left hand and Right hand are parts of information that are only relevant for playing, not for sequencing. What I'm saying is that this isn't something that needs to be defined in the convention your thinking of.
    Take for example your left hand, if you hold it across an octave and hit C E and G all at once you have created a simple chord in C major.
    Grand. That works for midi, but if your importing to MML or coding from scratch, all you need to do is place the different notes on their own track. Basically, 1 note per track in a space of time. If my explanation is confusing just do this, play something simple, but use chords, save it as a midi file and I will try to remember to check back here and if I see that you've uploaded a midi for me I will convert it to MML for you (an MML for 3MLe2 and SiON MML).

    5: Great question, particularly because in asking it you have brought to my attention that I forgot to add this! Yes, a rest is R, and it functions just like notes where you define its length just like a note or it will use the default length defined by L.
    I will edit my post later to add Rest info.

    6: There is no part of the code that "tells" you or the synthesizer that you have moved on to the next measure, this is something that abc does as far as I know and it is also a useless thing to require a musician to code.
    You want to know that you've moved to another measure? Use line breaks between measures so that each one of your measures is contained on a line separate from the other measures.
    This is typically what I do to track measures, or at least chunks of measures.
    Notice there is a number for every line in the code pan on the far left side and each time you hit return to go to a new line it will add a number. I believe this behavior had measure counting in mind when Aloe made 3MLe2.
    Point is, the MML doesn't need to know where measures are like abc does because measures don't need to be defined the way that abc tries too.
    In the image where I placed numbers all over the 3MLe2 GUI, measures are counted across the field where number 6 is.
    I don't have anymore time tonight, but tomorrow when I check back I'll show you how to change the time signature of how measures are displayed across the measure bar (number 6 in the guide image in my post).

    Glad you've found the guide useful though =)

    Edit: For Question Number 6 try this

    [​IMG]

    Then

    [​IMG]

    It has no effect on code, Just on what you see on the background, which can be helpful when coding songs that use 3/4, 5/8 or any other choice you choose.
    Don't Fiddle with the TPQN setting (Ticks Per Quarter Note).
     
    Last edited: Dec 25, 2013
    Tremendo Dude and Rydian like this.

Share This Page