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 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--Converted with LaTeX2HTML 2008 (1.71)
original version by: Nikos Drakos, CBLU, University of Leeds
* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>Patch Management</TITLE>
<META NAME="description" CONTENT="Patch Management">
<META NAME="keywords" CONTENT="mma">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<META NAME="Generator" CONTENT="LaTeX2HTML v2008">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<LINK REL="STYLESHEET" HREF="mma.css">
<LINK REL="next" HREF="node26.html">
<LINK REL="previous" HREF="node24.html">
<LINK REL="up" HREF="mma.html">
<LINK REL="next" HREF="node26.html">
</HEAD>
<BODY bgcolor="#ffffff">
<DIV CLASS="navigation"><!--Navigation Panel-->
<A NAME="tex2html883"
HREF="node26.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
<A NAME="tex2html881"
HREF="mma.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
<A NAME="tex2html875"
HREF="node24.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
<BR>
<B> Next:</B> <A NAME="tex2html884"
HREF="node26.html">Triggers</A>
<B> Up:</B> <A NAME="tex2html882"
HREF="mma.html">Reference Manual</A>
<B> Previous:</B> <A NAME="tex2html876"
HREF="node24.html">Low Level MIDI Commands</A>
<BR>
<BR></DIV>
<!--End of Navigation Panel-->
<!--Table of Child-Links-->
<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>
<UL CLASS="ChildLinks">
<LI><A NAME="tex2html885"
HREF="node25.html#SECTION002510000000000000000">Voice</A>
<LI><A NAME="tex2html886"
HREF="node25.html#SECTION002520000000000000000">Patch</A>
<UL>
<LI><A NAME="tex2html887"
HREF="node25.html#SECTION002521000000000000000">Patch Set</A>
<LI><A NAME="tex2html888"
HREF="node25.html#SECTION002522000000000000000">Patch Rename</A>
<LI><A NAME="tex2html889"
HREF="node25.html#SECTION002523000000000000000">Patch List</A>
<LI><A NAME="tex2html890"
HREF="node25.html#SECTION002524000000000000000">Ensuring It All Works</A>
</UL></UL>
<!--End of Table of Child-Links-->
<HR>
<H1><A NAME="SECTION002500000000000000000"></A>
<A NAME="patch"></A>
<BR>
Patch Management
</H1>
<P>
Modern music keyboards and synthesizers are capable of producing a
bewildering variety of sounds. Many consumer units priced well under
$1000.00 contain several hundred or more unique voices. But, ``out of
the box''
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> supports the 128 ``General MIDI''<A NAME="tex2html108"
HREF="#foot15566"><SUP><SPAN CLASS="arabic">25</SPAN>.<SPAN CLASS="arabic">1</SPAN></SUP></A> preset voices as well as ``extended'' voices (see
below). These voices are assigned the values 0 to 127. We refer to the
various voices as ``tones'', ``instruments'', or
``patches''.<A NAME="tex2html109"
HREF="#foot15567"><SUP><SPAN CLASS="arabic">25</SPAN>.<SPAN CLASS="arabic">2</SPAN></SUP></A>
<P>
<H1><A NAME="SECTION002510000000000000000"></A> <A NAME="set-voice"></A>
<BR>
Voice
</H1>
<P>
The MIDI instrument or voice used for a track is set with:
<P>
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
<tr><td>
<B>Chord-2 Voice Piano1 </B>
</td></tr>
</Table>
<P>
Voices apply only to the specified track. The actual instrument can be
specified via the MIDI instrument number, an ``extended'' value, or
with the symbolic name. See the tables in the MIDI
<A HREF="node35.html#sec-voicenames">voicing section</A> for lists of the standard, recognized
names.
<P>
You can create interesting effects by varying the voice used with drum
tracks. By default ``Voice 0'' is used. However, you can change the
drum voices. The supplied library files do not change the voices since
this is highly dependent on the MIDI synth you are using.
<P>
You can specify a different V<SMALL>OICE</SMALL> for each bar in a sequence.
Repeated values can be represented with a ``/'':
<P>
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
<tr><td>
<B>Chord Voice Piano1 / / Piano2 </B>
</td></tr>
</Table>
<P>
It is possible to set up translations for the selected voice: see
<A HREF="node28.html#set-voicetr">V<SMALL>OICE</SMALL>TR</A>.
<P>
To complicate matters a little bit more,
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> also adds a pseudo
voice N<SMALL>ONE</SMALL> which disables the generation of MIDI code to
select a default voice. This is useful when you set a given track to
a specific MIDI channel and you have preset an external synth. For
example, suppose you want a S<SMALL>OLO</SMALL> track on MIDI channel 1 with
no voice settings:
<P>
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
<tr><td>
<B>Begin Solo
<BR> channel 1
<BR> Voice None
<BR> ...
<BR>
End
<BR></B>
</td></tr>
</Table>
<P>
<H1><A NAME="SECTION002520000000000000000"></A>
<A NAME="extended-patch"></A>
<BR>
Patch
</H1>
<P>
In addition to the 128 standard voices mandated by the MIDI standards
(referred to as the GM voices)
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> also supports extended voice
banks.
<P>
<DIV ALIGN="CENTER">
<Table CellSpacing=0 Width="80%" Align="Center" CellPadding=10 BGColor="#dddddd" Border=3>
<tr> <td>
<BR>
<BR><SPAN CLASS="textit">The rest of this
chapter presents features which are highly dependent your hardware.
It is quite possible to create midi files which sound very
different (or even awful, or perhaps not at all) on other
hardware. We recommend that you <SPAN CLASS="textit">do not</SPAN> use these
features to create files you want to share!</SPAN>
</td></tr>
</Table>
</DIV>
<P>
A typical keyboard will assign instruments to different voice
banks. The first, default, bank will contain the standard set of 128
GM instruments. However, you can select different banks, each with a
variety of voices, by changing the current voice bank. This switching
is done by changing the value of MIDI Controller 0, 32 or both. You'll
need to read the manual for your hardware to figure this out.
<P>
In order to use voices outside of the normal GM range
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> uses an
extended addressing mode which includes values for the patch and
controllers 0 and 32. Each value is separated from the others with a
single ``.''. Two examples would include 22.33.44 and 22.33. The first
value is the Patch Number, the second is a value for Controller 0. The
third value, if present, is the setting for Controller 32.
<P>
My Casio Wk-3000 lists Bank-53, Program-27 as "Rotary Guitar". It's easy to use
this voice directly in a V<SMALL>OICE</SMALL> command:
<P>
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
<tr><td>
<B>Chord Voice 27.53 </B>
</td></tr>
</Table>
<P>
Yes, but who wants all those ``funny'' numbers in their
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> files?
Well, no one that I know. For this reason the P<SMALL>ATCH</SMALL> command has
been developed. This command lets you modify existing patch names,
list names and create new ones.
<P>
P<SMALL>ATCH</SMALL> takes a variety of options. We suggest you read this
section and examine some of the included example files before
venturing out on your own. But, really, it's not that complicated.
<P>
Unless otherwise noted, you can stack a number of different options
onto the same P<SMALL>ATCH</SMALL> line.
<P>
<H2><A NAME="SECTION002521000000000000000"></A>
<A NAME="patch-set"></A>
<BR>
Patch Set
</H2>
<P>
The S<SMALL>ET</SMALL> option is used to assign one or more patch values to
symbolic names. Going back to my Casio example, above, I could use the
following line to register the voice with
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT>
<P>
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
<tr><td>
<B>Patch Set 27.53=RotaryGuitar </B>
</td></tr>
</Table>
<P>
The assignment consists of two parts or keys joined by a ``=''
sign. No spaces are permitted. The left part of the assignment is a
value. It can be a single number in the range 0 to 127; or 2 or 3 numbers
joined by ``.''s. The right right part is a symbolic name. Any characters
are permitted (but no spaces!).
<P>
After the assignment you can use ``RotaryGuitar'' just like any other
instrument name:
<P>
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
<tr><td>
<B>Chord Voice rotaryguitar </B>
</td></tr>
</Table>
<P>
Note that once the voice has been registered you don't need to worry
about the case of individual letters.
<P>
It's even possible to register a number of voices in this manner:
<P>
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
<tr><td>
<B>Patch set 27.53=RotaryGuitar 61.65=BASS+TROMBONE </B>
</td></tr>
</Table>
<P>
Just make sure that the S<SMALL>ET</SMALL> assignments are the last thing on
the P<SMALL>ATCH</SMALL> line.
<P>
It is relatively easy to load entire sets of extended patch names by
creating special
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> include files. For example, for a Casio
WK-3000 keyboard you might have the file <TT><SPAN CLASS="textbf">includes/casio-wk3.mma</SPAN></TT>
with a large number of settings. Here's a snippet:
<P>
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
<tr><td>
<B>Begin Patch Set
<BR>
0.48=GrandPiano
<BR>
1.48=BrightPiano
<BR>
2.48=ElecGrandPiano
<BR>
3.48=Honky-Tonk1
<BR> ...
<BR>
End </B>
</td></tr>
</Table>
<P>
Now, at the top of your song file or in a <SMALL>MMARC</SMALL> file insert the
command:
<P>
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
<tr><td>
<B>include casio-wk300<A NAME="tex2html110"
HREF="#foot15715"><SUP><SPAN CLASS="arabic">25</SPAN>.<SPAN CLASS="arabic">3</SPAN></SUP></A></B>
</td></tr>
</Table>
<P>
A file like this can be created by hand or you can convert existing an
existing file to a format understands. A number of ``patch''
files exist for the popular ``Band in a Box'' program from
PGMusic. There files may be subject to copyright, so use them with
respect. No patch files are included in this distribution, but many
are freely available on the internet. For a start you might want to
look at <TT><A NAME="tex2html111"
HREF="http://www.pgmusic.com/support_miscellaneous.htm">http://www.pgmusic.com/support_miscellaneous.htm</A></TT>. These
files cannot be read my
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> , so we have included a
little conversion utility <TT><SPAN CLASS="textbf">util/pg2mma.py</SPAN></TT>. There is a short
file with instructions <TT><SPAN CLASS="textbf">util/README.pg2mma</SPAN></TT>.
<P>
The S<SMALL>ET</SMALL> option will issue warning messages if you redefine
existing instrument names or addresses. We suggest that you edit any
configuration files so that they have unique names and that you do not
rename any of the standard GM names.
<P>
<H2><A NAME="SECTION002522000000000000000">
Patch Rename</A>
</H2>
<P>
The naming of patches is actually quite arbitrary. You'll find that
different manufacturers use different names to refer to the same
voices. Most of the time this isn't a major concern, but you have the
freedom in
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> to change any patch name you want. For example,
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT>
calls the first voice in the GM set ``Piano1''. Maybe you want to use
the name ``AcousticGrand''. Easy:
<P>
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
<tr><td>
<B>Patch Rename Piano1=AcousticGrand </B>
</td></tr>
</Table>
<P>
Each R<SMALL>ENAME</SMALL> option has a left and right part joined by an ``=''
sign. The left part is the current name; the right is the new
name. Please note that after this command the name ``Piano1'' will not
be available.
<P>
You can have any number of items in a list; however, they must be the
last items on the P<SMALL>ATCH</SMALL> line.
<P>
<H2><A NAME="SECTION002523000000000000000">
Patch List</A>
</H2>
<P>
After making changes to
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> 's internal tables you might want to
check to make sure that what you meant is what you got. For this
reason there are three different versions of the L<SMALL>IST</SMALL>
command.
<P>
<DL>
<DT><STRONG>List=GM</STRONG></DT>
<DD>Lists the current values of the GM voices,
</DD>
<DT><STRONG>List=EXT</STRONG></DT>
<DD>Lists the extended voices,
</DD>
<DT><STRONG>List=All</STRONG></DT>
<DD>Lists both the GM and extended voices.
</DD>
</DL>
<P>
For example, the command:
<P>
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
<tr><td>
<B>Patch List=EXT </B>
</td></tr>
</Table>
<P>
will produce a listing something like:
<P>
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
<tr><td>
<B>0.48=GrandPiano
<BR>
1.48=BrightPiano
<BR>
2.48=ELEC.GrandPiano
<BR> ...</B>
</td></tr>
</Table>
<P>
<H2><A NAME="SECTION002524000000000000000">
Ensuring It All Works</A>
</H2>
<P>
If you are going to use any of the extended patches in your MIDI files
you may need to do some additional work.
<P>
Your hardware may need to be in a ``special'' mode for any of the
extended patches to take effect. What we suggest is that you use the
MIDI command <A HREF="node24.html#sec-midi">(details here)</A> to do some initialization. For an example please
look at the file <TT><SPAN CLASS="textbf">includes/init.mma</SPAN></TT> which we include in our
personal files. This file sets the volume, pan and controller values
to known settings. It's easy to modify this file to match your
hardware setup.
<P>
To use a file like <TT><SPAN CLASS="textbf">includes/init.mma</SPAN></TT> just include a line like:
<P>
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
<tr><td>
<B>include init </B>
</td></tr>
</Table>
<P>
in your mmarc file. See the Path section of this manual for details
<A HREF="node32.html#sec-paths">(here)</A>.
<P>
To help keep things sane,
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> checks each track as it is closed. If
an extended voice has been used in that track it resets the effected
controllers to a zero state. In most cases this means that if you
finish playing the file your keyboard will be returned to a
``default'' state.
<P>
However, you might wish to generate some explicit MIDI sequences at the
end of a generated file. Just write another file like the
<TT><SPAN CLASS="textbf">init.mma</SPAN></TT> file we discussed above. You can insert this file by
placing a line like:
<P>
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
<tr><td>
<B>include endinit </B>
</td></tr>
</Table>
<P>
at the end of your song file. Or, use the MMAE<SMALL>ND</SMALL> command
detailed <A HREF="node32.html#sec-mmaend">here</A>.
<P>
You can get about as complicated as you want with all this. One scheme
you might consider is to use macros to wrap your extended patch
code. For example:
<P>
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
<tr><td>
<B>if def Casio
<BR>
include casio-wk3000
<BR>
include init.file.for.casio.mma
<BR>
endif
<BR>
<BR>
Groove somegroove
<BR>
<BR>
if def Casio
<BR>
Chord Voice ROtaryGuitar
<BR>
Endif
<BR>
<BR>
1 Cm
<BR>
2 Dm
<BR> ...more chords
<BR>
if def Casio
<BR>
include restore-file-for-casio.mma
<BR>
endif </B>
</td></tr>
</Table>
<P>
Now, when you compile the file define the macro on the command line:
<P>
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
<tr><td>
<B>$ mma -SCASIO filename </B>
</td></tr>
</Table>
<P>
This defines the macro so that your wrappers work. To compile for the
GM voicing, just skip the ``-SCASIO''.
<P>
An alternate method is to use the V<SMALL>OICE</SMALL>TR command
<A HREF="node28.html#set-voicetr">(details here)</A>. Using a similar example we'd create a song
file like:
<P>
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
<tr><td>
<B>if def Casio
<BR>
include casio-wk3000
<BR>
include init.file.for.casio.mma
<BR>
VoiceTR Piano1=RotaryGuitar ChoralAhhs=VoxHumana
<BR>
endif
<BR>
Groove somegroove
<BR>
<BR>
1 Cm
<BR>
2 Dm
<BR> ...more chords
<BR>
if def Casio
<BR>
include restore-file-for-casio.mma
<BR>
endif </B>
</td></tr>
</Table>
<P>
Notice how, in this example, we don't need to wrap each and every
V<SMALL>OICE</SMALL> line. We just create a translation table with the
alternate voices we want to use. Now, when the G<SMALL>ROOVE</SMALL> is loaded
the various voices will be changed.
<P>
<P>
<BR><HR><H4>Footnotes</H4>
<DL>
<DT><A NAME="foot15566">... MIDI''</A><A
HREF="node25.html#tex2html108"><SUP><SPAN CLASS="arabic">25</SPAN>.<SPAN CLASS="arabic">1</SPAN></SUP></A></DT>
<DD>The General
MIDI or GM standard was developed by the MIDI Manufactures
Association.
</DD>
<DT><A NAME="foot15567">...
``patches''.</A><A
HREF="node25.html#tex2html109"><SUP><SPAN CLASS="arabic">25</SPAN>.<SPAN CLASS="arabic">2</SPAN></SUP></A></DT>
<DD>``Patch'' a bit of a historical term dating back
to the times when synthesizers cost a lot of money and used bits of
wire and cable to ``patch'' different oscillators, filters, etc. together.
</DD>
<DT><A NAME="foot15715">... casio-wk300</A><A
HREF="node25.html#tex2html110"><SUP><SPAN CLASS="arabic">25</SPAN>.<SPAN CLASS="arabic">3</SPAN></SUP></A></DT>
<DD>Refer to I<SMALL>NCLUDE</SMALL> <A HREF="node32.html#sec-include">(here)</A> for details on file placement.
</DD>
</DL>
<DIV CLASS="navigation"><HR>
<!--Navigation Panel-->
<A NAME="tex2html883"
HREF="node26.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
<A NAME="tex2html881"
HREF="mma.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
<A NAME="tex2html875"
HREF="node24.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
<BR>
<B> Next:</B> <A NAME="tex2html884"
HREF="node26.html">Triggers</A>
<B> Up:</B> <A NAME="tex2html882"
HREF="mma.html">Reference Manual</A>
<B> Previous:</B> <A NAME="tex2html876"
HREF="node24.html">Low Level MIDI Commands</A></DIV>
<!--End of Navigation Panel-->
<ADDRESS>
Bob van der Poel
2016-06-11
</ADDRESS>
</BODY>
</HTML>
|