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

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

<b>world of sound Spectrum</b> - Chapter 5.1: Creating effects operator PLAY.
     5.1. Creating effects on PLAYe


   Using the operator PLAY you can create a very interesting 
sound effects. This is something that is much simpler than

in the case of BEERom. The number of possible
effect is limited only by the imagination of the programmer. 
Most often they are used gromkostnye effects, polyphony and a 
noise generator. 

   Since the number of effects in this
If extremely high, I will not describe each of them (the 
principles are the same as that Chapter 2.1), and give a few 
examples with necessary comments. 

   First example:


   10 PLAY "X16384W0O6U9B"

reproduces slowly decaying note.

   Example Two:


   10 PLAY "O6X1000W3U1BX16384W0 9B"

modification of the previous effect. Volume
notes initially increases from the minimum to
maximum (soft) attack, and then gradually fades.

   Example Three:


   10 PLAY "T240W0X3000UO8 (B & c &)"

This effect is almost completely analogous to the previous one, 
but it sounds quite different. 

   Example Four:


   10 PLAY "O4X16384W3U9B"

it uses the effect that the music is called the soft attack of 
sound. 

   In these four effects applied
pure tone, but you can use
noise by inserting a command M8, or a mixture of tones with
noise (the team M9).

   The following example is:


   10 LET A $ = "T240"

   20 FOR A = 1 TO 8

   30 LET A $ = A $ + "O" + STR $ A + "1CDEFGAB"

   40 NEXT A: PLAY A $


   This effect, first prepared by a musical program, and then 
played. It could be set directly in operator PLAY, but then it 
would seem bad (a few lines of the consistency of the text!) If 
you play it simultaneously with the creation (in a loop), then 
there will be unwanted pause.


   Before giving the basic data in the variable A $ is stored 
command T240, thereby accelerating effect. Try except T240 add 
M8 or M9. 

   The following example:


   10 LET A $ = "T240": LET B $ = ""

   20 FOR A = 1 TO 8

   30 LET A $ = A $ + "O" + STR $ A + "1CDEFGAB"

   40 LET B $ = B $ + "O" + STR $ (9-A) + "1BAGFEDC"

   50 NEXT A: PLAY A $, B $


   This effect is very similar to the previous one.
But in this case, two voices, whose frequencies are shifted in 
opposite directions. 

   Another example:


   10 PLAY "O3 1cdefgabC", "O5 1cdefgabC",

      "O6 1cdefgabC"


   Here we use all three channels are configured on different 
frequencies, which sounds pretty interesting. 

   In the latter case a non-traditional uses an envelope 
generator. With it, formed an unusual timbre: 


   10 PLAY "W4X1UcdefgabCW7X4cdefgabC"


   Opportunities are not limited to the operator PLAY given 
effect. You can experiment with it.


   And finally a bit of criticism. Operator PLAY, despite all 
its advantages (which belong to more music coprocessor), has 
its drawbacks. For example, he can not play the notes in legato 
(one word) and very short notes. 






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:
From the authors - Mail in BODY.

В этот день...   23 November