? MML Bugs (Page 1) ● SmileBASIC Source Forums

Sign In

Register
*Usernames are case-sensitive
Forgot my password
Creep into the Halloween / Horror Programming Contest (Deadline Extended)

MML Bugs

  • #1 ✎ 792 snail_ Helper Received for being very helpful around SmileBASIC Source Achievements Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength OSP Contest 1 Contest Participant I participated in the first SmileBASIC Source OSP Contest! Here's a thread where we can discuss bugs and intricacies of MML. The practice of each bug having it's own thread is rather messy IMHO, because most bugs are so small they don't warrant a discussion at all. I'll start it off. In the MML specification, macro names are said to be up to 8 alphanumeric characters long. In practice, this is not the case. Here is example output from DIRECT mode. BGMPLAY "{ABCDEFGH=}" Illegal MML(BGMPLAY:1) {ABCDEFGH=} ^ Too long macro name (in Track 0) OK The MML parser encounters the error when it reaches the 8th character of the macro name, limiting you to 7 characters. I don't believe this to be a case of the manual being incorrect, I believe this is a bug. 8 is a very round, normal number to programmers (it being a power of 2), and 7 is the exact opposite (being a prime). It's also a very easy bug to make, so it wouldn't surprise me. Posted
  • #2 ✎ 1260 12Me21 Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS When using a macro, it actually allows 8 characters: BGMPLAY "{ABCDEFGH}" '(8) Not defined macro BGMPLAY "{ABCDEFGHI}" '(9) Too long macro name But of course, you'll always get a "not defined macro" error. Also, macro names allow _ as well as alphanumerics, and don't allow numbers as the first character (while the manual just says the name can contain alphanumeric characters). Posted Edited by 12Me21
  • #3 ✎ 1260 12Me21 Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS I noticed someone using the command @V in some MML, which isn't listed in the help menu. I think I figured out what it does. @V volume - sets the first volume multiplier (default=127) V volume - sets the second volume multiplier (default=127) The current volume is calculated as @V/127 * V/127 (ranges from 0 to 1) I believe @V is meant to be used to set the volume of entire track, while V is used to make small changes within a track. (Though technically you could do it the other way around) Posted
  • #4 ✎ 1260 12Me21 Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS When using _ like this: A_B, if the length of B isn't set, it plays a note with the length of A that slides in pitch from A to B. If the length of B is set (ex: A_B2), it will play B for that length at the end of the sliding note. This has the weird property that A_B plays for half the time of AB or A&B. I think this is the best way they could have handled this, but it's not really mentioned in the manual. (perhaps it's just standard in music though) Posted Edited by 12Me21
  • #5 ✎ 792 snail_ Helper Received for being very helpful around SmileBASIC Source Achievements Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength OSP Contest 1 Contest Participant I participated in the first SmileBASIC Source OSP Contest!
    When using _ like this: A_B, if the length of B isn't set, it plays a note with the length of A that slides in pitch from A to B. If the length of B is set (ex: A_B2), it will play B for that length at the end of the sliding note. This has the weird property that A_B plays for half the time of AB or A&B. I think this is the best way they could have handled this, but it's not really mentioned in the manual. (perhaps it's just standard in music though)
    Not an expert on music, but I think a slide is played for the duration of both notes, not just one. That's a bit weird.
    Posted
  • #6 ✎ 1260 12Me21 Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS Ok, here's a really horrible bug. "A2_C&C2" == "A2_C4&C2" "A2_C& C2" == "A2_C C2" basically, don't do this: A_B&C where B has no length set so either do A_C& C (slide from A to C and play C) or A_Clength&C (slide from A to C and play C&C) Posted
  • #7 ✎ 55 brilliance360 First Week Joined in the very first week of SmileBASIC Source Website Spring 2017 Contest Participant I participated in the SmileBASIC Source Spring 2017 Contest! Programming Contest Deep Sleep Hidden Website
    Ok, here's a really horrible bug. "A2_C&C2" == "A2_C4&C2" "A2_C& C2" == "A2_C C2" basically, don't do this: A_B&C where B has no length set so either do A_C& C (slide from A to C and play C) or A_Clength&C (slide from A to C and play C&C)
    I messed around with this, but I don't understand what the bug is, specifically where you think "A_B&C" behaves unexpectedly.
    Posted
  • #8 ✎ 1260 12Me21 Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS A_C&C behaves differently than A_C& C, which makes it impossible to put anything between the Cs without changing the timing of the song and ruining it. Posted