Skip to content

Commit

Permalink
make rolling noise quieter
Browse files Browse the repository at this point in the history
  • Loading branch information
pinobatch committed Oct 31, 2018
1 parent cf64c16 commit af4fcc2
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
10 changes: 10 additions & 0 deletions 06-audio/audio_brainstorming.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,13 @@ be used in the same segment, as segment header codes $F0-$FF are
reserved. This is why quick parameters are assigned such that either
3 is not used or not used with a deep parameter. Pulse duty 3 is
redundant, and muted triangle needs no wave change.

Showing it off
--------------
A GIF is inadequate when asking for feedback on sound effects.
Fortunately, bgb can save audio to an uncompressed wave file
and video in whatever VFW codec is installed.

ffmpeg -i bgb-1540876262.avi -i bgb-1540876262.wav \
-s 320x288 -sws_flags neighbor -pix_fmt yuv420p \
libbet.mp4
16 changes: 8 additions & 8 deletions src/audio.z80
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ sfx_table:
dw fx_launch

fx_roll:
db ENVF_DPAR|ENVF_PITCH|1, $4A, $5E
db ENVF_DPAR|ENVF_PITCH|7, $50, $54
db ENVF_DPAR|ENVF_PITCH|1, $1A, $5E
db ENVF_DPAR|ENVF_PITCH|7, $20, $54
if TEST_PNOISE_BUG
db ENVF_PITCH|5, $4F
else
Expand All @@ -52,13 +52,13 @@ fx_roll:
db ENVF_PITCH|5, $47
db ENVF_PITCH|7, $54
db ENVF_PITCH|2, $55
db ENVF_DPAR|ENVF_PITCH|1, $52, $5E
db ENVF_DPAR|ENVF_PITCH|1, $22, $5E
db ENVF_PITCH|1, $57
db $FF
fx_rolltojump:
db ENVF_DPAR|ENVF_PITCH|1, $4A, $5E
db ENVF_DPAR|ENVF_PITCH|2, $50, $54
db ENVF_PITCH|2, $25
db ENVF_DPAR|ENVF_PITCH|1, $1A, $5E
db ENVF_PITCH|2, $54
db ENVF_DPAR|ENVF_PITCH|2, $50, $25
db $FF
fx_jump:
db ENVF_DPAR|ENVF_PITCH|$80, $59, 45
Expand All @@ -73,8 +73,8 @@ fx_jump:
fx_land:
db ENVF_DPAR|ENVF_PITCH|0, $C1, $24
db ENVF_PITCH|1, $46
db ENVF_DPAR|ENVF_PITCH|11, $67, $54
db ENVF_DPAR|ENVF_PITCH|3, $63, $5D
db ENVF_DPAR|ENVF_PITCH|11, $63, $54
db ENVF_DPAR|ENVF_PITCH|3, $25, $5D
db ENVF_PITCH|1, $56
db ENVF_PITCH|1, $57
db $FF
Expand Down
2 changes: 1 addition & 1 deletion src/global.inc
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@ FORCE_FLOOR_SIZE equ 0

; There's a bug in BGB's implementation of 127-step noise.
; GB stops a noise early under certain conditions; BGB does not.
TEST_PNOISE_BUG equ 1
TEST_PNOISE_BUG equ 0

ENDC

0 comments on commit af4fcc2

Please sign in to comment.