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]
- 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:
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:
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:
@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.