-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path08-03-playing-music-modules.html
268 lines (211 loc) · 11.5 KB
/
08-03-playing-music-modules.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
<!doctype html>
<html lang="en">
<head>
<!--
This Amos Professional Manual is written by asymetrix for the Amiga community and should stay completely FREE FOREVER.
Created 2008. :)
It was created from the original AMOS Professional Manual by Europress Software Ltd.
It has been updated by Fredrik Rambris.
-->
<title>Playing Music Modules - AMOS Professional Manual</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=yes, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="keywords" content="Amos Professional, Amiga, Programming, Basic, Francois Lionet, Europress Software Ltd, Amos, computing, code, AmigaDOS">
<meta name="author" content="asymetrix,Fredrik Rambris">
<link rel="GitHub" href="https://github.com/fredrik-rambris/amospromanual">
<meta property="og:site_name" content="AMOS Professional Manual">
<meta property="og:image" content="https://amospromanual.dev/images/cover.jpg">
<link rel="stylesheet" type="text/css" href="styles.css">
<link rel="canonical" href="https://amospromanual.dev/08-03-playing-music-modules.html">
</head>
<body>
<section>
<h1>Playing Music Modules</h1>
<p>
A complete range of facilities i provided for playing music composed with the AMOS
Professional system, as well as module created with the popular Tracker and Med systems.</p>
</section>
<section id="01-playing-amos-professional-music">
<h2>Playing AMOS Professional music</h2>
<p>
Any pieces of AMOS Professional music that are to be used with your programs must be held in
the Music Bank, which is normally Bank 3. These musical pieces can be played without affecting
tiny other part of the main program. If sound effects are triggered on a channel that is currently
playing music, the tune will be suspended while the sound effect is performed, and will start
again from its last position once the effect is over.</p>
<p>
Several musical arrangements can be stored in the same bank, provided that there is enough
memory, and to identify melodies each piece of music must be given its own number.</p>
<i>instruction: play a piece of AMOS Professional music</i><br>
<b>Music</b> number</p>
<p>
The MUSIC command is used to start playing the specified melody. Up to three different
melodies can be started at the same time, but each new MUSIC instruction will halt the current
melody and hold its status in a stack. When the new song has ended, the original music will
start again exactly where it left off. Here is a ready-made melody to load and play:</p>
<code class="prefix disc">Load "AMOSPro_Examples:Music/Music.Abk"
Music 1
</code>
<p>
If you do not want your music to play through to the end, it can be halted in either of the two
following ways.</p>
<h3 class="command" id="i-music-stop">MUSIC STOP</h3>
<p><i>instruction: stop a single passage of music</i><br>
<b>Music Stop</b></p>
<p>
This instruction brings the current single passage of music to a halt. If there is any other active
music held in the stack and waiting to be played, that music will begin to play at once.</p>
<h3 class="command" id="i-music-off">MUSIC OFF</h3>
<p><i>instruction: turn off all music</i><br>
<b>Music Off</b></p>
<p>
The MUSIC OFF command is used to turn off all AMOS Professional music in your program
completely. After this command has been called, the sound track can only be re-started by
executing a MUSIC command all over again.</p>
<h3 class="command" id="i-mvolume">MVOLUME</h3>
<p><i>instruction: set the volume of a piece of music</i><br>
<b>Mvolume</b> level</p>
<p>
To set the volume of a piece of music, or to change its current volume, this command
is followed by a number ranging from zero for complete silence, up to 63 for
as loud as possible.</p>
<p>Obviously, by setting up a simple loop, you can fade your music up or down.</p>
<h3 class="command" id="i-tempo">TEMPO</h3>
<p><i>instruction: change the speed of a piece of music</i><br>
<b>Tempo</b> speed</p>
<p>
Changing the volume or speed of music and sound effects can enhance the mood of most
programs. The TEMPO command is used to modify the speed of the current melody, and must
be followed by a number ranging from 1 for as slow as possible, up to 100 for incredibly fast.
Here is an example of music mood changing:</p>
<code class="prefix edit">Load "AMOSPro_Examples:Music/Music.Abk"
Music 1
Do
For X=0 To 63
Tempo X: Mvolume X
Wait 10: Next X
Loop
</code>
<p>
Please note that music created using the Tracker and MED systems may include their own
tempo and volume labels, and these will override the settings specified by AMOS Professional.</p>
</section>
<section id="02-playing-tracker-modules">
<h2>Playing Tracker modules</h2>
<p>
If you are unable or unwilling to write your own musical masterpieces, there is no need to
worry. AMOS Professional lets you take other composers' soundtracks and add them to your
original games and utilities. There are thousands of public domain soundtracks written with
various systems, and to make life easy, you are provided with a range of commands that will
play the latest Soundtracker modules.</p>
<p>
A Tracker module can only be played while all other AMOS Professional music is stopped. The
following TRACKER instructions should only be used for Tracker modules and not for normal
AMOS Professional music, otherwise some bizarre noises are likely to be generated. The AMOS
Professional VOLUME and TEMPO commands will have no effect on Tracker modules, which
have their own built-in controls.</p>
<h3 class="command" id="i-track-load">TRACK LOAD</h3>
<p><i>instruction: load a Tracker module</i><br>
<b>Track Load</b> "modulename",bank number</p>
<p>
Use this command to load a specified Tracker module into the memory bank number of your
choice. Any existing data in this bank will be erased before the module is loaded, and the new
bank will be called "Tracker".</p>
<h3 class="command" id="i-track-play">TRACK PLAY</h3>
<p><i>instruction: play a Tracker module</i><br>
<b>Track Play</b><br>
<b>Track Play</b> bank number,pattern number</p>
<p>
To start your Tracker module playing, give this command followed by the appropriate bank
number. If the bank number is omitted, bank number 6 will be used as a default.
Most electronic composers use sets of patterns to make up a tune, and these can be repeated in
any suitable order. A Tracker sequence can be started from any one of these patterns, providing
that you know which pattern number refers to which particular part of the sequence. An
optional pattern number can be added after the bank number parameter. Here are some
example settings:</p>
<code class="prefix ex">Track Play : <comment>Rem Use default Tracker bank</comment>
Track Play ,5 : <comment>Rem Play pattern 5 from default Tracker bank</comment>
Track Play 9,5: <comment>Rem Play pattern 5 from bank 9</comment>
</code>
<h3 class="command" id="i-track-loop-on">TRACK LOOP ON</h3>
<h3 class="command" id="i-track-loop-off">TRACK LOOP OFF</h3>
<p><i>instructions: toggle a Tracker loop</i><br>
<b>Track Loop On</b><br>
<b>Track Loop Off</b></p>
<p>
Use these commands to make Tracker modules loop over and over again, or to stop a particular
loop after it has commenced. Try this example:</p>
<code class="prefix edit">Track Load "AMOSPro_Examples:Music/Mod.Tracker"
Track Play
Track Loop On
</code>
<h3 class="command" id="i-track-stop">TRACK STOP</h3>
<p><i>instruction: stop all Tracker music</i><br>
<b>Track Stop</b></p>
<p>This command is used to halt all Tracker modules playing.</p>
</section>
<section id="03-playing-med-modules">
<h2>Playing Med modules</h2>
<p>
If you wish to play Med modules, the "Medplayer.library" file must be in your "Libs:" folder.
Naturally, if you have no intention of exploiting the Med library, there is no need to load it and
allocate unnecessary memory. Both "MMDO" and "MMD1" modules can be used for your
programs.</p>
<h3 class="command" id="i-med-load">MED LOAD</h3>
<p><i>instruction: load a Med module</i><br>
<b>Med Load</b> "Module name",bank number</p>
<p>
The MED LOAD instruction loads the specified module in memory, and re-locates it to the
specified reserved bank in Chip memory. This bank is <b>not</b> a data bank, and will <b>not</b> be saved along
with your program, so Med modules must be loaded anew each time that the program is run.</p>
<p>
This command will open the "Medplayer.library" file, and you may be asked to insert
your System disc into the drive if this file is not available on the current disc.</p>
<p>
As with Tracker modules, AMOS Professional sound samples can be played while Med modules
are active. When a sound effect is triggered, any Med music will be stopped on all four voices,
and will start again as soon as the sample has been played.</p>
<h3 class="command" id="i-med-play">MED PLAY</h3>
<p><i>instruction: play a Med module</i><br>
<b>Med Play</b><br>
<b>Med Play</b> bank number,song number</p>
<p>
This instruction plays the specified currently loaded Med module. If no bank number parameter
is given, the data in the last appropriate bank to be loaded will be played. Med modules can
include more than one song, and an individual melody can be specified by including the song
number to be played, as follows:</p>
<code class="prefix ex">Med Play 2
Med Play ,2
Med Play 2,2
</code>
<h3 class="command" id="i-med-stop">MED STOP</h3>
<p><i>instruction: stop the current Med module</i><br>
<b>Med Stop</b></p>
<p>
This simple instruction halts the current Med song being played. The song can now be started
from the beginning with a new call to MED PLAY, or continued using a MED CONT command.</p>
<h3 class="command" id="i-med-cont">MED CONT</h3>
<p><i>instruction: continue a Med module</i><br>
<b>Med Cont</b></p>
<p>
This command is used to re-commence a Med module that has been halted by a MED STOP
instruction. The song will continue from the exact point at which it was stopped.</p>
<h3 class="command" id="i-med-midi-on">MED MIDI ON</h3>
<p><i>instruction: access MIDI instructions in a Med module</i><br>
<b>Med Midi On</b></p>
<p>
MIDI is the international standard by which musical instruments talk to one another and stands
for Musical Instrument Digital Interface. If the Med module contains MIDI instructions for
controlling keyboards, drum machines and so on, the MED MIDI ON command must be given
<b>before</b> the first MED LOAD command, in other words, before the "Medplayer.library" file is
opened.</p>
</section>
<footer>
<a href="08-02-samples.html" rel="prev">Samples</a>
<a href="./">Contents</a>
<a href="14-appendix-g-command-index.html">Index</a>
<a href="09-01-amos-interface.html" rel="next">AMOS Interface</a>
</footer>
</body>
</html>