ZX Forum #04
19 ноября 1997
  Софт  

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

<b>world of sound Spectrum</b> - Chapter 7.2: Music Editor
 Wham the Music Box.
        7.2. Music Editor

           Wham the Music Box


   Wham the Music Box ("Music Box") - perhaps the most 
extensive in its features music editor for ZXSpectrum. With it, 
you can create a Two-tone with drum and sound effects. Created 
a piece of music can be stored on tape or diskette and, if 
necessary, download it again and make changes. The big 
advantage of the editor is that the melodies written with his 
help, can be used to design other

programs.

   After downloading Wham'a melody, and
appears on the screen main menu (MAIN
MENU). To select any mode, press the corresponding number key:


   1. LOAD TUNE - download ringtones

   2. SAVE TUNE - saving ringtones

   3. HEAR TUNE - listening melodies

   4. WHAMPILER - Compilation

   5. SET TEMPO - setting the pace

   6. EDIT MODE - edit mode

   7. HELP PAGE - tip


   7.2.1. LOAD TUNE - download ringtones


   This mode allows you to download the file
containing a previously created melody to the editor for 
further work with him. After the transition mode LOAD TUNE (key 
1) program will ask you to which device you

want to download the file:


   SELECT PERIFERAL DEVICE

   TAPE MEMORY DRIVE (SPACE = EXIT)


   If you decide to abandon their venture, then press the 
spacebar. Otherwise - select your device by using one of the 
keys: T - Tape, M - RAM, D - mikrodrayv. 

   When booting from a tape on request "FILENAME?" Enter the 
name of the file that stores the melody. 

   Together with Wham'om on cassette (floppy)
supplied file EXAMPLE, which contains a cheerful melody. Try it
download and listen to (see below).

   Since Russia mikrodrayv not caught on, but instead caught on 
the drive, there is a legitimate desire to replace the label 
DRIVE to the DISK, with all ensuing consequences. This was done 
quite successfully by several Russian programmers (there is 
also a version in Russian). The most common disk option before 
requesting "FILENAME?" (See above) asked him to print a 
directory on drive "A" (Yes / No):



   PRINT CATALOGUE 'A:' (Y / N)?


   And then load is the standard way.

   If you refer to the memory key (M), then you will see a list 
of six melodies: 


       1. FREEDOM

       2. TROPICANA

       3. YOUNG GUNS

       4. WHISPER

       5. BAD BOYS

       6.


   The first five of them created by the authors
program, and the sixth is reserved for
Your creations. To download any of them
just press the corresponding number key.

   Upon completion of downloading the program, it automatically 
goes MAIN MENU. 


   7.2.2. SAVE TUNE - saving ringtones


   With this mode your labor is not in vain, when you need a 
long time away from the preparation of melody, that is

created a piece of music can be stored on tape or disk for 
further improvement. 

   To enter the mode SAVE TUNE possible from the main menu by 
pressing 2 and then will be a familiar question about the 
device on which you wish to record their product:



   SELECT PERIFERAL DEVICE

   TAPE MEMORY DRIVE (SPACE = EXIT)


   As before, pressing the spacebar, you return to the main 
menu and selecting the device: T - Tape, M - memory and D - 
mikrodrayv (Floppy disk), will be asked "FILENAME?",

which you can enter the name of the file to be saved in a 
melody. 

   If you decide to write your piece of music in memory, before 
you will see a list of six melodies. Your product can be 
written in place any of them, but it will only be stored until 
power is turned off, or pressing the reset button. 

   In the case of recording on tape, after it
completion will be the question: VERIFY (Y / N).
If you believe as a record, you can press the key "N", otherwise
press "Y", rewind the tape to the beginning
just recorded file and turn
listening to check it.

   After recording, the program automatically enters the MAIN 
MENU. 


  7.2.3. EDIT MODE - edit mode


   Edit mode - this is the main tool with which you can
realize their musical ideas.

   Enter into this mode can be the main
menu by pressing 6. At the same time on the screen
The images of two stave
(For bass and treble clef), and
as a pointer to an octave OCTAVE, a pointer
current channel (voice) CHANNEL 1 (2) and
step counter for each channel
COUNTERS (CHN1, CHN2).

   To select features editor, two upper rows of keys, and the 
lower two - a substitute for the piano keyboard. The values 
​​of these keys you can see in Figure 5. Several of the Caps 
Shift to Space plays the role of the white keys, and from A to 
L - Black.


   So you want to "jot down" any melody. Pressing T, then a 
voice, which are going to work, keys 1 ... 4 - oct (1 - a 
large, 2 - small, 3 - the first, 4 - second) and try to "Online 
Time" tune on "sound" keys. At the same time on a stave appear 
Image notes, and colored squares indicate the corresponding 
keys on a piano (For the first vote, the red box, for

second - purple). If you mistakenly
pressed the wrong key, do not worry,
all fixable: pressing the 0 key will bring you back one step 
back. If you want to return more than one step, press 9. 

   Playing one note to the promotion of
a step forward by pressing P.
While holding this key, you can listen to some tunes. Use the O
You can "rewind" the melody forward.

   You'll want to listen to a piece of music entirely, not 
leaving edit mode. Press R (return

the top of the melody), then Q (playing
melody) - and will sound your creation. Stop playback by 
pressing any key.


   To write the second voice switch the channel and the T key 
by pressing R, O, P, 0, 9, go to step from where you are going 
to use it. 

   Unfortunately, Wham does not allow
write a melody of notes of different durations. The required 
duration is achieved or use the pause key (Enter),


or write the desired number of identical notes.

   Your piece of music will sound very different if you are 
using for his arrangement of the drum key (E) and sound effects 
(keys Y, U, I). Drum may sound differently, depending on the

, in which channel it is installed. The first channel is really 
a drum, and in the second he looks more like a note to the SI 
kontroktavy or before the big octave. Sound effects can be 
edited using the appropriate mode, which can be reached from 
the EDIT MODE, pressing 8. After that, the menu appears select 
the frequency (WAVEFORM) and duration (DURATION) sound effects. 
Choose one of the program provided 16 variants of the duration 
and 8 different frequencies (mode shapes) sound effects by 
using the following keys: 


   5.8 - Choosing the edited noise

         effect;

   6 - Go to the selection function of frequency;

   7 - Go to the duration of the selection function
         industries;

   0 - change the effect.


   Resulting in the editing process
sound effects can be heard using the key 9.

   After effects settings can be accessed
back to edit mode ringtones
(Any key, except for participating in the effects settings) and 
use them in their work with the keys Y, U and I. While the 
sound effects are reserved for only those three keys, you can 
use a much larger number (128). For this effect, created the 
first three and are placed melody in the right places, then the 
following three, etc.


   The presence of the drum and sound effects in the
melody is displayed on the stave as gap, which is very 
inconvenient. Note that simultaneously with the drum and the 
noise effects may not sound the note (with the exception of 
only a drum set in the second channel). 

   If you want to tune repeated with a pitch that is sounded
continuously, the W key, set the mark at the selected step 
cycle in both channels. In this case, the computer asks:



   SET LOOP HERE? (Y / N) - set

   label here? (Yes / No)


   The marks in the first and second
channels may not be the same. But in order
to the cyclical playing tunes not disrupted synchrony sound
votes, the number of steps in the first and second channels 
have to be multiples of each other. For successful compilation 
(see below) set the mark in both channels is required. 

   If you want to clear the memory of a failed product, press 7 
and confirm your request: 


   ERASE CURRENT TUNE? (Y / N) - delete

   melody? (Yes / No)


   Use the 5 you can change the color
curb. But to return to main menu
press 6.


       7.2.4. HELP PAGE - tip


   In edit mode, you will need to use a considerable number of 
keys, just remember their functional purpose is not so simple. 
Therefore, to aid you are offered tips page - HELP PAGE, which 
can be accessed from the main menu by pressing 7. 

   A list of keys used for editing:


       KEYS FUNCTION


       1-4 SELECT OCTAVE choice octave

       5 CHANGE BORDER border color change

       6 MAIN MENU exit to main menu

       7 ERASE TUNE delete ringtones

       8 NOISE MIXING editing sound effects

       9 REPEAT BACKSTEP rewind

       0 SINGLE BACKSTEP return one step

       Q REPLAY TUNE tunes

       E DRUM EFFECT drum

       T CHANGE CHANNEL channel selection

       Y, U & I NOISE EFFECTS sound effects

       O FAST FORWARD to scroll forward

       P PLAY NEXT NOTE playing the next note

The lower half of the keyboard lower half of the keyboard
mimics a piano, enter is a rest mimics the piano, enter -

                                 pause

Use cursor keys to edit the Use the cursor keys
white noise with 9 to hear the editing of white noise
current effect and to alter it 0 9 - plays, 0 - change

 7.2.5. HEAR TUNE - listening melodies


   When listening to tunes in EDIT mode
MODE it sounds somewhat distorted form, since the CPU is busy 
but the music is also output on screen notes, servicing the 
keyboard, etc. To get an idea of ​​the true sound of the 
melody, that is to hear it will be executed after the 
compilation (see below), use the HEAR TUNE

(Key 3 main menu).

   After listening to by pressing any key, you get into a mode 
EDIT MODE. 


    7.2.6. SET TEMPO - setting the pace


   If after listening to the tunes you want to change the pace 
of its execution, use the mode SET TEMPO (Key 5 main menu).


   Key 8, you can speed up the pace of execution of melody, and 
key 5 - to slow down. Changing the tempo is depicted 
graphically, with by purple stripes on the screen. C

decrease in the rate of the strip also decreases
and vice versa.

   Pressing any key except 5 and 8, you
will be taken to edit mode (EDIT MODE).


      7.2.7. WHAMPILER - Compilation


   Piece of music stored in a file to edit mode SAVE
TUNE, you can download it again (LOAD TUNE) and
continue to work with him. However, this way of presenting the 
tunes you can listen to it only being in the editor. 

   If you want to arrange music
program written in BASIC or assembly language, you need to 
write a melody a program that works independently of

editor. This subroutine is created
through the compilation mode WHAMPILER.

   As a result of the compilation tape or
floppy disk file is written, which is a program in the codes, 
run separately from Wham'a, but, unlike from the edited file is 
not amenable to further change.


   Before compiling, using the
LOAD TUNE download the song you would like to compile and 
verify that both whether the channels are exposed label cycle.


   As an example, try to compile one of the 5 songs that are 
downloaded from memory (see LOAD TUNE - MEMORY), we assume

free number 1 - FREEDOM. Download it
and then pressing 4, enter the compilation mode. At the request 
TUNENAME? Enter a name under which you want to save the 
compiled file, for example, FREE-MUS. Next the program asks you 
to enter the address from which will be located and run the 
compiled file: 


   ASSEMBLY ADDRESS?


   Enter the decimal address of at least
32768, eg 60000, then the compiler displays the following 
information: 


          TUNE NAME: FREE-MUS name ringtones

   ASSEMBLY ADDRESS: 60000 address

      RETURN OPTION: KEYPRESS return policy

        WHITE NOISE: - NONE - sound effects are absent

   CHANNEL 1 LENGTH: 313 number of steps in the first channel

   CHANNEL 1 LOOP: START cycle from the beginning of the first 
channel 

   CHANNEL 2 LENGTH: 313 the number of steps in the second 
channel 

   CHANNEL 2 LOOP: START cycle from the beginning of the second 
channel 


   1. KEYPRESS

   2. ALWAYS

   3. TUNEEND


   RETURN OPTION 1, 2 OR 3?


   Numbers 1, 2 and 3 are indicated conditions
finished playing melodies. Depending on the version obtained
certain modifications of the compiled file: KEYPRESS - playing 
tunes ends when any key is pressed;

ALWAYS - playing tunes performed simultaneously with the 
program (for details, this mode is described below); TUNEEND - 
playback is completed or at the end melody, or when you press 
any key. 


   Run the compilation happens immediately after you select 
keys 1, 2 or 3 of one of these conditions. Click, for example,

1 key.

   Upon completion of the compilation on the screen will
deduced the length of the executable file in bytes and the 
message of the normal completion Operations:



   CODE LENGTH: 893

   ROUTINE COMPILATION COMPLETED OK


   Then, after the inscription ADJUSTMENT POKES:
(Configuration POKE), will look
required to configure the executable
file already in use in
Your program (remember that in our example ASSEMBLY ADDRESS is 
60000): 


   REPLAY SPEED: 60035, (230 TO 255)

This marked the program reports that, writing in the memory 
cell with address 60035 (ASSEMBLY ADDRESS + 35) number from 230 
to 255, you can change the pace of execution of melody;



   BORDER COLOR: 60026 (0 TO 7)

This message indicates that, recording to a memory location 
60026 (ASSEMBLY ADDRESS + 26) a number from 0 to 7, you can 
count on Execution time tunes set

a color border (default -
purple);


   TO RUN - RANDOMIZE USR 60000

This inscription reminds that to start
tunes from BASIC you must use the RANDOMIZE USR 60000 (ASSEMBLY
ADDRESS).

   Following the withdrawal of these posts is recorded 
executable file on the tape or drive, depending on the version.


   Now we can safely reap the reset button and
loaded into memory obtained after compiling the program code. 
If the executable file is saved on the tape, then load it and 
run write the following program in BASIC:


 10 LOAD "FREE-MUS" CODE
 20 POKE 60026,7: REM Border color - white
 30 RANDOMIZE USR 60000


   Run it and download the tune, and then you hear compiled 
melody which will sound until you press

any key. Experiment
with the pace of a performance, recording with
using the operator POKE different numbers of
ranging from 230 to 255 in cell 60035.

   For the disk version of the first line of the program should 
be replaced by the following: 

 10 RANDOMIZE USR 15619: REM: LOAD

    "FREE-MUS" CODE


   Now you can compile any melody (including his own), 
performing similar actions. 

   The compilation process can proceed somewhat differently. 
For example, if you decide to make a repeating bass line and 
loop it much earlier the main melody (make sure that the number 
of steps in both channels is a multiple of each other). In this

case, the program eliminates the possibility of
compile mode TUNEPEND and establishes a regime KEYPRESS, but 
instead the possibility of choice asks:



   CHANGE RETURN OPTION TO ALWAYS?

   change the compilation mode to ALWAYS?


   If you press Y, the regime will
changed. Otherwise, the compilation will continue in the mode 
KEYPRESS. 

   Note that the compiler produces a number of steps in the 
channel together with the mark of the cycle. Therefore, you may 
find that, for example, 65 multiple of 9 (in fact, - 64 and 8).


   If your number of steps in the ring
both voices are not multiples of each other, then
compile will fail the following message:


        WARNING WARNING

   End markers mismatch is not the same label of the cycle.

   may cause distorted tune may distort the melody.

   Continue? (Y / N) Continue? (Yes / No)


   If you press Y, then the compilation will proceed as if the 
number of steps have been multiples of each other, but for what 
will turn out, nobody is not responsible. Otherwise the compile 
will fail and you will be in the main menu.


   If you do forget to put a label cycle in at least one of the 
channels, then Your eyes gaze at the following picture:



              TUNE NAME: XXXXXXXXXX

       ASSEMBLY ADDRESS: XXXXX

          RETURN OPTION: KEYPRESS

            WHITE NOISE: XXXXXXXX

       CHANNEL 1 LENGTH: NOT PRESENT

    number of steps in the first channel is not defined

       CHANNEL 1 LOOP: START

       CHANNEL 2 LENGTH: NOT PRESENT

    number of steps in the second channel is not defined

       CHANNEL 2 LOOP: START

Tune compilation abandoned. Compilation aborted.
No end markers defined. No tags set cycle.
Use the W key to place the end using key W, set
marker for the current channel. label for each channel.


   If the machine you are cursed, treat
calmly. Pressing Enter, exit the compiler, fix flaws were 
noticed, and be sure that the second, or at least the third 
attempt melody will be compiled, and you can decorate it your 
program. Most likely, you'll want your program to work 
simultaneously with playing the melody. A similar effect can be 
achieved if the compiler to use mode of ALWAYS. File compiled in

This mode is called to two addresses:
has two entry points. The first is for
init tunes and play the first note and is located at the same 
address, that in other modes (ASSEMBLY ADDRESS),

and the second - playing all subsequent
Music (located ASSEMBLY ADDRESS +12).

   Thus, if in the above
Example compilation using mode ALWAYS, then initialize the 
melody and play the first note to execute the statement 


   RANDOMIZE USR 60000,

and for each subsequent playing music - the operator


   RANDOMIZE USR 60012.


   Here is a sample program that demonstrates
possible mode ALWAYS:

 10 PAPER 0: BORDER 0: INK 7: BRIGHT 1:

    CLS
 20 LOAD "FREE-MUS" CODE: CLS: OVER 1
 30 LET A $ = "ALWAYS-mode demonstration!"
 40 RANDOMIZE USR 60000
 1950 PRINT AT 10,3;
 60 FOR A = 1 TO LEN A $: RANDOMIZE USR 60012
 70 PRINT INK RND * 6 +1; A $ (A);
 80 NEXT A: GOTO 1950


   Similarly, you can draw
and programs in machine code.

   Note that the run time of your program in the intervals 
between the notes should not be too large, otherwise the 
quality is lost tunes. In addition, it should be roughly the 
same between any two notes. 


              7.2.8. Tips

 1. If the program was published in BASIC with the community
    generalization of the error (for example, zag
    manual ultrasonic inspection with a tape recorder, or if 
you Sauveur     Shannon accidentally pressed the BREAK),


    then to return to the main menu intro
    dite command RUN.
 2. If you decide to create a more or less

    long melody, using both voice

    then enter these voices should be parallel
    parallel, otherwise unavoidable errors. Except

    also desirable from time to time about
    slushivat that you have succeeded.
 3. All you have composed tunes worth Sox
    wounding on the same tape (or diskette)

    using the SAVE TUNE. Thanks
    this series after a while you

    will be fairly large selection of tunes

    when you make a new program.






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:
Iron - Passhipenie memory Tashkent 128.
Advertising - Advertisements and announcements ...
Soldering Iron - LPT COVOX.
Announcement - What do you expect in the next issue.

В этот день...   4 May