ref: b382473f7b6827020f5544c8dcc730be8fc83f6e
parent: f8b710769dba1e128450c3d11eb2a7a05f745877
author: dannye <33dannye@gmail.com>
date: Fri Mar 16 13:56:37 EDT 2018
Break up pitchenvelope parameters into length and pitch change
--- a/audio/sfx/arrow_tiles_1.asm
+++ b/audio/sfx/arrow_tiles_1.asm
@@ -1,6 +1,6 @@
SFX_Arrow_Tiles_1_Ch4:
duty 0
- pitchenvelope 23
+ pitchenvelope 1, 7
squarenote 15, 210, 0, 7
- pitchenvelope 8
+ pitchenvelope 0, 0
endchannel
--- a/audio/sfx/arrow_tiles_3.asm
+++ b/audio/sfx/arrow_tiles_3.asm
@@ -1,6 +1,6 @@
SFX_Arrow_Tiles_3_Ch4:
duty 0
- pitchenvelope 23
+ pitchenvelope 1, 7
squarenote 15, 210, 0, 7
- pitchenvelope 8
+ pitchenvelope 0, 0
endchannel
--- a/audio/sfx/ball_poof.asm
+++ b/audio/sfx/ball_poof.asm
@@ -1,8 +1,8 @@
SFX_Ball_Poof_Ch4:
duty 2
- pitchenvelope 22
+ pitchenvelope 1, 6
squarenote 15, 242, 0, 4
- pitchenvelope 8
+ pitchenvelope 0, 0
endchannel
--- a/audio/sfx/ball_toss.asm
+++ b/audio/sfx/ball_toss.asm
@@ -1,6 +1,6 @@
SFX_Ball_Toss_Ch4:
duty 2
- pitchenvelope 47
+ pitchenvelope 2, -7
squarenote 15, 242, 128, 7
endchannel
--- a/audio/sfx/battle_09.asm
+++ b/audio/sfx/battle_09.asm
@@ -1,6 +1,6 @@
SFX_Battle_09_Ch4:
duty 1
- pitchenvelope 151
+ pitchenvelope 9, 7
squarenote 15, 242, 0, 5
- pitchenvelope 8
+ pitchenvelope 0, 0
endchannel
--- a/audio/sfx/battle_1e.asm
+++ b/audio/sfx/battle_1e.asm
@@ -1,10 +1,10 @@
SFX_Battle_1E_Ch4:
duty 0
- pitchenvelope 58
+ pitchenvelope 3, -2
squarenote 4, 242, 0, 2
- pitchenvelope 34
+ pitchenvelope 2, 2
squarenote 8, 226, 0, 2
- pitchenvelope 8
+ pitchenvelope 0, 0
endchannel
--- a/audio/sfx/battle_24.asm
+++ b/audio/sfx/battle_24.asm
@@ -1,8 +1,8 @@
SFX_Battle_24_Ch4:
duty 1
- pitchenvelope 151
+ pitchenvelope 9, 7
squarenote 15, 242, 0, 7
- pitchenvelope 8
+ pitchenvelope 0, 0
endchannel
--- a/audio/sfx/battle_32.asm
+++ b/audio/sfx/battle_32.asm
@@ -1,8 +1,8 @@
SFX_Battle_32_Ch4:
duty 2
- pitchenvelope 175
+ pitchenvelope 10, -7
squarenote 8, 241, 0, 7
- pitchenvelope 8
+ pitchenvelope 0, 0
endchannel
--- a/audio/sfx/collision_1.asm
+++ b/audio/sfx/collision_1.asm
@@ -1,6 +1,6 @@
SFX_Collision_1_Ch4:
duty 2
- pitchenvelope 90
+ pitchenvelope 5, -2
squarenote 15, 241, 0, 3
- pitchenvelope 8
+ pitchenvelope 0, 0
endchannel
--- a/audio/sfx/collision_3.asm
+++ b/audio/sfx/collision_3.asm
@@ -1,6 +1,6 @@
SFX_Collision_3_Ch4:
duty 2
- pitchenvelope 90
+ pitchenvelope 5, -2
squarenote 15, 241, 0, 3
- pitchenvelope 8
+ pitchenvelope 0, 0
endchannel
--- a/audio/sfx/denied_1.asm
+++ b/audio/sfx/denied_1.asm
@@ -1,8 +1,8 @@
SFX_Denied_1_Ch4:
duty 3
- pitchenvelope 90
+ pitchenvelope 5, -2
squarenote 4, 240, 0, 5
- pitchenvelope 8
+ pitchenvelope 0, 0
squarenote 4, 0, 0, 0
squarenote 15, 240, 0, 5
squarenote 1, 0, 0, 0
--- a/audio/sfx/denied_3.asm
+++ b/audio/sfx/denied_3.asm
@@ -1,8 +1,8 @@
SFX_Denied_3_Ch4:
duty 3
- pitchenvelope 90
+ pitchenvelope 5, -2
squarenote 4, 240, 0, 5
- pitchenvelope 8
+ pitchenvelope 0, 0
squarenote 4, 0, 0, 0
squarenote 15, 240, 0, 5
squarenote 1, 0, 0, 0
--- a/audio/sfx/dex_page_added.asm
+++ b/audio/sfx/dex_page_added.asm
@@ -1,10 +1,10 @@
SFX_Dex_Page_Added_Ch4:
duty 2
- pitchenvelope 68
+ pitchenvelope 4, 4
squarenote 15, 240, 240, 4
- pitchenvelope 23
+ pitchenvelope 1, 7
squarenote 15, 242, 80, 6
- pitchenvelope 8
+ pitchenvelope 0, 0
endchannel
--- a/audio/sfx/faint_fall.asm
+++ b/audio/sfx/faint_fall.asm
@@ -1,6 +1,6 @@
SFX_Faint_Fall_Ch4:
duty 1
- pitchenvelope 175
+ pitchenvelope 10, -7
squarenote 15, 242, 128, 7
- pitchenvelope 8
+ pitchenvelope 0, 0
endchannel
--- a/audio/sfx/faint_thud.asm
+++ b/audio/sfx/faint_thud.asm
@@ -1,6 +1,6 @@
SFX_Faint_Thud_Ch4:
squarenote 15, 209, 0, 2
- pitchenvelope 8
+ pitchenvelope 0, 0
endchannel
--- a/audio/sfx/heal_ailment_1.asm
+++ b/audio/sfx/heal_ailment_1.asm
@@ -1,9 +1,9 @@
SFX_Heal_Ailment_1_Ch4:
duty 2
- pitchenvelope 20
+ pitchenvelope 1, 4
squarenote 4, 242, 0, 6
squarenote 4, 242, 0, 6
- pitchenvelope 23
+ pitchenvelope 1, 7
squarenote 15, 242, 0, 6
- pitchenvelope 8
+ pitchenvelope 0, 0
endchannel
--- a/audio/sfx/heal_ailment_2.asm
+++ b/audio/sfx/heal_ailment_2.asm
@@ -1,9 +1,9 @@
SFX_Heal_Ailment_2_Ch4:
duty 2
- pitchenvelope 20
+ pitchenvelope 1, 4
squarenote 4, 242, 0, 6
squarenote 4, 242, 0, 6
- pitchenvelope 23
+ pitchenvelope 1, 7
squarenote 15, 242, 0, 6
- pitchenvelope 8
+ pitchenvelope 0, 0
endchannel
--- a/audio/sfx/heal_ailment_3.asm
+++ b/audio/sfx/heal_ailment_3.asm
@@ -1,9 +1,9 @@
SFX_Heal_Ailment_3_Ch4:
duty 2
- pitchenvelope 20
+ pitchenvelope 1, 4
squarenote 4, 242, 0, 6
squarenote 4, 242, 0, 6
- pitchenvelope 23
+ pitchenvelope 1, 7
squarenote 15, 242, 0, 6
- pitchenvelope 8
+ pitchenvelope 0, 0
endchannel
--- a/audio/sfx/heal_hp_1.asm
+++ b/audio/sfx/heal_hp_1.asm
@@ -1,7 +1,7 @@
SFX_Heal_HP_1_Ch4:
duty 2
- pitchenvelope 23
+ pitchenvelope 1, 7
squarenote 15, 240, 240, 4
squarenote 15, 242, 80, 6
- pitchenvelope 8
+ pitchenvelope 0, 0
endchannel
--- a/audio/sfx/heal_hp_2.asm
+++ b/audio/sfx/heal_hp_2.asm
@@ -1,7 +1,7 @@
SFX_Heal_HP_2_Ch4:
duty 2
- pitchenvelope 23
+ pitchenvelope 1, 7
squarenote 15, 240, 240, 4
squarenote 15, 242, 80, 6
- pitchenvelope 8
+ pitchenvelope 0, 0
endchannel
--- a/audio/sfx/heal_hp_3.asm
+++ b/audio/sfx/heal_hp_3.asm
@@ -1,7 +1,7 @@
SFX_Heal_HP_3_Ch4:
duty 2
- pitchenvelope 23
+ pitchenvelope 1, 7
squarenote 15, 240, 240, 4
squarenote 15, 242, 80, 6
- pitchenvelope 8
+ pitchenvelope 0, 0
endchannel
--- a/audio/sfx/healing_machine_1.asm
+++ b/audio/sfx/healing_machine_1.asm
@@ -1,9 +1,9 @@
SFX_Healing_Machine_1_Ch4:
duty 2
- pitchenvelope 44
+ pitchenvelope 2, -4
squarenote 4, 242, 0, 5
- pitchenvelope 34
+ pitchenvelope 2, 2
squarenote 2, 241, 0, 5
- pitchenvelope 8
+ pitchenvelope 0, 0
squarenote 1, 0, 0, 0
endchannel
--- a/audio/sfx/healing_machine_3.asm
+++ b/audio/sfx/healing_machine_3.asm
@@ -1,9 +1,9 @@
SFX_Healing_Machine_3_Ch4:
duty 2
- pitchenvelope 44
+ pitchenvelope 2, -4
squarenote 4, 242, 0, 5
- pitchenvelope 34
+ pitchenvelope 2, 2
squarenote 2, 241, 0, 5
- pitchenvelope 8
+ pitchenvelope 0, 0
squarenote 1, 0, 0, 0
endchannel
--- a/audio/sfx/intro_hip.asm
+++ b/audio/sfx/intro_hip.asm
@@ -1,6 +1,6 @@
SFX_Intro_Hip_Ch4:
duty 2
- pitchenvelope 38
+ pitchenvelope 2, 6
squarenote 12, 194, 64, 7
- pitchenvelope 8
+ pitchenvelope 0, 0
endchannel
--- a/audio/sfx/intro_hop.asm
+++ b/audio/sfx/intro_hop.asm
@@ -1,6 +1,6 @@
SFX_Intro_Hop_Ch4:
duty 2
- pitchenvelope 38
+ pitchenvelope 2, 6
squarenote 12, 194, 128, 6
- pitchenvelope 8
+ pitchenvelope 0, 0
endchannel
--- a/audio/sfx/ledge_1.asm
+++ b/audio/sfx/ledge_1.asm
@@ -1,6 +1,6 @@
SFX_Ledge_1_Ch4:
duty 2
- pitchenvelope 149
+ pitchenvelope 9, 5
squarenote 15, 242, 0, 4
- pitchenvelope 8
+ pitchenvelope 0, 0
endchannel
--- a/audio/sfx/ledge_3.asm
+++ b/audio/sfx/ledge_3.asm
@@ -1,6 +1,6 @@
SFX_Ledge_3_Ch4:
duty 2
- pitchenvelope 149
+ pitchenvelope 9, 5
squarenote 15, 242, 0, 4
- pitchenvelope 8
+ pitchenvelope 0, 0
endchannel
--- a/audio/sfx/poisoned_1.asm
+++ b/audio/sfx/poisoned_1.asm
@@ -1,8 +1,8 @@
SFX_Poisoned_1_Ch4:
duty 0
- pitchenvelope 20
+ pitchenvelope 1, 4
squarenote 4, 242, 0, 6
loopchannel 4, SFX_Poisoned_1_Ch4
squarenote 15, 243, 0, 6
- pitchenvelope 8
+ pitchenvelope 0, 0
endchannel
--- a/audio/sfx/poisoned_3.asm
+++ b/audio/sfx/poisoned_3.asm
@@ -1,8 +1,8 @@
SFX_Poisoned_3_Ch4:
duty 0
- pitchenvelope 20
+ pitchenvelope 1, 4
squarenote 4, 242, 0, 6
loopchannel 4, SFX_Poisoned_3_Ch4
squarenote 15, 243, 0, 6
- pitchenvelope 8
+ pitchenvelope 0, 0
endchannel
--- a/audio/sfx/psychic_m.asm
+++ b/audio/sfx/psychic_m.asm
@@ -1,6 +1,6 @@
SFX_Psychic_M_Ch4:
duty 2
- pitchenvelope 247
+ pitchenvelope 15, 7
squarenote 8, 196, 189, 7
squarenote 8, 196, 190, 7
squarenote 8, 196, 191, 7
@@ -7,7 +7,7 @@
squarenote 8, 196, 192, 7
squarenote 15, 196, 193, 7
squarenote 15, 242, 192, 7
- pitchenvelope 8
+ pitchenvelope 0, 0
endchannel
--- a/audio/sfx/shooting_star.asm
+++ b/audio/sfx/shooting_star.asm
@@ -1,6 +1,6 @@
SFX_Shooting_Star_Ch4:
dutycycle 228
- pitchenvelope 47
+ pitchenvelope 2, -7
squarenote 4, 64, 224, 7
squarenote 4, 96, 224, 7
squarenote 4, 128, 224, 7
@@ -10,5 +10,5 @@
squarenote 8, 96, 224, 7
squarenote 8, 48, 224, 7
squarenote 15, 18, 224, 7
- pitchenvelope 8
+ pitchenvelope 0, 0
endchannel
--- a/audio/sfx/shrink_1.asm
+++ b/audio/sfx/shrink_1.asm
@@ -1,10 +1,10 @@
SFX_Shrink_1_Ch4:
duty 1
- pitchenvelope 23
+ pitchenvelope 1, 7
squarenote 15, 215, 0, 6
squarenote 15, 183, 128, 5
squarenote 15, 135, 0, 5
squarenote 15, 71, 128, 4
squarenote 15, 23, 0, 4
- pitchenvelope 8
+ pitchenvelope 0, 0
endchannel
--- a/audio/sfx/shrink_3.asm
+++ b/audio/sfx/shrink_3.asm
@@ -1,10 +1,10 @@
SFX_Shrink_3_Ch4:
duty 1
- pitchenvelope 23
+ pitchenvelope 1, 7
squarenote 15, 215, 0, 6
squarenote 15, 183, 128, 5
squarenote 15, 135, 0, 5
squarenote 15, 71, 128, 4
squarenote 15, 23, 0, 4
- pitchenvelope 8
+ pitchenvelope 0, 0
endchannel
--- a/audio/sfx/teleport_enter1_1.asm
+++ b/audio/sfx/teleport_enter1_1.asm
@@ -1,10 +1,10 @@
SFX_Teleport_Enter1_1_Ch4:
duty 1
- pitchenvelope 23
+ pitchenvelope 1, 7
squarenote 15, 215, 0, 7
squarenote 15, 183, 128, 6
squarenote 15, 135, 0, 6
squarenote 15, 71, 128, 5
squarenote 15, 23, 0, 5
- pitchenvelope 8
+ pitchenvelope 0, 0
endchannel
--- a/audio/sfx/teleport_enter1_3.asm
+++ b/audio/sfx/teleport_enter1_3.asm
@@ -1,10 +1,10 @@
SFX_Teleport_Enter1_3_Ch4:
duty 1
- pitchenvelope 23
+ pitchenvelope 1, 7
squarenote 15, 215, 0, 7
squarenote 15, 183, 128, 6
squarenote 15, 135, 0, 6
squarenote 15, 71, 128, 5
squarenote 15, 23, 0, 5
- pitchenvelope 8
+ pitchenvelope 0, 0
endchannel
--- a/audio/sfx/teleport_exit1_1.asm
+++ b/audio/sfx/teleport_exit1_1.asm
@@ -1,10 +1,10 @@
SFX_Teleport_Exit1_1_Ch4:
duty 1
- pitchenvelope 23
+ pitchenvelope 1, 7
squarenote 15, 215, 0, 5
squarenote 15, 183, 128, 5
squarenote 15, 135, 0, 6
squarenote 15, 71, 128, 6
squarenote 15, 23, 0, 7
- pitchenvelope 8
+ pitchenvelope 0, 0
endchannel
--- a/audio/sfx/teleport_exit1_3.asm
+++ b/audio/sfx/teleport_exit1_3.asm
@@ -1,10 +1,10 @@
SFX_Teleport_Exit1_3_Ch4:
duty 1
- pitchenvelope 23
+ pitchenvelope 1, 7
squarenote 15, 215, 0, 5
squarenote 15, 183, 128, 5
squarenote 15, 135, 0, 6
squarenote 15, 71, 128, 6
squarenote 15, 23, 0, 7
- pitchenvelope 8
+ pitchenvelope 0, 0
endchannel
--- a/audio/sfx/teleport_exit2_1.asm
+++ b/audio/sfx/teleport_exit2_1.asm
@@ -1,6 +1,6 @@
SFX_Teleport_Exit2_1_Ch4:
duty 1
- pitchenvelope 22
+ pitchenvelope 1, 6
squarenote 15, 210, 0, 5
- pitchenvelope 8
+ pitchenvelope 0, 0
endchannel
--- a/audio/sfx/teleport_exit2_3.asm
+++ b/audio/sfx/teleport_exit2_3.asm
@@ -1,6 +1,6 @@
SFX_Teleport_Exit2_3_Ch4:
duty 1
- pitchenvelope 22
+ pitchenvelope 1, 6
squarenote 15, 210, 0, 5
- pitchenvelope 8
+ pitchenvelope 0, 0
endchannel
--- a/audio/sfx/tink_1.asm
+++ b/audio/sfx/tink_1.asm
@@ -1,8 +1,8 @@
SFX_Tink_1_Ch4:
duty 2
- pitchenvelope 58
+ pitchenvelope 3, -2
squarenote 4, 242, 0, 2
- pitchenvelope 34
+ pitchenvelope 2, 2
squarenote 8, 226, 0, 2
- pitchenvelope 8
+ pitchenvelope 0, 0
endchannel
--- a/audio/sfx/tink_2.asm
+++ b/audio/sfx/tink_2.asm
@@ -1,8 +1,8 @@
SFX_Tink_2_Ch4:
duty 2
- pitchenvelope 58
+ pitchenvelope 3, -2
squarenote 4, 242, 0, 2
- pitchenvelope 34
+ pitchenvelope 2, 2
squarenote 8, 226, 0, 2
- pitchenvelope 8
+ pitchenvelope 0, 0
endchannel
--- a/audio/sfx/tink_3.asm
+++ b/audio/sfx/tink_3.asm
@@ -1,8 +1,8 @@
SFX_Tink_3_Ch4:
duty 2
- pitchenvelope 58
+ pitchenvelope 3, -2
squarenote 4, 242, 0, 2
- pitchenvelope 34
+ pitchenvelope 2, 2
squarenote 8, 226, 0, 2
- pitchenvelope 8
+ pitchenvelope 0, 0
endchannel
--- a/audio/sfx/trade_machine_1.asm
+++ b/audio/sfx/trade_machine_1.asm
@@ -1,7 +1,7 @@
SFX_Trade_Machine_1_Ch4:
duty 2
- pitchenvelope 21
+ pitchenvelope 1, 5
squarenote 15, 240, 240, 4
squarenote 15, 242, 80, 6
- pitchenvelope 8
+ pitchenvelope 0, 0
endchannel
--- a/audio/sfx/trade_machine_3.asm
+++ b/audio/sfx/trade_machine_3.asm
@@ -1,7 +1,7 @@
SFX_Trade_Machine_3_Ch4:
duty 2
- pitchenvelope 21
+ pitchenvelope 1, 5
squarenote 15, 240, 240, 4
squarenote 15, 242, 80, 6
- pitchenvelope 8
+ pitchenvelope 0, 0
endchannel
--- a/audio/sfx/withdraw_deposit_1.asm
+++ b/audio/sfx/withdraw_deposit_1.asm
@@ -1,12 +1,12 @@
SFX_Withdraw_Deposit_1_Ch4:
duty 1
- pitchenvelope 58
+ pitchenvelope 3, -2
squarenote 4, 242, 0, 5
- pitchenvelope 34
+ pitchenvelope 2, 2
squarenote 4, 226, 0, 5
- pitchenvelope 58
+ pitchenvelope 3, -2
squarenote 4, 242, 0, 7
- pitchenvelope 34
+ pitchenvelope 2, 2
squarenote 15, 226, 0, 7
- pitchenvelope 8
+ pitchenvelope 0, 0
endchannel
--- a/audio/sfx/withdraw_deposit_3.asm
+++ b/audio/sfx/withdraw_deposit_3.asm
@@ -1,12 +1,12 @@
SFX_Withdraw_Deposit_3_Ch4:
duty 1
- pitchenvelope 58
+ pitchenvelope 3, -2
squarenote 4, 242, 0, 5
- pitchenvelope 34
+ pitchenvelope 2, 2
squarenote 4, 226, 0, 5
- pitchenvelope 58
+ pitchenvelope 3, -2
squarenote 4, 242, 0, 7
- pitchenvelope 34
+ pitchenvelope 2, 2
squarenote 15, 226, 0, 7
- pitchenvelope 8
+ pitchenvelope 0, 0
endchannel
--- a/macros/audio_macros.asm
+++ b/macros/audio_macros.asm
@@ -30,12 +30,17 @@
ENDC
ENDM
-pitchenvelope: MACRO ; this was originally unknownsfx0x10
+;format: length [0, 7], pitch change [-7, 7]
+pitchenvelope: MACRO
db $10
- db \1
+ IF \2 > 0
+ db (\1 << 4) | \2
+ ELSE
+ db (\1 << 4) | (%1000 | (\2 * -1))
+ ENDC
ENDM
-squarenote: MACRO ; this was originally unknownsfx0x20
+squarenote: MACRO
db $20 | \1
db \2
db \3
@@ -42,7 +47,7 @@
db \4
ENDM
-noisenote: MACRO ; this was originally unknownnoise0x20
+noisenote: MACRO
db $20 | \1
db \2
db \3