minimizing_20sound_20clicks
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
minimizing_20sound_20clicks [2018/03/31 13:19] – external edit 127.0.0.1 | minimizing_20sound_20clicks [2024/01/05 00:21] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
=====Minimizing sound clicks===== | =====Minimizing sound clicks===== | ||
- | //by Richard Russell, January 2010//\\ \\ When generating music using the [[http:// | + | //by Richard Russell, January 2010//\\ \\ When generating music using the [[http:// |
+ | |||
+ | There are four main causes of such clicks; these are listed below along with methods for minimizing the effect. | ||
+ | |||
===== Using SOUND OFF ===== | ===== Using SOUND OFF ===== | ||
- | \\ | + | |
+ | Never use SOUND OFF to terminate a playing note; this shuts down the entire BB4W sound system and is likely to result in a large output transient. To terminate a note before its duration has been completed (or when the duration has been set to ' | ||
+ | |||
+ | Instead of: | ||
+ | |||
+ | <code bb4w> | ||
SOUND OFF | SOUND OFF | ||
- | Use:\\ | + | </ |
+ | |||
+ | Use: | ||
+ | |||
+ | <code bb4w> | ||
SOUND &10, 0, 0, 0 | SOUND &10, 0, 0, 0 | ||
SOUND &11, 0, 0, 0 | SOUND &11, 0, 0, 0 | ||
SOUND &12, 0, 0, 0 | SOUND &12, 0, 0, 0 | ||
SOUND &13, 0, 0, 0 | SOUND &13, 0, 0, 0 | ||
- | \\ | + | </ |
===== Sudden amplitude changes ===== | ===== Sudden amplitude changes ===== | ||
- | \\ | + | |
+ | If you are using the ' | ||
+ | |||
+ | Instead of doing this: | ||
+ | |||
+ | <code bb4w> | ||
SOUND 1, | SOUND 1, | ||
SOUND 1, | SOUND 1, | ||
- | Do this:\\ | + | </ |
+ | |||
+ | Do this: | ||
+ | |||
+ | <code bb4w> | ||
SOUND 1, | SOUND 1, | ||
SOUND 1,-14,148,1 | SOUND 1,-14,148,1 | ||
Line 22: | Line 44: | ||
SOUND 1,-11,148,1 | SOUND 1,-11,148,1 | ||
SOUND 1, | SOUND 1, | ||
- | Or consider using envelopes to achieve a similar effect:\\ | + | </ |
+ | |||
+ | Or consider using envelopes to achieve a similar effect: | ||
+ | |||
+ | <code bb4w> | ||
ENVELOPE 1, | ENVELOPE 1, | ||
ENVELOPE 2, | ENVELOPE 2, | ||
SOUND 1,1,148,20 | SOUND 1,1,148,20 | ||
SOUND 1,2,148,20 | SOUND 1,2,148,20 | ||
- | \\ | + | </ |
===== Excessive attack or release rates ===== | ===== Excessive attack or release rates ===== | ||
- | \\ | + | |
+ | If you are using an amplitude envelope (where the second parameter of the SOUND statement is positive) don't make the attack and release rates too great. | ||
+ | |||
+ | For example, instead of using: | ||
+ | |||
+ | <code bb4w> | ||
ENVELOPE 1, | ENVELOPE 1, | ||
- | Use:\\ | + | </ |
+ | |||
+ | Use: | ||
+ | |||
+ | <code bb4w> | ||
ENVELOPE 1, | ENVELOPE 1, | ||
- | (where the attack and release rates have been reduced from 127 to 20).\\ \\ | + | </ |
+ | (where the attack and release rates have been reduced from 127 to 20). | ||
===== Rests (silent notes) ===== | ===== Rests (silent notes) ===== | ||
- | \\ | + | |
+ | If you need a period of silence on a particular channel (a **rest**) use one or other of the following techniques, depending on whether you are using a constant amplitude or an envelope: | ||
==== Constant amplitude ==== | ==== Constant amplitude ==== | ||
- | Set the //pitch// to zero, **not** the // | + | |
+ | Set the //pitch// to zero, **not** the // | ||
+ | |||
+ | <code bb4w> | ||
SOUND 1, | SOUND 1, | ||
SOUND 1,0,148,10 : REM rest | SOUND 1,0,148,10 : REM rest | ||
SOUND 1, | SOUND 1, | ||
- | Use:\\ | + | </ |
+ | |||
+ | Use: | ||
+ | |||
+ | <code bb4w> | ||
SOUND 1, | SOUND 1, | ||
SOUND 1,-15,0,10 : REM rest | SOUND 1,-15,0,10 : REM rest | ||
SOUND 1, | SOUND 1, | ||
- | \\ | + | </ |
==== Amplitude envelope ==== | ==== Amplitude envelope ==== | ||
- | Use the **hold** bit to allow the sound to decay rather than stop suddenly:\\ \\ Instead of:\\ | + | |
+ | Use the **hold** bit to allow the sound to decay rather than stop suddenly:\\ \\ Instead of: | ||
+ | |||
+ | <code bb4w> | ||
ENVELOPE 1, | ENVELOPE 1, | ||
SOUND 1,1,148,10 | SOUND 1,1,148,10 | ||
SOUND 1,1,0,10 : REM rest | SOUND 1,1,0,10 : REM rest | ||
SOUND 1,1,100,10 | SOUND 1,1,100,10 | ||
- | Use:\\ | + | </ |
+ | |||
+ | Use: | ||
+ | |||
+ | <code bb4w> | ||
ENVELOPE 1, | ENVELOPE 1, | ||
SOUND 1,1,148,10 | SOUND 1,1,148,10 | ||
SOUND & | SOUND & | ||
SOUND 1,1,100,10 | SOUND 1,1,100,10 | ||
+ | </ |
minimizing_20sound_20clicks.1522502369.txt.gz · Last modified: 2024/01/05 00:17 (external edit)