Banner
Views: 790,405,047
Time:
5 users online: codfish1002,  Ersanio, Infinity, Isikoro,  Tob - Guests: 24 - Bots: 132 Users: 41,260 (1,499 active)
Latest: noobmaster64
Tip: If you edit level 0, make sure you also edit level 100. Both of them are used for the bonus game.Not logged in.
SMW Octave range?
Forum Index - SMW Hacking - SMW Hacking Help - Custom Music - SMW Octave range?
Pages: « 1 »
So, I've been trying to make custom music a lot recently, but I recently ran into a road-block: I don't know the exact note limitations of Super Mario World. Like, I don't know what notes would be too high, and which would work just fine. If anyone knows, please tell me! :)

--------------------
I'm too lazy to put something here.
Range is from o0 c to o6 a+. For some vanilla instruments like @8 or @9 it may be a little lower given their tuning values, but that's the raw range of notes available, out of which you will get an error.
Originally posted by Maxodex
Range is from o0 c to o6 a+. For some vanilla instruments like @8 or @9 it may be a little lower given their tuning values, but that's the raw range of notes available, out of which you will get an error.

Ok, can you sort of translate that to how those notes would look on sheet music?

--------------------
I'm too lazy to put something here.
It would just look the way he wrote it. You've seen MML files before - you know that the bulk of the text is all the notes, where you see stuff like a16 and e8 and such all ordered together to create the song. All Max is saying is that you can't have a note higher than a+ on an o6 or a note lower than a c on an octave of c0.

Is your question really just asking about the syntax of the octave "o" command? That's pretty simple as well: Just simply type "o0", or "o1", or any number from 0-6 just before the notes you want to use that octave. If you want the octave to switch after a few notes, just simply type the o command again with the new octave number (or just use the > and < commands if it's simply going to an adjacent octave).

--------------------
Science teachers are too afraid to teach their students about the element of surprise.
Originally posted by Maxodex
Range is from o0 c to o6 a+. For some vanilla instruments like @8 or @9 it may be a little lower given their tuning values, but that's the raw range of notes available, out of which you will get an error.

Ah, so that's why I was having so much trouble! I was using instrument @9, and I was so confused as to why notes that worked with other instruments wouldn't work with that one. Thanks!

--------------------
I'm too lazy to put something here.
Isn't the range from o1 to o6, not o0?

Also with @8 and @9, if you go beyond their range, you won't get an error, the note will just not be in tune because the spc can't go high enough.

But if you're getting an error such as note was too high or too low, that has nothing to do with the instrument you're using and instead you've exceeded the octave range of smw which will remain the same no matter what instrument you use.

--------------------
Make more of less, that way you won't make less of more!
Originally posted by musicalman
Isn't the range from o1 to o6, not o0?

Yes. IIRC o0 is invalid in MML.

Also @8's highest note is o4c. After that the pitch just overflows.
Twitter
Note ranges are this by default:

@0 - o1-o5
@1 - o1-o6
@2 - o1-o4
@3 - o1-o6
@4 - o1-o6
@5 - o1-o5
@6 - o1-o6
@7 - o1-o6
@8 - o1-o3
@9 - o2-o6
@10 - o2-o5
@11 - o1-o6
@12 - o1-o5
@13 - o1-o6
@14 - o1-o5
@15 - o2-o6
@16 - o1-o6
@17 - o1-o5
@18 - o1-o6

If it's between @[email protected], you have to redefine it every time.
It's worth noting that for certain instruments only, you can "cheat" the octave range a little bit by using the $FA $02 $XX command. I'll give a bit of a simplified technical explanation in case you're curious, but feel free to skip it.

[beginning of technical explanation]
A very simplified explanation of how SMW handles notes is that each sample has a range of pitches it can play, which are then associated to the MML notes. By default, the notes will output at a pitch that makes sense in "human" terms, e.g. "c" plays what we consider a C/do note, "d" plays what we consider a D/ré note, and so on.

If you look at ADSR definitions via #instruments (don't worry if you don't know what that is yet), the last two numbers are what we call the Multiplier and Sub., also known as the tuning; these shift the range of pitches that each note call corresponds to (ex. you can call a c but it'll sound like F/fa, etc.) Each instrument has default tuning values that make the notes sound "correct" (ex. c sounds like C/do). Usually, tuning values aren't touched unless you know what you're doing. Generally, doubling the tuning values (and treating the Sub. number as a fraction of one Multiplier number) will shift the pitch range up one octave, while halving them will shift the pitch down one octave. Here's a visual example of the latter part.

If a note exceeds the maximum pitch for a sample, then it will overflow and start counting up from the lowest pitch again, usually resulting in a very low note instead. Here's a visual representation using BRRPlay.

However, this is not the case for all samples. In fact, a lot of them (such as @4, @6, and @9, going off memory), do not reach their pitch limits under their default tuning values, only being restricted by SMW's o6a note limit. Therefore, with a little trickery, you can force notes to play even higher.
[end of technical explanation]

tl;dr - Each sample has an acceptable range of pitches, which is not the same as the o6a cap SMW puts on note calls. For some samples, it's higher than o6a, while for others, it's lower. The o6a limit can be played with either through the tuning values (read the technical explanation), the $FA $02 $XX command (explained below), or a combination of both.

An easier way to play with the pitch of notes is with the semitone tune command, or $FA $02 $XX. This command tunes every note following it by a certain amount of semitones, defined by the XX, which is a number from 00 to FF (with 00-7F being positive values, and FF-80 being negative values; in other words: 01 increases everything by 1 semitone, while FF decreases everything by 1 semitone, and so on).

For example, something like this:
Code
$FA $02 $01
o4 cde

will have every note sound one semitone higher. In this case, c will sound like c+, d will sound like d+, and e will sound like e+, which is just f.

Now, if you apply this to notes that are near the o6a limit, you can get the technically "invalid" sound you desire without actually calling an invalid note. The easiest way to do this is to tune everything by 12 semitones up (equivalent to 1 octave), while using o5. The o5 will sound like o6, and the bit of o6 you can use will now sound like a theoretical o7. (Just keep in mind that the command is called in hexadecimal, so 12 would be written as 0C.)

Here's an example to make things clear. Say you need to output this in your port:
Code
@4 o6 cga>d

This will not work because you're veering into o7, which is invalid.
However, you can work around it with $FA $02 $XX instead, as such:
Code
@4 $FA $02 $0C o5 cga>d $FA $02 $00

SMW accepts this because the notes are technically in o5/early o6, even if they sound higher-pitched. The last $FA $02 $00 is to bring everything back to its default tuning. Make sure you don't forget it so you don't accidentally detune everything else.

I know this explanation was a little technical, but hopefully it can be of some use.
Haha i forgot about that. For some reason the $fa $02 trick doesn't work when transposing down, though. Everything which would end up sounding below o1 c is just silence iirc. So if you want lower, your only choice is to halve the tuning. I sometimes find myself having to do this for @0 and @13 samples for some bassy effects.
Anyway this is probably far too technical for the op lol. However porting is a technical process with quirks, so I guess this sort of stuff was going to come up eventually.

--------------------
Make more of less, that way you won't make less of more!
Hi there,

I bounce off of the discussion about tunings :
Originally posted by bebn legg
If you look at ADSR definitions via #instruments (don't worry if you don't know what that is yet), the last two numbers are what we call the Multiplier and Sub., also known as the tuning; these shift the range of pitches that each note call corresponds to (ex. you can call a c but it'll sound like F/fa, etc.) Each instrument has default tuning values that make the notes sound "correct" (ex. c sounds like C/do). Usually, tuning values aren't touched unless you know what you're doing. Generally, doubling the tuning values (and treating the Sub. number as a fraction of one Multiplier number) will shift the pitch range up one octave, while halving them will shift the pitch down one octave. Here's a visual example of the latter part.

If a note exceeds the maximum pitch for a sample, then it will overflow and start counting up from the lowest pitch again, usually resulting in a very low note instead. Here's a visual representation using BRRPlay.

However, this is not the case for all samples. In fact, a lot of them (such as @4, @6, and @9, going off memory), do not reach their pitch limits under their default tuning values, only being restricted by SMW's o6a note limit. Therefore, with a little trickery, you can force notes to play even higher.


Not related to maximum octave capacity, more about the tuning system.

I've got interested lately in xenharmonic music (or microtonal music), which includes, well different tuning systems, as for example the equal division of the octave in 17 (instead of the common 12). Just wondering if amk readme, or your experimentations maybe, feature some support for this kind of music, it would be interesting to play with tunings for new song prospects.

If you want to hear a sample of microtonal music, I highly recommend this one, enjoy :)
Originally posted by Darkslayer

I've got interested lately in xenharmonic music (or microtonal music), which includes, well different tuning systems, as for example the equal division of the octave in 17 (instead of the common 12). Just wondering if amk readme, or your experimentations maybe, feature some support for this kind of music, it would be interesting to play with tunings for new song prospects.

I know Exodust has experimented a bit with microtonal music with AMK, so you could try contacting him.
Thanks, I'll try.
That rocks.
Ahahahaha, figured I’d drop in here to mention that I hope to post a nice and big guide for AMK microtonality sometime in the hopefully-not-too-distant future. I’ve been helping Darkslayer get the hang of it already and I hope to help more people :P

Funny he posted Desert Island Rain as example song, as that’s exactly the song I wanna use for the included tutorial!
Pages: « 1 »
Forum Index - SMW Hacking - SMW Hacking Help - Custom Music - SMW Octave range?

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2019 - SMW Central
Legal Information - Privacy Policy - Link To Us


Total queries: 7

Menu

Follow Us On

  • YouTube
  • Twitch
  • Twitter

Affiliates

  • SMBX Community
  • ROMhacking.net
  • MFGG