ref: 44b9a240d4b2dd28737fa7aff37fb7d0582b25d6
parent: 8b0cd72a6095db7f1639dae81c3d8eefd5b814d8
author: dannye <[email protected]>
date: Sun Aug 25 05:57:50 EDT 2019
Make pitch_sweep pitch change argument consistent with the other signed magnitude arguments
--- a/audio/sfx/arrow_tiles_1.asm
+++ b/audio/sfx/arrow_tiles_1.asm
@@ -2,5 +2,5 @@
duty_cycle 0
pitch_sweep 1, 7
square_note 15, 13, 2, 1792
- pitch_sweep 0, 0
+ pitch_sweep 0, 8
sound_ret
--- a/audio/sfx/arrow_tiles_3.asm
+++ b/audio/sfx/arrow_tiles_3.asm
@@ -2,5 +2,5 @@
duty_cycle 0
pitch_sweep 1, 7
square_note 15, 13, 2, 1792
- pitch_sweep 0, 0
+ pitch_sweep 0, 8
sound_ret
--- a/audio/sfx/ball_poof.asm
+++ b/audio/sfx/ball_poof.asm
@@ -2,7 +2,7 @@
duty_cycle 2
pitch_sweep 1, 6
square_note 15, 15, 2, 1024
- pitch_sweep 0, 0
+ pitch_sweep 0, 8
sound_ret
--- a/audio/sfx/battle_09.asm
+++ b/audio/sfx/battle_09.asm
@@ -2,5 +2,5 @@
duty_cycle 1
pitch_sweep 9, 7
square_note 15, 15, 2, 1280
- pitch_sweep 0, 0
+ pitch_sweep 0, 8
sound_ret
--- a/audio/sfx/battle_1e.asm
+++ b/audio/sfx/battle_1e.asm
@@ -4,7 +4,7 @@
square_note 4, 15, 2, 512
pitch_sweep 2, 2
square_note 8, 14, 2, 512
- pitch_sweep 0, 0
+ pitch_sweep 0, 8
sound_ret
--- a/audio/sfx/battle_24.asm
+++ b/audio/sfx/battle_24.asm
@@ -2,7 +2,7 @@
duty_cycle 1
pitch_sweep 9, 7
square_note 15, 15, 2, 1792
- pitch_sweep 0, 0
+ pitch_sweep 0, 8
sound_ret
--- a/audio/sfx/battle_32.asm
+++ b/audio/sfx/battle_32.asm
@@ -2,7 +2,7 @@
duty_cycle 2
pitch_sweep 10, -7
square_note 8, 15, 1, 1792
- pitch_sweep 0, 0
+ pitch_sweep 0, 8
sound_ret
--- a/audio/sfx/collision_1.asm
+++ b/audio/sfx/collision_1.asm
@@ -2,5 +2,5 @@
duty_cycle 2
pitch_sweep 5, -2
square_note 15, 15, 1, 768
- pitch_sweep 0, 0
+ pitch_sweep 0, 8
sound_ret
--- a/audio/sfx/collision_3.asm
+++ b/audio/sfx/collision_3.asm
@@ -2,5 +2,5 @@
duty_cycle 2
pitch_sweep 5, -2
square_note 15, 15, 1, 768
- pitch_sweep 0, 0
+ pitch_sweep 0, 8
sound_ret
--- a/audio/sfx/denied_1.asm
+++ b/audio/sfx/denied_1.asm
@@ -2,7 +2,7 @@
duty_cycle 3
pitch_sweep 5, -2
square_note 4, 15, 0, 1280
- pitch_sweep 0, 0
+ pitch_sweep 0, 8
square_note 4, 0, 0, 0
square_note 15, 15, 0, 1280
square_note 1, 0, 0, 0
--- a/audio/sfx/denied_3.asm
+++ b/audio/sfx/denied_3.asm
@@ -2,7 +2,7 @@
duty_cycle 3
pitch_sweep 5, -2
square_note 4, 15, 0, 1280
- pitch_sweep 0, 0
+ pitch_sweep 0, 8
square_note 4, 0, 0, 0
square_note 15, 15, 0, 1280
square_note 1, 0, 0, 0
--- a/audio/sfx/dex_page_added.asm
+++ b/audio/sfx/dex_page_added.asm
@@ -4,7 +4,7 @@
square_note 15, 15, 0, 1264
pitch_sweep 1, 7
square_note 15, 15, 2, 1616
- pitch_sweep 0, 0
+ pitch_sweep 0, 8
sound_ret
--- a/audio/sfx/faint_fall.asm
+++ b/audio/sfx/faint_fall.asm
@@ -2,5 +2,5 @@
duty_cycle 1
pitch_sweep 10, -7
square_note 15, 15, 2, 1920
- pitch_sweep 0, 0
+ pitch_sweep 0, 8
sound_ret
--- a/audio/sfx/faint_thud.asm
+++ b/audio/sfx/faint_thud.asm
@@ -1,6 +1,6 @@
SFX_Faint_Thud_Ch5:
square_note 15, 13, 1, 512
- pitch_sweep 0, 0
+ pitch_sweep 0, 8
sound_ret
--- a/audio/sfx/heal_ailment_1.asm
+++ b/audio/sfx/heal_ailment_1.asm
@@ -5,5 +5,5 @@
square_note 4, 15, 2, 1536
pitch_sweep 1, 7
square_note 15, 15, 2, 1536
- pitch_sweep 0, 0
+ pitch_sweep 0, 8
sound_ret
--- a/audio/sfx/heal_ailment_2.asm
+++ b/audio/sfx/heal_ailment_2.asm
@@ -5,5 +5,5 @@
square_note 4, 15, 2, 1536
pitch_sweep 1, 7
square_note 15, 15, 2, 1536
- pitch_sweep 0, 0
+ pitch_sweep 0, 8
sound_ret
--- a/audio/sfx/heal_ailment_3.asm
+++ b/audio/sfx/heal_ailment_3.asm
@@ -5,5 +5,5 @@
square_note 4, 15, 2, 1536
pitch_sweep 1, 7
square_note 15, 15, 2, 1536
- pitch_sweep 0, 0
+ pitch_sweep 0, 8
sound_ret
--- a/audio/sfx/heal_hp_1.asm
+++ b/audio/sfx/heal_hp_1.asm
@@ -3,5 +3,5 @@
pitch_sweep 1, 7
square_note 15, 15, 0, 1264
square_note 15, 15, 2, 1616
- pitch_sweep 0, 0
+ pitch_sweep 0, 8
sound_ret
--- a/audio/sfx/heal_hp_2.asm
+++ b/audio/sfx/heal_hp_2.asm
@@ -3,5 +3,5 @@
pitch_sweep 1, 7
square_note 15, 15, 0, 1264
square_note 15, 15, 2, 1616
- pitch_sweep 0, 0
+ pitch_sweep 0, 8
sound_ret
--- a/audio/sfx/heal_hp_3.asm
+++ b/audio/sfx/heal_hp_3.asm
@@ -3,5 +3,5 @@
pitch_sweep 1, 7
square_note 15, 15, 0, 1264
square_note 15, 15, 2, 1616
- pitch_sweep 0, 0
+ pitch_sweep 0, 8
sound_ret
--- a/audio/sfx/healing_machine_1.asm
+++ b/audio/sfx/healing_machine_1.asm
@@ -4,6 +4,6 @@
square_note 4, 15, 2, 1280
pitch_sweep 2, 2
square_note 2, 15, 1, 1280
- pitch_sweep 0, 0
+ pitch_sweep 0, 8
square_note 1, 0, 0, 0
sound_ret
--- a/audio/sfx/healing_machine_3.asm
+++ b/audio/sfx/healing_machine_3.asm
@@ -4,6 +4,6 @@
square_note 4, 15, 2, 1280
pitch_sweep 2, 2
square_note 2, 15, 1, 1280
- pitch_sweep 0, 0
+ pitch_sweep 0, 8
square_note 1, 0, 0, 0
sound_ret
--- a/audio/sfx/intro_hip.asm
+++ b/audio/sfx/intro_hip.asm
@@ -2,5 +2,5 @@
duty_cycle 2
pitch_sweep 2, 6
square_note 12, 12, 2, 1856
- pitch_sweep 0, 0
+ pitch_sweep 0, 8
sound_ret
--- a/audio/sfx/intro_hop.asm
+++ b/audio/sfx/intro_hop.asm
@@ -2,5 +2,5 @@
duty_cycle 2
pitch_sweep 2, 6
square_note 12, 12, 2, 1664
- pitch_sweep 0, 0
+ pitch_sweep 0, 8
sound_ret
--- a/audio/sfx/ledge_1.asm
+++ b/audio/sfx/ledge_1.asm
@@ -2,5 +2,5 @@
duty_cycle 2
pitch_sweep 9, 5
square_note 15, 15, 2, 1024
- pitch_sweep 0, 0
+ pitch_sweep 0, 8
sound_ret
--- a/audio/sfx/ledge_3.asm
+++ b/audio/sfx/ledge_3.asm
@@ -2,5 +2,5 @@
duty_cycle 2
pitch_sweep 9, 5
square_note 15, 15, 2, 1024
- pitch_sweep 0, 0
+ pitch_sweep 0, 8
sound_ret
--- a/audio/sfx/poisoned_1.asm
+++ b/audio/sfx/poisoned_1.asm
@@ -4,5 +4,5 @@
square_note 4, 15, 2, 1536
sound_loop 4, SFX_Poisoned_1_Ch5
square_note 15, 15, 3, 1536
- pitch_sweep 0, 0
+ pitch_sweep 0, 8
sound_ret
--- a/audio/sfx/poisoned_3.asm
+++ b/audio/sfx/poisoned_3.asm
@@ -4,5 +4,5 @@
square_note 4, 15, 2, 1536
sound_loop 4, SFX_Poisoned_3_Ch5
square_note 15, 15, 3, 1536
- pitch_sweep 0, 0
+ pitch_sweep 0, 8
sound_ret
--- a/audio/sfx/psychic_m.asm
+++ b/audio/sfx/psychic_m.asm
@@ -7,7 +7,7 @@
square_note 8, 12, 4, 1984
square_note 15, 12, 4, 1985
square_note 15, 15, 2, 1984
- pitch_sweep 0, 0
+ pitch_sweep 0, 8
sound_ret
--- a/audio/sfx/shooting_star.asm
+++ b/audio/sfx/shooting_star.asm
@@ -10,5 +10,5 @@
square_note 8, 6, 0, 2016
square_note 8, 3, 0, 2016
square_note 15, 1, 2, 2016
- pitch_sweep 0, 0
+ pitch_sweep 0, 8
sound_ret
--- a/audio/sfx/shrink_1.asm
+++ b/audio/sfx/shrink_1.asm
@@ -6,5 +6,5 @@
square_note 15, 8, 7, 1280
square_note 15, 4, 7, 1152
square_note 15, 1, 7, 1024
- pitch_sweep 0, 0
+ pitch_sweep 0, 8
sound_ret
--- a/audio/sfx/shrink_3.asm
+++ b/audio/sfx/shrink_3.asm
@@ -6,5 +6,5 @@
square_note 15, 8, 7, 1280
square_note 15, 4, 7, 1152
square_note 15, 1, 7, 1024
- pitch_sweep 0, 0
+ pitch_sweep 0, 8
sound_ret
--- a/audio/sfx/teleport_enter1_1.asm
+++ b/audio/sfx/teleport_enter1_1.asm
@@ -6,5 +6,5 @@
square_note 15, 8, 7, 1536
square_note 15, 4, 7, 1408
square_note 15, 1, 7, 1280
- pitch_sweep 0, 0
+ pitch_sweep 0, 8
sound_ret
--- a/audio/sfx/teleport_enter1_3.asm
+++ b/audio/sfx/teleport_enter1_3.asm
@@ -6,5 +6,5 @@
square_note 15, 8, 7, 1536
square_note 15, 4, 7, 1408
square_note 15, 1, 7, 1280
- pitch_sweep 0, 0
+ pitch_sweep 0, 8
sound_ret
--- a/audio/sfx/teleport_exit1_1.asm
+++ b/audio/sfx/teleport_exit1_1.asm
@@ -6,5 +6,5 @@
square_note 15, 8, 7, 1536
square_note 15, 4, 7, 1664
square_note 15, 1, 7, 1792
- pitch_sweep 0, 0
+ pitch_sweep 0, 8
sound_ret
--- a/audio/sfx/teleport_exit1_3.asm
+++ b/audio/sfx/teleport_exit1_3.asm
@@ -6,5 +6,5 @@
square_note 15, 8, 7, 1536
square_note 15, 4, 7, 1664
square_note 15, 1, 7, 1792
- pitch_sweep 0, 0
+ pitch_sweep 0, 8
sound_ret
--- a/audio/sfx/teleport_exit2_1.asm
+++ b/audio/sfx/teleport_exit2_1.asm
@@ -2,5 +2,5 @@
duty_cycle 1
pitch_sweep 1, 6
square_note 15, 13, 2, 1280
- pitch_sweep 0, 0
+ pitch_sweep 0, 8
sound_ret
--- a/audio/sfx/teleport_exit2_3.asm
+++ b/audio/sfx/teleport_exit2_3.asm
@@ -2,5 +2,5 @@
duty_cycle 1
pitch_sweep 1, 6
square_note 15, 13, 2, 1280
- pitch_sweep 0, 0
+ pitch_sweep 0, 8
sound_ret
--- a/audio/sfx/tink_1.asm
+++ b/audio/sfx/tink_1.asm
@@ -4,5 +4,5 @@
square_note 4, 15, 2, 512
pitch_sweep 2, 2
square_note 8, 14, 2, 512
- pitch_sweep 0, 0
+ pitch_sweep 0, 8
sound_ret
--- a/audio/sfx/tink_2.asm
+++ b/audio/sfx/tink_2.asm
@@ -4,5 +4,5 @@
square_note 4, 15, 2, 512
pitch_sweep 2, 2
square_note 8, 14, 2, 512
- pitch_sweep 0, 0
+ pitch_sweep 0, 8
sound_ret
--- a/audio/sfx/tink_3.asm
+++ b/audio/sfx/tink_3.asm
@@ -4,5 +4,5 @@
square_note 4, 15, 2, 512
pitch_sweep 2, 2
square_note 8, 14, 2, 512
- pitch_sweep 0, 0
+ pitch_sweep 0, 8
sound_ret
--- a/audio/sfx/trade_machine_1.asm
+++ b/audio/sfx/trade_machine_1.asm
@@ -3,5 +3,5 @@
pitch_sweep 1, 5
square_note 15, 15, 0, 1264
square_note 15, 15, 2, 1616
- pitch_sweep 0, 0
+ pitch_sweep 0, 8
sound_ret
--- a/audio/sfx/trade_machine_3.asm
+++ b/audio/sfx/trade_machine_3.asm
@@ -3,5 +3,5 @@
pitch_sweep 1, 5
square_note 15, 15, 0, 1264
square_note 15, 15, 2, 1616
- pitch_sweep 0, 0
+ pitch_sweep 0, 8
sound_ret
--- a/audio/sfx/withdraw_deposit_1.asm
+++ b/audio/sfx/withdraw_deposit_1.asm
@@ -8,5 +8,5 @@
square_note 4, 15, 2, 1792
pitch_sweep 2, 2
square_note 15, 14, 2, 1792
- pitch_sweep 0, 0
+ pitch_sweep 0, 8
sound_ret
--- a/audio/sfx/withdraw_deposit_3.asm
+++ b/audio/sfx/withdraw_deposit_3.asm
@@ -8,5 +8,5 @@
square_note 4, 15, 2, 1792
pitch_sweep 2, 2
square_note 15, 14, 2, 1792
- pitch_sweep 0, 0
+ pitch_sweep 0, 8
sound_ret
--- a/macros/audio_macros.asm
+++ b/macros/audio_macros.asm
@@ -32,11 +32,13 @@
; arguments: length [0, 7], pitch change [-7, 7]
; length: length of time between pitch shifts
+; sometimes used with a value >7 in which case the MSB is ignored
; pitch change: positive value means increase in pitch, negative value means decrease in pitch
; small magnitude means quick change, large magnitude means slow change
+; in signed magnitude representation, so a value of 8 is the same as (negative) 0
pitch_sweep: MACRO
db $10
- IF \2 <= 0
+ IF \2 < 0
db (\1 << 4) | (%1000 | (\2 * -1))
ELSE
db (\1 << 4) | \2
@@ -46,6 +48,7 @@
; arguments: length [0, 15], volume [0, 15], fade [-7, 7], frequency
; fade: positive value means decrease in volume, negative value means increase in volume
; small magnitude means quick change, large magnitude means slow change
+; in signed magnitude representation, so a value of 8 is the same as (negative) 0
square_note: MACRO
db $20 | \1
IF \3 < 0
@@ -59,6 +62,7 @@
; arguments: length [0, 15], volume [0, 15], fade [-7, 7], frequency
; fade: positive value means decrease in volume, negative value means increase in volume
; small magnitude means quick change, large magnitude means slow change
+; in signed magnitude representation, so a value of 8 is the same as (negative) 0
noise_note: MACRO
db $20 | \1
IF \3 < 0
@@ -109,6 +113,7 @@
; arguments: speed [0, 15], volume [0, 15], fade [-7, 7]
; fade: positive value means decrease in volume, negative value means increase in volume
; small magnitude means quick change, large magnitude means slow change
+; in signed magnitude representation, so a value of 8 is the same as (negative) 0
note_type: MACRO
db $D0 | \1
IF \3 < 0