From d2725c31040af3d54ea9b0f28f8fe89d6454e75b Mon Sep 17 00:00:00 2001 From: Remy Oukaour Date: Wed, 17 Jan 2018 13:58:50 -0500 Subject: Allow italics/bold within inline code --- docs/music_commands.md | 110 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 76 insertions(+), 34 deletions(-) (limited to 'docs/music_commands.md') diff --git a/docs/music_commands.md b/docs/music_commands.md index 7f7bd8b32..3329f8df1 100644 --- a/docs/music_commands.md +++ b/docs/music_commands.md @@ -5,27 +5,32 @@ Defined in [macros/scripts/audio.asm](/macros/scripts/audio.asm) and [audio/engi *See also: [Sound Engine Commands](https://github.com/pret/pokecrystal/wiki/Sound-Engine-Commands)* -## `musicheader` *n*, *index*, *address* +## musicheader n, index, address -## `note` *pitch*, *length* + +## note pitch, length (Used on all channels) The high nibble is the note to play. 0 is rest, 1 is `C_`, 2 is `C#`, etc; `$C` is `B_`. The low nibble is the length of the note. 1 gets added to this, so 0 still has a length. -## `sound` *pitch*, *octave*, *intensity*, *frequency* -## `noise` *pitch*, *duration*, *intensity*, *frequency* +## sound pitch, octave, intensity, frequency + + +## noise pitch, duration, intensity, frequency -## `$D0`−`$D7`: `octave` *n* + +## `$D0`−`$D7`: octave n (Used in channels 1-3) Sets the octave for the notes played on the channel. `$D7` is the lowest octave, whereas `$D0` is the highest. -## `$D8`: `notetype` *length*[, *intensity*] + +## `$D8`: notetype length[, intensity] (Used in channels 1-4) (When using in channel 4, the *intensity* byte is not needed) @@ -34,7 +39,8 @@ The first byte only reads the lower 4 bits, and multiplies it by the note length The second byte is identical to the first byte in the `intensity` command. -## `$D9`: `pitchoffset` *octave*, *key* + +## `$D9`: pitchoffset octave, key (Used in channels 1-3) @@ -42,7 +48,8 @@ Transposes all notes played on the channel by a value. The high nibble determins how many octaves to subtract, while the low nibble is how many note values to add. Ex: Setting a value of `$13` would make a `C_`4 play as a `D#`3. -## `$DA`: `tempo` *tempo* + +## `$DA`: tempo tempo (Used in channel 1) @@ -53,7 +60,8 @@ This formula also works backwards to convert BPM to tempo: Tempo = 19200 / BPM Only set or change this value when all playing channels are triggering a note or rest at the same time, otherwise desyncs may happen. -## `$DB`: `dutycycle` *duty_cycle* + +## `$DB`: dutycycle duty_cycle (Used on channels 1&2) @@ -64,7 +72,8 @@ Sets the square duty (sound) for the current channel. To change the sound for ch - 2 = 50% waveform: `____¯¯¯¯` - 3 = 75% waveform: `__¯¯¯¯¯¯` (sounds the same as 25%) -## `$DC`: `intensity` *intensity* + +## `$DC`: intensity intensity (Used on channels 1-3) (Used to set instrument on channel 3) @@ -74,9 +83,11 @@ This sets the volume and fade of the notes. The high nibble is the starting volu For channel 3: The high nibble sets the volume of channel 3. Only 4 values are accepted (0=Mute, 1=100% volume, 2=50% volume, 3=25% volume). The low nibble sets the instrument/waveform for channel 3 to play. Crystal natively has 10 instruments, values 0-9. -## `$DD`: `soundinput` *input* -## `$DE`: `sound_duty` *a*, *b*, *c*, *d* +## `$DD`: soundinput input + + +## `$DE`: sound_duty a, b, c, d (Used on channels 1&2) @@ -84,9 +95,11 @@ This cycles the channel through 4 duty definitions, one per frame. Each pair of bits defines a duty, same as the `dutycycle` command. This is mostly only used in cries, SFX, and Jigglypuff's song in RBY. + ## `$DF`: `togglesfx` -## `$E0`: `slidepitchto` *duration*, *octave*, *pitch* + +## `$E0`: slidepitchto duration, octave, pitch (Used on channel 1) @@ -95,7 +108,8 @@ The first byte tells how many frames to play the destination note for, before th The high nibble of the second byte is the octave of the destination note. The low nibble of the second byte is the destination note. If rest is used as the destination note, then the whole destination pitch becomes `$0000` (the lowest pitch). -## `$E1`: `vibrato` *delay*, *extent* + +## `$E1`: vibrato delay, extent (Used on channels 1-3) @@ -105,20 +119,23 @@ Second byte, high nibble is the speed timer. It will decrement by one each frame Second byte, low nibble is the pitch depth. Half of this value will alternate between adding to the pitch, and subtracting from the pitch each time speed timer resets. When this is an odd number, the value added to the pitch will be greater than the value subtracted from the pitch. Ex: normal pitch of 405, if pitch depth = 3, it will alternate between 407 and 404. Speed timer does NOT reset when a new note is played. only when the song stops or changes. (Also, because a timer counts 0, a timer of 5 will take 6 frames to change.) -## `$E2`: `unknownmusic0xe2` *unknown* -## `$E3`: `togglenoise` *id* +## `$E2`: unknownmusic0xe2 unknown + + +## `$E3`: togglenoise id (Used on channel 4) Sets the "drum kit" to be used. This needs to be called before channel 4 can make any noise. Calling it more than once in a song will mute the channel. (Keep it out of loops!) -## `$E4`: `panning` *tracks* -## `$E5`: `volume` *volume* +## `$E4`: panning tracks -## `$E6`: `tone` *tone* +## `$E5`: volume volume + +## `$E6`: tone tone (Used on channel 1-3) @@ -126,52 +143,77 @@ This modifies the pitch of the notes (fine tuning). It makes notes sound better if multiple channels play the same note simultaneously. A lot of GSC songs set the main melody channel with a value of 1, and the secondary channel (not bass) as 2. -## `$E7`: `unknownmusic0xe7` *unknown* -## `$E8`: `unknownmusic0xe8` *unknown* +## `$E7`: unknownmusic0xe7 unknown + + +## `$E8`: unknownmusic0xe8 unknown + + +## `$E9`: tempo_relative value -## `$E9`: `tempo_relative` *value* -## `$EA`: `restartchannel` *address* +## `$EA`: restartchannel address -## `$EB`: `newsong` *id* -## `$EC`: `sfxpriorityon` +## `$EB`: newsong id -## `$ED`: `sfxpriorityoff` -## `$EE`: `unknownmusic0xee` *address* +## `$EC`: sfxpriorityon -## `$EF`: `stereopanning` *tracks* -## `$F0`: `sfxtogglenoise` *id* +## `$ED`: sfxpriorityoff + + +## `$EE`: unknownmusic0xee address + + +## `$EF`: stereopanning tracks + + +## `$F0`: sfxtogglenoise id + ## `$F1`: `music0xf1` + ## `$F2`: `music0xf2` + ## `$F3`: `music0xf3` + ## `$F4`: `music0xf4` + ## `$F5`: `music0xf5` + ## `$F6`: `music0xf6` + ## `$F7`: `music0xf7` + ## `$F8`: `music0xf8` + ## `$F9`: `unknownmusic0xf9` -## `$FA`: `setcondition` *condition* -## `$FB`: `jumpif` *condition*, *address* +## `$FA`: setcondition condition + + +## `$FB`: jumpif condition, address + + +## `$FC`: jumpchannel address + + +## `$FD`: loopchannel count, address -## `$FC`: `jumpchannel` *address* -## `$FD`: `loopchannel` *count*, *address* +## `$FE`: callchannel address -## `$FE`: `callchannel` *address* ## `$FF`: `endchannel` -- cgit v1.2.3