ZX Forum #04
19 ноября 1997

world of sound Spectrum - Chapter 4.7: Handling of external signals - Reverberation.

<b>world of sound Spectrum</b> - Chapter 4.7: Handling of external signals - Reverberation.
            4.7. Reverberation


   Speaking human language, the reverb - it's an echo.

   The program, which implements this interesting
effect, is essentially a reunion of the two fragments of the 
first type from the previous chapter. That is, the program 
simultaneously play and record sound in its place a new one. 

   Here it is:
1415.
 10 DI; ban interrupt
 20 LOOP1 LD HL, 25000; HL = address of buffer
 30 LD DE, 2560; DE = delayed echo
 40 LOOP2 LD B, 8; B = bit counter
 50 LOOP3 XOR A; A = border color (0)
 1960 RRC (HL); scrolling through the data flag

                                    CY
 70 JR NC, NOOUT; if CY = 0, then go to

                                    NOOUT
 80 OR 16; setting bit D4 register A
 90 NOOUT OUT (254), A; output to port A 254
100 RES 7, (HL); reset bit D7 in the memory
110 XOR A; A = 0 (a survey of the entire keyboard)
120 IN A, (254); input values ​​of port 254
130 BIT 6, A; check bit recorder
140 JR Z, NOINP; if 0, then go to NOINP
150 SET 7, (HL); set bit D7 in the memory
160 NOINP CPL; key
170 AND 31; pressed?
180 JR NZ, EXIT; if yes, then go to EXIT
190 LD C, 2; C = delay
200 PAUSE DEC C; C = C-1
210 JR NZ, PAUSE; if C <> 0 then loop
220 DJNZ LOOP3; continue the loop

                                    Byte
230 INC HL; HL = HL +1
240 DEC DE; DE = DE-1
250 LD A, D; DE =
260 OR E; 0?
270 JR NZ, LOOP2; if not, go to

                                    LOOP2
280 JR LOOP1; go to LOOP1
290 EXIT EI; permission to interrupt
300 RET; Returns
2

   This routine will run until
as long as you do not press any key. And since it is very 
sensitive to this kind of action, cause its better with little 
utilities in BASIC: 


   10 FOR I = 1 TO 10: NEXT I

   20 RANDOMIZE USR A

where A - address sub reverb.

   If you want to, regardless of
location routines buffer was immediately behind her, then enter 
the following lines:

1415.
 20 LD HL, BUFFER
310 BUFFER NOP; there is a buffer
2

   The line 190 contains a delay value between the samples the 
signal. Changing it, You can adjust the ratio of "sound quality 
- the amount of memory." 

   By changing the value in line 30, you can change the delay 
of the echo. 

   One last thing: if you enter
sound output from any device,
echo will be heard once. If using a microphone, you can set
the number of repetitions, adjusting the volume
reproduced sound and the recording level
recorder. If at least one of these
parameters will be below the required level,
then echo sound once. The higher these
parameters, the greater the number of repetitions you
hear (their volume will be, as in life, from time to time to 
decline). However, should not get carried away. If you overdo, 
then the program samovozbuditsya and all that she will play, 
then going to sound terrible contradiction in the background 
noise. If this happens, turn off the volume or the microphone 
for a few seconds and everything will return to their seats. 






Other articles:

Help - Description of the shell of an electronic book "ZX-FORUM 4.

Secrets of Successful Design - Head for the book "Design your Programs

screen effects - Running a string of R-Type.

screen effects - clearing the screen of Zynaps.

screen effects - "minimize" the screen from Comando Tracer.

screen effects - smooth "decay" of the screen Sommando Tracer.

screen effects - changed the character set for the original stylized font from the game Rockstar.

screen effects - "running out the string" out of the game Rockstar.

screen effects - "pouring" the screen of the game Rockstar.

screen effects - a complex multi-effects from the game Bubbler.

New top 40 procedures - scrolling display, a fusion of two images, inverting screen, rotate characters, replacement of attributes, fill a closed loop, the calculation of addresses in the screen, copy of the screen, etc.

Technology sprites - Part 1: Introduction.

Technology sprites - Part 2: The hunt for sprites (search and pulling).

Technology sprites - Part 3: Format of sprites.

Technology sprites - Part 4: Format of sprites with a mask.

Technology sprites - Part 5: Structure sprite blocks (both co-exist in memory sprite and mask, what data to help us quickly find the address of the sprite in memory, and much more.)

Technology sprites - Part 6: preparation of data for publication.

Technology sprites - Part 8: Printing sprites (coordinates are given in familiarity).

Technology sprites - Part 9: Printing sprites (coordinates given in pixels).

Technology sprites - Part 10: a review of programs to work with sprites and graphics.

world of sound Spectrum - Chapter 1: The Physics of Sound.

world of sound Spectrum - Chapter 2: Operator BEEP, Creating effects on BEEPe, Making Music on BEEPe.

world of sound Spectrum - Chapter 3: How is the sound device (BEEP'ra and methods of sound production).

world of sound Spectrum - Chapter 4: Programming sound in assembler.

world of sound Spectrum - Chapter 4.1: Programming sound effects - Tone, Noise, Complexes effects.

world of sound Spectrum - Chapter 4.2: Programming Sound Effects - Volume Control.

world of sound Spectrum - chapter 4.3: Sound Effects - Management timbre.

world of sound Spectrum - Chapter 4.4: Programming sound effects - music programming.

world of sound Spectrum - Chapter 4.5: Programming sound effects - Polyphonic ringtones (polyphonic).

world of sound Spectrum - chapter 4.6: Treatment of external signals - digitization.

world of sound Spectrum - Chapter 4.7: Handling of external signals - Reverberation.

world of sound Spectrum - chapter 4.8: Synthesis of speech.

world of sound Spectrum - Chapter 4.9: audio playback interrupt.

world of sound Spectrum - Chapter 5: The operator PLAY for music coprocessor AY- 3-8910 (AY-3-8912).

world of sound Spectrum - Chapter 5.1: Creating effects operator PLAY.

world of sound Spectrum - Chapter 5.2: Making Music on PLAYe.

world of sound Spectrum - Chapter 6.1: Description of the coprocessor registers of the musical AY- 3-8910 (AY-3-8912).

world of sound Spectrum - Chapter 6.2: Programming effects and music under the musical coprocessor AY- 3-8910 (AY-3-8912).

world of sound Spectrum - Chapter 7: Software Review ZX-Spectrum to create sounds and music.

world of sound Spectrum - chapter 7.1: Editor, Sound Effects SUPER SOUND.

world of sound Spectrum - Chapter 7.2: Music Editor Wham the Music Box.

world of sound Spectrum - Annex 1, 2: Listings sound effects SUPER SOUND'a, tips assembler.


Темы: Игры, Программное обеспечение, Пресса, Аппаратное обеспечение, Сеть, Демосцена, Люди, Программирование

Similar articles:
Prohodilka - The Wizard of Oz
Tusovka - Visiting Us Laser Soft (Obolensk)
Let's laugh - The results of the competition answer the questions. Competition for the funniest anecdote, case of life. 25 jokes from the publisher.

В этот день...   28 April