diff --git a/mma/MMA/alloc.py b/mma/MMA/alloc.py index 05bbf27..3b383e8 100644 --- a/mma/MMA/alloc.py +++ b/mma/MMA/alloc.py @@ -31,10 +31,11 @@ import MMA.patScale import MMA.patArpeggio import MMA.patSolo import MMA.patAria +import MMA.grooves + import gbl from MMA.common import * - trkClasses = { 'BASS' : MMA.patBass.Bass, 'CHORD' : MMA.patChord.Chord, @@ -75,9 +76,9 @@ def trackAlloc(name, err): If not, we either error (err==1) or return (err==0). """ - if trkClasses.has_key(base): + try: f = trkClasses[base] - else: + except: if err: error("There is no track class '%s' for trackname '%s'" % (base, name) ) else: @@ -93,7 +94,7 @@ def trackAlloc(name, err): # Update current grooves to reflect new track. - for slot in gbl.settingsGroove.keys(): + for slot in MMA.grooves.glist.keys(): newtk.saveGroove(slot) diff --git a/mma/MMA/auto.py b/mma/MMA/auto.py index f8deb05..7fa7585 100644 --- a/mma/MMA/auto.py +++ b/mma/MMA/auto.py @@ -29,10 +29,12 @@ import sys import pickle import MMA.midi -import gbl import MMA.parse + +import gbl from MMA.common import * + grooveDir = {} mmadir = ".mmaDB" # constant, name of the lib database file fileCount = 0 @@ -52,8 +54,8 @@ def updateGrooveList(n): def libUpdate(): """ Update the mma library database file(s) with -g or -G option. - This is called from the main program after the initialization - and other option parsing. No RETURN. + This is called from the main program after the initialization + and other option parsing. No RETURN. """ global fileCount, gdDate, grooveDir, processedfiles @@ -137,9 +139,9 @@ def dolibupdate(root, subdir): """ Get a list of the files in this directory. If the list - includes a file called 'MMAIGNORE' the entire directory - (and subdirs) is ignored. Otherwise, each file in the - directory ending in 'mma' is parsed for groove defs. + includes a file called 'MMAIGNORE' the entire directory + (and subdirs) is ignored. Otherwise, each file in the + directory ending in 'mma' is parsed for groove defs. """ p = os.path.join(root,subdir) @@ -156,9 +158,7 @@ def dolibupdate(root, subdir): if fn.startswith('.') or fn.startswith('#'): continue - # Create full path name - - f=os.path.join(root, subdir, fn) + f=os.path.join(root, subdir, fn) # Create full path name if os.path.isdir(f): dolibupdate(root, os.path.join(subdir,fn)) # recursive! @@ -168,18 +168,18 @@ def dolibupdate(root, subdir): processedFiles.append(ename) - if gdDate and grooveDir.has_key(ename) and \ - os.path.getmtime(f) < gdDate: + if gdDate and ename in grooveDir and os.path.getmtime(f) < gdDate: print " Existing: %s" % f grooveCount += len(grooveDir[ename]) continue - if grooveDir.has_key(ename): + if ename in grooveDir: print " Updating: %s" % f else: print " Creating: %s" % f mkGrooveList = [] gbl.mtrks = {} + MMA.grooves.aliaslist = {} for c in gbl.midiAssigns.keys(): gbl.midiAssigns[c]=[] for a,v in enumerate(gbl.midiAvail): diff --git a/mma/MMA/chords.py b/mma/MMA/chords.py index 76a6dc4..6cd366e 100644 --- a/mma/MMA/chords.py +++ b/mma/MMA/chords.py @@ -27,7 +27,7 @@ import copy from MMA.common import * -from MMA.chordtable import chords +from MMA.chordtable import chordlist @@ -42,7 +42,7 @@ def defChord(ln): if not len(ln): error(emsg) name = ln.pop(0) - if name in chords.keys(): + if name in chordlist.keys(): warning("Redefining chordtype '%s'" % name) if '/' in name: @@ -77,27 +77,28 @@ def defChord(ln): scale[i]=v - chords[name] = ( notes, scale, "User Defined") + chordlist[name] = ( notes, scale, "User Defined") if gbl.debug: - print "ChordType '%s', %s" % (name, chords[name]) + print "ChordType '%s', %s" % (name, chordlist[name]) def printChord(ln): """ Display the note/scale/def for chord(s). """ for c in ln: - if not chords.has_key(c): + try: + print c, ':', chordlist[c][0], chordlist[c][1], chordlist[c][2] + except: error("Chord '%s' is unknown" % c) - print c, ':', chords[c][0], chords[c][1], chords[c][2] + -""" -Table of chord adjustment factors. Since the initial chord is based -on a C scale, we need to shift the chord for different degrees. Note, -that with C as a midpoint we shift left for G/A/B and right for D/E/F. +""" Table of chord adjustment factors. Since the initial chord is based + on a C scale, we need to shift the chord for different degrees. Note, + that with C as a midpoint we shift left for G/A/B and right for D/E/F. -Should the shifts take in account the current key signature? + Should the shifts take in account the current key signature? """ cdAdjust = { @@ -288,14 +289,14 @@ class ChordNotes: ctype='M' try: - notes = chords[ctype][0] + notes = chordlist[ctype][0] adj = cdAdjust[tonic] + octave except: error( "Illegal/Unknown chord name: '%s'" % name ) self.noteList = [ x + adj for x in notes ] self.bnoteList = tuple(self.noteList) - self.scaleList = tuple([ x + adj for x in chords[ctype][1] ]) + self.scaleList = tuple([ x + adj for x in chordlist[ctype][1] ]) self.chordType = ctype self.tonic = tonic self.rootNote = self.noteList[0] @@ -311,11 +312,11 @@ class ChordNotes: # Do inversions if there is a valid slash notation. if slash: - if not cdAdjust.has_key(slash): + try: + r=cdAdjust[slash] # r = -6 to 6 + except KeyError: error("The note '%s' in the slash chord is unknown" % slash) - r=cdAdjust[slash] # r = -6 to 6 - # If the slash note is in the chord we invert # the chord so the slash note is in root position. diff --git a/mma/MMA/chordtable.py b/mma/MMA/chordtable.py index 99b0fe7..ca96a46 100644 --- a/mma/MMA/chordtable.py +++ b/mma/MMA/chordtable.py @@ -53,7 +53,7 @@ A = Bbb= 9 As = Bb = 10 B = Cb = 11 -chords = { +chordlist = { 'M': ((C, E, G ), (C, D, E, F, G, A, B), "Major triad. This is the default and is used in " @@ -399,8 +399,8 @@ chords = { """ Extend our table with common synomyns. These are real copies, -not pointers. This is done so that a user redefine only affects -the original. + not pointers. This is done so that a user redefine only affects + the original. """ aliases = ( @@ -448,14 +448,15 @@ aliases = ( ('9sus', 'sus9', ''), ('9-5', '9b5', ''), ('dim3', 'mb5', 'Diminished triad (non-standard notation).'), - ('omit3(add9)','omit3add9', '') + ('omit3(add9)','omit3add9', ''), + ('9sus4', 'sus9', '') ) for a,b,d in aliases: - n=chords[b][0] - s=chords[b][1] + n=chordlist[b][0] + s=chordlist[b][1] if not d: - d=chords[b][2] + d=chordlist[b][2] - chords[a] = (n, s, d) + chordlist[a] = (n, s, d) diff --git a/mma/MMA/common.py b/mma/MMA/common.py index b50865e..9f79b97 100644 --- a/mma/MMA/common.py +++ b/mma/MMA/common.py @@ -56,29 +56,34 @@ def error(msg): if ln: ln += '\n' - + print "ERROR:%s %s" % (ln, msg) + # Parse though the error message and check for illegal characters. + # Report (first only) if any found. + + for a in msg: + a=ord(a) + if a<0x20 or a >=0x80: + print "Corrupt input file? Illegal character 0x%2x found." % a + break + sys.exit(1) def warning(msg): """ Print warning message and return. """ + if not gbl.noWarn: + ln = "" - if gbl.noWarn: - return + if gbl.lineno >= 0: + ln = "" % gbl.lineno - ln = "" - - if gbl.lineno >= 0: - ln = "" % gbl.lineno - - if gbl.inpath: - ln += "" % gbl.inpath.fname - - print "Warning:%s\n %s" % (ln, msg) + if gbl.inpath: + ln += "" % gbl.inpath.fname + print "Warning:%s\n %s" % (ln, msg) def getOffset(ticks, ran=None): @@ -124,10 +129,13 @@ def stof(s, errmsg=None): try: return float(s) except: - if errmsg: - error(errmsg) - else: - error("Expecting a value, not %s" % s) + try: + return int(s,0) + except: + if errmsg: + error(errmsg) + else: + error("Expecting a value, not %s" % s) @@ -144,15 +152,15 @@ def printList(l): def pextract(s, open, close, onlyone=None): """ Extract a parenthesized set of substrings. - s - original string - open - substring start tag \ can be multiple character - close - substring end tag / strings (ie. "<<" or "-->") - onlyone - optional, if set only the first set is extracted + s - original string + open - substring start tag \ can be multiple character + close - substring end tag / strings (ie. "<<" or "-->") + onlyone - optional, if set only the first set is extracted - returns ( original sans subs, [subs, ...] ) + returns ( original sans subs, [subs, ...] ) - eg: pextract( "x{123}{666}y", '{', '}' ) - Returns: ( 'xy', [ '123', '666' ] ) + eg: pextract( "x{123}{666}y", '{', '}' ) + Returns: ( 'xy', [ '123', '666' ] ) """ @@ -171,3 +179,34 @@ def pextract(s, open, close, onlyone=None): return s.strip(), subs + + +def seqBump(l): + """ Expand/contract an existing sequence list to the current seqSize.""" + + while len(l) < gbl.seqSize: + l += l + return l[:gbl.seqSize] + + + +def lnExpand(ln, msg): + """ Validate and expand a list passed to a set command. """ + + + if len(ln) > gbl.seqSize: + warning("%s list truncated to %s patterns" % (msg, gbl.seqSize) ) + ln = ln[:gbl.seqSize] + + last = None + + for i,n in enumerate(ln): + if n == '/': + if not last: + error ("%s cannot use a '/' as the first item in list." % cmd) + else: + ln[i] = last + else: + last = n + + return ln diff --git a/mma/MMA/docs.py b/mma/MMA/docs.py index d268e2c..8b22fa4 100644 --- a/mma/MMA/docs.py +++ b/mma/MMA/docs.py @@ -26,9 +26,13 @@ Bob van der Poel import os import time +import MMA.midiC +import MMA.grooves + import gbl from MMA.common import * -import MMA.midiC + + def docDrumNames(order): @@ -76,22 +80,22 @@ def docInstNames(order): """ Whenever MMA encounters a DOC command, or if it defines -a groove with DEFGROOVE it calls the docAdd() function. + a groove with DEFGROOVE it calls the docAdd() function. -The saved docs are printed to stdout with the docDump() command. -This is called whenever parse() encounters an EOF. + The saved docs are printed to stdout with the docDump() command. + This is called whenever parse() encounters an EOF. -Both routines are ignored if the -Dx command line option has -not been set. + Both routines are ignored if the -Dx command line option has + not been set. -Storage is done is in the following arrays. + Storage is done is in the following arrays. """ -fname = '' -author="" -notes="" -defs=[] -variables=[] +fname = '' +author = "" +notes = "" +defs = [] +variables = [] def docAuthor(ln): global author @@ -104,7 +108,7 @@ def docNote(ln): global fname, notes - if not gbl.docs or not ln: + if not gbl.createDocs or not ln: return # Grab the arg and data, save it @@ -119,7 +123,7 @@ def docVars(ln): global fname, variables - if not gbl.docs or not ln: + if not gbl.createDocs or not ln: return fname = os.path.basename(gbl.inpath.fname) @@ -129,9 +133,9 @@ def docVars(ln): def docDefine(ln): """ Save a DEFGROOVE comment string. - Entries are stored as a list. Each item in the list is - complete groove def looking like: - defs[ [ Name, Seqsize, Description, [ [TRACK,INST]...]] ...] + Entries are stored as a list. Each item in the list is + complete groove def looking like: + defs[ [ Name, Seqsize, Description, [ [TRACK,INST]...]] ...] """ @@ -149,12 +153,13 @@ def docDefine(ln): defs.append(l) + def docDump(): """ Print the LaTex docs. """ global fname, author, notes, defs, variables - if gbl.docs == 1: # latex docs + if gbl.createDocs == 1: # latex docs if notes: if fname.endswith(gbl.ext): fname='.'.join(fname.split('.')[:-1]) @@ -170,13 +175,21 @@ def docDump(): if defs: for l in defs: - print " \\instable{%s}{%s}{%s}{" % \ - (totex(l[0]), totex(l[2]), l[1] ) + alias = MMA.grooves.getAlias(l[0]) + if alias: + if len(alias)>1: + alias="Aliases: %s" % alias + else: + alias="Alias: %s" % alias + else: + alias='' + print " \\instable{%s}{%s}{%s}{%s}{" % \ + (totex(l[0]), totex(l[2]), l[1], alias) for c,v in l[3:]: print " \\insline{%s}{%s}" % (c.title(), totex(v)) print " }" - - if gbl.docs == 2: # html docs + + if gbl.createDocs == 2: # html docs if notes: print '' % time.ctime() print '' @@ -213,6 +226,13 @@ def docDump(): print '' print ' ' print '
' print '

%s

' % l[0] + alias=MMA.grooves.getAlias(l[0]) + if alias: + if len(alias)>1: + ll="Aliases" + else: + ll="Alias" + print '

%s: %s

' % (ll, alias) print ' %s (%s) ' % ( l[2], l[1] ) print '
' @@ -224,17 +244,54 @@ def docDump(): print '
' print print '' + + if gbl.createDocs == 3: + if notes: + if fname.endswith(gbl.ext): + fname='.'.join(fname.split('.')[:-1]) + print "%s.mma %s" % (fname, notes) + print + + if variables: + print " Variables:" + for l in variables: + print " %s %s" % ( l[0], l[1] ) + print + + if defs: + for l in defs: + print "Groove %s" % l[0].title() + + MMA.grooves.grooveDo(l[0].upper()) + for t in sorted(gbl.tnames): + tr = gbl.tnames[t] + sq = tr.sequence + if sq[0]: + rt = [] + for a in range(gbl.seqSize): + s=sq[a] + x = '{' + tr.formatPattern(sq[a]) + '}' + rt.append(x) + print " %s Sequence %s" % (tr.name, ' '.join(rt)) + if tr.vtype == 'DRUM': + print " %s Tone %s" % (tr.name, + ' '.join([MMA.midiC.valueToDrum(a) for a in tr.toneList])) + else: + print " %s Voice %s" % (tr.name, + ' '.join([MMA.midiC.voiceNames[a] for a in tr.voice])) + + print + defs = [] variables=[] notes = "" author = "" - def totex(s): """ Parse a string and quote tex stuff. - Also handles proper quotation style. + Also handles proper quotation style. """ s = s.replace("$", "\$") @@ -254,3 +311,17 @@ def totex(s): return s + + + +def docVerbose(): + """ Print verbose pattern/sequence info: -Dp command line. """ + + global fname, author, notes, defs, variables + + + defs = [] + variables=[] + notes = "" + author = "" + diff --git a/mma/MMA/file.py b/mma/MMA/file.py index cd0cc0d..6c46f1d 100644 --- a/mma/MMA/file.py +++ b/mma/MMA/file.py @@ -32,11 +32,11 @@ from MMA.common import * def locFile(name, lib): """ Locate a filename. - This checks, in order: - lib/name + .mma - lib/name - name + .mma - name + This checks, in order: + lib/name + .mma + lib/name + name + .mma + name """ ext=gbl.ext @@ -52,7 +52,7 @@ def locFile(name, lib): t=os.path.join(lib, name) if exists(t): return t - + if not name.endswith(ext): t = name + ext if exists(t): @@ -73,7 +73,7 @@ class ReadFile: class FileData: """ After reading the file in bulk it is parsed and stored in this - data structure. Blanks lines and comments are removed. + data structure. Blanks lines and comments are removed. """ def __init__(self, lnum, data, label): @@ -97,7 +97,6 @@ class ReadFile: try: inpath = file(fname, 'r') - except: error("Unable to open '%s' for input" % fname) @@ -107,7 +106,6 @@ class ReadFile: self.fname = fname """ Read entire file, line by line: - - strip off blanks, comments - join continuation lines - parse out LABELS @@ -131,11 +129,18 @@ class ReadFile: if not l: continue + # join lines ending in '\' (the strip() makes this the last char + while l[-1] == '\\': l = l[0:-1] + ' ' + inpath.readline().strip() lcount +=1 + """ input cleanup ... for now the only cleanup is to convert + 0xa0 (non-breakable space) to 0x20 (regular space). + """ + l=l.replace('\xa0', '\x20') + """ This next line splits the line at the first found comment '//', drops the comment, and splits the remaining line into tokens using whitespace delimiters. @@ -200,6 +205,7 @@ class ReadFile: else: label = None + # Save the line, linenumber and (maybe) the label. fdata.append( dataStore(lcount, l, label)) @@ -222,15 +228,15 @@ class ReadFile: def goto(self, l): """ Do a goto jump. - This isn't perfect, but is probably the way most GOTOs work. If - inside a repeat/if then nothing more is processed. The jump is - immediate. Of course, you'll run into problems with missing - repeat/repeatend if you try it. Since all repeats are stacked - back into the que, we just delete the que. Then we look for a - matching label in the file line array. + This isn't perfect, but is probably the way most GOTOs work. If + inside a repeat/if then nothing more is processed. The jump is + immediate. Of course, you'll run into problems with missing + repeat/repeatend if you try it. Since all repeats are stacked + back into the que, we just delete the que. Then we look for a + matching label in the file line array. - Label search is linear. Not too efficient, but the lists - will probably never be that long either. + Label search is linear. Not too efficient, but the lists + will probably never be that long either. """ @@ -251,13 +257,13 @@ class ReadFile: def push(self, q, nums): """ Push a list of lines back into the input stream. - Note: This is a list of semi-processed lines, no comments, etc. + Note: This is a list of semi-processed lines, no comments, etc. - It's quicker to extend a list than to insert, so add to the end. - Note: we reverse the original, extend() then reverse again, just - in case the caller cares. + It's quicker to extend a list than to insert, so add to the end. + Note: we reverse the original, extend() then reverse again, just + in case the caller cares. - nums is a list of linenumbers. Needed to report error lines. + nums is a list of linenumbers. Needed to report error lines. """ if not self.que: @@ -276,8 +282,8 @@ class ReadFile: def read(self): """ Return a line. - This will return either a queued line or a line from the - file (which was stored/processed earlier). + This will return either a queued line or a line from the + file (which was stored/processed earlier). """ while 1: diff --git a/mma/MMA/gbl.py b/mma/MMA/gbl.py index 4a22d18..6ca4cb6 100644 --- a/mma/MMA/gbl.py +++ b/mma/MMA/gbl.py @@ -24,7 +24,7 @@ Bob van der Poel import os -version = "1.1" # Version -- March 7/2007 +version = "1.4" # Version -- Sept/2008 """ mtrks is storage for the MIDI data as it is created. It is a dict of class Mtrk() instances. Keys are the @@ -56,7 +56,7 @@ for c in range(0,17): is inc/decremented. """ -midiAvail=[ 0 ] * 17 # slots 0..16, slot 0 is not used. +midiAvail = [ 0 ] * 17 # slots 0..16, slot 0 is not used. deletedTracks = [] # list of deleted tracks for -c report @@ -64,28 +64,14 @@ deletedTracks = [] # list of deleted tracks for -c report are names, data is a channel. Eg. midiChPrefs['BASS-SUS']==9 """ -midiChPrefs={} +midiChPrefs = {} - -""" Groove storage. Each entry in settingsGroove{} has a keyname - of a saved groove. - - lastGroove and currentGroove are used by macros +""" Is the -T option is used only the tracks in this list + are generated. All other tracks are muted (OFF) """ -settingsGroove = {} -lastGroove = '' -currentGroove = '' - - -""" SeqRnd variable is a list. The first entry is a flag:(0, 1 or x): - 0 - not set - 1 - set - 2 - set for specific tracks, track list starts at position [1] -""" - -seqRnd = [0] # set if SEQRND has been set +muteTracks = [] ############# String constants #################### @@ -98,28 +84,31 @@ ext = ".mma" # extension for song/lib files. BperQ = 192 # midi ticks per quarter note -QperBar = 4 # Beats/bar, set with TIME -tickOffset = 0 # offset of current bar in ticks +QperBar = 4 # Beats/bar, set with TIME +tickOffset = 0 # offset of current bar in ticks tempo = 120 # current tempo -seqSize = 1 # variation sequence table size -seqCount = 0 # running count of variation +seqSize = 1 # variation sequence table size +seqCount = 0 # running count of variation -transpose = 0 # Transpose is global (ignored by drum tracks) +totTime = 0.0 # running duration count in seconds -lineno = -1 # used for error reporting +transpose = 0 # Transpose is global (ignored by drum tracks) -swingMode = 0 # defaults to 0, set to 1 for swing mode -swingSkew = None # this is just for $_SwingMode macro +lineno = -1 # used for error reporting -barNum = 0 # Current line number +swingMode = 0 # defaults to 0, set to 1 for swing mode +swingSkew = None # this is just for $_SwingMode macro + +barNum = 0 # Current line number + +synctick = 0 # flag, set if we want a tick on all tracks at offset 0 +endsync = 0 # flag, set if we want a eof sync -synctick = 0 # flag, set if we want a tick on all tracks at offset 0 ############# Path and search variables. ############# - libPath = '' -for p in ( "c:\\mma\\lib", "/usr/local/share/mma/lib", "/usr/share/mma/lib", "./lib"): +for p in ( "c:\\mma\\lib", "/usr/local/share/mma/lib", "/usr/share/mma/lib", "./lib"): if os.path.isdir(p): libPath=p break @@ -139,8 +128,8 @@ mmaEnd = [] # list of END files mmaRC = None # user specified RC file, overrides defaults inpath = None # input file -midiFileType = 1 # type 1 file, SMF command can change to 0 -runningStatus = 1 # running status enabled +midiFileType = 1 # type 1 file, SMF command can change to 0 +runningStatus = 1 # running status enabled ############# Options. ############# @@ -163,9 +152,11 @@ chshow = Lchshow = 0 outfile = None infile = None -docs = 0 +createDocs = 0 maxBars = 500 makeGrvDefs = 0 cmdSMF = None +playFile = 0 # set if we want to call a player +midiPlayer = "aplaymidi" diff --git a/mma/MMA/grooves.py b/mma/MMA/grooves.py new file mode 100644 index 0000000..7360a62 --- /dev/null +++ b/mma/MMA/grooves.py @@ -0,0 +1,448 @@ + +# grooves.py + + +""" +This module is an integeral part of the program +MMA - Musical Midi Accompaniment. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Bob van der Poel + +""" + + +""" Groove storage. Each entry in glist{} has a keyname + of a saved groove. + + lastGroove and currentGroove are used by macros +""" + +import os + + +import MMA.midi +import MMA.notelen +import MMA.auto +import MMA.volume +import MMA.parse +import MMA.seqrnd +import MMA.docs + +import gbl +from MMA.common import * + + +glist = {} +aliaslist = {} + +lastGroove = '' # name of the last groove (used by macros) +currentGroove = '' # name of current groove (used by macros) + +""" groovesList[] holds a list of grooves to use when the + groove command is used with several args. ie, when + we use either: + + Groove 2 groove1 groove2 groove3 + or + Groove groove1 groove2 groove3 + + in both cases, the names of the grooves are stored in groovesList[] +""" + +groovesList = None +groovesCount = 0 + +def grooveDefine(ln): + """ Define a groove. + + Current settings are assigned to a groove name. + """ + + if not len(ln): + error("Use: DefGroove Name") + + slot=ln[0].upper() + + # Slot names can't contain a '/' (reserved) or be an integer (used in groove select). + + if '/' in slot: + error("The '/' is not permitted in a groove name") + + if slot.isdigit(): + error("Invalid slot name '%s'. Cannot be only digits" % slot) + + if slot in aliaslist: + error("Can't define groove name %s, already defined as an alias for %s." \ + % (slot, aliaslist[slot])) + + grooveDefineDo(slot) + + if gbl.debug: + print "Groove settings saved to '%s'." % slot + + if gbl.makeGrvDefs: + MMA.auto.updateGrooveList(slot) + + if len(ln) > 1: + MMA.docs.docDefine(ln) + + +def grooveDefineDo(slot): + + for n in gbl.tnames.values(): + n.saveGroove(slot) + + glist[slot] = { + 'SEQSIZE': gbl.seqSize, + 'SEQRNDWT': MMA.seqrnd.seqRndWeight[:], + 'QPERBAR': gbl.QperBar, + 'SEQRND': MMA.seqrnd.seqRnd[:], + 'TIMESIG': MMA.midi.timeSig.get(), + '81': MMA.notelen.noteLenTable['81'], + '82': MMA.notelen.noteLenTable['82'], + 'SWINGMODE': gbl.swingMode , + 'SWINGSKEW': gbl.swingSkew, + 'VRATIO': (MMA.volume.vTRatio, MMA.volume.vMRatio)} + + +def grooveAlias(ln): + """ Create an alias name for an existing groove. """ + + global aliaslist + + if len(ln) != 2: + error("GrooveAlias needs exactly 2 args: GrooveName AliasName.") + + a = ln[0].upper() + g = ln[1].upper() + + if not g in glist: + error("GrooveAlias: Groove %s has not been defined." % ln[0]) + + aliaslist[a]=g + + +def groove(ln): + """ Select a previously defined groove. """ + + global groovesList, groovesCount, lastGroove, currentGroove + + if not ln: + error("Groove: needs agrument(s)") + + + tmpList =[] + + if ln[0].isdigit(): + wh=stoi(ln[0]) + if wh<1: + error("Groove selection must be > 0, not '%s'" % wh) + ln=ln[1:] + else: + wh = None + + for slot in ln: + slot = slot.upper() + if slot == "/": + if len(tmpList): + slot=tmpList[-1] + else: + error("A previous groove name is needed before a '/'") + + if not slot in glist: # convert alias to real groove name + for a,r in aliaslist.iteritems(): + if slot == a: + slot = r + break + + if not slot in glist: + if gbl.debug: + print "Groove '%s' not defined. Trying auto-load from libraries" \ + % slot + + l=MMA.auto.loadGrooveDir(slot) # name of the lib file with groove + + if l: + if gbl.debug: + print "Attempting to load groove '%s' from '%s'." % (slot, l) + + reportFutureVols() + + MMA.parse.usefile([os.path.join(gbl.autoLib, l)]) + + if not slot in glist: + error("Groove '%s' not found. Have libraries changed " + "since last 'mma -g' run?" % slot) + + else: + error("Groove '%s' could not be found in memory or library files" % slot ) + + tmpList.append(slot) + + if not len(tmpList): + error("Use: Groove [selection] Name [...]") + + """ If the first arg to list was an int() (ie: 3 groove1 groove2 grooveFoo) + we select from the list. After the selection, we reset the list to be + just the selected entry. This was, if there are multiple groove names without + a leading int() we process the list as groove list changing with each bar. + """ + + if wh: + wh = (wh-1) % len(tmpList) + tmpList=tmpList[wh:wh+1] + + slot=tmpList[0] + grooveDo(slot) + + groovesCount = 0 + if len(tmpList)==1: + groovesList=None + else: + groovesList=tmpList + + lastGroove = currentGroove + currentGroove = slot + if lastGroove == '': + lastGroove = slot + + if gbl.debug: + print "Groove settings restored from '%s'." % slot + +def grooveDo(slot): + """ This is separate from groove() so we can call it from + usefile() with a qualified name. """ + + reportFutureVols() + + oldSeqSize = gbl.seqSize + + g=glist[slot] + + gbl.seqSize = g['SEQSIZE'] + MMA.seqrnd.seqRndWeight = g['SEQRNDWT'] + gbl.QperBar = g['QPERBAR'] + MMA.seqrnd.seqRnd = g['SEQRND'] + MMA.midi.timeSig.set( *g['TIMESIG']) # passing tuple as 2 args. + MMA.notelen.noteLenTable['81'] = g['81'] + MMA.notelen.noteLenTable['82'] = g['82'] + gbl.swingMode = g['SWINGMODE'] + gbl.swingSkew = g['SWINGSKEW'] + MMA.volume.vTRatio, MMA.volume.vMRatio = g['VRATIO'] + + for n in gbl.tnames.values(): + n.restoreGroove(slot) + + """ This is important! Tracks NOT overwritten by saved grooves way + have the wrong sequence length. I don't see any easy way to hit + just the unchanged/unrestored tracks so we do them all. + Only done if a change in seqsize ... doesn't take long to be safe. + """ + + if oldSeqSize != gbl.seqSize: + for a in gbl.tnames.values(): + a.setSeqSize() + + MMA.seqrnd.seqRndWeight = seqBump(MMA.seqrnd.seqRndWeight) + + gbl.seqCount = 0 + +def reportFutureVols(): + """ Print warning for pending track cresendos. + + We need a seperate func here since the groove() may + parse a new file, which will clear out data before + getting to grooveDo(). + + Note that the test is for more that one trailing future volume. + This is deliberate ... a construct like: + + Chord Cresc ff 1 + ..somechord + Groove NEW + + will leave a future volume on the stack. + """ + + volerrs=[] + for n in gbl.tnames.values(): + if len(n.futureVols)>1: + volerrs.append(n.name) + n.futureVols = [] # don't want leftover future vols a track level! + + if volerrs: + volerrs.sort() + warning("Pending (de)Cresc in %s." % ', '.join(volerrs)) + +def grooveClear(ln): + """ Delete all previously loaded grooves from memory.""" + + global groovesList, groovesCount, glist, lastGroove, currentGroove, aliaslist + + if ln: + error("GrooveClear does not have any arguments.") + + groovesList = {} + aliaslist = {} + groovesCount = 0 + + try: + a= glist[gmagic] + except: + a=None + + glist={} + + if a: + glist[gmagic]=a + + lastGroove = '' + currentGroove = '' + + + if gbl.debug: + print "All grooves deleted." + + + +def nextGroove(): + """ Handle groove lists. Called from parse(). + + If there is more than 1 entry in the groove list, + advance (circle). We don't have to qualify grooves + since they were verified when this list was created. + groovesList==None if there is only one groove (or none). + """ + + global lastGroove, currentGroove, groovesCount + + if groovesList: + groovesCount += 1 + if groovesCount > len(groovesList)-1: + groovesCount = 0 + slot = groovesList[groovesCount] + + if slot != currentGroove: + grooveDo(slot) + + lastGroove = currentGroove + currentGroove = slot + + if gbl.debug: + print "Groove (list) setting restored from '%s'." % slot + + +def trackGroove(name, ln): + """ Select a previously defined groove for a single track. """ + + if len(ln) != 1: + error("Use: %s Groove Name" % name) + + slot = ln[0].upper() + + if not slot in glist: # convert alias to real groove name + for a,r in aliaslist.iteritems(): + if slot == a: + slot = r + break + + if not slot in glist: + error("Groove '%s' not defined" % slot) + + g=gbl.tnames[name] + g.restoreGroove(slot) + + if g.sequence == [None] * len(g.sequence): + warning("'%s' Track Groove has no sequence. Track name error?" % name) + + g.setSeqSize() + + if gbl.debug: + print "%s Groove settings restored from '%s'." % (name, slot) + + + +def getAlias(al): + """ This is used by the library doc printer to get a list aliases. """ + + + al=al.upper() + l=[] + + for a,r in aliaslist.iteritems(): + if al == r: + l.append(a.title()) + + + return ', '.join(l) + + + +def allgrooves(ln): + """ Apply a command to all currently defined grooves. """ + + if not ln: + error("OverRide: requires a directive.") + + + origSlot = MMA.parse.gmagic # save the current groove + grooveDefineDo(origSlot) + + action = ln[0].upper() + if len(ln)>1: + trAction = ln[1].upper() + else: + trAction = '' + + sfuncs = MMA.parse.simpleFuncs + tfuncs = MMA.parse.trackFuncs + + counter = 0 + + for g in glist: + grooveDo(g) + + if action in sfuncs: + sfuncs[action](ln[1:]) + counter += 1 + continue + + if len(ln) < 2: + error("AllGrooves: No command for assumed trackname %s." % action) + + name=action + + if not name in gbl.tnames: + continue + + if trAction in tfuncs: + tfuncs[trAction](name, ln[2:]) + counter += 1 + else: + error ("AllGrooves: Not a command: '%s'" % ' '.join(ln)) + + grooveDefineDo(g) # store the change!!! + + grooveDo(origSlot) # restore groove + + if not counter: + warning("No tracks affected with '%s'" % ' '.join(ln)) + + else: + if gbl.debug: + print "AllGrooves: %s tracks modified." % counter + diff --git a/mma/MMA/harmony.py b/mma/MMA/harmony.py index 2ef8188..77e98da 100644 --- a/mma/MMA/harmony.py +++ b/mma/MMA/harmony.py @@ -90,16 +90,16 @@ def harmonize(hmode, note, chord): def gethnote(note, chord): """ Determine harmony notes for a note based on the chord. - note - midi value of the note + note - midi value of the note - chord - list of midi values for the chord + chord - list of midi values for the chord - This routine works by creating a chord list with all - its notes having a value less than the note (remember, this - is all MIDI values). We then grab notes from the end of - the chord until one is found which is less than the original - note. + This routine works by creating a chord list with all + its notes having a value less than the note (remember, this + is all MIDI values). We then grab notes from the end of + the chord until one is found which is less than the original + note. """ wm="No harmony note found since no chord, using note " + \ diff --git a/mma/MMA/lyric.py b/mma/MMA/lyric.py index 878f3d1..e53ad73 100644 --- a/mma/MMA/lyric.py +++ b/mma/MMA/lyric.py @@ -252,35 +252,37 @@ class Lyric: if self.dupchords: ly = [] + for v in ln.split(): # do each chord symbol or '/' mark - for v in ln.split(): - v = v.replace('&', 'b') - if v == 'z': - v = 'N.C.' - if 'z' in v: - v = v.split('z')[0] - while v.startswith('-'): - v=v[1:] - while v.startswith('+'): - v=v[1:] + if v != '/': + v = v.replace('&', 'b') # remember, "&" is optional + + if v == 'z' or v == 'z!': # convert plain z to "NC" + v = 'N.C.' - if self.transpose: - tr=0 # Needed in case line is invalid! - cn=v[0:2] - if self.chordnames.has_key(cn): - tr=self.chordnames[cn] + self.transpose + if 'z' in v: # strip out the 'zCDA..' after the chord + v = v.split('z')[0] + + v = v.lstrip("+-") # strip off leading "+" and "-" + + if self.transpose: # transpose will be set to 0, 1, -1, etc. + t=None # Needed in case line is not a chord ('/', "NC")! + + try: # try for 2 char chord name (F#, Gb, etc) + cn=v[0:2] + t=self.chordnames[cn] + self.transpose + except: + try: # try 1 char chord name (C, D, etc) + cn=v[0:1] + t=self.chordnames[cn] + self.transpose + except: + pass # not a chord pitch - else: - cn=v[0:1] - if self.chordnames.has_key(cn): - tr=self.chordnames[cn] + self.transpose - - while tr>=12: tr-=12 - while tr<=-12: tr+=12 - - if tr: - v = self.transNames[self.transKey][tr] + v[len(cn):] + if t != None: # use None, 0 is okay + while t>=12: t-=12 + while t<=-12: t+=12 + v = self.transNames[self.transKey][t] + v[len(cn):] ly.append(v) diff --git a/mma/MMA/macro.py b/mma/MMA/macro.py index 91eab54..3066ee1 100644 --- a/mma/MMA/macro.py +++ b/mma/MMA/macro.py @@ -26,18 +26,21 @@ class. At the top of MMAparse an instance in created with something like: macros=MMMmacros.Macros(). """ -import gbl -from MMA.common import * -from MMA.notelen import getNoteLen +import random + import MMA.midiC -import MMA.lyric import MMA.translate import MMA.patSolo import MMA.patAria import MMA.volume -import MMA.notelen +import MMA.grooves +import MMA.parse +import MMA.seqrnd -import random +import gbl +from MMA.lyric import lyric +from MMA.common import * +from MMA.safe_eval import safe_eval class Macros: @@ -90,15 +93,15 @@ class Macros: return str(int(MMA.volume.lastVolume * 100)) elif s == 'GROOVE': - return gbl.currentGroove + return MMA.grooves.currentGroove elif s == 'LASTGROOVE': - return gbl.lastGroove + return MMA.grooves.lastGroove elif s == 'SEQRND': - if gbl.seqRnd[0] == 0: return "Off" - if gbl.seqRnd[0] == 1: return "On" - return ' '.join(gbl.seqRnd[1:]) + if MMA.seqrnd.seqRnd[0] == 0: return "Off" + if MMA.seqrnd.seqRnd[0] == 1: return "On" + return ' '.join(MMA.seqrnd.seqRnd[1:]) elif s == 'SEQSIZE': return str(gbl.seqSize) @@ -141,7 +144,7 @@ class Macros: return ' '.join([str(x) for x in MMA.midi.splitChannels]) elif s == 'SEQRNDWEIGHT': - return ' '.join([str(x) for x in MMA.parse.seqRndWeight]) + return ' '.join([str(x) for x in MMA.seqrnd.seqRndWeight]) elif s == 'AUTOLIBPATH': return gbl.autoLib @@ -168,7 +171,7 @@ class Macros: return str(gbl.lineno) elif s == 'LYRIC': - return MMA.lyric.lyric.setting() + return lyric.setting() # Track vars ... these are in format TRACKNAME_VAR @@ -179,10 +182,10 @@ class Macros: tname = s[:a] func = s[a+1:] - if gbl.tnames.has_key(tname): + try: t=gbl.tnames[tname] - else: - error("System variable $_%s refers to nonexistent track" % s) + except: + error("System variable $_%s refers to nonexistent track." % s ) if func == 'ACCENT': @@ -246,6 +249,12 @@ class Macros: elif func == 'RVOLUME': return ' '.join([str(int(a * 100)) for a in t.rVolume]) + + elif func == 'SEQUENCE': + tmp = [] + for a in range(gbl.seqSize): + tmp.append('{' + t.formatPattern(t.sequence[a]) + '}') + return ' '.join(tmp) elif func == 'SEQRND': if t.seqRnd: return 'On' @@ -271,7 +280,8 @@ class Macros: return ' '.join([str(x) for x in t.unify]) elif func == 'VOICE': - return ' '.join([MMA.midiC.voiceNames[a] for a in t.voice]) + return ' '.join([MMA.midiC.valueToInst(a) for a in t.voice]) + elif func == 'VOICING': if t.vtype != 'CHORD': @@ -287,7 +297,6 @@ class Macros: error("Unknown system track variable %s" % s) - def expand(self, l): """ Loop though input line and make variable subsitutions. MMA variables are pretty simple ... any word starting @@ -301,23 +310,36 @@ class Macros: if not self.expandMode: return l + gotmath=0 + while 1: # Loop until no more subsitutions have been done sub=0 + for i,s in enumerate(l): - if s[:2] == '$$': - continue - if s[0]=='$': - s=s[1:].upper() - if s.startswith('_'): + s = s[1:].upper() + frst = s[0] + + if frst == '$': # $$ - don't expand (done in IF clause) + continue + + elif frst == '(': # flag math macro + gotmath = 1 + continue + + # we have a var, see if system or user. Set 'ex' + + elif frst == '_': # system var ex=self.sysvar(s[1:]) + + + elif s in self.vars: # user var? + ex = self.vars[s] - elif not s in self.vars: + else: # unknown var...error error("User variable '%s' has not been defined" % s ) - else: - ex=self.vars[s] if type(ex) == type([]): # MSET variable if len(ex): @@ -336,6 +358,35 @@ class Macros: if not sub: break + # all the mma internal and system macros are expanded. Now check for math. + + if gotmath: + l = ' '.join(l) # join back into one line + + while 1: + try: + s1 = l.index('$(') # any '$(' left? + except: + break # nope, done + # find trailing ) + nest=0 + s2 = s1+2 + max = len(l) + while 1: + if l[s2] == '(': nest+=1 + if l[s2] == ')': + if not nest: + break + else: + nest-=1 + s2 += 1 + if s2 >= max: + error("Unmatched delimiter in '%s'." % l) + + l = l[:s1] + str(safe_eval( l[s1+2:s2].strip())) + l[s2+1:] + + l=l.split() + return l @@ -567,6 +618,7 @@ class Macros: l=l.upper() if l[:2] == '$$': + l=l.upper() l=l[2:] if not l in self.vars: error("String Variable '%s' does not exist" % l) @@ -575,9 +627,12 @@ class Macros: try: v=float(l) except: - v=None + try: + v=int(l,0) # this lets us convert HEX/OCTAL + except: + v=None - return ( l, v ) + return ( l.upper(), v ) def readblk(): @@ -626,9 +681,9 @@ class Macros: retpoint = 2 if action == 'DEF': - compare = self.vars.has_key(v) + compare = v in self.vars elif action == 'NDEF': - compare = ( not self.vars.has_key(v)) + compare = ( v not in self.vars ) else: error("Unreachable unary conditional") @@ -693,4 +748,19 @@ class Macros: gbl.inpath.push( q, qnum ) + +def domath(s): + """ A simple math factoring func. Just does add, sub, mult, divide. """ + print '>>>',s + s = ' '.join(s) + + try: + s = eval(s) + + except: + error("Error in '%s' expression." % s) + print s + return str(s) + + macros = Macros() diff --git a/mma/MMA/main.py b/mma/MMA/main.py index cb11f3d..c63f92d 100644 --- a/mma/MMA/main.py +++ b/mma/MMA/main.py @@ -24,14 +24,19 @@ Bob van der Poel """ import os +import time + +import MMA.midi +import MMA.parse +import MMA.file +import MMA.options +import MMA.auto +import MMA.docs + import gbl from MMA.common import * -import MMA.midi -import MMA.docs -import MMA.parse -from MMA.file import locFile from MMA.lyric import lyric -import MMA.options + ######################################## ######################################## @@ -66,37 +71,36 @@ m.addTrkName(0, 'MetaTrack') m.addTempo(0, gbl.tempo) MMA.parse.setTimeSig(['4','4']) # most stdlib files will override this - ##################################### # Read an RC file. All found files are processed. -docOption = gbl.docs # Disable doc printing for RC file -gbl.docs = 0 +docOption = gbl.createDocs # Disable doc printing for RC file +gbl.createDocs = 0 -rcread=0 +#rcread=0 rcfiles = ('mmarc', 'c:\\mma\\mmarc', '~/.mmarc', '/usr/local/etc/mmarc', '/etc/mmarc' ) if gbl.mmaRC: rcfiles = [ gbl.mmaRC ] for i in rcfiles: - f = locFile(i, None) + f = MMA.file.locFile(i, None) if f: if gbl.showrun: print "Reading RC file '%s'" % f MMA.parse.parseFile(f) - rcread+=1 + #rcread+=1 break else: if gbl.mmaRC: error("Specified init file '%s' not found" % gbl.mmaRC) -if not rcread: +else: #if not rcread: gbl.lineno = -1 warning("No RC file was found or processed") -gbl.docs = docOption # Restore doc options +gbl.createDocs = docOption # Restore doc options ################################################ @@ -106,8 +110,7 @@ gbl.docs = docOption # Restore doc options if gbl.makeGrvDefs: if gbl.infile: error("No filename is permitted with the -g option") - from MMA.auto import libUpdate - libUpdate() # update and EXIT + MMA.auto.libUpdate() # update and EXIT ################################ @@ -124,7 +127,7 @@ gbl.mtrks[0].addText(0, "Input filename: %s" % gbl.infile) # Just extract docs (-Dx) to stdout. if docOption: - f=locFile(gbl.infile, None) + f=MMA.file.locFile(gbl.infile, None) if not f: error("File '%s' not found" % gbl.infile) MMA.parse.parseFile(f) @@ -146,15 +149,19 @@ if gbl.cmdSMF: # 1. strip off the extension if it is .mma, # 2. append .mid +if gbl.playFile and gbl.outfile: + error("You cannot use the -f option with -P") + if gbl.outfile: outfile = gbl.outfile +elif gbl.playFile: + outfile = "MMAtmp%s.mid" % os.getpid() else: outfile, ext = os.path.splitext(gbl.infile) if ext != gbl.ext: outfile=gbl.infile outfile += '.mid' - outfile=os.path.expanduser(outfile) @@ -164,7 +171,7 @@ outfile=os.path.expanduser(outfile) # First the mmastart files for f in gbl.mmaStart: - fn = locFile(f, gbl.incPath) + fn = MMA.file.locFile(f, gbl.incPath) if not fn: warning("MmaStart file '%s' not found/processed" % fn) MMA.parse.parseFile(fn) @@ -172,7 +179,8 @@ for f in gbl.mmaStart: # The song file specified on the command line -f = locFile(gbl.infile, None) + +f = MMA.file.locFile(gbl.infile, None) if not f: gbl.lineno = -1 @@ -183,12 +191,11 @@ MMA.parse.parseFile(f) # Finally, the mmaend files for f in gbl.mmaEnd: - fn = locFile(f, None) + fn = MMA.file.locFile(f, None) if not fn: warning("MmaEnd file '%s' not found/processed" % f) MMA.parse.parseFile(fn) - ################################################# # Just display the channel assignments (-c) and exit... @@ -253,6 +260,7 @@ if gbl.noOutput: gbl.lineno=-1 # disable line nums for error/warning + """ We fix the outPath now. This lets you set outpath in the song file. The filename "outfile" was created above. It is either the input filename @@ -270,7 +278,7 @@ gbl.lineno=-1 # disable line nums for error/warning otherwise it is inserted before the filename portion. """ -if (not outfile.startswith('/')) and gbl.outPath and (not gbl.outfile): +if (not outfile.startswith('/')) and gbl.outPath and not gbl.outfile and not gbl.playFile: if gbl.outPath[0] in '.\\/': outfile = "%s/%s" % (gbl.outPath, outfile) else: @@ -288,6 +296,7 @@ for n in gbl.tnames.values(): if n.channel: n.doMidiClear() n.clearPending() + n.doChannelReset() if n.riff: warning("%s has pending Riff(s)" % n.name) @@ -317,7 +326,7 @@ if fileExist: print "Overwriting existing", else: print "Creating new", -print "midi file (%s bars): '%s'" % (gbl.barNum, outfile) +print "midi file (%s bars, %.2f min): '%s'" % (gbl.barNum, gbl.totTime, outfile) try: out = file(outfile, 'wb') @@ -327,6 +336,15 @@ except: MMA.midi.writeTracks(out) out.close() +if gbl.playFile: + print "Playing %s with %s" % (outfile, gbl.midiPlayer) + t=time.time() + os.system("%s %s" % (gbl.midiPlayer, outfile)) + os.remove(outfile) + print "Play complete (%.2f min), file has been deleted." % ((time.time()-t)/60) + if gbl.debug: print "Completed processing file '%s'." % outfile + + diff --git a/mma/MMA/mdefine.py b/mma/MMA/mdefine.py index ebc6028..bc4fb89 100644 --- a/mma/MMA/mdefine.py +++ b/mma/MMA/mdefine.py @@ -26,9 +26,12 @@ the sequences for later recall. """ +import MMA.midiC + import gbl from MMA.common import * -import MMA.midiC + + class Mdefine: def __init__(self): diff --git a/mma/MMA/midi.py b/mma/MMA/midi.py index e3c9fd9..329a65d 100644 --- a/mma/MMA/midi.py +++ b/mma/MMA/midi.py @@ -22,15 +22,15 @@ Bob van der Poel """ - - -import gbl -from MMA.common import * from MMA.midiM import intToWord, intTo3Byte, intToLong, intToVarNumber import MMA.midiC +import gbl +from MMA.common import * + splitChannels = [] + def setSplitChannels(ln): """ Parser routine, sets up list of track to split. Overwrites existing. """ @@ -39,10 +39,10 @@ def setSplitChannels(ln): splitChannels = [] for a in ln: - c = stoi(a) - if c < 1 or c >16: - error("SplitChannels: Expecting value 1 to 16, not %s" % c) - splitChannels.append(c) + a = stoi(a) + if a < 1 or a >16: + error("SplitChannels: Expecting value 1 to 16, not %s" % a) + splitChannels.append(a) if gbl.debug: print "SplitChannels: ", @@ -106,15 +106,16 @@ def writeTracks(out): def writeSplitTrack(channel, out): - """ Split a drum track into a separate track for the non-note - stuff and then a track for each note. + """ Split a track. In drum tracks this puts different instruments + into individual tracks (useful!); for instrument tracks it puts + each pitch into a track (probably not useful). """ tr = gbl.mtrks[channel].miditrk # track to split """ A dict to store the split midi tracks. We'll end out with a track for each pitch which appears in the track and - a track (labeled -1) to store every other than note on data. + a track (labeled -1) to store every other-than-note-on data. """ notes={} @@ -130,7 +131,7 @@ def writeSplitTrack(channel, out): else: n = -1 # special value for non-note on events - if not notes.has_key(n): # create a new mtrk if needed + if not n in notes: # create a new mtrk if needed notes[n]=Mtrk(10) if offset in notes[n].miditrk: # copy event to new track @@ -149,7 +150,7 @@ def writeSplitTrack(channel, out): if channel == 10: m = "%s" % MMA.midiC.valueToDrum(a) else: - m= "%s-%s" % (gbl.mtrks[channel].trackname, a) + m = "%s-%s" % (gbl.mtrks[channel].trackname, a) notes[a].addTrkName(0, m) @@ -166,8 +167,7 @@ def writeSplitTrack(channel, out): def mkHeader(count, tempo, Mtype): - return "MThd" + intToLong(6) + intToWord(Mtype) + \ - intToWord(count) + intToWord(tempo) + return "MThd" + intToLong(6) + intToWord(Mtype) + intToWord(count) + intToWord(tempo) """ Midi track class. All the midi creation is done here. @@ -188,7 +188,7 @@ class Mtrk: tr=self.miditrk lg=len(cmd) - if tr.has_key(offset): + if offset in tr: for i,a in enumerate(tr[offset]): if a[0:lg] == cmd: del tr[offset][i] @@ -221,11 +221,13 @@ class Mtrk: self.delDup(offset, cmd) self.addToTrack(offset, cmd + chr(0x02) + chr(n) + chr(mi) ) + def addMarker(self, offset, msg): """ Create a midi MARKER event.""" self.addToTrack(offset, chr(0xff) + chr(0x06) + intToVarNumber(len(msg)) + msg ) + def addText(self, offset, msg): """ Create a midi TextEvent.""" @@ -251,16 +253,25 @@ class Mtrk: self.addToTrack(offset, cmd + intToVarNumber(len(msg)) + msg ) - def addProgChange( self, offset, program): - """ Create a midi program change. + def addProgChange( self, offset, program, oldprg): + """ Create a midi program change (handles extended voicing). - program - midi program - - Returns - packed string + program - The MIDI program (voice) value + oldprg - existing MIDI program """ - self.addToTrack(offset, - chr(0xc0 | self.channel) + chr(program) ) + v1, lsb1, msb1 = MMA.midiC.voice2tup(oldprg) + v2, lsb2, msb2 = MMA.midiC.voice2tup(program) + + if msb1 != msb2: # only if CTRL32 has changed + self.addToTrack(offset, chr(0xb0 | self.channel) + chr(0x20) + chr(msb2) ) + + if lsb1 != lsb2: # only if CTRL0 has changed + self.addToTrack(offset, chr(0xb0 | self.channel) + chr(0x00) + chr(lsb2) ) + + # Always do voice change. Maybe not necessary, but let's be safe. + + self.addToTrack(offset, chr(0xc0 | self.channel) + chr(v2) ) def addGlis(self, offset, v): @@ -272,22 +283,17 @@ class Mtrk: """ if v == 0: - self.addToTrack(offset, - chr(0xb0 | self.channel) + chr(0x41) + chr(0x00) ) + self.addToTrack(offset, chr(0xb0 | self.channel) + chr(0x41) + chr(0x00) ) else: - self.addToTrack(offset, - chr(0xb0 | self.channel) + chr(0x41) + chr(0x7f) ) - self.addToTrack(offset, - chr(0xb0 | self.channel) + chr(0x05) + chr(v) ) - + self.addToTrack(offset, chr(0xb0 | self.channel) + chr(0x41) + chr(0x7f) ) + self.addToTrack(offset, chr(0xb0 | self.channel) + chr(0x05) + chr(v) ) def addPan(self, offset, v): """ Set the lsb of the pan setting.""" - self.addToTrack(offset, - chr(0xb0 | self.channel) + chr(0x0a) + chr(v) ) + self.addToTrack(offset, chr(0xb0 | self.channel) + chr(0x0a) + chr(v) ) def addCtl(self, offset, l): @@ -316,9 +322,9 @@ class Mtrk: def addTempo(self, offset, beats): """ Create a midi tempo meta event. - beats - beats per second + beats - beats per second - Return - packed midi string + Return - packed midi string """ cmd = chr(0xff) + chr(0x51) @@ -329,11 +335,26 @@ class Mtrk: def writeMidiTrack(self, out): """ Create/write the MIDI track. - We convert timing offsets to midi-deltas. + We convert timing offsets to midi-deltas. """ tr=self.miditrk + """ If the -1 flag is set we need to add a terminate + to the end of each track. This is done to make looping + software like seq24 happy. We do this by truncating all + data in the file past the current tick pointer and inserting + an all-notes-off at that position. + """ + + if gbl.endsync and self.channel>=0: + eof = gbl.tickOffset + for offset in tr.keys(): + if offset > eof: + del tr[offset] + self.addToTrack(eof, chr(0xb0 | self.channel) + chr(0x7b) + chr(0)) + + """ To every MIDI track we generate we add (if the -0 flag was set) an on/off beep at offset 0. This makes for easier sync in multi-tracks. @@ -360,19 +381,19 @@ class Mtrk: # Convert all events to MIDI deltas and store in # the track array/list - tdata=[] # empty track container - lastSts=None # Running status tracker + tdata = [] # empty track container + lastSts = None # Running status tracker for a in sorted(tr.keys()): delta = a-last for d in tr[a]: """ Running status check. For each packet compare - the first byte with the first byte of the previous - packet. If it is can be converted to running status - we strip out byte 0. Note that valid running status - byte are 0x80..0xef. 0xfx are system messages - and are note suitable for running status. + the first byte with the first byte of the previous + packet. If it is can be converted to running status + we strip out byte 0. Note that valid running status + byte are 0x80..0xef. 0xfx are system messages + and are note suitable for running status. """ if len(d) > 1: @@ -404,35 +425,34 @@ class Mtrk: def addPairToTrack(self, boffset, startRnd, duration, note, v, unify): """ Add a note on/off pair to a track. - boffset - offset into current bar - startRnd - rand val start adjustment - duration - note len - note - midi value of note - v - midi velocity - unify - if set attempt to unify/compress on/offs + boffset - offset into current bar + startRnd - rand val start adjustment + duration - note len + note - midi value of note + v - midi velocity + unify - if set attempt to unify/compress on/offs - This function tries its best to handle overlapping events. - Easy to show effect with a table of note ON/OFF pairs. Both - events are for the same note pitch. + This function tries its best to handle overlapping events. + Easy to show effect with a table of note ON/OFF pairs. Both + events are for the same note pitch. - Offsets | 200 | 300 | 320 | 420 - ---------|--------|--------|-------|-------- - Pair1 | on | | off | - Pair2 | | on | | off + Offsets | 200 | 300 | 320 | 420 + ---------|--------|--------|-------|-------- + Pair1 | on | | off | + Pair2 | | on | | off - The logic here will delete the OFF event at 320 and - insert a new OFF at 300. Result is that when playing - Pair1 will turn off at 300 followed by the same note - in Pair2 beginning sounded right after. Why the on/off? - Remember: Velocities may be different! + The logic here will delete the OFF event at 320 and + insert a new OFF at 300. Result is that when playing + Pair1 will turn off at 300 followed by the same note + in Pair2 beginning sounded right after. Why the on/off? + Remember: Velocities may be different! - However, if the unify flag is set we should end up with: - - Offsets | 200 | 300 | 320 | 420 - ---------|--------|--------|-------|-------- - Pair1 | on | | | - Pair2 | | | | off + However, if the unify flag is set we should end up with: + Offsets | 200 | 300 | 320 | 420 + ---------|--------|--------|-------|-------- + Pair1 | on | | | + Pair2 | | | | off """ @@ -442,31 +462,31 @@ class Mtrk: offOffset = onOffset + duration # ON/OFF events - - onEvent = chr(0x90 | self.channel) + chr(note) + chr(v) + + onEvent = chr(0x90 | self.channel) + chr(note) + chr(v) offEvent = onEvent[:-1] + chr(0) """ Check for overlap on last event set for this track and - do some ugly trickry. + do some ugly trickry. - - The noOnFlag is set if we don't want to have the main - routine add in the ON event. This is set when UNIFY is - set and we have an overlap. + - The noOnFlag is set if we don't want to have the main + routine add in the ON event. This is set when UNIFY is + set and we have an overlap. - - We set F to the stored event time for this note and, - if it's in the same event range as the current event - we loop though the saved events for this track. We are - looking for a NOTE OFF event. + - We set F to the stored event time for this note and, + if it's in the same event range as the current event + we loop though the saved events for this track. We are + looking for a NOTE OFF event. - - If we get a matching event we then delete it from the - track. This requires 2 statements: one for an event - list with only 1 event, a 2nd for multiple events. + - If we get a matching event we then delete it from the + track. This requires 2 statements: one for an event + list with only 1 event, a 2nd for multiple events. - - If UNIFY is NOT set we insert a NOTE OFF at the current - on time. This replaces the OFF we just deleted. + - If UNIFY is NOT set we insert a NOTE OFF at the current + on time. This replaces the OFF we just deleted. - - If UNIFY is SET we skip the above step, and we set the - noOnFlag so that the ON event isn't set. + - If UNIFY is SET we skip the above step, and we set the + noOnFlag so that the ON event isn't set. """ @@ -499,10 +519,10 @@ class Mtrk: def zapRangeTrack(self, start, end): """ Clear NoteOn events from track in range: start ... end. - This is called from the fermata function. + This is called from the fermata function. - We delete the entire event list (3 bytes) from the buffer. This - can result in empty directory enteries, but that isn't a problem. + We delete the entire event list (3 bytes) from the buffer. This + can result in empty directory enteries, but that isn't a problem. """ trk=self.miditrk @@ -517,14 +537,14 @@ class Mtrk: def addToTrack(self, offset, event): """ Add an event to a track. - MIDI data is saved as created in track structures. - Each track has a miditrk dictionary entry which used - the time offsets and keys and has the various events - as data. Each event is packed string of bytes and - the events are stored as a list in the order they are - created. Our storage looks like: + MIDI data is saved as created in track structures. + Each track has a miditrk dictionary entry which used + the time offsets and keys and has the various events + as data. Each event is a packed string of bytes and + the events are stored as a list in the order they are + created. Our storage looks like: - miditrk[123] = [event1, event2, ...] + miditrk[OFFSET_VALUE] = [event1, event2, ...] """ if offset<0: @@ -538,8 +558,6 @@ class Mtrk: tr[offset]=[event] - - class TimeSig: """ Track and set the current time signature. diff --git a/mma/MMA/midiC.py b/mma/MMA/midiC.py index 4fd4f3a..c3dd423 100644 --- a/mma/MMA/midiC.py +++ b/mma/MMA/midiC.py @@ -26,64 +26,101 @@ This module contains interface for MIDI constants and conversion routines. from MMA.common import * from MMA.miditables import * -def drumToValue(name): - """ Get the value of the drum tone (-1==error). """ - try: - v=int(name, 0) - except: - try: - v = upperDrumNames.index(name.upper()) + 27 - except ValueError: - error("Expecting a valid drum name or value for drum tone, not '%s'" % name) +def voice2tup(x): + """ Convert integer into 3 byte tuple: Voice, LSB, MSB. """ - if v <0 or v > 127: - error("Note in Drum Tone list must be 0..127, not %s" % v) + if x>0xffff: + msb = x >> 16 + x &= 0xffff + else: + msb = 0 + if x>0xff: + lsb = x >> 8 + x &= 0xff + else: + lsb = 0 + + return (x, lsb, msb) + + +def extVocStr(v): + + v = "%s.%s.%s" % voice2tup(v) + if v[-2:] == '.0': + v=v[:-2] + if v[-2:] == '.0': + v=v[:-2] return v +############################### + +def drumToValue(name): + """ Get the value of the drum tone (-1==error). + Note that this is quite different from instToValue() ... in that + case the caller does a bunch of validation stuff for controllers, etc. + """ + + try: # assuming that 'name' is an integer + i = int(name, 0) + if i>=0 and i<=127: + return int(name) + else: + return -1 + except: + try: + return drumInx[ name.upper() ] + except KeyError: + return -1 + + +def valueToDrum(val): + """ Get the name of the drum tone. """ + + try: + return drumNames[val] + except KeyError: + return str(val) def instToValue(name): """ Get the value of the instrument name (-1==error). """ try: - return upperVoiceNames.index(name.upper()) - except ValueError: + return voiceInx[name.upper()] + except KeyError: return -1 -def ctrlToValue(name): - """ Get the value of the controler name (-1==error). """ - - try: - return upperCtrlNames.index(name.upper()) - except ValueError: - return -1 def valueToInst(val): """ Get the name of the inst. (or 'ERR'). """ try: - return voiceNames[val] - except IndexError: - return "ERROR" + return voiceNames[val] + except KeyError: + try: + int(val) + except: + return "ERROR" + return extVocStr(val) -def valueToDrum(val): - """ Get the name of the drum tone. + - We return the NAME of the tone, or the original value if there is - no name associated with the value (only value 27 to 86 have names). - """ +def ctrlToValue(name): + """ Get the value of the controler name (-1==error). """ - if val<27 or val>86: - return str(val) - else: - return drumNames[val-27] + try: + return ctrlInx[name.upper()] + except keyError: + return -1 + + def valueToCtrl(val): """ Get the name of the controller (or 'ERR'). """ try: - return ctrlNames[val] - except IndexError: + return ctrlNames[val] + except KeyError: return "ERROR" diff --git a/mma/MMA/midiIn.py b/mma/MMA/midiIn.py index 5a9d7ee..6553a36 100644 --- a/mma/MMA/midiIn.py +++ b/mma/MMA/midiIn.py @@ -23,11 +23,15 @@ Bob van der Poel """ +import os + import MMA.midiM -from MMA.alloc import trackAlloc + import gbl from MMA.common import * -import os +from MMA.alloc import trackAlloc + + # The following 2 variables are global. A bit ugly :) @@ -149,7 +153,10 @@ def midiinc(ln): iend = 0xffffff for a in ln: - cmd, opt = a.split('=') + try: + cmd, opt = a.split('=') + except: + error("MidiInc expecting cmd=opt pairs, not '%s'." % a) cmd=cmd.upper() @@ -497,7 +504,7 @@ def midiinc(ln): t.clearPending() if t.voice[0] != t.ssvoice: - gbl.mtrks[t.channel].addProgChange( gbl.tickOffset, t.voice[0]) + gbl.mtrks[t.channel].addProgChange( gbl.tickOffset, t.voice[0], t.ssvoice) channel = t.channel track = gbl.mtrks[channel] diff --git a/mma/MMA/miditables.py b/mma/MMA/miditables.py index 238bd0f..c4a85e5 100644 --- a/mma/MMA/miditables.py +++ b/mma/MMA/miditables.py @@ -27,140 +27,252 @@ MIDI controllers. Having only the constants in this separate file permits to call this from other programs, mainly the mma doc creators. + + **** IMPORTANT *** IMPORTANT + + The tables *Names/*Inx MUST have matching keys/values. + The KEYS in the *Inx tables are the values from the + *Name tables in UPPERCASE. Be very careful making changes!!!!! + """ +# Standard GM drum tone names. + +drumNames={ + 27:'HighQ', 28:'Slap', 29:'ScratchPush', + 30:'ScratchPull', 31:'Sticks', 32:'SquareClick', + 33:'MetronomeClick', 34:'MetronomeBell', 35:'KickDrum2', + 36:'KickDrum1', 37:'SideKick', 38:'SnareDrum1', + 39:'HandClap', 40:'SnareDrum2', 41:'LowTom2', + 42:'ClosedHiHat', 43:'LowTom1', 44:'PedalHiHat', + 45:'MidTom2', 46:'OpenHiHat', 47:'MidTom1', + 48:'HighTom2', 49:'CrashCymbal1', 50:'HighTom1', + 51:'RideCymbal1', 52:'ChineseCymbal', 53:'RideBell', + 54:'Tambourine', 55:'SplashCymbal', 56:'CowBell', + 57:'CrashCymbal2', 58:'VibraSlap', 59:'RideCymbal2', + 60:'HighBongo', 61:'LowBongo', 62:'MuteHighConga', + 63:'OpenHighConga', 64:'LowConga', 65:'HighTimbale', + 66:'LowTimbale', 67:'HighAgogo', 68:'LowAgogo', + 69:'Cabasa', 70:'Maracas', 71:'ShortHiWhistle', + 72:'LongLowWhistle', 73:'ShortGuiro', 74:'LongGuiro', + 75:'Claves', 76:'HighWoodBlock', 77:'LowWoodBlock', + 78:'MuteCuica', 79:'OpenCuica', 80:'MuteTriangle', + 81:'OpenTriangle', 82:'Shaker', 83:'JingleBell', + 84:'Castanets', 85:'MuteSudro', 86:'OpenSudro'} + +drumInx={ + 'HIGHQ':27, 'SLAP':28, 'SCRATCHPUSH':29, + 'SCRATCHPULL':30, 'STICKS':31, 'SQUARECLICK':32, + 'METRONOMECLICK':33, 'METRONOMEBELL':34, 'KICKDRUM2':35, + 'KICKDRUM1':36, 'SIDEKICK':37, 'SNAREDRUM1':38, + 'HANDCLAP':39, 'SNAREDRUM2':40, 'LOWTOM2':41, + 'CLOSEDHIHAT':42, 'LOWTOM1':43, 'PEDALHIHAT':44, + 'MIDTOM2':45, 'OPENHIHAT':46, 'MIDTOM1':47, + 'HIGHTOM2':48, 'CRASHCYMBAL1':49, 'HIGHTOM1':50, + 'RIDECYMBAL1':51, 'CHINESECYMBAL':52, 'RIDEBELL':53, + 'TAMBOURINE':54, 'SPLASHCYMBAL':55, 'COWBELL':56, + 'CRASHCYMBAL2':57, 'VIBRASLAP':58, 'RIDECYMBAL2':59, + 'HIGHBONGO':60, 'LOWBONGO':61, 'MUTEHIGHCONGA':62, + 'OPENHIGHCONGA':63, 'LOWCONGA':64, 'HIGHTIMBALE':65, + 'LOWTIMBALE':66, 'HIGHAGOGO':67, 'LOWAGOGO':68, + 'CABASA':69, 'MARACAS':70, 'SHORTHIWHISTLE':71, + 'LONGLOWWHISTLE':72, 'SHORTGUIRO':73, 'LONGGUIRO':74, + 'CLAVES':75, 'HIGHWOODBLOCK':76, 'LOWWOODBLOCK':77, + 'MUTECUICA':78, 'OPENCUICA':79, 'MUTETRIANGLE':80, + 'OPENTRIANGLE':81, 'SHAKER':82, 'JINGLEBELL':83, + 'CASTANETS':84, 'MUTESUDRO':85, 'OPENSUDRO':86} -""" English names for midi instruments and drums. - These tables are used by the pattern classes to - convert inst/drum names to midi values and by the - doc routines to print tables. -""" - -# The drum names are valid for tones 27 to 87 - -drumNames=[ - 'HighQ', 'Slap', 'ScratchPush', 'ScratchPull', - 'Sticks', 'SquareClick', 'MetronomeClick', - 'MetronomeBell', 'KickDrum2', 'KickDrum1', - 'SideKick', 'SnareDrum1', 'HandClap', - 'SnareDrum2', 'LowTom2', 'ClosedHiHat', - 'LowTom1', 'PedalHiHat', 'MidTom2', 'OpenHiHat', - 'MidTom1', 'HighTom2', 'CrashCymbal1', - 'HighTom1', 'RideCymbal1', 'ChineseCymbal', - 'RideBell', 'Tambourine', 'SplashCymbal', - 'CowBell', 'CrashCymbal2', 'VibraSlap', - 'RideCymbal2', 'HighBongo', 'LowBongo', - 'MuteHighConga', 'OpenHighConga', 'LowConga', - 'HighTimbale', 'LowTimbale', 'HighAgogo', - 'LowAgogo', 'Cabasa', 'Maracas', - 'ShortHiWhistle', 'LongLowWhistle', 'ShortGuiro', - 'LongGuiro', 'Claves', 'HighWoodBlock', - 'LowWoodBlock', 'MuteCuica', 'OpenCuica', - 'MuteTriangle', 'OpenTriangle', 'Shaker', - 'JingleBell', 'Castanets', 'MuteSudro', - 'OpenSudro' ] - -upperDrumNames = [name.upper() for name in drumNames] +# Standard GM voice names. -voiceNames=[ - 'Piano1', 'Piano2','Piano3', - 'Honky-TonkPiano', 'RhodesPiano', 'EPiano', - 'HarpsiChord', 'Clavinet', 'Celesta', - 'Glockenspiel', 'MusicBox', 'Vibraphone', - 'Marimba', 'Xylophone', 'TubularBells', 'Santur', - 'Organ1', 'Organ2', 'Organ3', 'ChurchOrgan', - 'ReedOrgan', 'Accordion', 'Harmonica', - 'Bandoneon', 'NylonGuitar', 'SteelGuitar', - 'JazzGuitar', 'CleanGuitar', 'MutedGuitar', - 'OverDriveGuitar', 'DistortonGuitar', - 'GuitarHarmonics', 'AcousticBass', - 'FingeredBass', 'PickedBass', 'FretlessBass', - 'SlapBass1', 'SlapBass2', 'SynthBass1', - 'SynthBass2', 'Violin', 'Viola', 'Cello', - 'ContraBass', 'TremoloStrings', - 'PizzicatoString', 'OrchestralHarp', 'Timpani', - 'Strings', 'SlowStrings', 'SynthStrings1', - 'SynthStrings2', 'ChoirAahs', 'VoiceOohs', - 'SynthVox', 'OrchestraHit', 'Trumpet', - 'Trombone', 'Tuba', 'MutedTrumpet', 'FrenchHorn', - 'BrassSection', 'SynthBrass1', 'SynthBrass2', - 'SopranoSax', 'AltoSax', 'TenorSax', - 'BaritoneSax', 'Oboe', 'EnglishHorn', 'Bassoon', - 'Clarinet', 'Piccolo', 'Flute', 'Recorder', - 'PanFlute', 'BottleBlow', 'Shakuhachi', - 'Whistle', 'Ocarina', 'SquareWave', 'SawWave', - 'SynCalliope', 'ChifferLead', 'Charang', - 'SoloVoice', '5thSawWave', 'Bass&Lead', - 'Fantasia', 'WarmPad', 'PolySynth', 'SpaceVoice', - 'BowedGlass', 'MetalPad', 'HaloPad', 'SweepPad', - 'IceRain', 'SoundTrack', 'Crystal', 'Atmosphere', - 'Brightness', 'Goblins', 'EchoDrops', - 'StarTheme', 'Sitar', 'Banjo', 'Shamisen', - 'Koto', 'Kalimba', 'BagPipe', 'Fiddle', 'Shanai', - 'TinkleBell', 'AgogoBells', 'SteelDrums', - 'WoodBlock', 'TaikoDrum', 'MelodicTom1', - 'SynthDrum', 'ReverseCymbal', 'GuitarFretNoise', - 'BreathNoise', 'SeaShore', 'BirdTweet', - 'TelephoneRing', 'HelicopterBlade', - 'Applause/Noise', 'GunShot' ] +voiceNames={ + 0:'Piano1', 1:'Piano2', 2:'Piano3', + 3:'Honky-TonkPiano', 4:'RhodesPiano', 5:'EPiano', + 6:'HarpsiChord', 7:'Clavinet', 8:'Celesta', + 9:'Glockenspiel', 10:'MusicBox', 11:'Vibraphone', + 12:'Marimba', 13:'Xylophone', 14:'TubularBells', + 15:'Santur', 16:'Organ1', 17:'Organ2', + 18:'Organ3', 19:'ChurchOrgan', 20:'ReedOrgan', + 21:'Accordion', 22:'Harmonica', 23:'Bandoneon', + 24:'NylonGuitar', 25:'SteelGuitar', 26:'JazzGuitar', + 27:'CleanGuitar', 28:'MutedGuitar', 29:'OverDriveGuitar', + 30:'DistortonGuitar', 31:'GuitarHarmonics', 32:'AcousticBass', + 33:'FingeredBass', 34:'PickedBass', 35:'FretlessBass', + 36:'SlapBass1', 37:'SlapBass2', 38:'SynthBass1', + 39:'SynthBass2', 40:'Violin', 41:'Viola', + 42:'Cello', 43:'ContraBass', 44:'TremoloStrings', + 45:'PizzicatoString', 46:'OrchestralHarp', 47:'Timpani', + 48:'Strings', 49:'SlowStrings', 50:'SynthStrings1', + 51:'SynthStrings2', 52:'ChoirAahs', 53:'VoiceOohs', + 54:'SynthVox', 55:'OrchestraHit', 56:'Trumpet', + 57:'Trombone', 58:'Tuba', 59:'MutedTrumpet', + 60:'FrenchHorn', 61:'BrassSection', 62:'SynthBrass1', + 63:'SynthBrass2', 64:'SopranoSax', 65:'AltoSax', + 66:'TenorSax', 67:'BaritoneSax', 68:'Oboe', + 69:'EnglishHorn', 70:'Bassoon', 71:'Clarinet', + 72:'Piccolo', 73:'Flute', 74:'Recorder', + 75:'PanFlute', 76:'BottleBlow', 77:'Shakuhachi', + 78:'Whistle', 79:'Ocarina', 80:'SquareWave', + 81:'SawWave', 82:'SynCalliope', 83:'ChifferLead', + 84:'Charang', 85:'SoloVoice', 86:'5thSawWave', + 87:'Bass&Lead', 88:'Fantasia', 89:'WarmPad', + 90:'PolySynth', 91:'SpaceVoice', 92:'BowedGlass', + 93:'MetalPad', 94:'HaloPad', 95:'SweepPad', + 96:'IceRain', 97:'SoundTrack', 98:'Crystal', + 99:'Atmosphere', 100:'Brightness', 101:'Goblins', + 102:'EchoDrops', 103:'StarTheme', 104:'Sitar', + 105:'Banjo', 106:'Shamisen', 107:'Koto', + 108:'Kalimba', 109:'BagPipe', 110:'Fiddle', + 111:'Shanai', 112:'TinkleBell', 113:'AgogoBells', + 114:'SteelDrums', 115:'WoodBlock', 116:'TaikoDrum', + 117:'MelodicTom1', 118:'SynthDrum', 119:'ReverseCymbal', + 120:'GuitarFretNoise', 121:'BreathNoise', 122:'SeaShore', + 123:'BirdTweet', 124:'TelephoneRing', 125:'HelicopterBlade', + 126:'Applause/Noise', 127:'GunShot' } + +voiceInx={ + 'PIANO1':0, 'PIANO2':1, 'PIANO3':2, + 'HONKY-TONKPIANO':3, 'RHODESPIANO':4, 'EPIANO':5, + 'HARPSICHORD':6, 'CLAVINET':7, 'CELESTA':8, + 'GLOCKENSPIEL':9, 'MUSICBOX':10, 'VIBRAPHONE':11, + 'MARIMBA':12, 'XYLOPHONE':13, 'TUBULARBELLS':14, + 'SANTUR':15, 'ORGAN1':16, 'ORGAN2':17, + 'ORGAN3':18, 'CHURCHORGAN':19, 'REEDORGAN':20, + 'ACCORDION':21, 'HARMONICA':22, 'BANDONEON':23, + 'NYLONGUITAR':24, 'STEELGUITAR':25, 'JAZZGUITAR':26, + 'CLEANGUITAR':27, 'MUTEDGUITAR':28, 'OVERDRIVEGUITAR':29, + 'DISTORTONGUITAR':30, 'GUITARHARMONICS':31, 'ACOUSTICBASS':32, + 'FINGEREDBASS':33, 'PICKEDBASS':34, 'FRETLESSBASS':35, + 'SLAPBASS1':36, 'SLAPBASS2':37, 'SYNTHBASS1':38, + 'SYNTHBASS2':39, 'VIOLIN':40, 'VIOLA':41, + 'CELLO':42, 'CONTRABASS':43, 'TREMOLOSTRINGS':44, + 'PIZZICATOSTRING':45, 'ORCHESTRALHARP':46, 'TIMPANI':47, + 'STRINGS':48, 'SLOWSTRINGS':49, 'SYNTHSTRINGS1':50, + 'SYNTHSTRINGS2':51, 'CHOIRAAHS':52, 'VOICEOOHS':53, + 'SYNTHVOX':54, 'ORCHESTRAHIT':55, 'TRUMPET':56, + 'TROMBONE':57, 'TUBA':58, 'MUTEDTRUMPET':59, + 'FRENCHHORN':60, 'BRASSSECTION':61, 'SYNTHBRASS1':62, + 'SYNTHBRASS2':63, 'SOPRANOSAX':64, 'ALTOSAX':65, + 'TENORSAX':66, 'BARITONESAX':67, 'OBOE':68, + 'ENGLISHHORN':69, 'BASSOON':70, 'CLARINET':71, + 'PICCOLO':72, 'FLUTE':73, 'RECORDER':74, + 'PANFLUTE':75, 'BOTTLEBLOW':76, 'SHAKUHACHI':77, + 'WHISTLE':78, 'OCARINA':79, 'SQUAREWAVE':80, + 'SAWWAVE':81, 'SYNCALLIOPE':82, 'CHIFFERLEAD':83, + 'CHARANG':84, 'SOLOVOICE':85, '5THSAWWAVE':86, + 'BASS&LEAD':87, 'FANTASIA':88, 'WARMPAD':89, + 'POLYSYNTH':90, 'SPACEVOICE':91, 'BOWEDGLASS':92, + 'METALPAD':93, 'HALOPAD':94, 'SWEEPPAD':95, + 'ICERAIN':96, 'SOUNDTRACK':97, 'CRYSTAL':98, + 'ATMOSPHERE':99, 'BRIGHTNESS':100, 'GOBLINS':101, + 'ECHODROPS':102, 'STARTHEME':103, 'SITAR':104, + 'BANJO':105, 'SHAMISEN':106, 'KOTO':107, + 'KALIMBA':108, 'BAGPIPE':109, 'FIDDLE':110, + 'SHANAI':111, 'TINKLEBELL':112, 'AGOGOBELLS':113, + 'STEELDRUMS':114, 'WOODBLOCK':115, 'TAIKODRUM':116, + 'MELODICTOM1':117, 'SYNTHDRUM':118, 'REVERSECYMBAL':119, + 'GUITARFRETNOISE':120, 'BREATHNOISE':121, 'SEASHORE':122, + 'BIRDTWEET':123, 'TELEPHONERING':124, 'HELICOPTERBLADE':125, + 'APPLAUSE/NOISE':126, 'GUNSHOT':127 } -upperVoiceNames = [name.upper() for name in voiceNames] +# Controller names. Tables are borrowed from: +# http://www.midi.org/about-midi/table3.shtml -ctrlNames = [ - ### also see: http://www.midi.org/about-midi/table3.shtml +# 0-31 Double Precise Controllers MSB (14-bits, 16,384 values) +# 32-63 Double Precise Controllers LSB (14-bits, 16,384 values) +# 64-119 Single Precise Controllers (7-bits, 128 values) +# 120-127 Channel Mode Messages - ### 0-31 Double Precise Controllers - ### MSB (14-bits, 16,384 values) +ctrlNames = { + 0:'Bank', 1:'Modulation', 2:'Breath', + 3:'Ctrl3', 4:'Foot', 5:'Portamento', + 6:'Data', 7:'Volume', 8:'Balance', + 9:'Ctrl9', 10:'Pan', 11:'Expression', + 12:'Effect1', 13:'Effect2', 14:'Ctrl14', + 15:'Ctrl15', 16:'General1', 17:'General2', + 18:'General3', 19:'General4', 20:'Ctrl20', + 21:'Ctrl21', 22:'Ctrl22', 23:'Ctrl23', + 24:'Ctrl24', 25:'Ctrl25', 26:'Ctrl26', + 27:'Ctrl27', 28:'Ctrl28', 29:'Ctrl29', + 30:'Ctrl30', 31:'Ctrl31', 32:'BankLSB', + 33:'ModulationLSB', 34:'BreathLSB', 35:'Ctrl35', + 36:'FootLSB', 37:'PortamentoLSB', 38:'DataLSB', + 39:'VolumeLSB', 40:'BalanceLSB', 41:'Ctrl41', + 42:'PanLSB', 43:'ExpressionLSB', 44:'Effect1LSB', + 45:'Effect2LSB', 46:'Ctrl46', 47:'Ctrl47', + 48:'General1LSB', 49:'General2LSB', 50:'General3LSB', + 51:'General4LSB', 52:'Ctrl52', 53:'Ctrl53', + 54:'Ctrl54', 55:'Ctrl55', 56:'Ctrl56', + 57:'Ctrl57', 58:'Ctrl58', 59:'Ctrl59', + 60:'Ctrl60', 61:'Ctrl61', 62:'Ctrl62', + 63:'Ctrl63', 64:'Sustain', 65:'Portamento', + 66:'Sostenuto', 67:'SoftPedal', 68:'Legato', + 69:'Hold2', 70:'Variation', 71:'Resonance', + 72:'ReleaseTime', 73:'AttackTime', 74:'Brightness', + 75:'DecayTime', 76:'VibratoRate', 77:'VibratoDepth', + 78:'VibratoDelay', 79:'Ctrl79', 80:'General5', + 81:'General6', 82:'General7', 83:'General8', + 84:'PortamentoCtrl', 85:'Ctrl85', 86:'Ctrl86', + 87:'Ctrl87', 88:'Ctrl88', 89:'Ctrl89', + 90:'Ctrl90', 91:'Reverb', 92:'Tremolo', + 93:'Chorus', 94:'Detune', 95:'Phaser', + 96:'DataInc', 97:'DataDec', 98:'NonRegLSB', + 99:'NonRegMSB', 100:'RegParLSB', 101:'RegParMSB', + 102:'Ctrl102', 103:'Ctrl103', 104:'Ctrl104', + 105:'Ctrl105', 106:'Ctrl106', 107:'Ctrl107', + 108:'Ctrl108', 109:'Ctrl109', 110:'Ctrl110', + 111:'Ctrl111', 112:'Ctrl112', 113:'Ctrl113', + 114:'Ctrl114', 115:'Ctrl115', 116:'Ctrl116', + 117:'Ctrl117', 118:'Ctrl118', 119:'Ctrl119', + 120:'AllSoundsOff', 121:'ResetAll', 122:'LocalCtrl', + 123:'AllNotesOff', 124:'OmniOff', 125:'OmniOn', + 126:'PolyOff', 127:'PolyOn' } - 'Bank', 'Modulation', 'Breath', 'Ctrl3', - 'Foot', 'Portamento', 'Data', 'Volume', - 'Balance', 'Ctrl9', 'Pan', 'Expression', - 'Effect1', 'Effect2', 'Ctrl14', 'Ctrl15', - 'General1','General2','General3','General4', - 'Ctrl20', 'Ctrl21', 'Ctrl22', 'Ctrl23', - 'Ctrl24', 'Ctrl25', 'Ctrl26', 'Ctrl27', - 'Ctrl28', 'Ctrl29', 'Ctrl30', 'Ctrl31', - ### 32-63 Double Precise Controllers - ### LSB (14-bits, 16,384 values) - 'BankLSB', 'ModulationLSB', 'BreathLSB', - 'Ctrl35', 'FootLSB', 'PortamentoLSB', - 'DataLSB','VolumeLSB','BalanceLSB', - 'Ctrl41','PanLSB','ExpressionLSB', - 'Effect1LSB', 'Effect2LSB','Ctrl46', 'Ctrl47', - 'General1LSB','General2LSB', 'General3LSB', - 'General4LSB', 'Ctrl52','Ctrl53', 'Ctrl54', - 'Ctrl55', 'Ctrl56', 'Ctrl57', 'Ctrl58', - 'Ctrl59', 'Ctrl60', 'Ctrl61', 'Ctrl62', - 'Ctrl63', +ctrlInx = { + 'BANK':0, 'MODULATION':1, 'BREATH':2, + 'CTRL3':3, 'FOOT':4, 'PORTAMENTO':5, + 'DATA':6, 'VOLUME':7, 'BALANCE':8, + 'CTRL9':9, 'PAN':10, 'EXPRESSION':11, + 'EFFECT1':12, 'EFFECT2':13, 'CTRL14':14, + 'CTRL15':15, 'GENERAL1':16, 'GENERAL2':17, + 'GENERAL3':18, 'GENERAL4':19, 'CTRL20':20, + 'CTRL21':21, 'CTRL22':22, 'CTRL23':23, + 'CTRL24':24, 'CTRL25':25, 'CTRL26':26, + 'CTRL27':27, 'CTRL28':28, 'CTRL29':29, + 'CTRL30':30, 'CTRL31':31, 'BANKLSB':32, + 'MODULATIONLSB':33, 'BREATHLSB':34, 'CTRL35':35, + 'FOOTLSB':36, 'PORTAMENTOLSB':37, 'DATALSB':38, + 'VOLUMELSB':39, 'BALANCELSB':40, 'CTRL41':41, + 'PANLSB':42, 'EXPRESSIONLSB':43, 'EFFECT1LSB':44, + 'EFFECT2LSB':45, 'CTRL46':46, 'CTRL47':47, + 'GENERAL1LSB':48, 'GENERAL2LSB':49, 'GENERAL3LSB':50, + 'GENERAL4LSB':51, 'CTRL52':52, 'CTRL53':53, + 'CTRL54':54, 'CTRL55':55, 'CTRL56':56, + 'CTRL57':57, 'CTRL58':58, 'CTRL59':59, + 'CTRL60':60, 'CTRL61':61, 'CTRL62':62, + 'CTRL63':63, 'SUSTAIN':64, 'PORTAMENTO':65, + 'SOSTENUTO':66, 'SOFTPEDAL':67, 'LEGATO':68, + 'HOLD2':69, 'VARIATION':70, 'RESONANCE':71, + 'RELEASETIME':72, 'ATTACKTIME':73, 'BRIGHTNESS':74, + 'DECAYTIME':75, 'VIBRATORATE':76, 'VIBRATODEPTH':77, + 'VIBRATODELAY':78, 'CTRL79':79, 'GENERAL5':80, + 'GENERAL6':81, 'GENERAL7':82, 'GENERAL8':83, + 'PORTAMENTOCTRL':84, 'CTRL85':85, 'CTRL86':86, + 'CTRL87':87, 'CTRL88':88, 'CTRL89':89, + 'CTRL90':90, 'REVERB':91, 'TREMOLO':92, + 'CHORUS':93, 'DETUNE':94, 'PHASER':95, + 'DATAINC':96, 'DATADEC':97, 'NONREGLSB':98, + 'NONREGMSB':99, 'REGPARLSB':100, 'REGPARMSB':101, + 'CTRL102':102, 'CTRL103':103, 'CTRL104':104, + 'CTRL105':105, 'CTRL106':106, 'CTRL107':107, + 'CTRL108':108, 'CTRL109':109, 'CTRL110':110, + 'CTRL111':111, 'CTRL112':112, 'CTRL113':113, + 'CTRL114':114, 'CTRL115':115, 'CTRL116':116, + 'CTRL117':117, 'CTRL118':118, 'CTRL119':119, + 'ALLSOUNDSOFF':120, 'RESETALL':121, 'LOCALCTRL':122, + 'ALLNOTESOFF':123, 'OMNIOFF':124, 'OMNION':125, + 'POLYOFF':126, 'POLYON':127 } - ### 64-119 Single Precise Controllers - ### (7-bits, 128 values) - - 'Sustain', 'Portamento', 'Sostenuto', - 'SoftPedal', 'Legato', 'Hold2', 'Variation', - 'Resonance', 'ReleaseTime','AttackTime', 'Brightness', - 'DecayTime','VibratoRate','VibratoDepth', 'VibratoDelay', - 'Ctrl79','General5','General6','General7', - 'General8','PortamentoCtrl','Ctrl85','Ctrl86', - 'Ctrl87', 'Ctrl88', 'Ctrl89', 'Ctrl90', - 'Reverb', 'Tremolo', 'Chorus','Detune', - 'Phaser', 'DataInc','DataDec', - 'NonRegLSB', 'NonRegMSB', - 'RegParLSB', 'RegParMSB', - 'Ctrl102','Ctrl103','Ctrl104','Ctrl105', - 'Ctrl106','Ctrl107','Ctrl108','Ctrl109', - 'Ctrl110','Ctrl111','Ctrl112','Ctrl113', - 'Ctrl114','Ctrl115','Ctrl116','Ctrl117', - 'Ctrl118','Ctrl119', - - ### 120-127 Channel Mode Messages - - 'AllSoundsOff','ResetAll', - 'LocalCtrl','AllNotesOff', - 'OmniOff','OmniOn', 'PolyOff','PolyOn' ] - -upperCtrlNames = [name.upper() for name in ctrlNames] diff --git a/mma/MMA/notelen.py b/mma/MMA/notelen.py index 5649bfa..d58321d 100644 --- a/mma/MMA/notelen.py +++ b/mma/MMA/notelen.py @@ -23,6 +23,7 @@ Bob van der Poel """ + import gbl from MMA.common import * diff --git a/mma/MMA/options.py b/mma/MMA/options.py index f56b0d5..0ff9ac1 100644 --- a/mma/MMA/options.py +++ b/mma/MMA/options.py @@ -28,23 +28,22 @@ Bob van der Poel import getopt import sys -import gbl -from MMA.common import * import MMA.docs import MMA.parse -import MMA.alloc import MMA.chords -from MMA.macro import macros +import MMA.alloc +import MMA.volume +import gbl +from MMA.common import * +from MMA.macro import macros def opts(): """ Option parser. """ try: opts, args = getopt.gnu_getopt(sys.argv[1:], - "dpsS:ri:wneom:f:M:cgGvD:0", [] ) - - + "dpsS:ri:wneom:f:M:cgGvD:01PT:", [] ) except getopt.GetoptError: usage() @@ -110,24 +109,32 @@ def opts(): else: error("Only a '0' or '1' is permitted for the -M arg") + elif o == '-T': # set tracks to generate, mute all others + gbl.muteTracks = a.upper().split(',') + + elif o == '-D': if a == 'xl': - gbl.docs = 1 + gbl.createDocs = 1 elif a == 'xh': - gbl.docs = 2 + gbl.createDocs = 2 + + elif a == 'v': + gbl.createDocs = 3 elif a == 'k': - def pl(msg, lst): + def pl(msg, lst, adds): print msg, - for i in sorted(lst.keys()): + for i in sorted(lst.keys() + adds): print i, print "\n" - pl("Base track names:", MMA.alloc.trkClasses ) - pl("Commands:", MMA.parse.simpleFuncs) - pl("TrackCommands:", MMA.parse.trackFuncs) + pl("Base track names:", MMA.alloc.trkClasses, []) + pl("Commands:", MMA.parse.simpleFuncs, + ["BEGIN", "END",] ) + pl("TrackCommands:", MMA.parse.trackFuncs, []) print "Not complete ... subcommands, comments, chords..." sys.exit(0) @@ -138,14 +145,25 @@ def opts(): elif o == '-0': gbl.synctick = 1 + elif o == '-1': + gbl.endsync = 1 + + elif o == '-P': + gbl.playFile = 1 + else: usage() # unreachable?? - if args: - if gbl.infile: - usage("Only one input filename is permitted.") - gbl.infile = args.pop(0) + # we have processed all the args. Should just have a filename left + if len(args)>1: + usage("Only one input filename is permitted, %s given on command line." % len(args) ) + + if gbl.infile: + usage("Input filename already assigned ... should not happen.") + + if args: + gbl.infile = args[0] def usage(msg=''): """ Usage message. """ @@ -162,6 +180,7 @@ def usage(msg=''): " -Dk print list of MMA keywords", " -Dxl eXtract Latex doc blocks from file", " -Dxh eXtract HTML doc blocks from file", + " -Dv extract lots of info about the grooves/seqs in file", " -e show parsed/Expanded lines", " -f set output Filename", " -g update Groove dependency database", @@ -175,9 +194,11 @@ def usage(msg=''): " -r display Running progress", " -s display Sequence info during run", " -S Set macro 'var' to 'data'", + " -T Limit generation to specified tracks", " -v display Version number", " -w disable Warning messages", - " -0 create sync at start of all channel tracks" ] + " -0 create sync at start of all channel tracks", + " -1 create sync at end of all channel tracks" ] for a in txt: diff --git a/mma/MMA/parse.py b/mma/MMA/parse.py index e7756cb..bf7e90e 100644 --- a/mma/MMA/parse.py +++ b/mma/MMA/parse.py @@ -34,35 +34,39 @@ import random import copy import gbl +from MMA.common import * + import MMA.notelen import MMA.chords import MMA.file -import MMA.docs import MMA.midi import MMA.midiIn +import MMA.grooves +import MMA.docs import MMA.auto -from MMA.alloc import trackAlloc -from MMA.common import * import MMA.translate -from MMA.lyric import lyric import MMA.patSolo -from MMA.macro import macros import MMA.mdefine import MMA.volume -from MMA.pat import seqBump +import MMA.seqrnd +import MMA.patch + +import gbl + +from MMA.common import * +from MMA.lyric import lyric +from MMA.macro import macros +from MMA.alloc import trackAlloc lastChord = None # tracks last chord for "/ /" data lines. beginData = [] # Current data set by a BEGIN statement beginPoints = [] # since BEGINs can be nested, we need ptrs for backing out of BEGINs -seqRndWeight = [1] - -groovesList = None -groovesCount = 0 - gmagic = 9988 # magic name for groove saved with USE + + """ This table is passed to the track classes. It has an instance for each chord in the current bar. """ @@ -105,15 +109,14 @@ def parse(inpath): """ Process a mma input file. """ global beginData, lastChord - global groovesList, groovesCount - + gbl.inpath = inpath curline = None while 1: curline = inpath.read() - + if curline == None: MMA.docs.docDump() break @@ -130,18 +133,22 @@ def parse(inpath): encountered. The placement here is pretty deliberate. Variable expand comes - later so you can't macorize BEGIN ... I think this makes sense. + later so you can't macroize BEGIN ... I think this makes sense. + + The tests for 'begin', 'end' and the appending of the current + begin[] stuff have to be here, in this order. """ - key=l[0].upper() - if key == 'BEGIN': + action=l[0].upper() # 1st arg in line + + if action == 'BEGIN': if not l: error("Use: Begin STUFF") beginPoints.append(len(beginData)) beginData.extend(l[1:]) continue - if key == 'END': + if action == 'END': if len(l) > 1: error("No arguments permitted for END") if not beginData: @@ -151,9 +158,9 @@ def parse(inpath): if beginData: l = beginData + l + action = l[0].upper() - action = l[0].upper() - + if gbl.showExpand and action !='REPEAT': print l @@ -180,7 +187,7 @@ def parse(inpath): if len(l) < 2: error("Expecting argument after '%s'" % name) action = l[1].upper() - + if action in trackFuncs: trackFuncs[action](name, l[2:]) else: @@ -197,7 +204,7 @@ def parse(inpath): a line number on a line by itself it okay. """ - if l[0].isdigit(): + if action.isdigit(): # isdigit() matches '1', '1234' but not '1a'! l = l[1:] if not l: # ignore empty lines continue @@ -221,26 +228,28 @@ def parse(inpath): l = ' '.join(l) l = MMA.patSolo.extractSolo(l, rptcount) - """ Set lyrics from [stuff] in the current line or - stuff previously stored with LYRICS SET. + """ Set lyrics from [stuff] in the current line. + NOTE: lyric.extract() inserts previously created + data from LYRICS SET and inserts the chord names + if that flag is active. """ l, lyrics = lyric.extract(l, rptcount) + l = l.split() + """ At this point we have only chord info. A number of sanity checks are made: 1. Make sure there is some chord data, 2. Ensure the correct number of chords. """ - - l = l.split() - + if not l: error("Expecting music (chord) data. Even lines with\n" " lyrics or solos still need a chord") i = gbl.QperBar - len(l) - if i<0: + if i < 0: error("Too many chords in line. Max is %s, not %s" % (gbl.QperBar, len(l) ) ) if i: @@ -249,7 +258,7 @@ def parse(inpath): """ We now have a valid line. It'll look something like: - ['Cm', '/', 'z', 'F#'] + ['Cm', '/', 'z', 'F#'] or ['C', '/', '/', '/' ] For each bar we create a ctable structure. This is just a list of CTables, one for each beat division. @@ -275,19 +284,24 @@ def parse(inpath): # Create MIDI data for the bar - for rpt in range(rptcount): + for rpt in range(rptcount): # for each bar in the repeat count ( Cm * 3) + + """ Handle global (de)cresc by popping a new volume off stack. """ + if MMA.volume.futureVol: MMA.volume.volume = MMA.volume.futureVol.pop(0) + if MMA.volume.futureVol: + MMA.volume.nextVolume = MMA.volume.futureVol[0] + else: + MMA.volume.nextVolume = None - tmp = [] - for x, i in enumerate(seqRndWeight): - tmp.extend([x] * i) - if not len(tmp): - error("SeqRndWeight has generated an empty list") - randomSeq = random.choice(tmp) + + """ Set up for rnd seq. This may set the current seq point. If return + is >=0 then we're doing track rnd. + """ + + rsq, seqlist = MMA.seqrnd.setseq() - if gbl.seqRnd[0] == 1: - gbl.seqCount = randomSeq """ Process each track. It is important that the track classes are written so that the ctable passed to them IS NOT MODIFIED. @@ -296,16 +310,20 @@ def parse(inpath): """ for a in gbl.tnames.values(): - seqSave = gbl.seqCount - if a.name in gbl.seqRnd: - gbl.seqCount = randomSeq - + if rsq >= 0: + seqSave = gbl.seqCount + if a.name in seqlist: # for seqrnd with tracklist + gbl.seqCount = rsq + a.bar(ctable) ## process entire bar! - gbl.seqCount = seqSave + if rsq >= 0: + gbl.seqCount = seqSave # Adjust counters + gbl.totTime += float(gbl.QperBar) / gbl.tempo + gbl.barNum += 1 if gbl.barNum > gbl.maxBars: @@ -316,27 +334,7 @@ def parse(inpath): gbl.seqCount = (gbl.seqCount+1) % gbl.seqSize - """ Handle groove lists. If there is more than 1 entry - in the groove list, advance (circle). We don't have - to qualify grooves since they were verified when - this list was created. groovesList==None if there - is only one groove (or none). - """ - - if groovesList: - groovesCount += 1 - if groovesCount > len(groovesList)-1: - groovesCount = 0 - slot = groovesList[groovesCount] - - if slot != gbl.currentGroove: - grooveDo(slot) - - gbl.lastGroove = gbl.currentGroove - gbl.currentGroove = slot - - if gbl.debug: - print "Groove (list) setting restored from '%s'." % slot + MMA.grooves.nextGroove() # using groove list? Advance. # Enabled with the -r command line option @@ -519,7 +517,7 @@ def repeat(ln): while 1: if act in ('REPEATEND', 'ENDREPEAT'): if l: - l=macros.expand(l) + l = macros.expand(l) if len(l) == 2 and l[0].upper() == 'NOWARN': l=l[1:] warn=0 @@ -561,7 +559,7 @@ def repeat(ln): ending = 1 if l: - l=macros.expand(l) + l = macros.expand(l) if len(l) == 2 and l[0].upper() == 'NOWARN': warn=0 l=l[1:] @@ -701,6 +699,9 @@ def tempo(ln): print "Set future Tempo to %s over %s beats" % \ ( int(tempo), numbeats) + if gbl.tempo <=0: + error("Tempo setting must be greater than 0.") + def beatAdjust(ln): """ Delete or insert some beats into the sequence. @@ -717,6 +718,8 @@ def beatAdjust(ln): gbl.tickOffset += int(adj * gbl.BperQ) + gbl.totTime += adj / gbl.tempo # adjust total time + if gbl.debug: print "BeatAdjust: inserted %s at bar %s." % (adj, gbl.barNum + 1) @@ -803,205 +806,7 @@ def fermata(ln): % (start, end) -####################################### -# Groove stuff - -def grooveDefine(ln): - """ Define a groove. - - Current settings are assigned to a groove name. - """ - - if not len(ln): - error("Use: DefGroove Name") - - slot=ln[0].upper() - - # Slot names can't contain a '/' (reserved) or be an integer (used in groove select). - - if '/' in slot: - error("The '/' is not permitted in a groove name") - - if slot.isdigit(): - error("Invalid slot name '%s'. Cannot be only digits" % slot) - - grooveDefineDo(slot) - - if gbl.debug: - print "Groove settings saved to '%s'." % slot - - if gbl.makeGrvDefs: - MMA.auto.updateGrooveList(slot) - - if len(ln) > 1: - MMA.docs.docDefine(ln) - - -def grooveDefineDo(slot): - - for n in gbl.tnames.values(): - n.saveGroove(slot) - - gbl.settingsGroove[slot] = { - 'SEQSIZE': gbl.seqSize, - 'SEQRNDWT': seqRndWeight[:], - 'QPERBAR': gbl.QperBar, - 'SEQRND': gbl.seqRnd[:], - 'TIMESIG': MMA.midi.timeSig.get(), - '81': MMA.notelen.noteLenTable['81'], - '82': MMA.notelen.noteLenTable['82'], - 'SWINGMODE': gbl.swingMode , - 'SWINGSKEW': gbl.swingSkew, - 'VRATIO': (MMA.volume.vTRatio, MMA.volume.vMRatio)} - - -def groove(ln): - """ Select a previously defined groove. """ - - global groovesList, groovesCount - - if not ln: - error("Groove: needs agrument(s)") - - tmpList =[] - - if ln[0].isdigit(): - wh=stoi(ln[0]) - if wh<1: - error("Groove selection must be > 0, not '%s'" % wh) - ln=ln[1:] - else: - wh = None - - for slot in ln: - slot = slot.upper() - if slot == "/": - if len(tmpList): - slot=tmpList[-1] - else: - error("A previous groove name is needed before a '/'") - - if not slot in gbl.settingsGroove: - - if gbl.debug: - print "Groove '%s' not defined. Trying auto-load from libraries" \ - % slot - - l=MMA.auto.loadGrooveDir(slot) # name of the lib file with groove - - if l: - if gbl.debug: - print "Attempting to load groove '%s' from '%s'." \ - % (slot, l) - - usefile([os.path.join(gbl.autoLib, l)]) - - if not slot in gbl.settingsGroove: - error("Groove '%s' not found. Have libraries changed " - "since last 'mma -g' run?" % slot) - - else: - error("Groove '%s' could not be found in memory or library files" % slot ) - - tmpList.append(slot) - - if not len(tmpList): - error("Use: Groove [selection] Name [...]") - - """ If the first arg to list was an int() (ie: 3 groove1 groove2 grooveFoo) - we select from the list. After the selection, we reset the list to be - just the selected entry. This was, if there are multiple groove names without - a leading int() we process the list as groove list changing with each bar. - """ - - if wh: - wh = (wh-1) % len(tmpList) - tmpList=tmpList[wh:wh+1] - - slot=tmpList[0] - grooveDo(slot) - - groovesCount = 0 - if len(tmpList)==1: - groovesList=None - else: - groovesList=tmpList - - gbl.lastGroove = gbl.currentGroove - gbl.currentGroove = slot - if gbl.lastGroove == '': - gbl.lastGroove = slot - - if gbl.debug: - print "Groove settings restored from '%s'." % slot - -def grooveDo(slot): - """ This is separate from groove() so we can call it from - usefile() with a qualified name. """ - - global seqRndWeight - - oldSeqSize = gbl.seqSize - - g=gbl.settingsGroove[slot] - - gbl.seqSize = g['SEQSIZE'] - seqRndWeight = g['SEQRNDWT'] - gbl.QperBar = g['QPERBAR'] - gbl.seqRnd = g['SEQRND'] - MMA.midi.timeSig.set( *g['TIMESIG']) # passing tuple as 2 args. - MMA.notelen.noteLenTable['81'] = g['81'] - MMA.notelen.noteLenTable['82'] = g['82'] - gbl.swingMode = g['SWINGMODE'] - gbl.swingSkew = g['SWINGSKEW'] - MMA.volume.vTRatio, MMA.volume.vMRatio = g['VRATIO'] - - for n in gbl.tnames.values(): - n.restoreGroove(slot) - - """ This is important! Tracks NOT overwritten by saved grooves way - have the wrong sequence length. I don't see any easy way to hit - just the unchanged/unrestored tracks so we do them all. - Only done if a change in seqsize ... doesn't take long to be safe. - """ - - if oldSeqSize != gbl.seqSize: - for a in gbl.tnames.values(): - a.setSeqSize() - - seqRndWeight = MMA.pat.seqBump(seqRndWeight) - - gbl.seqCount = 0 - -def grooveClear(ln): - """ Delete all previously loaded grooves from memory.""" - - global groovesList, groovesCount - - if ln: - error("GrooveClear does not have any arguments.") - - groovesList = {} - groovesCount = 0 - - try: - a= gbl.settingsGroove[gmagic] - except: - a=None - - gbl.settingsGroove={} - - if a: - gbl.settingsGroove[gmagic]=a - - gbl.lastGroove = '' - gbl.currentGroove = '' - - - if gbl.debug: - print "All grooves deleted." - ####################################### # File and I/O @@ -1047,10 +852,9 @@ def usefile(ln): """ slot = gmagic - grooveDefineDo(slot) + MMA.grooves.grooveDefineDo(slot) parseFile(fn) - grooveDo(slot) - + MMA.grooves.grooveDo(slot) def mmastart(ln): if not ln: @@ -1099,9 +903,9 @@ def setAutoPath(ln): # To avoid conflicts, delete all existing grooves (current seq not effected) - gbl.settingsGroove = {} - gbl.lastGroove = '' - gbl.currentGroove = '' + MMA.grooves.glist = {} + MMA.grooves.lastGroove = '' + MMA.grooves.currentGroove = '' if gbl.debug: print "AutoLibPath set to", f @@ -1135,6 +939,20 @@ def setOutPath(ln): else: gbl.outPath = os.path.expanduser(ln[0]) + if gbl.debug: + print "OutPath set to", gbl.outPath + + +def setMidiPlayer(ln): + """ Set the MIDI file player (used with -P). """ + + if len(ln) != 1: + error("Use: MidiPlayer ") + + gbl.midiPlayer = ln[0] + + if gbl.debug: + print "MidiPlayer set to", gbl.MidiPlayer ####################################### @@ -1143,13 +961,14 @@ def setOutPath(ln): def seqsize(ln): """ Set the length of sequences. """ - global seqRndWeight - if len(ln) !=1: error("Usage 'SeqSize N'") n = stoi(ln[0], "Argument for SeqSize must be integer") + if n < 1: + error("SeqSize: sequence size must be 1 or greater, not '%s'." % n) + # Setting the sequence size always resets the seq point gbl.seqCount = 0 @@ -1164,7 +983,7 @@ def seqsize(ln): for a in gbl.tnames.values(): a.setSeqSize() - seqRndWeight = seqBump(seqRndWeight) + MMA.seqrnd.seqRndWeight = seqBump(MMA.seqrnd.seqRndWeight) if gbl.debug: print "Set SeqSize to ", n @@ -1193,9 +1012,9 @@ def seq(ln): gbl.seqCount = s-1 - if gbl.seqRnd[0] == 1: + if MMA.seqrnd.seqRnd[0] == 1: warning("SeqRnd has been disabled by a Seq command") - seqRnd = [0] + MMA.seqrnd.seqRnd = [0] def seqClear(ln): @@ -1209,67 +1028,9 @@ def seqClear(ln): n.clearSequence() MMA.volume.futureVol = [] - setSeqRndWeight(['1']) + MMA.seqrnd.setSeqRndWeight(['1']) -def setSeqRnd(ln): - """ Set random order for all tracks. """ - - emsg = "use [ON, OFF | TrackList ]" - if not ln: - error("SeqRnd:" + emsg) - - a=ln[0].upper() - - if a in ("ON", "1") and len(ln) == 1: - gbl.seqRnd = [1] - - elif a in ("OFF", "0") and len(ln) == 1: - gbl.seqRnd = [0] - - else: - gbl.seqRnd=[2] - for a in ln: - a = a.upper() - if not a in gbl.tnames: - error("SeqRnd: Track '%s' does not exist, %s" % (a, emsg)) - if a in gbl.seqRnd: - error("SeqRnd: Duplicate track '%s' specified, %s" % (a, emsg)) - gbl.seqRnd.append(a) - - if gbl.debug: - print "SeqRnd:", - if gbl.seqRnd[0] == 2: - for a in gbl.seqRnd[1:]: - print a, - print - else: - if gbl.seqRnd[0] == 1: - print "On" - else: - print "Off" - - -def setSeqRndWeight(ln): - """ Set global rnd weight. """ - - global seqRndWeight - - if not ln: - error("Use: RndWeight ") - - tmp = [] - for n in ln: - n = stoi(n) - if n < 0: error("RndWeight: Values must be 0 or greater") - tmp.append(n) - - seqRndWeight = seqBump(tmp) - - if gbl.debug: - print "RndWeight: ", - printList(seqRndWeight) - def restart(ln): """ Restart all tracks to almost-default condidions. """ @@ -1448,6 +1209,20 @@ def setTimeSig(ln): ####################################### # Misc +def synchronize(ln): + """ Set synchronization in the MIDI. A file mode for -0 and -1. """ + + if not ln: + error("SYNCHRONIZE: requires args END and/or START.") + + for a in ln: + if a.upper() == 'END': + gbl.endsync = 1 + elif a.upper() == 'START': + gbl.synctick = 1 + else: + error("SYNCHRONIZE: expecting END or START") + def rndseed(ln): """ Reseed the random number generator. """ @@ -1486,7 +1261,7 @@ def lnPrint(ln): def printActive(ln): """ Print a list of the active tracks. """ - print "Active tracks, groove:", gbl.currentGroove, ' '.join(ln) + print "Active tracks, groove:", MMA.grooves.currentGroove, ' '.join(ln) for a in sorted(gbl.tnames.keys()): f=gbl.tnames[a] @@ -1700,31 +1475,6 @@ def trackRestart(name, ln): gbl.tnames[name].restart() - -def trackGroove(name, ln): - """ Select a previously defined groove for a single track. """ - - if len(ln) != 1: - error("Use: %s Groove Name" % name) - - - slot = ln[0].upper() - - if not slot in gbl.settingsGroove: - error("Groove '%s' not defined" % slot) - - g=gbl.tnames[name] - g.restoreGroove(slot) - - if g.sequence == [None] * len(g.sequence): - warning("'%s' Track Groove has no sequence. Track name error?" % name) - - g.setSeqSize() - - if gbl.debug: - print "%s Groove settings restored from '%s'." % (name, slot) - - def trackRiff(name, ln): """ Set a riff for a track. """ @@ -1776,6 +1526,8 @@ def trackRvolume(name, ln): gbl.tnames[name].setRVolume(ln) +def trackSwell(name, ln): + gbl.tnames[name].setSwell(ln) def trackCresc(name, ln): gbl.tnames[name].setCresc(1, ln) @@ -2125,11 +1877,10 @@ def trackVoice(name, ln): def trackPan(name, ln): """ Set the Midi Pan value for a track.""" - if len(ln) != 1: - error("Use: %s PAN NN" % name) - - gbl.tnames[name].setPan(ln[0]) - + if len(ln)==1 or len(ln)==3: + gbl.tnames[name].setPan(ln) + else: + error("Use %s MidiPAN [Value] OR [Initvalue DestValue Beats]." % name) def trackOff(name, ln): """ Turn a track off """ @@ -2253,19 +2004,22 @@ def trackUnify(name, ln): simpleFuncs={ 'ADJUSTVOLUME': MMA.volume.adjvolume, + 'ALLGROOVES': MMA.grooves.allgrooves, 'ALLTRACKS': allTracks, 'AUTHOR': MMA.docs.docAuthor, 'AUTOSOLOTRACKS': MMA.patSolo.setAutoSolo, 'BEATADJUST': beatAdjust, 'CHANNELPREF': setChPref, + 'CHORDADJUST': MMA.chords.chordAdjust, 'COMMENT': comment, 'CRESC': MMA.volume.setCresc, 'CUT': cut, 'DEBUG': setDebug, 'DEC': macros.vardec, 'DECRESC': MMA.volume.setDecresc, + 'DEFALIAS': MMA.grooves.grooveAlias, 'DEFCHORD': MMA.chords.defChord, - 'DEFGROOVE': grooveDefine, + 'DEFGROOVE': MMA.grooves.grooveDefine, 'DELETE': deleteTrks, 'DOC': MMA.docs.docNote, 'DOCVAR': MMA.docs.docVars, @@ -2277,8 +2031,8 @@ simpleFuncs={ 'EOF': eof, 'FERMATA': fermata, 'GOTO': goto, - 'GROOVE': groove, - 'GROOVECLEAR': grooveClear, + 'GROOVE': MMA.grooves.groove, + 'GROOVECLEAR': MMA.grooves.grooveClear, 'IF': macros.varIF, 'IFEND': ifend, 'INC': macros.varinc, @@ -2297,7 +2051,7 @@ simpleFuncs={ 'MSET': macros.msetvar, 'MSETEND': endmset, 'NEWSET': macros.newsetvar, - 'CHORDADJUST': MMA.chords.chordAdjust, + 'PATCH': MMA.patch.patch, 'PRINT': lnPrint, 'PRINTACTIVE': printActive, 'PRINTCHORD': MMA.chords.printChord, @@ -2309,17 +2063,20 @@ simpleFuncs={ 'RNDSET': macros.rndvar, 'SEQ': seq, 'SEQCLEAR': seqClear, - 'SEQRND': setSeqRnd, - 'SEQRNDWEIGHT': setSeqRndWeight, + 'SEQRND': MMA.seqrnd.setSeqRnd, + 'SEQRNDWEIGHT': MMA.seqrnd.setSeqRndWeight, 'SEQSIZE': seqsize, 'SET': macros.setvar, 'SETAUTOLIBPATH': setAutoPath, 'SETINCPATH': setIncPath, 'SETLIBPATH': setLibPath, + 'SETMIDIPLAYER': setMidiPlayer, 'SETOUTPATH': setOutPath, 'SHOWVARS': macros.showvars, 'STACKVALUE': macros.stackValue, + 'SWELL': MMA.volume.setSwell, 'SWINGMODE': MMA.notelen.swingMode, + 'SYNCHRONIZE': synchronize, 'TEMPO': tempo, 'TIME': setTime, 'TIMESIG': setTimeSig, @@ -2350,7 +2107,7 @@ trackFuncs={ 'DRUMTYPE': trackDrumType, 'DUPROOT': trackDupRoot, 'FORCEOUT': trackForceOut, - 'GROOVE': trackGroove, + 'GROOVE': MMA.grooves.trackGroove, 'HARMONY': trackHarmony, 'HARMONYONLY': trackHarmonyOnly, 'HARMONYVOLUME': trackHarmonyVolume, @@ -2379,6 +2136,7 @@ trackFuncs={ 'SEQRND': trackSeqRnd, 'SEQUENCE': trackSequence, 'SEQRNDWEIGHT': trackSeqRndWeight, + 'SWELL': trackSwell, 'NOTESPAN': trackSpan, 'STRUM': trackStrum, 'TONE': trackTone, diff --git a/mma/MMA/pat.py b/mma/MMA/pat.py index 3a6791f..40768ee 100644 --- a/mma/MMA/pat.py +++ b/mma/MMA/pat.py @@ -28,34 +28,30 @@ import copy import random import math -import gbl -from MMA.common import * -from MMA.notelen import getNoteLen +import MMA.notelen import MMA.translate import MMA.midi import MMA.midiC -import MMA.alloc import MMA.mdefine import MMA.volume +import MMA.alloc +import MMA.seqrnd + +import gbl +from MMA.common import * + class Voicing: def __init__(self): self.mode = None - self.range = 12 - self.center = 4 - self.random = 0 - self.percent = 0 - self.bcount = 0 - self.dir = 0 + self.range = 12 + self.center = 4 + self.random = 0 + self.percent = 0 + self.bcount = 0 + self.dir = 0 -def seqBump(l): - """ Expand/contract an existing sequence list to the current seqSize.""" - - while len(l) < gbl.seqSize: - l += l - return l[:gbl.seqSize] - pats = {} # Storage for all pattern defines @@ -77,14 +73,14 @@ class PC: def __init__(self, nm): - self.inited = 0 - self.name = nm - self.channel = 0 - self.grooves = {} - self.saveVols = {} - self.ssvoice = -1 # Track the voice set for the track - self.smidiVoice = () # Track MIDIVoice cmds to avoid dups - self.midiSent = 0 # if set, MIDICLEAR invoked. + self.inited = 0 + self.name = nm + self.channel = 0 + self.grooves = {} + self.saveVols = {} + self.ssvoice = -1 # Track the voice set for the track + self.smidiVoice = () # Track MIDIVoice cmds to avoid dups + self.midiSent = 0 # if set, MIDICLEAR invoked. """ Midi commands like Pan, Glis, etc. are stacked until musical @@ -100,9 +96,13 @@ class PC: self.clearSequence() + self.nextVolume = None self.inited = 1 + if gbl.muteTracks and nm not in gbl.muteTracks: + self.disable = 1 + ########################################## ## These are called from process() to set options @@ -110,7 +110,7 @@ class PC: def setCompress(self, ln): """ set/unset the compress flag. """ - ln=self.lnExpand(ln, 'Compress') + ln = lnExpand(ln, '%s Compress' % self.name) tmp = [] @@ -140,7 +140,7 @@ class PC: def setRange(self, ln): """ set range. """ - ln=self.lnExpand(ln, 'Range') + ln = lnExpand(ln, '%s Range' % self.name) tmp = [] @@ -322,9 +322,9 @@ class PC: return """ Get name of track to share with and make sure it exists. - If not, trackAlloc() will create the track. Do some - sanity checks and ensure that the shared track has - a channel assigned. + If not, trackAlloc() will create the track. Do some + sanity checks and ensure that the shared track has + a channel assigned. """ sc = ln.upper() @@ -357,7 +357,6 @@ class PC: self.voice = gbl.tnames[sc].voice[:] self.octave = gbl.tnames[sc].octave[:] - # Update the avail. lists gbl.midiAssigns[self.channel].append(self.name) @@ -384,17 +383,56 @@ class PC: print "Set %s track name for MIDI to %s" % (self.name, n) def setPan(self, ln): - """ Set MIDI Pan for this track. """ + """ Set MIDI Pan for this track. Parse sends 1 or 3 args. """ + + if len(ln)==3: + beats = stof(ln[2]) + if beats < 1: + error("Beat value must be positive count, not '%s'." % beats) + initPan = stoi(ln[0], "Expecting integer value 0..127") + newPan = stoi(ln[1], "Expecting integer value 0..127") + else: + beats = 0 + initPan = 0 + newPan = stoi(ln[0], "Expecting integer value 0..127") - v = stoi(ln[0], "Expecting integer value 0..127") + ticks = beats * gbl.BperQ # convert beats to midi ticks - if v<0 or v>127: - error("PAN value must be 0..127") + if initPan<0 or initPan>127: + error("Initial MidiPAN value must be 0..127") - self.midiPending.append( ("PAN", gbl.tickOffset, v)) + if newPan<0 or newPan>127: + error("Final MidiPAN value must be 0..127") + if newPan0: + step = ticks/span + else: + beats=0 + + if beats: + v=initPan + off=gbl.tickOffset + for a in range(span+1): + self.midiPending.append( ("PAN", int(off), v)) + off+=step + v+=changer + + else: + self.midiPending.append( ("PAN", gbl.tickOffset, newPan)) + if gbl.debug: - print "Set %s MIDIPan to %s" % (self.name, v) + if beats: + print "Set %s MIDIPan from %s to %s over %s beats." % \ + (self.name, initPan, newPan, beats) + else: + print "Set %s MIDIPan to %s" % (self.name, newPan) @@ -428,8 +466,12 @@ class PC: def setOn(self): """ Turn ON track. """ - self.disable = 0 - self.ssvoice = -1 + if gbl.muteTracks and self.name not in gbl.muteTracks: + warning("Attempt to enable muted track %s ignored." % self.name) + + else: + self.disable = 0 + self.ssvoice = -1 if gbl.debug: print "%s Enabled" % self.name @@ -448,7 +490,7 @@ class PC: def setRVolume(self, ln): """ Set the volume randomizer for a track. """ - ln = self.lnExpand(ln, 'RVolume') + ln = lnExpand(ln, '%s RVolume' % self.name) tmp = [] for n in ln: @@ -466,7 +508,7 @@ class PC: self.rVolume = seqBump(tmp) if gbl.debug: - print "Set %s Rvolume to:" % self.name, + print "Set %s Rvolume to:" % self.name, for n in self.rVolume: print int(n * 100), print @@ -475,7 +517,7 @@ class PC: def setRSkip(self, ln): """ Set the note random skip factor for a track. """ - ln = self.lnExpand(ln, 'RSkip') + ln = lnExpand(ln, '%s RSkip' % self.name) tmp = [] for n in ln: @@ -498,7 +540,7 @@ class PC: def setRTime(self, ln): """ Set the timing randomizer for a track. """ - ln=self.lnExpand(ln, 'RTime') + ln = lnExpand(ln, '%s RTime' % self.name) tmp = [] for n in ln: @@ -538,7 +580,7 @@ class PC: def setRndWeight(self, ln): """ Set weighting factors for seqrnd. """ - ln = self.lnExpand(ln, "SeqRndWeight") + ln = lnExpand(ln, "%s SeqRndWeight" % self.name) tmp = [] for n in ln: @@ -556,7 +598,7 @@ class PC: def setDirection(self, ln): """ Set scale direction. """ - ln = self.lnExpand(ln, "Direction") + ln = lnExpand(ln, "%s Direction" % self.name) tmp = [] for n in ln: @@ -594,7 +636,7 @@ class PC: by one rotation for each value. """ - ln=self.lnExpand(ln, "Invert") + ln = lnExpand(ln, "%s Invert" % self.name) vwarn = 0 tmp = [] @@ -623,7 +665,7 @@ class PC: def setOctave(self, ln): """ Set the octave for a track. """ - ln=self.lnExpand(ln, 'Octave') + ln = lnExpand(ln, '%s Octave' % self.name) tmp = [] for n in ln: @@ -662,7 +704,7 @@ class PC: def setHarmony(self, ln): """ Set the harmony. """ - ln=self.lnExpand(ln, 'Harmony') + ln = lnExpand(ln, '%s Harmony' % self.name) tmp = [] for n in ln: @@ -686,7 +728,7 @@ class PC: """ Set the harmony only. """ - ln=self.lnExpand(ln, 'HarmonyOnly') + ln = lnExpand(ln, '%s HarmonyOnly' % self.name) tmp = [] for n in ln: @@ -710,7 +752,7 @@ class PC: def setHarmonyVolume(self, ln): """ Set harmony volume adjustment. """ - ln=self.lnExpand(ln, 'HarmonyOnly') + ln = lnExpand(ln, '%s HarmonyOnly' % self.name) tmp = [] for n in ln: @@ -766,24 +808,46 @@ class PC: def setVoice(self, ln): """ Set the voice for a track. - Note, this just sets flags, the voice is set in bar(). - ln[] is not nesc. set to the correct length. + Note, this just sets flags, the voice is set in bar(). + ln[] is not nesc. set to the correct length. + + the voice can be gm-string, user-def-string, or value. + A value can be xx.yy.vv, yy.vv or vv """ - ln=self.lnExpand(ln, 'Voice') + ln = lnExpand(ln, '%s Voice' % self.name) tmp = [] - + for n in ln: n = MMA.translate.vtable.get(n) - a=MMA.midiC.instToValue(n) + voc=MMA.midiC.instToValue(n) - if a < 0: - a=stoi(n, "Expecting a valid voice name or value, " - "not '%s'" % n) - if a <0 or a > 127: - error("Voice must be 0..127") - tmp.append( a ) + if voc < 0 and n[0].isalpha(): + error("Voice '%s' is not defined." % n) + if voc < 0: # not a valid name, assume vv.msb(ctrl0).lsb(ctrl32) value + nn = n.split('.') + if len(nn) > 3 or len(nn) < 1: + error("Expecting a voice value Prog.MSB.LSB, not '%s'" % n) + voc = 0 + if len(nn) > 2: + i = stoi(nn[2]) + if i<0 or i>127: + error("LSB must be 0..127, not '%s'" % i) + voc = i << 16 + if len(nn) > 1: + i = stoi(nn[1]) + if i<0 or i>127: + error("MSB must be 0..127, not '%s'" % i) + voc += i << 8 + + i = stoi(nn[0]) + if i<0 or i>127: + error("Program must be 0..127, not '%s'" % i) + voc += i + + tmp.append( voc ) + self.voice = seqBump(tmp) if self.channel and len(gbl.midiAssigns[self.channel])>1: @@ -794,11 +858,10 @@ class PC: warning("Track %s is shared with %s,\n" " changing voice may create conflict" % (a,self.name)) - if gbl.debug: print "Set %s Voice to:" % self.name, - for a in self.voice: - print MMA.midiC.valueToInst(a), + for i in self.voice: + print MMA.midiC.valueToInst(i), print @@ -828,7 +891,12 @@ class PC: gbl.mtrks[self.channel].addCtl(gbl.tickOffset, i[1]) self.midiSent = 0 + + def doChannelReset(self): + """ Reset the midi voicing to 'sane'. Called when track ended. """ + if self.ssvoice > 127: + gbl.mtrks[self.channel].addProgChange( gbl.tickOffset, 0, self.ssvoice) def setMidiSeq(self, ln): """ Set a midi sequence for a track. @@ -842,7 +910,7 @@ class PC: """ lnExpand() works here! The midi data has been converted to pseudo-macros already in the parser. """ - ln=self.lnExpand(ln, "MidiSeq") + ln = lnExpand(ln, "%s MidiSeq" % self.name) seq = [] for a in ln: @@ -875,7 +943,7 @@ class PC: """ lnExpand() works here! The midi data has been converted to pseudo-macros already in the parser. """ - ln = self.lnExpand(ln, 'MIDIVoice') + ln = lnExpand(ln, '%s MIDIVoice' % self.name) seq = [] for a in ln: @@ -916,7 +984,7 @@ class PC: ln[] not nesc. correct length """ - ln=self.lnExpand(ln, 'Volume') + ln = lnExpand(ln, '%s Volume' % self.name) tmp = [None] * len(ln) for i,n in enumerate(ln): @@ -944,6 +1012,9 @@ class PC: self.setVolume([ln[0]]) ln=ln[1:] + if len(ln) != 2: + error("Cresc expecting 2 or 3 args.") + vol = self.volume[0] if self.volume.count(vol) != len(self.volume): @@ -951,7 +1022,53 @@ class PC: self.futureVols = MMA.volume.fvolume(dir, vol, ln) + if gbl.debug: + print "Set %s Cresc to:" % self.name, + for a in self.futureVols: + print int(a*100), + print + + def setSwell(self, ln): + """ Set a swell (cresc<>decresc) for track. """ + + if len(ln) == 3: # 3 args, 1st is intial setting + self.setVolume([ln[0]]) + ln=ln[1:] + + if len(ln) != 2: + error("%s Swell expecting 2 or 3 args." % self.name) + + if self.volume.count(self.volume[0]) != len(self.volume): + warning("%s Swell being used with track with variable sequence volumes." \ + % self.name) + + count = stoi(ln[1]) + if count < 2: + error("%s Swell bar count must be 2 or greater." % self.name) + + count += 1 + c = int(count/2) + if count % 2: # even number of bars (we bumped count) + offset = 1 + c+=1 + else: # odd number + offset = 0 + c=str(c) + + self.futureVols = MMA.volume.fvolume(0 ,self.volume[0], + [ ln[0], c ] ) + + self.futureVols.extend(MMA.volume.fvolume(0, self.futureVols[-1], + [str(int(self.volume[0]*100)), c ] )[offset:] ) + + if gbl.debug: + print "Set %s Swell to:" % self.name, + for a in self.futureVols: + print int(a*100), + print + + def setMallet(self, ln): """ Mallet (repeat) settngs. """ @@ -962,7 +1079,7 @@ class PC: error("Each Mallet option must contain a '=', not '%s'" % l) if mode == 'RATE': - self.mallet = getNoteLen(val) + self.mallet = MMA.notelen.getNoteLen(val) elif mode == 'DECAY': val = stof(val, "Mallet Decay must be a value, not '%s'" % val) @@ -983,45 +1100,44 @@ class PC: tmp = [] - """ We can do "Track Accent 1 20 3 -10" or "Track Accent {1 20 3 -10}" - or even something like "Track Accent {1 20} / {/} {3 20}" - Note that the "/" can or not have {}s. + """ 2 ways to call this: + + Track Accent 1 20 3 -10 -- fix up by adding {} around entire option list, + Track Accent {1 20 3 -10} -- okay + Track Accent {1 20} / {/} {3 20} -- okay. + + At this point ln is a string. We extract each set of {}s and build a + new ln[]. + + Note that the "/" can or not have {}s. """ ln = ' '.join(ln) if not ln.startswith('{'): ln='{' + ln +"}" - # Convert string to list. One entry per seq. - l=[] - while ln: - if not ln.startswith("{"): - if ln[0]=='/': - l.append('/') - ln=ln[1:].strip() - else: - error("Unknown value in %s Accent: %s" % (self.name, ln[0])) + while ln: + if ln[0] == "/": # / not delimited with {} + ln = "{/}" + ln[1:] + + a,b = pextract(ln, "{", "}", 1) + ln=a.strip() + if len(b)==1 and b[0]=='/': # convert ['/'] to '/' for lnExpand() + l.append('/') else: - a,b = pextract(ln, "{", "}", 1) - ln=a.strip() - if len(b)==1 and b[0]=='/': - l.append('/') - else: - l.append(b[0].split()) - - - ln=self.lnExpand(l, 'Accent') - + l.append(b[0].split()) + + ln = lnExpand(l, '%s Accent' % self.name) for l in ln: tt=[] - if len(l)/2*2 != len(l): + if len(l)/2*2 != len(l): error("Use: %s Accent Beat Percentage [...]" % self.name) for b, v in zip(l[::2], l[1::2]): b=self.setBarOffset( b ) - v=stoi(v, "Bbeat offset must be a value, not '%s'" % v) + v=stoi(v, "Beat offset must be a value, not '%s'" % v) if v < -100 or v > 100: error("Velocity adjustment (as percentage) must " "be -100..100, not '%s'" % v) @@ -1044,7 +1160,7 @@ class PC: def setArtic(self, ln): """ Set the note articuation value. """ - ln=self.lnExpand(ln, 'Articulate') + ln = lnExpand(ln, '%s Articulate' % self.name) tmp = [] for n in ln: @@ -1067,7 +1183,7 @@ class PC: def setUnify(self, ln): """ Set unify. """ - ln = self.lnExpand(ln, "Unify") + ln = lnExpand(ln, "%s Unify" % self.name) tmp = [] for n in ln: @@ -1086,29 +1202,6 @@ class PC: printList(self.unify) - - def lnExpand(self, ln, cmd): - """ Validate and expand a list passed to a set command. """ - - if len(ln) > gbl.seqSize: - warning("%s list truncated to %s patterns" % (self.name, gbl.seqSize) ) - ln = ln[:gbl.seqSize] - - last = None - - for i,n in enumerate(ln): - if n == '/': - if not last: - error ("You cannot use a '/' as the first item " - "in a %s list" % cmd) - else: - ln[i] = last - else: - last = n - - return ln - - def copySettings(self, cp): """ Copy the voicing from a 2nd voice to the current one. """ @@ -1174,25 +1267,25 @@ class PC: 'HARMONYO': self.harmonyOnly[:], 'HARMONYV': self.harmonyVolume[:], 'INVERT': self.invert[:], - 'LIMIT': self.chordLimit, - 'RANGE': self.chordRange[:], + 'LIMIT': self.chordLimit, + 'RANGE': self.chordRange[:], 'OCTAVE': self.octave[:], - 'RSKIP': self.rSkip[:], - 'RTIME': self.rTime[:], - 'RVOLUME': self.rVolume[:], - 'SCALE': self.scaleType[:], - 'SEQ': self.sequence[:], + 'RSKIP': self.rSkip[:], + 'RTIME': self.rTime[:], + 'RVOLUME': self.rVolume[:], + 'SCALE': self.scaleType[:], + 'SEQ': self.sequence[:], 'SEQRND': self.seqRnd, - 'SEQRNDWT': self.seqRndWeight[:], - 'STRUM': self.strum[:], - 'VOICE': self.voice[:], + 'SEQRNDWT': self.seqRndWeight[:], + 'STRUM': self.strum[:], + 'VOICE': self.voice[:], 'VOLUME': self.volume[:], - 'UNIFY': self.unify[:], - 'MIDISEQ': self.midiSeq[:], - 'MIDIVOICE':self.midiVoice[:], - 'MIDICLEAR':self.midiClear[:], - 'SPAN': (self.spanStart, self.spanEnd), - 'MALLET': (self.mallet, self.malletDecay), + 'UNIFY': self.unify[:], + 'MIDISEQ': self.midiSeq[:], + 'MIDIVOICE': self.midiVoice[:], + 'MIDICLEAR': self.midiClear[:], + 'SPAN': (self.spanStart, self.spanEnd), + 'MALLET': (self.mallet, self.malletDecay), } @@ -1291,7 +1384,7 @@ class PC: """ - ln=self.lnExpand(ln, 'Sequence') + ln = lnExpand(ln, '%s Sequence' % self.name) tmp = [None] * len(ln) for i, n in enumerate(ln): @@ -1555,9 +1648,9 @@ class PC: plist.sort(patsort) if gbl.swingMode: - len8 = getNoteLen('8') - len81 = getNoteLen('81') - len82 = getNoteLen('82') + len8 = MMA.notelen.getNoteLen('8') + len81 = MMA.notelen.getNoteLen('81') + len82 = MMA.notelen.getNoteLen('82') onBeats = [ x * gbl.BperQ for x in range(gbl.QperBar)] offBeats = [ (x * gbl.BperQ + len8) for x in range(gbl.QperBar)] @@ -1574,19 +1667,26 @@ class PC: p.offset = onBeats[i] + len81 return plist - - + + def printPattern(self, pat): """ Print a pattern. Used by debugging code.""" - s=[] + print self.formatPattern(pat) + + def formatPattern(self, pat): + pp=[] + if not pat: + return ' z ' + for p in pat: - s.append(" %2.2f %2.0f" % (1+(p.offset/float(gbl.BperQ)), + s=[] + s.append("%.2f %.0f" % (1+(p.offset/float(gbl.BperQ)), p.duration)) if self.vtype == 'CHORD': for a in p.vol: - s.append( " %2.0f" % a) + s.append( "%.0f" % a) elif self.vtype == 'BASS': f=str(p.noteoffset+1) @@ -1601,21 +1701,20 @@ class PC: elif p.addoctave < 0: f+="-" * (p.addoctave/-12) - s.append( " %s %2.0f" % (f, p.vol ) ) + s.append( "%s %.0f" % (f, p.vol ) ) elif self.vtype == 'ARPEGGIO': - s.append( " %2.0f " % p.vol ) + s.append( "%.0f " % p.vol ) elif self.vtype == 'DRUM': - s.append(" %2.0f" % p.vol) + s.append("%.0f" % p.vol) elif self.vtype == 'WALK': - s.append(" %2.0f" % p.vol ) - - s.append(' ;') - s.append('\n') - s[-2]=' ' - print "".join(s) + s.append("%.0f" % p.vol ) + + pp.append(' '.join(s)) + + return "; ".join(pp) def insertVoice(self): @@ -1624,13 +1723,13 @@ class PC: sc = gbl.seqCount """ 1st pass for MIDIVOICE. There's a separate slot for - each bar in the sequence, plus the data can be sent - before or after 'voice' commands. This first loop - sends MIDIVOICE data with an offset of 0. Note, we - don't set the value for 'self.smidiVoice' until we - do this again, later. All this is needed since some - MIDIVOICE commands NEED to be sent BEFORE voice selection, - and others AFTER. + each bar in the sequence, plus the data can be sent + before or after 'voice' commands. This first loop + sends MIDIVOICE data with an offset of 0. Note, we + don't set the value for 'self.smidiVoice' until we + do this again, later. All this is needed since some + MIDIVOICE commands NEED to be sent BEFORE voice selection, + and others AFTER. """ if self.midiVoice: @@ -1644,18 +1743,20 @@ class PC: v=self.voice[sc] if v != self.ssvoice: - gbl.mtrks[self.channel].addProgChange( gbl.tickOffset, v) + + gbl.mtrks[self.channel].addProgChange( gbl.tickOffset, v, self.ssvoice) self.ssvoice = v # Mark ssvoice also in shared tracks for a in gbl.midiAssigns[self.channel]: - if gbl.tnames.has_key(a): + try: gbl.tnames[a].ssvoice = v + except KeyError: + pass - if gbl.debug: - print "Track %s Voice %s inserted" \ - % (self.name, MMA.midiC.valueToInst(v) ) + if gbl.debug: + print "Track %s Voice %s inserted" % (self.name,MMA.midiC.valueToInst(v) ) """ Our 2nd stab at MIDIVOICE. This time any sequences with offsets >0 are sent. AND the smidiVoice and midiSent @@ -1685,6 +1786,10 @@ class PC: if self.futureVols: self.volume = seqBump([self.futureVols.pop(0)]) + if self.futureVols: + self.nextVolume = self.futureVols[0] + else: + self.nextVolume = None # If track is off don't do anything else. @@ -1702,12 +1807,7 @@ class PC: """ if self.seqRnd: - tmp = [] - for x, i in enumerate(self.seqRndWeight): - tmp.extend([x] * i) - if not len(tmp): - error("SeqRndWeight has generated an empty list") - self.seq = random.choice(tmp) + self.seq = MMA.seqrnd.getrndseq(self.seqRndWeight) else: self.seq = gbl.seqCount @@ -1717,7 +1817,6 @@ class PC: if self.riff: pattern = self.riff.pop(0) - else: pattern = self.sequence[sc] @@ -1816,11 +1915,25 @@ class PC: a1 = self.volume[sc] if not a1: return 0 + + if self.nextVolume: # inter-bar cresc adjust + bt=beat + if bt<1: # might have negative offsets, cres code ignores + bt=0 + a1 += (self.nextVolume - a1) * bt / (gbl.BperQ * gbl.QperBar) + a1 *= MMA.volume.vTRatio a2 = MMA.volume.volume if not a2: return 0 + + if MMA.volume.nextVolume: # inter-bar cresc adjust + bt=beat + if bt<1: # might have negative offsets, cres code ignores + bt=0 + a2 += (MMA.volume.nextVolume - a2) * bt / (gbl.BperQ * gbl.QperBar) + a2 *= MMA.volume.vMRatio v *= ( a1 + a2 ) @@ -1895,12 +2008,11 @@ class PC: else: note = None - v=stof(v, "Value for %s bar offset must be integer/float" % self.name) v = (v-1) * gbl.BperQ if note: - v += getNoteLen(note) * sign + v += MMA.notelen.getNoteLen(note) * sign if v < 0: if v<-gbl.BperQ: @@ -1938,7 +2050,7 @@ class PC: if not velocity: return - + sc = self.seq rptr = self.mallet diff --git a/mma/MMA/patAria.py b/mma/MMA/patAria.py index 13aaedb..50adf3f 100644 --- a/mma/MMA/patAria.py +++ b/mma/MMA/patAria.py @@ -23,15 +23,15 @@ Bob van der Poel """ +import random +import MMA.notelen +import MMA.harmony import gbl -from MMA.notelen import getNoteLen from MMA.common import * -from MMA.harmony import harmonize -from MMA.pat import PC, seqBump +from MMA.pat import PC -import random class Aria(PC): """ Pattern class for an aria (auto-melody) track. """ @@ -70,7 +70,7 @@ class Aria(PC): a = struct() a.offset = self.setBarOffset(ev[0]) - a.duration = getNoteLen( ev[1] ) + a.duration = MMA.notelen.getNoteLen( ev[1] ) a.vol = stoi(ev[2], "Note volume in Aria definition not int") return a @@ -79,7 +79,7 @@ class Aria(PC): def setScaletype(self, ln): """ Set scale type. """ - ln = self.lnExpand(ln, "ScaleType") + ln = lnExpand(ln, "%s ScaleType" % self.name) tmp = [] for n in ln: @@ -213,7 +213,7 @@ class Aria(PC): if self.harmony[sc]: - h = harmonize(self.harmony[sc], note, ct.chord.noteList) + h = MMA.harmony.harmonize(self.harmony[sc], note, ct.chord.noteList) for n in h: self.sendNote( p.offset, diff --git a/mma/MMA/patArpeggio.py b/mma/MMA/patArpeggio.py index 4ca1a81..c66456f 100644 --- a/mma/MMA/patArpeggio.py +++ b/mma/MMA/patArpeggio.py @@ -25,14 +25,13 @@ Bob van der Poel import random +import MMA.notelen +import MMA.harmony + import gbl -from MMA.notelen import getNoteLen from MMA.common import * -from MMA.harmony import harmonize from MMA.pat import PC - - class Arpeggio(PC): """ Pattern class for an arpeggio track. """ @@ -52,7 +51,7 @@ class Arpeggio(PC): "for apreggio define, not '%s'" % ' '.join(ev) ) a.offset = self.setBarOffset(ev[0]) - a.duration = getNoteLen(ev[1]) + a.duration = MMA.notelen.getNoteLen(ev[1]) a.vol = stoi(ev[2], "Type error in Arpeggio definition") return a @@ -147,7 +146,7 @@ class Arpeggio(PC): if self.harmony[sc]: - h = harmonize(self.harmony[sc], note, ourChord) + h = MMA.harmony.harmonize(self.harmony[sc], note, ourChord) for n in h: self.sendNote( p.offset, diff --git a/mma/MMA/patBass.py b/mma/MMA/patBass.py index df8f253..4938083 100644 --- a/mma/MMA/patBass.py +++ b/mma/MMA/patBass.py @@ -24,11 +24,11 @@ Bob van der Poel """ +import MMA.notelen +import MMA.harmony import gbl -from MMA.notelen import getNoteLen from MMA.common import * -from MMA.harmony import harmonize from MMA.pat import PC @@ -51,7 +51,7 @@ class Bass(PC): a = struct() a.offset = self.setBarOffset(ev[0]) - a.duration = getNoteLen( ev[1] ) + a.duration = MMA.notelen.getNoteLen( ev[1] ) offset = ev[2] n=offset[0] @@ -119,7 +119,7 @@ class Bass(PC): if self.harmony[sc]: - h = harmonize(self.harmony[sc], note, ct.chord.noteList) + h = MMA.harmony.harmonize(self.harmony[sc], note, ct.chord.noteList) for n in h: self.sendNote( p.offset, diff --git a/mma/MMA/patChord.py b/mma/MMA/patChord.py index 4bec74f..38a9334 100644 --- a/mma/MMA/patChord.py +++ b/mma/MMA/patChord.py @@ -26,10 +26,12 @@ Bob van der Poel import random + +import MMA.notelen + import gbl -from MMA.notelen import getNoteLen from MMA.common import * -from MMA.pat import PC, seqBump +from MMA.pat import PC @@ -136,7 +138,7 @@ class Chord(PC): """ set/unset root duplication. Only for CHORDs """ - ln=self.lnExpand(ln, 'DupRoot') + ln = lnExpand(ln, '%s DupRoot' % self.name) tmp = [] for n in ln: @@ -157,7 +159,7 @@ class Chord(PC): def setStrum(self, ln): """ Set Strum time. """ - ln=self.lnExpand(ln, 'Strum') + ln = lnExpand(ln, '%s Strum' % self.name) tmp = [] for n in ln: @@ -187,7 +189,7 @@ class Chord(PC): a = struct() a.offset = self.setBarOffset(ev[0]) - a.duration = getNoteLen(ev[1]) + a.duration = MMA.notelen.getNoteLen(ev[1]) vv = ev[2:] if len(vv)>8: @@ -401,4 +403,3 @@ class Chord(PC): self.voicing.bcount -= 1 - diff --git a/mma/MMA/patDrum.py b/mma/MMA/patDrum.py index dd272ab..b14b207 100644 --- a/mma/MMA/patDrum.py +++ b/mma/MMA/patDrum.py @@ -23,12 +23,12 @@ Bob van der Poel """ +import MMA.notelen +import MMA.translate + import gbl from MMA.common import * -from MMA.notelen import getNoteLen -import MMA.translate -from MMA.pat import PC, seqBump - +from MMA.pat import PC class Drum(PC): """ Pattern class for a drum track. """ @@ -51,7 +51,7 @@ class Drum(PC): ln[] is not nesc. the right length. """ - ln=self.lnExpand(ln, 'Tone') + ln = lnExpand(ln, '%s Tone' % self.name) tmp = [] for n in ln: @@ -77,7 +77,7 @@ class Drum(PC): a = struct() a.offset = self.setBarOffset(ev[0]) - a.duration = getNoteLen(ev[1]) + a.duration = MMA.notelen.getNoteLen(ev[1]) a.vol = stoi(ev[2], "Type error in Drum volume") return a diff --git a/mma/MMA/patScale.py b/mma/MMA/patScale.py index 21e7701..e433a51 100644 --- a/mma/MMA/patScale.py +++ b/mma/MMA/patScale.py @@ -25,12 +25,12 @@ Bob van der Poel import random -from MMA.harmony import harmonize -from MMA.notelen import getNoteLen +import MMA.harmony +import MMA.notelen +from MMA.pat import PC + import gbl from MMA.common import * -from MMA.pat import PC, seqBump - class Scale(PC): """ Pattern class for a Scale track. """ @@ -60,7 +60,7 @@ class Scale(PC): a = struct() a.offset = self.setBarOffset(ev[0]) - a.duration = getNoteLen(ev[1]) + a.duration = MMA.notelen.getNoteLen(ev[1]) a.vol = stoi(ev[2], "Type error in Scale definition") @@ -69,7 +69,7 @@ class Scale(PC): def setScaletype(self, ln): """ Set scale type. """ - ln = self.lnExpand(ln, "ScaleType") + ln = lnExpand(ln, "%s ScaleType" % self.name) tmp = [] for n in ln: @@ -220,7 +220,7 @@ class Scale(PC): if self.harmony[sc]: ch = self.getChordInPos(p.offset, ctable).chord.noteList - h = harmonize(self.harmony[sc], note, ch) + h = MMA.harmony.harmonize(self.harmony[sc], note, ch) for n in h: self.sendNote( p.offset, diff --git a/mma/MMA/patSolo.py b/mma/MMA/patSolo.py index f3a32c9..c590262 100644 --- a/mma/MMA/patSolo.py +++ b/mma/MMA/patSolo.py @@ -23,14 +23,16 @@ Bob van der Poel """ +import MMA.notelen +import MMA.translate +import MMA.harmony +import MMA.volume +import MMA.alloc + import gbl from MMA.common import * -from MMA.notelen import getNoteLen -import MMA.translate -from MMA.harmony import harmonize from MMA.pat import PC -import MMA.alloc -import MMA.volume + class NoteList: @@ -79,9 +81,10 @@ class Melody(PC): if len(ln) > 1: error("Only 1 value permitted for Drum Tone in Solo tracks") - + + self.drumTone = MMA.translate.dtable.get(ln[0]) - + def getLine(self, pat, ctable): """ Extract a melodyline for solo/melody tracks. @@ -128,25 +131,25 @@ class Melody(PC): """ if gbl.swingMode: - len8 = getNoteLen('8') - len81 = getNoteLen('81') - len82 = getNoteLen('82') + len8 = MMA.notelen.getNoteLen('8') + len81 = MMA.notelen.getNoteLen('81') + len82 = MMA.notelen.getNoteLen('82') onBeats = [ x * gbl.BperQ for x in range(gbl.QperBar)] offBeats = [ (x * gbl.BperQ + len8) for x in range(gbl.QperBar)] - length = getNoteLen('4') # default note length + length = MMA.notelen.getNoteLen('4') # default note length lastc = '' # last parsed note velocity = 90 # intial/default velocity for solo notes notes={} # A dict of NoteList, keys == offset - + if self.drumType: isdrum = 1 lastc = str(self.drumTone) else: isdrum = None - + pat = pat.replace(' ', '').split(';')[:-1] # set initial offset into bar @@ -206,7 +209,7 @@ class Melody(PC): i+=1 if i: - l=getNoteLen(a[0:i]) + l=MMA.notelen.getNoteLen(a[0:i]) c=a[i:] else: l=length @@ -220,7 +223,6 @@ class Melody(PC): length = l # set defaults for next loop lastc = c - """ Convert the note part into a series of midi values Notes can be a single note, or a series of notes. And each note can be a letter a-g (or r), a '#,&,n' plus @@ -286,7 +288,7 @@ class Melody(PC): elif name == '*': v = self.drumTone else: - v = MMA.translate.dtable.get(name) + v = int(MMA.translate.dtable.get(name)) """ Swingmode -- This tests for successive 8ths on/off beat @@ -310,7 +312,7 @@ class Melody(PC): notes[offset] = NoteList(l) # add note event to note[] array - + notes[offset].nl.append(v) notes[offset].velocity.append(self.adjustVolume(velocity, offset)) @@ -336,7 +338,7 @@ class Melody(PC): def addHarmony(self, notes, ctable): """ Add harmony to solo notes. """ - + sc=self.seq harmony = self.harmony[sc] @@ -352,7 +354,7 @@ class Melody(PC): if tb.chordZ: continue - h = harmonize(harmony, nn.nl[0], tb.chord.bnoteList) + h = MMA.harmony.harmonize(harmony, nn.nl[0], tb.chord.bnoteList) """ If harmonyonly set then drop note, substitute harmony, else append harmony notes to chord. @@ -622,7 +624,7 @@ def extractSolo(ln, rptcount): """ for t in autoSoloTracks[1:]: - if gbl.tnames.has_key(t) and gbl.tnames[t].riff == [] \ + if t in gbl.tnames and gbl.tnames[t].riff == [] \ and max(gbl.tnames[t].harmonyOnly): gbl.tnames[t].setRiff( firstSolo[:] ) diff --git a/mma/MMA/patWalk.py b/mma/MMA/patWalk.py index 63fe4dc..6264cd0 100644 --- a/mma/MMA/patWalk.py +++ b/mma/MMA/patWalk.py @@ -26,13 +26,14 @@ Bob van der Poel import random -from MMA.harmony import harmonize -from MMA.notelen import getNoteLen + +import MMA.harmony +import MMA.notelen + import gbl from MMA.common import * from MMA.pat import PC - class Walk(PC): """ Pattern class for a walking bass track. """ @@ -52,7 +53,7 @@ class Walk(PC): a = struct() a.offset = self.setBarOffset(ev[0]) - a.duration = getNoteLen(ev[1]) + a.duration = MMA.notelen.getNoteLen(ev[1]) a.vol = stoi(ev[2], "Type error in Walking Bass definition") return a @@ -152,7 +153,7 @@ class Walk(PC): if self.harmony[sc]: ch = self.getChordInPos(p.offset, ctable).chord.noteList - h = harmonize(self.harmony[sc], note, ch) + h = MMA.harmony.harmonize(self.harmony[sc], note, ch) for n in h: self.sendNote( p.offset, diff --git a/mma/MMA/patch.py b/mma/MMA/patch.py new file mode 100644 index 0000000..5651b57 --- /dev/null +++ b/mma/MMA/patch.py @@ -0,0 +1,148 @@ +# patch.py + +""" +This module is an integeral part of the program +MMA - Musical Midi Accompaniment. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Bob van der Poel + +This module contains the various patch manger routines. + +""" + +from MMA.common import * +from MMA.miditables import * +import MMA.file +import MMA.midiC + +def patch(ln): + """ Main routine to manage midi patch names. """ + + for i,a in enumerate(ln): + + if a.count('=') == 1: + a,b = a.split('=') + else: + b='' + a=a.upper() + + if a == "LIST": + b=b.upper() + if b == "ALL": + plistall() + elif b == "EXT": + plistext() + elif b == "GM": + plistgm() + else: + error("Expecting All, EXT or GM argument for List") + + if a == "RENAME": + prename(ln[i+1:]) + break + + if a == 'SET': + patchset(ln[i+1:]) + break + + error("Unknown option for Patch: %s" % a) + +# Set a patch value=name + +def patchset(ln): + if not ln: + error("Patch Set expecting list of value pairs.") + + for a in ln: + + try: + v,n = a.split('=', 1) + except: + error("Patch Set expecting value=name pair, not: %s" % a) + + v=v.split('.') + if len(v) > 3 or len(v) < 1: + error("Patch Set: Expecting a voice value Prog.MSB.LSB." ) + + voc = 0 + if len(v) > 2: # ctrl32 + i = stoi(v[2], "Patch Set LSB expecting integer.") + if i<0 or i>127: + error("LSB must be 0..127, not '%s'." % i) + voc = i << 16 + + if len(v) > 1: # ctrl0 + i = stoi(v[1], "Patch Set MSB expecting integer.") + if i<0 or i>127: + error("MSB must be 0..127, not '%s'." % i) + voc += i << 8 + + i = stoi(v[0], "Patch Set Voice expecting integer.") + if i<0 or i>127: + error("Program must be 0..127, not '%s'." % i) + voc += i + + if voc in voiceNames: + warning("Patch Set duplicating voice name %s with %s=%s" % \ + (voiceNames[voc], n, MMA.midiC.extVocStr(voc) )) + if n.upper() in voiceInx: + warning("Patch Set duplicating voice value %s with %s=%s" % \ + (MMA.midiC.extVocStr(voiceInx[n.upper()]), + MMA.midiC.extVocStr(voc), n) ) + voiceNames[voc]=n + voiceInx[n.upper()]=voc + + + +# Rename + +def prename(ln): + if not ln: + error("Patch Rename expecting list of value pairs.") + + for a in ln: + if not a.count("=") == 1: + error("Patch Rename expecting oldname=newname pair") + + a,b = a.split("=") + + if not a.upper() in voiceInx: + error("Patch %s doen't exist, can't be renamed." % a) + + if b.upper() in voiceInx: + error("Patch name %s already exists" % b) + + v = voiceInx[a.upper()] + voiceNames[v]=b + del voiceInx[a.upper()] + voiceInx[b.upper()]=v + +# list funcs + +def plistgm(): + for v in sorted(voiceNames.keys()): + if v <= 127: + print "%s=%s" % (MMA.midiC.extVocStr(v), voiceNames[v] ) + +def plistall(): + plistgm() + plistext() + +def plistext(): + for v in sorted(voiceNames.keys()): + if v>127: + print "%s=%s" % (MMA.midiC.extVocStr(v), voiceNames[v]) diff --git a/mma/MMA/safe_eval.py b/mma/MMA/safe_eval.py new file mode 100644 index 0000000..ce15275 --- /dev/null +++ b/mma/MMA/safe_eval.py @@ -0,0 +1,48 @@ +# safe_eval.py + +""" +This module is an integeral part of the program +MMA - Musical Midi Accompaniment. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Bob van der Poel + +""" + +import re +from math import * + +from common import error + +safeCmds = [ 'ceil', 'fabs', 'floor', 'exp', 'log', 'log10', 'pow', + 'sqrt', 'acos', 'asin', 'atan', 'atan2', 'cos', 'hypot', + 'sin', 'tan', 'degrees', 'radians', 'cosh', 'sinh', + 'int', 'in', '.join', 'str', '.split', 'for' ] + +def safe_eval( expr ): + + toks = re.split( r'([a-zA-Z_\.]+|.)', expr ) + + for t in toks: + if len(t)>1 and t not in safeCmds: + error("Illegal/Unknown operator '%s' in $()." % t) + try: + return eval(expr) + except: + error("Illegal operation in '%s'." % expr) + + + diff --git a/mma/MMA/seqrnd.py b/mma/MMA/seqrnd.py new file mode 100644 index 0000000..78ef075 --- /dev/null +++ b/mma/MMA/seqrnd.py @@ -0,0 +1,155 @@ + +# seqrnd.py + +""" +This module is an integeral part of the program +MMA - Musical Midi Accompaniment. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Bob van der Poel + +""" + +import random + +from MMA.common import * + + +""" SeqRnd variable is a list. The first entry is a flag:(0, 1 or x): + 0 - not set + 1 - set + 2 - set for specific tracks, track list starts at position [1] +""" + +seqRnd = [0] # set if SEQRND has been set +seqRndWeight = [1] + + + +def setseq(): + """ Set up the seqrnd values, called from parse loop. + + + returns: + 0... a random sequence number, + -1 signals that rndseq is not enabled. + + There are three methods of rndseq. They depend on the first value + in the list seqRnd[]: + + [0] not enabled. + [1] random selection, keeps all tracks in sync. + [2] randomize selected tracks. + + The list seqRndWeight has at least the same number of entries in it + as there are in the sequence size. By default each will have + the same value of 1. A list of the valid sequence points is + generated (ie, if seqsize==4 tmp will be [0,1,2,3]). In addition + the weights of each entry in tmp[] is adjusted by the weights in + the seqrndweight[] list. + """ + + if seqRnd[0]: + r = getrndseq(seqRndWeight) + if seqRnd[0] == 1: + gbl.seqCount = r + r = -1 + else: + r = -1 + + return ( r, seqRnd[1:] ) + +def getrndseq(v): + tmp = [] + for x, i in enumerate(v): + tmp.extend([x] * i) + tmp=tmp[:gbl.seqSize] + + if not len(tmp): + error("SeqRndWeight has generated an empty list") + + return random.choice(tmp) + + +## Main parser routines + +def setSeqRnd(ln): + """ Set random order for all tracks. """ + + global seqRnd + + emsg = "use [ON, OFF or TrackList ]" + if not ln: + error("SeqRnd:" + emsg) + + a=ln[0].upper() + + if a in ("ON", "1") and len(ln) == 1: + seqRnd = [1] + + elif a in ("OFF", "0") and len(ln) == 1: + seqRnd = [0] + + else: + seqRnd=[2] + for a in ln: + a = a.upper() + if not a in gbl.tnames: + error("SeqRnd: Track '%s' does not exist, %s" % (a, emsg)) + if a in seqRnd: + error("SeqRnd: Duplicate track '%s' specified, %s" % (a, emsg)) + seqRnd.append(a) + + if gbl.debug: + print "SeqRnd:", + if seqRnd[0] == 2: + for a in seqRnd[1:]: + print a, + print + elif seqRnd[0] == 1: + print "On" + else: + print "Off" + +def getweights(ln, msg): + + ln = lnExpand(ln, msg) + + if not ln: + error("Use: %s " % msg) + + tmp = [] + for n in ln: + n = stoi(n) + if n < 0: error("%s: Values must be 0 or greater" % msg) + tmp.append(n) + + tmp = seqBump(tmp) + + if gbl.debug: + print "%s: " % msg, + printList(tmp) + + return tmp + + +def setSeqRndWeight(ln): + """ Set global rnd weight. """ + + global seqRndWeight + + seqRndWeight = getweights(ln, "SeqRndWeight") + diff --git a/mma/MMA/translate.py b/mma/MMA/translate.py index 7f4534a..03e45b2 100644 --- a/mma/MMA/translate.py +++ b/mma/MMA/translate.py @@ -26,11 +26,13 @@ This module handles voice name translations. """ -import gbl import MMA.midiC + +import gbl from MMA.common import * + """ Translation table for VOICE. This is ONLY used when a voice is set from the VOICE command. If a translation exists the translation is substituted. @@ -78,10 +80,9 @@ class Vtable: """ Return a translation or original. """ name=name.upper() - if self.table.has_key(name): + try: return self.table[name] - - else: + except KeyError: return name vtable=Vtable() # Create single class instance. @@ -123,24 +124,32 @@ class Dtable: error("Each translation pair must be in the format Voice=Alias") v,a = l.split('=') - v=MMA.midiC.drumToValue(v) - a=MMA.midiC.drumToValue(a) + v1=MMA.midiC.drumToValue(v) + if v1<0: + error("Drum Tone '%s' not defined." % v) + a1=MMA.midiC.drumToValue(a) + if a1<0: + error("Drum Tone '%s' not defined." % a) - self.table[v] = a + self.table[v1] = a1 if gbl.debug: print "DrumTone Translation: %s=%s" % \ (MMA.midiC.valueToDrum(v), MMA.midiC.valueToDrum(a)) def get(self, name): - """ Return a translation or original. """ + """ Return a translation or original. Note that this also does + validation of 'name'. It is called from patDrum and patSolo. + """ v=MMA.midiC.drumToValue(name) + + if v<0: + error("Drum Tone '%s' not defined." % name) - if self.table.has_key(v): + try: return self.table[v] - - else: + except KeyError: return v @@ -195,10 +204,10 @@ class VoiceVolTable: def get(self, v, vol): """ Return an adjusted value or original. """ - if self.table.has_key(v): + try: vol = int(vol * self.table[v]) - - return vol + except KeyError: + return vol voiceVolTable=VoiceVolTable() @@ -245,10 +254,10 @@ class DrumVolTable: def get(self, v, vol): """ Return an adjusted value or original. """ - if self.table.has_key(v): + try: vol = int(vol * self.table[v]) - - return vol + except KeyError: + return vol drumVolTable=DrumVolTable() diff --git a/mma/MMA/volume.py b/mma/MMA/volume.py index 3b3dbda..4958fc6 100644 --- a/mma/MMA/volume.py +++ b/mma/MMA/volume.py @@ -42,6 +42,9 @@ vols={ 'OFF': 0.00, 'PPPP': 0.05, 'PPP': 0.10, 'FF': 1.60, 'FFF': 1.80, 'FFFF': 2.00 } volume = vols['M'] # default global volume +nextVolume = None # main parser sets this to the next volume + # when future volumes are stacked. It's used + # by the volume adjust to smooth out (de)crescendos. lastVolume = volume futureVol = [] vTRatio = .6 @@ -141,14 +144,56 @@ def setVolume(ln): print "Volume: %s%%" % volume -# The next 2 are called from the parser. +# The next 3 are called from the parser. + def setCresc(ln): + """ Master Crescendo. """ + setCrescendo(1, ln) def setDecresc(ln): + """ Master Decrescendo (Diminuendo). """ setCrescendo(-1, ln) +def setSwell(ln): + """ Set a swell (cresc<>decresc). """ + + global futureVol, volume, lastVolume + + lastVolume = volume + + if len(ln) == 3: # 3 args, 1st is intial setting + setVolume([ln[0]]) + ln=ln[1:] + + if len(ln) != 2: + error("Swell expecting 2 or 3 args.") + + count = stoi(ln[1]) + if count < 2: + error("Swell bar count must be 2 or greater.") + + if count % 2: + c=(count+1)/2 + offset=1 + else: + c=count/2 + offset=0 + + c=str(c) + + futureVol = fvolume(0, volume, [ ln[0], c ] ) + futureVol.extend(fvolume(0, futureVol[-1], + [str(int(volume*100)), c ])[offset:]) + + + if gbl.debug: + print "Set Swell to:", + for a in futureVol: + print int(a*100), + print + def setCrescendo(dir, ln): """ Combined (de)cresc() """ @@ -165,7 +210,14 @@ def setCrescendo(dir, ln): ln=ln[1:] futureVol = fvolume(dir, volume, ln) + + if gbl.debug: + print "Set (De)Cresc to:", + for a in futureVol: + print int(a*100), + print + # Used by both the 2 funcs above and from TRACK.setCresc() @@ -173,14 +225,17 @@ def fvolume(dir, startvol, ln): """ Create a list of future vols. Called by (De)Cresc. """ # Get destination volume - + destvol = calcVolume(ln[0], startvol) bcount = stoi(ln[1], "Type error in bar count for (De)Cresc, '%s'" % ln[1] ) - + if bcount <= 0: error("Bar count for (De)Cresc must be postive") + # Test to see if (de)cresc is contrary to current settings. + # Using 'dir' of 0 will bypass this (used by SWELL). + if dir > 0 and destvol < startvol: warning("Cresc volume less than current setting" ) @@ -190,17 +245,17 @@ def fvolume(dir, startvol, ln): elif destvol == startvol: warning("(De)Cresc volume equal to current setting" ) - bcount -= 1 - step = ( destvol-startvol ) / bcount - + if bcount> 1: + bcount -= 1 + step = ( destvol-startvol ) / bcount volList=[startvol] - + for a in range(bcount-1): startvol += step volList.append( startvol) volList.append(destvol) - + return volList diff --git a/mma/cp-install b/mma/cp-install index 3ef1840..65b5c32 100755 --- a/mma/cp-install +++ b/mma/cp-install @@ -136,6 +136,9 @@ os.system("%s -G" % bin) print "Setting permissions on MMADIR database file for user update." os.system("chmod a+w " + dest+"/lib/stdlib/.mmaDB") +## man pages + +print "There are some man pages in %s/docs/man that you may wish to install." % dest - +print "Install complete. Have fun!" diff --git a/mma/docs/html/lib/index.html b/mma/docs/html/lib/index.html index 4371f88..6b5122e 100644 --- a/mma/docs/html/lib/index.html +++ b/mma/docs/html/lib/index.html @@ -84,6 +84,7 @@ information from the each library file:
  • stdlib/8beat.mma
  • stdlib/ballad.mma
  • stdlib/ballad128.mma
  • +
  • stdlib/ballad68.mma
  • stdlib/basicrock.mma
  • stdlib/beguine.mma
  • stdlib/bigband.mma
  • @@ -125,15 +126,20 @@ information from the each library file:
  • stdlib/polka.mma
  • stdlib/popballad.mma
  • stdlib/quickstep.mma
  • +
  • stdlib/rb-ballad.mma
  • stdlib/rb.mma
  • stdlib/rhumba.mma
  • stdlib/rock-128.mma
  • stdlib/rockballad.mma
  • +
  • stdlib/rockwaltz.mma
  • +
  • stdlib/salsa.mma
  • stdlib/samba.mma
  • +
  • stdlib/showtune.mma
  • stdlib/shuffleboggie.mma
  • stdlib/ska.mma
  • stdlib/slowblues.mma
  • stdlib/slowbolero.mma
  • +
  • stdlib/slowbroadway.mma
  • stdlib/slowcountry.mma
  • stdlib/slowjazz.mma
  • stdlib/softrock.mma
  • @@ -141,6 +147,7 @@ information from the each library file:
  • stdlib/son.mma
  • stdlib/swing.mma
  • stdlib/tango.mma
  • +
  • stdlib/trance.mma
  • stdlib/vienesewaltz.mma
  • stdlib/waltz.mma
  • stdlib/zydeco.mma
  • @@ -158,6 +165,8 @@ information from the each library file: @@ -168,4 +177,4 @@ information from the each library file:

    It is a part of the MMA distribution and is protected by the same copyrights as MMA (the GNU General Public License). -

    Created: Wed Mar 7 11:50:18 2007 \ No newline at end of file +

    Created: Sun Sep 28 11:30:06 2008 \ No newline at end of file diff --git a/mma/docs/html/lib/kara/K50s_rock.html b/mma/docs/html/lib/kara/K50s_rock.html index c6bc689..4ef6d02 100644 --- a/mma/docs/html/lib/kara/K50s_rock.html +++ b/mma/docs/html/lib/kara/K50s_rock.html @@ -1,4 +1,4 @@ - +

    K50S_Rock

    diff --git a/mma/docs/html/lib/kara/Kfunk1.html b/mma/docs/html/lib/kara/Kfunk1.html index 0892daf..cd99834 100644 --- a/mma/docs/html/lib/kara/Kfunk1.html +++ b/mma/docs/html/lib/kara/Kfunk1.html @@ -1,4 +1,4 @@ - +

    Kfunk1

    diff --git a/mma/docs/html/lib/kara/twi.html b/mma/docs/html/lib/kara/twi.html index fdf94e3..a4cf048 100644 --- a/mma/docs/html/lib/kara/twi.html +++ b/mma/docs/html/lib/kara/twi.html @@ -1,4 +1,4 @@ - +

    Twi

    diff --git a/mma/docs/html/lib/stdlib/50srock.html b/mma/docs/html/lib/stdlib/50srock.html index bcb1bd6..2f28f3c 100644 --- a/mma/docs/html/lib/stdlib/50srock.html +++ b/mma/docs/html/lib/stdlib/50srock.html @@ -1,4 +1,4 @@ - +

    50Srock

    diff --git a/mma/docs/html/lib/stdlib/60srock.html b/mma/docs/html/lib/stdlib/60srock.html index d214503..e29f0ec 100644 --- a/mma/docs/html/lib/stdlib/60srock.html +++ b/mma/docs/html/lib/stdlib/60srock.html @@ -1,4 +1,4 @@ - +

    60Srock

    @@ -8,6 +8,7 @@
  • 60sRock1
  • 60sRockSus
  • 60sRock1Sus +
  • 60sRockIntro
  • 60sRockEnd @@ -82,6 +83,23 @@ + + + + +
    +

    60sRockIntro

    + 4 bar intro. (4) +
    + + + + + + + +
    Chord CleanGuitar
    Chord-Straight CleanGuitar
    Drum-Kick KickDrum1
    Drum-Ohh OpenHiHat
    Drum-Snare SnareDrum2
    Walk FretlessBass
    +
    diff --git a/mma/docs/html/lib/stdlib/8beat.html b/mma/docs/html/lib/stdlib/8beat.html index b4f1355..84a5ac5 100644 --- a/mma/docs/html/lib/stdlib/8beat.html +++ b/mma/docs/html/lib/stdlib/8beat.html @@ -1,4 +1,4 @@ - +

    8Beat

    diff --git a/mma/docs/html/lib/stdlib/ballad.html b/mma/docs/html/lib/stdlib/ballad.html index 2fd9ed1..103fbbd 100644 --- a/mma/docs/html/lib/stdlib/ballad.html +++ b/mma/docs/html/lib/stdlib/ballad.html @@ -1,4 +1,4 @@ - +

    Ballad

    @@ -8,6 +8,7 @@
  • BalladSus
  • Ballad1
  • Ballad1Sus +
  • BalladFill
  • BalladIntro
  • BalladIntro1
  • BalladIntro2 @@ -116,6 +117,30 @@
  • + + + + +
    +

    BalladFill

    + 1 bar fill, good for endings. (1) +
    + + + + + + + + + + + + + + +
    Bass FretlessBass
    Chord Atmosphere
    Drum-Bongo LowBongo
    Drum-Cabasa Cabasa
    Drum-Cym RideCymbal1
    Drum-Hh PedalHiHat
    Drum-Hiconga MuteHighConga
    Drum-Kick KickDrum1
    Drum-Loconga LowConga
    Drum-Mutetri MuteTriangle
    Drum-Opentri OpenTriangle
    Drum-Shake Shaker
    Drum-Tamb Tambourine
    +
    diff --git a/mma/docs/html/lib/stdlib/ballad128.html b/mma/docs/html/lib/stdlib/ballad128.html index be13e34..d65a759 100644 --- a/mma/docs/html/lib/stdlib/ballad128.html +++ b/mma/docs/html/lib/stdlib/ballad128.html @@ -1,4 +1,4 @@ - +

    Ballad128

    @@ -31,7 +31,7 @@

    Ballad128Plus

    - Adds arpeggiated . (4) + Adds arpeggiated piano. (4)
    diff --git a/mma/docs/html/lib/stdlib/ballad68.html b/mma/docs/html/lib/stdlib/ballad68.html new file mode 100644 index 0000000..ab293f0 --- /dev/null +++ b/mma/docs/html/lib/stdlib/ballad68.html @@ -0,0 +1,125 @@ + + + +

    Ballad68

    +

    A 6/8 Ballad. Written for "Dedicated To The One I Love". This is written with 4 beats to the bar, so you'll probably need to multiply the "real" tempo by 2. Largely based on ballad128, so they should be somewhat compatible. +

    + +
    + + +
    +

    Ballad68

    + A rock ballad beat in 6/8. (4) +
    + + + + + +
    Bass AcousticBass
    Chord OrchestralHarp
    Drum-Kick SideKick
    Drum-Snare SnareDrum2
    +
    + + + + +
    +

    Ballad68Plus

    + Adds arpeggiated piano. (4) +
    + + + + + + +
    Arpeggio Piano1
    Bass AcousticBass
    Chord OrchestralHarp
    Drum-Kick SideKick
    Drum-Snare SnareDrum2
    +
    + + + + +
    +

    Ballad68Sus

    + Add in sustained TremoloStrings (4) +
    + + + + + + +
    Bass AcousticBass
    Chord OrchestralHarp
    Chord-Sus TremoloStrings
    Drum-Kick SideKick
    Drum-Snare SnareDrum2
    +
    + + + + +
    +

    Ballad68SusPlus

    + Sustained strings and apreggiating piano. (4) +
    + + + + + + + +
    Arpeggio Piano1
    Bass AcousticBass
    Chord OrchestralHarp
    Chord-Sus TremoloStrings
    Drum-Kick SideKick
    Drum-Snare SnareDrum2
    +
    + + + + +
    +

    Ballad68-44

    + A 4/4 fill bar. (1) +
    + + + + + +
    Bass AcousticBass
    Chord OrchestralHarp
    Drum-Kick SideKick
    Drum-Snare SnareDrum2
    +
    + + + + +
    +

    Ballad68Intro

    + This 4 bar intro with arpeggios. (4) +
    + + + + + +
    Arpeggio OrchestralHarp
    Bass AcousticBass
    Drum-Kick SideKick
    Drum-Snare SnareDrum2
    +
    + + + + +
    +

    Ballad68End

    + Simple 2 bar ending. (2) +
    + + + + + +
    Bass AcousticBass
    Chord OrchestralHarp
    Drum-Kick SideKick
    Drum-Snare SnareDrum2
    +
    + + diff --git a/mma/docs/html/lib/stdlib/basicrock.html b/mma/docs/html/lib/stdlib/basicrock.html index 0a918f9..6da4c2f 100644 --- a/mma/docs/html/lib/stdlib/basicrock.html +++ b/mma/docs/html/lib/stdlib/basicrock.html @@ -1,4 +1,4 @@ - +

    Basicrock

    diff --git a/mma/docs/html/lib/stdlib/beguine.html b/mma/docs/html/lib/stdlib/beguine.html index 5f092a1..dff4439 100644 --- a/mma/docs/html/lib/stdlib/beguine.html +++ b/mma/docs/html/lib/stdlib/beguine.html @@ -1,4 +1,4 @@ - +

    Beguine

    diff --git a/mma/docs/html/lib/stdlib/bigband.html b/mma/docs/html/lib/stdlib/bigband.html index fca82af..f173246 100644 --- a/mma/docs/html/lib/stdlib/bigband.html +++ b/mma/docs/html/lib/stdlib/bigband.html @@ -1,4 +1,4 @@ - +

    Bigband

    diff --git a/mma/docs/html/lib/stdlib/bluegrass.html b/mma/docs/html/lib/stdlib/bluegrass.html index 4b66cb2..282bd72 100644 --- a/mma/docs/html/lib/stdlib/bluegrass.html +++ b/mma/docs/html/lib/stdlib/bluegrass.html @@ -1,4 +1,4 @@ - +

    Bluegrass

    diff --git a/mma/docs/html/lib/stdlib/blues.html b/mma/docs/html/lib/stdlib/blues.html index 57b13e9..0245b6d 100644 --- a/mma/docs/html/lib/stdlib/blues.html +++ b/mma/docs/html/lib/stdlib/blues.html @@ -1,4 +1,4 @@ - +

    Blues

    diff --git a/mma/docs/html/lib/stdlib/boggiewoggie.html b/mma/docs/html/lib/stdlib/boggiewoggie.html index 22867c1..6b9b68f 100644 --- a/mma/docs/html/lib/stdlib/boggiewoggie.html +++ b/mma/docs/html/lib/stdlib/boggiewoggie.html @@ -1,4 +1,4 @@ - +

    Boggiewoggie

    diff --git a/mma/docs/html/lib/stdlib/bolero.html b/mma/docs/html/lib/stdlib/bolero.html index 2fa2af5..f410eaa 100644 --- a/mma/docs/html/lib/stdlib/bolero.html +++ b/mma/docs/html/lib/stdlib/bolero.html @@ -1,4 +1,4 @@ - +

    Bolero

    @@ -8,6 +8,10 @@
  • BoleroFill
  • BoleroSus
  • BoleroSusFill +
  • BoleroAlt +
  • BoleroAltSus +
  • BoleroAltFill +
  • BoleroAltSusFill
  • BoleroIntro
  • BoleroEnd
  • Bolero1 @@ -97,6 +101,90 @@
  • + + + + +
    +

    BoleroAlt

    + Arpeggiated guitars. (4) +
    + + + + + + + + + + +
    Arpeggio-Guitar NylonGuitar
    Bass FingeredBass
    Bass-Guitar NylonGuitar
    Chord SteelGuitar
    Drum-Claves Claves
    Drum-Hbongo HighBongo
    Drum-Kick KickDrum1
    Drum-Lbongo LowBongo
    Drum-Maraca Maracas
    +
    + + + + +
    +

    BoleroAltSus

    + Sustain with Arpeggiated guitars. (4) +
    + + + + + + + + + + + +
    Arpeggio-Guitar NylonGuitar
    Bass FingeredBass
    Bass-Guitar NylonGuitar
    Chord SteelGuitar
    Chord-Sus Strings
    Drum-Claves Claves
    Drum-Hbongo HighBongo
    Drum-Kick KickDrum1
    Drum-Lbongo LowBongo
    Drum-Maraca Maracas
    +
    + + + + +
    +

    BoleroAltFill

    + Arpeggiated flutes and guitars. (4) +
    + + + + + + + + + + + +
    Arpeggio Flute
    Arpeggio-Guitar NylonGuitar
    Bass FingeredBass
    Bass-Guitar NylonGuitar
    Chord SteelGuitar
    Drum-Claves Claves
    Drum-Hbongo HighBongo
    Drum-Kick KickDrum1
    Drum-Lbongo LowBongo
    Drum-Maraca Maracas
    +
    + + + + +
    +

    BoleroAltSusFill

    + Sustain with arpeggiated flutes and guitars. (4) +
    + + + + + + + + + + + + +
    Arpeggio Flute
    Arpeggio-Guitar NylonGuitar
    Bass FingeredBass
    Bass-Guitar NylonGuitar
    Chord SteelGuitar
    Chord-Sus Strings
    Drum-Claves Claves
    Drum-Hbongo HighBongo
    Drum-Kick KickDrum1
    Drum-Lbongo LowBongo
    Drum-Maraca Maracas
    +
    diff --git a/mma/docs/html/lib/stdlib/bossanova.html b/mma/docs/html/lib/stdlib/bossanova.html index 389c380..8391b56 100644 --- a/mma/docs/html/lib/stdlib/bossanova.html +++ b/mma/docs/html/lib/stdlib/bossanova.html @@ -1,4 +1,4 @@ - +

    Bossanova

    diff --git a/mma/docs/html/lib/stdlib/broadway.html b/mma/docs/html/lib/stdlib/broadway.html index 660778e..86b91ce 100644 --- a/mma/docs/html/lib/stdlib/broadway.html +++ b/mma/docs/html/lib/stdlib/broadway.html @@ -1,4 +1,4 @@ - +

    Broadway

    @@ -9,7 +9,7 @@
  • BroadwaySus
  • Broadway1Sus
  • BroadwayIntro -
  • BroadWayEnd +
  • BroadwayEnd @@ -110,10 +110,10 @@
  • - +
    -

    BroadWayEnd

    +

    BroadwayEnd

    A 2 bar ending reminiscent of a cha-cha. (2)
    diff --git a/mma/docs/html/lib/stdlib/calypso.html b/mma/docs/html/lib/stdlib/calypso.html index 057db9b..5f5c35b 100644 --- a/mma/docs/html/lib/stdlib/calypso.html +++ b/mma/docs/html/lib/stdlib/calypso.html @@ -1,4 +1,4 @@ - +

    Calypso

    diff --git a/mma/docs/html/lib/stdlib/chacha.html b/mma/docs/html/lib/stdlib/chacha.html index 31a836e..0e6288f 100644 --- a/mma/docs/html/lib/stdlib/chacha.html +++ b/mma/docs/html/lib/stdlib/chacha.html @@ -1,4 +1,4 @@ - +

    Chacha

    @@ -33,6 +33,7 @@
  • ChaChaFill
  • ChaCha1Fill
  • ChaChaIntro +
  • ChaChaIntro8
  • ChaChaEnd @@ -194,6 +195,28 @@
  • + + + + +
    +

    ChaChaIntro8

    + Same intro expanded to 8 bars. (8) +
    + + + + + + + + + + + + +
    Bass JazzGuitar
    Chord Piano1
    Drum-Clave Claves
    Drum-Hconga MuteHighConga
    Drum-Hh RideCymbal1
    Drum-Htom HighTom2
    Drum-Lconga LowConga
    Drum-Lguiro LongGuiro
    Drum-Mtom MidTom2
    Drum-Sguiro ShortGuiro
    Drum-Snare SnareDrum1
    +
    +
    diff --git a/mma/docs/html/lib/stdlib/countryblues.html b/mma/docs/html/lib/stdlib/countryblues.html index cc9335a..ac427a4 100644 --- a/mma/docs/html/lib/stdlib/countryblues.html +++ b/mma/docs/html/lib/stdlib/countryblues.html @@ -1,4 +1,4 @@ - +

    Countryblues

    diff --git a/mma/docs/html/lib/stdlib/countryswing.html b/mma/docs/html/lib/stdlib/countryswing.html index d86db61..9f0471a 100644 --- a/mma/docs/html/lib/stdlib/countryswing.html +++ b/mma/docs/html/lib/stdlib/countryswing.html @@ -1,4 +1,4 @@ - +

    Countryswing

    diff --git a/mma/docs/html/lib/stdlib/countrywaltz.html b/mma/docs/html/lib/stdlib/countrywaltz.html index 2c25923..516677c 100644 --- a/mma/docs/html/lib/stdlib/countrywaltz.html +++ b/mma/docs/html/lib/stdlib/countrywaltz.html @@ -1,4 +1,4 @@ - +

    Countrywaltz

    diff --git a/mma/docs/html/lib/stdlib/desert.html b/mma/docs/html/lib/stdlib/desert.html index 3711972..b7080a5 100644 --- a/mma/docs/html/lib/stdlib/desert.html +++ b/mma/docs/html/lib/stdlib/desert.html @@ -1,4 +1,4 @@ - +

    Desert

    diff --git a/mma/docs/html/lib/stdlib/dixie.html b/mma/docs/html/lib/stdlib/dixie.html index 87c13a9..9445019 100644 --- a/mma/docs/html/lib/stdlib/dixie.html +++ b/mma/docs/html/lib/stdlib/dixie.html @@ -1,4 +1,4 @@ - +

    Dixie

    diff --git a/mma/docs/html/lib/stdlib/dixiemarch.html b/mma/docs/html/lib/stdlib/dixiemarch.html index 6046849..50dcd04 100644 --- a/mma/docs/html/lib/stdlib/dixiemarch.html +++ b/mma/docs/html/lib/stdlib/dixiemarch.html @@ -1,4 +1,4 @@ - +

    Dixiemarch

    diff --git a/mma/docs/html/lib/stdlib/easyswing.html b/mma/docs/html/lib/stdlib/easyswing.html index 044fa04..e74c1b3 100644 --- a/mma/docs/html/lib/stdlib/easyswing.html +++ b/mma/docs/html/lib/stdlib/easyswing.html @@ -1,8 +1,8 @@ - +

    Easyswing

    -

    Soft guitar strumming. Great of tunes like "Beyond The Sea" and "Summertime". +

    Soft guitar strumming. Great for tunes like "Beyond The Sea" and "Summertime".

    Bass AcousticBass
    Chord JazzGuitar
    Drum-Hh OpenHiHat
    Drum-Kick KickDrum1
    Drum-Phh PedalHiHat
    Walk AcousticBass
    @@ -56,6 +57,7 @@ Chord JazzGuitar Chord-Sus TremoloStrings Drum-Hh OpenHiHat + Drum-Kick KickDrum1 Drum-Phh PedalHiHat Walk AcousticBass @@ -73,6 +75,7 @@ Bass AcousticBass Chord JazzGuitar Drum-Hh OpenHiHat + Drum-Kick KickDrum1 Drum-Phh PedalHiHat Walk AcousticBass @@ -88,6 +91,7 @@ +
    Chord JazzGuitar
    Drum-Hh OpenHiHat
    Drum-Kick KickDrum1
    Drum-Phh PedalHiHat
    Walk AcousticBass
    @@ -104,6 +108,7 @@ Chord JazzGuitar Chord-Sus TremoloStrings Drum-Hh OpenHiHat + Drum-Kick KickDrum1 Drum-Phh PedalHiHat Walk AcousticBass @@ -121,6 +126,7 @@ Bass AcousticBass Chord JazzGuitar Drum-Hh OpenHiHat + Drum-Kick KickDrum1 Drum-Phh PedalHiHat Walk AcousticBass @@ -137,6 +143,7 @@ Bass AcousticBass Chord JazzGuitar Drum-Hh OpenHiHat + Drum-Kick KickDrum1 Drum-Phh PedalHiHat Walk AcousticBass @@ -154,6 +161,7 @@ Chord JazzGuitar Chord-Sus TremoloStrings Drum-Hh OpenHiHat + Drum-Kick KickDrum1 Drum-Phh PedalHiHat Walk AcousticBass @@ -171,6 +179,7 @@ Bass AcousticBass Chord JazzGuitar Drum-Hh OpenHiHat + Drum-Kick KickDrum1 Drum-Phh PedalHiHat Walk AcousticBass @@ -187,6 +196,7 @@ Bass AcousticBass Chord JazzGuitar Drum-Hh OpenHiHat + Drum-Kick KickDrum1 Drum-Phh PedalHiHat Walk AcousticBass @@ -204,6 +214,7 @@ Chord JazzGuitar Chord-Sus TremoloStrings Drum-Hh OpenHiHat + Drum-Kick KickDrum1 Drum-Phh PedalHiHat Walk AcousticBass @@ -221,6 +232,7 @@ Bass AcousticBass Chord JazzGuitar Drum-Hh OpenHiHat + Drum-Kick KickDrum1 Drum-Phh PedalHiHat Walk AcousticBass @@ -237,6 +249,7 @@ Bass AcousticBass Chord JazzGuitar Drum-Hh OpenHiHat + Drum-Kick KickDrum1 Drum-Phh PedalHiHat Walk AcousticBass @@ -254,6 +267,7 @@ Chord JazzGuitar Chord-Sus TremoloStrings Drum-Hh OpenHiHat + Drum-Kick KickDrum1 Drum-Phh PedalHiHat Walk AcousticBass @@ -271,6 +285,7 @@ Bass AcousticBass Chord JazzGuitar Drum-Hh OpenHiHat + Drum-Kick KickDrum1 Drum-Phh PedalHiHat Walk AcousticBass @@ -286,6 +301,7 @@ +
    Chord JazzGuitar
    Drum-Hh OpenHiHat
    Drum-Kick KickDrum1
    Drum-Phh PedalHiHat
    Walk AcousticBass
    @@ -302,6 +318,7 @@ Chord JazzGuitar Chord-Sus TremoloStrings Drum-Hh OpenHiHat + Drum-Kick KickDrum1 Drum-Phh PedalHiHat Walk AcousticBass @@ -318,6 +335,7 @@ Arpeggio JazzGuitar Chord JazzGuitar Drum-Hh OpenHiHat + Drum-Kick KickDrum1 Drum-Phh PedalHiHat Walk AcousticBass @@ -334,6 +352,7 @@ Bass AcousticBass Chord JazzGuitar Drum-Hh OpenHiHat + Drum-Kick KickDrum1 Drum-Phh PedalHiHat @@ -349,6 +368,7 @@ Bass AcousticBass Chord JazzGuitar Drum-Hh OpenHiHat + Drum-Kick KickDrum1 Drum-Phh PedalHiHat @@ -364,6 +384,7 @@ Bass AcousticBass Chord JazzGuitar Drum-Hh RideCymbal1 + Drum-Kick KickDrum1 Drum-Phh PedalHiHat @@ -380,6 +401,7 @@ Bass AcousticBass Chord JazzGuitar Drum-Hh OpenHiHat + Drum-Kick KickDrum1 Drum-Phh PedalHiHat @@ -395,6 +417,7 @@ Bass AcousticBass Chord JazzGuitar Drum-Hh OpenHiHat + Drum-Kick KickDrum1 Drum-Phh PedalHiHat Walk AcousticBass diff --git a/mma/docs/html/lib/stdlib/fastblues.html b/mma/docs/html/lib/stdlib/fastblues.html index a56c3d0..af5036f 100644 --- a/mma/docs/html/lib/stdlib/fastblues.html +++ b/mma/docs/html/lib/stdlib/fastblues.html @@ -1,4 +1,4 @@ - +

    Fastblues

    diff --git a/mma/docs/html/lib/stdlib/folk.html b/mma/docs/html/lib/stdlib/folk.html index e874938..153fdbf 100644 --- a/mma/docs/html/lib/stdlib/folk.html +++ b/mma/docs/html/lib/stdlib/folk.html @@ -1,4 +1,4 @@ - +

    Folk

    @@ -7,6 +7,8 @@
  • Folk
  • FolkWalk
  • FolkArticulated +
  • FolkSus +
  • FolkArticulatedSus
  • FolkIntro
  • FolkEnd @@ -54,6 +56,38 @@ + + + + +
    +

    FolkSus

    + Some nice harmonica chords with the guitar. (8) +
    + + + + + +
    Bass AcousticBass
    Chord NylonGuitar
    Chord-Sus Harmonica
    Drum-Tamb Tambourine
    +
    + + + + +
    +

    FolkArticulatedSus

    + Articulated version with harmonica. (8) +
    + + + + + + + +
    Arpeggio NylonGuitar
    Bass AcousticBass
    Chord NylonGuitar
    Chord-Sus Harmonica
    Drum-Tamb Tambourine
    Walk AcousticBass
    +
    diff --git a/mma/docs/html/lib/stdlib/foxtrot.html b/mma/docs/html/lib/stdlib/foxtrot.html index f170d45..b637b4e 100644 --- a/mma/docs/html/lib/stdlib/foxtrot.html +++ b/mma/docs/html/lib/stdlib/foxtrot.html @@ -1,8 +1,22 @@ - +

    Foxtrot

    Just about any old-fashioned dance piece can be set to a foxtrot. +

    + + + +
    +

    Variables

    +
    + + + + + +
    ArpeggioVoice Voice for the alternating apreggios in the Plus versions (Default=Piano1). Also used in Introduction and Ending.
    +

    - + @@ -22,6 +26,8 @@
  • ModernJazz1
  • ModernJazzSus
  • ModernJazz1Sus +
  • ModernJazz2 +
  • ModernJazz2Sus
  • ModernJazzIntro
  • ModernJazzEnd @@ -107,6 +113,49 @@
  • -

    FrenchWaltz2Sus

    +

    FrenchWaltz3Sus

    Viola counter melody and sustained strings. (8)
    diff --git a/mma/docs/html/lib/stdlib/guitarballad.html b/mma/docs/html/lib/stdlib/guitarballad.html index 0956967..00100f7 100644 --- a/mma/docs/html/lib/stdlib/guitarballad.html +++ b/mma/docs/html/lib/stdlib/guitarballad.html @@ -1,4 +1,4 @@ - +

    Guitarballad

    diff --git a/mma/docs/html/lib/stdlib/hillcountry.html b/mma/docs/html/lib/stdlib/hillcountry.html index b16b98b..01b6801 100644 --- a/mma/docs/html/lib/stdlib/hillcountry.html +++ b/mma/docs/html/lib/stdlib/hillcountry.html @@ -1,4 +1,4 @@ - +

    Hillcountry

    diff --git a/mma/docs/html/lib/stdlib/jazz-54.html b/mma/docs/html/lib/stdlib/jazz-54.html index 09c4cb1..e785da1 100644 --- a/mma/docs/html/lib/stdlib/jazz-54.html +++ b/mma/docs/html/lib/stdlib/jazz-54.html @@ -1,4 +1,4 @@ - +

    Jazz-54

    diff --git a/mma/docs/html/lib/stdlib/jazzguitar.html b/mma/docs/html/lib/stdlib/jazzguitar.html index fbbf721..a3b1bdd 100644 --- a/mma/docs/html/lib/stdlib/jazzguitar.html +++ b/mma/docs/html/lib/stdlib/jazzguitar.html @@ -1,4 +1,4 @@ - +

    Jazzguitar

    diff --git a/mma/docs/html/lib/stdlib/jazzwaltz.html b/mma/docs/html/lib/stdlib/jazzwaltz.html index e5f8efc..b58d3a0 100644 --- a/mma/docs/html/lib/stdlib/jazzwaltz.html +++ b/mma/docs/html/lib/stdlib/jazzwaltz.html @@ -1,4 +1,4 @@ - +

    Jazzwaltz

    diff --git a/mma/docs/html/lib/stdlib/jive.html b/mma/docs/html/lib/stdlib/jive.html index e152d44..ffca383 100644 --- a/mma/docs/html/lib/stdlib/jive.html +++ b/mma/docs/html/lib/stdlib/jive.html @@ -1,4 +1,4 @@ - +

    Jive

    @@ -17,6 +17,7 @@
  • Jive1Plus
  • Jive1SusPlus
  • JiveIntro +
  • JiveIntro8
  • JiveEnd @@ -95,7 +96,7 @@

    JivePlus

    - Add some additional apreggios. (4) + Add some additional arpeggios. (4)
    @@ -113,7 +114,7 @@

    JiveSusPlus

    - Apreggios plus strings. (4) + Arpeggios plus strings. (4)
    @@ -255,6 +256,24 @@
    + + + + +
    +

    JiveIntro8

    + 8 bar intro. (8) +
    + + + + + + + + +
    Bass AcousticBass
    Bass-Sax AltoSax
    Chord Piano2
    Drum-Clap SnareDrum1
    Drum-Hh ClosedHiHat
    Drum-Kick KickDrum1
    Drum-Snare SnareDrum1
    +
    diff --git a/mma/docs/html/lib/stdlib/lfusion.html b/mma/docs/html/lib/stdlib/lfusion.html index d31dbef..4fe5fb6 100644 --- a/mma/docs/html/lib/stdlib/lfusion.html +++ b/mma/docs/html/lib/stdlib/lfusion.html @@ -1,4 +1,4 @@ - +

    Lfusion

    diff --git a/mma/docs/html/lib/stdlib/lighttango.html b/mma/docs/html/lib/stdlib/lighttango.html index 9a6e00b..3a8cc8d 100644 --- a/mma/docs/html/lib/stdlib/lighttango.html +++ b/mma/docs/html/lib/stdlib/lighttango.html @@ -1,4 +1,4 @@ - +

    Lighttango

    @@ -10,7 +10,9 @@
  • LightTango1Sus
  • LightTangoFill
  • LightTangoIntro +
  • LightTangoIntro1
  • LightTangoEnd +
  • LightTango4End @@ -133,6 +135,25 @@
  • + + + + +
    +

    LightTangoIntro1

    + Smoother version of basic introduction. (4) +
    + + + + + + + + + +
    Bass AcousticBass
    Chord-Guitar NylonGuitar
    Chord-Sus TremoloStrings
    Drum-Clave Claves
    Drum-Kick KickDrum1
    Drum-Phh PedalHiHat
    Drum-Snare SnareDrum1
    Drum-Tam Tambourine
    +
    @@ -150,5 +171,25 @@
    + + + + +
    +

    LightTango4End

    + Smoother 4 bar ending. (4) +
    + + + + + + + + + + +
    Bass AcousticBass
    Chord-Accordion Accordion
    Chord-Guitar NylonGuitar
    Chord-Sus TremoloStrings
    Drum-Clave Claves
    Drum-Kick KickDrum1
    Drum-Phh PedalHiHat
    Drum-Snare SnareDrum1
    Drum-Tam Tambourine
    +
    diff --git a/mma/docs/html/lib/stdlib/lullaby.html b/mma/docs/html/lib/stdlib/lullaby.html index 500a312..76418d5 100644 --- a/mma/docs/html/lib/stdlib/lullaby.html +++ b/mma/docs/html/lib/stdlib/lullaby.html @@ -1,4 +1,4 @@ - +

    Lullaby

    diff --git a/mma/docs/html/lib/stdlib/mambo.html b/mma/docs/html/lib/stdlib/mambo.html index e93a912..88ca454 100644 --- a/mma/docs/html/lib/stdlib/mambo.html +++ b/mma/docs/html/lib/stdlib/mambo.html @@ -1,4 +1,4 @@ - +

    Mambo

    diff --git a/mma/docs/html/lib/stdlib/march.html b/mma/docs/html/lib/stdlib/march.html index 74f1b67..c8b874f 100644 --- a/mma/docs/html/lib/stdlib/march.html +++ b/mma/docs/html/lib/stdlib/march.html @@ -1,4 +1,4 @@ - +

    March

    diff --git a/mma/docs/html/lib/stdlib/merengue.html b/mma/docs/html/lib/stdlib/merengue.html index d70d4a2..cddbfea 100644 --- a/mma/docs/html/lib/stdlib/merengue.html +++ b/mma/docs/html/lib/stdlib/merengue.html @@ -1,8 +1,22 @@ - +

    Merengue

    This is a very fast dance rhythm native to the Dominican Republic. The demo song for this ``Compadre Pedro Juan''. Note that you'll have to double up on the tempo for this to sound right. Patterns are from ``Latin Rhythms: Mystery Unraveled'' by Victor Lopez. +

    + + + +
    +

    Variables

    +
    + + + + + +
    BandoneonOctave The Octave setting for the bandoneon (default=6)
    +

    • Merengue
    • Merengue1 diff --git a/mma/docs/html/lib/stdlib/metronome.html b/mma/docs/html/lib/stdlib/metronome.html index 7b23275..8be6656 100644 --- a/mma/docs/html/lib/stdlib/metronome.html +++ b/mma/docs/html/lib/stdlib/metronome.html @@ -1,4 +1,4 @@ - +

      Metronome

      diff --git a/mma/docs/html/lib/stdlib/metronome3.html b/mma/docs/html/lib/stdlib/metronome3.html index 88d83cf..15be6db 100644 --- a/mma/docs/html/lib/stdlib/metronome3.html +++ b/mma/docs/html/lib/stdlib/metronome3.html @@ -1,4 +1,4 @@ - +

      Metronome3

      diff --git a/mma/docs/html/lib/stdlib/modernjazz.html b/mma/docs/html/lib/stdlib/modernjazz.html index b219429..32d64f8 100644 --- a/mma/docs/html/lib/stdlib/modernjazz.html +++ b/mma/docs/html/lib/stdlib/modernjazz.html @@ -1,4 +1,4 @@ - +

      Modernjazz

      @@ -11,8 +11,12 @@
  • - - + + + + + +
    ApreggioVoice Voice for the alternating apreggios in ModernJazz1 (Default=MutedTrumpet). Also used in Introduction and Ending. ArpeggioVoice Voice for the alternating arpeggios in ModernJazz1 and ModernJazz2 (plus the SUS versions of 1 and 2).
    (Default=MutedTrumpet). Also used in Introduction and Ending.
    + + + + +
    +

    ModernJazz2

    + A slower version of alternate-bar trumpet for faster tempos. (4) +
    + + + + + + + + + + + +
    Arpeggio MutedTrumpet
    Bass-Trp MutedTrumpet
    Chord-Guitar JazzGuitar
    Chord-Piano Piano2
    Drum-Kick KickDrum1
    Drum-Ohh OpenHiHat
    Drum-Phh PedalHiHat
    Drum-Ride RideCymbal1
    Drum-Side SnareDrum1
    Walk AcousticBass
    +
    + + + + +
    +

    ModernJazz2Sus

    + Slower alternate-bar trumpets with violins for faster tempos. (4) +
    + + + + + + + + + + + + +
    Arpeggio MutedTrumpet
    Bass-Trp MutedTrumpet
    Chord-Guitar JazzGuitar
    Chord-Piano Piano2
    Chord-Sus VoiceOohs
    Drum-Kick KickDrum1
    Drum-Ohh OpenHiHat
    Drum-Phh PedalHiHat
    Drum-Ride RideCymbal1
    Drum-Side SnareDrum1
    Walk AcousticBass
    +
    diff --git a/mma/docs/html/lib/stdlib/pianoballad.html b/mma/docs/html/lib/stdlib/pianoballad.html index 0c11e71..60a424b 100644 --- a/mma/docs/html/lib/stdlib/pianoballad.html +++ b/mma/docs/html/lib/stdlib/pianoballad.html @@ -1,4 +1,4 @@ - +

    Pianoballad

    diff --git a/mma/docs/html/lib/stdlib/polka.html b/mma/docs/html/lib/stdlib/polka.html index a405a37..ea312ed 100644 --- a/mma/docs/html/lib/stdlib/polka.html +++ b/mma/docs/html/lib/stdlib/polka.html @@ -1,4 +1,4 @@ - +

    Polka

    @@ -13,6 +13,7 @@
  • Polka1Arp
  • Polka1SusArp
  • PolkaIntro +
  • PolkaIntro8
  • PolkaEnd @@ -193,6 +194,24 @@
  • + + + + +
    +

    PolkaIntro8

    + Expanded version of PolkaIntro for 8 bars. (8) +
    + + + + + + + + +
    Bass Tuba
    Chord Accordion
    Chord-Guitar JazzGuitar
    Drum Slap
    Drum-Cym CrashCymbal1
    Drum-Hh ClosedHiHat
    Drum-Snare SnareDrum1
    +
    diff --git a/mma/docs/html/lib/stdlib/popballad.html b/mma/docs/html/lib/stdlib/popballad.html index 8f49e7d..3188da2 100644 --- a/mma/docs/html/lib/stdlib/popballad.html +++ b/mma/docs/html/lib/stdlib/popballad.html @@ -1,4 +1,4 @@ - +

    Popballad

    diff --git a/mma/docs/html/lib/stdlib/quickstep.html b/mma/docs/html/lib/stdlib/quickstep.html index 37a4615..c7eb8e7 100644 --- a/mma/docs/html/lib/stdlib/quickstep.html +++ b/mma/docs/html/lib/stdlib/quickstep.html @@ -1,4 +1,4 @@ - +

    Quickstep

    @@ -11,6 +11,7 @@
  • QuickStepDuh
  • QuickStepDuhSus
  • QuickStepIntro +
  • QuickStepIntro8
  • QuickStepEnd @@ -139,6 +140,23 @@
  • + + + + +
    +

    QuickStepIntro8

    + The 4 bar intro stretched to 8. (8) +
    + + + + + + + +
    Bass AcousticBass
    Chord-Guitar JazzGuitar
    Chord-Piano Piano2
    Drum-Closedhh ClosedHiHat
    Drum-Kick KickDrum1
    Drum-Openhh OpenHiHat
    +
    diff --git a/mma/docs/html/lib/stdlib/rb-ballad.html b/mma/docs/html/lib/stdlib/rb-ballad.html new file mode 100644 index 0000000..6eb2725 --- /dev/null +++ b/mma/docs/html/lib/stdlib/rb-ballad.html @@ -0,0 +1,91 @@ + + + +

    Rb-Ballad

    +

    Rythmn and Blues ballad. Based on the R&B style, just made softer and prettier. Done for "Mercy, Mercy, Mercy". +

    + + + + +
    +

    R&B-Ballad

    + Basic R&B Ballad. (4) +
    + + + + + + + + + + +
    Bass AcousticBass
    Chord Piano2
    Chord-Organ Organ1
    Drum-Clap HandClap
    Drum-Kick KickDrum1
    Drum-Ride RideCymbal1
    Drum-Snare SnareDrum2
    Drum-Tam Tambourine
    Walk AcousticBass
    +
    + + + + +
    +

    R&B-BalladSus

    + Change rhythmic organ to sustained chords. (4) +
    + + + + + + + + + + +
    Bass AcousticBass
    Chord Piano2
    Chord-Organ Organ1
    Drum-Clap HandClap
    Drum-Kick KickDrum1
    Drum-Ride RideCymbal1
    Drum-Snare SnareDrum2
    Drum-Tam Tambourine
    Walk AcousticBass
    +
    + + + + +
    +

    R&B-BalladIntro

    + A bit laid-back, 4 bar intro. (4) +
    + + + + + + + + + +
    Bass AcousticBass
    Chord Piano2
    Chord-Organ Organ1
    Drum-Clap HandClap
    Drum-Kick KickDrum1
    Drum-Ride RideCymbal1
    Drum-Snare SnareDrum2
    Drum-Tam Tambourine
    +
    + + + + +
    +

    R&B-BalladEnd

    + Two bar ending. (2) +
    + + + + + + + + + +
    Bass AcousticBass
    Chord Piano2
    Chord-Organ Organ1
    Drum-Clap HandClap
    Drum-Kick KickDrum1
    Drum-Ride RideCymbal1
    Drum-Snare SnareDrum2
    Drum-Tam Tambourine
    +
    + + diff --git a/mma/docs/html/lib/stdlib/rb.html b/mma/docs/html/lib/stdlib/rb.html index 9d0ee13..b36b31c 100644 --- a/mma/docs/html/lib/stdlib/rb.html +++ b/mma/docs/html/lib/stdlib/rb.html @@ -1,4 +1,4 @@ - +

    Rb

    diff --git a/mma/docs/html/lib/stdlib/rhumba.html b/mma/docs/html/lib/stdlib/rhumba.html index c4cd2d6..770dd38 100644 --- a/mma/docs/html/lib/stdlib/rhumba.html +++ b/mma/docs/html/lib/stdlib/rhumba.html @@ -1,4 +1,4 @@ - +

    Rhumba

    diff --git a/mma/docs/html/lib/stdlib/rock-128.html b/mma/docs/html/lib/stdlib/rock-128.html index fd2308c..967bc4b 100644 --- a/mma/docs/html/lib/stdlib/rock-128.html +++ b/mma/docs/html/lib/stdlib/rock-128.html @@ -1,4 +1,4 @@ - +

    Rock-128

    diff --git a/mma/docs/html/lib/stdlib/rockballad.html b/mma/docs/html/lib/stdlib/rockballad.html index e2576d5..b023fc6 100644 --- a/mma/docs/html/lib/stdlib/rockballad.html +++ b/mma/docs/html/lib/stdlib/rockballad.html @@ -1,4 +1,4 @@ - +

    Rockballad

    @@ -27,7 +27,9 @@
  • RockBalladFill
  • RockBallad1Fill
  • RockBalladVoice +
  • RockBallad1Voice
  • RockBalladIntro +
  • RockBalladSusIntro
  • RockBalladEnd
  • RockBalladEnd1 @@ -119,6 +121,24 @@
  • + + + + +
    +

    RockBallad1Voice

    + Cheese without 4th bar triplets. (4) +
    + + + + + + + + +
    Bass FretlessBass
    Chord JazzGuitar
    Chord-Sus ChoirAahs
    Drum ClosedHiHat
    Drum-Kick KickDrum1
    Drum-Snare SnareDrum1
    Walk FretlessBass
    +
    - +
    @@ -132,7 +152,23 @@
    Drum ClosedHiHat
    Drum-Kick KickDrum1
    Drum-Snare SnareDrum1
    Walk FretlessBass
    + + + + + +
    +

    RockBalladSusIntro

    + 4 bar intro with mostly strings. (4) +
    + + + + + + +
    Bass FretlessBass
    Chord JazzGuitar
    Chord-Sus ChoirAahs
    Drum ClosedHiHat
    Drum-Kick KickDrum1
    Drum-Snare SnareDrum1
    diff --git a/mma/docs/html/lib/stdlib/rockwaltz.html b/mma/docs/html/lib/stdlib/rockwaltz.html new file mode 100644 index 0000000..0054892 --- /dev/null +++ b/mma/docs/html/lib/stdlib/rockwaltz.html @@ -0,0 +1,263 @@ + + + +

    Rockwaltz

    +

    This is our basic 3/4 waltz with added guitars and a bit of raunch. +

    + + + + +
    +

    RockWaltz

    + Hold tight for this dance. (4) +
    + + + + + + + + +
    Bass PickedBass
    Chord CleanGuitar
    Drum-Chh ClosedHiHat
    Drum-Kick KickDrum1
    Drum-Snare SnareDrum1
    Drum-Tri OpenTriangle
    Walk PickedBass
    +
    + + + + +
    +

    RockWaltzSus

    + Add strings to RockWaltz. (4) +
    + + + + + + + + + +
    Bass PickedBass
    Chord CleanGuitar
    Chord-Sus Strings
    Drum-Chh ClosedHiHat
    Drum-Kick KickDrum1
    Drum-Snare SnareDrum1
    Drum-Tri OpenTriangle
    Walk PickedBass
    +
    + + + + +
    +

    RockWaltz1

    + Add piano apreggios to the RockWaltz. (4) +
    + + + + + + + + + + +
    Arpeggio CleanGuitar
    Bass PickedBass
    Chord CleanGuitar
    Drum-Chh ClosedHiHat
    Drum-Kick KickDrum1
    Drum-Snare SnareDrum1
    Drum-Tri OpenTriangle
    Scale CleanGuitar
    Walk PickedBass
    +
    + + + + +
    +

    RockWaltz1Sus

    + RockWaltz with arpeggios and sustained strings. (4) +
    + + + + + + + + + + + +
    Arpeggio CleanGuitar
    Bass PickedBass
    Chord CleanGuitar
    Chord-Sus Strings
    Drum-Chh ClosedHiHat
    Drum-Kick KickDrum1
    Drum-Snare SnareDrum1
    Drum-Tri OpenTriangle
    Scale CleanGuitar
    Walk PickedBass
    +
    + + + + +
    +

    RockWaltzWalk

    + Walking bass version of RockWaltz. (4) +
    + + + + + + + +
    Chord CleanGuitar
    Drum-Chh ClosedHiHat
    Drum-Kick KickDrum1
    Drum-Snare SnareDrum1
    Drum-Tri OpenTriangle
    Walk PickedBass
    +
    + + + + +
    +

    RockWaltzWalkSus

    + Walking bass and sustained strings. (4) +
    + + + + + + + + +
    Chord CleanGuitar
    Chord-Sus Strings
    Drum-Chh ClosedHiHat
    Drum-Kick KickDrum1
    Drum-Snare SnareDrum1
    Drum-Tri OpenTriangle
    Walk PickedBass
    +
    + + + + +
    +

    RockWaltz1Walk

    + Walking bass and arpeggios. (4) +
    + + + + + + + + + +
    Arpeggio CleanGuitar
    Chord CleanGuitar
    Drum-Chh ClosedHiHat
    Drum-Kick KickDrum1
    Drum-Snare SnareDrum1
    Drum-Tri OpenTriangle
    Scale CleanGuitar
    Walk PickedBass
    +
    + + + + +
    +

    RockWaltz1WalkSus

    + Walking bass, arpeggios and sustained strings. (4) +
    + + + + + + + + + + +
    Arpeggio CleanGuitar
    Chord CleanGuitar
    Chord-Sus Strings
    Drum-Chh ClosedHiHat
    Drum-Kick KickDrum1
    Drum-Snare SnareDrum1
    Drum-Tri OpenTriangle
    Scale CleanGuitar
    Walk PickedBass
    +
    + + + + +
    +

    RockWaltzIntro

    + RockWaltz intro with guitar chords. (4) +
    + + + + + + + + +
    Bass PickedBass
    Chord CleanGuitar
    Drum-Chh ClosedHiHat
    Drum-Kick KickDrum1
    Drum-Snare SnareDrum1
    Drum-Tri OpenTriangle
    Walk PickedBass
    +
    + + + + +
    +

    RockWaltz1Intro

    + RockWaltz intro with arpeggios. (4) +
    + + + + + + + + +
    Arpeggio CleanGuitar
    Bass PickedBass
    Drum-Chh ClosedHiHat
    Drum-Kick KickDrum1
    Drum-Snare SnareDrum1
    Drum-Tri OpenTriangle
    Walk PickedBass
    +
    + + + + +
    +

    RockWaltzIntro8

    + 8 bar RockWaltz intro with guitar chords. (8) +
    + + + + + + + + +
    Bass PickedBass
    Chord CleanGuitar
    Drum-Chh ClosedHiHat
    Drum-Kick KickDrum1
    Drum-Snare SnareDrum1
    Drum-Tri OpenTriangle
    Walk PickedBass
    +
    + + + + +
    +

    RockWaltz1intro8

    + 8 bar RockWaltz intro with arpeggios. (8) +
    + + + + + + + + +
    Arpeggio Piano1
    Bass PickedBass
    Drum-Chh ClosedHiHat
    Drum-Kick KickDrum1
    Drum-Snare SnareDrum1
    Drum-Tri OpenTriangle
    Walk PickedBass
    +
    + + + + +
    +

    RockWaltzEnd

    + Simple 4 bar ending. (4) +
    + + + + + + + +
    Bass PickedBass
    Chord CleanGuitar
    Drum-Chh ClosedHiHat
    Drum-Kick KickDrum1
    Drum-Snare SnareDrum1
    Drum-Tri OpenTriangle
    +
    + + diff --git a/mma/docs/html/lib/stdlib/salsa.html b/mma/docs/html/lib/stdlib/salsa.html new file mode 100644 index 0000000..f93d1f7 --- /dev/null +++ b/mma/docs/html/lib/stdlib/salsa.html @@ -0,0 +1,114 @@ + + + +

    Salsa

    +

    Salsa just means ``saucy'' or ``spicy'' and is based on son and rhumba patterns. This is created from scratch. I use it for a Peggy Lee styled version of the Cole Porter tune ``Always True To You In My Fashion.'' +

    + + + + +
    +

    Salsa

    + Basic Salsa pattern. (2) +
    + + + + + + + + + + +
    Bass JazzGuitar
    Chord Piano1
    Drum-Cabasa Cabasa
    Drum-Claves Claves
    Drum-Cowbell CowBell
    Drum-Lbell LowAgogo
    Drum-Lbongo LowBongo
    Drum-Lguiro LongGuiro
    Drum-Sguiro ShortGuiro
    +
    + + + + +
    +

    SalsaSus

    + Basic pattern with added strings. (2) +
    + + + + + + + + + + + +
    Bass JazzGuitar
    Chord Piano1
    Chord-Sus SynthStrings1
    Drum-Cabasa Cabasa
    Drum-Claves Claves
    Drum-Cowbell CowBell
    Drum-Lbell LowAgogo
    Drum-Lbongo LowBongo
    Drum-Lguiro LongGuiro
    Drum-Sguiro ShortGuiro
    +
    + + + + +
    +

    SalsaIntro

    + A 4 bar introduction. (4) +
    + + + + + + + + + + +
    Bass JazzGuitar
    Chord Piano1
    Drum-Cabasa Cabasa
    Drum-Claves Claves
    Drum-Cowbell CowBell
    Drum-Lbell LowAgogo
    Drum-Lbongo LowBongo
    Drum-Lguiro LongGuiro
    Drum-Sguiro ShortGuiro
    +
    + + + + +
    +

    SalsaFill

    + Straight, 1 bar fill. (1) +
    + + + + + + + + + +
    Bass JazzGuitar
    Chord Piano1
    Drum-Cabasa Cabasa
    Drum-Claves Claves
    Drum-Cowbell CowBell
    Drum-Lbell LowAgogo
    Drum-Lbongo LowBongo
    Drum-Sguiro ShortGuiro
    +
    + + + + +
    +

    SalsaEnd

    + Fast, 2 bar ending (2) +
    + + + + + + + + + + +
    Bass JazzGuitar
    Chord Piano1
    Drum-Cabasa Cabasa
    Drum-Claves Claves
    Drum-Cowbell CowBell
    Drum-Lbell LowAgogo
    Drum-Lbongo LowBongo
    Drum-Lguiro LongGuiro
    Drum-Sguiro ShortGuiro
    +
    + + diff --git a/mma/docs/html/lib/stdlib/samba.html b/mma/docs/html/lib/stdlib/samba.html index 30fa59a..801c48b 100644 --- a/mma/docs/html/lib/stdlib/samba.html +++ b/mma/docs/html/lib/stdlib/samba.html @@ -1,4 +1,4 @@ - +

    Samba

    @@ -37,7 +37,7 @@

    SambaFill

    - Adds a whistle to the sandard beat. (4) + Adds a whistle to the standard beat. (4)
    diff --git a/mma/docs/html/lib/stdlib/showtune.html b/mma/docs/html/lib/stdlib/showtune.html new file mode 100644 index 0000000..4818d29 --- /dev/null +++ b/mma/docs/html/lib/stdlib/showtune.html @@ -0,0 +1,168 @@ + + + +

    Showtune

    +

    An attempt for an orchestral backing for showtunes. I use this for ``I Loved You Once In Silence'' from ``Camelot''. Lots of strings and no drumkit. +

    +

    + + +
    +

    Variables

    +
    + + + + + + + + + +
    ExtraVoice Voice for the alternating arpeggios in ShowTune2 (Default=TubularBells).
    ExtraOctave Octave for ExtraVoice (Default=6).
    +
    + + + + + +
    +

    ShowTune

    + Basic track with strings. (4) +
    + + + + + +
    Bass-Guitar AcousticBass
    Bass-Timp Timpani
    Chord-Flute Flute
    Chord-String Strings
    +
    + + + + +
    +

    ShowTune1

    + Add in pizzicato strings. (4) +
    + + + + + + + +
    Arpeggio-Piz PizzicatoString
    Bass-Guitar AcousticBass
    Bass-Timp Timpani
    Chord-Flute Flute
    Chord-Piz PizzicatoString
    Chord-String Strings
    +
    + + + + +
    +

    ShowTune2

    + Basic version with extra ''stuff''. Set voice with ``ExtraVoice''. (4) +
    + + + + + + +
    Arpeggio-Extra TubularBells
    Bass-Guitar AcousticBass
    Bass-Timp Timpani
    Chord-Flute Flute
    Chord-String Strings
    +
    + + + + +
    +

    ShowTunePlus

    + Add trumpet arpeggios. (4) +
    + + + + + + + +
    Arpeggio-Horn FrenchHorn
    Arpeggio-Trumpet Trumpet
    Bass-Guitar AcousticBass
    Bass-Timp Timpani
    Chord-Flute Flute
    Chord-String Strings
    +
    + + + + +
    +

    ShowTune1Plus

    + Add trumpets and plucked strings. (4) +
    + + + + + + + + + +
    Arpeggio-Horn FrenchHorn
    Arpeggio-Piz PizzicatoString
    Arpeggio-Trumpet Trumpet
    Bass-Guitar AcousticBass
    Bass-Timp Timpani
    Chord-Flute Flute
    Chord-Piz PizzicatoString
    Chord-String Strings
    +
    + + + + +
    +

    ShowTune2Plus

    + Add trumpets and ``extra''. (4) +
    + + + + + + + + +
    Arpeggio-Extra TubularBells
    Arpeggio-Horn FrenchHorn
    Arpeggio-Trumpet Trumpet
    Bass-Guitar AcousticBass
    Bass-Timp Timpani
    Chord-Flute Flute
    Chord-String Strings
    +
    + + + + +
    +

    ShowTuneIntro

    + 4 bar intro with plucked strings. (4) +
    + + + + + + + +
    Arpeggio-Piz PizzicatoString
    Bass-Guitar AcousticBass
    Bass-Timp Timpani
    Chord-Flute Flute
    Chord-Piz PizzicatoString
    Chord-String Strings
    +
    + + + + +
    +

    ShowTuneEnd

    + A pretty dull ending. (2) +
    + + + + +
    Bass-Guitar AcousticBass
    Chord-Flute Flute
    Chord-String Strings
    +
    + + diff --git a/mma/docs/html/lib/stdlib/shuffleboggie.html b/mma/docs/html/lib/stdlib/shuffleboggie.html index f67ce1c..68ceee6 100644 --- a/mma/docs/html/lib/stdlib/shuffleboggie.html +++ b/mma/docs/html/lib/stdlib/shuffleboggie.html @@ -1,4 +1,4 @@ - +

    Shuffleboggie

    @@ -10,6 +10,7 @@
  • ShuffleBoggieIntro
  • ShuffleBoggieIntro4
  • ShuffleBoggieEnd +
  • ShuffleBoggieFill @@ -133,5 +134,24 @@
  • + + + + +
    +

    ShuffleBoggieFill

    + Single bar fill. (1) +
    + + + + + + + + + +
    Bass SlapBass1
    Chord-Guitar MutedGuitar
    Chord-Piano Piano2
    Chord-Sax TenorSax
    Drum-Clap HandClap
    Drum-Kick KickDrum1
    Drum-Ohh OpenHiHat
    Drum-Snare SnareDrum2
    +
    diff --git a/mma/docs/html/lib/stdlib/ska.html b/mma/docs/html/lib/stdlib/ska.html index e3d90c8..f9d4111 100644 --- a/mma/docs/html/lib/stdlib/ska.html +++ b/mma/docs/html/lib/stdlib/ska.html @@ -1,4 +1,4 @@ - +

    Ska

    diff --git a/mma/docs/html/lib/stdlib/slowblues.html b/mma/docs/html/lib/stdlib/slowblues.html index 3232060..079b724 100644 --- a/mma/docs/html/lib/stdlib/slowblues.html +++ b/mma/docs/html/lib/stdlib/slowblues.html @@ -1,4 +1,4 @@ - +

    Slowblues

    diff --git a/mma/docs/html/lib/stdlib/slowbolero.html b/mma/docs/html/lib/stdlib/slowbolero.html index 3d62f6f..72c8f66 100644 --- a/mma/docs/html/lib/stdlib/slowbolero.html +++ b/mma/docs/html/lib/stdlib/slowbolero.html @@ -1,4 +1,4 @@ - +

    Slowbolero

    diff --git a/mma/docs/html/lib/stdlib/slowbroadway.html b/mma/docs/html/lib/stdlib/slowbroadway.html new file mode 100644 index 0000000..a67beff --- /dev/null +++ b/mma/docs/html/lib/stdlib/slowbroadway.html @@ -0,0 +1,133 @@ + + + +

    Slowbroadway

    +

    This is slower version of the "broadway" rhythm. It works in 4/4 time and is voicing compatible. Written for an upbeat version of "Some Enchanted Evening". +

    + + + + +
    +

    SlowBroadway

    + A corny Broadway tune rhythm. (4) +
    + + + + + + + + + +
    Bass AcousticBass
    Chord-Gloc Glockenspiel
    Chord-Piz PizzicatoString
    Drum-Hih1 ClosedHiHat
    Drum-Hih2 ClosedHiHat
    Drum-Kick KickDrum1
    Drum-Snare SnareDrum1
    Drum-Tri OpenTriangle
    +
    + + + + +
    +

    SlowBroadway1

    + Add in arpegiating flute. (4) +
    + + + + + + + + + + +
    Arpeggio Flute
    Bass AcousticBass
    Chord-Gloc Glockenspiel
    Chord-Piz PizzicatoString
    Drum-Hih1 ClosedHiHat
    Drum-Hih2 ClosedHiHat
    Drum-Kick KickDrum1
    Drum-Snare SnareDrum1
    Drum-Tri OpenTriangle
    +
    + + + + +
    +

    SlowBroadwaySus

    + Add sustained strings. (4) +
    + + + + + + + + + + +
    Bass AcousticBass
    Chord-Gloc Glockenspiel
    Chord-Piz PizzicatoString
    Chord-Sus Strings
    Drum-Hih1 ClosedHiHat
    Drum-Hih2 ClosedHiHat
    Drum-Kick KickDrum1
    Drum-Snare SnareDrum1
    Drum-Tri OpenTriangle
    +
    + + + + +
    +

    SlowBroadway1Sus

    + Sustained strings and apregiating flute. (4) +
    + + + + + + + + + + + +
    Arpeggio Flute
    Bass AcousticBass
    Chord-Gloc Glockenspiel
    Chord-Piz PizzicatoString
    Chord-Sus Strings
    Drum-Hih1 ClosedHiHat
    Drum-Hih2 ClosedHiHat
    Drum-Kick KickDrum1
    Drum-Snare SnareDrum1
    Drum-Tri OpenTriangle
    +
    + + + + +
    +

    SlowBroadwayIntro

    + Simple 4 bar intro. (4) +
    + + + + + + + + + +
    Bass AcousticBass
    Chord-Gloc Glockenspiel
    Chord-Piz PizzicatoString
    Drum-Hih1 ClosedHiHat
    Drum-Hih2 ClosedHiHat
    Drum-Kick KickDrum1
    Drum-Snare SnareDrum1
    Drum-Tri OpenTriangle
    +
    + + + + +
    +

    SlowBroadwayEnd

    + A 2 bar ending. (2) +
    + + + + + + + + + +
    Bass AcousticBass
    Chord-Gloc Glockenspiel
    Chord-Piz PizzicatoString
    Drum-Hih1 ClosedHiHat
    Drum-Hih2 ClosedHiHat
    Drum-Kick KickDrum1
    Drum-Snare SnareDrum1
    Drum-Tri OpenTriangle
    +
    + + diff --git a/mma/docs/html/lib/stdlib/slowcountry.html b/mma/docs/html/lib/stdlib/slowcountry.html index 01080d2..9be3bea 100644 --- a/mma/docs/html/lib/stdlib/slowcountry.html +++ b/mma/docs/html/lib/stdlib/slowcountry.html @@ -1,4 +1,4 @@ - +

    Slowcountry

    diff --git a/mma/docs/html/lib/stdlib/slowjazz.html b/mma/docs/html/lib/stdlib/slowjazz.html index 42e9150..256e62c 100644 --- a/mma/docs/html/lib/stdlib/slowjazz.html +++ b/mma/docs/html/lib/stdlib/slowjazz.html @@ -1,4 +1,4 @@ - +

    Slowjazz

    @@ -14,6 +14,7 @@
  • SlowJazz1WalkSus
  • SlowJazz2
  • SlowJazz2Sus +
  • SlowJazzFill
  • SlowJazzIntro
  • SlowJazz1Intro
  • SlowJazz2Intro @@ -191,6 +192,21 @@ + + + + +
    +

    SlowJazzFill

    + One bar fill with a decending bass walk. (1) +
    + + + + + +
    Bass AcousticBass
    Chord Piano2
    Drum-Hh RideCymbal2
    Drum-Shake Shaker
    +
    diff --git a/mma/docs/html/lib/stdlib/softrock.html b/mma/docs/html/lib/stdlib/softrock.html index 2418439..6c27f14 100644 --- a/mma/docs/html/lib/stdlib/softrock.html +++ b/mma/docs/html/lib/stdlib/softrock.html @@ -1,4 +1,4 @@ - +

    Softrock

    diff --git a/mma/docs/html/lib/stdlib/softshoe.html b/mma/docs/html/lib/stdlib/softshoe.html index 6f6971c..6386094 100644 --- a/mma/docs/html/lib/stdlib/softshoe.html +++ b/mma/docs/html/lib/stdlib/softshoe.html @@ -1,4 +1,4 @@ - +

    Softshoe

    diff --git a/mma/docs/html/lib/stdlib/son.html b/mma/docs/html/lib/stdlib/son.html index 2e9574c..a5537f8 100644 --- a/mma/docs/html/lib/stdlib/son.html +++ b/mma/docs/html/lib/stdlib/son.html @@ -1,11 +1,31 @@ - +

    Son

    The Son or Son Montuno is a traditional Cuban rhythm. The song ``Alma De Mujer'' in the sample songs uses this. For the most part I've developed the patterns right from ``Latin Rhythms: Mystery Unraveled'' by Victor Lopez. +

    + + + +
    +

    Variables

    +
    + + + + + + + + + +
    ArpeggioVoice Voice for the alternating apreggios in the Plus versions (Default=Flute).
    ApreggioOctave Base octave for apreggios in Plus versions. (Default=6)
    +

    @@ -13,6 +33,7 @@

    Son

    +

    Aliases: Fill-Cc, Fill-Bb, Main-D, Fill-Dd, Main-B, Main-C, Main-A, Fill-Aa

    Our basic Son rhythm. (2)
    @@ -35,6 +56,7 @@

    SonSus

    +

    Aliases: Main-Asus, Main-Dsus, Main-Bsus, Main-Csus

    Son with sustained strings. (2)
    @@ -54,10 +76,58 @@
    + + + + +
    +

    SonPlus

    + Son with flute arpeggios (2) +
    + + + + + + + + + + + + + +
    Arpeggio Flute
    Bass JazzGuitar
    Chord Piano2
    Drum-Claves Claves
    Drum-Cymbal RideCymbal1
    Drum-Hbongo HighBongo
    Drum-Hconga OpenHighConga
    Drum-Lbongo LowBongo
    Drum-Lconga LowConga
    Drum-Lowtom LowTom1
    Drum-Maraca Maracas
    Drum-Sguiro ShortGuiro
    +
    + + + + +
    +

    SonSusPlus

    + Sustained with flute apreggios. (2) +
    + + + + + + + + + + + + + + +
    Arpeggio Flute
    Bass JazzGuitar
    Chord Piano2
    Chord-Sus Strings
    Drum-Claves Claves
    Drum-Cymbal RideCymbal1
    Drum-Hbongo HighBongo
    Drum-Hconga OpenHighConga
    Drum-Lbongo LowBongo
    Drum-Lconga LowConga
    Drum-Lowtom LowTom1
    Drum-Maraca Maracas
    Drum-Sguiro ShortGuiro
    +

    SonIntro

    +

    Aliases: Intro-B, Intro-C, Intro-A, Intro-D

    Boring, four bar introduction. (4)
    @@ -80,6 +150,7 @@

    SonEnd

    +

    Aliases: Ending-A, Ending-C, Ending-B, Ending-D

    Simple ending. (2)
    diff --git a/mma/docs/html/lib/stdlib/swing.html b/mma/docs/html/lib/stdlib/swing.html index 2929643..f641e8c 100644 --- a/mma/docs/html/lib/stdlib/swing.html +++ b/mma/docs/html/lib/stdlib/swing.html @@ -1,4 +1,4 @@ - +

    Swing

    diff --git a/mma/docs/html/lib/stdlib/tango.html b/mma/docs/html/lib/stdlib/tango.html index 6a7e6f8..3aaf004 100644 --- a/mma/docs/html/lib/stdlib/tango.html +++ b/mma/docs/html/lib/stdlib/tango.html @@ -1,4 +1,4 @@ - +

    Tango

    diff --git a/mma/docs/html/lib/stdlib/trance.html b/mma/docs/html/lib/stdlib/trance.html new file mode 100644 index 0000000..d638845 --- /dev/null +++ b/mma/docs/html/lib/stdlib/trance.html @@ -0,0 +1,203 @@ + + + +

    Trance

    +

    My first adventure in the great land of boring dance and techno beats. +

    + + + + +
    +

    Trance

    + A smooth techno beat. (4) +
    + + + + + + + + + + + + + +
    Bass SynthBass1
    Chord-Gob Goblins
    Chord-Guitar NylonGuitar
    Chord-Warm WarmPad
    Drum-105 105
    Drum-Clap HandClap
    Drum-Hh PedalHiHat
    Drum-Kick KickDrum1
    Drum-Mutetri MuteTriangle
    Drum-Ohh OpenHiHat
    Drum-Opentri OpenTriangle
    Drum-Tam Tambourine
    +
    + + + + +
    +

    Trance1

    + Adds an annoying repetition to the beat. (4) +
    + + + + + + + + + + + + + + +
    Bass SynthBass1
    Chord-Brass BrassSection
    Chord-Gob Goblins
    Chord-Guitar NylonGuitar
    Chord-Warm WarmPad
    Drum-105 105
    Drum-Clap HandClap
    Drum-Hh PedalHiHat
    Drum-Kick KickDrum1
    Drum-Mutetri MuteTriangle
    Drum-Ohh OpenHiHat
    Drum-Opentri OpenTriangle
    Drum-Tam Tambourine
    +
    + + + + +
    +

    Trance2

    + Changes repeating brass to 8ths and kills space sounds. (4) +
    + + + + + + + + + + + + + +
    Bass SynthBass1
    Chord-Brass BrassSection
    Chord-Guitar NylonGuitar
    Chord-Warm WarmPad
    Drum-105 105
    Drum-Clap HandClap
    Drum-Hh PedalHiHat
    Drum-Kick KickDrum1
    Drum-Mutetri MuteTriangle
    Drum-Ohh OpenHiHat
    Drum-Opentri OpenTriangle
    Drum-Tam Tambourine
    +
    + + + + +
    +

    TranceBass1

    + Same as Trance, with long bass on 1,3. (4) +
    + + + + + + + + + + + + + +
    Bass SynthBass1
    Chord-Gob Goblins
    Chord-Guitar NylonGuitar
    Chord-Warm WarmPad
    Drum-105 105
    Drum-Clap HandClap
    Drum-Hh PedalHiHat
    Drum-Kick KickDrum1
    Drum-Mutetri MuteTriangle
    Drum-Ohh OpenHiHat
    Drum-Opentri OpenTriangle
    Drum-Tam Tambourine
    +
    + + + + +
    +

    Trance1Bass1

    + Same as Trance1, with long bass on 1,3. (4) +
    + + + + + + + + + + + + + + +
    Bass SynthBass1
    Chord-Brass BrassSection
    Chord-Gob Goblins
    Chord-Guitar NylonGuitar
    Chord-Warm WarmPad
    Drum-105 105
    Drum-Clap HandClap
    Drum-Hh PedalHiHat
    Drum-Kick KickDrum1
    Drum-Mutetri MuteTriangle
    Drum-Ohh OpenHiHat
    Drum-Opentri OpenTriangle
    Drum-Tam Tambourine
    +
    + + + + +
    +

    Trance2Bass1

    + Same as Trance2, with long bass on 1,3. (4) +
    + + + + + + + + + + + + + +
    Bass SynthBass1
    Chord-Brass BrassSection
    Chord-Guitar NylonGuitar
    Chord-Warm WarmPad
    Drum-105 105
    Drum-Clap HandClap
    Drum-Hh PedalHiHat
    Drum-Kick KickDrum1
    Drum-Mutetri MuteTriangle
    Drum-Ohh OpenHiHat
    Drum-Opentri OpenTriangle
    Drum-Tam Tambourine
    +
    + + + + +
    +

    TranceIntro

    + Hypnotic intro? (4) +
    + + + + + + + + + + + + + +
    Bass SynthBass1
    Chord-Gob Goblins
    Chord-Guitar NylonGuitar
    Chord-Warm WarmPad
    Drum-105 105
    Drum-Clap HandClap
    Drum-Hh PedalHiHat
    Drum-Kick KickDrum1
    Drum-Mutetri MuteTriangle
    Drum-Ohh OpenHiHat
    Drum-Opentri OpenTriangle
    Drum-Tam Tambourine
    +
    + + + + +
    +

    TranceEnd

    + Fading ending, nothing on beats 3/4 of final bar. (4) +
    + + + + + + + + + + + + + +
    Bass SynthBass1
    Chord-Gob Goblins
    Chord-Guitar NylonGuitar
    Chord-Warm WarmPad
    Drum-105 105
    Drum-Clap HandClap
    Drum-Hh PedalHiHat
    Drum-Kick KickDrum1
    Drum-Mutetri MuteTriangle
    Drum-Ohh OpenHiHat
    Drum-Opentri OpenTriangle
    Drum-Tam Tambourine
    +
    + + diff --git a/mma/docs/html/lib/stdlib/vienesewaltz.html b/mma/docs/html/lib/stdlib/vienesewaltz.html index 638793b..2b9670a 100644 --- a/mma/docs/html/lib/stdlib/vienesewaltz.html +++ b/mma/docs/html/lib/stdlib/vienesewaltz.html @@ -1,4 +1,4 @@ - +

    Vienesewaltz

    diff --git a/mma/docs/html/lib/stdlib/waltz.html b/mma/docs/html/lib/stdlib/waltz.html index 68127dd..b3a2365 100644 --- a/mma/docs/html/lib/stdlib/waltz.html +++ b/mma/docs/html/lib/stdlib/waltz.html @@ -1,4 +1,4 @@ - +

    Waltz

    @@ -14,6 +14,8 @@
  • Waltz1WalkSus
  • WaltzIntro
  • Waltz1Intro +
  • WaltzIntro8 +
  • Waltz1intro8
  • WaltzEnd @@ -204,6 +206,42 @@
  • + + + + +
    +

    WaltzIntro8

    + 8 bar waltz intro with piano chords. (8) +
    + + + + + + + + +
    Bass AcousticBass
    Chord Piano1
    Drum-Chh ClosedHiHat
    Drum-Kick KickDrum1
    Drum-Snare SnareDrum1
    Drum-Tri OpenTriangle
    Walk AcousticBass
    +
    + + + + +
    +

    Waltz1intro8

    + 8 bar wWaltz intro with piano arpeggios. (8) +
    + + + + + + + + +
    Arpeggio Piano1
    Bass AcousticBass
    Drum-Chh ClosedHiHat
    Drum-Kick KickDrum1
    Drum-Snare SnareDrum1
    Drum-Tri OpenTriangle
    Walk AcousticBass
    +
    - + - + - + @@ -203,7 +213,10 @@ for each time event:

    -In the above table the ``..'' notation indicates that the offset is +In the above table the ``$\Rightarrow$'' indicates that the offset is out-of-range and converted to the second value.

    @@ -216,7 +229,7 @@ Please note the following:

      -
    • ARIAs are not saved or modified by GROOVE commands. Well, almost +
    • ARIAs are not saved or modified by GROOVE commands. Well, almost ...the sequence size will be adjusted to match the new size from the groove. This might be unexpected: @@ -233,7 +246,7 @@ groove. This might be unexpected:
    • Process a few bars of music.
    • Load a new groove, but this time with a SEQSIZE of 2. Now, the - ARIA will be truncated. This behaviour is duplicated in other + ARIA will be truncated. This behavior is duplicated in other tracks as well, but it might be unexpected here.
    @@ -250,35 +263,38 @@ the entire sequence.

    You can make dramatic changes to your songs with a few simple tricks. Try modifying the DIRECTION settings just slightly; use -several patterns and SEQRND to generate less predicable +several patterns and SEQRND to generate less predictable patterns; use HARMONLYONLY with a different voice and pattern.

    Oh, and have fun!

    -


    + +

    + +

    bob -2007-03-07 +2008-09-28
    diff --git a/mma/docs/html/ref/node12.html b/mma/docs/html/ref/node12.html index 95eb149..f1c8cd4 100644 --- a/mma/docs/html/ref/node12.html +++ b/mma/docs/html/ref/node12.html @@ -1,4 +1,4 @@ - + -Chord Voicing - +Randomizing + @@ -25,1283 +25,302 @@ original version by: Nikos Drakos, CBLU, University of Leeds - - + next - up - previous
    - Next:Harmony - Up: Next: Chord Voicing + Up:Reference Manual - Previous: Previous: Automatic Melodies: Aria Tracks
    -
    +
    Subsections -
      -
    • Voicing - -
      -
    • ChordAdjust -
    • Compress -
    • DupRoot -
    • Invert -
    • Limit -
    • NoteSpan -
    • Range -
    • DefChord -
    • PrintChord -
    • Notes +

      - +
      -Chord Voicing +Randomizing

      -In music, a chord is simply defined as two more notes played -simultaneously. Now, this doesn't mean that you can play just any two -or three notes and get a chord which sounds nice--but whatever you do -get will be a chord of some type. And, to further confuse the unwary, -different arrangements of the same notes sound better (or worse) in -different musical situations. - -

      -As a simple example, consider a C major chord. Built on the first, -third and fifth notes of a C major scale it can be manipulated into a -variety of sounds: - -

      -

      - Lost Image - -
      - -

      -These are all C major chords ...but they all have a different -sound or color. The different forms a chord can take are called -``voicings''. Again, this manual is not intended to be a primer on -musical theory--that's a subject for which lots of lessons with your -favorite music teacher is recommended. You'll need a bit of -basic music theory if you want to understand how and why -MMA creates its tracks. - -

      -The different options in this chapter effect not only the way chords -are constructed, but also the way bass lines and other tracks are -formed. - -

      -There are generally two ways in -MMA to take care of voicings. - -

      - -

        -
      1. use -MMA 's extensive VOICING options, most likely with - the ''Optimal'' voicing algorithm, - -

        -

      2. -
      3. do everything by yourself with the commands INVERT and - COMPRESS. - -

        -

      4. -
      - -

      -The commands LIMIT and DUPROOT may be used independently -for both variants. +One criticism of computer generated music is that all to often it's +too predictable or mechanical sounding. Again, in +MMA we're not +trying to replace real, flesh and blood musicians, but applying some +randomization to the way in which tracks are generated can help bridge +the human--mechanical gap.

      -Voicing +RndSeed

      -The VOICING command is used to set the voicing mode and several -other options relating to the selected mode. The command needs to have -a CHORD track specified and a series of Option=Value pairs. For -example: +All of the random functions (RTIME, RSKIP, etc.) in + +MMA depend on the Python random module. Each time +MMA generates a track the values generated by the random functions will be +different. In most cases this is a ``good thing''; however, you may +want +MMA to use the same sequence of random values12.1 each time it generates a +track. Simple: just use:

    diff --git a/mma/docs/html/lib/stdlib/zydeco.html b/mma/docs/html/lib/stdlib/zydeco.html index 6a77458..cc57a57 100644 --- a/mma/docs/html/lib/stdlib/zydeco.html +++ b/mma/docs/html/lib/stdlib/zydeco.html @@ -1,4 +1,4 @@ - +

    Zydeco

    diff --git a/mma/docs/html/lib/yamaha/mambo.html b/mma/docs/html/lib/yamaha/mambo.html index da3d8e9..26bd016 100644 --- a/mma/docs/html/lib/yamaha/mambo.html +++ b/mma/docs/html/lib/yamaha/mambo.html @@ -1,4 +1,4 @@ - +

    Mambo

    diff --git a/mma/docs/html/lib/yamaha/quando-g.s280.html b/mma/docs/html/lib/yamaha/quando-g.s280.html index 83980ac..c21bd10 100644 --- a/mma/docs/html/lib/yamaha/quando-g.s280.html +++ b/mma/docs/html/lib/yamaha/quando-g.s280.html @@ -1,4 +1,4 @@ - +

    Quando-G.S280

    diff --git a/mma/docs/html/lib/yamaha/salsa1.html b/mma/docs/html/lib/yamaha/salsa1.html new file mode 100644 index 0000000..1971c5a --- /dev/null +++ b/mma/docs/html/lib/yamaha/salsa1.html @@ -0,0 +1,280 @@ + + + +

    Salsa1

    +

    Original file: sty/salsa1.sty ... insert your comments here! +

    + + + + +
    +

    Main-A

    + Auto-generated 'Main A' sty/salsa1.sty (4) +
    + + + + + + + + + + + + + +
    Bass-11 AcousticBass
    Chord-12 Piano1
    Drum-Cabasa Cabasa
    Drum-Cowbell CowBell
    Drum-Highbongo HighBongo
    Drum-Kickdrum1 KickDrum1
    Drum-Lowbongo LowBongo
    Drum-Lowconga LowConga
    Drum-Maracas Maracas
    Drum-Mutehighconga MuteHighConga
    Drum-Openhighconga OpenHighConga
    Drum-Pedalhihat PedalHiHat
    +
    + + + + +
    +

    Intro-A

    + Auto-generated 'Intro A' sty/salsa1.sty (2) +
    + + + + + + + + + + + + + +
    Bass-14 SlowStrings
    Chord-12 Piano1
    Chord-13 Vibraphone
    Drum-Cabasa Cabasa
    Drum-Hightimbale HighTimbale
    Drum-Lowagogo LowAgogo
    Drum-Lowbongo LowBongo
    Drum-Lowconga LowConga
    Drum-Lowtom1 LowTom1
    Drum-Mutehighconga MuteHighConga
    Drum-Openhighconga OpenHighConga
    Drum-Pedalhihat PedalHiHat
    +
    + + + + +
    +

    Fill-AA

    + Auto-generated 'Fill In AA' sty/salsa1.sty (1) +
    + + + + + + + + + + + + + + + +
    Bass-16 FretlessBass
    Chord-13 Vibraphone
    Drum-Closedhihat ClosedHiHat
    Drum-Crashcymbal1 CrashCymbal1
    Drum-Hightimbale HighTimbale
    Drum-Kickdrum1 KickDrum1
    Drum-Lowconga LowConga
    Drum-Lowtimbale LowTimbale
    Drum-Lowtom1 LowTom1
    Drum-Maracas Maracas
    Drum-Mutehighconga MuteHighConga
    Drum-Pedalhihat PedalHiHat
    Drum-Shortguiro ShortGuiro
    Drum-Snaredrum1 SnareDrum1
    +
    + + + + +
    +

    Fill-AB

    + Auto-generated 'Fill In AB' sty/salsa1.sty (1) +
    + + + + + + + + + + + + + + + + +
    Bass-15 BrassSection
    Bass-16 FretlessBass
    Chord-13 Vibraphone
    Drum-Closedhihat ClosedHiHat
    Drum-Crashcymbal1 CrashCymbal1
    Drum-Hightimbale HighTimbale
    Drum-Kickdrum1 KickDrum1
    Drum-Lowconga LowConga
    Drum-Lowtimbale LowTimbale
    Drum-Lowtom1 LowTom1
    Drum-Maracas Maracas
    Drum-Mutehighconga MuteHighConga
    Drum-Pedalhihat PedalHiHat
    Drum-Shortguiro ShortGuiro
    Drum-Snaredrum1 SnareDrum1
    +
    + + + + +
    +

    Ending-A

    + Auto-generated 'Ending A' sty/salsa1.sty (3) +
    + + + + + + + + + + + + + + + + +
    Bass-16 FretlessBass
    Chord-13 Vibraphone
    Drum-Cabasa Cabasa
    Drum-Closedhihat ClosedHiHat
    Drum-Cowbell CowBell
    Drum-Hightimbale HighTimbale
    Drum-Kickdrum1 KickDrum1
    Drum-Longlowwhistle LongLowWhistle
    Drum-Lowagogo LowAgogo
    Drum-Lowconga LowConga
    Drum-Lowtom1 LowTom1
    Drum-Maracas Maracas
    Drum-Mutehighconga MuteHighConga
    Drum-Openhighconga OpenHighConga
    Drum-Pedalhihat PedalHiHat
    +
    + + + + +
    +

    Main-B

    + Auto-generated 'Main B' sty/salsa1.sty (4) +
    + + + + + + + + + + + + + + + + + + +
    Bass-14 SlowStrings
    Bass-16 FretlessBass
    Chord-13 Vibraphone
    Drum-Cabasa Cabasa
    Drum-Claves Claves
    Drum-Highbongo HighBongo
    Drum-Hightimbale HighTimbale
    Drum-Kickdrum1 KickDrum1
    Drum-Lowagogo LowAgogo
    Drum-Lowbongo LowBongo
    Drum-Lowconga LowConga
    Drum-Lowtimbale LowTimbale
    Drum-Mutehighconga MuteHighConga
    Drum-Openhighconga OpenHighConga
    Drum-Pedalhihat PedalHiHat
    Drum-Ridecymbal1 RideCymbal1
    Drum-Snaredrum1 SnareDrum1
    +
    + + + + +
    +

    Intro-B

    + Auto-generated 'Intro B' sty/salsa1.sty (2) +
    + + + + + + + + + + + + +
    Bass-14 SlowStrings
    Chord-13 Vibraphone
    Drum-Cabasa Cabasa
    Drum-Hightimbale HighTimbale
    Drum-Lowagogo LowAgogo
    Drum-Lowbongo LowBongo
    Drum-Lowconga LowConga
    Drum-Lowtom1 LowTom1
    Drum-Mutehighconga MuteHighConga
    Drum-Openhighconga OpenHighConga
    Drum-Pedalhihat PedalHiHat
    +
    + + + + +
    +

    Fill-BB

    + Auto-generated 'Fill In BB' sty/salsa1.sty (1) +
    + + + + + + + + + + + + + + + + + + + + + +
    Bass-15 BrassSection
    Bass-16 FretlessBass
    Chord-13 Vibraphone
    Drum-Cabasa Cabasa
    Drum-Claves Claves
    Drum-Crashcymbal1 CrashCymbal1
    Drum-Highbongo HighBongo
    Drum-Hightimbale HighTimbale
    Drum-Kickdrum1 KickDrum1
    Drum-Lowagogo LowAgogo
    Drum-Lowbongo LowBongo
    Drum-Lowconga LowConga
    Drum-Lowtimbale LowTimbale
    Drum-Lowtom1 LowTom1
    Drum-Mutehighconga MuteHighConga
    Drum-Openhighconga OpenHighConga
    Drum-Pedalhihat PedalHiHat
    Drum-Ridecymbal1 RideCymbal1
    Drum-Shorthiwhistle ShortHiWhistle
    Drum-Snaredrum1 SnareDrum1
    +
    + + + + +
    +

    Fill-BA

    + Auto-generated 'Fill In BA' sty/salsa1.sty (1) +
    + + + + + + + + + + + + + + + + + + + + +
    Bass-16 FretlessBass
    Chord-13 Vibraphone
    Drum-Cabasa Cabasa
    Drum-Claves Claves
    Drum-Crashcymbal1 CrashCymbal1
    Drum-Highbongo HighBongo
    Drum-Hightimbale HighTimbale
    Drum-Kickdrum1 KickDrum1
    Drum-Lowagogo LowAgogo
    Drum-Lowbongo LowBongo
    Drum-Lowconga LowConga
    Drum-Lowtimbale LowTimbale
    Drum-Lowtom1 LowTom1
    Drum-Mutehighconga MuteHighConga
    Drum-Openhighconga OpenHighConga
    Drum-Pedalhihat PedalHiHat
    Drum-Ridecymbal1 RideCymbal1
    Drum-Shorthiwhistle ShortHiWhistle
    Drum-Snaredrum1 SnareDrum1
    +
    + + + + +
    +

    Ending-B

    + Auto-generated 'Ending B' sty/salsa1.sty (3) +
    + + + + + + + + + + + + + + + + + +
    Bass-15 BrassSection
    Bass-16 FretlessBass
    Chord-13 Vibraphone
    Drum-Cabasa Cabasa
    Drum-Closedhihat ClosedHiHat
    Drum-Cowbell CowBell
    Drum-Hightimbale HighTimbale
    Drum-Kickdrum1 KickDrum1
    Drum-Longlowwhistle LongLowWhistle
    Drum-Lowagogo LowAgogo
    Drum-Lowconga LowConga
    Drum-Lowtom1 LowTom1
    Drum-Maracas Maracas
    Drum-Mutehighconga MuteHighConga
    Drum-Openhighconga OpenHighConga
    Drum-Pedalhihat PedalHiHat
    +
    + + diff --git a/mma/docs/html/lib/yamaha/salsa2.html b/mma/docs/html/lib/yamaha/salsa2.html new file mode 100644 index 0000000..1e8e7b1 --- /dev/null +++ b/mma/docs/html/lib/yamaha/salsa2.html @@ -0,0 +1,268 @@ + + + +

    Salsa2

    +

    Original file: salsa2.sty ... insert your comments here! +

    + + + + +
    +

    Main-A

    + Auto-generated 'Main A' salsa2.sty (4) +
    + + + + + + + + + + + +
    Bass-11 AcousticBass
    Bass-14 BrassSection
    Chord-12 Piano1
    Drum-Cowbell CowBell
    Drum-Highbongo HighBongo
    Drum-Highwoodblock HighWoodBlock
    Drum-Lowagogo LowAgogo
    Drum-Maracas Maracas
    Drum-Mutehighconga MuteHighConga
    Drum-Openhighconga OpenHighConga
    +
    + + + + +
    +

    Intro-A

    + Auto-generated 'Intro A' salsa2.sty (4) +
    + + + + + + + + + + + + + + + +
    Bass-8 SynthBass2
    Bass-9 SlowStrings
    Chord-13 NylonGuitar
    Drum-Cowbell CowBell
    Drum-Highbongo HighBongo
    Drum-Longguiro LongGuiro
    Drum-Longlowwhistle LongLowWhistle
    Drum-Lowbongo LowBongo
    Drum-Lowconga LowConga
    Drum-Mutecuica MuteCuica
    Drum-Opencuica OpenCuica
    Drum-Openhighconga OpenHighConga
    Drum-Shortguiro ShortGuiro
    Drum-Shorthiwhistle ShortHiWhistle
    +
    + + + + +
    +

    Fill-AA

    + Auto-generated 'Fill In AA' salsa2.sty (1) +
    + + + + + + + + + + + +
    Bass-11 AcousticBass
    Chord-12 Piano1
    Drum-Cowbell CowBell
    Drum-Highbongo HighBongo
    Drum-Hightimbale HighTimbale
    Drum-Highwoodblock HighWoodBlock
    Drum-Maracas Maracas
    Drum-Mutehighconga MuteHighConga
    Drum-Openhighconga OpenHighConga
    Drum-Splashcymbal SplashCymbal
    +
    + + + + +
    +

    Fill-AB

    + Auto-generated 'Fill In AB' salsa2.sty (1) +
    + + + + + + + + + + + + + + + +
    Bass-11 AcousticBass
    Chord-12 Piano1
    Chord-13 NylonGuitar
    Drum-Cabasa Cabasa
    Drum-Closedhihat ClosedHiHat
    Drum-Highbongo HighBongo
    Drum-Kickdrum2 KickDrum2
    Drum-Lowbongo LowBongo
    Drum-Lowconga LowConga
    Drum-Mutehighconga MuteHighConga
    Drum-Openhighconga OpenHighConga
    Drum-Openhihat OpenHiHat
    Drum-Ridecymbal2 RideCymbal2
    Drum-Snaredrum2 SnareDrum2
    +
    + + + + +
    +

    Ending-A

    + Auto-generated 'Ending A' salsa2.sty (2) +
    + + + + + + + + + + +
    Bass-14 BrassSection
    Bass-8 SynthBass2
    Chord-15 Piano2
    Drum-Crashcymbal1 CrashCymbal1
    Drum-Highagogo HighAgogo
    Drum-Highbongo HighBongo
    Drum-Hightimbale HighTimbale
    Drum-Kickdrum1 KickDrum1
    Drum-Lowtom2 LowTom2
    +
    + + + + +
    +

    Main-B

    + Auto-generated 'Main B' salsa2.sty (4) +
    + + + + + + + + + + + + + + + + + + + + + + + +
    Bass-14 BrassSection
    Bass-16 SlapBass1
    Chord-15 Piano2
    Drum-Cabasa Cabasa
    Drum-Closedhihat ClosedHiHat
    Drum-Cowbell CowBell
    Drum-Highagogo HighAgogo
    Drum-Hightimbale HighTimbale
    Drum-Kickdrum2 KickDrum2
    Drum-Longguiro LongGuiro
    Drum-Lowconga LowConga
    Drum-Lowtom1 LowTom1
    Drum-Maracas Maracas
    Drum-Midtom1 MidTom1
    Drum-Mutehighconga MuteHighConga
    Drum-Mutetriangle MuteTriangle
    Drum-Openhighconga OpenHighConga
    Drum-Pedalhihat PedalHiHat
    Drum-Shaker Shaker
    Drum-Shortguiro ShortGuiro
    Drum-Sidekick SideKick
    Drum-Splashcymbal SplashCymbal
    +
    + + + + +
    +

    Intro-B

    + Auto-generated 'Intro B' salsa2.sty (4) +
    + + + + + + + + + + + + + + + + + + + +
    Bass-14 BrassSection
    Bass-8 SynthBass2
    Chord-12 Piano1
    Drum-Claves Claves
    Drum-Crashcymbal1 CrashCymbal1
    Drum-Highagogo HighAgogo
    Drum-Hightimbale HighTimbale
    Drum-Hightom1 HighTom1
    Drum-Kickdrum1 KickDrum1
    Drum-Lowagogo LowAgogo
    Drum-Lowtimbale LowTimbale
    Drum-Lowtom1 LowTom1
    Drum-Lowtom2 LowTom2
    Drum-Maracas Maracas
    Drum-Midtom1 MidTom1
    Drum-Mutetriangle MuteTriangle
    Drum-Opentriangle OpenTriangle
    Drum-Snaredrum1 SnareDrum1
    +
    + + + + +
    +

    Fill-BB

    + Auto-generated 'Fill In BB' salsa2.sty (1) +
    + + + + + + + + + + + + + + + + + + + + +
    Bass-14 BrassSection
    Bass-16 SlapBass1
    Chord-15 Piano2
    Drum-Cabasa Cabasa
    Drum-Closedhihat ClosedHiHat
    Drum-Cowbell CowBell
    Drum-Highagogo HighAgogo
    Drum-Hightimbale HighTimbale
    Drum-Kickdrum2 KickDrum2
    Drum-Lowconga LowConga
    Drum-Lowtimbale LowTimbale
    Drum-Maracas Maracas
    Drum-Mutehighconga MuteHighConga
    Drum-Mutetriangle MuteTriangle
    Drum-Openhighconga OpenHighConga
    Drum-Pedalhihat PedalHiHat
    Drum-Shaker Shaker
    Drum-Shortguiro ShortGuiro
    Drum-Sidekick SideKick
    +
    + + + + +
    +

    Fill-BA

    + Auto-generated 'Fill In BA' salsa2.sty (1) +
    + + + + + + + + + + + + + + + +
    Bass-11 AcousticBass
    Chord-12 Piano1
    Chord-13 NylonGuitar
    Drum-Cabasa Cabasa
    Drum-Closedhihat ClosedHiHat
    Drum-Highbongo HighBongo
    Drum-Kickdrum2 KickDrum2
    Drum-Lowbongo LowBongo
    Drum-Lowconga LowConga
    Drum-Mutehighconga MuteHighConga
    Drum-Openhighconga OpenHighConga
    Drum-Openhihat OpenHiHat
    Drum-Ridecymbal2 RideCymbal2
    Drum-Snaredrum2 SnareDrum2
    +
    + + + + +
    +

    Ending-B

    + Auto-generated 'Ending B' salsa2.sty (2) +
    + + + + + + + + + + +
    Bass-14 BrassSection
    Bass-8 SynthBass2
    Chord-15 Piano2
    Drum-Crashcymbal1 CrashCymbal1
    Drum-Highagogo HighAgogo
    Drum-Highbongo HighBongo
    Drum-Hightimbale HighTimbale
    Drum-Kickdrum1 KickDrum1
    Drum-Lowtom2 LowTom2
    +
    + + diff --git a/mma/docs/html/lib/yamaha/w-rock.html b/mma/docs/html/lib/yamaha/w-rock.html index 7c83c1f..8173f86 100644 --- a/mma/docs/html/lib/yamaha/w-rock.html +++ b/mma/docs/html/lib/yamaha/w-rock.html @@ -1,4 +1,4 @@ - +

    W-Rock

    diff --git a/mma/docs/html/lib/yamaha/western.html b/mma/docs/html/lib/yamaha/western.html index b492cc6..9c8d4a9 100644 --- a/mma/docs/html/lib/yamaha/western.html +++ b/mma/docs/html/lib/yamaha/western.html @@ -1,4 +1,4 @@ - +

    Western

    diff --git a/mma/docs/html/ref/crossref.png b/mma/docs/html/ref/crossref.png deleted file mode 100644 index 7dd2ddd..0000000 Binary files a/mma/docs/html/ref/crossref.png and /dev/null differ diff --git a/mma/docs/html/ref/img1.png b/mma/docs/html/ref/img1.png index effeab0..388020b 100644 Binary files a/mma/docs/html/ref/img1.png and b/mma/docs/html/ref/img1.png differ diff --git a/mma/docs/html/ref/img10.png b/mma/docs/html/ref/img10.png index 2a33534..0a25f1c 100644 Binary files a/mma/docs/html/ref/img10.png and b/mma/docs/html/ref/img10.png differ diff --git a/mma/docs/html/ref/img11.png b/mma/docs/html/ref/img11.png index 3b65b78..86809a9 100644 Binary files a/mma/docs/html/ref/img11.png and b/mma/docs/html/ref/img11.png differ diff --git a/mma/docs/html/ref/img12.png b/mma/docs/html/ref/img12.png index ac5ae8a..5cd237c 100644 Binary files a/mma/docs/html/ref/img12.png and b/mma/docs/html/ref/img12.png differ diff --git a/mma/docs/html/ref/img13.png b/mma/docs/html/ref/img13.png index a43c08b..3a80de2 100644 Binary files a/mma/docs/html/ref/img13.png and b/mma/docs/html/ref/img13.png differ diff --git a/mma/docs/html/ref/img14.png b/mma/docs/html/ref/img14.png index 763679b..f8d3b42 100644 Binary files a/mma/docs/html/ref/img14.png and b/mma/docs/html/ref/img14.png differ diff --git a/mma/docs/html/ref/img15.png b/mma/docs/html/ref/img15.png index cde0d59..9496c9c 100644 Binary files a/mma/docs/html/ref/img15.png and b/mma/docs/html/ref/img15.png differ diff --git a/mma/docs/html/ref/img16.png b/mma/docs/html/ref/img16.png index 3e02013..a5d74ab 100644 Binary files a/mma/docs/html/ref/img16.png and b/mma/docs/html/ref/img16.png differ diff --git a/mma/docs/html/ref/img17.png b/mma/docs/html/ref/img17.png index 2be0cf7..1bb58b2 100644 Binary files a/mma/docs/html/ref/img17.png and b/mma/docs/html/ref/img17.png differ diff --git a/mma/docs/html/ref/img18.png b/mma/docs/html/ref/img18.png index 0245523..56b94d8 100644 Binary files a/mma/docs/html/ref/img18.png and b/mma/docs/html/ref/img18.png differ diff --git a/mma/docs/html/ref/img19.png b/mma/docs/html/ref/img19.png index 984411d..137b9ef 100644 Binary files a/mma/docs/html/ref/img19.png and b/mma/docs/html/ref/img19.png differ diff --git a/mma/docs/html/ref/img2.png b/mma/docs/html/ref/img2.png index 2d8f92f..844c6c1 100644 Binary files a/mma/docs/html/ref/img2.png and b/mma/docs/html/ref/img2.png differ diff --git a/mma/docs/html/ref/img20.png b/mma/docs/html/ref/img20.png index ab5197d..be63f09 100644 Binary files a/mma/docs/html/ref/img20.png and b/mma/docs/html/ref/img20.png differ diff --git a/mma/docs/html/ref/img21.png b/mma/docs/html/ref/img21.png index 34f8a52..fe7d634 100644 Binary files a/mma/docs/html/ref/img21.png and b/mma/docs/html/ref/img21.png differ diff --git a/mma/docs/html/ref/img22.png b/mma/docs/html/ref/img22.png index 0ab8a2d..5c70570 100644 Binary files a/mma/docs/html/ref/img22.png and b/mma/docs/html/ref/img22.png differ diff --git a/mma/docs/html/ref/img23.png b/mma/docs/html/ref/img23.png index d1a9663..9b369ae 100644 Binary files a/mma/docs/html/ref/img23.png and b/mma/docs/html/ref/img23.png differ diff --git a/mma/docs/html/ref/img24.png b/mma/docs/html/ref/img24.png index 22b6ccf..6efcfd1 100644 Binary files a/mma/docs/html/ref/img24.png and b/mma/docs/html/ref/img24.png differ diff --git a/mma/docs/html/ref/img25.png b/mma/docs/html/ref/img25.png index 3970d32..1f980cf 100644 Binary files a/mma/docs/html/ref/img25.png and b/mma/docs/html/ref/img25.png differ diff --git a/mma/docs/html/ref/img26.png b/mma/docs/html/ref/img26.png index 3eafb96..6edc561 100644 Binary files a/mma/docs/html/ref/img26.png and b/mma/docs/html/ref/img26.png differ diff --git a/mma/docs/html/ref/img27.png b/mma/docs/html/ref/img27.png index 015abd0..bc1fe29 100644 Binary files a/mma/docs/html/ref/img27.png and b/mma/docs/html/ref/img27.png differ diff --git a/mma/docs/html/ref/img28.png b/mma/docs/html/ref/img28.png new file mode 100644 index 0000000..b8584ab Binary files /dev/null and b/mma/docs/html/ref/img28.png differ diff --git a/mma/docs/html/ref/img3.png b/mma/docs/html/ref/img3.png index fe932ca..30866a3 100644 Binary files a/mma/docs/html/ref/img3.png and b/mma/docs/html/ref/img3.png differ diff --git a/mma/docs/html/ref/img4.png b/mma/docs/html/ref/img4.png index 0bde52f..4e29752 100644 Binary files a/mma/docs/html/ref/img4.png and b/mma/docs/html/ref/img4.png differ diff --git a/mma/docs/html/ref/img5.png b/mma/docs/html/ref/img5.png index 845f3e6..9cd4df5 100644 Binary files a/mma/docs/html/ref/img5.png and b/mma/docs/html/ref/img5.png differ diff --git a/mma/docs/html/ref/img6.png b/mma/docs/html/ref/img6.png index d0059cf..71fd7d8 100644 Binary files a/mma/docs/html/ref/img6.png and b/mma/docs/html/ref/img6.png differ diff --git a/mma/docs/html/ref/img7.png b/mma/docs/html/ref/img7.png index 03b6063..251dd5c 100644 Binary files a/mma/docs/html/ref/img7.png and b/mma/docs/html/ref/img7.png differ diff --git a/mma/docs/html/ref/img8.png b/mma/docs/html/ref/img8.png index 5126e60..18f82db 100644 Binary files a/mma/docs/html/ref/img8.png and b/mma/docs/html/ref/img8.png differ diff --git a/mma/docs/html/ref/img9.png b/mma/docs/html/ref/img9.png index 8589f07..ccbb73e 100644 Binary files a/mma/docs/html/ref/img9.png and b/mma/docs/html/ref/img9.png differ diff --git a/mma/docs/html/ref/index.html b/mma/docs/html/ref/index.html index c7b8d6e..13d5c0a 100644 --- a/mma/docs/html/ref/index.html +++ b/mma/docs/html/ref/index.html @@ -1,4 +1,4 @@ - + - + next - up previous
    - Next: Next: Overview and Introduction - Up: Up: Main MMA Reference
    -
    +

    @@ -53,12 +54,12 @@ original version by: Nikos Drakos, CBLU, University of Leeds ALT="LOST LOGO">

    -Reference Manual -

    +Reference Manual +

    Bob van der Poel

    Wynndel, BC, Canada

    -

    March 7, 2007

    +

    September 28, 2008

    @@ -68,580 +69,616 @@ original version by: Nikos Drakos, CBLU, University of Leeds -

    @@ -53,12 +54,12 @@ original version by: Nikos Drakos, CBLU, University of Leeds ALT="LOST LOGO">

    -Reference Manual -

    +Reference Manual +

    Bob van der Poel

    Wynndel, BC, Canada

    -

    March 7, 2007

    +

    September 28, 2008

    @@ -68,580 +69,616 @@ original version by: Nikos Drakos, CBLU, University of Leeds -

    Subsections - @@ -85,11 +86,11 @@ Overview and Introduction

    -Musical MIDI Accompaniment, +Musical MIDI Accompaniment, MMA ,1.1 generates standard + HREF="#foot192">1.1 generates standard MIDI1.2 files which can be used as a backup track for a soloist. + HREF="#foot193">1.2 files which can be used as a backup track for a soloist. It was written especially for me--I am an aspiring saxophonist and wanted a program to ``play'' the piano and drums so I could practice my jazz solos. With @@ -140,7 +141,7 @@ The current version of this package is maintained at: http://www.mellowood.ca/mma/.

    -This document reflects version 1.1 +This document reflects version 1.4 of MMA .

    @@ -148,11 +149,11 @@ This document reflects version 1.1

    -
    This program +
    This program has recently changed its status from beta to a 1.x version. I have done everything I can to ensure that the program functions - as advertised, but I assume no responsibilty for anything - it does to your computer or data.
    + as advertised, but I assume no responsibility for anything + it does to your computer or data.

    @@ -196,7 +197,7 @@ About this Manual This manual was written by the program author--and this is always a very bad idea. But, having no volunteers, the choice is no manual at all or my bad perspectives.1.3 + HREF="#foot232">1.3

    MMA is a large and complex program. It really does need a manual; @@ -229,7 +230,7 @@ Typographic Conventions

    -

  • Important stuff is emphasized: important. +
  • Important stuff is emphasized: important.

  • @@ -237,7 +238,7 @@ Typographic Conventions HREF="http://www.mellowood.ca/mma/index.html">http://www.mellowood.ca/mma/index.html

    -

  • Filenames are set in bold typewriter font: filename.mma +
  • Filenames are set in bold typewriter font: filename.mma

  • @@ -276,15 +277,15 @@ Typographic Conventions

    -LATEX and HTML +LATEX and HTML

    -The manual has been prepared with the LATEX typesetting system. +The manual has been prepared with the LATEX typesetting system. Currently, there are two versions available: the primary version is a PDF file intended for printing or on-screen display (generated with dvipdf); the secondary version is in HTML (transformed with -LATEX2HTML) for electronic viewing. If other formats are needed +LATEX2HTML) for electronic viewing. If other formats are needed ...please offer to volunteer.

    @@ -311,7 +312,7 @@ reading:

    -

  • Various README files in the distribution. +
  • Various README files in the distribution.

  • @@ -352,7 +353,7 @@ many others are available for Linux systems. For Windows and Mac systems I'm sure there are many, many choices.

    -You'll need a text editor like vi, emacs, etc. to create +You'll need a text editor like vi, emacs, etc. to create input files. Don't use a word processor!

    @@ -363,7 +364,7 @@ input files. Don't use a word processor!

    • The executable Python script, mma1.4, must somewhere in your + HREF="#foot347">1.4, must somewhere in your path. For users running Windows or Mac, please check MMA website for details on how to install on these systems. @@ -371,36 +372,36 @@ input files. Don't use a word processor!

    • A number of Python modules. These should all be installed under - the directory /usr/local/share/mma/MMA. See the enclosed file - INSTALL for some additional commentary. + the directory /usr/local/share/mma/MMA. See the enclosed file + INSTALL for some additional commentary.

    • A number of library files defining standard rhythms. These should all be installed under the directory - /usr/local/share/mma/lib/stdlib. + /usr/local/share/mma/lib/stdlib.

    -The scripts cp-install or ln-install will install +The scripts cp-install or ln-install will install MMA properly on most Linux systems. Both scripts assume that main script is to be installed in -/usr/local/bin and the support files in -/usr/local/share/mma. If you want an alternate location, you +/usr/local/bin and the support files in +/usr/local/share/mma. If you want an alternate location, you can edit the paths in the script. The only supported alternate to use -is /usr/share/mma. +is /usr/share/mma.

    -The difference between the two scripts is that ln-install creates -symbolic links to the current location; cp-install copies the files. +The difference between the two scripts is that ln-install creates +symbolic links to the current location; cp-install copies the files. Which to use it up to you, but if you have unpacked the distribution in a stable location it is probably easier to use the link version.

    -In addition, you can run +In addition, you can run MMA from the directory created by the untar. This is not recommended, but will show some of MMA 's @@ -409,7 +410,8 @@ stuff. In this case you'll have to execute the program file

    You should be ``root'' (or at least, you need write permissions in -/usr/local/) to run either install script. +/usr/local/) to run either install script. Use the ``su'' or +``sudo'' command for this.

    If you want to install @@ -457,7 +459,7 @@ To create a MIDI file you need to:

    will invoke MMA and, assuming no errors are found, create a MIDI - file myfile.mid. + file myfile.mid.

    @@ -483,7 +485,7 @@ An input file consists of the following information:

    1. MMA directives. These include TEMPO, TIME, - VOLUME, etc. Directives. + VOLUME, etc. Directives.

    2. @@ -517,7 +519,7 @@ Comments

      Proper indentation, white space and comments are a -good thing--and you really should use them. But, in most cases +good thing--and you really should use them. But, in most cases MMA really doesn't care: @@ -542,11 +544,11 @@ Proper indentation, white space and comments are a

      Each line is initially parsed for comments. A comment is anything following a ``//'' (2 forward slashes).1.5 + HREF="#foot315">1.5

      Comments are stripped from the input stream. Lines starting with the COMMENT directive are also ignored. See the -comment discussion for details. +comment discussion for details.

      @@ -651,7 +653,7 @@ of the chord or drum note can occur anywhere in the bar). To make the input files look more musical, MMA supports REPEATs and REPEATENDINGs. However, complexities like -D.S. and Coda are not internally supported (but can be +D.S. and Coda are not internally supported (but can be created by using the GOTO command).

      @@ -711,13 +713,13 @@ The only exceptions are the names for chords, notes in SOLOs, and filenames. In keeping with standard chord notation, chord names are in mixed case; this is detailed in Musical Data. Filenames are covered in -Paths and Filenames. +Paths and Filenames.



      Footnotes

      ...,1.1
      + HREF="node1.html#tex2html1">1.1
      Musical MIDI Accompaniment and the short form MMA in the distinctive script are @@ -728,13 +730,13 @@ are in mixed case; this is detailed in Musical
      ... MIDI1.2
      + HREF="node1.html#tex2html2">1.2
      MIDI is an acronym for Musical Instrument Digital Interface.
      ... perspectives.1.3
      + HREF="node1.html#tex2html4">1.3
      The problem, all humor aside, is that the viewpoints of a program's author and user are quite different. The two ``see'' problems and solutions differently, and for @@ -742,41 +744,42 @@ a user manual the programmer's view is not the best.
      ...mma1.4
      + HREF="node1.html#tex2html7">1.4
      In the distribution this is mma.py. It is renamed to save a few keystrokes when entering the command.
      ... slashes).1.5
      + HREF="node1.html#tex2html9">1.5
      The first choice for a comment character was a single ``#'', but that sign is used for ``sharps'' in chord notation.
      -

      + +
      bob -2007-03-07 +2008-09-28
      diff --git a/mma/docs/html/ref/node10.html b/mma/docs/html/ref/node10.html index 62b8326..56aeea5 100644 --- a/mma/docs/html/ref/node10.html +++ b/mma/docs/html/ref/node10.html @@ -1,4 +1,4 @@ - + - + next - up - previous
      - Next: Next: Automatic Melodies: Aria Tracks - Up: Up: Reference Manual - Previous: Previous: Lyrics
      -
      +
    Subsections - @@ -130,7 +131,7 @@ in a song file: Melody Voice TenorSax
    Groove Blues -
    ... musical data
    +
    ...musical data
    @@ -211,7 +212,7 @@ The notes in a SOLO or MELODY track are specified series of ``chords''. Each chord can be a single note, or several notes (all with the same duration). Each chord in the bar is delimited with a single semicolon.10.1 + HREF="#foot4273">10.1

    Each chord can have several parts. All missing parts will default to the value in the previous chord. The various parts of a chord must be @@ -230,7 +231,7 @@ specified in the order given in the following table.

    Pitch
    The note in standard musical notation. The lowercase letters ``a'' to ``g'' are recognized as well as ``r'' to specify a - rest (please note the exception for Drum Solo Tracks, + rest (please note the exception for Drum Solo Tracks, here).

    @@ -240,7 +241,7 @@ specified in the order given in the following table. (sharp), ``&'' (flat) or ``n'' (natural). Please note that an accidental will override the current KEYSIG for the current bar (just like in real musical notation). Unlike standard musical - notation the accidental will apply to similarly named notes + notation the accidental will apply to similarly named notes in different octaves.

    @@ -263,21 +264,23 @@ Please note that when you specify a chord in

    Volume
    A volume can be specified. The volume is a string like - ``ff'' surrounded by ``$< >$'' brackets. For example, to set the + ALT="$< >$">'' brackets. For example, to set the volume of a chord to ``very loud'', you could use the string - $<$ffff$<$ffff$>$ in the chord specification - (here) Of course, it is + ALT="$>$"> in the chord specification + (here) Of course, it is probably easier to set accented beats with the ACCENT - directive (here). + directive (here). A volume setting + applies to all the notes in the current chord and will be in effect + for the duration of the current bar.

    @@ -293,10 +296,10 @@ Please note that when you specify a chord in
    Null
    You can set a ``ignore'' or ``do nothing'' chord with the - simple notation ``$< >$''. If this is the only item in the chord + ALT="$< >$">''. If this is the only item in the chord then that chord will be ignored This means that no tones will be generated, and the offset into the bar will not be changed. The use of the notation is mainly for tilde notation with notes held over @@ -315,7 +318,7 @@ space and tab characters (which are ignored by
    - Solo Notation + Solo Notation
    @@ -531,8 +534,8 @@ The argument consists of a single digit ``0'' to ``7'' followed by a As an alternate, you can use a musical name like ``F'' or ``G#''.

    -The optional keywords ``Major'' or ``Minor'' (these can be abreviated -to ``Maj'' or ``Min'' ... and case doesn't count) can be added to this +The optional keywords ``Major'' or ``Minor'' (these can be abbreviated +to ``Maj'' or ``Min'' ...and case doesn't count) can be added to this command. This will accomplish two things:

    @@ -552,7 +555,7 @@ command. This will accomplish two things:

    Setting the key signature effects the notes used in SOLO or MELODY tracks and sets a MIDI Key Signature event.10.2 + HREF="#foot4278">10.2

    To summarize, the following are all valid KEYSIG directives: @@ -587,8 +590,8 @@ of ``{ }'' expressions in a chord line. They will be assigned to the tracks specified in the AUTOSOLOTRACKS directive.

    -By default, four tracks are assigned: Solo, Solo-1, -Solo-2, and Solo-3. This order can be changed: +By default, four tracks are assigned: Solo, Solo-1, +Solo-2, and Solo-3. This order can be changed:

    @@ -634,14 +637,14 @@ Of course, some voicing is also set ...and a chord line:

    -The note data {4a;b;c;d;} will be set to the Solo-1 +The note data {4a;b;c;d;} will be set to the Solo-1 track. But, if you've not set any other note data by way of -RIFF commands to Solo-2 and Solo-3, the note data +RIFF commands to Solo-2 and Solo-3, the note data will also be copied to these two tracks. Note that the track -Solo-4 is unaffected since it is not a +Solo-4 is unaffected since it is not a HARMONYONLY track. This feature can be very useful in creating harmony lines with the harmonies going to different instruments. The -supplied file egs/harmony.mma shows an example. +supplied file egs/harmony.mma shows an example.

    @@ -665,7 +668,7 @@ first thing to do is to set a track as a drum solo type:

    This will create a new SOLO track with the name -Solo-MyDrums and set its ``Drum'' flag. If the track already +Solo-MyDrums and set its ``Drum'' flag. If the track already exists and has data in it, the command will fail. The MIDI channel 10 is automatically assigned to all tracks created in this manner. You cannot change a ``drum'' track back to a normal track. @@ -752,10 +755,10 @@ the following example:
      Tone LowWoodBlock
    End -
       ... +
       ...
    Solo-Block Riff 4r; SnareDrum; * ; ; -
       ... +
       ...
    Solo-Block Riff 4;;;; @@ -770,8 +773,8 @@ on each beat.



    Footnotes

    -
    ... semicolon.10.1
    +
    ... semicolon.10.1
    I have borrowed heavily from the notation program MUP for the syntax used here. For notation I highly recommend MUP and use it for most of my notation tasks, including @@ -780,36 +783,37 @@ on each beat. HREF="http://www.Arkkra.com/">http://www.Arkkra.com/.
    -
    ... event.10.2
    +
    ... event.10.2
    For the most part, MIDI Key Signature events are ignored by playback - programs. However, they may be used in other MIDI programs + programs. However, they may be used in other MIDI programs which handle notation.
    -

    + +
    bob -2007-03-07 +2008-09-28
    diff --git a/mma/docs/html/ref/node11.html b/mma/docs/html/ref/node11.html index d19506e..90e80e9 100644 --- a/mma/docs/html/ref/node11.html +++ b/mma/docs/html/ref/node11.html @@ -1,4 +1,4 @@ - + - + next - up - previous
    - Next: Chord Voicing - Up: Next: Randomizing + Up: Reference Manual - Previous: Previous: Solo and Melody Tracks
    -
    +

    @@ -80,7 +81,7 @@ melody.

    It might serve to look at the sample song files enclosed in this -package in the directory egs/aria. Compile and play them. Not too bad? +package in the directory egs/aria. Compile and play them. Not too bad?

    Just like other track, you can create as many ARIAs as you @@ -176,15 +177,24 @@ for each time event:

    e
    43 .. 03 $\Rightarrow$ 0 c
    54 .. 04 $\Rightarrow$ 0 c
    6-2 .. 2-2 $\Rightarrow$ 2 g
    7
    - Chord-Piano Voicing Mode=Optimal Rmove=10 Range=9 + RndSeed 123.56

    -In the following sections all the options available will be covered. +at the top of your song file. You can use any value you want: it +really doesn't make any difference, but different values will generate +different sequences.

    - -

    -Voicing Mode -

    +You can also use this with no value, in which case Python uses its own +value (see the Python manual for details). Essentially, using no value +undoes the effect which permits the mixing of random and not-so-random +sections in the same song.

    -The easiest way to deal with chord voicings is via the -VOICING MODE=XX option. - -

    -When choosing the inversion of a chord to play an accompanist will -take into consideration the style of the piece and the chord -sequences. In a general sense, this is referred to as ``voicing''. - -

    -A large number of the library files have been written to take -advantage of the following voicing commands. However, not all styles -of music take well to the concept. And, don't forget about the other -commands since they are useful in manipulating bass lines, as well as -other chord tracks (e.g., sustained strings). - -

    - -MMA has a variety of sophisticated, intelligent -algorithms12.1 to deal with voicing. - -

    -As a general rule you should not use the INVERT and -COMPRESS commands in conjunction with the VOICING -command. If you do, you may create beautiful sounds. But, the results -are more likely to be less-than-pleasing. Use of voicing and other -combinations will display various warning messages. - -

    -The main command to enable voicings is: +One interesting use of RNDSEED could be to ensure that a +repeated section is identical: simply start the section with something +like:

    -
    - Chord Voicing Mode=Type - -
    - -

    -As mentioned above, this command can only be applied to CHORD -tracks. Also note that this effects all bars in the sequence ... -you cannot have different voicings for different bars in the sequence -(attempting to do this would make no sense). - -

    -The following MODE types are available: - -

    -

    -
    Optimal
    -
    A basic algorithm which automatically chooses the best - sounding voicing depending on the voicing played before. Always try - this option before anything else. It might work just fine without - further work. - -

    -The idea behind this algorithm is to keep voicings in a sequence - close together. A pianist leaves his or her fingers where they are, - if they still fit the next chord. Then, the notes closest to the - fingers are selected for the next chord. This way characteristic - notes are emphasized. - -

    -

    -
    Root
    -
    This Option may for example be used to turn off - VOICING within a song. VOICING MODE=ROOT means nothing - else than doing nothing, leaving all chords in root position. - -

    -

    -
    None
    -
    This is the same as the ROOT option. - -

    -

    -
    Invert
    -
    Rather than basing the inversion selection on an - analysis of past chords, this method quite stupidly tries to keep - chords around the base point of ``C'' by inverting ``G'' and ``A'' - chords upward and ``D'', ``E'' and ``F'' downward. The chords are - also compressed. Certainly not an ideal algorithm, but it can be - used to add variety in a piece. - -

    -

    -
    Compressed
    -
    Does the same as the stand-alone COMPRESS - command. Like ROOT, it is only added to be used in some parts - of a song where VOICING MODE=OPTIMAL is used. - -

    -

    -
    - -

    - -

    -Voicing Range -

    - -

    -To get wider or closer voicings, you may define a range for the -voicings. This can be adjusted with the RANGE option: - -

    - - - -
    - Chord-Guitar Voicing Mode=Optimal Range=12 - -
    - -

    -In most cases the default value of 12 should work just fine. But, you -may want to fine tune ...it's all up to you. This command only -effects chords created with MODE=OPTIMAL. - -

    - -

    -Voicing Center -

    - -

    -Just minimizing the Euclidean distance between chords doesn't do the -trick as there could be runaway progressions that let the voicings -drift up or down infinitely. - -

    -When a chord is ``voiced'' or moved to a new position, a ``center -point'' must be used as a base. By default, the fourth degree of the -scale corresponding to the chord is a reasonable choice. However, you -can change this with: - -

    - - - -
    - Chord-1 Voicing Center=<value> - -
    - -

    -The value in this command can be any number in the range 0 to -12. Try different values. The color of your whole song might change. - -

    -Note that the value is the note in the scale, not a chord-note position. - -

    -This command only effects chords created with MODE=OPTIMAL. - -

    - -

    -Voicing Move -

    - -

    -To intensify a chord progression you may want to have ascending or -descending movement of voicings. This option, in conjunction with the -DIR optional (see below) sets the number of bars over which a -movement is done. - -

    -For the MOVE option to have any effect you must also set the -direction to either -1 or 1. Be careful that you don't force the chord -too high or low on the scale. Use of this command in a REPEAT -section can cause unexpected results. For this reason you should -include a SEQ command at the beginning of repeated sections of -your songs. - -

    -In most cases the use of this command is limited to a section of a -song, its use is not recommended in groove files. You might want to do -something like this in a song: - -

    - - -
    - ..select groove with voicing + Repeat
    -chords.. -
    -Chord-Piano Voicing Move=5 Dir=1 -
    -more chords.. -
    -Chord-Piano Voicing Move=5 Dir=-1 -
    -more chords..
    +RndSeed 8 +
    ...chords

    - -

    -Voicing Dir -

    - -

    -This option is used in conjunction with the MOVE option to set -the direction (-1 or 1) of the movement. +It is highly recommended that you do not use this command in +library files.

    -

    -Voicing Rmove -

    +

    +
    +RSkip +

    -As an alternate to movement in a specified direction, random movement -can add some color and variety to your songs. The command option is -quite useful (and safe to use) in groove files. The argument for this -option is a percentage value specifying the frequency to apply a move -in a random direction. - -

    -For example: +To aid in creating syncopated sounding patterns, you can use the +RSKIP directive to randomly silence or skip notes. The command +takes a value in the range 0 to 99. The ``0'' argument disables +skipping. For example:

    -
    - Chord-3 Voicing Mode=Optimal Rmove=20 - -
    - -

    -would cause a movement (randomly up or down) in 20% of the bars. As -noted earlier, using explicit movement instructions can move the chord -into an undesirable range or even ``off the keyboard''; however, the -algorithm used in RMOVE has a sanity check to ensure that the chord -center position remains, approximately, in a two octave range. - -

    - -

    + Begin Drum +
        Define D1 1 0 90 +
        Define D8 D1 * 8 +
        Sequence D8 +
        Tone OpenHiHat +
        RSkip 40
    -ChordAdjust -

    - -

    -The actual notes used in a chord are derived from a table which -contains the notes for each variation of a ``C'' chord--this data is -converted to the desired chord by adding or subtracting a constant -value according to the following table: - -

    -

    - - - -
    - - - -
    - - - - - - - - - - - - - - - - - - - - - - -
    G$\flat$-6
    G-5
    G$\sharp$-4
    A$\flat$-4
    A-3
    A$\sharp$-2
    B$\flat$-2
    -
    - -
    - - - - - - - - - - - - - - - - - - - - - -
    B-1
    C$\flat$-1
    B$\sharp$0
    C0
    C$\sharp$1
    D$\flat$1
    D2
    -
    - -
    - - - - - - - - - - - - - - - - - - - - - -
    D$\sharp$3
    E$\flat$3
    E4
    F$\flat$4
    E$\sharp$5
    F5
    F$\sharp$6
    -
    - - -
    - -
    - -

    -This means that when -MMA encounters an ``Am'' chord it adjusts the -notes in the chord table down by 3 MIDI values; an ``F'' chord is -adjusted 5 MIDI values up. This also means that ``A'' chords will -sound lower than ``F'' chords. - -

    -In most cases this works just fine; but, there are times when the -``F'' chord might sound better lower than the ``A''. You can -force a single chord by prefacing it with a single ``-'' or ``+'' -, details here. But, if the -entire song needs adjustment you can use CHORDADJUST -command to raise or lower selected chord pitches: - -

    - - -
    - ChordAdjust E=-1 F=-1 Bb=1 +End

    -Each item in the command consists of a pitch (``B$\flat$'', ``C'', -etc.) an ``='' and an octave specifier (-1, 0 or 1). The pitch values -are case sensitive and must be in upper case; there must not be -a space on either side of the ``=''. +In this case a drum pattern has been defined to hit short +``OpenHiHat'' notes 8 per bar. The RSKIP argument of ``40'' +causes the note to be NOT sounded (randomly) only 40% of the time.

    -To a large extent the need for octave adjustments depends on the chord -range of a song. For example, the supplied song ``A Day In The Life Of -A Fool'' needs all ``E'' and ``F'' chords to be adjusted down an -octave. +Using a value of ``10'' will cause notes to be skipped 10% of the +time (they are played 90% of the time), ``90'' means to skip the +notes 90% of the time, etc.

    -The value ``0'' will reset the adjustment to the original value; -setting a value a second time has no effect. - -

    - -

    -
    -Compress -

    - -

    -When -MMA grabs the notes for a chord, the notes are spread out from -the root position. This means that if you specify a ``C13'' you will -have an ``A'' nearly 2 octaves above the root note as part of the -chord. Depending on your instrumentation, pattern, and the chord -structure of your piece, notes outside of the ``normal'' single octave -range for a chord may sound strange. - -

    - - - -
    - Chord Compress 1 - -
    - -

    -Forces -MMA to put all chord notes in a single octave range. - -

    -This command is only effective in CHORD and ARPEGGIO -tracks. A warning message is printed if it is used in other contexts. - -

    -Notes: COMPRESS takes any value between 1 and 5 as arguments -(however, some values will have no effect as detailed above). You can -specify a different COMPRESS for each bar in a sequence. +You can specify a different RSKIP for each bar in a sequence. Repeated values can be represented with a ``/'':

    - Chord Compress 1 / 0 / + Scale RSkip 40 90 / 40

    -To restore to its default (off) setting, use a ``0'' as the argument. - -

    -For a similar command, with different results, see the LIMIT -command (here). +If you use the RSKIP in a chord track, the entire chord +will not be silenced. The option will be applied to the +individual notes of each chord. This may or may not be what you are +after. You cannot use this option to generate entire chords randomly. +For this effect you need to create several chord patterns and select +them with SEQRND.

    -

    +


    -DupRoot +RTime +

    + +

    +One of the biggest problem with computer generated drum and rhythm +tracks is that, unlike real musicians, the beats are precise and ``on +the beat''. The RTIME directive attempts to solve this. + +

    +The command can be applied to all tracks. + +

    + + + +
    + Drum-4 Rtime 4 + +
    + +

    +The value passed to the RTIME directive is the number of MIDI ticks +with which to vary the start time of the notes. For example, if you +specify ``5'' the start times will vary from -5 to +5 ticks) on each +note for the specified track. There are 192 MIDI ticks in each quarter +note. + +

    +Any value from 0 to 100 can be used; however values in the range 0 to +10 are most commonly used. Exercise caution in using large values! + +

    +You can specify a different RTIME for each bar in a sequence. +Repeated values can be represented with a ``/'': + +

    + + + +
    + Chord RTime 4 10 / 4 + +
    + +

    +RTIME is guaranteed never to start a note before the start of a +bar. + +

    + +

    +Other Randomizing Commands

    -To add a bit of fullness to chords, it is quite common of keyboard -players to duplicate the root tone of a chord into a lower (or higher) -octave. This is accomplished in -MMA with the command: - -

    - - - -
    - DupRoot -1 1 -1 1 - -
    - -

    -The command determines whether or not the root tone of a chord is -duplicated in another octave. By default notes are not added. A value -of -1 will add a note one octave lower than the root note, -2 will add -the tone 2 octaves lower, etc. Similarly, the value of 1 will add a -note one octave higher than the root tone, etc. - -

    -Only the values -9 to 9 are permitted. - -

    -The volume used for the generated note is an adjusted average of the -notes in the chord. This volume is always less than the chord -notes--which is probably what you want. If you want a loud bass note, -create a second track (probably a BASS track) with the -appropriate pattern. - -

    -Different values can be used in each bar of the sequence. - -

    -The option is reset to 0 after all SEQUENCE or SEQCLEAR -commands. - -

    -The DUPROOT command is only valid in CHORD tracks. - -

    - -

    -
    -Invert -

    - -

    -By default -MMA uses chords in the root position. By example, the -notes of a C major chord are C, E and G. Chords can be inverted -(something musicians do all the time). Sticking with the C major -chord, the first inversion shifts the root note up an octave and the -chord becomes E, G and C. The second inversion is G, C and E. - -

    - -MMA extends the concept of inversion a bit by permitting the shift -to be to the left or right, and the number of shifts is not limited. -So, you could shift a chord up several octaves by using large invert -values.12.2 -

    -Inversions apply to each bar of a sequence. So, the following is a good example: - -

    - - - -
    - SeqSize 4 -
    -Chord-1 Sequence STR1 -
    -Chord-1 Invert 0 1 0 1
    - -
    - -

    -Here the sequence pattern size is set to 4 bars and the pattern -for each bar in the Chord-1 track is set to ``STR1''. Without the next line, -this would result in a rather boring, repeating pattern. But, the -Invert command forces the chord to be in the root position for the -first bar, the first inversion for the second, etc. - -

    -You can use a negative Invert value: - -

    - - - -
    - Chord-1 Invert -1 - -
    - -

    -In this case the C major chord becomes G, C and E. - -

    -Note that using fewer Invert arguments than the current sequence size -is permitted. -MMA simply expands the number of arguments to the -current sequence size. You may use a ``/'' for a repeated value. - -

    -A SEQUENCE or CLEARSEQ command resets INVERT to 0. - -

    -This command on has an effect in CHORD and ARPEGGIO -tracks. And, frankly, ARPEGGIOs sound a bit odd with -inversions. - -

    -If you use a large value for INVERT you can force the notes out -of the normal MIDI range. In this case the lowest or highest possible -MIDI note value will be used. - -

    - -

    -
    -Limit -

    - -

    -If you use ``jazz'' chords in your piece, some people might not like -the results. To some folks, chords like 11th, 13th, and variations -have a dissonant sound. And, sometimes they are in a chart, but don't -really make sense. The LIMIT command can be used to set the -number of notes of a chord used. - -

    -For example: - -

    - - - -
    - Chord Limit 4 - -
    - -

    -will limit any chords used in the CHORD track to the first 4 -notes of a chord. So, if you have a C11 chord which is C, E, G, -B$\flat$, D, and F, the chord will be truncated to C, E, G and -B$\flat$. - -

    -This command only applies to CHORD and ARPEGGIO tracks. -It can be set for other tracks, but the setting will have no effect. - -

    -Notes: LIMIT takes any value between 0 and 8 as an argument. -The ``0'' argument will disable the command. This command applies to -all chords in the sequence--only one value can be given in the -command. - -

    -To restore to its default (off) setting, use a ``0'' as the argument. - -

    -For a similar command, with different results, see the COMPRESS -command (here). - -

    - -

    -
    -NoteSpan -

    - -

    -Many instruments have a limited range. For example, the bass section -of an accordion is limited to a single octave12.3To emulate these sounds it is a simple matter of limiting -MMA 's -output to match the instrument. For example, in the ``frenchwaltz'' -file you will find the directive: - -

    - - - -
    - Chord NoteSpan 48 59 - -
    - -

    -which forces all CHORD tones to the single octave represented -by the MIDI values 48 though 59. - -

    -This command is applied over other voicing commands like OCTAVE -and RANGE and even TRANSPOSE. Notes will still be -calculated with respect to these settings, but then they'll be forced -into the limited NOTESPAN. - -

    -NOTESPAN expects two arguments: The first is the range start, the -second the range end (first and last notes to use). The values are -MIDI tones and must be in the range 0 to 127. The first value must be -less than the second, and the range must represent at least one full -octave (12 notes). It can be applied to all tracks except DRUM. - -

    - -

    -
    -Range -

    - -

    -For ARPEGGIO and SCALE tracks you can specify the number -of octaves used. The effects of the RANGE command is slightly -different between the two. - -

    -SCALE: Scale tracks, by default, create three octave scales. -The RANGE value will modify this to the number of octaves -specified. For example: - -

    - - - -
    - Scale Range 1 - -
    - -

    -will force the scales to one octave. A value of 4 would create 4 -octave scales, etc. - -

    -You can use fractional values when specifying RANGE. For example: - -

    - - - -
    - Scale Range .3 - -
    - -

    -will create a scale of 2 notes.12.4 And, - -

    - - - -
    - Scale Range 1.5 - -
    - -

    -will create a scale of 10 notes. Now, this gets a bit more confusing for you if -you have set SCALETYPE CHROMATIC. In this case a RANGE 1 would -generate 12 notes, and RANGE 1.5 18. - -

    -Partial scales are useful in generating special effects. - -

    -ARPEGGIO: Normally, arpeggios use a single octave.12.5The RANGE command specifies the number of octaves12.6 to use. A fractional value can be used; the exact result -depends on the number of notes in the current chord. - -

    -In all cases the values of ``0'' and ''1'' have the same effect. - -

    -For both SCALE and ARPEGGIO there will always be a minimum of -two notes in the sequence. - -

    - -

    -
    -DefChord -

    - -

    - -MMA comes with a large number of chord types already defined. In -most cases, the supplied set (see this list) is sufficient for all the ``modern'' or -``pop'' charts normally encountered. However, there are those times -when you want to do something else, or something different. - -

    -You can define additional chord types at any time, or redefine -existing chord types. The DEFCHORD command makes no distinction -between a new chord type or a redefinition, with the exception that a -warning message is printed for the later. - -

    -The syntax of the command is quite strict: - -

    - - - -
    - DefChord NAME (NoteList) (ScaleList) - -
    - -

    -where: +In addition to the above, the following commands should be examined:

      -
    • Name can be any string, but cannot contain a ``/'', ``>'' or - space. It is case sensitive. Examples of valid names include - ``dim'', ``NO3'' and ``foo-12-xx''. +
    • Aria tracks + have a ``r'' option for the movement direction.

    • -
    • NoteList is a comma separated list of note offsets - (actually MIDI note values), all of which are enclosed in a set of - ``()''s. There must be at least 2 note offsets and no more than 8 - and all values must be in the range 0 to 24. Using an existing chord - type, a ``7'' chord would be defined with (0, 4, 7, 10). In the case - of a C7 chord, this translates to the notes (c, e, g, b$\flat$). +
    • The track Direction command has a ``random'' option for playing scales, + arpeggios, and other tracks.

    • -
    • ScaleList is a list of note offsets (again, MIDI note - values), all of which are enclosed in a set of ``()''s. There must - be exactly 7 values in the list and all values must be in the range - 0 to 24. Following on the C7 example above, the scale list would be - (0, 2, 4, 5, 7, 9, 10) or the notes (c, d, e, f, g, a, b$\flat$). +
    • RVOLUME makes random adjustments to the volume of each note. + +

      +

    • +
    • The VOICING command has an RMOVE option. + +

      +

    • +
    • RNDSET + lets you set a variable to a random value. + +

      +

    • +
    • SeqRnd + enables randomization of sequences; this randomization can be + fine-tuned with the SeqRndWeight command.

    -Some examples might clarify. First, assume that you have a section of -your piece which has a major chord, but you only want the root and -fifth to sound for the chords and you want the arpeggios and bass -notes to only use the root. You could create new patterns, but -it's just as easy to create a new chord type. - -

    - - - -
    - DefChord 15 (0,4) (0, 0, 0, 0, 0, 0, 0) -
    -15 C / G / -
    -16 C15 / G15
    - -
    - -

    -In this case a normal Major chords will be used in line 15. In line 16 -the new ``15'' will be used. Note the trick in the scale: by setting -all the offsets to ``0'' only the root note is available to the -WALK and BASS tracks. - -

    -Sometimes you'll see a new chord type that -MMA doesn't know. You -could write the author and ask him to add this new type, but if it is -something quite odd or rare, it might be easier to define it in your -song. Let's pretend that you've encountered a ``Cmaj12'' A reasonable -guess is that this is a major 7 with an added 12th (just the 5th up an -octave). You could change the ``maj12'' part of the chord to a ``M7'' -or ``maj7'' and it should sound fine. But: - -

    - - - -
    - DefChord maj12 (0, 4, 7, 11, 19) (0, 2, 4, 5, 7, 9, 11) - -
    - -

    -is much more fun. Note a few details: - -

    - -

      -
    • The name ``maj12'' can be used with any chord. You can have - ``Cmaj12'' or G$\flat$maj12''. - -

      -

    • -
    • ``maj12'' a case sensitive name. The name ``Maj12'' is quite - different (and unknown). - -

      -

    • -
    • A better name might be ``maj(add12)''. - -

      -

    • -
    • The note and scale offsets are MIDI values. They are easy to - figure if you think of the chord as a ``C''. Just count off notes - from ``C'' on a keyboard (C is note 0). - -

      -

    • -
    • Do Not include a chord name (ie: C or B$\flat$) in the - definition. Just the type. - -

      -

    • -
    - -

    -The final example handles a minor problem in -MMA and ``diminished'' -chords. In most of the music the author of -MMA encounters, the -marking ``dim'' on a chord usually means a ``diminished 7th''. So, -when -MMA initializes it creates a copy of the ``dim7'' and calls it -``dim''. But, some people think that ``dim'' should reference a -``diminished triad''. It's pretty easy to change this by creating a -new definition for ``dim'': - -

    - - - -
    - DefChord dim (0, 3, 6) (0, 2, 3, 5, 6, 8, 9 ) - -
    - -

    -In this example the scale notes use the same notes as those in a -``dim7''. You might want to change the B$\flat{}\flat$ (9) to B$\flat$ -(10) or B (11). If you really disagree with the choice to make a dim7 -the default you could even put this in a mmarc file. - -

    -It is even easier to use the non-standard notation ``dim3'' to specify -a diminished triad. - -

    - -

    -PrintChord -

    - -

    -This command can be used to make the create of custom chords a bit -simpler. Simply pass one or more chord types after the command and -they will be displayed on your terminal. Example: - -

    - - - -
    - PrintChord m M7 dim - -
    - -

    -in a file should display: - -

    - - - -
    - m : (0, 3, 7) (0, 2, 3, 5, 7, 9, 11) Minor triad. -
    -M7 : (0, 4, 7, 11) (0, 2, 4, 5, 7, 9, 11) Major 7th. -
    -dim : (0, 3, 6, 9) (0, 2, 3, 5, 6, 8, 9) Diminished. -MMA assumes a - diminished 7th.
    - -
    - -

    -From this you can cut and paste, change the chord or scale and insert -the data into a DEFCHORD command. - -

    - -

    -Notes -

    - -

    - -MMA makes other adjustments on-the-fly to your chords. This is done -to make the resulting sounds ``more musical'' ...to keep life -interesting, the definition of ``more musical'' is quite elusive. The -following notes will try to list some of the more common adjustments -made ``behind your back''. - -

    - -

      -
    • Just before the notes (MIDI events) for a chord are generated - the first and last notes in the chord are compared. If they are a - separated by a half-step (or 1 MIDI value) or an octave plus - half-step, the volume of the first note is halved. This happens in - chords such as a Major-7th or Flat-9th. If the adjustment is - not done the dissonance between the two tones overwhelms the ear. - -

      -

    • -


    Footnotes

    -
    ... -algorithms12.1
    -
    Great thanks are due to Alain Brenzikofer who not - only pressured me into including the VOICING options, but - wrote a great deal of the actual code. +
    ... values12.1
    +
    Yes, + this is a contradiction of terms.
    -
    ... -values.12.2
    -
    The term ``shift'' is used here, but that's not - quite what -MMA does. The order of the notes in the internal buffer - stays the same, just the octave for the notes is changed. So, if the - chord notes are ``C E G'' with the MIDI values ``0, 4, 7'' an invert - of 1 would change the notes to ``C$^{2}$ E G'' and the MIDI values - to ``12, 4, 7''. - -
    -
    ... octave12.3
    -
    Some accordions - have ``freebass'' switches which overcomes this, but that is the - exception. - -
    -
    ... notes.12.4
    -
    Simple math here: take the number of notes in a scale (7) and -multiply by .3. Take the integer result as the number of notes. - -
    -
    ... octave.12.5
    -
    Not quite true: they -use whatever notes are in the chord, which might exceed an octave span. - -
    -
    ... octaves12.6
    -
    Again, not quite true: the -command just duplicates the arpeggio notes the number of times specified in the -RANGE setting. - -
    -

    + +
    bob -2007-03-07 +2008-09-28
    diff --git a/mma/docs/html/ref/node13.html b/mma/docs/html/ref/node13.html index 6976eb3..6a589a6 100644 --- a/mma/docs/html/ref/node13.html +++ b/mma/docs/html/ref/node13.html @@ -1,4 +1,4 @@ - + -Harmony - +Chord Voicing + @@ -25,320 +25,1287 @@ original version by: Nikos Drakos, CBLU, University of Leeds - - + next - up - previous
    - Next: Tempo and Timing - Up: Next: Harmony + Up: Reference Manual - Previous: Chord Voicing -
    + Previous: Randomizing
    +
    Subsections +

    - +
    -Harmony +Chord Voicing +

    + +

    +In music, a chord is simply defined as two more notes played +simultaneously. Now, this doesn't mean that you can play just any two +or three notes and get a chord which sounds nice--but whatever you do +get will be a chord of some type. And, to further confuse the unwary, +different arrangements of the same notes sound better (or worse) in +different musical situations. + +

    +As a simple example, consider a C major chord. Built on the first, +third and fifth notes of a C major scale it can be manipulated into a +variety of sounds: + +

    +

    + Lost Image + +
    + +

    +These are all C major chords ...but they all have a different +sound or color. The different forms a chord can take are called +``voicings''. Again, this manual is not intended to be a primer on +musical theory--that's a subject for which lots of lessons with your +favorite music teacher is recommended. You'll need a bit of +basic music theory if you want to understand how and why +MMA creates its tracks. + +

    +The different options in this chapter effect not only the way chords +are constructed, but also the way bass lines and other tracks are +formed. + +

    +There are generally two ways in +MMA to take care of voicings. + +

    + +

      +
    1. use +MMA 's extensive VOICING options, most likely with + the ''Optimal'' voicing algorithm, + +

      +

    2. +
    3. do everything by yourself with the commands INVERT and + COMPRESS. + +

      +

    4. +
    + +

    +The commands LIMIT and DUPROOT may be used independently +for both variants. + +

    + +

    +Voicing +

    + +

    +The VOICING command is used to set the voicing mode and several +other options relating to the selected mode. The command needs to have +a CHORD track specified and a series of Option=Value pairs. For +example: + +

    + + + +
    + Chord-Piano Voicing Mode=Optimal Rmove=10 Range=9 + +
    + +

    +In the following sections all the options available will be covered. + +

    + +

    +Voicing Mode +

    + +

    +The easiest way to deal with chord voicings is via the +VOICING MODE=XX option. + +

    +When choosing the inversion of a chord to play an accompanist will +take into consideration the style of the piece and the chord +sequences. In a general sense, this is referred to as ``voicing''. + +

    +A large number of the library files have been written to take +advantage of the following voicing commands. However, not all styles +of music take well to the concept. And, don't forget about the other +commands since they are useful in manipulating bass lines, as well as +other chord tracks (e.g., sustained strings). + +

    + +MMA has a variety of sophisticated, intelligent +algorithms13.1 to deal with voicing. + +

    +As a general rule you should not use the INVERT and +COMPRESS commands in conjunction with the VOICING +command. If you do, you may create beautiful sounds. But, the results +are more likely to be less-than-pleasing. Use of voicing and other +combinations will display various warning messages. + +

    +The main command to enable voicings is: + +

    + + + +
    + Chord Voicing Mode=Type + +
    + +

    +As mentioned above, this command can only be applied to CHORD +tracks. Also note that this effects all bars in the sequence ... +you cannot have different voicings for different bars in the sequence +(attempting to do this would make no sense). + +

    +The following MODE types are available: + +

    +

    +
    Optimal
    +
    A basic algorithm which automatically chooses the best + sounding voicing depending on the voicing played before. Always try + this option before anything else. It might work just fine without + further work. + +

    +The idea behind this algorithm is to keep voicings in a sequence + close together. A pianist leaves his or her fingers where they are, + if they still fit the next chord. Then, the notes closest to the + fingers are selected for the next chord. This way characteristic + notes are emphasized. + +

    +

    +
    Root
    +
    This Option may for example be used to turn off + VOICING within a song. VOICING MODE=ROOT means nothing + else than doing nothing, leaving all chords in root position. + +

    +

    +
    None
    +
    This is the same as the ROOT option. + +

    +

    +
    Invert
    +
    Rather than basing the inversion selection on an + analysis of past chords, this method quite stupidly tries to keep + chords around the base point of ``C'' by inverting ``G'' and ``A'' + chords upward and ``D'', ``E'' and ``F'' downward. The chords are + also compressed. Certainly not an ideal algorithm, but it can be + used to add variety in a piece. + +

    +

    +
    Compressed
    +
    Does the same as the stand-alone COMPRESS + command. Like ROOT, it is only added to be used in some parts + of a song where VOICING MODE=OPTIMAL is used. + +

    +

    +
    + +

    + +

    +Voicing Range +

    + +

    +To get wider or closer voicings, you may define a range for the +voicings. This can be adjusted with the RANGE option: + +

    + + + +
    + Chord-Guitar Voicing Mode=Optimal Range=12 + +
    + +

    +In most cases the default value of 12 should work just fine. But, you +may want to fine tune ...it's all up to you. This command only +effects chords created with MODE=OPTIMAL. + +

    + +

    +Voicing Center +

    + +

    +Just minimizing the Euclidean distance between chords doesn't do the +trick as there could be runaway progressions that let the voicings +drift up or down infinitely. + +

    +When a chord is ``voiced'' or moved to a new position, a ``center +point'' must be used as a base. By default, the fourth degree of the +scale corresponding to the chord is a reasonable choice. However, you +can change this with: + +

    + + + +
    + Chord-1 Voicing Center=<value> + +
    + +

    +The value in this command can be any number in the range 0 to +12. Try different values. The color of your whole song might change. + +

    +Note that the value is the note in the scale, not a chord-note position. + +

    +This command only effects chords created with MODE=OPTIMAL. + +

    + +

    +Voicing Move +

    + +

    +To intensify a chord progression you may want to have ascending or +descending movement of voicings. This option, in conjunction with the +DIR optional (see below) sets the number of bars over which a +movement is done. + +

    +For the MOVE option to have any effect you must also set the +direction to either -1 or 1. Be careful that you don't force the chord +too high or low on the scale. Use of this command in a REPEAT +section can cause unexpected results. For this reason you should +include a SEQ command at the beginning of repeated sections of +your songs. + +

    +In most cases the use of this command is limited to a section of a +song, its use is not recommended in groove files. You might want to do +something like this in a song: + +

    + + + +
    + ...select groove with voicing +
    +chords ... +
    +Chord-Piano Voicing Move=5 Dir=1 +
    +more chords... +
    +Chord-Piano Voicing Move=5 Dir=-1 +
    +more chords...
    + +
    + +

    + +

    +Voicing Dir +

    + +

    +This option is used in conjunction with the MOVE option to set +the direction (-1 or 1) of the movement. + +

    + +

    + +
    +Voicing Rmove +

    + +

    +As an alternate to movement in a specified direction, random movement +can add some color and variety to your songs. The command option is +quite useful (and safe to use) in groove files. The argument for this +option is a percentage value specifying the frequency to apply a move +in a random direction. + +

    +For example: + +

    + + + +
    + Chord-3 Voicing Mode=Optimal Rmove=20 + +
    + +

    +would cause a movement (randomly up or down) in 20% of the bars. As +noted earlier, using explicit movement instructions can move the chord +into an undesirable range or even ``off the keyboard''; however, the +algorithm used in RMOVE has a sanity check to ensure that the chord +center position remains, approximately, in a two octave range. + +

    + +

    +
    +ChordAdjust +

    + +

    +The actual notes used in a chord are derived from a table which +contains the notes for each variation of a ``C'' chord--this data is +converted to the desired chord by adding or subtracting a constant +value according to the following table: + +

    +

    + + + +
    + + + +
    + + + + + + + + + + + + + + + + + + + + + + +
    G$\flat$-6
    G-5
    G$\sharp$-4
    A$\flat$-4
    A-3
    A$\sharp$-2
    B$\flat$-2
    +
    + +
    + + + + + + + + + + + + + + + + + + + + + +
    B-1
    C$\flat$-1
    B$\sharp$0
    C0
    C$\sharp$1
    D$\flat$1
    D2
    +
    + +
    + + + + + + + + + + + + + + + + + + + + + +
    D$\sharp$3
    E$\flat$3
    E4
    F$\flat$4
    E$\sharp$5
    F5
    F$\sharp$6
    +
    + + +
    + +
    + +

    +This means that when +MMA encounters an ``Am'' chord it adjusts the +notes in the chord table down by 3 MIDI values; an ``F'' chord is +adjusted 5 MIDI values up. This also means that ``A'' chords will +sound lower than ``F'' chords. + +

    +In most cases this works just fine; but, there are times when the +``F'' chord might sound better lower than the ``A''. You can +force a single chord by prefacing it with a single ``-'' or ``+'' +, details here. But, if the +entire song needs adjustment you can use CHORDADJUST +command to raise or lower selected chord pitches: + +

    + + + +
    + ChordAdjust E=-1 F=-1 Bb=1 + +
    + +

    +Each item in the command consists of a pitch (``B$\flat$'', ``C'', +etc.) an ``='' and an octave specifier (-1, 0 or 1). The pitch values +are case sensitive and must be in upper case; there must not be +a space on either side of the ``=''. + +

    +To a large extent the need for octave adjustments depends on the chord +range of a song. For example, the supplied song ``A Day In The Life Of +A Fool'' needs all ``E'' and ``F'' chords to be adjusted down an +octave. + +

    +The value ``0'' will reset the adjustment to the original value; +setting a value a second time has no effect. + +

    + +

    +
    +Compress +

    + +

    +When +MMA grabs the notes for a chord, the notes are spread out from +the root position. This means that if you specify a ``C13'' you will +have an ``A'' nearly 2 octaves above the root note as part of the +chord. Depending on your instrumentation, pattern, and the chord +structure of your piece, notes outside of the ``normal'' single octave +range for a chord may sound strange. + +

    + + + +
    + Chord Compress 1 + +
    + +

    +Forces +MMA to put all chord notes in a single octave range. + +

    +This command is only effective in CHORD and ARPEGGIO +tracks. A warning message is printed if it is used in other contexts. + +

    +Notes: COMPRESS takes any value between 1 and 5 as arguments +(however, some values will have no effect as detailed above). You can +specify a different COMPRESS for each bar in a sequence. +Repeated values can be represented with a ``/'': + +

    + + + +
    + Chord Compress 1 / 0 / + +
    + +

    +To restore to its default (off) setting, use a ``0'' as the argument. + +

    +For a similar command, with different results, see the LIMIT +command (here). + +

    + +

    +
    +DupRoot +

    + +

    +To add a bit of fullness to chords, it is quite common of keyboard +players to duplicate the root tone of a chord into a lower (or higher) +octave. This is accomplished in +MMA with the command: + +

    + + + +
    + DupRoot -1 1 -1 1 + +
    + +

    +The command determines whether or not the root tone of a chord is +duplicated in another octave. By default notes are not added. A value +of -1 will add a note one octave lower than the root note, -2 will add +the tone 2 octaves lower, etc. Similarly, the value of 1 will add a +note one octave higher than the root tone, etc. + +

    +Only the values -9 to 9 are permitted. + +

    +The volume used for the generated note is an adjusted average of the +notes in the chord. This volume is always less than the chord +notes--which is probably what you want. If you want a loud bass note, +create a second track (probably a BASS track) with the +appropriate pattern. + +

    +Different values can be used in each bar of the sequence. + +

    +The option is reset to 0 after all SEQUENCE or SEQCLEAR +commands. + +

    +The DUPROOT command is only valid in CHORD tracks. + +

    + +

    +
    +Invert +

    + +

    +By default +MMA uses chords in the root position. By example, the +notes of a C major chord are C, E and G. Chords can be inverted +(something musicians do all the time). Sticking with the C major +chord, the first inversion shifts the root note up an octave and the +chord becomes E, G and C. The second inversion is G, C and E. + +

    + +MMA extends the concept of inversion a bit by permitting the shift +to be to the left or right, and the number of shifts is not limited. +So, you could shift a chord up several octaves by using large invert +values.13.2 +

    +Inversions apply to each bar of a sequence. So, the following is a good example: + +

    + + + +
    + SeqSize 4 +
    +Chord-1 Sequence STR1 +
    +Chord-1 Invert 0 1 0 1
    + +
    + +

    +Here the sequence pattern size is set to 4 bars and the pattern +for each bar in the Chord-1 track is set to ``STR1''. Without the next line, +this would result in a rather boring, repeating pattern. But, the +Invert command forces the chord to be in the root position for the +first bar, the first inversion for the second, etc. + +

    +You can use a negative Invert value: + +

    + + + +
    + Chord-1 Invert -1 + +
    + +

    +In this case the C major chord becomes G, C and E. + +

    +Note that using fewer Invert arguments than the current sequence size +is permitted. +MMA simply expands the number of arguments to the +current sequence size. You may use a ``/'' for a repeated value. + +

    +A SEQUENCE or CLEARSEQ command resets INVERT to 0. + +

    +This command on has an effect in CHORD and ARPEGGIO +tracks. And, frankly, ARPEGGIOs sound a bit odd with +inversions. + +

    +If you use a large value for INVERT you can force the notes out +of the normal MIDI range. In this case the lowest or highest possible +MIDI note value will be used. + +

    + +

    +
    +Limit +

    + +

    +If you use ``jazz'' chords in your piece, some people might not like +the results. To some folks, chords like 11th, 13th, and variations +have a dissonant sound. And, sometimes they are in a chart, but don't +really make sense. The LIMIT command can be used to set the +number of notes of a chord used. + +

    +For example: + +

    + + + +
    + Chord Limit 4 + +
    + +

    +will limit any chords used in the CHORD track to the first 4 +notes of a chord. So, if you have a C11 chord which is C, E, G, +B$\flat$, D, and F, the chord will be truncated to C, E, G and +B$\flat$. + +

    +This command only applies to CHORD and ARPEGGIO tracks. +It can be set for other tracks, but the setting will have no effect. + +

    +Notes: LIMIT takes any value between 0 and 8 as an argument. +The ``0'' argument will disable the command. This command applies to +all chords in the sequence--only one value can be given in the +command. + +

    +To restore to its default (off) setting, use a ``0'' as the argument. + +

    +For a similar command, with different results, see the COMPRESS +command (here). + +

    + +

    +
    +NoteSpan +

    + +

    +Many instruments have a limited range. For example, the bass section +of an accordion is limited to a single octave13.3To emulate these sounds it is a simple matter of limiting +MMA 's +output to match the instrument. For example, in the ``frenchwaltz'' +file you will find the directive: + +

    + + + +
    + Chord NoteSpan 48 59 + +
    + +

    +which forces all CHORD tones to the single octave represented +by the MIDI values 48 though 59. + +

    +This command is applied over other voicing commands like OCTAVE +and RANGE and even TRANSPOSE. Notes will still be +calculated with respect to these settings, but then they'll be forced +into the limited NOTESPAN. + +

    +NOTESPAN expects two arguments: The first is the range start, the +second the range end (first and last notes to use). The values are +MIDI tones and must be in the range 0 to 127. The first value must be +less than the second, and the range must represent at least one full +octave (12 notes). It can be applied to all tracks except DRUM. + +

    + +

    +
    +Range +

    + +

    +For ARPEGGIO and SCALE tracks you can specify the number +of octaves used. The effects of the RANGE command is slightly +different between the two. + +

    +SCALE: Scale tracks, by default, create three octave scales. +The RANGE value will modify this to the number of octaves +specified. For example: + +

    + + + +
    + Scale Range 1 + +
    + +

    +will force the scales to one octave. A value of 4 would create 4 +octave scales, etc. + +

    +You can use fractional values when specifying RANGE. For example: + +

    + + + +
    + Scale Range .3 + +
    + +

    +will create a scale of 2 notes.13.4 And, + +

    + + + +
    + Scale Range 1.5 + +
    + +

    +will create a scale of 10 notes. Now, this gets a bit more confusing for you if +you have set SCALETYPE CHROMATIC. In this case a RANGE 1 would +generate 12 notes, and RANGE 1.5 18. + +

    +Partial scales are useful in generating special effects. + +

    +ARPEGGIO: Normally, arpeggios use a single octave.13.5The RANGE command specifies the number of octaves13.6 to use. A fractional value can be used; the exact result +depends on the number of notes in the current chord. + +

    +In all cases the values of ``0'' and ''1'' have the same effect. + +

    +For both SCALE and ARPEGGIO there will always be a minimum of +two notes in the sequence. + +

    + +

    +
    +DefChord

    -MMA can generate harmony notes for you ...just like hitting two -or more keys on the piano! And you don't have to take lessons. +MMA comes with a large number of chord types already defined. In +most cases, the supplied set (see this list) is sufficient for all the ``modern'' or +``pop'' charts normally encountered. However, there are those times +when you want to do something else, or something different.

    -Automatic harmonies are available for the following track types: Bass, -Walk, Arpeggio, Scale, Solo and Melody. +You can define additional chord types at any time, or redefine +existing chord types. The DEFCHORD command makes no distinction +between a new chord type or a redefinition, with the exception that a +warning message is printed for the later.

    -Just in case you are thinking that -MMA is a wonderful musical -creator when it comes to harmonies, don't be fooled. -MMA 's ideas of -harmony are quite facile. It determines harmony notes by finding a -note lower or higher than the current note being sounded within the -current chord. And its notion of ``open'' is certainly not that of -traditional music theory. But, the sound isn't too bad. - -

    - -

    -
    -Harmony -

    - -

    -To enable harmony notes, use a command like: +The syntax of the command is quite strict:

    - Solo Harmony 2 + DefChord NAME (NoteList) (ScaleList)

    -You can set a different harmony method for each bar in your sequence. +where:

    -The following are valid harmony methods: -

    -
    2 or 2Below
    -
    Two part harmony. The harmony note - selected is lower (on the scale). +
      +
    • Name can be any string, but cannot contain a ``/'', ``>'' or + space. It is case sensitive. Examples of valid names include + ``dim'', ``NO3'' and ``foo-12-xx''.

      +

    • +
    • NoteList is a comma separated list of note offsets + (actually MIDI note values), all of which are enclosed in a set of + ``()''s. There must be at least 2 note offsets and no more than 8 + and all values must be in the range 0 to 24. Using an existing chord + type, a ``7'' chord would be defined with (0, 4, 7, 10). In the case + of a C7 chord, this translates to the notes (c, e, g, b$\flat$). + +

      +

    • +
    • ScaleList is a list of note offsets (again, MIDI note + values), all of which are enclosed in a set of ``()''s. There must + be exactly 7 values in the list and all values must be in the range + 0 to 24. Following on the C7 example above, the scale list would be + (0, 2, 4, 5, 7, 9, 10) or the notes (c, d, e, f, g, a, b$\flat$). + +

      +

    • +
    + +

    +Some examples might clarify. First, assume that you have a section of +your piece which has a major chord, but you only want the root and +fifth to sound for the chords and you want the arpeggios and bass +notes to only use the root. You could create new patterns, but +it's just as easy to create a new chord type. + +

    + + + +
    + DefChord 15 (0,4) (0, 0, 0, 0, 0, 0, 0) +
    +15 C / G / +
    +16 C15 / G15
    + +
    + +

    +In this case a normal Major chords will be used in line 15. In line 16 +the new ``15'' will be used. Note the trick in the scale: by setting +all the offsets to ``0'' only the root note is available to the +WALK and BASS tracks. + +

    +Sometimes you'll see a new chord type that +MMA doesn't know. You +could write the author and ask him to add this new type, but if it is +something quite odd or rare, it might be easier to define it in your +song. Let's pretend that you've encountered a ``Cmaj12'' A reasonable +guess is that this is a major 7 with an added 12th (just the 5th up an +octave). You could change the ``maj12'' part of the chord to a ``M7'' +or ``maj7'' and it should sound fine. But: + +

    + + + +
    + DefChord maj12 (0, 4, 7, 11, 19) (0, 2, 4, 5, 7, 9, 11) + +
    + +

    +is much more fun. Note a few details: + +

    + +

      +
    • The name ``maj12'' can be used with any chord. You can have + ``Cmaj12'' or G$\flat$maj12''. + +

      +

    • +
    • ``maj12'' a case sensitive name. The name ``Maj12'' is quite + different (and unknown). + +

      +

    • +
    • A better name might be ``maj(add12)''. + +

      +

    • +
    • The note and scale offsets are MIDI values. They are easy to + figure if you think of the chord as a ``C''. Just count off notes + from ``C'' on a keyboard (C is note 0). + +

      +

    • +
    • Do Not include a chord name (i.e. C or B$\flat$) in the + definition. Just the type. + +

      +

    • +
    + +

    +The final example handles a minor problem in +MMA and ``diminished'' +chords. In most of the music the author of +MMA encounters, the +marking ``dim'' on a chord usually means a ``diminished 7th''. So, +when +MMA initializes it creates a copy of the ``dim7'' and calls it +``dim''. But, some people think that ``dim'' should reference a +``diminished triad''. It's pretty easy to change this by creating a +new definition for ``dim'': + +

    + + + +
    + DefChord dim (0, 3, 6) (0, 2, 3, 5, 6, 8, 9 ) + +
    + +

    +In this example the scale notes use the same notes as those in a +``dim7''. You might want to change the B$\flat{}\flat$ (9) to B$\flat$ +(10) or B (11). If you really disagree with the choice to make a dim7 +the default you could even put this in a mmarc file. + +

    +It is even easier to use the non-standard notation ``dim3'' to specify +a diminished triad. + +

    + +

    +PrintChord +

    + +

    +This command can be used to make the create of custom chords a bit +simpler. Simply pass one or more chord types after the command and +they will be displayed on your terminal. Example: + +

    + + + +
    + PrintChord m M7 dim + +
    + +

    +in a file should display: + +

    + + + +
    + m : (0, 3, 7) (0, 2, 3, 5, 7, 9, 11) Minor triad. +
    +M7 : (0, 4, 7, 11) (0, 2, 4, 5, 7, 9, 11) Major 7th. +
    +dim : (0, 3, 6, 9) (0, 2, 3, 5, 6, 8, 9) Diminished. +MMA assumes a + diminished 7th.
    + +
    + +

    +From this you can cut and paste, change the chord or scale and insert +the data into a DEFCHORD command. + +

    + +

    +Notes +

    + +

    + +MMA makes other adjustments on-the-fly to your chords. This is done +to make the resulting sounds ``more musical'' ...to keep life +interesting, the definition of ``more musical'' is quite elusive. The +following notes will try to list some of the more common adjustments +made ``behind your back''. + +

    + +

      +
    • Just before the notes (MIDI events) for a chord are generated + the first and last notes in the chord are compared. If they are a + separated by a half-step (or 1 MIDI value) or an octave plus + half-step, the volume of the first note is halved. This happens in + chords such as a Major-7th or Flat-9th. If the adjustment is + not done the dissonance between the two tones overwhelms the ear. + +

      +

    • +
    +

    Footnotes

    +
    +
    ... +algorithms13.1
    +
    Great thanks are due to Alain Brenzikofer who not + only pressured me into including the VOICING options, but + wrote a great deal of the actual code. +
    -
    2Above
    -
    The same as ``2'', but the harmony note is raised an - octave. +
    ... +values.13.2
    +
    The term ``shift'' is used here, but that's not + quite what +MMA does. The order of the notes in the internal buffer + stays the same, just the octave for the notes is changed. So, if the + chord notes are ``C E G'' with the MIDI values ``0, 4, 7'' an invert + of 1 would change the notes to ``C$^{2}$ E G'' and the MIDI values + to ``12, 4, 7''. -

    -
    3 or 3Below
    -
    Three part harmony. The harmony notes - selected are lower. +
    ... octave13.3
    +
    Some accordions + have ``freebass'' switches which overcomes this, but that is the + exception. -

    -
    3Above
    -
    The same as ``3'', but both notes are raised an - octave. +
    ... notes.13.4
    +
    Simple math here: take the number of notes in a scale (7) and +multiply by .3. Take the integer result as the number of notes. -

    -
    Open or OpenBelow
    -
    Two part harmony, however the gap - between the two notes is larger than in ``2''. +
    ... octave.13.5
    +
    Not quite true: they +use whatever notes are in the chord, which might exceed an octave span. -

    -
    OpenAbove
    -
    Same as ``Open'', but the added note is above the - original. +
    ... octaves13.6
    +
    Again, not quite true: the +command just duplicates the arpeggio notes the number of times specified in the +RANGE setting. -

    -

    -
    8 or 8Below
    -
    A note 1 octave lower is added. - -

    -

    -
    8Above
    -
    A note 2 octave higher is added. - -

    -

    -
    16 or 16Below
    -
    A single note two octaves below is - added. - -

    -

    -
    16Above
    -
    A single note two octaves above are added. - -

    -

    -
    24 or 24Below
    -
    A single note three octaves below is - added. - -

    -

    -
    24Above
    -
    A single note three octaves above is added. - -

    - -

    -You can combine any of the above harmony modes by using a ``+''. For -example: - -

    -
    OPEN+8Below
    -
    will produce harmony notes with an ``Open'' - harmony and a note an octave below the current note. - -

    -

    -
    3Above+16
    -
    will generate 2 harmony notes above the current - note plus a note 2 octaves below. - -

    -

    -
    8Below+8Above+16Below
    -
    will generate 3 notes: one 2 octaves - below the current, one an octave below, and one an octave above. - -

    -

    -
    - -

    -There is no limit to the number of modes you can concatenate. Any -duplicate notes generated will be ignored. - -

    -All harmonies are created using the current chord. - -

    -To disable harmony use a ``0'', ``-'' or ``None''. - -

    -Be careful in using harmonies. They can make your song sound heavy, -especially with BASS notes (applying a different volume may -help). - -

    -The command has no effect in DRUM or CHORD tracks. - -

    - -

    -
    -HarmonyOnly -

    - -

    -As a added feature to the automatic harmony generation discussed in -the previous section, it is possible to set a track so that it -only plays the harmony notes. For example, you might want to -set up two arpeggio tracks with one playing quarter notes on a piano -and a harmony track playing half notes on a violin. The following -snippet is extracted from the song file ``Cry Me A River'' and sets up -2 different choir voices: - -

    - - - -
    - Begin Arpeggio -
        Sequence A4 -
        Voice ChoirAahs -
        Invert 0 1 2 3 -
        SeqRnd -
        Octave 5 -
        RSkip 40 -
        Volume p -
        Articulate 99 -
    -End -
                 -
    -Begin Arpeggio-2 -
        Sequence A4 -
        Voice VoiceOohs -
        Octave 5 -
        RSkip 40 -
        Volume p -
        Articulate 99 -
        HarmonyOnly Open -
    -End
    - -
    - -

    -Just like the HARMONY command, above, you can have different -settings for each bar in your sequence. Setting a bar (or the entire -sequence) to '`-'' or ``0'' disables both the HARMONY and -HARMONYONLY settings. - -

    -The command has no effect in DRUM or CHORD tracks. - -

    -If you want to use this feature with SOLO or MELODY -tracks you can duplicate the notes in your RIFF or in-line -notation or with the AUTOHARMONYTRACKS - COMMAND. - -

    - -

    -
    -HarmonyVolume -

    - -

    -By default, -MMA will use a volume (velocity) of 80% of that used by -the original note for all harmony notes it generates. You can change -this with the the HARMONYVOLUME command. For example: - -

    - - - -
    - Begin Solo -
      Voice JazzGuitar -
      Harmony Open -
      HarmonyVolume 80 -
    -End
    - -
    - -

    -You can specify different values for each bar in the sequence. The -values are percentages and must be greater than 0 (large values works -just fine if you want the harmony louder than the original). The -command has no effect in DRUM or CHORD tracks. -


    +
    bob -2007-03-07 +2008-09-28
    diff --git a/mma/docs/html/ref/node14.html b/mma/docs/html/ref/node14.html index 8541607..ac5ca49 100644 --- a/mma/docs/html/ref/node14.html +++ b/mma/docs/html/ref/node14.html @@ -1,4 +1,4 @@ - + -Tempo and Timing - +Harmony + @@ -25,911 +25,324 @@ original version by: Nikos Drakos, CBLU, University of Leeds - - + next - up - previous
    - Next: Swing - Up: Next: Tempo and Timing + Up: Reference Manual - Previous: Harmony -
    + Previous: Chord Voicing
    +
    Subsections -
      -
    • Tempo -
    • Time -
    • TimeSig -
    • BeatAdjust -
    • Fermata -
    • Cut +

      - +
      -Tempo and Timing +Harmony

      -MMA has a rich set of commands to adjust and vary the timing of your -song. +MMA can generate harmony notes for you ...just like hitting two +or more keys on the piano! And you don't have to take lessons. + +

      +Automatic harmonies are available for the following track types: Bass, +Walk, Arpeggio, Scale, Solo and Melody. + +

      +Just in case you are thinking that +MMA is a wonderful musical +creator when it comes to harmonies, don't be fooled. +MMA 's ideas of +harmony are quite facile. It determines harmony notes by finding a +note lower or higher than the current note being sounded within the +current chord. And its notion of ``open'' is certainly not that of +traditional music theory. But, the sound isn't too bad.

      -

      -Tempo -

      +

      +
      +Harmony +

      -The tempo of a piece is set in Beats per Minute with the ``Tempo'' -directive. +To enable harmony notes, use a command like:

      - Tempo 120 + Solo Harmony 2

      -sets the tempo to 120 beats/minute. You can also use the tempo command -to increase or decrease the current rate by including a leading ``+'', -``-'' or ``*'' in the rate. For example (assuming the current rate is -120): +You can set a different harmony method for each bar in your sequence.

      +The following are valid harmony methods: - - -
      - Tempo +10 - -
      +

      +
      2 or 2Below
      +
      Two part harmony. The harmony note + selected is lower (on the scale).

      -will increase the current rate to 130 beats/minute. - -

      -The tempo can be changed series of beats, much like a rit. or acc. in -real music. Assuming that a time signature of 4/4, the current tempo -is 120, and there are 4 beats in a bar, the command: - -

      - - - -
      - Tempo 100 1 - -
      - -

      -will cause 4 tempo entries to be placed in the current bar (in the -MIDI meta track). The start of the bar will be 115, the 2nd beat will -be at 110, the 3rd at 105 and the last at 100. - -

      -You can also vary an existing rate using a ``+'', ``-'' or ``*'' in -the rate. - -

      -You can vary the tempo over more than one bar. For example: - -

      - - - -
      - Tempo +20 5.5 - -
      - -

      -tells -MMA to increase the tempo by 20 beats per minute and to step -the increase over the next five and a half bars. Assuming a start -tempo of 100 and 4 beats/bar, the meta track will have a tempo -settings of 101, 102, 103 ...120. This will occur over 22 beats -(5.5 bars * 4 beats) of music. - -

      -Using the multiplier is handy if you are switching to ``double time'': - -

      - - - -
      - Tempo *2 - -
      - -

      -and to return: - -

      - - - -
      - Temp *.5 - -
      - -

      -Note that the ``+'', ``-'' or ``*'' sign must not be separated -from the tempo value by any spaces. The value for TEMPO can be -any value, but will be converted to integer for the final setting. - -

      - -

      -
      -Time -

      - -

      - -MMA doesn't really understand time signatures. It just cares about -the number of beats in a bar. So, if you have a piece in -4/4 time you would use: - -

      - - - -
      - Time 4 - -
      - -

      -For 3/4 use: - -

      - - - -
      - Time 3 - -
      - -

      -For 6/8 you'd probably want either ``2'' or ``6''. - -

      -Changing the time also cancels all existing sequences. So, after a -time directive you'll need to set up your sequences or load a new -groove.14.1 -

      - -

      -TimeSig -

      - -

      -Even though -MMA doesn't really use Time Signatures, some MIDI -programs do recognize and use them. So, here's a command which will -let you insert a Time Signature in your MIDI output: - -

      - - - -
      - TimeSig NN DD - -
      - -

      -The NN parameter is the time signature numerator (the number of beats -per bar). In 3/4 you would set this to ``3''. - -

      -The DD parameter is the time signature denominator (the length of the -note getting a single beat). In 3/4 you would set this to -``4''. - -

      -The NN value must be an integer in the range of 1 to 126. The DD value -must be one of 1, 2, 4, 8, 16, 32 or 64. - -

      - -MMA assumes that all songs are in 4/4 and places that -MIDI event at offset 0 in the Meta track. - -

      -The TIMESIG value is remembered by GROOVEs and is -properly set when grooves are switched. You should probably have a -time signature in any groove library files you create (the supplied -files all do). - -

      -The common time signatures ``common'' and ``cut'' are supported. They -are translated by -MMA to 4/4 and 2/2. - -

      - -

      -
      -BeatAdjust -

      - -

      -Internally, -MMA tracks its position in a song according to beats. -For example, in a 4/4 piece the beat position is -incremented by 4 after each bar is processed. For the most part, this -works fine; however, there are some conditions when it would be nice -to manually adjust the beat position: - -

      - -

        -
      • Insert some extra (silent) beats at the end of bar to simulate a pause, - -

        -

      • -
      • Delete some beats to handle a ``short'' bar. - -

        -

      • -
      • Change a pattern in the middle of a bar. - -

        -

      • -
      - -

      -Each problem will be dealt with in turn. In this - example a pause is simulated at the end of bar -10. One problem with this logic is that the inserted beat will be -silent, but certain notes (percussive things like piano) often will -continue to sound (this is related to the decay of the note, not that - -MMA has not turned off the note). Frankly, this really doesn't -work too well ...which is why the FERMATA -(details here) was added. - -

      - - - - -
      - Adding Extra Beats -
      - - - - -
      - Time 4 -
      -1 Cm / / / -
      ... -
      -10 Am / C / -
      -BeatAdjust 1 -
      ...
      - -
      - - -
      - -

      - -

      -In this example the problem of -the ``short bar'' is handled. In this example, the sheet music has the -majority of the song in 4/4 time, but bar 4 is in -2/4. This could be handled by setting the TIME -setting to 2 and creating some different patterns. Forcing silence on -the last 2 beats and backing up the counter is a bit easier. - -

      - - - - -
      - Short Bar Adjustment -
      - - - - -
      - 1 Cm / / / -
      ... -
      -4 Am / z! / -
      -BeatAdjust -2 -
      ...
      - -
      - - -
      - -

      - -

      -Note that the adjustment factor can be a partial beat. For example: - -

      - - - -
      - BeatAdjust .5 - -
      - -

      -will insert half of a beat between the current bars. - -

      -Finally in this example, the problem of -overlapping bars is handled. We want to change the GROOVE -in the middle of a bar. So, we create the third bar two times. The first one -has a ``z!'' (silence) for beats 3 and 4; the second has ``z!'' for beats 1 and 2. This -permits the two halves to overlap without conflict. The BEATADJUST -forces the two bars to overlap completely. - -

      - - - - -
      - Mid-Bar Groove Change -
      - - - - -
      - Groove BigBand -
      -1 C -
      -Groove BigBandFill -
      -2 Am -
      -3 / / z! -
      -BeatAdjust -4 -
      -Groove BigBand -
         z! / F -
      -5 F -
      ...
      - -
      - - -
      - -

      - -

      - -

      -
      -Fermata -

      - -

      -A ``fermata'' or ``pause'' in written music tells the musician to hold -a note for a longer period than the notation would otherwise indicate. -In standard music notation it is represented by a -`` -\rotatebox{270}{\textbf{(\raisebox{.5ex}{.}}}'' -above a note. - -

      -To indicate all this -MMA uses a command like: - -

      - - - -
      - Fermata 1 1 200 - -
      - -

      -Note that there are three parts to the command: - -

      - -

        -
      1. The beat offset from the current point in the score to apply the - ``pause''. The offset can be positive or negative and is calculated - from the current bar. Positive numbers will apply to the next bar; - negative to the previous. For offsets into the next bar you use - offsets starting at ``0''; for offsets into the previous bar an - offset of ``-1'' represents the last beat in that bar. - -

        -For example, if you were in 4/4 time and wanted the - quarter note at the end of the next bar to be paused, you would use - an offset of 3. The same effect can be achieved by putting the - FERMATA command after the bar and using an offset of -1. - -

        -

      2. -
      3. The duration of the pause in beats. For example, if you have a - quarter note to pause your duration would be 1, a half note (or 2 - quarter notes) would be 2. - -

        -

      4. -
      5. The adjustment. This represented as a percentage of the current - value. For example, to force a note to be held for twice the normal - time you would use 200 (two-hundred percent). You can use a value - smaller than 100 to force a shorter note, but this is seldom done. - -

        -

      6. -
      - -

      -This example shows how you can -place a FERMATA before or after the effected bar. - -

      - - - - -
      - Fermata -
      - - Lost Image - -

      - - - -
      - -MMA Equivalent -
      -
      -Fermata 3 1 200 -
      -C -
      -Gm7
      - -
      - -
      -

      - - - -
      - Alternate -
      -
      -C -
      -Fermata -1 1 200 -
      -Gm7
      - -
      - - -

      - -

      - -

      -Here the second example shows -the first four bars of a popular torch song. The problem with the -piece is that the first beat of bar four needs to be paused, and the -accompaniment style has to switch in the middle of the bar. The -example shows how to split the fourth bar with the first beat on one -line and the balance on a second. The ``z!''s are used to ``fill in'' -the 4 beats skipped by the BEATADJUST. - -

      - - - - -
      - Fermata with Cut -
      - -

      - Lost Image - -

      - - - -
      - C C#dim -
      -G7 -
      -C / C#dim -
      -G7 z! -
      -Fermata -4 1 200 -
      -Cut -3 -
      -BeatAdjust -3.5 -
      -Groove EasySwing -
      -z! G7 C7
      - -
      - -

      - - -

      - -

      - -

      -The following conditions will generate warning messages: - -

      - -

        -
      • A beat offset greater than one bar, - -

        -

      • -
      • A duration greater than one bar, - -

        -

      • -
      • An adjustment value less than 100. - -

        -

      • -
      - -

      -This command works by adjusting the global tempo in the MIDI meta -track at the point of the fermata. In most cases you can put more than -one FERMATA command in the same bar, but they should be in beat -order (no checks are done). If the FERMATA command has a -negative position argument, special code is invoked to remove any -note-on events in the duration specified, after the start of the -beat.14.2 This means that extra rhythm notes will -not be sounded--probably what you expect a held note to sound like. - -

      - -

      -
      -Cut -

      - -

      -This command was born of the need to simulate a ``cut'' or, more -correctly, a ``caesura''. This is indicated in music by two parallel -lines put at the top of a staff indicating the end of a musical -thought. The symbol is also referred to as ``railroad tracks''. - -

      -The idea is to stop the music on all tracks, pause briefly, and -resume.14.3 -

      - -MMA provides the CUT command to help deal with this -situation. But, before the command is described in detail, a -diversion: just how is a note or chord sustained in a MIDI file? - -

      -Assume that a -MMA input file (and the associated library) -files dictates that some notes are to be played from beat 2 to beat 4 -in an arbitrary bar. What -MMA does is: - -

      - -

        -
      • determine the position in the piece as a midi offset to the - current bar, - -

        -

      • -
      • calculate the start and end times for the notes, - -

        -

      • -
      • adjust the times (if necessary) based on adjustable features - such as STRUM, ARTICULATE, RTIME, etc., - -

        -

      • -
      • insert the required MIDI ``note on'' and ``note off'' commands - at the appropriate point in the track. - -

        -

      • -
      - -

      -You may think that a given note starts on beat 2 and ends (using -ARTICULATE 100) right on beat 3--but you would most likely be -wrong. So, if you want the note or chord to be ``cut'', what point do -you use to instruct -MMA correctly? Unfortunately, the simple answer -is ``it depends''. Again, the answers will consist of some examples. - -

      -In this first case you wish to stop the track in the middle of the last -bar. The simplest answer is: - -

      - - - -
      - 1 C -
      ... -
      -36 C / z! / -
      - -
      - -

      -Unfortunately, this will ``almost'' work. But, any chords which are -longer than one or two beats may continue to sound. This, often, gives -a ``dirty'' sound to the end of the piece. The simple solution is to -add to the end of the piece: - -

      - - - -
      - Cut -2 - -
      - -

      -Depending on the rhythm you might have to fiddle a bit with the cut -value. But, the example here puts a ``all notes off'' message in all -the active tracks at the start of beat 3. The exact same result can be -achieved by placing: - -

      - - - -
      - Cut 3 - -
      - -

      -before the final bar. - -

      -In this second example a tiny bit of silence is desired between bars 4 and -5 (this might be the end of a musical introduction). The following bit should -work: - -

      - - - -
      - 1 C -
      -2 G -
      -3 G -
      -4 C -
      -Cut -
      -BeatAdjust .2 -
      -5 G -
      ...
      - -
      - -

      -In this case the ``all notes off'' is placed at the end of bar 4 and -two-tenths of a beat is inserted at the same location. Bar 5 continues -the track. - -

      -The final example show how you might combine CUT with -FERMATA. In this case the sheet music shows a caesura after the -first quarter note and fermatas over the quarter notes on beats 2, 3 -and 4. - -

      - - - -
      - 1 C C#dim -
      -2 G7 -
      -3 C / C#dim -
      -Fermata 1 3 120 -
      -Cut 1.9 -
      -Cut 2.9 -
      -Cut 3.9 -
      -4 G7 / C7 / -
      -5 F6
      - -
      - -

      -A few tutorial notes on the above: - -

      - -

        -
      • The command - -

        - - - -
        - Fermata 1 3 120 - -
        - -

        -applies a slow-down in tempo to the second beat for the following - bar (an offset of 1), for 3 beats. These 3 beats will be played 20% - slower than the set tempo. - -

        -

      • -
      • The three CUT commands insert MIDI ``all notes off'' in - all the active tracks just before beats 2, 3 and 4. - -

        -

      • -
      - -

      -Finally, the proper syntax for the command: - -

      - - - -
      - [Voice] Cut [Offset] - -
      - -

      -If the voice is omitted, MIDI ``all notes off'' will be inserted into -each active track. - -

      -If the offset is omitted, the current bar position will be used. This -the same as using an offset value of 0. -


      Footnotes

      -
      -
      ... -groove.14.1
      -
      The time value is saved/restored with grooves so - setting a time is redundant in this case. -
      -
      ... -beat.14.2
      -
      Technically speaking, -MMA determines an interval - starting 5% of a beat after the start of the fermata to a point 5% - of a beat before the end. Any MIDI Note-On events in this range (in - all tracks) are deleted. +
      2Above
      +
      The same as ``2'', but the harmony note is raised an + octave. +

      -
      ... -resume.14.3
      -
      The answer to the music theory question of whether - the ``pause'' takes time from the current beat or is treated - as a ``fermata'' is not clear--but as far as -MMA is concerned the - command has no effect on timing. +
      3 or 3Below
      +
      Three part harmony. The harmony notes + selected are lower. +

      -

      +
      3Above
      +
      The same as ``3'', but both notes are raised an + octave. + +

      +

      +
      Open or OpenBelow
      +
      Two part harmony, however the gap + between the two notes is larger than in ``2''. + +

      +

      +
      OpenAbove
      +
      Same as ``Open'', but the added note is above the + original. + +

      +

      +
      8 or 8Below
      +
      A note 1 octave lower is added. + +

      +

      +
      8Above
      +
      A note 2 octave higher is added. + +

      +

      +
      16 or 16Below
      +
      A single note two octaves below is + added. + +

      +

      +
      16Above
      +
      A single note two octaves above are added. + +

      +

      +
      24 or 24Below
      +
      A single note three octaves below is + added. + +

      +

      +
      24Above
      +
      A single note three octaves above is added. + +

      +

      +
      + +

      +You can combine any of the above harmony modes by using a ``+''. For +example: + +

      +
      OPEN+8Below
      +
      will produce harmony notes with an ``Open'' + harmony and a note an octave below the current note. + +

      +

      +
      3Above+16
      +
      will generate 2 harmony notes above the current + note plus a note 2 octaves below. + +

      +

      +
      8Below+8Above+16Below
      +
      will generate 3 notes: one 2 octaves + below the current, one an octave below, and one an octave above. + +

      +

      +
      + +

      +There is no limit to the number of modes you can concatenate. Any +duplicate notes generated will be ignored. + +

      +All harmonies are created using the current chord. + +

      +To disable harmony use a ``0'', ``-'' or ``None''. + +

      +Be careful in using harmonies. They can make your song sound heavy, +especially with BASS notes (applying a different volume may +help). + +

      +The command has no effect in DRUM or CHORD tracks. + +

      + +

      +
      +HarmonyOnly +

      + +

      +As a added feature to the automatic harmony generation discussed in +the previous section, it is possible to set a track so that it +only plays the harmony notes. For example, you might want to +set up two arpeggio tracks with one playing quarter notes on a piano +and a harmony track playing half notes on a violin. The following +snippet is extracted from the song file ``Cry Me A River'' and sets up +2 different choir voices: + +

      + + + +
      + Begin Arpeggio +
          Sequence A4 +
          Voice ChoirAahs +
          Invert 0 1 2 3 +
          SeqRnd +
          Octave 5 +
          RSkip 40 +
          Volume p +
          Articulate 99 +
      +End +
                   +
      +Begin Arpeggio-2 +
          Sequence A4 +
          Voice VoiceOohs +
          Octave 5 +
          RSkip 40 +
          Volume p +
          Articulate 99 +
          HarmonyOnly Open +
      +End
      + +
      + +

      +Just like the HARMONY command, above, you can have different +settings for each bar in your sequence. Setting a bar (or the entire +sequence) to '`-'' or ``0'' disables both the HARMONY and +HARMONYONLY settings. + +

      +The command has no effect in DRUM or CHORD tracks. + +

      +If you want to use this feature with SOLO or MELODY +tracks you can duplicate the notes in your RIFF or in-line +notation or with the AUTOHARMONYTRACKS + COMMAND. + +

      + +

      +
      +HarmonyVolume +

      + +

      +By default, +MMA will use a volume (velocity) of 80% of that used by +the original note for all harmony notes it generates. You can change +this with the the HARMONYVOLUME command. For example: + +

      + + + +
      + Begin Solo +
        Voice JazzGuitar +
        Harmony Open +
        HarmonyVolume 80 +
      +End
      + +
      + +

      +You can specify different values for each bar in the sequence. The +values are percentages and must be greater than 0 (large values works +just fine if you want the harmony louder than the original). The +command has no effect in DRUM or CHORD tracks. + +

      + +

      bob -2007-03-07 +2008-09-28
      diff --git a/mma/docs/html/ref/node15.html b/mma/docs/html/ref/node15.html index 70417a1..9e7383f 100644 --- a/mma/docs/html/ref/node15.html +++ b/mma/docs/html/ref/node15.html @@ -1,4 +1,4 @@ - + -Swing - +Tempo and Timing + @@ -25,283 +25,913 @@ original version by: Nikos Drakos, CBLU, University of Leeds - - + next - up - previous
      - Next: Volume and Dynamics - Up: Next: Swing + Up: Reference Manual - Previous: Tempo and Timing -
      + Previous: Harmony
      +
      + +Subsections -

      + + +
      + +

      +
      -Swing +Tempo and Timing

      -In jazz and swing music there is a convention to apply special timing -to eighth notes. Normally, the first of a pair of eights is lengthened -and the second is shortened. In the sheet music this can is sometimes -notated as sequences of a dotted eighth followed by a sixteenth. But, -if you were to foolish enough to play the song with this timing you'd -get a funny look from a jazz musician who will tell you to ``swing'' -the notes. -

      -The easiest way to think about swing eighths is to mentally convert -them to a triplet consisting of a quarter note and and eighth. - -

      -

      - Lost Image - -
      - -

      -In the above music the first and second bar are both played as -in the third. +MMA has a rich set of commands to adjust and vary the timing of your +song.

      -MMA can handle this musical style in a number of ways, the control -is though the SWINGMODE command and options. +

      +Tempo +

      -In default mode -MMA assumes that you don't want your song to swing. - -

      -To enable automatic conversions, simply set SWINGMODE to ``on'': +The tempo of a piece is set in Beats per Minute with the ``Tempo'' +directive.

      - SwingMode On + Tempo 120

      -This directive accepts the value ``On'' and ``Off'' or ``1'' and -``0''. +sets the tempo to 120 beats/minute. You can also use the tempo command +to increase or decrease the current rate by including a leading ``+'', +``-'' or ``*'' in the rate. For example (assuming the current rate is +120):

      -With SWINGMODE enabled -MMA takes some extra steps when creating -patterns and processing of SOLO and MELODY parts. + + + +
      + Tempo +10 + +
      + +

      +will increase the current rate to 130 beats/minute. + +

      +The tempo can be changed series of beats, much like a rit. or accin +real music. Assuming that a time signature of 4/4, the current tempo +is 120, and there are 4 beats in a bar, the command: + +

      + + + +
      + Tempo 100 1 + +
      + +

      +will cause 4 tempo entries to be placed in the current bar (in the +MIDI meta track). The start of the bar will be 115, the 2nd beat will +be at 110, the 3rd at 105 and the last at 100. + +

      +You can also vary an existing rate using a ``+'', ``-'' or ``*'' in +the rate. + +

      +You can vary the tempo over more than one bar. For example: + +

      + + + +
      + Tempo +20 5.5 + +
      + +

      +tells +MMA to increase the tempo by 20 beats per minute and to step +the increase over the next five and a half bars. Assuming a start +tempo of 100 and 4 beats/bar, the meta track will have a tempo +settings of 101, 102, 103 ...120. This will occur over 22 beats +(5.5 bars * 4 beats) of music. + +

      +Using the multiplier is handy if you are switching to ``double time'': + +

      + + + +
      + Tempo *2 + +
      + +

      +and to return: + +

      + + + +
      + Temp *.5 + +
      + +

      +Note that the ``+'', ``-'' or ``*'' sign must not be separated +from the tempo value by any spaces. The value for TEMPO can be +any value, but will be converted to integer for the final setting. + +

      + +

      +
      +Time +

      + +

      + +MMA doesn't really understand time signatures. It just cares about +the number of beats in a bar. So, if you have a piece in +4/4 time you would use: + +

      + + + +
      + Time 4 + +
      + +

      +For 3/4 use: + +

      + + + +
      + Time 3 + +
      + +

      +For 6/8 you'd probably want either ``2'' or ``6''. + +

      +Changing the time also cancels all existing sequences. So, after a +time directive you'll need to set up your sequences or load a new +groove.15.1 +

      + +

      +TimeSig +

      + +

      +Even though +MMA doesn't really use Time Signatures, some MIDI +programs do recognize and use them. So, here's a command which will +let you insert a Time Signature in your MIDI output: + +

      + + + +
      + TimeSig NN DD + +
      + +

      +The NN parameter is the time signature numerator (the number of beats +per bar). In 3/4 you would set this to ``3''. + +

      +The DD parameter is the time signature denominator (the length of the +note getting a single beat). In 3/4 you would set this to +``4''. + +

      +The NN value must be an integer in the range of 1 to 126. The DD value +must be one of 1, 2, 4, 8, 16, 32 or 64. + +

      + +MMA assumes that all songs are in 4/4 and places that +MIDI event at offset 0 in the Meta track. + +

      +The TIMESIG value is remembered by GROOVEs and is +properly set when grooves are switched. You should probably have a +time signature in any groove library files you create (the supplied +files all do). + +

      +The common time signatures ``common'' and ``cut'' are supported. They +are translated by +MMA to 4/4 and 2/2. + +

      + +

      +
      +BeatAdjust +

      + +

      +Internally, +MMA tracks its position in a song according to beats. +For example, in a 4/4 piece the beat position is +incremented by 4 after each bar is processed. For the most part, this +works fine; however, there are some conditions when it would be nice +to manually adjust the beat position:

        -
      • Any eighth note in a pattern ``on the beat'' (1, 2, etc.) is converted to a - ``81'' note. +
      • Insert some extra (silent) beats at the end of bar to simulate a pause,

      • -
      • Any eighth note is a pattern ``off the beat'' (1.5, 2.5, etc.) - is converted to ``82'' note, and the offset is adjusted to the prior - beat plus the value of an ``81'' note. +
      • Delete some beats to handle a ``short'' bar.

      • -
      • Drum notes with a value of a single MIDI tick are handled in the - same way, but only the offset adjustment is needed. - -

        -

      • -
      • In SOLO and MELODY tracks any successive pairs of - eighth notes (or rests) are adjusted. +
      • Change a pattern in the middle of a bar.

      -Important: when defining patterns and sequences remember that -the adjustment is made when the pattern is compiled. With a -DEFINE command the arguments are compiled (and swing -will be applied). But a SEQUENCE command with an -already defined pattern will use the existing pattern values (the -swing adjustment may or may not have been done at define -time). Finally, if you have a dynamic define in the sequence the -adjustment will take place if needed. +Each problem will be dealt with in turn. In this + example a pause is simulated at the end of bar +10. One problem with this logic is that the inserted beat will be +silent, but certain notes (percussive things like piano) often will +continue to sound (this is related to the decay of the note, not that -

      -SWINGMODE has an additional option, SKEW. This factor -is used to create the ``81'' and ``82'' -note lengths (see here). By -default the value ``66'' is used. This simply means that the note -length ``81'' is assigned 66% of the value of an eight note, and -``82'' is assigned 34%. - -

      -You can change this setting at any point in your song or style -files. It will take effect immediately on all future patterns and solo -lines. - -

      -The setting: +MMA has not turned off the note). Frankly, this really doesn't +work too well ...which is why the FERMATA +(details here) was added.

      + + + +
      + Adding Extra Beats +
      + + -
      - SwingMode Skew=60 - -
      - -

      -will set a 60/40 setting. - -

      -If you want to experiment, find a GROOVE with note lengths of -``81'' and ``82'' (``swing'' is as good a choice as any). Now, put a -SWINGMODE SKEW=VALUE directive at the top of your song file (before -selecting any GROOVEs). Compile and play the song with different values -to hear the effects. - -

      -If you want to play with different effects you could do something like -this: - -

      - - - -
      - SwingMode On Skew=40 -
      ... Set CHORD pattern/groove + Time 4
      -SwingMode Skew=30 -
      ... Set Drum-1 pattern/groove +1 Cm / / / +
      ...
      -SwingMode Skew=whatever -
      ... Set Drum-2
      - -
      - -

      -This will give different rates for different tracks. I'll probably not -enjoy your results, but I play polkas on the accordion for fun. - -

      -The complete SWINGMODE setting is saved in the current GROOVE and can be accessed -via the $_SwingMode built-in macro. - -

      -The easy (and ugly and unintuitive) way to handle swing is to -hard-code the value right into your patterns. For example, you could -set a swing chord pattern with: - -

      - - - -
      - Chord Define Swing8 1 3+3 80; 1.33 3 80; 2 3+3 80; 2.33 3 80 ... - -
      - -

      -We really don't recommend this for the simple reason that the swing -rate is frozen as quarter/eighth triplets. - -

      -If you refer to the table of note lengths -(here) you will find the cryptic -values of ``81'' and ``82''. These notes are adjusted depending of the -SWINGSKEW value. So: - -

      - - - -
      - Chord Define Swing8 1 81 80; 1+81 82 80; 2 81 80; 2+81 82 80 ... - -
      - -

      -is a bit better. In this case we have set a chord on beat 1 as the -first of an eighth note, and a chord on the off-beat as the -second. Note how we specify the off-beats as ``1+81'', etc. - -

      -In this example the feel of the swing will vary with the -SWINGSKEW setting. - -

      -But, aren't computers supposed to make life simple? Well, here is our -recommended method: - -

      - - - +
      - SwingMode On +10 Am / C /
      -Chord Define Swing8 1 8 80; 1.5 8 80; 2 8 80; 2.5 8 80 ...
      +BeatAdjust 1 +
      ... + +
      + + +

      + +

      + +

      +In this example the problem of +the ``short bar'' is handled. In this example, the sheet music has the +majority of the song in 4/4 time, but bar 4 is in +2/4. This could be handled by setting the TIME +setting to 2 and creating some different patterns. Forcing silence on +the last 2 beats and backing up the counter is a bit easier. + +

      + + + + +
      + Short Bar Adjustment +
      + + + + +
      + 1 Cm / / / +
      ... +
      +4 Am / z! / +
      +BeatAdjust -2 +
      ...
      + +
      + + +
      + +

      + +

      +Note that the adjustment factor can be a partial beat. For example: + +

      + + +
      + BeatAdjust .5

      -Now, -MMA will convert the values for you. Magic, well ...almost. +will insert half of a beat between the current bars.

      -There are times when you will need to be more explicit, especially in -SOLO and MELODY tracks: +Finally in this example, the problem of +overlapping bars is handled. We want to change the GROOVE +in the middle of a bar. So, we create the third bar two times. The first one +has a ``z!'' (silence) for beats 3 and 4; the second has ``z!'' for beats 1 and 2. This +permits the two halves to overlap without conflict. The BEATADJUST +forces the two bars to overlap completely. + +

      + + + + +
      + Mid-Bar Groove Change +
      + + + + +
      + Groove BigBand +
      +1 C +
      +Groove BigBandFill +
      +2 Am +
      +3 / / z! +
      +BeatAdjust -4 +
      +Groove BigBand +
         z! / F +
      +5 F +
      ...
      + +
      + + +
      + +

      + +

      + +

      +
      +Fermata +

      + +

      +A ``fermata'' or ``pause'' in written music tells the musician to hold +a note for a longer period than the notation would otherwise indicate. +In standard music notation it is represented by a +`` +\rotatebox{270}{\textbf{(\raisebox{.5ex}{.}}}'' +above a note. + +

      +To indicate all this +MMA uses a command like: + +

      + + + +
      + Fermata 1 1 200 + +
      + +

      +Note that there are three parts to the command: + +

      + +

        +
      1. The beat offset from the current point in the score to apply the + ``pause''. The offset can be positive or negative and is calculated + from the current bar. Positive numbers will apply to the next bar; + negative to the previous. For offsets into the next bar you use + offsets starting at ``0''; for offsets into the previous bar an + offset of ``-1'' represents the last beat in that bar. + +

        +For example, if you were in 4/4 time and wanted the + quarter note at the end of the next bar to be paused, you would use + an offset of 3. The same effect can be achieved by putting the + FERMATA command after the bar and using an offset of -1. + +

        +

      2. +
      3. The duration of the pause in beats. For example, if you have a + quarter note to pause your duration would be 1, a half note (or 2 + quarter notes) would be 2. + +

        +

      4. +
      5. The adjustment. This represented as a percentage of the current + value. For example, to force a note to be held for twice the normal + time you would use 200 (two-hundred percent). You can use a value + smaller than 100 to force a shorter note, but this is seldom done. + +

        +

      6. +
      + +

      +This example shows how you can +place a FERMATA before or after the effected bar. + +

      + + + + +
      + Fermata +
      + + Lost Image + +

      + + + +
      + +MMA Equivalent +
      +
      +Fermata 3 1 200 +
      +C +
      +Gm7
      + +
      + +
      +

      + + + +
      + Alternate +
      +
      +C +
      +Fermata -1 1 200 +
      +Gm7
      + +
      + + +

      + +

      + +

      +Here the second example shows +the first four bars of a popular torch song. The problem with the +piece is that the first beat of bar four needs to be paused, and the +accompaniment style has to switch in the middle of the bar. The +example shows how to split the fourth bar with the first beat on one +line and the balance on a second. The ``z!''s are used to ``fill in'' +the 4 beats skipped by the BEATADJUST. + +

      + + + + +
      + Fermata with Cut +
      + +

      + Lost Image + +

      + + + +
      + C C#dim +
      +G7 +
      +C / C#dim +
      +G7 z! +
      +Fermata -4 1 200 +
      +Cut -3 +
      +BeatAdjust -3.5 +
      +Groove EasySwing +
      +z! G7 C7
      + +
      + +

      + + +

      + +

      + +

      +The following conditions will generate warning messages:

        -
      • If a bar has both swing and straight eighths. +
      • A beat offset greater than one bar,

      • -
      • If the note following an eighth is not an eight. +
      • A duration greater than one bar, + +

        +

      • +
      • An adjustment value less than 100.

      -
      + +

      +This command works by adjusting the global tempo in the MIDI meta +track at the point of the fermata. In most cases you can put more than +one FERMATA command in the same bar, but they should be in beat +order (no checks are done). If the FERMATA command has a +negative position argument, special code is invoked to remove any +note-on events in the duration specified, after the start of the +beat.15.2 This means that extra rhythm notes will +not be sounded--probably what you expect a held note to sound like. + +

      + +

      +
      +Cut +

      + +

      +This command was born of the need to simulate a ``cut'' or, more +correctly, a ``caesura''. This is indicated in music by two parallel +lines put at the top of a staff indicating the end of a musical +thought. The symbol is also referred to as ``railroad tracks''. + +

      +The idea is to stop the music on all tracks, pause briefly, and +resume.15.3 +

      + +MMA provides the CUT command to help deal with this +situation. But, before the command is described in detail, a +diversion: just how is a note or chord sustained in a MIDI file? + +

      +Assume that a +MMA input file (and the associated library) +files dictates that some notes are to be played from beat 2 to beat 4 +in an arbitrary bar. What +MMA does is: + +

      + +

        +
      • determine the position in the piece as a midi offset to the + current bar, + +

        +

      • +
      • calculate the start and end times for the notes, + +

        +

      • +
      • adjust the times (if necessary) based on adjustable features + such as STRUM, ARTICULATE, RTIME, etc., + +

        +

      • +
      • insert the required MIDI ``note on'' and ``note off'' commands + at the appropriate point in the track. + +

        +

      • +
      + +

      +You may think that a given note starts on beat 2 and ends (using +ARTICULATE 100) right on beat 3--but you would most likely be +wrong. So, if you want the note or chord to be ``cut'', what point do +you use to instruct +MMA correctly? Unfortunately, the simple answer +is ``it depends''. Again, the answers will consist of some examples. + +

      +In this first case you wish to stop the track in the middle of the last +bar. The simplest answer is: + +

      + + + +
      + 1 C +
      ... +
      +36 C / z! / +
      + +
      + +

      +Unfortunately, this will ``almost'' work. But, any chords which are +longer than one or two beats may continue to sound. This, often, gives +a ``dirty'' sound to the end of the piece. The simple solution is to +add to the end of the piece: + +

      + + + +
      + Cut -2 + +
      + +

      +Depending on the rhythm you might have to fiddle a bit with the cut +value. But, the example here puts a ``all notes off'' message in all +the active tracks at the start of beat 3. The exact same result can be +achieved by placing: + +

      + + + +
      + Cut 3 + +
      + +

      +before the final bar. + +

      +In this second example a tiny bit of silence is desired between bars 4 and +5 (this might be the end of a musical introduction). The following bit should +work: + +

      + + + +
      + 1 C +
      +2 G +
      +3 G +
      +4 C +
      +Cut +
      +BeatAdjust .2 +
      +5 G +
      ...
      + +
      + +

      +In this case the ``all notes off'' is placed at the end of bar 4 and +two-tenths of a beat is inserted at the same location. Bar 5 continues +the track. + +

      +The final example show how you might combine CUT with +FERMATA. In this case the sheet music shows a caesura after the +first quarter note and fermatas over the quarter notes on beats 2, 3 +and 4. + +

      + + + +
      + 1 C C#dim +
      +2 G7 +
      +3 C / C#dim +
      +Fermata 1 3 120 +
      +Cut 1.9 +
      +Cut 2.9 +
      +Cut 3.9 +
      +4 G7 / C7 / +
      +5 F6
      + +
      + +

      +A few tutorial notes on the above: + +

      + +

        +
      • The command + +

        + + + +
        + Fermata 1 3 120 + +
        + +

        +applies a slow-down in tempo to the second beat for the following + bar (an offset of 1), for 3 beats. These 3 beats will be played 20% + slower than the set tempo. + +

        +

      • +
      • The three CUT commands insert MIDI ``all notes off'' in + all the active tracks just before beats 2, 3 and 4. + +

        +

      • +
      + +

      +Finally, the proper syntax for the command: + +

      + + + +
      + [Voice] Cut [Offset] + +
      + +

      +If the voice is omitted, MIDI ``all notes off'' will be inserted into +each active track. + +

      +If the offset is omitted, the current bar position will be used. This +the same as using an offset value of 0. +


      Footnotes

      +
      +
      ... +groove.15.1
      +
      The time value is saved/restored with grooves so + setting a time is redundant in this case. + +
      +
      ... +beat.15.2
      +
      Technically speaking, +MMA determines an interval + starting 5% of a beat after the start of the fermata to a point 5% + of a beat before the end. Any MIDI Note-On events in this range (in + all tracks) are deleted. + +
      +
      ... +resume.15.3
      +
      The answer to the music theory question of whether + the ``pause'' takes time from the current beat or is treated + as a ``fermata'' is not clear--but as far as +MMA is concerned the + command has no effect on timing. + +
      +
      +
      bob -2007-03-07 +2008-09-28
      diff --git a/mma/docs/html/ref/node16.html b/mma/docs/html/ref/node16.html index 1d08b5b..f8f27ab 100644 --- a/mma/docs/html/ref/node16.html +++ b/mma/docs/html/ref/node16.html @@ -1,4 +1,4 @@ - + -Volume and Dynamics - +Swing + @@ -25,909 +25,285 @@ original version by: Nikos Drakos, CBLU, University of Leeds - - + next - up - previous
      - Next: Repeats - Up: Next: Volume and Dynamics + Up: Reference Manual - Previous: Swing -
      + Previous: Tempo and Timing
      +
      - -Subsections - - -
      - -

      - -
      -Volume and Dynamics +Swing

      - -MMA is very versatile when it comes to the volumes or dynamics used in your song. -16.1 -

      -Each generated note goes though several adjustments: +In jazz and swing music there is a convention to apply special timing +to eighth notes. Normally, the first of a pair of eights is lengthened +and the second is shortened. In the sheet music this can is sometimes +notated as sequences of a dotted eighth followed by a sixteenth. But, +if you were to foolish enough to play the song with this timing you'd +get a funny look from a jazz musician who will tell you to ``swing'' +the notes.

      - -

        -
      1. The initial velocity is set in the pattern definition, see - patterns,16.2 -

        -

      2. -
      3. the velocity is then adjusted by the master and - track volume settings (see here - for the discussion of ADJUSTVOLUME RATIO), - -

        -

      4. -
      5. if certain notes are to be accented, yet another adjustment is made, - -

        -

      6. -
      7. and, finally, if the random volume is set, more adjustment. - -

        -

      8. -
      - -

      -For the most part -MMA uses conventional musical score notation for -volumes. Internally, the dynamic name is converted to a percentage -value. The note volume is adjusted by the percentage. - -

      -The following table shows the available volume settings and the adjustment values. +The easiest way to think about swing eighths is to mentally convert +them to a triplet consisting of a quarter note and and eighth.

      - - - -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      Symbolic NameRatio (Percentage) Adjustment
      off0
      pppp5
      ppp10
      pp25
      p40
      mp70
      m100
      mf110
      f130
      ff160
      fff180
      ffff200
      - - -
      + Lost Image

      -The setting OFF is useful for generating fades at the end of a - piece. For example: +In the above music the first and second bar are both played as +in the third. + +

      + +MMA can handle this musical style in a number of ways, the control +is though the SWINGMODE command and options. + +

      +In default mode +MMA assumes that you don't want your song to swing. + +

      +To enable automatic conversions, simply set SWINGMODE to ``on'':

      - Volume ff -
      -Decresc Off 5 -
      -G / Gm / * 5
      + SwingMode On

      -will cause the last 5 bars of your music to fade from a FF to - silence. +This directive accepts the value ``On'' and ``Off'' or ``1'' and +``0''.

      -The initial velocity of a note is set in the pattern definition (see - patterns). The following - commands set the master volume, track volume and random volume - adjustments. - -

      -In addition to the note velocities generated by -MMA your MIDI - device can also change the mix between channels. See the discussion - for MIDIVOLUME (here). - -

      - -

      -
      -Accent -

      - -

      -``Real musicians''16.3, in an almost - automatic manner, emphasize notes on certain beats. In popular Western - music written in 4/4 time this is usually beats one and - three. This emphasis sets the pulse or beat in a piece. - -

      -In -MMA you can set the velocities in a pattern so that this emphasis is - automatically adjusted. For example, when setting a walking bass line - pattern you could use a pattern definition like: - -

      - - - -
      - Define Walk W1234 1 4 100; 2 4 70; 3 4 80; 4 4 70 - -
      - -

      -However, it is much easier to use a definition which has all the - velocities the same: - -

      - - - -
      - Define Walk W1234 1 1 90 * 4 - -
      - -

      -and use the ACCENT command to increase or decrease the volume - of notes on certain beats: - -

      - - - -
      - Walk Accent 1 20 2 -10 4 -10 - -
      - -

      -The above command will increase the volume for walking bass notes on - beat 1 by 20%, and decrease the volumes of notes on beats 2 and 4 by - 10%. - -

      -You can use this command in all tracks. - -

      -When specifying the accents, you must have matching pairs of data. The - first item in the pair is the beat (which can be fractional), the - second is the volume adjustment. This is a percentage of the current - note volume that is added (or subtracted) to the volume. Adjustment - factors must be integers in the range -100 to 100. - -

      -The ACCENTs can apply to all bars in a track; as well, you can set - different accents for different bars. Just use a ``{}'' pair to delimit - each bar. For example: - -

      - - - -
      - Bass Accent {1 20} / / {1 30 3 30} - -
      - -

      -The above line will set an accent on beat 1 of bars 1, 2 and 3; in - bar 4 beats 1 and 3 will be accented. - -

      -You can use a ``/'' to repeat a setting. The ``/'' can be enclosed in - a ``{}'' delimiter if you want. - -

      - -

      -AdjustVolume -

      - -

      - -

      -Mnemonic Volume Ratios -

      - -

      -The ratios used to adjust the volume can be changed from the table at - the start of this chapter. For example, to change the percentage used - for the MF setting: - -

      - - - -
      - AdjustVolume MF=95 f=120 - -
      - -

      -Note that you can have multiple setting on the same line. - -

      -The values used have the same format as those used for the - VOLUME command, below. For now, a few examples: - -

      - - - -
      - AdjustVolume Mf=mp+200 - -
      - -

      -will set the adjustment factor for ``mf'' to that of ``mp'' plus - 200%. - -

      -And, - -

      - - - -
      - AdjustVolume mf=+20 - -
      - -

      -will increase the current ``mf'' setting by 20%. - -

      -You might want to do these adjustment in your MMArc file(s). - -

      - -

      - -
      -Master Volume Ratio -

      - -

      - -MMA uses both the master and track volumes - to determine the final velocity of a note. By default, the track volume - setting accounts for 60% of the adjustment and the master volume for - the remaining 40%. The simple-minded logic behind this is that if the - user goes to the effort of setting a volume for a track, then that is - probably more important than a volume set for the entire piece. - -

      -You can change the ratio used at anytime with the ADJUSTVOLUME RATIO=VALUE - directive. $<$Value$>$ is the percentage to use for the Track volume. A few examples: - -

      - - - -
      - AdjustVolume Ratio=60 - -
      - -

      -This duplicates the default setting. - -

      - - - -
      - AdjustVolume Ratio=40 - -
      - -

      -Volume adjustments use 40% of the track volume and 60% of the master - volume. - -

      - - - -
      - AdjustVolume Ratio=100 - -
      - -

      -Volume adjustments use only the track volume (and ignore the master - volume completely). - -

      - - - -
      - AdjustVolume Ratio=0 - -
      - -

      -Volume adjustments use only the master volume (and ignore the track - volumes completely). - -

      -Any value in the range 0 to 100 can be used as an argument for this - command. This setting is saved in GROOVEs. - -

      -Feel free to experiment with different ratios. - -

      - -

      -
      -Volume -

      - -

      -The volume for a track and the master volume, is set with the VOLUME - command. Volumes can be specified much like standard sheet music with - the conventional dynamic names. These volumes can be applied to a - track or to the entire song. For example: - -

      - - - -
      - Arpeggio-Piano Volume p - -
      - -

      -sets the volume for the Arpeggio-Piano track to something approximating - piano. - -

      - - - -
      - Volume f - -
      - -

      -sets the master volume to forte. - -

      -In most cases the volume for a specific track will be set within the GROOVE - definition; the master volume is used in the music file to adjust the - overall feel of the piece. - -

      -When using VOLUME for a specific track, you can use a different - value for each bar in a sequence: - -

      - - - -
      - Drum Volume mp ff / ppp - -
      - -

      -A ``/'' can be used to repeat values. - -

      -In addition to the ``musical symbols'' like FF and MP you can - also use numeric values to indicate a percentage. In this case you can - use intermediate values to those specified in the table above. For - example, to set the volume between MF and F, you could do - something like: - -

      - - - -
      - Volume 87 - -
      - -

      -But, we don't recommend that you use this! - -

      -A better option is to increment or decrement an existing volume by a - percentage. A numeric value prefaced by a ``+'' or ``-'' is - interpreted as a change. So: - -

      - - - -
      - Drum-Snare Volume -20 - -
      - -

      -would decrement the existing volume of the DRUM-SNARE track by - 20%. - -

      -And, finally, for fine tuning you can adjust a ``musical symbol'' - volume by a percentage. The volume ``mf-10'' will generate a volume - 10% less than the value of ``mf''; ``f+20'' will generate a volume - 20% greater than ``f''. - -

      - -

      -Cresc and Decresc -

      - -

      -If you wish to adjust over a series of bars use the CRESC or - DECRESC commands. These commands work in both the master - context and individual tracks. - -

      -For all practical purposes, the two commands are equivalent, expect - for a possible warning message. If the new volume in less than the - current volume in a CRESC a warning will be displayed; the - converse applies to a DECRESC. In addition, a warning will - be displayed if the effect of either command results in no volume change. - -

      -The command requires two or three arguments. The first argument is an - optional initial volume followed by the new (destination) volume and - the number of bars the adjustment will take. - -

      -For example: - -

      - - - -
      - Cresc fff 5 - -
      - -

      -will gradually vary the master volume from its current setting to a - ``triple forte'' over the next 5 bars. Note that the very next bar - will be played at the current volume and the fifth bar at fff - with the other three bars at increasing volumes. - -

      -Similarly: - -

      - - - -
      - Drum-Snare Decresc mp 2 - -
      - -

      -will decrease the ``drum-snare'' volume to ``mezzo piano'' over the next 2 bars. - -

      -Finally, consider: - -

      - - - -
      - Cresc pp mf 4 - -
      - -

      -which will set the current volume to PP and then increase it to - MF over the next 4 bars. Again, note that the very next bar - will be played at pp and the fourth at mf. - -

      -You can use numeric values (not recommended!) in these directives: - -

      - - - -
      - Cresc 20 100 4 - -
      - -

      -As well as increment/decrement: - -

      - - - -
      - Volume ff -
      ... -
      -Decresc -10 -40 4
      - -
      - -

      -The above example will first set the volume to 10% less than the - current FF setting. Then it will decrease the volume over the next - 4 bars to a volume 40% less than the new setting for the first bar. - -

      -A SEQCLEAR command will reset all track volumes to the default - M. - -

      -When applying CRESC or DECRESC on a specific track the - volume for all the sequences will be the same. For this reason, a - warning is displayed if the volumes for each bar in the current - sequence are not the same. - -

      -You may find that certain volume adjustments don't create the volumes - you are expecting. In most cases this will be due to the fact that - -MMA uses a master and track volume to determine the final - result. So, if you want a fade at the end of a piece you might do: - -

      - - - -
      - Decresc m pppp 4 - -
      - -

      -and find that the volume on the last bar is still too loud. There are - two simple solutions: +With SWINGMODE enabled +MMA takes some extra steps when creating +patterns and processing of SOLO and MELODY parts.

        -
      • Add a command to decrease the track volumes. For example: - -

        - - - -
        - Alltracks Decresc m pppp 4 - -
        - -

        -in addition to to the master setting. +

      • Any eighth note in a pattern ``on the beat'' (1, 2, etc.) is converted to a + ``81'' note.

      • -
      • Change the ratio between track and master settings: +
      • Any eighth note is a pattern ``off the beat'' (1.5, 2.5, etc.) + is converted to ``82'' note, and the offset is adjusted to the prior + beat plus the value of an ``81'' note.

        - - - -
        - AdjustVolume Ratio=0 - -
        +

      • +
      • Drum notes with a value of a single MIDI tick are handled in the + same way, but only the offset adjustment is needed.

        -or some other small value. +

      • +
      • In SOLO and MELODY tracks any successive pairs of + eighth notes (or rests) are adjusted.

      -These methods will produce similar, but different results. +Important: when defining patterns and sequences remember that +the adjustment is made when the pattern is compiled. With a +DEFINE command the arguments are compiled (and swing +will be applied). But a SEQUENCE command with an +already defined pattern will use the existing pattern values (the +swing adjustment may or may not have been done at define +time). Finally, if you have a dynamic define in the sequence the +adjustment will take place if needed.

      - -

      -
      -RVolume -

      +SWINGMODE has an additional option, SKEW. This factor +is used to create the ``81'' and ``82'' +note lengths (see here). By +default the value ``66'' is used. This simply means that the note +length ``81'' is assigned 66% of the value of an eight note, and +``82'' is assigned 34%.

      -Not even the best musician can play each note at the same volume. Nor -would he or she want to--the result would be quite unmusical ... -so -MMA tries to be a bit human by randomly adjusting note volume -with the RVOLUME command. +You can change this setting at any point in your song or style +files. It will take effect immediately on all future patterns and solo +lines.

      -The command can be applied to any specific track. Examples: +The setting:

      - Chord RVolume 10 -
      -Drum-Snare RVolume 5
      + SwingMode Skew=60

      -The RVOLUME argument is a percentage value by which a volume is -adjusted. A setting of 0 disables the adjustment for a track (this is -the default). +will set a 60/40 setting.

      -When set, the note velocity (after the track and master volume -adjustments) is randomized up or down by the value. Again, using the -above example, let us assume that a note in the current pattern gets a -MIDI velocity of 88. The random factor of 10 will adjust this by 10% -up or down--the new value can be from 78 to 98. +If you want to experiment, find a GROOVE with note lengths of +``81'' and ``82'' (``swing'' is as good a choice as any). Now, put a +SWINGMODE SKEW=VALUE directive at the top of your song file (before +selecting any GROOVEs). Compile and play the song with different values +to hear the effects.

      -The idea behind this is to give the track a more human sounding -effect. You can use large values, but it's not recommended. Usually, -values in the 5 to 10 range work well. You might want slightly larger -values for drum tracks. Using a value greater than 30 will generate a -warning message. +If you want to play with different effects you could do something like +this:

      -Notes: + + + +
      + SwingMode On Skew=40 +
      ...Set CHORD pattern/groove +
      +SwingMode Skew=30 +
      ...Set Drum-1 pattern/groove +
      +SwingMode Skew=whatever +
      ...Set Drum-2
      + +
      + +

      +This will give different rates for different tracks. I'll probably not +enjoy your results, but I play polkas on the accordion for fun. + +

      +The complete SWINGMODE setting is saved in the current GROOVE and can be accessed +via the $_SwingMode built-in macro. + +

      +The easy (and ugly and unintuitive) way to handle swing is to +hard-code the value right into your patterns. For example, you could +set a swing chord pattern with: + +

      + + + +
      + Chord Define Swing8 1 3+3 80; 1.33 3 80; 2 3+3 80; 2.33 3 80 ... + +
      + +

      +We really don't recommend this for the simple reason that the swing +rate is frozen as quarter/eighth triplets. + +

      +If you refer to the table of note lengths +(here) you will find the cryptic +values of ``81'' and ``82''. These notes are adjusted depending of the +SWINGSKEW value. So: + +

      + + + +
      + Chord Define Swing8 1 81 80; 1+81 82 80; 2 81 80; 2+81 82 80 ... + +
      + +

      +is a bit better. In this case we have set a chord on beat 1 as the +first of an eighth note, and a chord on the off-beat as the +second. Note how we specify the off-beats as ``1+81'', etc. + +

      +In this example the feel of the swing will vary with the +SWINGSKEW setting. + +

      +But, aren't computers supposed to make life simple? Well, here is our +recommended method: + +

      + + + +
      + SwingMode On +
      +Chord Define Swing8 1 8 80; 1.5 8 80; 2 8 80; 2.5 8 80 ...
      + +
      + +

      +Now, +MMA will convert the values for you. Magic, well ...almost. + +

      +There are times when you will need to be more explicit, especially in +SOLO and MELODY tracks:

        -
      • No generated value will be out of the valid MIDI velocity range - of 1 to 127. +
      • If a bar has both swing and straight eighths.

      • -
      • A different value can be used for each bar in a sequence: - -

        - - - -
        - Scale RVolume 10 0 / 20 - -
        - -

        -

      • -
      • A ``/'' can be used to repeat values. +
      • If the note following an eighth is not an eight.

      -

      - -

      -Saving and Restoring Volumes -

      - -

      -Dynamics can get quite complicated, especially when you are adjusting -the volumes of a track inside a repeat or other complicated sections -of music. In this section attempts to give some general -guidelines and hints. - -

      -For the most part, the supplied groove files will have balanced -volumes between the different instruments. If you find that some -instruments or drum tones are consistently too loud or soft, spend some -time with the chapter on Fine Tuning. - -

      -Remember that GROOVEs save all the current volume settings. -This includes the master setting as well as individual track settings. -So, if you are using the mythical groove ``Wonderful'' and think that -the Chord-Piano volume should be louder in a particular song -it's easy to do something like: - -

      - - - -
      - Groove Wonderful -
      -Chord-Piano Volume ff -
      -DefGroove Wonderful
      - -
      - -

      -Now, when you call this groove the new volume will be used. Note that -you'll have to do this for each variation of the groove that you use -in the song. - -

      -In most songs you will not need to do major changes. But, it is nice -to use the same volume each time though a section. In most cases -you'll want to do a explicit setting at the start of a section. For -example: - -

      - - - -
      - Repeat -
      -Volume mf -
      .... -
      -Cresc ff 5 -
      ... -
      -EndRepeat
      - -
      - -

      -Another useful technique is the use of the $_LASTVOLUME -macro. For example: - -

      - - - -
      - Volume pp -
      ... -
      -Cresc f 5 -
      ... -
      $_LastVolume // restores to pp
      - -
      - -

      -


      Footnotes

      -
      -
      ... song.16.1
      -
      We'll try to be consistent and refer to a MIDI - ``volume'' as a ``velocity'' and internal -MMA adjustments to velocity as volumes. - -
      -
      ...sec-pats,16.2
      -
      Solo and - Melody track notes use an initial velocity of 90. - -
      -
      ... musicians''16.3
      -
      as opposed to mechanical. - -
      -

      +
      bob -2007-03-07 +2008-09-28
      diff --git a/mma/docs/html/ref/node17.html b/mma/docs/html/ref/node17.html index 25e716b..e4e87c7 100644 --- a/mma/docs/html/ref/node17.html +++ b/mma/docs/html/ref/node17.html @@ -1,4 +1,4 @@ - + -Repeats - +Volume and Dynamics + @@ -25,122 +25,1017 @@ original version by: Nikos Drakos, CBLU, University of Leeds - - + next - up - previous
      - Next: Variables, Conditionals and Jumps - Up: Next: Repeats + Up: Reference Manual - Previous: Volume and Dynamics -
      + Previous: Swing
      +
      + +Subsections -

      + + +
      + +

      + +
      +Volume and Dynamics

      -MMA attempts to be as comfortable to use as standard sheet music. -This includes repeats and endings. - +MMA is very versatile when it comes to the volumes or dynamics used in your song.17.1

      -More complex structures like D.S., Coda, etc. are -not directly supported. But, they are easily simulated with by -using some simple variables, conditionals and GOTOs. See -Variables for details. -Often as not, it may be easier to use your editor to cut, paste and -duplicate. Another, alternate, method of handling complicated repeats -is to set sections of code in MSET (more - here) variables and simply expand those. - -

      -A section of music to be repeated is indicated with a REPEAT -and REPEATEND or ENDREPEAT17.1 In addition, you can have REPEATENDINGS. +Each generated note goes though several adjustments:

      - - -
      - Repeats -
      +
        +
      1. The initial velocity is set in the pattern definition, see + patterns,17.2 +

        +

      2. +
      3. the velocity is then adjusted by the master and + track volume settings (see here + for the discussion of ADJUSTVOLUME RATIO),

        - Lost Image -
        -
        -
        -
        -

        +

      4. +
      5. if certain notes are to be accented, yet another adjustment is made, - - -
        - Repeat -
        -1 Am -
        -2 C -
        -RepeatEnding 2 -
        -3 D7 -
        -RepeatEnding -
        -4 D7 / Dm -
        -RepeatEnd -
        -5 G7 -
        -6 A
        - -
        +

        +

      6. +
      7. and, finally, if the random volume is set, more adjustment. + +

        +

      8. +
      + +

      +For the most part +MMA uses conventional musical score notation for +volumes. Internally, the dynamic name is converted to a percentage +value. The note volume is adjusted by the percentage. + +

      +The following table shows the available volume settings and the adjustment values. + +

      +

      + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Symbolic NameRatio (Percentage) Adjustment
      off0
      pppp5
      ppp10
      pp25
      p40
      mp70
      m100
      mf110
      f130
      ff160
      fff180
      ffff200
      -
      -

      +

      -In this example -MMA produces -music with bars: +The setting OFF is useful for generating fades at the end of a + piece. For example:

      -

      -1, 2, 3, + + + +
      + Volume ff
      -1, 2, 3, +Decresc Off 5
      -1, 2, 4, -
      -1, 2, 5, 6 - - +G / Gm / * 5
      + +

      -This works just like standard sheet music. Note that both -REPEATENDING and REPEATEND can take an optional argument -indicating the number of times to use the ending or to repeat the -block. The effect of an optional count for REPEATENDING is -illustrated in the example, above. The following simple example: +will cause the last 5 bars of your music to fade from a ff to + silence. + +

      +The initial velocity of a note is set in the pattern definition (see + patterns). The following + commands set the master volume, track volume and random volume + adjustments. + +

      +In addition to the note velocities generated by +MMA your MIDI + device can also change the mix between channels. See the discussion + for MIDIVOLUME (here). + +

      + +

      +
      +Accent +

      + +

      +``Real musicians''17.3, in an almost + automatic manner, emphasize notes on certain beats. In popular Western + music written in 4/4 time this is usually beats one and + three. This emphasis sets the pulse or beat in a piece. + +

      +In +MMA you can set the velocities in a pattern so that this emphasis is + automatically adjusted. For example, when setting a walking bass line + pattern you could use a pattern definition like: + +

      + + + +
      + Define Walk W1234 1 4 100; 2 4 70; 3 4 80; 4 4 70 + +
      + +

      +However, it is much easier to use a definition which has all the + velocities the same: + +

      + + + +
      + Define Walk W1234 1 1 90 * 4 + +
      + +

      +and use the ACCENT command to increase or decrease the volume + of notes on certain beats: + +

      + + + +
      + Walk Accent 1 20 2 -10 4 -10 + +
      + +

      +The above command will increase the volume for walking bass notes on + beat 1 by 20%, and decrease the volumes of notes on beats 2 and 4 by + 10%. + +

      +You can use this command in all tracks. + +

      +When specifying the accents, you must have matching pairs of data. The + first item in the pair is the beat (which can be fractional), the + second is the volume adjustment. This is a percentage of the current + note volume that is added (or subtracted) to the volume. Adjustment + factors must be integers in the range -100 to 100. + +

      +The ACCENTs can apply to all bars in a track; as well, you can set + different accents for different bars. Just use a ``{}'' pair to delimit + each bar. For example: + +

      + + + +
      + Bass Accent {1 20} / / {1 30 3 30} + +
      + +

      +The above line will set an accent on beat 1 of bars 1, 2 and 3; in + bar 4 beats 1 and 3 will be accented. + +

      +You can use a ``/'' to repeat a setting. The ``/'' can be enclosed in + a ``{}'' delimiter if you want. + +

      + +

      +AdjustVolume +

      + +

      + +

      +Mnemonic Volume Ratios +

      + +

      +The ratios used to adjust the volume can be changed from the table at + the start of this chapter. For example, to change the percentage used + for the MF setting: + +

      + + + +
      + AdjustVolume MF=95 f=120 + +
      + +

      +Note that you can have multiple setting on the same line. + +

      +The values used have the same format as those used for the + VOLUME command, below. For now, a few examples: + +

      + + + +
      + AdjustVolume Mf=mp+200 + +
      + +

      +will set the adjustment factor for mf to that of mp plus + 200%. + +

      +And, + +

      + + + +
      + AdjustVolume mf=+20 + +
      + +

      +will increase the current mf setting by 20%. + +

      +You might want to do these adjustment in your MMArc file(s). + +

      + +

      + +
      +Master Volume Ratio +

      + +

      + +MMA uses both the master and track volumes + to determine the final velocity of a note. By default, the track volume + setting accounts for 60% of the adjustment and the master volume for + the remaining 40%. The simple-minded logic behind this is that if the + user goes to the effort of setting a volume for a track, then that is + probably more important than a volume set for the entire piece. + +

      +You can change the ratio used at anytime with the ADJUSTVOLUME RATIO=VALUE + directive. $<$Value$>$ is the percentage to use for the Track volume. A few examples: + +

      + + + +
      + AdjustVolume Ratio=60 + +
      + +

      +This duplicates the default setting. + +

      + + + +
      + AdjustVolume Ratio=40 + +
      + +

      +Volume adjustments use 40% of the track volume and 60% of the master + volume. + +

      + + + +
      + AdjustVolume Ratio=100 + +
      + +

      +Volume adjustments use only the track volume (and ignore the master + volume completely). + +

      + + + +
      + AdjustVolume Ratio=0 + +
      + +

      +Volume adjustments use only the master volume (and ignore the track + volumes completely). + +

      +Any value in the range 0 to 100 can be used as an argument for this + command. This setting is saved in GROOVEs. + +

      +Feel free to experiment with different ratios. + +

      + +

      +
      +Volume +

      + +

      +The volume for a track and the master volume, is set with the VOLUME + command. Volumes can be specified much like standard sheet music with + the conventional dynamic names. These volumes can be applied to a + track or to the entire song. For example: + +

      + + + +
      + Arpeggio-Piano Volume p + +
      + +

      +sets the volume for the Arpeggio-Piano track to something approximating + piano. + +

      + + + +
      + Volume f + +
      + +

      +sets the master volume to forte. + +

      +In most cases the volume for a specific track will be set within the GROOVE + definition; the master volume is used in the music file to adjust the + overall feel of the piece. + +

      +When using VOLUME for a specific track, you can use a different + value for each bar in a sequence: + +

      + + + +
      + Drum Volume mp ff / ppp + +
      + +

      +A ``/'' can be used to repeat values. + +

      +In addition to the ``musical symbols'' like ff and mp you can + also use numeric values to indicate a percentage. In this case you can + use intermediate values to those specified in the table above. For + example, to set the volume between mf and f, you could do + something like: + +

      + + + +
      + Volume 87 + +
      + +

      +But, we don't recommend that you use this! + +

      +A better option is to increment or decrement an existing volume by a + percentage. A numeric value prefaced by a ``+'' or ``-'' is + interpreted as a change. So: + +

      + + + +
      + Drum-Snare Volume -20 + +
      + +

      +would decrement the existing volume of the DRUM-SNARE track by + 20%. + +

      +And, finally, for fine tuning you can adjust a ``musical symbol'' + volume by a percentage. The volume ``mf-10'' will generate a volume + 10% less than the value of ``mf''; ``f+20'' will generate a volume + 20% greater than ``f''. + +

      + +

      +Cresc and Decresc +

      + +

      +If you wish to adjust the volume over one or more bars use the CRESC or + DECRESC17.4 commands. These commands work in both the master + context and individual tracks. + +

      +For all practical purposes, the two commands are equivalent, except + for a possible warning message. If the new volume in less than the + current volume in a CRESC a warning will be displayed; the + converse applies to a DECRESC. In addition, a warning will + be displayed if the effect of either command results in no volume change. + +

      +The command requires two or three arguments. The first argument is an + optional initial volume followed by the new (destination) volume and + the number of bars the adjustment will take. + +

      +For example: + +

      + + + +
      + Cresc fff 5 + +
      + +

      +will gradually vary the master volume from its current setting to a + ``triple forte'' over the next 5 bars. Note that the very next bar + will be played at the current volume and the fifth bar at fff + with the other three bars at increasing volumes. + +

      +Similarly: + +

      + + + +
      + Drum-Snare Decresc mp 2 + +
      + +

      +will decrease the ``drum-snare'' volume to ``mezzo piano'' over the next 2 bars. + +

      +Finally, consider: + +

      + + + +
      + Cresc pp mf 4 + +
      + +

      +which will set the current volume to pp and then increase it to + mf over the next 4 bars. Again, note that the very next bar + will be played at pp and the fourth at mf. + +

      +You can use numeric values (not recommended!) in these directives: + +

      + + + +
      + Cresc 20 100 4 + +
      + +

      +As well as increment/decrement: + +

      + + + +
      + Volume ff +
      ... +
      +Decresc -10 -40 4
      + +
      + +

      +The above example will first set the volume to 10% less than the + current ff setting. Then it will decrease the volume over the next + 4 bars to a volume 40% less than the new setting for the first bar. + +

      +A SEQCLEAR command will reset all track volumes to the default + M. + +

      +When applying CRESC or DECRESC at the track level the + volumes for each bar in the sequence will end up being the same. For example, + assuming a two bar sequence length, you might have: + +

      + + + +
      + Chord Volume MP F + +
      + +

      +which alternates the volume between successive bars in the + CHORD track. Now, if you were to: + +

      + + + +
      + Chord Cresc M FF 4 + +
      + +

      +The following actions take effect: + +

        +
      1. A warning message will be displayed, +
      2. +
      3. The volume for the chord track will be set to m, +
      4. +
      5. The volume for the chord track will increment to ff over + the next four bars, +
      6. +
      7. The volume for the sequence will end up being ff for all + the bars in the remaining sequence. You may need to reissue the + initial chord volume command. + +
      8. +
      + +

      +You may find that certain volume adjustments don't create the volumes + you are expecting. In most cases this will be due to the fact that + +MMA uses a master and track volume to determine the final + result. So, if you want a fade at the end of a piece you might do: + +

      + + + +
      + Decresc m pppp 4 + +
      + +

      +and find that the volume on the last bar is still too loud. There are + two simple solutions: + +

      + +

        +
      • Add a command to decrease the track volumes. For example: + +

        + + + +
        + Alltracks Decresc m pppp 4 + +
        + +

        +in addition to to the master setting. + +

        +

      • +
      • Change the ratio between track and master settings: + +

        + + + +
        + AdjustVolume Ratio=0 + +
        + +

        +or some other small value. + +

        +

      • +
      + +

      +These methods will produce similar, but different results. + +

      +The adjustments made for CRESC and DECRESC are applied +over each bar effected. This means that the first note or notes in a +bar will be louder (or softer) than the last. You can use this effect +for interesting changes by using a single bar for the range. Assuming +a current volume of mp: + +

      + + + +
      + Cresc fff 1 + +
      + +

      +will set the final notes in the following bar to be fff, etc. + +

      +If you have a number of bars with the same chord and the track you are +modifying has UNIFY enabled the volume will not +change. UNIFY creates long notes sustained over a number of +bars for which the volume is only set once. + +

      +Sometimes a CRESC17.5 command will span a groove +change. +MMA handles this in two different ways: + +

      + +

        +
      • Master CRESC commands can continue over a new + GROOVE. For example: + +

        + + + +
        + Groove One +
        +Cresc mp ff 8 +
        +C * 4 +
        +Groove Two +
        +Dm * 4
        + +
        + +

        +will work just fine. This makes sense since library files and groove + definitions normally do not have master volume settings. + +

        +

      • +
      • However, volume changes at a track level cannot span + GROOVE changes. Using a similar example: + +

        + + + +
        + Groove One +
        +Chord Cresc mp ff 8 +
        +C * 4 +
        +Groove Two +
        +Dm * 4
        + +
        + +

        +In this case +MMA will truncate the CRESC after 4 bars and + issue a warning message. The CHORD volume will never reach + ff. Since groove definitions and library files normally + do set individual volumes for each track it would be counter + intuitive to permit a previous CRESC to continue its effect. + +

        +

      • +
      + +

      + +

      +Swell +

      + +

      +Often you want a crescendo to be followed by a decrescendo (or, less +commonly, a decrescendo followed by a crescendo). Technically, this is +a messa di voce.17.6 You'll see the notation in sheet music with opposed +``hairpins''. + +

      +A SWELL is set with a command like: + +

      + + + +
      + Swell pp ff 4 + +
      + +

      +or + +

      + + + +
      + Chord Swell ff 4 + +
      + +

      +In the first case the master volume will be increased over 2 bars from +pp to ff and then back to pp. In the second +case the CHORD volume will be increased to ff over 2 +bars, then back to the original volume. + +

      +You can achieve the same results with a pair of CRESC and +DECRESC commands (and you might be safer to do just this since +SWELL doesn't issue as many warnings). + +

      +Note that, just like in CRESC, you can skip the first argument +(the initial volume setting). Also, note that the final argument is +the total number of bars to effect (and it must be 2 or more). + +

      + +

      + +
      +RVolume +

      + +

      +Not even the best musician can play each note at the same volume. Nor +would he or she want to--the result would be quite unmusical ... +so +MMA tries to be a bit human by randomly adjusting note volume +with the RVOLUME command. + +

      +The command can be applied to any specific track. Examples: + +

      + + + +
      + Chord RVolume 10 +
      +Drum-Snare RVolume 5
      + +
      + +

      +The RVOLUME argument is a percentage value by which a volume is +adjusted. A setting of 0 disables the adjustment for a track (this is +the default). + +

      +When set, the note velocity (after the track and master volume +adjustments) is randomized up or down by the value. Again, using the +above example, let us assume that a note in the current pattern gets a +MIDI velocity of 88. The random factor of 10 will adjust this by 10% +up or down--the new value can be from 78 to 98. + +

      +The idea behind this is to give the track a more human sounding +effect. You can use large values, but it's not recommended. Usually, +values in the 5 to 10 range work well. You might want slightly larger +values for drum tracks. Using a value greater than 30 will generate a +warning message. + +

      +Notes: + +

      + +

        +
      • No generated value will be out of the valid MIDI velocity range + of 1 to 127. + +

        +

      • +
      • A different value can be used for each bar in a sequence: + +

        + + + +
        + Scale RVolume 10 0 / 20 + +
        + +

        +

      • +
      • A ``/'' can be used to repeat values. + +

        +

      • +
      + +

      + +

      +Saving and Restoring Volumes +

      + +

      +Dynamics can get quite complicated, especially when you are adjusting +the volumes of a track inside a repeat or other complicated sections +of music. In this section attempts to give some general +guidelines and hints. + +

      +For the most part, the supplied groove files will have balanced +volumes between the different instruments. If you find that some +instruments or drum tones are consistently too loud or soft, spend some +time with the chapter on Fine Tuning. + +

      +Remember that GROOVEs save all the current volume settings. +This includes the master setting as well as individual track settings. +So, if you are using the mythical groove ``Wonderful'' and think that +the Chord-Piano volume should be louder in a particular song +it's easy to do something like: + +

      + + + +
      + Groove Wonderful +
      +Chord-Piano Volume ff +
      +DefGroove Wonderful
      + +
      + +

      +Now, when you call this groove the new volume will be used. Note that +you'll have to do this for each variation of the groove that you use +in the song. + +

      +In most songs you will not need to do major changes. But, it is nice +to use the same volume each time though a section. In most cases +you'll want to do a explicit setting at the start of a section. For +example:

      @@ -148,137 +1043,99 @@ illustrated in the example, above. The following simple example:

      Repeat
      -1  Am +Volume mf +
      ...
      -2  Cm +Cresc ff 5 +
      ...
      -RepeatEnd 3
      +EndRepeat

      -Will expand to: -

      -1, 2, -
      -1, 2, -
      -1, 2 - -
      - -

      -Note that the optional argument ``3'' produces a total of three -copies. The default argument for REPEAT is ``2''. Using ``1'' -cancels the REPEAT and ``0'' deletes the entire section. Using -``1'' and ``0'' are useful in setting up Coda sections where you want -a different count the second time the section is played. Note that the -count argument can be a macro. Have a look at the sample file -repeats.mma for lots of examples. - -

      -Combining optional counts with both REPEATENDING and -REPEATEND is permitted. Another example: +Another useful technique is the use of the $_LASTVOLUME +macro. For example:

      - Repeat + Volume pp +
      ...
      -1 Am -
      -2 C -
      -RepeatEnding 2 -
      -3 D7 -
      -RepeatEnd 2
      +Cresc f 5 +
      ... +
      $_LastVolume // restores to pp

      -Produces: -

      -1, 2, 3, -
      -1, 2, 3, -
      -1, 2, -
      -1, 2 - -
      - -

      - -MMA processes repeats by reading the input file and creating -duplicates of the repeated material. This means that a directive in -the repeated material would be processed multiple times. Unless you -know what you are doing, directives should not be inserted in repeat -sections. Be especially careful if you define a pattern inside a -repeat. Using TEMPO with a ``+'' or ``-'' will be problematic -as well. - -

      -Repeats can be nested to any level. - -

      -Some count values for REPEATEND or ENDREPEAT and -REPEATENDING will generate a warning message. Using the -optional text NoWarn as the first argument will supress the -message: - -

      - - - -
      - Repeat -
      ... -
      -RepeatEnd Nowarn 1
      - -
      - -

      -There must be one REPEATEND or ENDREPEAT for every -REPEAT. Any number of REPEATENDINGs can be included -before the REPEATEND.


      Footnotes

      -
      ...ENDREPEAT17.1
      -
      The reason for both - ENDREPEAT and REPEATEND is to match IFEND and - ENDIF. +
      ...17.1
      +
      We'll try to be consistent and refer to a MIDI + ``volume'' as a ``velocity'' and internal +MMA adjustments to velocity as volumes.
      -

      +
      ...sec-pats,17.2
      +
      Solo and + Melody track notes use an initial velocity of 90. + +
      +
      ... musicians''17.3
      +
      as opposed to mechanical. + +
      +
      ...DECRESC17.4
      +
      We use the term ``decrescendo'', others + prefer ``diminuendo''. + +
      +
      ...CRESC17.5
      +
      This applies to DECRESC and + SWELL as well. + +
      +
      ... voce.17.6
      +
      Some references indicate that messa di + voce applies to a single tone, and +MMA is not capable of doing + this. + +
      +
    +
    bob -2007-03-07 +2008-09-28
    diff --git a/mma/docs/html/ref/node18.html b/mma/docs/html/ref/node18.html index b14934b..bf13f2a 100644 --- a/mma/docs/html/ref/node18.html +++ b/mma/docs/html/ref/node18.html @@ -1,4 +1,4 @@ - + -Variables, Conditionals and Jumps - +Repeats + @@ -25,1435 +25,262 @@ original version by: Nikos Drakos, CBLU, University of Leeds - - + next - up - previous
    - Next: Low Level MIDI Commands - Up: Next: Variables, Conditionals and Jumps + Up: Reference Manual - Previous: Repeats -
    + Previous: Volume and Dynamics
    +
    - -Subsections - - -
    - -

    - -
    -Variables, Conditionals and Jumps -

    - -

    -To make the processing of your music easier, -MMA supports a very -primitive set for variable manipulations along with some conditional -testing and the oft-frowned-upon GOTO command. - -

    - -

    -Variables +Repeats

    -MMA lets you set a variable, much like in other programming -languages and to do some basic manipulations on them. Variables are -most likely to be used for two reasons: +MMA attempts to be as comfortable to use as standard sheet music. +This includes repeats and endings. + +

    +More complex structures like D.S., Coda, etc. are +not directly supported. But, they are easily simulated with by +using some simple variables, conditionals and GOTOs. See +Variables for details. +Often as not, it may be easier to use your editor to cut, paste and +duplicate. Another, alternate, method of handling complicated repeats +is to set sections of code in MSET (more + here) variables and simply expand those. + +

    +A section of music to be repeated is indicated with a REPEAT +and REPEATEND or ENDREPEAT18.1 In addition, you can have REPEATENDINGS.

    -

      -
    • For use in setting up conditional segments of your file, + + + +
      + Repeats +

      - -

    • As a shortcut to entering complex chord sequences. + Lost Image +
      +
      +
      +
      +

      + + + +
      + Repeat +
      +1 Am +
      +2 C +
      +RepeatEnding 2 +
      +3 D7 +
      +RepeatEnding +
      +4 D7 / Dm +
      +RepeatEnd +
      +5 G7 +
      +6 A
      + +
      + + +

    • -

    • -

    -To begin, the following list shows the available commands to set and manipulate variables: +In this example +MMA produces +music with bars: + +

    +

    +1, 2, 3, +
    +1, 2, 3, +
    +1, 2, 4, +
    +1, 2, 5, 6 + +
    + +

    +This works just like standard sheet music. Note that both +REPEATENDING and REPEATEND can take an optional argument +indicating the number of times to use the ending or to repeat the +block. The effect of an optional count for REPEATENDING is +illustrated in the example, above. The following simple example:

    - Set VariableName String + Repeat
    -Mset VariableName ... MsetEnd +1  Am
    -UnSet VariableName +2  Cm
    -ShowVars -
    -Inc Variablename [value] -
    -Dec Variablename [value] -
    -Vexpand ON/Off
    +RepeatEnd 3

    -All variable names are case-insensitive. Any characters can be used in -a variable name. The only exceptions are that a variable name cannot -start with a ``$'' or a ``_'' (an underscore--this is reserved for -internal variables, see below). +Will expand to: +

    +1, 2, +
    +1, 2, +
    +1, 2 + +

    -Variables are set and manipulated by using their names. Variables are -expanded when their name is prefaced by a space followed by single -``$'' sign. For example: +Note that the optional argument ``3'' produces a total of three +copies. The default argument for REPEAT is ``2''. Using ``1'' +cancels the REPEAT and ``0'' deletes the entire section. Using +``1'' and ``0'' are useful in setting up Coda sections where you want +a different count the second time the section is played. Note that the +count argument can be a macro. Have a look at the sample file +repeats.mma for lots of examples. + +

    +Combining optional counts with both REPEATENDING and +REPEATEND is permitted. Another example:

    - Set Silly Am / Bm / + Repeat
    -1 $Silly
    +1 Am +
    +2 C +
    +RepeatEnding 2 +
    +3 D7 +
    +RepeatEnd 2

    -The first line creates the variable ``Silly''; the second creates a -bar of music with the chords ``Am / Bm /''. +Produces: +

    +1, 2, 3, +
    +1, 2, 3, +
    +1, 2, +
    +1, 2 + +

    -Note that the ``$'' must be the first item on a line or follow a -space character. For example, the following will NOT work: + +MMA processes repeats by reading the input file and creating +duplicates of the repeated material. This means that a directive in +the repeated material would be processed multiple times. Unless you +know what you are doing, directives should not be inserted in repeat +sections. Be especially careful if you define a pattern inside a +repeat. Using TEMPO with a ``+'' or ``-'' will be problematic +as well. + +

    +Repeats can be nested to any level. + +

    +Some count values for REPEATEND or ENDREPEAT and +REPEATENDING will generate a warning message. Using the +optional text NoWarn as the first argument will suppress the +message:

    - Set Silly 4a;b;c;d; + Repeat +
    ...
    -1 Am {$Silly}
    +RepeatEnd Nowarn 1

    -However: - -

    - - - -
    - 1 Am { $Silly} - -
    - -

    -will work fine. - -

    -Following are details on all the available variable commands: - -

    - -

    -Set -

    - -

    -Set or create a variable. You can skip the String if you do -want to assign an empty string to the variable. A valid example is: - -

    - - - -
    - Set PassCount 1 - -
    - -

    -You can concatenate variables or constants by using a single ``+''. -For example: - -

    - - - -
    - Groove Rhumba -
    -Repeat -
    ... -
    -Set a $_Groove + Sus -
    -Groove $a -
    ... -
    -Groove Rhumba1 -
    -Repeatend
    - -
    - -

    -This can be useful in calling GROOVE variations. - -

    - -

    -NewSet -

    - -

    -The NEWSET command works the same as SET with the -exception that that it is completely ignored if the variable already -exists. So, - -

    - - - -
    - NewSet ChordVoice JazzGuitar - -
    - -

    -and - -

    - - - -
    - If NDef ChordVoice -
    -Set ChordVoice JazzGuitar -
    -Endif
    - -
    - -

    -have identical results. - -

    - -

    -
    -Mset -

    - -

    -This command is quite similar to SET, but MSET expects -multiple lines. An example: - -

    - - - -
    - MSet LongVar -
    -1 Cm -
    -2 Gm -
    -3 G7 -
    -MsetEnd
    - -
    - -

    -It is quite possible to set a variable to hold an entire section of -music (perhaps a chorus) and insert this via macro expansion at -various places in your file. - -

    -Each MSET must be terminated by a ENDMSET or -MSETEND command (on its own separate line). - -

    -Be careful if you use an MSET variable in a PRINT -statement ...you'll probably get an error. The PRINT -command will print the first line of the variable and the -remainder will be reinserted into the input stream for interpretation. - -

    -Special code in -MMA will maintain the block settings from -BEGIN/END. So, you can do something like: - -

    - - - -
    - Mset Spam -
      Line one -
      Line 2 -
      333 -
    -EndMset -
    -Begin Print -
      $Spam -
    -End
    - -
    - -

    - -

    -RndSet -

    - -

    -There are times when you may want a random value to use in selecting a GROOVE or -for other more creative purposes. The RNDSET command sets a variable from -a value in a list. The list can be anything; just remember that each whitespace -forms the start of a new item. So, - -

    - - - -
    - RndSet Var 1 2 3 4 5 - -
    - -

    -will set $VAR to one of the values 1, 2, 3, 4 or 5. - -

    -You could use this to randomly select a GROOVE: - -

    - - - -
    - Groove $var Groove1 Groove2 Groove3 - -
    - -

    -Alternately, - -

    - - - -
    - RndSet Grv Groove1 Groove2 Groove3 - -
    - -

    -will set $GRV to one of ``Groove1'', ``Groove2'' or ``Groove3''. - -

    -Then you can do the same as in the earlier example with: - -

    - - - -
    - Groove $Grv - -
    - -

    -You can also have fun using random values for timing, transposition, etc. - -

    - -

    -UnSet VariableName -

    - -

    -Removes the variable. This can be useful if you have conditional tests -which simply rely on a certain variable being ``defined''. - -

    - -

    -ShowVars -

    - -

    -Mainly used for debugging, this command displays the names of the -defined variables and their contents. The display will preface each -variable name with a ``$''. Note that internal -MMA variables are not -displayed with this command. - -

    -You can call SHOWVARS with an argument list. In this case the -values of the variables names in the list will be printed. Variables -which do not exist will not cause an error. Eg: - -

    - - - -
    - ShowVars xXx Count foo -
       $XXX - not defined -
       $COUNT: 11 -
       $FOO: This is Foo
    - -
    - -

    - -

    -Inc and Dec -

    - -

    -These commands increment or decrement a variable. If no argument is -given, a value of 1 is used; otherwise, the value specified is used. -The value can be an integer or a floating point number. - -

    -A short example: - -

    - - - -
    - Set PassCount 1 -
    -Set Foobar 4 -
    -Showvars -
    -Inc FooBar 4 -
    -Inc PassCount -
    -ShowVars
    - -
    - -

    -This command is quite useful for creating conditional tests for proper -handling of codas or groove changes in repeats. - -

    - -

    -VExpand On or Off -

    - -

    -Normally variable expansion is enabled. These two options will turn -expansion on or off. Why would you want to do this? Well, here's a -simple example: - -

    - - - -
    - Set LeftC Am Em -
    -Set RightC G / -
    -VExpand Off -
    -Set Full $LeftC $RightC -
    -VExpand On
    - -
    - -

    -In this case the actual contents of the variable ``Full'' is ``$LeftC -$RightC''. If the OFF/ON option lines had not been used, the -contents would be ``Am Em G /''. You can easily verify this with the -SHOWVARS option. - -

    -When -MMA processes a file it expands variables in a recursive -manner. This means that, in the above example, the line: - -

    - - - -
    - 1 $Full - -
    - -

    -will be changed to: - -

    - - - -
    - 1 Am Em G / - -
    - -

    -However, if later in the file, you change the definition of one of the -variables ...for example: - -

    - - - -
    - Set LeftC Am / - -
    - -

    -the same line will now be ``1 Am / G /''. - -

    -Most of -MMA 's internal commands can be redefined with -variables. However, you really shouldn't use this feature. -It's been left for two reasons: it might be useful, and, it's hard to -disable. - -

    -However, not all commands can be redefined. The following is short -list of things which will work (but, again, not all suggestions should -be used!): - -

    - - - -
    - Set Rate Tempo 120 -
    $Rate -
    -Set R Repeat -
    $R
    - -
    - -

    -But, the following will not work: - -

    - - - -
    - Set B Begin -
    -Set E End -
    $B Arpeggio Define -
    .... -
    $E
    - -
    - -

    -This fails since the Begin/End constructs are expanded before variable -expansion. However: - -

    - - - -
    - Set A Define Arpeggio -
    -Begin $a ... End
    - -
    - -

    -is quite alright. - -

    -Even though you can use a variable to substitute for the REPEAT -or IF directives, using one for REPEATEND, ENDREPEAT, -REPEATENDING, LABEL, IFEND or ENDIF will fail. - -

    -Variable expansion should usually not be a concern. In most normal -files, -MMA will expand variables as they are encountered. However, -when reading the data in a REPEAT, IF or MSET -section the expansion function is skipped--but, when the lines are -processed, after being stored in an internal queue, variables are -expanded. - -

    - -

    -StackValue -

    - -

    -Sometimes you just want to save a value for a few lines of code. The -STACKVALUE command will save its arguments. You can later -retrive them via the $_StackValue macro. For example (taken from the -stdpats.mma file): - -

    - - - -
    - StackValue $_SwingMode -
    -SwingMode On -
    -Begin Drum Define -
      Swing8 1 0 90 * 8 -
    -End -
      ... -
    -SwingMode $_StackValue
    - -
    - -

    -Note that the $_StackValue macro removes the last value from the -stack. If you invoke the macro when there is nothing saved an error -will occur. - -

    - -

    -Predefined Variables -

    - -

    -For your convenience -MMA tracks a number of internal settings and -you can access these values with special macros.18.1 All of these ``system'' variables are -prefaced with a single underscore. For example, the current tempo is -displayed with the variable $_TEMPO. - -

    -There are two categories of system variables. The first are the simple -values for global settings: - -

    -

    -
      $_AutoLibPath
    -
    Current AUTOLIBPATH setting. - -

    -

    -
      $_BarNum
    -
    Current bar number of song. - -

    -

    -
      $_Debug
    -
    Current debug settings. - -

    -

    -
      $_Groove
    -
    Name of the currently selected groove. May be - empty if no groove has been selected. - -

    -

    -
      $_KeySig
    -
    Key signature as defined in song file. If no - keysignature is set the somewhat cryptic 0# will be returned. - -

    -

    -
      $_LineNum
    -
    Line number in current file. - -

    -

    -
      $_IncPath
    -
    Current INCPATH setting. - -

    -

    -
      $_LastDebug
    -
    Debug settings prior to last DEBUG - command. This setting can be used to restore settings, IE: - -

    - - - -
    - Debug Warnings=off -
    ... stuff generating annoying warnings -
    -Debug $_LastDebug
    - -
    - -

    -

    -
      $_LastGroove
    -
    Name of the groove selected before the - currently selected groove. - -

    -

    -
      $_LastVolume
    -
    Previously set global volume setting. - -

    -

    -
      $_LibPath
    -
    Current LIBPATH setting. - -

    -

    -
      $_Lyric
    -
    Current LYRIC settings. - -

    -

    -
      $_MIDISplit
    -
    List of SPLITCHANNELS. - -

    -

    -
      $_OutPath
    -
    Current OUTPATH setting. - -

    -

    -
      $_SeqRnd
    -
    Global SEQRND setting (on, off or track list). - -

    -

    -
      $_SeqRndWeight
    -
    Global SEQRNDWEIGHT settings. - -

    -

    -
      $_SeqSize
    -
    Current SEQSIZE setting. - -

    -

    -
      $_SwingMode
    -
    Current SWINGMODE setting (On or Off) - and the Skew value. - -

    -

    -
      $_StackValue
    -
    The last value stored on the STACKVALUE - stack. - -

    -

    -
      $_Tempo
    -
    Current TEMPO. Note that if you have used - the optional bar count in setting the tempo this will be the - target tempo. - -

    -

    -
      $_Time
    -
    The current TIME (beats per bar) setting. - -

    -

    -
      $_ToneTr
    -
    List of all TONETR settings. - -

    -

    -
      $_Transpose
    -
    Current TRANSPOSE setting. - -

    -

    -
      $_VExpand
    -
    VExpand value (On/Off). Not very useful since you - can't enable VEXPAND back with a macro. - -

    -

    -
      $_VoiceTr
    -
    List of all VOICETR settings. - -

    -

    -
      $_Volume
    -
    Current global volume setting. - -

    -

    -
      $_VolumeRatio
    -
    Global volume ratio (track vrs. master) from - ADJUSTVOLUME Ratio setting. - -

    -

    -
    - -

    -The second type of system variable is for settings in a certain track. -Each of these variables is in the form $_TRACKNAME_VALUE. For -example, the current voice setting for the ``Bass-Sus'' track can be -accessed with the variable $_Bass-Sus_Voice. - -

    -If the associated command permits a value for each sequence in your -pattern, the macro will more than one value. For example (assuming a -SEQSIZE of 4): - -

    - - - -
    - Bass Octave 3 4 2 4 -
    -Print $_Bass_Octave -
    ... -
    -3 4 2 4
    - -
    - -

    -The following are the available ``TrackName'' macros: - -

    -

    -
      $_TRACKNAME_Accent
    -
    -
    -
      $_TRACKNAME_Articulate
    -
    -
    -
      $_TRACKNAME_Channel
    -
    Assigned MIDI channel 1-16, 0 if not assigned. -
    -
      $_TRACKNAME_Compress
    -
    -
    -
      $_TRACKNAME_Direction
    -
    -
    -
      $_TRACKNAME_DupRoot
    -
    (only permitted in Chord Tracks) -
    -
      $_TRACKNAME_Harmony
    -
    -
    -
      $_TRACKNAME_HarmonyVolume
    -
    -
    -
      $_TRACKNAME_Invert
    -
    -
    -
      $_TRACKNAME_Limit
    -
    -
    -
      $_TRACKNAME_Mallet
    -
    Rate and delay values (only valid in - Solo and Melody tracks) -
    -
      $_TRACKNAME_NoteSpan
    -
    -
    -
      $_TRACKNAME_Octave
    -
    -
    -
      $_TRACKNAME_Range
    -
    -
    -
      $_TRACKNAME_Rskip
    -
    -
    -
      $_TRACKNAME_Rtime
    -
    -
    -
      $_TRACKNAME_Rvolume
    -
    -
    -
      $_TRACKNAME_SeqRnd
    -
    -
    -
      $_TRACKNAME_SeqRndWeight
    -
    -
    -
      $_TRACKNAME_Strum
    -
    (only permitted in Chord tracks) -
    -
      $_TRACKNAME_Tone
    -
    (only permitted in Drum tracks) -
    -
      $_TRACKNAME_Unify
    -
    -
    -
      $_TRACKNAME_Voice
    -
    -
    -
      $_TRACKNAME_Voicing
    -
    (only permitted in Chord tracks) -
    -
      $_TRACKNAME_Volume
    -

    -

    -
    - -

    -The ``TrackName'' macros are useful in copying values between -non-similar tracks and CHSHARE tracks. For example: - -

    - - - -
    - Begin Bass -
      Voice AcousticBass -
      Octave 3 -
      ... -
    -End -
    -Begin Walk -
      ChShare Bass -
      Voice $_Bass_Voice -
      Octave $_Bass_Octave -
      ... -
    -End
    - -
    - -

    - -

    -Conditionals -

    - -

    -The most important reason to have variables in -MMA is to use them -available in conditionals. In -MMA a conditional consists of a line -starting with an IF directive, a test, a series of lines to -process (depending upon the result of the test), and a closing -ENDIF or IFEND18.2 directive. An optional ELSE statement may be included. - -

    -The first set of tests are unary (they take no arguments): - -

    -

    -
    Def VariableName
    -
    Returns true if the variable has been defined. - -

    -

    -
    Ndef VariableName
    -
    Returns true if the variable has not been - defined. - -

    -

    -
    - -

    -In the above tests you must supply the name of a variable--don't make -the mistake of including a ``$'' which will invoke expansion and -result in something you were not expecting. - -

    -A simple example: - -

    - - - -
    - If Def InCoda -
      5 Cm -
      6 / -
    -Endif
    - -
    - -

    -The other tests are binary (they take two arguments): - -

    -

    -
    LT Str1 Str2
    -
    Returns true if Str1 is less than - Str2. (Please see the discussion below on how the tests are - done.) - -

    -

    -
    LE Str1 Str2
    -
    Returns true if str1 is less than or equal - to Str2. - -

    -

    -
    EQ Str1 Str2
    -
    Returns true if str1 is equal to - Str2. - -

    -

    -
    NE Str1 Str2
    -
    Returns true if str1 is not equal to - Str2. - -

    -

    -
    GT Str1 Str2
    -
    Returns true if str1 is greater than - Str2. - -

    -

    -
    GE Str1 Str2
    -
    Returns true if str1 is greater than or - equal to Str2. - -

    -

    -
    - -

    -In the above tests you have several choices in specifying Str1 -and Str2. At some point, when -MMA does the actual comparison, -two strings or numeric values are expected. So, you really could do: - -

    - - - -
    - If EQ abc ABC - -
    - -

    -and get a ``true'' result. The reason that ``abc'' equals ``ABC'' is -that all the comparisons in -MMA are case-insensitive. - -

    -You can also compare a variable to a string: - -

    - - - -
    - If GT $foo abc - -
    - -

    -will evaluate to ``true'' if the contents of the variable -``foo'' evaluates to something ``greater than'' ``abc''. But, there is -a bit of a ``gotcha' here. If you have set ``foo'' to a two word -string, then -MMA will choke on the command. In the following -example: - -

    - - - -
    - Set Foo A B -
    -If GT $Foo abc
    - -
    - -

    -the comparison is passed the line: - -

    - - - -
    - If GT A B abc - -
    - -

    -and -MMA seeing three arguments generates an error. If you want the -comparison done on a variable which might be more than one word, use -the ``$$'' syntax. This delays the expansion of the variable until -the IF directive is entered. So: - -

    - - - -
    - If $$foo abc - -
    - -

    -would generate a comparison between ``A B'' and ``ABC''. - -

    -Delayed expansion can be applied to either variable. It only works in -an IF directive. - -

    -Strings and numeric values can be confusing in comparisons. For -example, if you have the strings ``22'' and ''3'' and compare them as -strings, ``3'' is greater than ``22''; however, if you compare them as -values then 3 is less than 22. - -

    -The rule in -MMA is quite simple: If either string in a comparison is -a numeric value, both strings are converted to values. Otherwise they -are compared as strings.18.3 -

    -This lets you do consistent comparisons in situations like: - -

    - - - -
    - Set Count 1 -
    -If LE $$Count 4 -
      .... -
    -IfEnd
    - -
    - -

    -Note that the above example could have used ``$Count'', but you -should probably always use the ``$$'' in tests. - -

    -Much like other programming languages, an optional ELSE -condition may be used: - -

    - - - -
    - If Def Coda -
      Groove Rhumba1 -
    -Else -
      Groove Rhumba -
    -Endif
    - -
    - -

    -The ELSE statement(s) are processed only if the test for the -IF test is false. - -

    -Nesting of IFs is permitted: - -

    - - - -
    - If ndef Foo -
      Print Foo has been defined. -
    -Else -
      If def bar -
        Print bar has been defined. Cool. -
      Else -
        Print no bar...go thirsty. -
      Endif -
    -Endif
    - -
    - -

    -works just fine. Indentation has been used in these examples to clearly -show the nesting and conditions. You should do the same. - -

    - -

    -Goto -

    - -

    -The GOTO command redirects the execution order of your script to -the point at which a LABEL or line number has been defined. There are really -two parts to this: - -

    - -

      -
    1. A command defining a label, and, - -

      -

    2. -
    3. The GOTO command. - -

      -

    4. -
    - -

    - -

    -A label is set with the LABEL directive: - -

    - - - -
    - Label Point1 - -
    - -

    -The string defining the label can be any sequence of characters. -Labels are case-insensitive. - -

    -To make this look a lot more line those old BASIC progams, any lines -starting with a line number are considered to be label lines as -well. - -

    -A few considerations on labels and linenumbers: - -

    - -

      -
    • A duplicate label generated with a LABEL command will - generate an error. - -

      -

    • -
    • A line number label duplicating a LABEL is an error. - -

      -

    • -
    • A LABEL duplicating a line number is an error. - -

      -

    • -
    • Duplicate line numbers are permitted. The last one encountered - will be the one used. - -

      -

    • -
    • All label points are generated when the file is opened, not as it is - parsed. - -

      -

    • -
    • Line numbers (really, just comments) do not need to be in any - order. - -

      -

    • -
    - -

    - -

    -The command: - -

    - - - -
    - Goto Point1 - -
    - -

    -causes an immediate jump to a new point in the file. If you are -currently in repeat or conditional segment of the file, the remaining -lines in that segment will be ignored. - -

    - -MMA does not check to see if you are jumping into a repeat or -conditional section of code--but doing so will usually cause an -error. Jumping out of these sections is usually safe. - -

    -The following example shows the use of both types of label. In this -example only lines 2, 3, 5 and 6 will be processed. - -

    - - - -
    - Goto Foo -
    -1 Cm -
    -Label Foo -
    -2 Dm -
    -3 / -
    -Goto 5 -
    -4 Am -
    -5 Cm -
    -6 Dm
    - -
    - -

    -For an example of how to use some simple labels to simulate a ``DS al -Coda'' examine the file ``lullaby-of-Broadway'' in the sample songs -directory. +There must be one REPEATEND or ENDREPEAT for every +REPEAT. Any number of REPEATENDINGs can be included +before the REPEATEND.


    Footnotes

    -
    ... macros.18.1
    -
    The values - are dynamically created and reflect the current settings, and may - not be exactly the same as the value you originally set due to - internal roundings, etc. +
    ...ENDREPEAT18.1
    +
    The reason for both + ENDREPEAT and REPEATEND is to match IFEND and + ENDIF.
    -
    ...IFEND18.2
    -
    -MMA 's author probably suffers - from mild dyslexia and can't remember if the command is IFEND or - ENDIF, so both are permitted. Use whichever is more comfortable for - you. - -
    -
    ... strings.18.3
    -
    An attempt is made to convert each - string to a float. If conversion of both strings is successful, the - comparison is made between two floats, otherwise two strings are - used. - -
    -

    + +
    bob -2007-03-07 +2008-09-28
    diff --git a/mma/docs/html/ref/node19.html b/mma/docs/html/ref/node19.html index 5f92dfa..703ee32 100644 --- a/mma/docs/html/ref/node19.html +++ b/mma/docs/html/ref/node19.html @@ -1,4 +1,4 @@ - + -Low Level MIDI Commands - +Variables, Conditionals and Jumps + @@ -25,365 +25,987 @@ original version by: Nikos Drakos, CBLU, University of Leeds - - + next - up - previous
    - Next: Fine Tuning (Translations) - Up: Next: Low Level MIDI Commands + Up: Reference Manual - Previous: Variables, Conditionals and Jumps -
    + Previous: Repeats
    +
    Subsections +

    -processes the file test2.1 and creates -the MIDI file test.mid. +processes the file test2.1 and creates +the MIDI file test.mid. + +

    +When +MMA is finished it displays the name of the generated file, the +number of bars of music processed and an estimate of the song's +duration. Note: + +

      +
    • The duration is fairly accurate, but it does not +take into account any mid-bar TEMPO changes. +
    • +
    • The report shows minutes and hundredths of + minutes. This is done deliberately so that you can add a number of + times together. Converting the time to minutes and seconds is left + as an exercise for the user. +
    • +

    @@ -98,10 +116,10 @@ The following command line options are available:

    - - + + - + @@ -117,7 +135,7 @@ The following command line options are available: + HREF="#foot786">2.2 - +
    OptionDescription
    OptionDescription
    +
    Debugging and other @@ -109,7 +127,7 @@ The following command line options are available:
    -
    -v Show program's version number and exit.
    -d Enable LOTS of debugging messages. This option is mainly designed for program development and may not be useful to users.2.2
    -o A debug subset. This option forces the display of complete @@ -176,16 +194,16 @@ This makes perfect sense if you remember that the same line assignments after processing the input file. No output is generated.
    +
    Commands which modify -MMA 's behaviour. +MMA 's behavior.
    -
    -S Set a macro. If a value is needed, join the value to the name @@ -201,7 +219,7 @@ This makes perfect sense if you remember that the same line

    -will process the file myfile.mma with the variable $Tempo +will process the file myfile.mma with the variable $Tempo set with the value ``120''. You need not specify a value:

    @@ -220,25 +238,46 @@ just sets the variable $test with no value. Disable generation of MIDI output. This is useful for doing a test run or to check for syntax errors in your script. --mBARS +-m BARS Set the maximum number of bars which can be generated. The default setting is 500 bars (a long song!2.3). This setting is + HREF="#foot712">2.3). This setting is needed since you can create infinite loops by improper use of the GOTO command. If your song really is longer than 500 bars use this option to increase the permitted size. --Mx +-M x Generate type 0 or 1 MIDI files. The parameter ``x'' must be set to the single digit ``0'' or ''1''. For more details, see the - MIDISMF section here. + MIDISMF section here. + +-P +Play and delete MIDI file. Useful in testing, the generated + file will be played with the defined MIDI file player (see section + here). The file is created + in the current directory and has the name ``MMAtmpXXX.mid'' with + ``XXX'' set to the current PID. + + +

    +-T TRACKS +Generate only data for the tracks specified. The + tracks argument is a list of comma separated track names. For + example, the command ``mma mysong -T drum,chord'' will limit the + output to the Drum-HH and Chord tracks. This is useful in + separating tracks for multi-track recording. -0 -Generate a syncronization tick at the start of every MIDI - track. This is a one tick note on/off event at offset 0. It can be - useful in multi-track syncronization. +Generate a synchronization tick at the start of every MIDI + track. Note that the option character is a ``zero'', not a ``O''. For + more details see SYNCHRONIZE, here. - +-1 +Force all tracks to end at the same offset. Note that the + option character is a ``one'', not an ``L''. For more details see SYNCHRONIZE, + here. + +
    Maintaining @@ -246,7 +285,7 @@ just sets the variable $test with no value.
    - +

    @@ -255,10 +294,10 @@ just sets the variable $test with no value. LIBPATH. You should run this command after installing new library files or adding a new groove to an existing library file. If the database (stored in the files in each library under the name - .mmaDB) is not updated, + .mmaDB) is not updated, MMA will not be able to auto-load an unknown groove. Please refer to the detailed discussion - here for details. + here for details.


    @@ -276,9 +315,9 @@ The current installation of

    MMA will update the groove database with all files in the - current LIBPATH. All files must have a ``.mma'' - extension. Any directory containing a file named MMAIGNORE - will be ignored. Note, that MMAIGNORE consists of all + current LIBPATH. All files must have a ``.mma'' + extension. Any directory containing a file named MMAIGNORE + will be ignored. Note, that MMAIGNORE consists of all uppercase letters and is usually an empty file. -G @@ -286,29 +325,29 @@ The current installation of forces the creation of a new database file--an update from scratch just in case something really goes wrong. - +
    File commands.
    - +

    -i Specify the RC file to use. See -details here. + details here.

    --fFILE +-f FILE Set output to FILE. Normally the output is sent to a file with the name of the input file with the extension ``.mid'' appended - to it. This option lets you set the output MIDI file to any filename. + to it. This option lets you set the output MIDI file to any file name. - +
    The following commands @@ -317,20 +356,25 @@ The current installation of
    - +
    --Dk +-Dk Print list of MMA keywords. For editor extension writers. --Dxl +-Dxl Expand and print DOC commands used to generate the standard library reference for Latex processing. No MIDI output is generated when this command is given. Doc strings in RC files are not processed. Files included in other files are processed. --Dxh -Same as -Dxl, but generates HTML output. Used by the mklibdoc.py tool. +-Dxh +Same as -Dxl, but generates HTML output. Used by the mklibdoc.py tool. + +-Dv +Displays verbose information about the currently defined + grooves, sequences and patterns. This information could be used to + display (graphically) the different patterns in a file. @@ -353,7 +397,7 @@ line to create a longer line.

    Unless otherwise noted in this manual, the various parts of a line are -delimited from each other by runs of whitespace. Whitespace can be tab +delimited from each other by runs of white space. White space can be tab characters or spaces. Other characters may work, but that is not recommended, and is really determined by Python's definitions. @@ -367,77 +411,81 @@ Programming Comments MMA is designed to read and write files; it is not a filter.2.4 + HREF="#foot793">2.4

    As noted earlier in this manual, MMA has been written entirely in Python.There were some initial concerns about the speed of a ``scripting language'' when the project was started, but Python's -speed appears to be entirely acceptable. On an AMD Athlon 1900+ system -running Mandrake Linux 10.1, most of songs compile to MIDI in well +speed appears to be entirely acceptable. On my long-retired AMD Athlon 1900+ system +running Mandrake Linux 10.1, most songs compiled to MIDI in well under one second. If you need faster results, you're welcome to recode this program into C or C++, but it would be cheaper to buy a faster system, or spend a bit of time tweaking some of the more time intensive Python loops.

    -I've done a bit of testing with Psyco http://psyco.sourceforge.net/ and have found speed increases in the order of 15% to 20%. Output seems fine, so use it if speed is important to you. +If you have Psyco, http://psyco.sourceforge.net/, installed + +MMA will attempt to install the correct module. This will speed +up a compilation by about 30%.



    Footnotes

    -
    ...test2.1
    -
    Actually, the file test - or test.mma is processed. Please read section - file extensions. +
    ... CLASS="textbf">test2.1
    +
    Actually, the file test + or test.mma is processed. Please read section + file extensions.
    -
    ... users.2.2
    +
    ... users.2.2
    A number of the debugging commands can also be set dynamically in a - song. See the debug section here + song. See the debug section here for details.
    -
    ... song!2.3
    +
    ... song!2.3
    500 bars with 4 beats per bar at 200 BPM is about 10 minutes.
    -
    ... +
    ... filter.2.4
    + HREF="node2.html#tex2html13">2.4
    A filter mode could be added to MMA , but I'm not - sure why this would be needed). + sure why this would be needed.
    -

    + +
    bob -2007-03-07 +2008-09-28
    diff --git a/mma/docs/html/ref/node20.html b/mma/docs/html/ref/node20.html index a16232f..d86e31c 100644 --- a/mma/docs/html/ref/node20.html +++ b/mma/docs/html/ref/node20.html @@ -1,4 +1,4 @@ - + -Fine Tuning (Translations) - +Low Level MIDI Commands + @@ -25,515 +25,1653 @@ original version by: Nikos Drakos, CBLU, University of Leeds - - + next - up - previous
    - Next: Other Commands and Directives - Up: Next: Patch Management + Up: Reference Manual - Previous: Low Level MIDI Commands -
    + Previous: Variables, Conditionals and Jumps
    +
    Subsections +

    - +
    -Fine Tuning (Translations) +Low Level MIDI Commands

    -A program such as -MMA which is intended to be run of various -computers and synthesizers (both hardware keyboards and software -versions) suffers from a minor deficency of the MIDI standards: mainly -that the standard says nothing about what a certain instrument should -sound like, or the relative volumes between instruments. The GM -extension helps a bit, but only a bit, by saying that certain -instruments should be assigned certain program change values. This -means that all GM synths will play a "Piano" if instrument 000 is -selected. +The commands discussed in this chapter directly effect your MIDI +output devices.

    -But, if one plays a GM file on a Casio keyboard, then on PC -soft-synth, and then on a Yahama keyboard you will get three quite -different sounds. The files supplied in this distribution have been -created to sound good on the author's setup: A Casio WK-3000 keyboard. - -

    -But, what if your hardware is different? Well, there are solutions! -Later in this chapter commands are shown which will change the -preselected voice and tone commands and the default volumes. At this -time there are no example files supplied with -MMA , but your -contributions are welcome. - -

    -The general suggestion is that: +Not all MIDI devices are equal. Many of the effects in this chapter +may be ignored by your devices. Sorry, but that's just the way MIDI +is.

    -

      -
    1. You create a file with the various translations you need. For - example, the file might be called yamaha.mma and contain - lines like: +

      +
      +Channel +

      + +

      +As noted in Tracks and Channels +MMA assigns MIDI channels +dynamically as it creates tracks. In most cases this works fine; +however, you can if you wish force the assignment of a specific MIDI +channel to a track with the CHANNEL command. + +

      +You cannot assign a channel number to a track if it already defined +(well, see the section CHSHARE, below, for the inevitable +exception), nor can you change the channel assignments for any of the +DRUM tracks. + +

      +Let us assume that you want the Bass track assigned to MIDI +channel 8. Simply use:

      - VoiceTR Piano1=Piano2 -
      -ToneTr SnareDrum2=SnareDrum1 -
      -VoiceVolTr Piano2=120 BottleBlow=80 -
      -DrumVolTr RideBell=90 Tambourine=120
      + Bass Channel 8

      -Place this file in the directory /usr/local/share/mma/includes. +Caution: If the selected channel is already in use an error will be +generated. Due to the way +MMA allocates tracks, if you really need +to manually assign track it is recommended that you do this in a +MMARC file.

      -

    2. -
    3. Include this file in your ~/.mmarc file. Following the - above example, you would have a line: + +

      +You can disable a channel at any time by using a channel number of 0:

      - Include yamaha + Arpeggio-1 Channel 0

      -

    4. -
    +will disable the Arpeggio-1 channel, freeing it for use by other +tracks. A warning message is generated. Disabling a track without a +valid channel is fine. When you set a channel to 0 the track is also +disabled. You can restart the track with the ON command +(here).

    -That's it! Now, whenever you compile a -MMA file the translations -will be done. +You don't need to have a valid MIDI channel assigned to a track to do +things like: MIDIPAN, MIDIGLIS, MIDIVOLUME or +even the assignment of any music to a track. MIDI data is created in +tracks and then sent out to the MIDI buffers. Channel assignment is +checked and allocated at this point, and an error will be generated if +no channels are available.

    -All of the following translation settings follow a similar logic as to ``when'' -they take effect, and that is at the time the VOICE, -VOLUME, etc. command is issued. This may confuse the unwary if -GROOVES are being used. But, the following sequence: +It's quite acceptable to do channel reassignments in the middle of a +song. Just assign channel 0 to the unneeded track first.

    - - -
    - -
      -
    1. You set a voice with the VOICE command, -
    2. -
    3. You save that voice into a GROOVE with DEFGROOVE, -
    4. -
    5. You create a voice translation with VOICETR, -
    6. -
    7. You activate the previously defined GROOVE. -
    8. -
    - - - -
    Wrong!
    - -

    -does not have the desired effect. In the above sequence the -VOICETR will have no effect. For the desired -translations to work the VOICE (or whatever) command must come -after the translation command. +MIDI channel settings are not saved in GROOVEs.

    -

    -
    -VoiceTr +MMA inserts a MIDI ``track name'' meta event when the channel +buffers are first assigned at a MIDI offset of 0. If the MIDI channel +is reassigned, a new ``track name'' is inserted at the current song +offset. + +

    +A more general method is to use CHANNELPREF detailed below. + +

    +You can access the currently assigned channel with the +$_TRACK_CHANNEL macro. + +

    + +

    +ChannelPref

    -In previous section you saw how to set a voice for a track by using its -standard MIDI name. The VOICETR command sets up a translation -table that can be used in two different situations: +If you prefer to have certain tracks assigned to certain channels you +can use the CHANNELPREF command to create a custom set of +preferences. By default, +MMA assigns channels starting at 16 and +working down to 1 (with the expectation of drum tracks which are all +assigned channel 10). If, for example, you would like the Bass +track to be on channel 9, sustained bass on channel 3, and +Arpeggio on channel 5, you can have a command like:

    + + +
    + ChannelPref Bass=9 Arpeggio=5 Bass-Sus=3 + +
    + +

    +Most likely this will be in your MMARC file. + +

    +You can use multiple command lines, or have multiple assignments on a +single line. Just make sure that each item consists of a trackname, an +``='' and a channel number in the range 1 to 16. + +

    + +

    +
    +ChShare +

    + +

    + +MMA is fairly conservative in its use of MIDI tracks. ``Out of the +box'' it demands a separate MIDI channel for each of its tracks, but +only as they are actually used. In most cases, this works just fine. + +

    +However, there are times when you might need more tracks than the +available MIDI channels or you may want to free up some channels for +other programs. + +

    +If you have different tracks with the same voicing, it's quite simple. +For example, you might have an arpeggio and scale track: + +

    + + + +
    + Arpeggio Sequence A16 z +
    +Arpeggio Voice Piano1 +
    +Scale Sequence z S8 +
    +Scale Voice Piano1
    + +
    + +

    +In this example, +MMA will use different MIDI channels for the +Arpeggio and the Scale. Now, if you force channel +sharing: + +

    + + + +
    + Scale ChShare Arpeggio + +
    + +

    +both tracks will use the same MIDI channel. + +

    +This is really foolproof in the above example, especially since the +same voice is being used for both. Now, what if you wanted to use a +different voice for the tracks? + +

    + + + +
    + Arpeggio Sequence A16 z +
    +Arpeggio Voice Piano1 Strings +
    +Scale Sequence z S8 +
    +Scale ChShare Arpeggio
    + +
    + +

    +You might think that this would work, but it doesn't. +MMA ignores +voice changes for bars which don't have a sequence, so it will set +``Piano1'' for the first bar, then ``Strings'' for the second (so far, +so good). But, when it does the third bar (an ARPEGGIO) it will +not know that the voice has been changed to ``Strings'' by the +Scale track. + +

    +So, the general rule for track channel sharing is to use only one +voice. + +

    +One more example which doesn't work: + +

    + + + +
    + Arpeggio Sequence A8 +
    +Scale Sequence S4 +
    +Arpeggio Voice Piano1 +
    +Scale Voice Piano1 +
    +Scale ChShare Arpeggio
    + +
    + +

    +This example has an active scale and arpeggio sequence in each +bar. Since both use the same voice, you may think that it will work +just fine ...but it may not. The problem here is that +MMA will +generate MIDI on and off events which may overlap each other. One or +the other will be truncated. If you are using a different octave, it +will work much better. It may sound okay, but you should probably find +a better way to do this. + +

    +When a CHSHARE directive is parsed the ``shared'' channel is +first checked to ensure that it has been assigned. If not currently +assigned, the assignment is first done. What this means is that you +are subverting +MMA 's normal dynamic channel allocation scheme. This +may cause is a depletion of available channels. + +

    +Please note that that the use of the CHSHARE command is +probably never really needed, so it might have more problems than +outlined here. If you want to see how much a bother channel sharing +becomes, have a look at the standard library file +frenchwaltz.mma. All this so the accordion bass can use one +channel instead of 6. If I were to write it again I'd just let it suck +up the MIDI channels. + +

    +For another, simpler, way of reassigning MIDI tracks and letting +MMA do most of the work for you, refer to the +DELETE command. + +

    + +

    +ForceOut +

    + +

    +Under normal conditions +MMA only generates the MIDI tracks it thinks +are valid or relevant. So, if you create a track but insert no note +data into that track it will not be generated. An easy way to verify +this is by creating file and running +MMA with the -c command line +option. Lets start off by creating a file you might think will set the +keyboard channel on your synth to a TenorSax voice: + +

    + + + +
    + Begin Solo-Keyboard +
      Channel 1 +
      Voice TenorSax +
      MIDIVolume 100 +
    +End
    + +
    + +

    +If you compile this you should get: + +

    + + + +
    + $ mma test -c +
       +
    +File 'test' parsed, but no MIDI file produced! +
      +
    +Tracks allocated: +
     SOLO-KEYBOARD +
      +
    +Channel assignments: +
    +1 SOLO-KEYBOARD +
    + +
    + +

    +So, a +MMA track was created, but if you compile this file and +examine the resulting MIDI file you will find that the voice has + not been set. + +

    +To overcome this, insert the FORCEOUT command at the end of the +track setup. For example, here is a more complete file which will set +the keyboard track to TenorSax with a volume of 100, play a bar of +accompaniment, set a Trumpet voice with a louder volume, play another +bar, and finally reset the keyboard to the default Piano voice. + +

    + + + +
    + Groove BossaNova +
      +
    +Begin Solo +
      Channel 1 +
      Voice TenorSax +
      MIDIVolume 100 +
      ForceOut +
    +End +
      +
    +1 C +
      +
    +Begin Solo +
      Voice Trumpet +
      MIDIVolume 120 +
      ForceOut +
    +End +
      +
    +2 G +
      +
    +Begin Solo +
      Voice Piano1 +
      MIDIVolume 127 +
      ForceOut +
    +End +
    + +
    + +

    +Note: The same or similar results could be accomplished with the +MIDI command; however, it's a bit harder to use and the +commands would be in the Meta track. + +

    + +

    + +
    +MIDI +

    + +

    +The complete set of MIDI commands is not limitless--but from this end +it seems that adding commands to suit every possible configuration is +never-ending. So, in an attempt to satisfy everyone, a command which +will place any arbitrary MIDI stream in your tracks has been +implemented. In most cases this will be a MIDI ``Sysex'' or ``Meta'' +event. + +

    +For example, you might want to start a song off with a MIDI reset: + +

    + + + +
    + MIDI 0xF0 0x05 0x7e 0x7f 0x09 0x01 0xf7 + +
    + +

    +The values passed to the MIDI command are normal integers; however, +they must all be in the range of 0x00 to 0xff. In most cases it is +easiest to use hexadecimal numbers by using the ``0x'' prefix. But, +you can use plain decimal integers if you prefer. + +

    +In the above example: + +

    +

    +
      0xF0
    +
    Designates a SYSEX message + +

    +

    +
      0x05
    +
    The length of the message + +

    +

    +
      0x7e
    +
    ...The actual message + +

    +

    +
    + +

    +Another example places the key signature of F major (1 flat) in the +meta track:20.1 +

    + + + +
    + MIDI 0xff 0x59 0x02 0xff 0x00 + +
    + +

    +Some cautions: +

      -
    • It permits creation of your own names for voices (perhaps for a - foreign language), +
    • +MMA makes no attempt to verify the validity of the data!

    • -
    • It lets you override or change voices used in standard library +
    • The ``Length'' field must be manually calculated. + +

      +

    • +
    • Malformed sequences can create non-playable MIDI files. In extreme + situations, these might even damage your synth. You are on your own + with this command ...be careful. + +

      +

    • +
    • The MIDI directive always places data in the Meta + track at the current time offset into the file. This should not be a + problem. + +

      +

    • +
    + +

    +Cautions aside, includes/init.mma has been included in this +distribution. I use this without apparent problems; to use it add the +command line: + +

    + + + +
    + MMAstart init + +
    + +

    +in your MMARC file. The file is pretty well commented and it +sets a synth up to something reasonably sane. + +

    +If you need a brief delay after a raw MIDI command, it is possible to +insert a silent beat with the BEATADJUST + command. See +the file includes/reset.mma for an example. + +

    + +

    +
    +MIDIClear +

    + +

    +As noted earlier in this manual you should be very careful in +programming MIDI sequences into your song and/or library files. Doing +damage to a synthesizer is probably a remote possibility ...but +leaving it in a unexpected mode is likely. For this reason the +MIDICLEAR command has been added as a companion to the +MIDIVOICE and MIDISEQ commands. + +

    +Each time a MIDI track (not necessary the same as a +MMA track) is +ended or a new GROOVE is started, a check is done to see if any +MIDI data has been inserted in the track with a MIDIVOICE or +MIDISEQ command. If it has, a further check is done to see if +there is an ``undo'' sequence defined via a MIDICLEAR command. +That data is then sent; or, if data has not be defined for the track, +a warning message is displayed. + +

    +The MIDICLEAR command uses the same syntax as MIDIVOICE +and MIDISEQ; however, you can not specify different sequence +for different bars in the sequence: + +

    + + + +
    + Bass-Funky MIDIClear 1 Modulation 0; 1 ReleaseTime 0 + +
    + +

    +As in MIDIVOICE and MIDISEQ you can include sequences +defined in a MIDIDEF. The <beat>offsets +are required, but ignored. + +

    + +

    +
    +MIDIFile +

    + +

    +This option controls some fine points of the generated MIDI file. The +command is issued with a series of parameters in the form +``MODE=VALUE''. You can have multiple settings in a single +MIDIFILE command. + +

    + +MMA can generate two types of SMF (Standard MIDI Files): +

    +
    0.
    +
    This file contains only one track into which the data for + all the different channel tracks has been merged. A number of synths + which accept SMF (Casio, Yamaha and others) only accept type 0 files.

    -

  • - + +
    1.
    +
    This file has the data for each MIDI channel in its own + track. This is the default file generated by +MMA .

    -VOICETR works by setting up a simple translation table of -``name'' and ``alias'' pairs. Whenever -MMA encounters a voice name -in a track command it first attempts to translate this name though the -alias table. +

    +

    -To set a translation (or series of translations): +You can set the filetype in an RC file (or, for that matter, in any +file processed by +MMA ) with the command:

    - VoiceTr Piano1=Clavinet Hmmm=18 + MidiFile SMF=0

    -Note that you additional VOICETR commands will add entries to -the existing table. To clear the table use the command with no -arguments: +or

    - VoiceTr // Empty table + MidiFile SMF=1

    -Assuming the first command, the following will occur: +You can also set it on the command line with the -M option. Using the +command line option will override the MIDISMF command if it is +in a RC file. + +

    +By default +MMA uses ``running status'' when generating MIDI files. +This can be disabled with the command:

    - Chord-Main Voice Hmmm + MidiFile Running=0

    -The VOICE for the Chord-Main track will be set to ``18'' -or ``Organ3''. +or enabled (but this is the default) with:

    - Chord-2 Voice Piano1 + MidiFile Running=1

    -The VOICE for the Chord-2 track will be set to -``Clavinet''. - -

    -If your synth does not follow standard GM-MIDI voice naming -conventions you can create a translation table which can be included -in all your -MMA song files via an RC file. But, do note that the -resulting files will not play properly on a synth conforming to the -GM-MIDI specification. - -

    -Following is an abbreviated and untested example for using an obsolete and unnamed synth: +Files generated without running status will be about 20 to 30% larger +than their compressed counterparts. They may be useful for use with +brain-dead sequencers and in debugging generated code. There is no +command line equivalent for this option.

    - - -
    - VoiceTr Piano1=3 \ -
    -Piano2=4 \ -
    -Piano3=5 \ -
    ... \ -
    -Strings=55 \ -
    ...
    - -
    - -

    -Notes: the translation is only done one time and no verification is -done when the table is created. - -

    -For translating drum tone values, see -DRUMTR. - -

    - -

    -
    -DrumTr +

    +MIDIGlis

    -It is possible to create a translation table which will substitute one -Drum Tone for another. This can be useful in a variety of -situations, but consider: +This sets the MIDI portamento20.2 (in case you're new to all this, portamento is like +glissando between notes--wonderful, if you like trombones! To enable +portamento: + +

    + + + +
    + Arpeggio MIDIGlis 30 + +
    + +

    +The parameter can be any value between 1 and 127. To turn the sliding +off: + +

    + + + +
    + Arpeggio MIDIGlis 0 + +
    + +

    +This command will work with any track (including drum tracks). +However, the results may be somewhat ``interesting'' or +``disappointing'', and many MIDI devices don't support portamento at +all. So, be cautious. The data generated is not sent into the MIDI +stream until musical data is created for the relevant MIDI channel. + +

    + +

    +MIDIInc +

    + +

    + +MMA has the ability to include a user supplied MIDI file at any +point of its generated files. These included files can be used to play +a melodic solo over a +MMA pattern or to fill a section of a song +with something like a drum solo. + +

    +When the MIDIINC command is encountered the current line is +parsed for options, the file is inserted into the stored MIDI stream, +and processing continues. The include has no effect on any song +pointers, etc. + +

    +MIDIINC has a number of options, all set in the form +OPTION=VALUE. Following are the recognized options: + +

    +

    +
    FILENAME
    +
    The filename of the file to be included. This must be + a complete filename. The filename will be expanded by the Python + os.path.expanduser() function for tilde expansion. No prefixes or + extensions are added by +MMA . Examples: + FILENAME=/home/bob/midi/myfile.mid. or + FILENAME= /sounds/myfile.mid. + +

    +

    +
    VOLUME
    +
    An adjustment for the volume of all the note on events + in the included MIDI file. The adjustment is specified as a + percentage with values under 100 decreasing the volume and over 100 + increasing it. If the resultant volume (velocity) is less than 1 a + velocity of 1 will be used; if it is over 127, 127 will be + used. Example: VOLUME=80. + +

    +

    +
    OCTAVE
    +
    Octave adjustment for all notes in the file. Values in + the range -4 to 4 are permitted. Notes in drum tracks (channel 10) + will not be effected. Example: OCTAVE=2. + +

    +

    +
    TRANSPOSE
    +
    Transposition adjustment settings in the range -24 to + 24 are permitted. If you do not set a value for this the global + transpose setting will be applied (expecting channel 10, drum, + notes). Example: TRANSPOSE=-2. + +

    +

    +
    LYRIC
    +
    This option will copy any Lyric events to the + +MMA meta track. The valid settings are ``On'' or ``Off''. By + default this is set to ``Off''. Example LYRIC=On. + +

    +

    +
    TEXT
    +
    This option will copy any Text events to the +MMA meta track. The valid settings are ``On'' or ``Off''. By default + this is set to ``Off''. Example TEXT=On. + +

    +

    +
    START
    +
    Specifies the start point of the file to be + included in beats. For example, ``Start=22'' would start the + include process 22 beats into the file. The data will be inserted at + the current song position in your MMA file. The value used must + greater or equal to 0 and may be a fractional beat value (18.456 if + fine). + +

    +

    +
    END
    +
    Specifies the end point of the file to be included + in beats. For example, ``End=100'' would discard all data after 100 + beats in the file. The value used must be greater that the + Start position and can be fractional. + +

    +

    +
    TRACK
    +
    A trackname must be set into which notes + are inserted. You can set more than one track/channel if you + wish. For example, if you had the option DRUM=10 any notes in + the MIDI file with a channel 10 setting would be inserted into the + +MMA Drum track. Similarity, Solo-Tenor=1 will copy + notes from channel 1 into the Solo-Tenor track. If the track + doesn't exist, it will be created. Note: this means that the channel + assignment in your included file and the new +MMA generated file + will most likely be different. + +

    +At least one TRACK option is required to include a MIDI + file. It is up to the user to examine existing MIDI files to + determine the tracks being used and which to include into +MMA 's + output. + +

    +

    +
    + +

    +A complete example of usage is shown in the files in the directory +egs/frankie in the distribution. A short example: + +

    + + + +
    + MIDIinc File=test.mid Solo-Piano=1 Drum=10 Volume=70 + +
    + +

    +will include the MIDI file ``test.mid'' at the current position and +assign all notes in channel 1 to the Solo-Piano track and the +notes from channel 10 to the Drum track. The volumes for all +the notes will be adjusted to 70% of that in the original. + +

    +A few notes:

      -
    • Your syth lacks certain drum tones--in this case you may want - to set certain DRUMTR commands in a MMARC file. +
    • MIDI files to be included do not have to have the same tempo. + MIDIINC adjusts this automatically during the importation. + However, the internal setting for beat division should be the same. + +MMA assumes a beat division of 192 (this is set in bytes 12 and 13 + of the MIDI file). If the included file differs a warning is printed + and +MMA will attempt to adjust the timings.

    • -
    • You are using an existing GROOVE in a song, but don't - like one or more of the Drum Tones selected. Rather than - editing the library file you can set a translation right in the - song. Note, do this before any GROOVE commands. +
    • All files are parsed to find the offset of the first note-on + event; notes to be included are set with their offsets compensated + by that time. This means that any silence at the start of the + included file is skipped (this may surprise you if you have used the + optional Start setting). If you want the included file to + start somewhere besides the start of the current bar you can use a + BEATADJUST before the MIDIINC--use another to move + the pointer back right after the include to keep the song pointer + correct. + +

      +

    • +
    • Not all events in the included files are transferred: notably + all system and meta events (other than text and lyric, see above) + are ignored. + +

      +

    • +
    • If you want to apply different VOLUME or other options to + different tracks, just do multiple includes of the same file (with + each include using a different track and options). + +

    -To set a translation (or set of translations) just use a list of -drumtone values or symbolic names with each pair separated by -white space. For example: -

    - - - -
    - ToneTR SnareDrum2=SnareDrum1 HandClap=44 - -
    - -

    -will use a ``SnareDrum1'' instead of a ``SnareDrum2'' and the value -``44'' (actually a ``PedalHiHat'') instead of a ``HandClap''. - -

    -You can turn off all drum tone translations with an empty line: - -

    - - - -
    - ToneTR - -
    - -

    -The syntax and usage of DRUMTR is quite similar to -VOICETR. - -

    - -

    -
    -VoiceVolTr +

    +MIDIMark

    -If you find that a particular voice, i.e., Piano2, is too loud or soft -you can create an entry in the ``Voice Volume Translation Table''. The -concept is quite simple: -MMA checks the table whenever a -track-specific VOLUME command is processed. The table is -created in a similar manner to the VOICETR command: +You can insert a MIDI Marker event into the Meta track with this +command. The mark can be useful in debugging your MIDI output with a +sequencer or editor which supports Mark events (most do).

    - VoiceVolTr Piano2=120 105=75 + MidiMark Label

    -Each voice pair must contain a valid MIDI voice (or numeric value), -an ``='' and a volume adjustment factor. The factor is a percentage -value which is applied to the normal volume. In the above example two -adjustments are created: +will insert the text ``Label'' at the current position. You can add an +optional negative or positive offset in beats: + +

    + + + +
    + MidiMark 2 Label4 + +
    + +

    +will insert ``Label4'' 2 beats into the next bar. + +

    + +

    +MIDIPan +

    + +

    +In MIDI-speak ``pan'' is the same as ``balance'' on a stereo. By +adjusting the MIDIPAN for a track you can direct the output to +the left, right or both speakers. Example: + +

    + + + +
    + Bass MIDIPan 4 + +
    + +

    +This command is only available in track mode. The data generated is +not sent into the MIDI stream until musical data is created for the +relevant MIDI channel. + +

    +The value specified must be in the range 0 to 127, and must be an +integer. + +

    +A variation for this command is to have the pan value change over a +range of beats: + +

    + + + +
    + Solo MidiPan 10 120 4 + +
    + +

    +in this case you must give exactly 3 arguments:

      -
    1. Piano2 will be played at %120 of the normal value, - -

      +

    2. The initial pan value (0 to 127),
    3. -
    4. Banjo (voice 105) will be played at %75 of the normal value. +
    5. The final pan value (0 to 127), +
    6. +
    7. The number of beats to apply the pan over.

    -The adjustments are made when a track VOLUME command is -encountered. For example, if the above translation has be set and +Using a beat count you can create interesting effects with different +instruments moving between the left and right channels. -MMA encounters the following commands: +

    +MIDIPAN is not saved or restored by GROOVE commands, nor +is it effected by SEQCLEAR. A MIDIPAN is inserted +directly into the MIDI track at the point at which it is encountered +in the music file. This means that the effect of MIDIPAN will +be in use until another MIDIPAN is encountered. +

    +MIDIPAN can be used in MIDI compositions to emulate the sound +of an orchestra. By assigning different values to different groups of +instruments, you can get the feeling of strings, horns, etc. all +placed in the ``correct'' position on the stage. + +

    +MIDIPAN can be used for much cruder purposes. When creating +accompaniment tracks for a mythical jazz group, you might set all the +bass tracks (Bass, Walk, Bass-1, etc) set to aMIDIPAN 0. Now, +when practicing at home you have a ``full band''; and the bass player +can practice without the generated bass lines simply by turning off +the left speaker. + +

    +Because most MIDI keyboard do not reset between tunes, there should be +a MIDIPAN to undo the effects at the end of the +file. Example:20.3

    - Begin Chord -
       Voice Piano2 -
       Volume mp -
       Sequence 1 4 90 + Include swing
    -End
    +Groove Swing +
    +Bass MIDIPan 0 +
    +Walk MIDIPan 0 +
    +1 C +
    +2 C +
    ... +
    +123 C +
    +Bass MIDIPan 64 +
    +Walk MIDIPan 64

    -the following adjustments are made: + +

    +MIDISeq +

    + +

    +It is possible to associate a set of MIDI controller messages with +certain beats in a sequence. For example, you might want to have the +Modulation Wheel set for the first beats in a bar, but not for the +third. The following example shows how: + +

    + + + +
    + Seqsize 4 +
    +Begin Bass-2 +
    +Voice NylonGuitar +
    +Octave 4 +
    +Sequence { 1 4 1 90; 2 4 3 90; 3 4 5 90; 4 4 1+ 90} +
    +MIDIDef WheelStuff 1 1 0x7f ; 2 1 0x50; 3 1 0 +
    +MidiSeq WheelStuff +
    +Articulate 90 +
    +End +
    +
    +C $*$ 4
    + +
    + +

    +The MIDISEQ command is specific to a track and is saved as part +of the GROOVE definition. This lets style file writers use +enhanced MIDI features to dress up their sounds. + +

    +The command has the following syntax: + +

    + + + +
    + TrackName MidiSeq <Beat> <Controller> <Datum> [ ; ...] + +
    + +

    +where: +

    +
    Beat
    +
    is the Beat in the bar. This can be an integer (1,2, etc.) + or a floating point value (1.2, 2.25, etc.). It must be 1 or greater + and less than the end of bar (in 4/4 it must be less than + 5). + +

    +

    +
    Controller
    +
    A valid MIDI controller. This can be a value in the + range 0x00 to 0x7f or a symbolic name. See the appendix + , here, for a list of + defined names. + +

    +

    +
    Datum
    +
    All controller messages use a single byte ``parameter'' + in the range 0x00 to 0x7f. + +

    +

    +
    + +

    +You can enter the values in either standard decimal notation or in +hexadecimal with the prefixed ``0x''. In most cases, your code will be +clearer if you use values like ``0x7f'' rather than the equivalent +``127''. + +

    +The MIDI sequences specified can take several forms:

      -
    1. A lookup is done in the global volume table. The volume ``mf'' - is determined to be %85 for the set MIDI velocity, +
    2. A simple series like:

      -

    3. -
    4. the adjusment of %120 is applied to the %85, changing that to %102. + + + +
      + MIDISeq 1 ReleaseTime 50; 3 ReleaseTime 0 + +

      -

    5. -
    6. Assuming that no other volume adjustments are being made - (probably there will be a global volume and, perhaps, a - RVOLUME) the MIDI velocity in the sequence will be changed - from 90 to 91. Without the translation the 90 would have been changed to 76. +in this case the commands are applied to beats 1 and 3 in each bar + of the sequence.

    +

    . + +

    -To disable all volume translations: +As a set of names predefined in an MIDIDEF command:

    +
    - VoiceVolTr // Empty table + MIDIdef Rel1 1 ReleaseTime 50; 3 ReleaseTime 0 +
    +MIDIdef Rel2 2 ReleaseTime 50; 4 ReleaseTime 0 +
    +MIDISeq Rel1 Rel2
    + +
    + +

    +Here, the commands defined in ``Rel1'' are applied to the first bar + in the sequence, ``Rel2'' to the second. And, if there are more bars + in the sequence than definitions in the line, the series will be + repeated for each bar. + +

    +A set of series enclosed in { } braces. Each braced series is + applied to a different bar in the sequence. The example above could + have been does as: + +

    + + + +
    + MIDISeq { 1 ReleaseTime 50; 3 ReleaseTime 0 } \ +
    { 2 ReleaseTime 50; 4 ReleaseTime 0 }
    + +
    + +

    +Finally, you can combine the above into different combinations. + For example: + +

    + + +
    + MIDIDef Rel1 1 ReleaseTime 50 +
    +MIDIDef Rel2 2 ReleaseTime 50 +
    +MIDISeq { Rel1; 3 ReleaseTime 0 } { Rel2; 4 ReleaseTime 0 }

    -

    -
    -DrumVolTr +

    +You can have specify different messages for different beats (or +different messages/controllers for the same beat) by listing them on +the same MIDISEQ line separated by ``;''s. + +

    +If you need to repeat a sequence for a measure in a sequence you can +use the special notation ``/'' to force the use of the previous line. +The special symbol ``z'' or ''-'' can be used to disable a bar (or +number of bars). For example: + +

    + + + +
    + Bass-Dumb MIDISeq 1 ReleaseTime 20 z / FOOBAR + +
    + +

    +would set the ``ReleaseTime'' sequence for the first bar of the +sequence, no MIDISeq events for the second and third, and the contents +of ``FOOBAR'' for the fourth. + +

    +To disable the sending of messages just use a single ``-'': + +

    + + + +
    + Bass-2 MidiSeq - // disable controllers + +
    + +

    + +

    +MIDISplit

    -You can change the volumes of indvidual drum tones with the -DRUMVOLTR translation. This command works just like the -VOICEVOLTR command desribed above. It just uses drum tones -instead of instrument voices. +For certain post-processing effects it is convenient to have each +different drum tone in a separate MIDI track. This makes it easier to +apply an effect to, for example, the snare drum. Just to make this a +bit more fun you can split any track created by +MMA .

    -For example, if you wish to make the drum tones ``SnareDrum1'' and -``HandClap'' a bit louder: +To use this feature:

    - DrumVolTr SnareDrum1=120 HandClap=110 + MIDISplit <list of channels>

    -The drum tone names can be symbolic constants, or MIDI values as in -the next example: +So, to split out just the drum channel20.4 you would have the command:

    - DrumVolTr 44=90 31=55 + MIDISplit 10

    -All drum tone translations can be disabled with: +somewhere in your song file. + +

    +When processing +MMA creates an internal list of MIDI note-on events +for each tone or pitch in the track. It then creates a separate MIDI +track for each list. Any other events are written to another track. + +

    + +

    +MIDITname +

    + +

    +When creating a MIDI track, +MMA inserts a MIDI Track Name event at +the start of the track. By default, this name is the same as the +associated +MMA track name. You can change this by issuing the +MIDITNAME command. For example, to change the CHORD +track name you might do something like:

    - DrumVolTr // Empty table + Chord MidiTname Piano
    +

    +Please note that this only effects the tracks in the generated +MIDI file. You still refer to the track in your file as CHORD.

    -


    + +

    +MIDIVoice +

    + +

    +Similar to the MIDISEQ command discussed in the previous +section, the MIDIVOICE command is used to insert MIDI +controller messages into your files. Instead of sending the data for +each bar as MIDISEQ does, this command just sends the listed +control events at the start of a track and then, if needed, at the +start of each bar. + +

    +Again, a short example. Let us assume that you want to use the +``Release Time'' controller to sustain notes in a bass line: + +

    + + + +
    + Seqsize 4 +
    +Begin Bass-2 +
    +Voice NylonGuitar +
    +MidiVoice 1 ReleaseTime 50 +
    +Octave 4 +
    +Sequence { 1 4 1 90; 2 4 3 90; 3 4 5 90; 4 4 1+ 90} +
    +Articulate 60 +
    +End +
    +
    +C $*$ 4
    + +
    + +

    +should give an interesting effect. + +

    +The syntax for the command is: + +

    + + + +
    + Track MIDIVoice <beat> <controller> <Datum> [; ...] + +
    + +

    +This syntax is identical to that discussed in the section for +MIDISEQ, above. The <beat>value is +required for the command--it determines if the data is sent before or +after the VOICE command is sent. Some controllers are reset by +a voice, others not. My experiments show that BANK should be +sent before, most others after. Using a ``beat'' of ``0'' forces the +MidiVoice data to be sent before the Voice control; any other ``beat'' +value causes the data to be sent after the Voice control. In this +silly example: + +

    + + + +
    + Voice Piano1 +
    +MidiVoice {0 Bank 5; 1 ReleaseTime 100}
    + +
    + +

    +the MIDI data is created in an order like: + +

    +

    +

    0 Param Ch=xx Con=00 val=05 +
    +0 ProgCh Ch=xx Prog=00 +
    +0 Param Ch=xx Con=72 val=80 + +
    + +

    +All the MIDI events occur at the same offset, but the order is (may +be) important. + +

    +By default +MMA assumes that the MIDIVoice data is to be used only +for the first bar in the sequence. But, it's possible to have a +different sequence for each bar in the sequence (just like you can +have a different VOICE for each bar). In this case, group the +different data groups with {} brackets: + +

    + + + +
    + Bass-1 MIDIVoice {1 ReleaseTime 50} {1 ReleaseTime 20} + +
    + +

    +This list is stored with other GROOVE data, so is ideal for +inclusion in a style file. + +

    +If you want to disable this command after it has been issued you can +use the form: + +

    + + + +
    + Track MIDIVoice - // disable + +
    + +

    +Some technical notes: + +

    + +

      +
    • +MMA tracks the events sent for each bar and will not duplicate + sequences. + +

      +

    • +
    • Be cautious in using this command to switch voice banks. If you + don't switch the voice bank back to a sane value you'll be playing + the wrong instruments! + +

      +

    • +
    • Do use the MIDICLEAR command + ((details)) to + ``undo'' anything you've done via a MIDIVOICE command. + +

      +

    • +
    + +

    + +

    +
    +MIDIVolume +

    + +

    +MIDI devices equipped with mixer settings can make use of the +``Channel'' or ``Master'' volume settings.20.5 +

    + +MMA doesn't set any channel volumes without your knowledge. If you +want to use a set of reasonable defaults, look at the file +includes/init.mma which sets all channels other than ``1'' to +``100''. Channel ``1'' is assumed to be a solo/keyboard track and is +set to the maximum volume of ``127''. + +

    +You can set selected MIDIVOLUMEs: + +

    + + + +
    + Chord MIDIVolume 55 + +
    + +

    +will set the Chord track channel. For most users, the use of this +command is not recommended since it will upset the balance of +the library grooves. If you need a track softer or louder you should +use the volume setting for the track. + +

    +The data generated is not sent into the MIDI stream until musical data +is created for the relevant MIDI channel. + +

    +Caution: If you use the command with ALLTRACKS you should note +that only existing +MMA tracks will be effected. + +

    +


    Footnotes

    +
    +
    ... track:20.1
    +
    This is much easier to do with the KeySig + command, here + +
    +
    ... portamento20.2
    +
    The name ``Glis'' is used + because ``MIDIPortamento'' gets to be a bit long to type and + ``MIDIPort'' might be interpreted as something to do with + ``ports''. + +
    +
    ... Example:20.3
    +
    This is much easier to do with the MMAStart + and MMAEnd options (details). + +
    +
    ... channel20.4
    +
    In +MMA this will + always be channel 10. + +
    +
    ... settings.20.5
    +
    I discovered this + on my keyboard after many frustrating hours attempting to balance + the volumes in the library. Other programs would change the keyboard + settings, and not being aware of the changes, I'd end up scratching + my head. + +
    +
    +
    bob -2007-03-07 +2008-09-28
    diff --git a/mma/docs/html/ref/node21.html b/mma/docs/html/ref/node21.html index 3091b9c..e9588a6 100644 --- a/mma/docs/html/ref/node21.html +++ b/mma/docs/html/ref/node21.html @@ -1,4 +1,4 @@ - + -Other Commands and Directives - +Patch Management + @@ -25,1384 +25,67 @@ original version by: Nikos Drakos, CBLU, University of Leeds - - + next - up - previous
    - Next: Begin/End Blocks - Up: Next: Fine Tuning (Translations) + Up: Reference Manual - Previous: Fine Tuning (Translations) -
    + Previous: Low Level MIDI Commands
    +
    Subsections +

    - +
    -Other Commands and Directives +Patch Management

    -In addition to the ``Pattern'', ``Sequence'', ``Groove'' and -``Repeat'' and other directives discussed earlier, and chord data, - -MMA supports a number of directives which affect the flavor of your -music. - -

    -The subjects presented in this chapter are ordered alphabetically. - -

    - -

    -
    -AllTracks -

    - -

    -Sometimes you want to apply the same command to all the currently -defined tracks; for example, you might want to ensure that no -tracks have SEQRND set. Yes, you could go though each track -(and hope you don't miss any) and explicitly issue the command: - -

    - - - -
    - Bass SeqRnd Off - .... -
    -Chord SeqRnd Off
    - -
    - -

    -But, - -

    - - - -
    - AllTracks SeqRnd Off - -
    - -

    -is much simpler. Similarly, you can set the articulation for all -tracks with: - -

    - - - -
    - AllTracks Articulate 80 - -
    - -

    -You can even combine this with a BEGIN/END like: - -

    - - - -
    - Begin AllTracks -
      Articulate 80 -
      SeqRnd Off -
      Rskip 0 -
    -End
    - -
    - -

    -This command is handy when you are changing an existing GROOVE. - -

    -Note that only currently defined tracks are effected by this command. - -

    -A further option is to limit ALLTRACKS to specific tracks -type. For example, you might want to set all the DRUM track -volumes to ``FF'': - -

    - - - -
    - AllTracks Drum Volume ff - -
    - -

    -Or to set the articulation on BASS and WALK tracks: - -

    - - - -
    - AllTracks Bass Walk Articulate 55 - -
    - -

    -It is assumed that all the arguments following the initial command -which are valid track types (Bass, Chord, Arpeggio, Scale, Drum, Walk, -Melody, or Solo) are track type limiters. - -

    - -

    -
    -Articulate -

    - -

    -When -MMA processes a music file, all the note lengths specified in a -pattern are converted to MIDI lengths. - -

    -For example in: - -

    - - - -
    - Bass Define BB 1 4 1 100; 2 4 5 90; 3 4 1 80; 4 4 5 90 - -
    - -

    -bass notes on beats 1, 2, 3 and 4 are define. All are quarter notes. - -MMA , being quite literal about things, will make each note exactly -192 MIDI ticks long--which means that the note on beat 2 will start -at the same time as the note on beat 1 ends. - -

    - -MMA has an articulate setting for each voice. This value is applied -to shorten or lengthen the note length. By default, the setting is 90. -Each generated note duration is taken to be a percentage of this -setting, So, a quarter note with a MIDI tick duration of 192 will -become 172 ticks long. - -

    -If articulate is applied to a short note, you are guaranteed that the -note will never be less than 1 MIDI tick in length. - -

    -To set the value, use a line like: - -

    - - - -
    - Chord-1 Articulate 96 - -
    - -

    -Articulate values must be greater than 0 and less than or -equal to 200. Values over 100 will lengthen the note. Settings -greater than 120 will generate a warning. - -

    -You can specify a different ARTICULATE for each bar in a -sequence. Repeated values can be represented with a ``/'': - -

    - - - -
    - Chord Articulate 50 60 / 30 - -
    - -

    -Notes: The full values for the notes are saved with the -pattern definition. The articulation adjustment is applied at -run time. The ARTICULATE setting is saved with a -GROOVE. - -

    - -

    -
    -Copy -

    - -

    -Sometimes it is useful to duplicate the settings from one voice to -another. The COPY command does just that: - -

    - - - -
    - Bass-1 Copy Bass - -
    - -

    -will copy the settings from the Bass track to the Bass-1 track. - -

    -The COPY command only works between tracks of the same type. - -

    -The following settings are copied: - -

    - -

    - -

    -Warning: You are probably better off to use internal macros for -this. - -

    - -

    -
    -Comment -

    - -

    -As previously discussed, a comment in -MMA is anything following a -``//'' in a line. A second way of marking a comment is with the -COMMENT directive. This is quite useful in combination the -BEGIN and END directives. For example: - -

    - - - -
    - Begin Comment -
        This is a description spanning -
            several lines which will be -
            ignored by MMA. -
    -End
    - -
    - -

    -You could achieve the same with: - -

    - - - -
    - // This is a description spanning -
    // several lines which will be -
    // ignored by MMA.
    - -
    - -

    -or even: - -

    - - - -
    - Comment This is a description spanning -
    -Comment several lines which will be -
    -Comment ignored by MMA.
    - -
    - -

    -One minor difference between // and -COMMENT is that the first is discarded when the -input stream is read; the more verbose version is -discarded during line processing. - -

    -Quite often it is handy to delete large sections of a song with a -BEGIN COMMENT/END on a temporary basis. - -

    - -

    -
    -Debug -

    - -

    -To enable you to find problems in your song files (and, perhaps, even -find problems with -MMA itself) various debugging messages can be -displayed. These are normally set from the command line -command line. - -

    -However, it is possible to enable various debugging messages -dynamically in a song file using the DEBUG directive. In a -debug statement you can enable or disable any of a variety of -messages. A typical directive is: - -

    - - - -
    - Debug Debug=On Expand=Off Patterns=On - -
    - -

    -Each section of the debug directive consists of a mode -and the command word ON or OFF. The two parts -must be joined by a single ``$=$''. You may use the -values ``0'' for ``Off'' and ``1'' for ``On'' if desired. - -

    -The available modes with the equivalent command line switches are: - -

    -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ModeCommand Line Equivalent
    Debug-ddebugging messages
    Filenames-odisplay filenames
    Patterns-ppattern creation
    Sequence-ssequence creation
    Runtime-rrunning progress
    Warnings-wwarning messages
    Expand-edisplay expanded lines
    -
    - -

    -The modes and command are case-insensitive (although the command line switches are not). - -

    -The current state of the debug flags is saved in the variable -$_Debug and the state prior to a change is saved in $_LastDebug. - -

    - -

    -
    -Delete -

    - -

    -If you are using a track in only one part of your song, especially if -it is at the start, it may be wise to free that track's resources when -you are done with it. The DELETE command does just that: - -

    - - - -
    - Solo Delete - -
    - -

    -If a MIDI channel has been assigned to that track, it is -marked as ``available'' and the track is deleted. Any data -already saved in the MIDI track will be written when -MMA is -finished processing the song file. - -

    - -

    -
    -Direction -

    - -

    -In tracks using chords or scales you can change the direction in which -they are applied: - -

    - - - -
    - Scale Direction UP - -
    - -

    -The effects differ in different track types. For SCALE and ARPEGGIO tracks: - -

    -

    - - - - - - - - - - - - - -
    UPPlays in upward direction only
    DOWNPlays in downward direction only
    BOTHPlays upward and downward (default)
    RANDOMPlays notes from the chord or scale randomly
    -
    -

    -

    When this command is encountered in a SCALE track the start -point of the scale is reset. -
    -

    - -

    -A WALK track recognizes the following option settings: - -

    -

    - - - - - - - - - - - - - -
    BOTHThe default. The bass pattern - will go up and down a partial scale. Some notes may be repeated.
    UPNotes will be chosen sequentially from an ascending, partial scale.
    DOWNNotes will be chosen sequentially from a descending, partial scale.
    RANDOMNotes will be chosen in a random direction from a partial scale.
    -
    -

    -

    All four patterns are useful and create quite different effects. - -
    - -

    -The CHORD tracks DIRECTION only has an effect when the -STRUM setting has a non-zero value. In this case the following -applies: - -

    -

    - - - - - - - - - - - - - -
    UPThe default. Notes are sounded from the lowest tone to the highest.
    DOWNNotes are sounded from the highest to the lowest.
    BOTHThe UP and DOWN values are alternated.
    RANDOMIgnored (uses UP).
    -
    - -

    -You can specify a different DIRECTION for each bar in a -sequence. Repeated values can be represented with a ``/'': - -

    - - - -
    - Arpeggio Direction Up Down / Both - -
    - -

    -The setting is ignored by BASS, DRUM and SOLO tracks. - -

    - -

    -Mallet -

    - -

    -Some instruments (Steel-drums, banjos, marimbas, etc.) are normally -played with rapidly repeating notes. Instead of painfully inserting -long lists of these notes, you can use the MALLET directive. -The MALLET directive accepts a number of options, each an -OPTION=VALUE pair. For example: - -

    - - - -
    - Solo-Marimba Mallet Rate=16 Decay=-5 - -
    - -

    -This command is also useful in creating drum rolls. For example: - -

    - - - -
    - Begin Drum-Snare2 -
      Tone SnareDrum1 -
      Volume F -
      Mallet Rate=32 Decay=-3 -
      Rvolume 3 -
      Sequence z z z 1 1 100 -
    -End
    - -
    - -

    -The following options are supported: - -

    - -

    -Rate -

    - -

    -The RATE must be a valid note length (i.e., 8, 16, or even -16.+8). - -

    -For example: - -

    - - - -
    - Solo-Marimba Mallet Rate=16 - -
    - -

    -will set all the notes in the ``Solo-Marimba'' track to be sounded a -series of 16th notes. - -

    - -

      -
    • Note duration modifiers such as articulate are applied to each - resultant note, - -

      -

    • -
    • It is guaranteed that the note will sound at least once, - -

      -

    • -
    • The use of note lengths assures a consistent sound independent - of the song tempo. - -

      -

    • -
    - -

    -To disable this setting use a value of ``0''. - -

    - -

    -Decay -

    - -

    -You can adjust the volume (velocity) of the notes being repeated when -MALLET is enabled: - -

    - - - -
    - Drum-Snare Mallet Decay=-15 - -
    - -

    -The argument is a percentage of the current value to add to the note -each time it is struck. In this example, assuming that the note length -calls for 4 ``strikes'' and the initial velocity is 100, the note will -be struck with a velocity of 100, 85, 73 and 63. - -

    -Important: a positive value will cause the notes to get louder, -negative values cause the notes to get softer. - -

    -Note velocities will never go below 1 or above 255. Note, however, -that notes with a velocity of 1 will most likely be inaudible. - -

    -The decay option value must be in the range -50 to 50; however, be -cautious using any values outside the range -5 to 5 since the volume -(velocity) of the notes will change quite quickly. The default -value is 0 (no decay). - -

    - -

    -
    -Octave -

    - -

    -When -MMA initializes and after the SEQCLEAR command all track -octaves are set to ``4''. This will place most chord and bass notes in -the region of middle C. - -

    -You can change the octave for any voice with OCTAVE command. For example: - -

    - - - -
    - Bass-1 Octave 3 - -
    - -

    -Sets the notes used in the ``Bass-1'' track one octave lower than normal. - -

    -The octave specification can be any value from 0 to 10. Various -combinations of INVERT, TRANSPOSE and OCTAVE can -force notes to be out of the valid MIDI range. In this case the lowest -or highest available note will be used. - -

    -You can specify a different OCTAVE for each bar in a sequence. -Repeated values can be represented with a ``/'': - -

    - - - -
    - Chord Octave 4 5 / 4 - -
    - -

    - -

    -
    -Off -

    - -

    -To disable the generation of MIDI output on a specific track: - -

    - - - -
    - Bass Off - -
    - -

    -This can be used anywhere in a file. Use it to override the effect of -a predefined groove, if you wish. This is simpler than resetting a -voice in a groove. The only way to reset this command is with a -ON directive. - -

    - -

    -
    -On -

    - -

    -To enable the generation of MIDI output on a specific track which has -been disabled with an OFF directive: - -

    - - - -
    - Bass On - -
    - -

    - -

    -Print -

    - -

    -The PRINT directive will display its argument to the screen -when it is encountered. For example, if you want to print the filename -of the input file while processing, you could insert: - -

    - - - -
    - Print Making beautiful music for MY SONG - -
    - -

    -No control characters are supported. - -

    -This can be useful in debugging input files. - -

    - -

    -PrintActive -

    - -

    -The PRINTACTIVE directive will the currently active -GROOVE and the active tracks. This can be quite useful when -writing groove files and you want to modify and existing groove. - -

    -Any parameters given are printed as single comment at the end of the header line. - -

    -This is strictly a debugging tool. No PRINTACTIVE statements -should appear in finalized grooves or song files. - -

    - -

    -RndSeed -

    - -

    -All of the random functions (RTIME, RSKIP, etc.) in -MMA depend -on the Python random module. Each time -MMA generates a track the values generated -by the random functions will be different. In most cases this is a ``good thing''; however, -you may want -MMA to use the same sequence of random values21.1 each time it generates a track. Simple: just use: - -

    - - - -
    - RndSeed 123.56 - -
    - -

    -at the top of your song file. You can use any value you want: it really doesn't -make any difference, but different values will generate different sequences. - -

    -You can also use this with no value, in which case Python uses its own value (see -the Python manual for details). Essentially, using no value undoes the effect which -permits the mixing of random and not-so-random sections in the same song. - -

    -One interesting use of RNDSEED could be to ensure that a repeated section -is identical: simply start the section with something like: - -

    - - - -
    - Repeat -
    -RndSeed 8 -
    ... chords
    - -
    - -

    -It is highly recommended that you do not use this command in library files. - -

    - -

    -
    -RSkip -

    - -

    -To aid in creating syncopated sounding patterns, you can use the -RSKIP directive to randomly silence or skip notes. The command -takes a value in the range 0 to 99. The ``0'' argument disables -skipping. For example: - -

    - - - -
    - Begin Drum -
        Define D1 1 0 90 -
        Define D8 D1 * 8 -
        Sequence D8 -
        Tone OpenHiHat -
        RSkip 40 -
    -End
    - -
    - -

    -In this case a drum pattern has been defined to hit short ``OpenHiHat'' -notes 8 per bar. The RSKIP argument of ``40'' causes the -note to be NOT sounded (randomly) only 40% of the time. - -

    -Using a value of ``10'' will cause notes to be skipped 10% of the -time (they are played 90% of the time), ``90'' means to skip the -notes 90% of the time, etc. - -

    -You can specify a different RSKIP for each bar in a sequence. -Repeated values can be represented with a ``/'': - -

    - - - -
    - Scale RSkip 40 90 / 40 - -
    - -

    -If you use the RSKIP in a chord track, the entire chord -will not be silenced. The option will be applied to the -individual notes of each chord. This may or may not be what you are -after. You cannot use this option to generate entire chords randomly. -For this effect you need to create several chord patterns and select -them with SEQRND. - -

    - -

    -
    -RTime -

    - -

    -One of the biggest problem with computer generated drum and rhythm -tracks is that, unlike real musicians, the beats are precise and ``on -the beat''. The RTIME directive attempts to solve this. - -

    -The command can be applied to all tracks. - -

    - - - -
    - Drum-4 Rtime 4 - -
    - -

    -The value passed to the RTime directive are the number of MIDI ticks -with which to vary the start time of the notes. For example, if you -specify ``5'' the start times will vary from -5 to +5 ticks) on each -note for the specified track. There are 192 MIDI ticks in each quarter -note. - -

    -Any value from 0 to 100 can be used; however values in the range 0 to -10 are most commonly used. Exercise caution in using large values! - -

    -You can specify a different RTIME for each bar in a sequence. -Repeated values can be represented with a ``/'': - -

    - - - -
    - Chord RTime 4 10 / 4 - -
    - -

    -RTIME is guaranteed never to start a note before the start of a bar. - -

    - -

    -
    -ScaleType -

    - -

    -This option is only used by SCALE tracks. It can be set for -other tracks, but the setting is not used. - -

    -By default, the SCALETYPE is set to AUTO. The settings -permissible are: - -

    -

    - - - - - - - -
    CHROMATICForces use of a chromatic scale
    AUTOUses scale based on the current chord (default)
    -
    - -

    -When this command is encountered in a SCALE track the start -point of the scale is reset. - -

    - -

    - -
    -Seq -

    - -

    -If your sequence, or groove, has more than one pattern (i.e., you have -set SeqSize to a value other than 1), you can use this directive to -force a particular pattern point to be used. The directive: - -

    - - - -
    - Seq - -
    - -

    -resets the sequence counter to 1. This means that the next bar -will use the first pattern in the current sequence. You can force a -specific pattern point by using an optional value after the directive. -For example: - -

    - - - -
    - Seq 8 - -
    - -

    -forces the use of pattern point 8 for the next bar. This can be quite -useful if you have a multi-bar sequence and, perhaps, the eight bar is -variation which you want used every eight bars, but also for a -transition bar, or the final bar. Just put a SEQ 8 at those -points. You might also want to put a SEQ at the start of -sections to force the restart of the count. - -

    -If you have enable sequence randomization with the SEQRND ON -command, the randomization will be disabled by a SEQ -command.21.2 However, -settings of track SEQRND will not be effected. One difference -between SEQRND OFF and SEQ is that the current sequence -point is set with the latter; with SEQRND OFF it is left at a -random point. - -

    -Note: Using a value greater than the current SEQSIZE is not -permitted. - -

    -This is a very useful command! For example, look at the four bar -introduction of the song ``Exactly Like You'': - -

    - - - -
    - Groove BossanovaEnd -
    -seq 3 -
    -1 C -
    -seq 2 -
    -2 Am7 -
    -seq 1 -
    -3 Dm7 -
    -seq 3 -
    -4 G7 / G7#5
    - -
    - -

    -In this example the four bar ``ending groove'' has been used to create -an interesting introduction. - -

    - -

    -
    -Strum -

    - -

    -By default -MMA plays all the notes in a chord at the same time. To -make the chord more like something a guitar or banjo might play, use -the STRUM directive. For example: - -

    - - - -
    - Chord-1 Strum 5 - -
    - -

    -sets the strumming factor to 5 for track Chord-1. - -

    -Setting the STRUM in any track other than a CHORD track -will generate a warning message and the command will be ignored. - -

    -The strum factor is specified in MIDI ticks. Usually values around 10 -to 15 work just fine. The valid range for STRUM is 0 to 100. - -

    -You can specify a different STRUM for each bar in a sequence. -Repeated values can be represented with a ``/'': - -

    - - - -
    - Chord Strum 20 5 / 10 - -
    - -

    -Note: When chords have both a STRUM and INVERT applied, -the order of the notes played will not necessarily be root, third, -etc. The notes are sorted into ascending order, so for a C major scale -with and INVERT of 1 the notes played would be ``E G C''. That -is, unless the DIRECTION has been set to ``DOWN'' in which case -the order would be reversed (but the notes would be the same). - -

    - -

    -Transpose -

    - -

    -You can change the key of a piece with the ``Transpose'' command. For -example, if you have a piece notated in the key of ``C'' and you want -it played back in the key of ``D'': - -

    - - - -
    - Transpose 2 - -
    - -

    -will raise the playback by 2 semi-tones. Since -MMA 's author plays tenor saxophone - -

    - - - -
    - Transpose -2 - -
    - -

    -which puts the MIDI keyboard into the same key as the horn, is not an -uncommon directive - -

    -You can use any value between -12 and 12. All tracks (with the logical -exception of the drum tracks) are effected by this command. - -

    - -

    -Unify -

    - -

    -The UNIFY command is used to force multiple notes of the same -voice and pitch to be combined into a single, long, tone. This is very -useful when creating a sustained voice track. For example, consider -the following which might be used in real groove file: - -

    - - - -
    - Begin Bass-Sus -
    -Sequence 1 1 1 90 4 -
    -Articulate 100 -
    -Unify On -
    -Voice TremoloStrings -
    -End
    - -
    - -

    -Without the UNIFY ON command the strings would be sounded (or -hit) four times during each bar; with it enabled the four hits are -combined into one long tone. This tone can span several bars if the -note(s) remain the same. - -

    -The use of this command depends on a number of items: - -

    - -

      -
    • The VOICE being used. It makes sense to use enable the - setting if using a sustained tone like ``Strings"; it probably - doesn't make sense if using a tone like ``Piano1''. - -

      -

    • -
    • For tones to be combined you will need to have ARTICULATE - set to a value of 100. Otherwise the on/off events will have small - gaps in them which will cancel the effects of UNIFY. - -

      -

    • -
    • Ensure that RTIME is not set for UNIFY tracks - since the start times may cause gaps. - -

      -

    • -
    • If your pattern or sequence has different volumes in different - beats (or bars) the effect of a UNIFY will be to ignore - volumes other than the first. Only the first NOTE ON and the - last NOTE OFF events will appear in the MIDI file. - -

      -

    • -
    - -

    -You can specify a different UNIFY for each bar in a sequence. -Repeated values can be represented with a ``/'': - -

    - - - -
    - Chord Unify On / / Off - -
    - -

    -But, you probably don't want to use this particular feature. - -

    -Valid arguments are ``On'' or ``1'' to enable; ``Off'' or ``0'' to -disable. - -

    - -

    +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'' +MMA supports only 128 ``General MIDI''21.1 preset voices. These voices are assigned the values 0 +to 127. We refer to the various voices as ``tones'', ``instruments'', +or ``patches''.21.2 +

    + +


    Voice

    @@ -1421,15 +104,16 @@ The MIDI instrument or voice used for a track is set with:

    Voices apply only to the specified track. The actual instrument can be -specified via the MIDI instrument number, or with the symbolic name. -See the tables in the MIDI voicing section for lists of the recognized +specified via the MIDI instrument number, an ``extended'' value, or +with the symbolic name. See the tables in the MIDI +voicing section for lists of the standard, recognized names.

    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 -appears to be highly dependent on the MIDI synth you are using. +drum voices. The supplied library files do not change the voices since +this is highly dependent on the MIDI synth you are using.

    You can specify a different VOICE for each bar in a sequence. @@ -1446,45 +130,502 @@ Repeated values can be represented with a ``/'':

    It is possible to set up translations for the selected voice: see -VOICETR. +VOICETR. + +

    + +

    +Patch +

    + +

    +In addition to the 128 standard voices mandated by the MIDI standards +(referred to as the GM voices) +MMA also supports extended voice +banks. + +

    +

    + + + +
    +
    +
    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 do not use these + features to create files you want to share! + +
    + +
    + +

    +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. + +

    +In order to use voices outside of the normal GM range +MMA 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. + +

    +My Casio Wk-3000 lists Bank-53, Program-27 as "Rotary Guitar". It's easy to use +this voice directly in a VOICE command: + +

    + + + +
    + Chord Voice 27.53 + +
    + +

    +Yes, but who wants all those ``funny'' numbers in their +MMA files? +Well, no one that I know. For this reason the PATCH command has +been developed. This command lets you modify existing patch names, +list names and create new ones. + +

    +PATCH 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. + +

    +Unless otherwise noted, you can stack a number of different options +onto the same PATCH line. + +

    + +

    +Patch Set +

    + +

    +The SET 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 +MMA +

    + + + +
    + Patch Set 27.53=RotaryGuitar + +
    + +

    +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!). + +

    +After the assignment you can use ``RotaryGuitar'' just like any other +instrument name: + +

    + + + +
    + Chord Voice rotaryguitar + +
    + +

    +Note that once the voice has been registered you don't need to worry +about the case of individual letters. + +

    +It's even possible to register a number of voices in this manner: + +

    + + + +
    + Patch set 27.53=RotaryGuitar 61.65=BASS+TROMBONE + +
    + +

    +Just make sure that the SET assignments are the last thing on +the PATCH line. + +

    +It is relatively easy to load entire sets of extended patch names by +creating special +MMA include files. For example, for a Casio +WK-3000 keyboard you might have the file includes/casio-wk3.mma +with a large number of settings. Here's a snippet: + +

    + + + +
    + Begin Patch Set +
    +0.48=GrandPiano +
    +1.48=BrightPiano +
    +2.48=ElecGrandPiano +
    +3.48=Honky-Tonk1 +
    ... +
    +End
    + +
    + +

    +Now, at the top of your song file or in a MMARC file insert the +command: + +

    + + + +
    + include casio-wk30021.3 + +
    + +

    +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 http://www.pgmusic.com/support_miscellaneous.htm. These +files cannot be read my +MMA , so we have included a +little conversion utility util/pg2mma.py. There is a short +file with instructions util/README.pg2mma. + +

    +The SET 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. + +

    + +

    +Patch Rename +

    + +

    +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 +MMA to change any patch name you want. For example, +MMA calls the first voice in the GM set ``Piano1''. Maybe you want to use +the name ``AcousticGrand''. Easy: + +

    + + + +
    + Patch Rename Piano1=AcousticGrand + +
    + +

    +Each RENAME 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. + +

    +You can have any number of items in a list; however, they must be the +last items on the PATCH line. + +

    + +

    +Patch List +

    + +

    +After making changes to +MMA '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 LIST +command. + +

    +

    +
    List=GM
    +
    Lists the current values of the GM voices, +
    +
    List=EXT
    +
    Lists the extended voices, +
    +
    List=All
    +
    Lists both the GM and extended voices. +
    +
    + +

    +For example, the command: + +

    + + + +
    + Patch List=EXT + +
    + +

    +will produce a listing something like: + +

    + + + +
    + 0.48=GrandPiano +
    +1.48=BrightPiano +
    +2.48=ELEC.GrandPiano +
    ...
    + +
    + +

    + +

    +Ensuring It All Works +

    + +

    +If you are going to use any of the extended patches in your MIDI files +you may need to do some additional work. + +

    +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 (details here) to do some initialization. For an example please +look at the file includes/init.mma 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. + +

    +To use a file like includes/init.mma just include a line like: + +

    + + + +
    + include init + +
    + +

    +in your mmarc file. See the Path section of this manual for details +(here). + +

    +To help keep things sane, +MMA 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. + +

    +However, you might wish to generate some explicit MIDI sequences at the +end of a generated file. Just write another file like the +init.mma file we discussed above. You can insert this file by +placing a line like: + +

    + + + +
    + include endinit + +
    + +

    +at the end of your song file. Or, use the MMAEND command +detailed here. + +

    +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: + +

    + + + +
    + if def Casio +
    +include casio-wk3000 +
    +include init.file.for.casio.mma +
    +endif +
    +
    +Groove somegroove +
    +
    +if def Casio +
    +Chord Voice ROtaryGuitar +
    +Endif +
    +
    +1 Cm +
    +2 Dm +
    ...more chords +
    +if def Casio +
    +include restore-file-for-casio.mma +
    +endif
    + +
    + +

    +Now, when you compile the file define the macro on the command line: + +

    + + + +
    + $ mma -SCASIO filename + +
    + +

    +This defines the macro so that your wrappers work. To compile for the +GM voicing, just skip the ``-SCASIO''. + +

    +An alternate method is to use the VOICETR command +(details here). Using a similar example we'd create a song +file like: + +

    + + + +
    + if def Casio +
    +include casio-wk3000 +
    +include init.file.for.casio.mma +
    +VoiceTR Piano1=RotaryGuitar ChoralAhhs=VoxHumana +
    +endif +
    +Groove somegroove +
    +
    +1 Cm +
    +2 Dm +
    ...more chords +
    +if def Casio +
    +include restore-file-for-casio.mma +
    +endif
    + +
    + +

    +Notice how, in this example, we don't need to wrap each and every +VOICE line. We just create a translation table with the +alternate voices we want to use. Now, when the GROOVE is loaded +the various voices will be changed.



    Footnotes

    -
    ... values21.1
    -
    Yes, this is -a contradiction of terms. +
    ... MIDI''21.1
    +
    The + General MIDI or GM standard was developed by the MIDI Manufactures + Association.
    -
    ... -command.21.2
    -
    A warning message will also be displayed. +
    ... ``patches''.21.2
    +
    ``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.
    -

    +
    ... casio-wk30021.3
    +
    Refer to INCLUDE (here) for details on file placement. + +
    + +
    bob -2007-03-07 +2008-09-28
    diff --git a/mma/docs/html/ref/node22.html b/mma/docs/html/ref/node22.html index b3ba144..0ce7043 100644 --- a/mma/docs/html/ref/node22.html +++ b/mma/docs/html/ref/node22.html @@ -1,4 +1,4 @@ - + -Begin/End Blocks - +Fine Tuning (Translations) + @@ -25,89 +25,400 @@ original version by: Nikos Drakos, CBLU, University of Leeds - - + next - up - previous
    - Next: Documentation Strings - Up: Next: Other Commands and Directives + Up: Reference Manual - Previous: Other Commands and Directives -
    + Previous: Patch Management
    +
    Subsections -
      -
    • Begin -
    • End +

      - +
      -Begin/End Blocks +Fine Tuning (Translations)

      -Entering a series of directives for a specific track can get quite -tedious. To make the creation of library files a bit easier, you can -create a block. For example, the following: +A program such as +MMA which is intended to be run of various +computers and synthesizers (both hardware keyboards and software +versions) suffers from a minor deficiency of the MIDI standards: mainly +that the standard says nothing about what a certain instrument should +sound like, or the relative volumes between instruments. The GM +extension helps a bit, but only a bit, by saying that certain +instruments should be assigned certain program change values. This +means that all GM synths will play a "Piano" if instrument 000 is +selected. + +

      +But, if one plays a GM file on a Casio keyboard, then on PC +soft-synth, and then on a Yahama keyboard you will get three quite +different sounds. The files supplied in this distribution have been +created to sound good on the author's setup: A Casio WK-3000 keyboard. + +

      +But, what if your hardware is different? Well, there are solutions! +Later in this chapter commands are shown which will change the +preselected voice and tone commands and the default volumes. At this +time there are no example files supplied with +MMA , but your +contributions are welcome. + +

      +The general suggestion is that: + +

      + +

        +
      1. You create a file with the various translations you need. For + example, the file might be called yamaha.mma and contain + lines like:

        - Drum Define X 0 2 100; 50 2 90 + VoiceTR Piano1=Piano2
        -Drum Define Y 0 2 100 +ToneTr SnareDrum2=SnareDrum1
        -Drum Sequence X Y
        +VoiceVolTr Piano2=120 BottleBlow=80 +
        +DrumVolTr RideBell=90 Tambourine=120

        -Can be replaced with: +Place this file in the directory /usr/local/share/mma/includes. + +

        +

      2. +
      3. Include this file in your ~/.mmarc file. Following the + above example, you would have a line:

        - Drum Begin -
            Define X 0 2 100; 50 2 90 -
            Define Y 0 2 100 - End -
        -Drum Sequence X Y
        + Include yamaha

        -Or, even more simply, with: +

      4. +
      + +

      +That's it! Now, whenever you compile a +MMA file the translations +will be done. + +

      +All of the following translation settings follow a similar logic as to ``when'' +they take effect, and that is at the time the VOICE, +VOLUME, etc. command is issued. This may confuse the unwary if +GROOVES are being used. But, the following sequence: + +

      + + +
      + +
        +
      1. You set a voice with the VOICE command, +
      2. +
      3. You save that voice into a GROOVE with DEFGROOVE, +
      4. +
      5. You create a voice translation with VOICETR, +
      6. +
      7. You activate the previously defined GROOVE. +
      8. +
      + + + +
      Wrong!
      + +

      +does not have the desired effect. In the above sequence the +VOICETR will have no effect. For the desired +translations to work the VOICE (or whatever) command must come +after the translation command. + +

      + +

      +
      +VoiceTr +

      + +

      +In previous section you saw how to set a voice for a track by using its +standard MIDI name. The VOICETR command sets up a translation +table that can be used in two different situations: + +

      + +

        +
      • It permits creation of your own names for voices (perhaps for a + foreign language), + +

        +

      • +
      • It lets you override or change voices used in standard library + files. + +

        +

      • +
      + +

      +VOICETR works by setting up a simple translation table of +``name'' and ``alias'' pairs. Whenever +MMA encounters a voice name +in a track command it first attempts to translate this name though the +alias table. + +

      +To set a translation (or series of translations):

      +
      - Drum Begin Define -
          X 0 2 100; 50 2 90 -
          Y 0 2 100 + VoiceTr Piano1=Clavinet Hmmm=18 + +
      + +

      +Note that you additional VOICETR commands will add entries to +the existing table. To clear the table use the command with no +arguments: + +

      + + + +
      + VoiceTr // Empty table + +
      + +

      +Assuming the first command, the following will occur: + +

      + + + +
      + Chord-Main Voice Hmmm + +
      + +

      +The VOICE for the Chord-Main track will be set to ``18'' +or ``Organ3''. + +

      + + + +
      + Chord-2 Voice Piano1 + +
      + +

      +The VOICE for the Chord-2 track will be set to +``Clavinet''. + +

      +If your synth does not follow standard GM-MIDI voice naming +conventions you can create a translation table which can be included +in all your +MMA song files via an RC file. But, do note that the +resulting files will not play properly on a synth conforming to the +GM-MIDI specification. + +

      +Following is an abbreviated and untested example for using an obsolete and unnamed synth: + +

      + + + +
      + VoiceTr Piano1=3 \ +
      +Piano2=4 \ +
      +Piano3=5 \ +
      ... \ +
      +Strings=55 \ +
      ...
      + +
      + +

      +Notes: the translation is only done one time and no verification is +done when the table is created. The table contains one-to-one +substitutions, much like macros. + +

      +For translating drum tone values, see +DRUMTR. + +

      + +

      +
      +DrumTr +

      + +

      +It is possible to create a translation table which will substitute one +Drum Tone for another. This can be useful in a variety of +situations, but consider: + +

      + +

        +
      • Your synth lacks certain drum tones--in this case you may want + to set certain DRUMTR commands in a MMARC file. + +

        +

      • +
      • You are using an existing GROOVE in a song, but don't + like one or more of the Drum Tones selected. Rather than + editing the library file you can set a translation right in the + song. Note, do this before any GROOVE commands. +
      • +
      + +

      +To set a translation (or set of translations) just use a list of +drumtone values or symbolic names with each pair separated by +white space. For example: + +

      + + + +
      + ToneTR SnareDrum2=SnareDrum1 HandClap=44 + +
      + +

      +will use a ``SnareDrum1'' instead of a ``SnareDrum2'' and the value +``44'' (actually a ``PedalHiHat'') instead of a ``HandClap''. + +

      +You can turn off all drum tone translations with an empty line: + +

      + + + +
      + ToneTR + +
      + +

      +The syntax and usage of DRUMTR is quite similar to +VOICETR. + +

      + +

      +
      +VoiceVolTr +

      + +

      +If you find that a particular voice, i.e., Piano2, is too loud or soft +you can create an entry in the ``Voice Volume Translation Table''. The +concept is quite simple: +MMA checks the table whenever a +track-specific VOLUME command is processed. The table is +created in a similar manner to the VOICETR command: + +

      + + + +
      + VoiceVolTr Piano2=120 105=75 + +
      + +

      +Each voice pair must contain a valid MIDI voice (or numeric value), +an ``='' and a volume adjustment factor. The factor is a percentage +value which is applied to the normal volume. In the above example two +adjustments are created: + +

      + +

        +
      1. Piano2 will be played at %120 of the normal value, + +

        +

      2. +
      3. Banjo (voice 105) will be played at %75 of the normal value. +
      4. +
      + +

      +The adjustments are made when a track VOLUME command is +encountered. For example, if the above translation has be set and + +MMA encounters the following commands: + +

      + + +
      + Begin Chord +
         Voice Piano2 +
         Volume mp +
         Sequence 1 4 90
      End
      @@ -115,96 +426,117 @@ End

      -If you examine some of the library files you will see that this -shortcut is used a lot. +the following adjustments are made:

      -

      -Begin -

      +
        +
      1. A look up is done in the global volume table. The volume ``mf'' + is determined to be %85 for the set MIDI velocity,

        -The BEGIN command requires any number of arguments. Valid -examples include: +

      2. +
      3. the adjustment of %120 is applied to the %85, changing that to %102. + +

        +

      4. +
      5. Assuming that no other volume adjustments are being made + (probably there will be a global volume and, perhaps, a + RVOLUME) the MIDI velocity in the sequence will be changed + from 90 to 91. Without the translation the 90 would have been changed to 76. + +

        +

      6. +
      + +

      +To disable all volume translations:

      - Begin Drum -
      -Begin Chord2 -
      -Begin Walk Define
      + VoiceVolTr // Empty table

      -Once a BEGIN block has been entered, all subsequent lines have -the words from the BEGIN command prepended to each line of -data. There is not much magic here--BEGIN/END is really -just some syntactic sugar. -

      - -

      -End +

      +
      +DrumVolTr

      -To finish off a BEGIN block, use a single END on a line -by itself. +You can change the volumes of individual drum tones with the +DRUMVOLTR translation. This command works just like the +VOICEVOLTR command described above. It just uses drum tones +instead of instrument voices.

      -Defining musical data, repeats, or other BEGINs inside a block -(other than COMMENT blocks) will not work. - -

      -Nesting is permitted. Eg: +For example, if you wish to make the drum tones ``SnareDrum1'' and +``HandClap'' a bit louder:

      - Scale Begin -
          Begin Define -
              
      stuff -
          End -
          Sequence
      stuff -
      -End
      + DrumVolTr SnareDrum1=120 HandClap=110

      -A BEGIN must be competed with a END before the end of a -file, otherwise an error will be generated. The USE and -INCLUDE commands are not permitted inside a block. -


      +The drum tone names can be symbolic constants, or MIDI values as in +the next example: + +

      + + + +
      + DrumVolTr 44=90 31=55 + +
      + +

      +All drum tone translations can be disabled with: + +

      + + + +
      + DrumVolTr // Empty table + +
      + + +

      + +

      bob -2007-03-07 +2008-09-28
      diff --git a/mma/docs/html/ref/node23.html b/mma/docs/html/ref/node23.html index 3a758ab..38b08a9 100644 --- a/mma/docs/html/ref/node23.html +++ b/mma/docs/html/ref/node23.html @@ -1,4 +1,4 @@ - + -Documentation Strings - +Other Commands and Directives + @@ -25,204 +25,1326 @@ original version by: Nikos Drakos, CBLU, University of Leeds - - + next - up - previous
      - Next: Paths, Files and Libraries - Up: Next: Begin/End Blocks + Up: Reference Manual - Previous: Begin/End Blocks -
      + Previous: Fine Tuning (Translations)
      +
      Subsections +
      -

      -Documentation Strings -

      - -

      -It has been mentioned a few times already the importance of clearly -documenting your files and library files. For the most part, you can -use comments in your files; but in library files you use the -DOC directive. - -

      -In addition to the commands listed in this chapter, you should also -note DEFGROOVES). - -

      -For some real-life examples of how to document your library files, -look at any of the library files supplied with this distribution. - -

      - -

      +

      +
      -Doc +Other Commands and Directives

      -A DOC command is pretty simple: +In addition to the ``Pattern'', ``Sequence'', ``Groove'' and +``Repeat'' and other directives discussed earlier, and chord data, + +MMA supports a number of directives which affect the flavor of your +music. + +

      +The subjects presented in this chapter are ordered alphabetically. + +

      + +

      +
      +AllTracks +

      + +

      +Sometimes you want to apply the same command to all the currently +defined tracks; for example, you might want to ensure that no +tracks have SEQRND set. Yes, you could go though each track +(and hope you don't miss any) and explicitly issue the command:

      - Doc This is a documentation string! + Bass SeqRnd Off + ... +
      +Chord SeqRnd Off

      -In most cases, DOCs are treated as COMMENTs. However, -if the -Dx23.1 option is given -on the command line, DOCs are processed and printed to standard -output. - -

      -For producing the -MMA Standard Library Reference a trivial -Python program is used to collate the output generated with a command -like: +But,

      - $ mma -Dxl -w /usr/local/lib/mma/swing + AllTracks SeqRnd Off

      -Note, the '-w' option has been used to suppress the printing of warning -messages. +is much simpler. Similarly, you can set the articulation for all +tracks with:

      -

      -Author + + +
      + AllTracks Articulate 80 + +
      + +

      +You can even combine this with a BEGIN/END like: + +

      + + + +
      + Begin AllTracks +
        Articulate 80 +
        SeqRnd Off +
        Rskip 0 +
      +End
      + +
      + +

      +This command is handy when you are changing an existing GROOVE. + +

      +Note that only currently defined tracks are effected by this command. + +

      +A further option is to limit ALLTRACKS to specific tracks +type. For example, you might want to set all the DRUM track +volumes to ``FF'': + +

      + + + +
      + AllTracks Drum Volume ff + +
      + +

      +Or to set the articulation on BASS and WALK tracks: + +

      + + + +
      + AllTracks Bass Walk Articulate 55 + +
      + +

      +It is assumed that all the arguments following the initial command +which are valid track types (Bass, Chord, Arpeggio, Scale, Drum, Walk, +Melody, or Solo) are track type limiters. + +

      + +

      +
      +Articulate

      -As part of the documentation package, there is a AUTHOR -command: +When +MMA processes a music file, all the note lengths specified in a +pattern are converted to MIDI lengths. + +

      +For example in:

      - Author Bob van der Poel + Bass Define BB 1 4 1 100; 2 4 5 90; 3 4 1 80; 4 4 5 90

      -Currently AUTHOR lines are processed and the data is saved, but -never used. It may be used in a future library documentation -procedures, so you should use it in any library files you write. +bass notes on beats 1, 2, 3 and 4 are define. All are quarter notes. + +MMA , being quite literal about things, will make each note exactly +192 MIDI ticks long--which means that the note on beat 2 will start +at the same time as the note on beat 1 ends.

      -

      -DocVar +MMA has an articulate setting for each voice. This value is applied +to shorten or lengthen the note length. By default, the setting is 90. +Each generated note duration is taken to be a percentage of this +setting, So, a quarter note with a MIDI tick duration of 192 will +become 172 ticks long. + +

      +If articulate is applied to a short note, you are guaranteed that the +note will never be less than 1 MIDI tick in length. + +

      +To set the value, use a line like: + +

      + + + +
      + Chord-1 Articulate 96 + +
      + +

      +Articulate values must be greater than 0 and less than or +equal to 200. Values over 100 will lengthen the note. Settings +greater than 120 will generate a warning. + +

      +You can specify a different ARTICULATE for each bar in a +sequence. Repeated values can be represented with a ``/'': + +

      + + + +
      + Chord Articulate 50 60 / 30 + +
      + +

      +Notes: The full values for the notes are saved with the +pattern definition. The articulation adjustment is applied at +run time. The ARTICULATE setting is saved with a +GROOVE. + +

      + +

      +
      +Copy

      -If any variables are used to change the behavior of a library file -they should be documented with a DOCVAR command. Normally these -lines are treated as comments, but when processing with the -Dxl or --Dxh command line options the data is parsed and written to the output -documentation files. - -

      -Assuming that you are using the -MMA variable $CHORDVOICE as -an optional voice setting in your file, you might have the following -in a library file: +Sometimes it is useful to duplicate the settings from one voice to +another. The COPY command does just that:

      - Begin DocVar -
      -ChordVoice Voice used in Chord tracks (defaults to Piano2). -
      -End -
      -
      -If NDef ChordVoice -
      -Set ChordVoice Piano2 -
      -Endif
      + Bass-1 Copy Bass

      -All variables used in the library file should be documented. You -should list the user variables first, and then any variables internal -to the library file. To double check to see what variables are used -you can add a SHOWVARS to the end of the library file and -compile. Then document the variables and remove the SHOWVARS. +will copy the settings from the Bass track to the Bass-1 track.

      +The COPY command only works between tracks of the same type. + +

      +The following settings are copied: + +

      + +

      + +

      +Warning: You are probably better off to use internal macros for +this. + +

      + +

      +
      +Comment +

      + +

      +As previously discussed, a comment in +MMA is anything following a +``//'' in a line. A second way of marking a comment is with the +COMMENT directive. This is quite useful in combination the +BEGIN and END directives. For example: + +

      + + + +
      + Begin Comment +
          This is a description spanning +
              several lines which will be +
              ignored by MMA. +
      +End
      + +
      + +

      +You could achieve the same with: + +

      + + + +
      + // This is a description spanning +
      // several lines which will be +
      // ignored by MMA.
      + +
      + +

      +or even: + +

      + + + +
      + Comment This is a description spanning +
      +Comment several lines which will be +
      +Comment ignored by MMA.
      + +
      + +

      +One minor difference between // and +COMMENT is that the first is discarded when the +input stream is read; the more verbose version is +discarded during line processing. + +

      +Quite often it is handy to delete large sections of a song with a +BEGIN COMMENT/END on a temporary basis. + +

      + +

      +
      +Debug +

      + +

      +To enable you to find problems in your song files (and, perhaps, even +find problems with +MMA itself) various debugging messages can be +displayed. These are normally set from the command line +command line. + +

      +However, it is possible to enable various debugging messages +dynamically in a song file using the DEBUG directive. In a +debug statement you can enable or disable any of a variety of +messages. A typical directive is: + +

      + + + +
      + Debug Debug=On Expand=Off Patterns=On + +
      + +

      +Each section of the debug directive consists of a mode +and the command word ON or OFF. The two parts +must be joined by a single ``$=$''. You may use the +values ``0'' for ``Off'' and ``1'' for ``On'' if desired. + +

      +The available modes with the equivalent command line switches are: + +

      +

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      ModeCommand Line Equivalent
      Debug-ddebugging messages
      Filenames-odisplay file names
      Patterns-ppattern creation
      Sequence-ssequence creation
      Runtime-rrunning progress
      Warnings-wwarning messages
      Expand-edisplay expanded lines
      +
      + +

      +The modes and command are case-insensitive (although the command line switches are not). + +

      +The current state of the debug flags is saved in the variable +$_Debug and the state prior to a change is saved in $_LastDebug. + +

      + +

      +
      +Delete +

      + +

      +If you are using a track in only one part of your song, especially if +it is at the start, it may be wise to free that track's resources when +you are done with it. The DELETE command does just that: + +

      + + + +
      + Solo Delete + +
      + +

      +If a MIDI channel has been assigned to that track, it is +marked as ``available'' and the track is deleted. Any data +already saved in the MIDI track will be written when +MMA is +finished processing the song file. + +

      + +

      +
      +Direction +

      + +

      +In tracks using chords or scales you can change the direction in which +they are applied: + +

      + + + +
      + Scale Direction UP + +
      + +

      +The effects differ in different track types. For SCALE and ARPEGGIO tracks: + +

      +

      + + + + + + + + + + + + + +
      UPPlays in upward direction only
      DOWNPlays in downward direction only
      BOTHPlays upward and downward (default)
      RANDOMPlays notes from the chord or scale randomly
      +
      +

      +

      When this command is encountered in a SCALE track the start +point of the scale is reset. +
      +

      + +

      +A WALK track recognizes the following option settings: + +

      +

      + + + + + + + + + + + + + +
      BOTHThe default. The bass pattern + will go up and down a partial scale. Some notes may be repeated.
      UPNotes will be chosen sequentially from an ascending, partial scale.
      DOWNNotes will be chosen sequentially from a descending, partial scale.
      RANDOMNotes will be chosen in a random direction from a partial scale.
      +
      +

      +

      All four patterns are useful and create quite different effects. + +
      + +

      +The CHORD tracks DIRECTION only has an effect when the +STRUM setting has a non-zero value. In this case the following +applies: + +

      +

      + + + + + + + + + + + + + +
      UPThe default. Notes are sounded from the lowest tone to the highest.
      DOWNNotes are sounded from the highest to the lowest.
      BOTHThe UP and DOWN values are alternated.
      RANDOMIgnored (uses UP).
      +
      + +

      +You can specify a different DIRECTION for each bar in a +sequence. Repeated values can be represented with a ``/'': + +

      + + + +
      + Arpeggio Direction Up Down / Both + +
      + +

      +The setting is ignored by BASS, DRUM and SOLO tracks. + +

      + +

      +Mallet +

      + +

      +Some instruments (Steel-drums, banjos, marimbas, etc.) are normally +played with rapidly repeating notes. Instead of painfully inserting +long lists of these notes, you can use the MALLET directive. +The MALLET directive accepts a number of options, each an +OPTION=VALUE pair. For example: + +

      + + + +
      + Solo-Marimba Mallet Rate=16 Decay=-5 + +
      + +

      +This command is also useful in creating drum rolls. For example: + +

      + + + +
      + Begin Drum-Snare2 +
        Tone SnareDrum1 +
        Volume F +
        Mallet Rate=32 Decay=-3 +
        Rvolume 3 +
        Sequence z z z 1 1 100 +
      +End
      + +
      + +

      +The following options are supported: + +

      + +

      +Rate +

      + +

      +The RATE must be a valid note length (i.e., 8, 16, or even +16.+8). + +

      +For example: + +

      + + + +
      + Solo-Marimba Mallet Rate=16 + +
      + +

      +will set all the notes in the ``Solo-Marimba'' track to be sounded a +series of 16th notes. + +

      + +

        +
      • Note duration modifiers such as articulate are applied to each + resultant note, + +

        +

      • +
      • It is guaranteed that the note will sound at least once, + +

        +

      • +
      • The use of note lengths assures a consistent sound independent + of the song tempo. + +

        +

      • +
      + +

      +To disable this setting use a value of ``0''. + +

      + +

      +Decay +

      + +

      +You can adjust the volume (velocity) of the notes being repeated when +MALLET is enabled: + +

      + + + +
      + Drum-Snare Mallet Decay=-15 + +
      + +

      +The argument is a percentage of the current value to add to the note +each time it is struck. In this example, assuming that the note length +calls for 4 ``strikes'' and the initial velocity is 100, the note will +be struck with a velocity of 100, 85, 73 and 63. + +

      +Important: a positive value will cause the notes to get louder, +negative values cause the notes to get softer. + +

      +Note velocities will never go below 1 or above 255. Note, however, +that notes with a velocity of 1 will most likely be inaudible. + +

      +The decay option value must be in the range -50 to 50; however, be +cautious using any values outside the range -5 to 5 since the volume +(velocity) of the notes will change quite quickly. The default +value is 0 (no decay). + +

      + +

      +
      +Octave +

      + +

      +When +MMA initializes and after the SEQCLEAR command all track +octaves are set to ``4''. This will place most chord and bass notes in +the region of middle C. + +

      +You can change the octave for any voice with OCTAVE command. For example: + +

      + + + +
      + Bass-1 Octave 3 + +
      + +

      +Sets the notes used in the ``Bass-1'' track one octave lower than normal. + +

      +The octave specification can be any value from 0 to 10. Various +combinations of INVERT, TRANSPOSE and OCTAVE can +force notes to be out of the valid MIDI range. In this case the lowest +or highest available note will be used. + +

      +You can specify a different OCTAVE for each bar in a sequence. +Repeated values can be represented with a ``/'': + +

      + + + +
      + Chord Octave 4 5 / 4 + +
      + +

      + +

      +
      +Off +

      + +

      +To disable the generation of MIDI output on a specific track: + +

      + + + +
      + Bass Off + +
      + +

      +This can be used anywhere in a file. Use it to override the effect of +a predefined groove, if you wish. This is simpler than resetting a +voice in a groove. The only way to reset this command is with a +ON directive. + +

      + +

      +
      +On +

      + +

      +To enable the generation of MIDI output on a specific track which has +been disabled with an OFF directive: + +

      + + + +
      + Bass On + +
      + +

      +Attempts to enable tracks disabled with the -T command line option +generate a warning (the command is ignored). + +

      + +

      +Print +

      + +

      +The PRINT directive will display its argument to the screen +when it is encountered. For example, if you want to print the file name +of the input file while processing, you could insert: + +

      + + + +
      + Print Making beautiful music for MY SONG + +
      + +

      +No control characters are supported. + +

      +This can be useful in debugging input files. + +

      + +

      +PrintActive +

      + +

      +The PRINTACTIVE directive will the currently active +GROOVE and the active tracks. This can be quite useful when +writing groove files and you want to modify and existing groove. + +

      +Any parameters given are printed as single comment at the end of the header line. + +

      +This is strictly a debugging tool. No PRINTACTIVE statements +should appear in finalized grooves or song files. + +

      + +

      +
      +ScaleType +

      + +

      +This option is only used by SCALE tracks. It can be set for +other tracks, but the setting is not used. + +

      +By default, the SCALETYPE is set to AUTO. The settings +permissible are: + +

      +

      + + + + + + + +
      CHROMATICForces use of a chromatic scale
      AUTOUses scale based on the current chord (default)
      +
      + +

      +When this command is encountered in a SCALE track the start +point of the scale is reset. + +

      + +

      + +
      +Seq +

      + +

      +If your sequence, or groove, has more than one pattern (i.e., you have +set SeqSize to a value other than 1), you can use this directive to +force a particular pattern point to be used. The directive: + +

      + + + +
      + Seq + +
      + +

      +resets the sequence counter to 1. This means that the next bar +will use the first pattern in the current sequence. You can force a +specific pattern point by using an optional value after the directive. +For example: + +

      + + + +
      + Seq 8 + +
      + +

      +forces the use of pattern point 8 for the next bar. This can be quite +useful if you have a multi-bar sequence and, perhaps, the eight bar is +variation which you want used every eight bars, but also for a +transition bar, or the final bar. Just put a SEQ 8 at those +points. You might also want to put a SEQ at the start of +sections to force the restart of the count. + +

      +If you have enable sequence randomization with the SEQRND ON +command, the randomization will be disabled by a SEQ +command.23.1 However, +settings of track SEQRND will not be effected. One difference +between SEQRND OFF and SEQ is that the current sequence +point is set with the latter; with SEQRND OFF it is left at a +random point. + +

      +Note: Using a value greater than the current SEQSIZE is not +permitted. + +

      +This is a very useful command! For example, look at the four bar +introduction of the song ``Exactly Like You'': + +

      + + + +
      + Groove BossanovaEnd +
      +seq 3 +
      +1 C +
      +seq 2 +
      +2 Am7 +
      +seq 1 +
      +3 Dm7 +
      +seq 3 +
      +4 G7 / G7#5
      + +
      + +

      +In this example the four bar ``ending groove'' has been used to create +an interesting introduction. + +

      + +

      +
      +Strum +

      + +

      +By default +MMA plays all the notes in a chord at the same time. To +make the chord more like something a guitar or banjo might play, use +the STRUM directive. For example: + +

      + + + +
      + Chord-1 Strum 5 + +
      + +

      +sets the strumming factor to 5 for track Chord-1. + +

      +Setting the STRUM in any track other than a CHORD track +will generate a warning message and the command will be ignored. + +

      +The strum factor is specified in MIDI ticks. Usually values around 10 +to 15 work just fine. The valid range for STRUM is 0 to 100. + +

      +You can specify a different STRUM for each bar in a sequence. +Repeated values can be represented with a ``/'': + +

      + + + +
      + Chord Strum 20 5 / 10 + +
      + +

      +Note: When chords have both a STRUM and INVERT applied, +the order of the notes played will not necessarily be root, third, +etc. The notes are sorted into ascending order, so for a C major scale +with and INVERT of 1 the notes played would be ``E G C''. That +is, unless the DIRECTION has been set to ``DOWN'' in which case +the order would be reversed (but the notes would be the same). + +

      + +

      +
      +Synchronize +

      + +

      +The MIDI tracks generated by +MMA are perfectly ``legit'' and should be +playable in any MIDI file player. However, there are a few programs +and/or situations in which you might need to use the SYNCHRONIZE +options. + +

      +First, when a program is expecting all tracks to start at the same +location, or is intolerant of ``emptiness'' at the start of a track, +you can add a ``tick note'' at the start of each +track.23.2 +

      + + + +
      + Synchronize START + +
      + +

      +will insert a one tick note on/off event at MIDI offset 1. You can +also generate this with the ``-0'' command line option. + +

      +Second, some programs think (wrongly) that all tracks should end at +the same point.23.3 Adding the command: + +

      + + + +
      + Synchronize END + +
      + +

      +will delete all MIDI data past the end of the last bar in your input +file and insert MIDI ``all notes off'' events at that point. You can +also generate this effect with the ``-1'' command line option. + +

      +The commands can be combined in any order: + +

      + + + +
      + Synchronize End Start + +
      + +

      +is perfectly valid. + +

      + +

      +Transpose +

      + +

      +You can change the key of a piece with the ``Transpose'' command. For +example, if you have a piece notated in the key of ``C'' and you want +it played back in the key of ``D'': + +

      + + + +
      + Transpose 2 + +
      + +

      +will raise the playback by 2 semi-tones. Since +MMA 's author plays tenor saxophone + +

      + + + +
      + Transpose -2 + +
      + +

      +which puts the MIDI keyboard into the same key as the horn, is not an +uncommon directive + +

      +You can use any value between -12 and 12. All tracks (with the logical +exception of the drum tracks) are effected by this command. + +

      + +

      +Unify +

      + +

      +The UNIFY command is used to force multiple notes of the same +voice and pitch to be combined into a single, long, tone. This is very +useful when creating a sustained voice track. For example, consider +the following which might be used in real groove file: + +

      + + + +
      + Begin Bass-Sus +
      +Sequence 1 1 1 90 4 +
      +Articulate 100 +
      +Unify On +
      +Voice TremoloStrings +
      +End
      + +
      + +

      +Without the UNIFY ON command the strings would be sounded (or +hit) four times during each bar; with it enabled the four hits are +combined into one long tone. This tone can span several bars if the +note(s) remain the same. + +

      +The use of this command depends on a number of items: + +

      + +

        +
      • The VOICE being used. It makes sense to use enable the + setting if using a sustained tone like ``Strings"; it probably + doesn't make sense if using a tone like ``Piano1''. + +

        +

      • +
      • For tones to be combined you will need to have ARTICULATE + set to a value of 100. Otherwise the on/off events will have small + gaps in them which will cancel the effects of UNIFY. + +

        +

      • +
      • Ensure that RTIME is not set for UNIFY tracks + since the start times may cause gaps. + +

        +

      • +
      • If your pattern or sequence has different volumes in different + beats (or bars) the effect of a UNIFY will be to ignore + volumes other than the first. Only the first NOTE ON and the + last NOTE OFF events will appear in the MIDI file. + +

        +

      • +
      + +

      +You can specify a different UNIFY for each bar in a sequence. +Repeated values can be represented with a ``/'': + +

      + + + +
      + Chord Unify On / / Off + +
      + +

      +But, you probably don't want to use this particular feature. + +

      +Valid arguments are ``On'' or ``1'' to enable; ``Off'' or ``0'' to +disable.


      Footnotes

      -
      ...-Dx23.1
      -
      See the command - summary. +
      ... +command.23.1
      +
      A warning message will also be displayed.
      -

      +
      ... +track.23.2
      +
      Timidity truncates the start of tracks up to the + first MIDI event when splitting out single tracks. + +
      +
      ... point.23.3
      +
      Seq24 does strange looping if all tracks + don't end identically. + +
      + +
      bob -2007-03-07 +2008-09-28
      diff --git a/mma/docs/html/ref/node24.html b/mma/docs/html/ref/node24.html index 039828a..b48bf11 100644 --- a/mma/docs/html/ref/node24.html +++ b/mma/docs/html/ref/node24.html @@ -1,4 +1,4 @@ - + -Paths, Files and Libraries - +Begin/End Blocks + @@ -25,1077 +25,190 @@ original version by: Nikos Drakos, CBLU, University of Leeds - - + next - up - previous
      - Next: Creating Effects - Up: Next: Documentation Strings + Up: Reference Manual - Previous: Documentation Strings -
      + Previous: Other Commands and Directives
      +
      Subsections -
        -
      • File Extensions -
      • Tilde Expansion -
      • Eof -
      • LibPath -
      • AutoLibPath -
      • OutPath -
      • Include -
      • IncPath -
      • Use -
      • MmaStart -
      • MmaEnd -
      • RC Files -
      • Library Files - -
        -
      • Paths on Windows Platforms +

        - +
        -Paths, Files and Libraries +Begin/End Blocks

        -This chapter covers -MMA filenames, extensions and a variety of -commands and/or directives which effect the way in which files are -read and processed. - -

        -But, first a few comments on the location of the -MMA Python modules. - -

        -The Python language (which was used to write -MMA ) has a very useful -feature: it can include other files and refer to functions and data -defined in these files. A large number of these files or modules are -included in every Python distribution. The program -MMA consists of a -short ``main'' program and several ``module'' files. Without these -additional modules -MMA will not work. - -

        -The only sticky problem in a program intended for a wider audience is -where to place these modules. Hopefully, it is a ``good thing'' that -they should be in one of three locations: +Entering a series of directives for a specific track can get quite +tedious. To make the creation of library files a bit easier, you can +create a block. For example, the following:

        -

          -
        • /usr/local/share/mma/MMA - -

          -

        • -
        • /usr/share/mma/MMA - -

          -

        • -
        • ./MMA - -

          -

        • -
        - -

        -If, when initializing itself, -MMA cannot find one of the above -directories, it will terminate with an error message. - -

        -If you are using -MMA on a Windows platform please see the comments about -the default paths (here). - -

        - -

        + + +
        + Drum Define X 0 2 100; 50 2 90
        -File Extensions +Drum Define Y 0 2 100 +
        +Drum Sequence X Y
        + +
        + +

        +Can be replaced with: + +

        + + + +
        + Drum Begin +
            Define X 0 2 100; 50 2 90 +
            Define Y 0 2 100 + End +
        +Drum Sequence X Y
        + +
        + +

        +Or, even more simply, with: + +

        + + + +
        + Drum Begin Define +
            X 0 2 100; 50 2 90 +
            Y 0 2 100 +
        +End
        + +
        + +

        +If you examine some of the library files you will see that this +shortcut is used a lot. + +

        + +

        +Begin

        -For most files the use of a the filename extension ``.mma'' is -optional. However, it is suggested that most files (with the exceptions -listed below) have the extension present. It makes it much easier to -identify -MMA song and library files and to do selective processing -on these files. +The BEGIN command requires any number of arguments. Valid +examples include:

        -In processing an input song file -MMA can encounter several different -types of input files. For all files, the initial search is done by -adding the filename extension ``.mma'' to filename (unless it is -already present), then a search for the file as given is done. + + + +
        + Begin Drum +
        +Begin Chord2 +
        +Begin Walk Define
        + +

        -For files included with the USE directive, the directory set -with SETLIBPATH is first checked, followed by the current -directory. - -

        -For files included with the INCLUDE directive, the directory -set with SETINCPATH is first checked, followed by the current -directory. - -

        -Following is a summary of the different files supported: - -

        -

        -
        Song Files
        -
        The input file specified on the command line should - always be named with the ``.mma'' extension. When -MMA searches for - the file it will automatically add the extension if the file name - specified does not exist and doesn't have the extension. - -

        -

        -
        Library Files
        -
        Library files really should all be named - with the extension. -MMA will find non-extension names when used in - a USE or INCLUDE directive. However, it will not - process these files when creating indexes with the ``-g'' command - line option--these index files are used by the GROOVE - commands to automatically find and include libraries. - -

        -

        -
        RC Files
        -
        As noted in the RC-File discussion - (here) -MMA will - automatically include a variety of ``RC'' files. You can use the - extension on these files, but common usage suggests that these files - are probably better without. - -

        -

        -
        MMAstart and MMAend
        -
        -MMA will automatically include a file at - the beginning or end of processing (start/end - details). Typically these files are - named MMASTART and MMAEND. Common usage is to - not use the extension if the file is in the current - directory; use the file if it is in an ``includes'' directory. - -

        -

        -
        - -

        -One further point to remember is that filenames specified on the -command line are subject to wild-card expansion via the shell you are -using. +Once a BEGIN block has been entered, all subsequent lines have +the words from the BEGIN command prepended to each line of +data. There is not much magic here--BEGIN/END is really +just some syntactic sugar.

        -Tilde Expansion +End

        -On Unix-like systems all filenames may be prefaced with tilde or a -tilde with a username. All file operations in -MMA honor this -convention. This includes the setting of library and include paths. +To finish off a BEGIN block, use a single END on a line +by itself.

        -The result of this operation is system dependent. See the entry for -os.path.expanduser in the Python library reference. +Defining musical data, repeats, or other BEGINs inside a block +(other than COMMENT blocks) will not work.

        - -

        -Eof -

        - -

        -Normally, a file is processed until its end. However, you can -short-circuit this behavior with the EOF directive. If -MMA finds a line starting with EOF no further processing will be -done on that file ... it's just as if the real end of file was -encountered. Anything on the same line, after the EOF is also -discarded. - -

        -You may find this handy if you want to test process only a part of a -file, or if you making large edits to a library file. It is often used -to quit when using the LABEL and GOTO directives to -simulate constructs like D.C. al Coda, etc. - -

        - -

        -
        -LibPath -

        - -

        -The search for library files can be set with the LibPath variable. To -set LIBPATH: +Nesting is permitted. Eg:

        - SetLibPath PATH + Scale Begin +
            Begin Define +
                
        stuff +
            End +
            Sequence
        stuff +
        +End

        -You can have only one path in the SETLIBPATH directive. +A BEGIN must be competed with a END before the end of a +file, otherwise an error will be generated. The USE and +INCLUDE commands are not permitted inside a block.

        -When -MMA starts up it sets the library path to the first valid -directory in the list: -

        - -

          -
        • /usr/local/share/mma/lib - -

          -

        • -
        • /usr/share/mma/lib - -

          -

        • -
        • ./lib - -

          -

        • -
        - -

        -The last choice lets you run -MMA directly from the distribution -directory. - -

        -You are free to change this to any other location in a -RCFile. - -

        -LIBPATH is used by the routine which auto-loads grooves from -the library, and the USE directive. The -g command line option -is used to maintain the library database). - -

        -The current setting can be accessed via the macro $_LibPath. - -

        - -

        -AutoLibPath -

        - -

        -The sub-directory containing the current library files to automatically -load is determined by the current setting of AUTOLIBPATH. -Please see the library file discussion here for details. - -

        -You can change the automatic include directory by resetting this -variable. It must be a sub-directory of LIBPATH for it to work. - -

        -The command to reset the variable is: - -

        - - - -
        - SetAutoLibPath mydir - -
        - -

        -The current setting can be accessed via the macro $_AutoLibPath. By -default the setting is ``stdlib''. - -

        -Any existing GROOVE definitions are deleted from memory when -this command is issued (this it to avoid name conflicts between libraries). - -

        - -

        -
        -OutPath -

        - -

        -MIDI file generation is to an automatically generated filename -(more details). If the -OUTPATH variable is set, that value will be prepended to the -output filename. To set the value: - -

        - - - -
        - SetOutPath PATH - -
        - -

        -Just make sure that ``PATH'' is a simple path name with no -spaces in it. The variable is case sensitive (assuming that your -operating system supports case sensitive filenames). This is a common -directive in a RC file (more details). By default, it has no value. - -

        -You can disable the OUTPATH variable quite simply: just issue -the command without an argument. - -

        -If the name set by this command begins with a ``.'', ``/'' or -`` \'' it is prepended to the complete filename specified on -the command line. For example, if you have the input filename -test.mma and the output path is -~/mids ---the output file will be /home/bob/mids/test.mid. - -

        -If the name doesn't start with the special characters noted in the -preceding paragraph the contents of the path will be inserted before -the filename portion of the input filename. Again, an example: the -input filename is mma/rock/crying and the output path is -``midi''--the output file will be mma/rock/midi/crying.mid. - -

        -The current setting can be accessed via the macro $_OutPath. - -

        -Note that this option is ignored if you use the -f - command line option or -if an absolute name for the input file (one starting with a ``/'' or - a ``~'') is used. - -

        - -

        -Include -

        - -

        -Other files with sequence, pattern or music data can be included at -any point in your input file. There is no limit to the level of -includes. - -

        - - - -
        - Include Filename - -
        - -

        -A search for the file is done in the INCPATH directory (see -below) and the current directory. The ``.mma'' filename extension is -optional (if a filename exists both with and without the ``.mma'' -extension, the file with the extension will be used). - -

        -The use of this command should be quite rare in user files; however, -it is used extensively in library files to include standard -patterns. - -

        - -

        -
        -IncPath -

        - -

        -The search for include files can be set with the INCPATH -variable. To set INCPATH: - -

        - - - -
        - SetIncPath PATH - -
        - -

        -You can have only one path in the SETINCPATH directive. - -

        -When -MMA initializes it sets the include path to first found directory in: - -

        - -

          -
        • /usr/local/share/mma/includes -
        • -
        • /usr/share/mma/includes -
        • -
        • ./includes - -

          -

        • -
        - -

        -The last location lets you run -MMA from the distribution directory. - -

        -If this value is not appropriate for your system, you are free to -change it in a RC File. - -

        -The current setting can be accessed via the macro $_IncPath. - -

        - -

        -
        -Use -

        - -

        -Similar to INCLUDE, but a bit more useful. The USE -command is used to include library files and their predefined grooves. - -

        -Compared to INCLUDE, USE has important features: - -

        - -

          -
        • The search for the file is done in the paths specified by the LibPath variable, - -

          -

        • -
        • The current state of the program is saved before the library - file is read and restored when the operation is complete. - -

          -

        • -
        - -

        -Let's examine each feature in a bit more detail. - -

        -When a USE directive is issued, eg: - -

        - - - -
        - use stdlib/swing - -
        - -

        - -MMA first attempts to locate the file ``stdlib/swing'' in the -directory specified by LIBPATH or the current directory. As -mentioned above, -MMA automatically added the ``.mma'' extension to -the file and checks for the non-extension filename if that can't be -found. - -

        -If things aren't working out quite right, check to see if the filename -is correct. Problems you can encounter include: - -

        - -

          -
        • Search order: you might be expecting the file in the current - directory to be used, but the same filename exists in the - LIBPATH, in which case that file is used. - -

          -

        • -
        • Not using extensions: Remember that files with the - extension added are first checked. - -

          -

        • -
        • Case: The filename is case sensitive. The files ``Swing'' - and ``swing'' are not the same. Since most things in -MMA are case - insensitive, this can be an easy mistake to make. - -

          -

        • -
        • The file is in a sub directory of the LIBPATH. In a - standard distribution the actual library files are in - /usr/local/share/mma/lib/stdlib, but the libpath is set to - /usr/local/share/mma/lib. In this case you must name the file - to be used as stdlib/rhumba not rhumba. - -

          -

        • -
        - -

        -As mentioned above, the current state of the compiler is saved during -a USE. -MMA accomplishes this by issuing a slightly modified -DEFGROOVE and GROOVE command before and after the -reading of the file. Please note that INCLUDE doesn't do this. -But, don't let this feature fool you--since the effects of defining -grooves are cumulative you really should have SEQCLEAR -statements at the top of all your library files. If you don't you'll -end up with unwanted tracks in the grooves you are defining. - -

        -In most cases you will not need to use the USE directive - in your music files. If you have properly installed -MMA and keep -the database up-to-date by using the command: - -

        - - - -
        - $ mma -g - -
        - -

        -grooves from library files will be automatically found and loaded. -Internally, the USE directive is used, so existing states are -saved. - -

        -If you are developing new or alternate library files you will find the -USE directive handy. - -

        - -

        -
        -MmaStart -

        - -

        -If you wish to process a certain file or files before your main input -file, set the MMASTART filename in an RCFile. For example, you -might have a number of files in a directory which you wish to use -certain PAN settings. In that directory, you just need to have -a file mmarc which contains the following command: - -

        - - - -
        - MmaStart setpan - -
        - -

        -The actual file setpan has the following directives: - -

        - - - -
        - Bass Pan 0 -
        -Bass1 Pan 0 -
        -Bass2 Pan 0 -
        -Walk Pan 0 -
        -Walk1 Pan 0 -
        -Walk2 Pan 0
        - -
        - -

        -So, before each file in that directory is processed, the PAN -for the bass and walking bass voices are set to the left channel. - -

        -If the file specified by a MMASTART directive does not exist a -warning message will be printed (this is not an error). - -

        -Also useful is the ability to include a generic file with all the MIDI -files you create. For example, you might like to have a MIDI reset at the -start of your files--simple, just include the following in your mmarc file: - -

        - - - -
        - MMAstart reset - -
        - -

        -This includes the file reset.mma located in the ``includes'' -directory (IncludePath). - -

        -Multiple MMASTART directives are permitted. The files are -processed in the order declared. You can have multiple filenames on a -MMASTART line. - -

        -One caution with MMASTART files: the file is processed after -the RC file, just before the actual song file. - -

        - -

        -
        -MmaEnd -

        - -

        -Just the opposite of MMASTART, this command specifies a file to -be included at the end of a main input file. See the comments above -for more details. - -

        -To continue this example, in your mmarc file you would have: - -

        - - - -
        - MmaEnd nopan - -
        - -

        -and in the file nopan have: - -

        - - - -
        - Bass Pan 64 -
        -Bass1 Pan 64 -
        -Bass2 Pan 64 -
        -Walk Pan 64 -
        -Walk1 Pan 64 -
        -Walk2 Pan 64
        - -
        - -

        -If the file specified by a MMAEND directive does not exist a -warning message will be printed (this is not an error). - -

        -Multiple MMAEND directives are permitted and processed in the -order declared. You can have multiple filenames on a MMAEND line. - -

        - -

        - -
        -RC Files -

        - -

        -When -MMA starts it checks for initialization files. Only the first -found file is processed. The following locations/files are checked (in order): - -

        - -

          -
        1. mmarc -- this is a normal file in the current directory. - -

          -

        2. -
        3. ~/.mmarc -- this is an ``invisible'' file in the users - home directory. - -

          -

        4. -
        5. /usr/local/etc/mmarc - -

          -

        6. -
        7. /etc/mmarc - -

          -

        8. -
        - -

        - Only the first found file will be processed. This means you can -override a ``global'' RC file with a user specific one. If you just -want to override some specific commands you might want to: - -

        - -

          -
        1. Create the file mmarc in a directory with -MMA files, - -

          -

        2. -
        3. As the first line in that file have the command: - -

          - - - -
          - include ~/.mmarc - -
          - -

          -to force the inclusion of your global stuff, - -

          -

        4. -
        5. Now, place your directory specific commands in your custom RC file. -
        6. -
        - -

        -By default, no RC files are installed. You may want to create an empty -~/.mmarc file to eliminate a warning message. - -

        -An alternate method for using a different RC file is to specify the -name of the file on the command line by using the -i option -(here). Using this option -you can have several RC files in a directory and complile your songs -differently depending on the RC file you specify. - -

        -The RC file is processed as a -MMA input file. As such, it can -contain anything a normal input file can, including music commands. -However, you should limit the contents of RC files to things -like: - -

        - - - -
        - SetOutPath -
        -SetLibPath -
        -MMAStart -
        -MMAEnd
        - -
        - -

        -A useful setup is to have your source files in one directory and MIDI -files saved into a different directory. Having the file mmarc -in the directory with the source files permits setting OUTPATH -to the MIDI path. - -

        - -

        -
        -Library Files -

        - -

        -Included in this distribution are a number of predefined patterns, -sequences and grooves. They are in different files in the ``lib'' -directory. - -

        -The library files should be self-documenting. A list of standard file -and the grooves they define is included in the separate document, -supplied in this distribution as ``mma-lib.ps''. - -

        - -

        -
        -Maintaining and Using Libraries -

        - -

        -The basic -MMA distribution comes with a set of pattern files which -are installed in the mma/lib/stdlib directory. Each one of -these files has a number of GROOVEs defined in them. For -example, the file mma/lib/stdlib/rhumba.mma contains the -grooves Rhumba, RhumbaEnd and many more. - -

        -If you are writing GROOVEs with the intention of adding them to -the standard library you should ensure that none of the names you -choose duplicate existing names already used. - -

        -If you are creating a set of alternate grooves to duplicate the -existing library you might do the following: - -

        - -

          -
        1. Create a directory with your name or other short id in the - mma/lib/ hierarchy. For example, if your name is ``Bob van - der Poel'' you might create the directory mma/lib/bvdp. - -

          -

        2. -
        3. Place all your files (or modified files) in that directory. - -

          -

        4. -
        5. Now, when your song wants to use a groove, you have two choices: - -

          - -

            -
          1. Include the file with the USE directive. For example, - if you have created the file rock.mma and want to use the - GROOVE rock8 you would: - -

            - -

              -
            1. place the directive USE BVDP/ROCK near the top of the - song file. Note: it might not be apparent from the typeface here, but the - filename here is all lowercase. In Unix/Linux case is important, so - please make sure of the case of the filenames in commands like USE. - -

              -

            2. -
            3. enable the groove with the directive GROOVE ROCK8 (and here the - case is not important since -MMA thinks that upper and lower case are the same). - -

              -

            4. -
            - -

            -

          2. -
          3. Force -MMA to use your groove directory by resetting - the auto-lib directory (again, the case for the path is important): - -

            - - - -
            - SetAutoLibPath bvdp - -
            - -

            -You will have to update the -MMA database with the -g or -G - command line options for this to work. If you elect this route, - please note that the files in the standard library will not be - available, but you can use both with something like this: - -

            - - - -
            - Groove Metronome2-4 -
            -z * 2 -
            -SetAutoLibPath bvdp -
            -Groove BossaNova // the bossa from lib/bvdp, not stdlib! -
            -chords...
            - -
            - -

            -The nice thing about this method is that you can have multiple - sets of library files all using the same GROOVE - names. To create a different version you just need to change - the SETAUTOLIBPATH variable in your song file ...or, - for a collection of songs put the variable in your MMARC - file. - -

            -

          4. -
          - -

          -

        6. -
        - -

        -For those who ``really need to know'', here are the steps that -MMA takes when it encounters a GROOVE command: - -

        - -

          -
        1. if the named groove has been loaded/created already -MMA just - switches to the internal version of that groove. - -

          -

        2. -
        3. if the groove can't be found in memory, a search of the groove - database (created with the -g command line option) is done. If no - database is in memory it is loaded from the directory pointed to by - the LIBPATH and AUTOLIBPATH variables. This database - is then searched for the needed GROOVE. The database contains - the filenames associated with each GROOVE and that file is - then read with the USE code. - -

          -

        4. -
        - -

        -The database is a file .mmaDB stored in each sub directory of -LIBPATH. This is a ``hidden'' file (due to the leading ``.'' in -the filename). You cannot change the name of this file. If there are -sub-directories the entries for them will be stored in the database -file for the main tree. - -

        -By using a USE directive or by resetting AUTOLIBDIR you -force the loading of your set of grooves. - -

        - -

        - -
        -Paths on Windows Platforms -

        - -

        -To make -MMA as platform independent as possible a number of additional paths have been -defined. When starting up, in addition to the standard Linux paths discussed above, the -following are also checked: - -

        - -

          -
        • Modules can be in c: -
          -mma
          , -
        • -
        • Include files can be in c: -
          -mma -
          -includes
          , -
        • -
        • Library files can be in c: -
          -mma -
          -lib
          . - -

          -

        • -
        - -

        -


        +
        bob -2007-03-07 +2008-09-28
        diff --git a/mma/docs/html/ref/node25.html b/mma/docs/html/ref/node25.html index 49d1062..89a169c 100644 --- a/mma/docs/html/ref/node25.html +++ b/mma/docs/html/ref/node25.html @@ -1,4 +1,4 @@ - + -Creating Effects - +Documentation Strings + @@ -25,192 +25,206 @@ original version by: Nikos Drakos, CBLU, University of Leeds - - + next - up - previous
        - Next: Frequency Asked Questions - Up: Next: Paths, Files and Libraries + Up: Reference Manual - Previous: Paths, Files and Libraries -
        + Previous: Begin/End Blocks
        +
        Subsections -
          -
        • Overlapping Notes -
        • Jungle Birds +
          -

          - -
          -Creating Effects +

          +Documentation Strings

          -It's really quite amazing how easy and effective it is to create -different patterns, sequences and special effects. As -MMA was -developed lots of silly things were tried...this chapter is an -attempt to display and preserve some of them. +It has been mentioned a few times already the importance of clearly +documenting your files and library files. For the most part, you can +use comments in your files; but in library files you use the +DOC directive.

          -The examples don't show any music to apply the patterns or sequences -to. The manual assumes that if you've read this far you'll know -that you should have something like: +In addition to the commands listed in this chapter, you should also +note DEFGROOVES). + +

          +For some real-life examples of how to document your library files, +look at any of the library files supplied with this distribution.

          - - -
          - 1 C +


          -2 G -
          -3 G -
          -4 C
          - -

          - -

          -as a simple test piece to apply tests to. - -

          - -

          -Overlapping Notes +Doc

          -As a general rule, you should not create patterns in which notes -overlap. However, here's an interesting effect which relies on -ignoring that rule: +A DOC command is pretty simple:

          - Begin Scale -
              define S1 1 1+1+1+1 90 -
              define S32 S1 * 32 -
              Sequence S32 -
              ScaleType -
              Direction Both -
              Voice Accordion -
              Octave 5 -
          -End
          + Doc This is a documentation string!

          -``S1'' is defined with a note length of 4 whole notes (1+1+1+1) so that -when it is multiplied for S32 a pattern of 32 8th notes is created. -Of course, the notes overlap. Running this up and down a chromatic -scale is ``interesting.'' You might want to play with this a bit and -try changing ``S1'' to: +In most cases, DOCs are treated as COMMENTs. However, +if the -Dx25.1 option is given +on the command line, DOCs are processed and printed to standard +output. + +

          +For producing the +MMA Standard Library Reference a trivial +Python program is used to collate the output generated with a command +like:

          - define S1 1 1 90 + $ mma -Dxl -w /usr/local/lib/mma/swing

          -to see what the effect is of the notes overlapping. +Note, the '-w' option has been used to suppress the printing of warning +messages.

          -Jungle Birds +Author

          -Here's another use for SCALEs. Someone (certainly not the -author) decided that some jungle sounds would be perfect as an -introduction to ``Yellow Bird''. +As part of the documentation package, there is a AUTHOR +command:

          - groove Rhumba -
          -Begin Scale -
              define S1 1 1 90 -
              define S32 S1 * 32 -
              Sequence S32 -
              ScaleType Chromatic -
              Direction Random -
              Voice BirdTweet -
              Octave 5 6 4 5 -
              RVolume 30 -
              Rtime 2 3 4 5 -
              Volume pp pp ppp ppp -
          -End -
          -DefGroove BirdRhumba
          + Author Bob van der Poel

          -The above is an extract from the -MMA score. The entire song is -included in the ``songs'' directory of this distribution. +Currently AUTHOR lines are processed and the data is saved, but +never used. It may be used in a future library documentation +procedures, so you should use it in any library files you write.

          -A neat trick is to create the bird sound track and then add it to the -existing Rhumba groove. Then define a new groove. Now one can select -either the library ``rhumba'' or the enhanced ``BirdRhumba'' with a -simple GROOVE directive. + +

          +DocVar +

          -


          +If any variables are used to change the behavior of a library file +they should be documented with a DOCVAR command. Normally these +lines are treated as comments, but when processing with the -Dxl or +-Dxh command line options the data is parsed and written to the output +documentation files. + +

          +Assuming that you are using the +MMA variable $CHORDVOICE as +an optional voice setting in your file, you might have the following +in a library file: + +

          + + + +
          + Begin DocVar +
          +ChordVoice Voice used in Chord tracks (defaults to Piano2). +
          +End +
          +
          +If NDef ChordVoice +
          +Set ChordVoice Piano2 +
          +Endif
          + +
          + +

          +All variables used in the library file should be documented. You +should list the user variables first, and then any variables internal +to the library file. To double check to see what variables are used +you can add a SHOWVARS to the end of the library file and +compile. Then document the variables and remove the SHOWVARS. + +

          +


          Footnotes

          +
          +
          ...-Dx25.1
          +
          See the command + summary. + +
          +
          +
          bob -2007-03-07 +2008-09-28
          diff --git a/mma/docs/html/ref/node26.html b/mma/docs/html/ref/node26.html index 93d44de..218cae4 100644 --- a/mma/docs/html/ref/node26.html +++ b/mma/docs/html/ref/node26.html @@ -1,4 +1,4 @@ - + -Frequency Asked Questions - +Paths, Files and Libraries + @@ -25,247 +25,1110 @@ original version by: Nikos Drakos, CBLU, University of Leeds - - + next - up - previous
          - Next: Symbols and Constants - Up: Next: Creating Effects + Up: Reference Manual - Previous: Creating Effects -
          + Previous: Documentation Strings
          +
          Subsections +

          - +
          -Frequency Asked Questions +Paths, Files and Libraries

          -This chapter will serve as a container for questions asked by -some enthusiastic -MMA users. It may make some sense in the future to -distribute this information as a separate file. +This chapter covers +MMA filenames, extensions and a variety of +commands and/or directives which effect the way in which files are +read and processed. + +

          +But, first a few comments on the location of the +MMA Python modules. + +

          +The Python language (which was used to write +MMA ) has a very useful +feature: it can include other files and refer to functions and data +defined in these files. A large number of these files or modules are +included in every Python distribution. The program +MMA consists of a +short ``main'' program and several ``module'' files. Without these +additional modules +MMA will not work. + +

          +The only sticky problem in a program intended for a wider audience is +where to place these modules. Hopefully, it is a ``good thing'' that +they should be in one of three locations:

          -

          -Chord Octaves +
            +
          • /usr/local/share/mma/MMA + +

            +

          • +
          • /usr/share/mma/MMA + +

            +

          • +
          • ./MMA + +

            +

          • +
          + +

          +If, when initializing itself, +MMA cannot find one of the above +directories, it will terminate with an error message. + +

          +If you are using +MMA on a Windows platform please see the comments about +the default paths (here). + +

          + +

          +
          +File Extensions

          -I've keyed in a song but some of the chords sound way too high - (or low). +For most files the use of a the file name extension ``.mma'' is +optional. However, it is suggested that most files (with the exceptions +listed below) have the extension present. It makes it much easier to +identify +MMA song and library files and to do selective processing +on these files.

          -When a real player plays chords he or she adjusts the position of the -chords so that they don't ``bounce'' around between octaves. One way +In processing an input song file +MMA can encounter several different +types of input files. For all files, the initial search is done by +adding the file name extension ``.mma'' to file name (unless it is +already present), then a search for the file as given is done. -MMA tries to do the same is with the ``Voicing Mode=Optimal'' -setting. However, sometimes the chord range of a piece is too large -for this to work properly. In this case you'll have to use the octave -adjustments in chords. For more details go here. +

          +For files included with the USE directive, the directory set +with SETLIBPATH is first checked, followed by the current +directory. + +

          +For files included with the INCLUDE directive, the directory +set with SETINCPATH is first checked, followed by the current +directory. + +

          +Following is a summary of the different files supported: + +

          +

          +
          Song Files
          +
          The input file specified on the command line should + always be named with the ``.mma'' extension. When +MMA searches for + the file it will automatically add the extension if the file name + specified does not exist and doesn't have the extension. + +

          +

          +
          Library Files
          +
          Library files really should all be named + with the extension. +MMA will find non-extension names when used in + a USE or INCLUDE directive. However, it will not + process these files when creating indexes with the ``-g'' command + line option--these index files are used by the GROOVE + commands to automatically find and include libraries. + +

          +

          +
          RC Files
          +
          As noted in the RC-File discussion + (here) +MMA will + automatically include a variety of ``RC'' files. You can use the + extension on these files, but common usage suggests that these files + are probably better without. + +

          +

          +
          MMAstart and MMAend
          +
          +MMA will automatically include a file at + the beginning or end of processing (start/end + details). Typically these files are + named MMASTART and MMAEND. Common usage is to + not use the extension if the file is in the current + directory; use the file if it is in an ``includes'' directory. + +

          +

          +
          + +

          +One further point to remember is that filenames specified on the +command line are subject to wild-card expansion via the shell you are +using.

          -AABA Song Forms +Tilde Expansion

          -How can one define parts as part "A", part "B" ...and - arrange them at the end of the file? An option to repeat a ``solo'' - section a number of times would be nice as well. +On Unix-like systems all filenames may be prefaced with tilde or a +tilde with a user name. All file operations in +MMA honor this +convention. This includes the setting of library and include paths.

          -Using -MMA variables and some simple looping, one might try something like: - -

          - - - -
          - Groove Swing -
          // Set the music into a -
          // series of macros -
          -mset A -
            Print Section A -
            C -
            G -
          -endmset -
          -mset B -
            print Section B -
            Dm -
            Em -
          -endmset -
          -mset Solo -
            Print Solo Section $Count -
            Am / B7 Cdim -
          -endmset -
          // Use the macros for an -
          // "A, A, B, Solo * 8, A" -
          // form -
          $A -
          $A -
          $B -
          -set Count 1 -
          -label a -
            $solo -
            inc COUNT -
            if le $count 8 -
              goto A -
            endif -
          $A -
          - -
          - -

          -Note that the ``Print'' lines are used for debugging purposes. The case -of the variable names has been mixed to illustrate the fact that -``Solo'' is the same as ``SOLO'' which is the same as ``solo''. - -

          -Now, if you don't like things that look like old BASIC program code, -you could just as easily duplicate the above with: - -

          - - - -
          - Groove Swing -
          -repeat -
            repeat -
              Print Section A -
              C -
              G -
              If Def count -
                eof -
              Endif -
              Endrepeat -
              Print Section B -
              Dm -
              Em -
              Set Count 1 -
              Repeat -
                Print Solo $Count -
                Am -
                Inc Count -
              Repeatending 7 -
            Repeatend -
          -Repeatend
          - -
          - -

          -The choice is up to you. +The result of this operation is system dependent. See the entry for +os.path.expanduser in the Python library reference.

          -Where's the GUI? +Eof

          -I really think that -MMA is a cool program. But, it needs a - GUI. Are you planning on writing one? Will you help me if I - start to write one? +Normally, a file is processed until its end. However, you can +short-circuit this behavior with the EOF directive. If +MMA finds a line starting with EOF no further processing will be +done on that file ... it's just as if the real end of file was +encountered. Anything on the same line, after the EOF is also +discarded.

          -Thanks for the kind comments! The author likes -MMA too. A lot! - -

          -Some attempts have been made to write a number of GUIs for - -MMA . But, nothing seemed to be much more useful than the existing -text interface. So, why waste too much time? There is nothing wrong with -graphical programming interfaces, but perhaps not in this case. - -

          -But, I may well be wrong. If you think it'd be better with a -GUI ...well, this is open source and you are more than -welcome to write one. If you do, I'd suggest that you make your -program a front-end which lets a user compile standard -MMA files. If -you find that more error reporting, etc. is required to interact -properly with your code, let me know and I'll probably be quite -willing to make those kind of changes. +You may find this handy if you want to test process only a part of a +file, or if you making large edits to a library file. It is often used +to quit when using the LABEL and GOTO directives to +simulate constructs like D.C. al Coda, etc.

          -

          -Where's the manual index? +

          +
          +LibPath

          -Yes,this manual needs an index. I just don't have the time -to go though and do all the necessary work. Is there a volunteer? +The search for library files can be set with the LibPath variable. To +set LIBPATH:

          + + +
          + SetLibPath PATH + +
          +

          -


          +You can have only one path in the SETLIBPATH directive. + +

          +When +MMA starts up it sets the library path to the first valid +directory in the list: + +

          + +

            +
          • /usr/local/share/mma/lib + +

            +

          • +
          • /usr/share/mma/lib + +

            +

          • +
          • ./lib + +

            +

          • +
          + +

          +The last choice lets you run +MMA directly from the distribution +directory. + +

          +You are free to change this to any other location in a +RCFile. + +

          +LIBPATH is used by the routine which auto-loads grooves from +the library, and the USE directive. The -g command line option +is used to maintain the library database). + +

          +The current setting can be accessed via the macro $_LibPath. + +

          + +

          +AutoLibPath +

          + +

          +The sub-directory containing the current library files to automatically +load is determined by the current setting of AUTOLIBPATH. +Please see the library file discussion here for details. + +

          +You can change the automatic include directory by resetting this +variable. It must be a sub-directory of LIBPATH for it to work. + +

          +The command to reset the variable is: + +

          + + + +
          + SetAutoLibPath mydir + +
          + +

          +The current setting can be accessed via the macro $_AutoLibPath. By +default the setting is ``stdlib''. + +

          +Any existing GROOVE definitions are deleted from memory when +this command is issued (this it to avoid name conflicts between +libraries). + +

          + +

          +
          +MIDIPlayer +

          + +

          +When using the -P command line option +MMA uses the MIDI file player +defined with SETMIDIPLAYER to play the generated file. By +default the program is set to ``aplaymidi''. You can change this to +anything you want. + +

          + + + +
          + SetMIDIplayer /usr/local/kmid + +
          + +

          +You will probably want to use this command in an RC file. + +

          + +

          +
          +OutPath +

          + +

          +MIDI file generation is to an automatically generated filename +(more details). If the +OUTPATH variable is set, that value will be prepended to the +output filename. To set the value: + +

          + + + +
          + SetOutPath PATH + +
          + +

          +Just make sure that ``PATH'' is a simple path name with no +spaces in it. The variable is case sensitive (assuming that your +operating system supports case sensitive filenames). This is a common +directive in a RC file (more details). By default, it has no value. + +

          +You can disable the OUTPATH variable quite simply: just issue +the command without an argument. + +

          +If the name set by this command begins with a ``.'', ``/'' or +`` \'' it is prepended to the complete filename specified on +the command line. For example, if you have the input filename +test.mma and the output path is +~/mids +--the output file will be /home/bob/mids/test.mid. + +

          +If the name doesn't start with the special characters noted in the +preceding paragraph the contents of the path will be inserted before +the filename portion of the input filename. Again, an example: the +input filename is mma/rock/crying and the output path is +``midi''--the output file will be mma/rock/midi/crying.mid. + +

          +The current setting can be accessed via the macro $_OutPath. + +

          +Note that this option is ignored if you use the -f + command line option or +if an absolute name for the input file (one starting with a ``/'' or + a ``~'') is used. + +

          + +

          + +
          +Include +

          + +

          +Other files with sequence, pattern or music data can be included at +any point in your input file. There is no limit to the level of +includes. + +

          + + + +
          + Include Filename + +
          + +

          +A search for the file is done in the INCPATH directory (see +below) and the current directory. The ``.mma'' filename extension is +optional (if a filename exists both with and without the ``.mma'' +extension, the file with the extension will be used). + +

          +The use of this command should be quite rare in user files; however, +it is used extensively in library files to include standard +patterns. + +

          + +

          +
          +IncPath +

          + +

          +The search for include files can be set with the INCPATH +variable. To set INCPATH: + +

          + + + +
          + SetIncPath PATH + +
          + +

          +You can have only one path in the SETINCPATH directive. + +

          +When +MMA initializes it sets the include path to first found directory in: + +

          + +

            +
          • /usr/local/share/mma/includes +
          • +
          • /usr/share/mma/includes +
          • +
          • ./includes + +

            +

          • +
          + +

          +The last location lets you run +MMA from the distribution directory. + +

          +If this value is not appropriate for your system, you are free to +change it in a RC File. + +

          +The current setting can be accessed via the macro $_IncPath. + +

          + +

          +
          +Use +

          + +

          +Similar to INCLUDE, but a bit more useful. The USE +command is used to include library files and their predefined grooves. + +

          +Compared to INCLUDE, USE has important features: + +

          + +

            +
          • The search for the file is done in the paths specified by the LibPath variable, + +

            +

          • +
          • The current state of the program is saved before the library + file is read and restored when the operation is complete. + +

            +

          • +
          + +

          +Let's examine each feature in a bit more detail. + +

          +When a USE directive is issued, eg: + +

          + + + +
          + use stdlib/swing + +
          + +

          + +MMA first attempts to locate the file ``stdlib/swing'' in the +directory specified by LIBPATH or the current directory. As +mentioned above, +MMA automatically added the ``.mma'' extension to +the file and checks for the non-extension filename if that can't be +found. + +

          +If things aren't working out quite right, check to see if the filename +is correct. Problems you can encounter include: + +

          + +

            +
          • Search order: you might be expecting the file in the current + directory to be used, but the same filename exists in the + LIBPATH, in which case that file is used. + +

            +

          • +
          • Not using extensions: Remember that files with the + extension added are first checked. + +

            +

          • +
          • Case: The filename is case sensitive. The files ``Swing'' + and ``swing'' are not the same. Since most things in +MMA are case + insensitive, this can be an easy mistake to make. + +

            +

          • +
          • The file is in a sub directory of the LIBPATH. In a + standard distribution the actual library files are in + /usr/local/share/mma/lib/stdlib, but the libpath is set to + /usr/local/share/mma/lib. In this case you must name the file + to be used as stdlib/rhumba not rhumba. + +

            +

          • +
          + +

          +As mentioned above, the current state of the compiler is saved during +a USE. +MMA accomplishes this by issuing a slightly modified +DEFGROOVE and GROOVE command before and after the +reading of the file. Please note that INCLUDE doesn't do this. +But, don't let this feature fool you--since the effects of defining +grooves are cumulative you really should have SEQCLEAR +statements at the top of all your library files. If you don't you'll +end up with unwanted tracks in the grooves you are defining. + +

          +In most cases you will not need to use the USE directive + in your music files. If you have properly installed +MMA and keep +the database up-to-date by using the command: + +

          + + + +
          + $ mma -g + +
          + +

          +grooves from library files will be automatically found and loaded. +Internally, the USE directive is used, so existing states are +saved. + +

          +If you are developing new or alternate library files you will find the +USE directive handy. + +

          + +

          +
          +MmaStart +

          + +

          +If you wish to process a certain file or files before your main input +file, set the MMASTART filename in an RCFile. For example, you +might have a number of files in a directory which you wish to use +certain PAN settings. In that directory, you just need to have +a file mmarc which contains the following command: + +

          + + + +
          + MmaStart setpan + +
          + +

          +The actual file setpan has the following directives: + +

          + + + +
          + Bass Pan 0 +
          +Bass1 Pan 0 +
          +Bass2 Pan 0 +
          +Walk Pan 0 +
          +Walk1 Pan 0 +
          +Walk2 Pan 0
          + +
          + +

          +So, before each file in that directory is processed, the PAN +for the bass and walking bass voices are set to the left channel. + +

          +If the file specified by a MMASTART directive does not exist a +warning message will be printed (this is not an error). + +

          +Also useful is the ability to include a generic file with all the MIDI +files you create. For example, you might like to have a MIDI reset at the +start of your files--simple, just include the following in your mmarc file: + +

          + + + +
          + MMAstart reset + +
          + +

          +This includes the file reset.mma located in the ``includes'' +directory (IncludePath). + +

          +Multiple MMASTART directives are permitted. The files are +processed in the order declared. You can have multiple filenames on a +MMASTART line. + +

          +One caution with MMASTART files: the file is processed after +the RC file, just before the actual song file. + +

          + +

          +
          +MmaEnd +

          + +

          +Just the opposite of MMASTART, this command specifies a file to +be included at the end of a main input file. See the comments above +for more details. + +

          +To continue this example, in your mmarc file you would have: + +

          + + + +
          + MmaEnd nopan + +
          + +

          +and in the file nopan have: + +

          + + + +
          + Bass Pan 64 +
          +Bass1 Pan 64 +
          +Bass2 Pan 64 +
          +Walk Pan 64 +
          +Walk1 Pan 64 +
          +Walk2 Pan 64
          + +
          + +

          +If the file specified by a MMAEND directive does not exist a +warning message will be printed (this is not an error). + +

          +Multiple MMAEND directives are permitted and processed in the +order declared. You can have multiple filenames on a MMAEND line. + +

          + +

          + +
          +RC Files +

          + +

          +When +MMA starts it checks for initialization files. Only the first +found file is processed. The following locations/files are checked (in order): + +

          + +

            +
          1. mmarc -- this is a normal file in the current directory. + +

            +

          2. +
          3. ~/.mmarc -- this is an ``invisible'' file in the users + home directory. + +

            +

          4. +
          5. /usr/local/etc/mmarc + +

            +

          6. +
          7. /etc/mmarc + +

            +

          8. +
          + +

          + Only the first found file will be processed. This means you can +override a ``global'' RC file with a user specific one. If you just +want to override some specific commands you might want to: + +

          + +

            +
          1. Create the file mmarc in a directory with +MMA files, + +

            +

          2. +
          3. As the first line in that file have the command: + +

            + + + +
            + include ~/.mmarc + +
            + +

            +to force the inclusion of your global stuff, + +

            +

          4. +
          5. Now, place your directory specific commands in your custom RC file. +
          6. +
          + +

          +By default, no RC files are installed. You may want to create an empty +~/.mmarc file to eliminate a warning message. + +

          +An alternate method for using a different RC file is to specify the +name of the file on the command line by using the -i option +(here). Using this option +you can have several RC files in a directory and compile your songs +differently depending on the RC file you specify. + +

          +The RC file is processed as a +MMA input file. As such, it can +contain anything a normal input file can, including music commands. +However, you should limit the contents of RC files to things +like: + +

          + + + +
          + SetOutPath +
          +SetLibPath +
          +MMAStart +
          +MMAEnd
          + +
          + +

          +A useful setup is to have your source files in one directory and MIDI +files saved into a different directory. Having the file mmarc +in the directory with the source files permits setting OUTPATH +to the MIDI path. + +

          + +

          +
          +Library Files +

          + +

          +Included in this distribution are a number of predefined patterns, +sequences and grooves. They are in different files in the ``lib'' +directory. + +

          +The library files should be self-documenting. A list of standard file +and the grooves they define is included in the separate document, +supplied in this distribution as ``mma-lib.ps''. + +

          + +

          +
          +Maintaining and Using Libraries +

          + +

          +The basic +MMA distribution comes with a set of pattern files which +are installed in the mma/lib/stdlib directory. Each one of +these files has a number of GROOVEs defined in them. For +example, the file mma/lib/stdlib/rhumba.mma contains the +grooves Rhumba, RhumbaEnd and many more. + +

          +If you are writing GROOVEs with the intention of adding them to +the standard library you should ensure that none of the names you +choose duplicate existing names already used. + +

          +If you are creating a set of alternate grooves to duplicate the +existing library you might do the following: + +

          + +

            +
          1. Create a directory with your name or other short id in the + mma/lib/ hierarchy. For example, if your name is ``Bob van + der Poel'' you might create the directory mma/lib/bvdp. + +

            +

          2. +
          3. Place all your files (or modified files) in that directory. + +

            +

          4. +
          5. Now, when your song wants to use a groove, you have two choices: + +

            + +

              +
            1. Include the file with the USE directive. For example, + if you have created the file rock.mma and want to use the + GROOVE rock8 you would: + +

              + +

                +
              1. place the directive USE BVDP/ROCK near the top of the + song file. Note: it might not be apparent from the typeface here, but the + filename here is all lowercase. In Unix/Linux case is important, so + please make sure of the case of the filenames in commands like USE. + +

                +

              2. +
              3. enable the groove with the directive GROOVE ROCK8 (and here the + case is not important since +MMA thinks that upper and lower case are the same). + +

                +

              4. +
              + +

              +

            2. +
            3. Force +MMA to use your groove directory by resetting + the auto-lib directory (again, the case for the path is important): + +

              + + + +
              + SetAutoLibPath bvdp + +
              + +

              +You will have to update the +MMA database with the -g or -G + command line options for this to work. If you elect this route, + please note that the files in the standard library will not be + available, but you can use both with something like this: + +

              + + + +
              + Groove Metronome2-4 +
              +z * 2 +
              +SetAutoLibPath bvdp +
              +Groove BossaNova // the bossa from lib/bvdp, not stdlib! +
              +chords ...
              + +
              + +

              +The nice thing about this method is that you can have multiple + sets of library files all using the same GROOVE + names. To create a different version you just need to change + the SETAUTOLIBPATH variable in your song file ...or, + for a collection of songs put the variable in your MMARC + file. + +

              +

            4. +
            + +

            +

          6. +
          + +

          +For those who ``really need to know'', here are the steps that +MMA takes when it encounters a GROOVE command: + +

          + +

            +
          1. if the named groove has been loaded/created already +MMA just + switches to the internal version of that groove. + +

            +

          2. +
          3. if the groove can't be found in memory, a search of the groove + database (created with the -g command line option) is done. If no + database is in memory it is loaded from the directory pointed to by + the LIBPATH and AUTOLIBPATH variables. This database + is then searched for the needed GROOVE. The database contains + the filenames associated with each GROOVE and that file is + then read with the USE code. + +

            +

          4. +
          + +

          +The database is a file .mmaDB stored in each sub directory of +LIBPATH. This is a ``hidden'' file (due to the leading ``.'' in +the filename). You cannot change the name of this file. If there are +sub-directories the entries for them will be stored in the database +file for the main tree. + +

          +By using a USE directive or by resetting AUTOLIBDIR you +force the loading of your set of grooves. + +

          + +

          + +
          +Paths on Windows Platforms +

          + +

          +To make +MMA as platform independent as possible a number of additional paths have been +defined. When starting up, in addition to the standard Linux paths discussed above, the +following are also checked: + +

          + +

            +
          • Modules can be in c: +
            +mma
            , +
          • +
          • Include files can be in c: +
            +mma +
            +includes
            , +
          • +
          • Library files can be in c: +
            +mma +
            +lib
            . + +

            +

          • +
          + +

          + +

          bob -2007-03-07 +2008-09-28
          diff --git a/mma/docs/html/ref/node27.html b/mma/docs/html/ref/node27.html index 8798e66..25effc8 100644 --- a/mma/docs/html/ref/node27.html +++ b/mma/docs/html/ref/node27.html @@ -1,4 +1,4 @@ - + -Symbols and Constants - +Creating Effects + @@ -25,3441 +25,194 @@ original version by: Nikos Drakos, CBLU, University of Leeds - - + next - up - previous
          - Next: Bibliography and Thanks - Up: Next: Frequency Asked Questions + Up: Reference Manual - Previous: Frequency Asked Questions -
          + Previous: Paths, Files and Libraries
          +
          Subsections -
            -
          • Chord Names -

            - +
            -Symbols and Constants +Creating Effects

            -This appendix is a reference to the chords that -MMA recognizes and -name/value tables for drum and instrument names. The tables have been -auto-generated by -MMA using the -D options. +It's really quite amazing how easy and effective it is to create +different patterns, sequences and special effects. As +MMA was +developed lots of silly things were tried...this chapter is an +attempt to display and preserve some of them.

            - -

            -Chord Names -

            - -

            - -MMA recognizes standard chord names as listed below. The names are -case sensitive and must be entered in uppercase letters as shown: - -

            -A - A$\sharp$ - A$\flat$ - B - B$\sharp$ - B$\flat$ - C - C$\sharp$ - C$\flat$ - D - D$\sharp$ - D$\flat$ - E - E$\sharp$ - E$\flat$ - F - F$\sharp$ - F$\flat$ - G - G$\sharp$ - G$\flat$ - -

            -Please note that in your input files you must use a lowercase ``b'' or -an ``&'' to represent a $\flat$ and a ``#'' for a $\sharp$. - -

            -All ``7th'' chords are ``dominante 7th'' unless specifically noted as -``major''. A dominant 7th has a flattened 7th note (in a C7 chord this -is a b$\flat$; a C Major 7th chord has a b$\natural$). - -

            -For a more detailed listing of the chords, notes and scales you should -download the document www.mellowood.ca/mma/chords.pdf.gz. - -

            -The following types of chords are recognized (these are case sensitive -and must be in the mixed upper and lowercase shown): - -

            - -

            - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            $\sharp$5Augmented triad.
            ($\flat$5)Major triad with flat 5th.
            +Augmented triad.
            +7An augmented chord (raised 5th) with a dominant 7th.
            +7$\flat$9$\sharp$11Augmented 7th with flat 9th and sharp 11th.
            +97th plus 9th with sharp 5th (same as aug9).
            +9M7An augmented chord (raised 5th) with a major 7th and 9th.
            +M7Major 7th with sharp 5th.
            119th chord plus 11th (3rd not voiced).
            11$\flat$97th chord plus flat 9th and 11th.
            137th (including 5th) plus 13th (the 9th and 11th are not voiced).
            13$\sharp$117th plus sharp 11th and 13th (9th not voiced).
            13$\sharp$97th (including 5th) plus 13th and sharp 9th (11th not voiced).
            13$\flat$57th with flat 5th, plus 13th (the 9th and 11th are not voiced).
            13$\flat$97th (including 5th) plus 13th and flat 9th (11th not voiced).
            13sus7sus, plus 9th and 13th
            13sus$\flat$97sus, plus flat 9th and 13th
            5Altered Fifth or Power Chord; root and 5th only.
            6Major tiad with added 6th.
            6(add9)6th with added 9th. This is sometimes notated as a slash chord in the form ``6/9''.
            696th with added 9th. This is sometimes notated as a slash chord in the form ``6/9''.
            77th.
            7$\sharp$117th plus sharp 11th (9th omitted).
            7$\sharp$5An augmented chord (raised 5th) with a dominant 7th.
            7$\sharp$5$\sharp$97th with sharp 5th and sharp 9th.
            7$\sharp$5$\flat$9An augmented chord (raised 5th) with a dominant 7th and flat 9th.
            7$\sharp$97th with sharp 9th.
            7$\sharp$9$\sharp$117th plus sharp 9th and sharp 11th.
            7$\sharp$9$\flat$137th with sharp 9th and flat 13th.
            7(omit3)7th with unvoiced 3rd.
            7+An augmented chord (raised 5th) with a dominant 7th.
            7+5An augmented chord (raised 5th) with a dominant 7th.
            7+97th with sharp 9th.
            7-57th, flat 5.
            7-97th with flat 9th.
            7alt7th with flat 5th and flat 9th.
            7$\flat$57th, flat 5.
            7$\flat$5$\sharp$97th with flat 5th and sharp 9th.
            7$\flat$5$\flat$97th with flat 5th and flat 9th.
            7$\flat$97th with flat 9th.
            7$\flat$9$\sharp$117th plus flat 9th and sharp 11th.
            7omit37th with unvoiced 3rd.
            7sus7th with suspended 4th, dominant 7th with 3rd raised half tone.
            7sus2A sus2 with dominant 7th added.
            7sus47th with suspended 4th, dominant 7th with 3rd raised half tone.
            7sus$\flat$97th with suspended 4th and flat 9th.
            97th plus 9th.
            9$\sharp$117th plus 9th and sharp 11th.
            9$\sharp$57th plus 9th with sharp 5th (same as aug9).
            9+57th plus 9th with sharp 5th (same as aug9).
            9-57th plus 9th with flat 5th.
            9$\flat$57th plus 9th with flat 5th.
            9sus7sus plus 9th.
            MMajor triad. This is the default and is used in the absense of any other chord type specification.
            M13Major 7th (including 5th) plus 13th (9th and 11th not voiced).
            M13$\sharp$11Major 7th plus sharp 11th and 13th (9th not voiced).
            M6Major tiad with added 6th.
            M7Major 7th.
            M7$\sharp$11Major 7th plus sharp 11th (9th omitted).
            M7$\sharp$5Major 7th with sharp 5th.
            M7(add13)7th (including 5th) plus 13th and flat 9th (11th not voiced).
            M7+5Major 7th with sharp 5th.
            M7-5Major 7th with a flat 5th.
            M7$\flat$5Major 7th with a flat 5th.
            M9Major 7th plus 9th.
            M9$\sharp$11Major 9th plus sharp 11th.
            add9Major chord plus 9th (no 7th.)
            augAugmented triad.
            aug7An augmented chord (raised 5th) with a dominant 7th.
            aug7$\sharp$9An augmented chord (raised 5th) with a dominant 7th and sharp 9th.
            aug7$\flat$9An augmented chord (raised 5th) with a dominant 7th and flat 9th.
            aug97th plus 9th with sharp 5th (same as aug9).
            aug9M7An augmented chord (raised 5th) with a major 7th and 9th.
            dimA dim7, not a triad!
            dim3Diminished triad (non-standard notation).
            dim7Diminished seventh.
            dim7(addM7)Diminished tirad with added Major 7th.
            mMinor triad.
            m$\sharp$5Minor triad with augmented 5th.
            m$\sharp$7Minor Triad plus Major 7th. You will also see this printed as ``m(maj7)'', ``m+7'', ``min(maj7)'' and ``min$\sharp$7'' (which -MMA accepts); as well as the -MMA invalid forms: ``-($\Delta$7)'', and ``min$\natural$7''.
            m(add9)Minor triad plus 9th (no 7th).
            m($\flat$5)Minor triad with flat 5th (aka dim).
            m(maj7)Minor Triad plus Major 7th. You will also see this printed as ``m(maj7)'', ``m+7'', ``min(maj7)'' and ``min$\sharp$7'' (which -MMA accepts); as well as the -MMA invalid forms: ``-($\Delta$7)'', and ``min$\natural$7''.
            m(sus9)Minor triad plus 9th (no 7th).
            m+5Minor triad with augmented 5th.
            m+7Minor Triad plus Major 7th. You will also see this printed as ``m(maj7)'', ``m+7'', ``min(maj7)'' and ``min$\sharp$7'' (which -MMA accepts); as well as the -MMA invalid forms: ``-($\Delta$7)'', and ``min$\natural$7''.
            m+7$\sharp$9Augmented minor 7 plus sharp 9th.
            m+7$\flat$9Augmented minor 7 plus flat 9th.
            m+7$\flat$9$\sharp$11Augmented minor 7th with flat 9th and sharp 11th.
            m119th with minor 3rd, plus 11th.
            m11$\flat$5Minor 7th with flat 5th plus 11th.
            m13Minor 7th (including 5th) plus 13th (9th and 11th not voiced).
            m6Minor 6th (flat 3rd plus a 6th).
            m6(add9)Minor 6th with added 9th. This is sometimes notated as a slash chord in the form ``m6/9''.
            m69Minor 6th with added 9th. This is sometimes notated as a slash chord in the form ``m6/9''.
            m7Minor 7th (flat 3rd plus dominant 7th).
            m7$\sharp$9Minor 7th with added sharp 9th.
            m7($\sharp$9)Minor 7th with added sharp 9th.
            m7(add11)Minor 7th plus 11th.
            m7(add13)Minor 7th plus 13th.
            m7($\flat$9)Minor 7th with added flat 9th.
            m7(omit5)Minor 7th with unvoiced 5th.
            m7-5Minor 7th, flat 5 (aka 1/2 diminished).
            m7$\flat$5Minor 7th, flat 5 (aka 1/2 diminished).
            m7$\flat$5$\flat$9Minor 7th with flat 5th and flat 9th.
            m7$\flat$9Minor 7th with added flat 9th.
            m7$\flat$9$\sharp$11Minor 7th plus flat 9th and sharp 11th.
            m7omit5Minor 7th with unvoiced 5th.
            m9Minor triad plus 7th and 9th.
            m9$\sharp$11Minor 7th plus 9th and sharp 11th.
            m9$\flat$5Minor triad, flat 5, plus 7th and 9th.
            mM7Minor Triad plus Major 7th. You will also see this printed as ``m(maj7)'', ``m+7'', ``min(maj7)'' and ``min$\sharp$7'' (which -MMA accepts); as well as the -MMA invalid forms: ``-($\Delta$7)'', and ``min$\natural$7''.
            mM7(add9)Minor Triad plus Major 7th and 9th.
            maj13Major 7th (including 5th) plus 13th (9th and 11th not voiced).
            maj7Major 7th.
            maj9Major 7th plus 9th.
            m$\flat$5Minor triad with flat 5th (aka dim).
            min$\sharp$7Minor Triad plus Major 7th. You will also see this printed as ``m(maj7)'', ``m+7'', ``min(maj7)'' and ``min$\sharp$7'' (which -MMA accepts); as well as the -MMA invalid forms: ``-($\Delta$7)'', and ``min$\natural$7''.
            min(maj7)Minor Triad plus Major 7th. You will also see this printed as ``m(maj7)'', ``m+7'', ``min(maj7)'' and ``min$\sharp$7'' (which -MMA accepts); as well as the -MMA invalid forms: ``-($\Delta$7)'', and ``min$\natural$7''.
            omit3(add9)Triad: root, 5th and 9th.
            omit3add9Triad: root, 5th and 9th.
            susSuspended 4th, major triad with the 3rd raised half tone.
            sus2Suspended 2nd, major triad with the major 2nd above the root substituted for 3rd.
            sus4Suspended 4th, major triad with the 3rd raised half tone.
            sus97sus plus 9th.
             
            -In modern pop charts the ``M'' in a major 7th chord (and other major -chords) is often represented by a ``$\Delta$''. When entering these -chords, just replace the ``$\Delta$'' with an ``M''. For example, -change ``G$\Delta$7'' to ``GM7''. - -

            -A chord name without a type is interpreted as a major chord (or -triad). For example, the chord ``C'' is identical to ``CM''. - -

            - -MMA has an large set of defined chords. However, you can add your -own with the DEFCHORD command, details - here. - -

            - -

            -
            -Octave Adjustment -

            - -

            -Depending on the key and chord sequence, a chord may end up in the -wrong octave. This is caused by -MMA 's internal routines which -create a chord: all of the tables are maintained for a ``C'' chord and -the others are derived from that point by subtracting or adding a -constant. To compensate you can add a leading ``-'' or ``+'' to the -chordname to force the movement of that chord and scale up or down an -octave. - -

            -For example, the following line will move the chord up and down for -the third and fourth beats: +The examples don't show any music to apply the patterns or sequences +to. The manual assumes that if you've read this far you'll know +that you should have something like:

            - Cm Fm -Gm +D7 + 1 C +
            +2 G +
            +3 G +
            +4 C

            -The effect of octave shifting is also highly dependent on the voicing -options in effect for the track. - -

            -You'll have to listen to the -MMA output to detemine when -and where to use this adjustment. Hopefully, it won't be needed all -that much. - -

            -If you have a large number of chords to adjust, use the CHORDADJUST -command , here. +as a simple test piece to apply tests to.

            -

            -Altered Chords -

            - -

            -According to Standardized Chord Symbol Notation altered -chords should be written in the form -Cmi -$^{7}(^{\flat{}9}_{\sharp{}5})$. However, this is pretty hard to type -(and parse). So, we've used the convention that the altered -intervals should be written in numerical order: -Cm$\sharp$5$\flat$9. Also, note that we use ``m'' for ``minor'' which -appears to be more the conventional method than ``mi''. - -

            - -

            -Diminished Chords -

            - -

            -In most pop and jazz charts it is assumed that a diminished chord is -always a diminished 7th ...a diminished triad is never played. - -MMA continues this, sometimes erroneous -assumption.A.1You can change the behaviour in several ways: change the chord notes and scale for a -``dim'' from a dim7 to a triad by following the instructions -here; use the slightly oddball -notation of ``m$\flat$5'' which generates a ``diminished tirad''; or -use the more-oddball notation ``dim3''. - -

            -Notational notes: In printed music a ``diminished'' chord is sometimes -represented with a small circle symbol (eg. -``FO'') and a ``half-diminished'' as a -small slashed circle (e.g., ``CØ''). - -

            -A half-diminished chord in -MMA is specified with the notation -``m7$\flat$5''. - -

            - -

            -Slash Chords -

            - -

            -Charts sometimes use slash chords in the form ``Am/E''. This -notation is used, mainly, to indicate chord inversions. For example, -the chord notes in ``Am/E'' become ``E'', ``A'' and ''C'' with the -``E'' taking the root position. -MMA will accept chords of this type. -However, you may not notice any difference in the generated tracks due -to the inversions used by the current pattern. - -

            -You may also encounter slash chords where the slash-part of the chord -is not a note in the chord. Consider the ambiguous notation -``Dm/C''. The composer (or copyist) might mean to add a ``C'' bass -note to a ``Dm'' chord, or she might mean ``Dm7'', or even an inverted -``Dm7''. -MMA will handle these ...almost perfectly. When the -``slash'' part of the chord indicates a note which is not a -note in the chord, -MMA assumes that the indicated note should be -used in the bass line. Since each chord generated by -MMA also has a -``scale'' associated with it for use by bass and scale patterns this -works. For example, a C Major chord will have the scale ``c, d, e, f, -g, a, b''; a C Minor chord has the same scale, but with an e$\flat$. -If the slash note is contained in the scale, the scale will be rotated -so that the note becomes the ``root'' note. - -

            -A warning message will be printed if the note is not in both the chord -and the scale. - -

            -Another notation you may see is something like ``Dm/9''. Again, -the meaning is not clear. It probably means a ``Dm9'', or ``Dm9/E'' -... but since -MMA isn't sure this notation will generate an -error. - -

            -Please note that for fairly obvious reasons you cannot have both slash -notation and an inversion (see the next section). - -

            -For more details on ``slash chords'' your favorite -music theory book or teacher is highly recommended! - -

            - -

            -Chord Inversions -

            - -

            -Instead of using a slash chord you can specify an inversion to use with a chord. -The notation is simply an ``>'' and a number between -5 and 5 immediately following -the chord name. - -

            -The chord will be ``rotated'' as specified by the value after the ``>''. - -

            -For example, the chord ``C>2'' will generate the notes G, C and E; ``F>-1'' -gives C, F and A. - -

            -There is an important difference between this option and a slash chord: in inversions neither -the root note nor the associated scale are modified. - -

            - -

            - -
            -MIDI Voices +

            +Overlapping Notes

            -When setting a voice for a track (IE Bass Voice NN), you can specify -the patch to use with a symbolic constant. Any combination of upper -and lower case is permitted. The following are the names with the -equivalent voice numbers: +As a general rule, you should not create patterns in which notes +overlap. However, here's an interesting effect which relies on +ignoring that rule:

            -

            - -

            -Voices, Alphabetically -

            - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            5thSawWave86
            Accordion21
            AcousticBass32
            AgogoBells113
            AltoSax65
            Applause/Noise126
            Atmosphere99
            BagPipe109
            Bandoneon23
            Banjo105
            BaritoneSax67
            Bass&Lead87
            Bassoon70
            BirdTweet123
            BottleBlow76
            BowedGlass92
            BrassSection61
            BreathNoise121
            Brightness100
            Celesta8
            Cello42
            Charang84
            ChifferLead83
            ChoirAahs52
            ChurchOrgan19
            Clarinet71
            Clavinet7
            CleanGuitar27
            ContraBass43
            Crystal98
            DistortonGuitar30
            EPiano5
            EchoDrops102
            EnglishHorn69
            Fantasia88
            Fiddle110
            FingeredBass33
            Flute73
            FrenchHorn60
            FretlessBass35
            Glockenspiel9
            Goblins101
            GuitarFretNoise120
            GuitarHarmonics31
            GunShot127
            HaloPad94
            Harmonica22
            HarpsiChord6
            HelicopterBlade125
            Honky-TonkPiano3
            IceRain96
            JazzGuitar26
            Kalimba108
            Koto107
            Marimba12
            MelodicTom1117
            MetalPad93
            MusicBox10
            MutedGuitar28
            MutedTrumpet59
            NylonGuitar24
            Oboe68
            Ocarina79
            OrchestraHit55
            OrchestralHarp46
            Organ116
            Organ217
            Organ318
            OverDriveGuitar29
            PanFlute75
            Piano10
            Piano21
            Piano32
            Piccolo72
            PickedBass34
            PizzicatoString45
            PolySynth90
            Recorder74
            ReedOrgan20
            ReverseCymbal119
            RhodesPiano4
            Santur15
            SawWave81
            SeaShore122
            Shakuhachi77
            Shamisen106
            Shanai111
            Sitar104
            SlapBass136
            SlapBass237
            SlowStrings49
            SoloVoice85
            SopranoSax64
            SoundTrack97
            SpaceVoice91
            SquareWave80
            StarTheme103
            SteelDrums114
            SteelGuitar25
            Strings48
            SweepPad95
            SynCalliope82
            SynthBass138
            SynthBass239
            SynthBrass162
            SynthBrass263
            SynthDrum118
            SynthStrings150
            SynthStrings251
            SynthVox54
            TaikoDrum116
            TelephoneRing124
            TenorSax66
            Timpani47
            TinkleBell112
            TremoloStrings44
            Trombone57
            Trumpet56
            Tuba58
            TubularBells14
            Vibraphone11
            Viola41
            Violin40
            VoiceOohs53
            WarmPad89
            Whistle78
            WoodBlock115
            Xylophone13
             
            -

            - -

            -Voices, By MIDI Value -

            - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            0Piano1
            1Piano2
            2Piano3
            3Honky-TonkPiano
            4RhodesPiano
            5EPiano
            6HarpsiChord
            7Clavinet
            8Celesta
            9Glockenspiel
            10MusicBox
            11Vibraphone
            12Marimba
            13Xylophone
            14TubularBells
            15Santur
            16Organ1
            17Organ2
            18Organ3
            19ChurchOrgan
            20ReedOrgan
            21Accordion
            22Harmonica
            23Bandoneon
            24NylonGuitar
            25SteelGuitar
            26JazzGuitar
            27CleanGuitar
            28MutedGuitar
            29OverDriveGuitar
            30DistortonGuitar
            31GuitarHarmonics
            32AcousticBass
            33FingeredBass
            34PickedBass
            35FretlessBass
            36SlapBass1
            37SlapBass2
            38SynthBass1
            39SynthBass2
            40Violin
            41Viola
            42Cello
            43ContraBass
            44TremoloStrings
            45PizzicatoString
            46OrchestralHarp
            47Timpani
            48Strings
            49SlowStrings
            50SynthStrings1
            51SynthStrings2
            52ChoirAahs
            53VoiceOohs
            54SynthVox
            55OrchestraHit
            56Trumpet
            57Trombone
            58Tuba
            59MutedTrumpet
            60FrenchHorn
            61BrassSection
            62SynthBrass1
            63SynthBrass2
            64SopranoSax
            65AltoSax
            66TenorSax
            67BaritoneSax
            68Oboe
            69EnglishHorn
            70Bassoon
            71Clarinet
            72Piccolo
            73Flute
            74Recorder
            75PanFlute
            76BottleBlow
            77Shakuhachi
            78Whistle
            79Ocarina
            80SquareWave
            81SawWave
            82SynCalliope
            83ChifferLead
            84Charang
            85SoloVoice
            865thSawWave
            87Bass&Lead
            88Fantasia
            89WarmPad
            90PolySynth
            91SpaceVoice
            92BowedGlass
            93MetalPad
            94HaloPad
            95SweepPad
            96IceRain
            97SoundTrack
            98Crystal
            99Atmosphere
            100Brightness
            101Goblins
            102EchoDrops
            103StarTheme
            104Sitar
            105Banjo
            106Shamisen
            107Koto
            108Kalimba
            109BagPipe
            110Fiddle
            111Shanai
            112TinkleBell
            113AgogoBells
            114SteelDrums
            115WoodBlock
            116TaikoDrum
            117MelodicTom1
            118SynthDrum
            119ReverseCymbal
            120GuitarFretNoise
            121BreathNoise
            122SeaShore
            123BirdTweet
            124TelephoneRing
            125HelicopterBlade
            126Applause/Noise
            127GunShot
             
            -

            - -

            - + + +
            + Begin Scale +
                define S1 1 1+1+1+1 90 +
                define S32 S1 * 32 +
                Sequence S32 +
                ScaleType +
                Direction Both +
                Voice Accordion +
                Octave 5
            -Drum Notes +End
            + +
            + +

            +``S1'' is defined with a note length of 4 whole notes (1+1+1+1) so that +when it is multiplied for S32 a pattern of 32 8th notes is created. +Of course, the notes overlap. Running this up and down a chromatic +scale is ``interesting.'' You might want to play with this a bit and +try changing ``S1'' to: + +

            + + + +
            + define S1 1 1 90 + +
            + +

            +to see what the effect is of the notes overlapping. + +

            + +

            +Jungle Birds

            -When defining a drum tone, you can specify the patch to use with a -symbolic constant. Any combination of upper and lower case is -permitted. In addition to the drum tone name and the MIDI value, the -equivalent ``name'' in -$^{superscript}$ is included. The ``names'' may help you -find the tones on your keyboard. +Here's another use for SCALEs. Someone (certainly not the +author) decided that some jungle sounds would be perfect as an +introduction to ``Yellow Bird''.

            -

            -Drum Notes, Alphabetically -

            - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            Cabasa69$^{A}$
            Castanets84$^{C}$
            ChineseCymbal52$^{E}$
            Claves75$^{E\flat}$
            ClosedHiHat42$^{G\flat}$
            CowBell56$^{A\flat}$
            CrashCymbal149$^{D\flat}$
            CrashCymbal257$^{A}$
            HandClap39$^{E\flat}$
            HighAgogo67$^{G}$
            HighBongo60$^{C}$
            HighQ27$^{E\flat}$
            HighTimbale65$^{F}$
            HighTom150$^{D}$
            HighTom248$^{C}$
            HighWoodBlock76$^{E}$
            JingleBell83$^{B}$
            KickDrum136$^{C}$
            KickDrum235$^{B}$
            LongGuiro74$^{D}$
            LongLowWhistle72$^{C}$
            LowAgogo68$^{A\flat}$
            LowBongo61$^{D\flat}$
            LowConga64$^{E}$
            LowTimbale66$^{G\flat}$
            LowTom143$^{G}$
            LowTom241$^{F}$
            LowWoodBlock77$^{F}$
            Maracas70$^{B\flat}$
            MetronomeBell34$^{B\flat}$
            MetronomeClick33$^{A}$
            MidTom147$^{B}$
            MidTom245$^{A}$
            MuteCuica78$^{G\flat}$
            MuteHighConga62$^{D}$
            MuteSudro85$^{D\flat}$
            MuteTriangle80$^{A\flat}$
            OpenCuica79$^{G}$
            OpenHiHat46$^{B\flat}$
            OpenHighConga63$^{E\flat}$
            OpenSudro86$^{D}$
            OpenTriangle81$^{A}$
            PedalHiHat44$^{A\flat}$
            RideBell53$^{F}$
            RideCymbal151$^{E\flat}$
            RideCymbal259$^{B}$
            ScratchPull30$^{G\flat}$
            ScratchPush29$^{F}$
            Shaker82$^{B\flat}$
            ShortGuiro73$^{D\flat}$
            ShortHiWhistle71$^{B}$
            SideKick37$^{D\flat}$
            Slap28$^{E}$
            SnareDrum138$^{D}$
            SnareDrum240$^{E}$
            SplashCymbal55$^{G}$
            SquareClick32$^{A\flat}$
            Sticks31$^{G}$
            Tambourine54$^{G\flat}$
            VibraSlap58$^{B\flat}$
             
            -

            - -

            -Drum Notes, by MIDI Value -

            - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            27HighQ$^{E\flat}$
            28Slap$^{E}$
            29ScratchPush$^{F}$
            30ScratchPull$^{G\flat}$
            31Sticks$^{G}$
            32SquareClick$^{A\flat}$
            33MetronomeClick$^{A}$
            34MetronomeBell$^{B\flat}$
            35KickDrum2$^{B}$
            36KickDrum1$^{C}$
            37SideKick$^{D\flat}$
            38SnareDrum1$^{D}$
            39HandClap$^{E\flat}$
            40SnareDrum2$^{E}$
            41LowTom2$^{F}$
            42ClosedHiHat$^{G\flat}$
            43LowTom1$^{G}$
            44PedalHiHat$^{A\flat}$
            45MidTom2$^{A}$
            46OpenHiHat$^{B\flat}$
            47MidTom1$^{B}$
            48HighTom2$^{C}$
            49CrashCymbal1$^{D\flat}$
            50HighTom1$^{D}$
            51RideCymbal1$^{E\flat}$
            52ChineseCymbal$^{E}$
            53RideBell$^{F}$
            54Tambourine$^{G\flat}$
            55SplashCymbal$^{G}$
            56CowBell$^{A\flat}$
            57CrashCymbal2$^{A}$
            58VibraSlap$^{B\flat}$
            59RideCymbal2$^{B}$
            60HighBongo$^{C}$
            61LowBongo$^{D\flat}$
            62MuteHighConga$^{D}$
            63OpenHighConga$^{E\flat}$
            64LowConga$^{E}$
            65HighTimbale$^{F}$
            66LowTimbale$^{G\flat}$
            67HighAgogo$^{G}$
            68LowAgogo$^{A\flat}$
            69Cabasa$^{A}$
            70Maracas$^{B\flat}$
            71ShortHiWhistle$^{B}$
            72LongLowWhistle$^{C}$
            73ShortGuiro$^{D\flat}$
            74LongGuiro$^{D}$
            75Claves$^{E\flat}$
            76HighWoodBlock$^{E}$
            77LowWoodBlock$^{F}$
            78MuteCuica$^{G\flat}$
            79OpenCuica$^{G}$
            80MuteTriangle$^{A\flat}$
            81OpenTriangle$^{A}$
            82Shaker$^{B\flat}$
            83JingleBell$^{B}$
            84Castanets$^{C}$
            85MuteSudro$^{D\flat}$
            86OpenSudro$^{D}$
             
            -

            - -

            - + + +
            + groove Rhumba
            -MIDI Controllers - +Begin Scale +
                define S1 1 1 90 +
                define S32 S1 * 32 +
                Sequence S32 +
                ScaleType Chromatic +
                Direction Random +
                Voice BirdTweet +
                Octave 5 6 4 5 +
                RVolume 30 +
                Rtime 2 3 4 5 +
                Volume pp pp ppp ppp +
            +End +
            +DefGroove BirdRhumba
            + +

            -When specifying a MIDI Controller in a MIDISEQ or -MIDIVOICE command you can use the absolute value in (either as -a decimal number or in hexadecimal by prefixing the value with a -``0x''), or the symbolic name in the following tables. The tables have -been extracted from information at -http://www.midi.org/about-midi/table3.shtml. Note that all the -values in these tables are in hexadecimal notation. +The above is an extract from the +MMA score. The entire song is +included in the ``songs'' directory of this distribution.

            -Complete reference for this is not a part of -MMA . Please refer to a -detailed text on MIDI or the manual for your synthesizer. +A neat trick is to create the bird sound track and then add it to the +existing Rhumba groove. Then define a new groove. Now one can select +either the library ``rhumba'' or the enhanced ``BirdRhumba'' with a +simple GROOVE directive.

            -

            -Controllers, Alphabetically -

            - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            AllNotesOff7b
            AllSoundsOff78
            AttackTime49
            Balance08
            BalanceLSB28
            Bank00
            BankLSB20
            Breath02
            BreathLSB22
            Brightness4a
            Chorus5d
            Ctrl10266
            Ctrl10367
            Ctrl10468
            Ctrl10569
            Ctrl1066a
            Ctrl1076b
            Ctrl1086c
            Ctrl1096d
            Ctrl1106e
            Ctrl1116f
            Ctrl11270
            Ctrl11371
            Ctrl11472
            Ctrl11573
            Ctrl11674
            Ctrl11775
            Ctrl11876
            Ctrl11977
            Ctrl140e
            Ctrl150f
            Ctrl2014
            Ctrl2115
            Ctrl2216
            Ctrl2317
            Ctrl2418
            Ctrl2519
            Ctrl261a
            Ctrl271b
            Ctrl281c
            Ctrl291d
            Ctrl303
            Ctrl301e
            Ctrl311f
            Ctrl3523
            Ctrl4129
            Ctrl462e
            Ctrl472f
            Ctrl5234
            Ctrl5335
            Ctrl5436
            Ctrl5537
            Ctrl5638
            Ctrl5739
            Ctrl583a
            Ctrl593b
            Ctrl603c
            Ctrl613d
            Ctrl623e
            Ctrl633f
            Ctrl794f
            Ctrl8555
            Ctrl8656
            Ctrl8757
            Ctrl8858
            Ctrl8959
            Ctrl909
            Ctrl905a
            Data06
            DataDec61
            DataInc60
            DataLSB26
            DecayTime4b
            Detune5e
            Effect10c
            Effect1LSB2c
            Effect20d
            Effect2LSB2d
            Expression0b
            ExpressionLSB2b
            Foot04
            FootLSB24
            General110
            General1LSB30
            General211
            General2LSB31
            General312
            General3LSB32
            General413
            General4LSB33
            General550
            General651
            General752
            General853
            Hold245
            Legato44
            LocalCtrl7a
            Modulation01
            ModulationLSB21
            NonRegLSB62
            NonRegMSB63
            OmniOff7c
            OmniOn7d
            Pan0a
            PanLSB2a
            Phaser5f
            PolyOff7e
            PolyOn7f
            Portamento05
            Portamento41
            PortamentoCtrl54
            PortamentoLSB25
            RegParLSB64
            RegParMSB65
            ReleaseTime48
            ResetAll79
            Resonance47
            Reverb5b
            SoftPedal43
            Sostenuto42
            Sustain40
            Tremolo5c
            Variation46
            VibratoDelay4e
            VibratoDepth4d
            VibratoRate4c
            Volume07
            VolumeLSB27
             
            -

            - -

            -Controllers, by Value -

            - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            00Bank
            01Modulation
            02Breath
            03Ctrl3
            04Foot
            05Portamento
            06Data
            07Volume
            08Balance
            09Ctrl9
            0aPan
            0bExpression
            0cEffect1
            0dEffect2
            0eCtrl14
            0fCtrl15
            10General1
            11General2
            12General3
            13General4
            14Ctrl20
            15Ctrl21
            16Ctrl22
            17Ctrl23
            18Ctrl24
            19Ctrl25
            1aCtrl26
            1bCtrl27
            1cCtrl28
            1dCtrl29
            1eCtrl30
            1fCtrl31
            20BankLSB
            21ModulationLSB
            22BreathLSB
            23Ctrl35
            24FootLSB
            25PortamentoLSB
            26DataLSB
            27VolumeLSB
            28BalanceLSB
            29Ctrl41
            2aPanLSB
            2bExpressionLSB
            2cEffect1LSB
            2dEffect2LSB
            2eCtrl46
            2fCtrl47
            30General1LSB
            31General2LSB
            32General3LSB
            33General4LSB
            34Ctrl52
            35Ctrl53
            36Ctrl54
            37Ctrl55
            38Ctrl56
            39Ctrl57
            3aCtrl58
            3bCtrl59
            3cCtrl60
            3dCtrl61
            3eCtrl62
            3fCtrl63
            40Sustain
            41Portamento
            42Sostenuto
            43SoftPedal
            44Legato
            45Hold2
            46Variation
            47Resonance
            48ReleaseTime
            49AttackTime
            4aBrightness
            4bDecayTime
            4cVibratoRate
            4dVibratoDepth
            4eVibratoDelay
            4fCtrl79
            50General5
            51General6
            52General7
            53General8
            54PortamentoCtrl
            55Ctrl85
            56Ctrl86
            57Ctrl87
            58Ctrl88
            59Ctrl89
            5aCtrl90
            5bReverb
            5cTremolo
            5dChorus
            5eDetune
            5fPhaser
            60DataInc
            61DataDec
            62NonRegLSB
            63NonRegMSB
            64RegParLSB
            65RegParMSB
            66Ctrl102
            67Ctrl103
            68Ctrl104
            69Ctrl105
            6aCtrl106
            6bCtrl107
            6cCtrl108
            6dCtrl109
            6eCtrl110
            6fCtrl111
            70Ctrl112
            71Ctrl113
            72Ctrl114
            73Ctrl115
            74Ctrl116
            75Ctrl117
            76Ctrl118
            77Ctrl119
            78AllSoundsOff
            79ResetAll
            7aLocalCtrl
            7bAllNotesOff
            7cOmniOff
            7dOmniOn
            7ePolyOff
            7fPolyOn
             
            -

            - -

            -


            Footnotes

            -
            -
            ... -assumption.A.1
            -
            Sometimes a reliable source agrees with us ... in -this case Standardized Chord Symbol Notation is quite clear -that ``dim'' is a Diminished 7th and a diminished triad should be -notated as mi$^{(\flat{}5)}$. - -
            -

            +
            bob -2007-03-07 +2008-09-28
            diff --git a/mma/docs/html/ref/node28.html b/mma/docs/html/ref/node28.html index 110e230..56c4146 100644 --- a/mma/docs/html/ref/node28.html +++ b/mma/docs/html/ref/node28.html @@ -1,4 +1,4 @@ - + -Bibliography and Thanks - +Frequency Asked Questions + @@ -25,122 +25,249 @@ original version by: Nikos Drakos, CBLU, University of Leeds - - + next - up - previous
            - Next: Command Summary - Up: Next: Symbols and Constants + Up: Reference Manual - Previous: Symbols and Constants -
            + Previous: Creating Effects
            +
            + +Subsections -

            -Bibliography and Thanks + + +
            + +

            + +
            +Frequency Asked Questions

            -I've had help from a lot of different people and sources in developing -this program. If I have missed listing you in the CONTRIB -file shipped with the -MMA distribution, please let me know and I'll -add it right away. I really want to do this! +This chapter will serve as a container for questions asked by +some enthusiastic +MMA users. It may make some sense in the future to +distribute this information as a separate file.

            -I've also had the use of a number of reference materials: -

            -
            -
            Craig Anderson. MIDI for Musicians. Amsco Publishing, New -York, NY. + +

            +Chord Octaves +

            -

            -
            -
            William Duckworth. Music Fundamentals. Wadsworth Publishing, -Belomnt, CA. +I've keyed in a song but some of the chords sound way too high + (or low).

            -

            -
            -
            Michael Esterowitz. How To Play From A Fakebook. Ekay Music, -Inc. Katonah, NY. +When a real player plays chords he or she adjusts the position of the +chords so that they don't ``bounce'' around between octaves. One way + +MMA tries to do the same is with the ``Voicing Mode=Optimal'' +setting. However, sometimes the chord range of a piece is too large +for this to work properly. In this case you'll have to use the octave +adjustments in chords. For more details go here.

            -

            -
            -
            Pete Goodliffe. MIDI documentation (for the TSE3 library). -http://tse3.sourceforge.net/. + +

            +AABA Song Forms +

            -

            -
            -
            Norman Lloyd. The Golden Encyclopedia Of Music. Golden Press, -New York, NY. +How can one define parts as part "A", part "B" ...and + arrange them at the end of the file? An option to repeat a ``solo'' + section a number of times would be nice as well.

            -

            -
            -
            The MIDI Manufacturers Association. Various papers, tables and - other information. http://www.midi.org/. +Using +MMA variables and some simple looping, one might try something like:

            -

            -
            -
            Victor López. Latin Rhythms: Mystery Unraveled. Alfred Publishing Company. These are handout notes from the 2005 Midwest Clinic 59th Annual Conference, Chicago, Illinois, December 16, 2005. A PDF of this document is available on various internet sites. + + + +
            + Groove Swing +
            // Set the music into a +
            // series of macros +
            +mset A +
              Print Section A +
              C +
              G +
            +endmset +
            +mset B +
              print Section B +
              Dm +
              Em +
            +endmset +
            +mset Solo +
              Print Solo Section $Count +
              Am / B7 Cdim +
            +endmset +
            // Use the macros for an +
            // "A, A, B, Solo * 8, A" +
            // form +
            $A +
            $A +
            $B +
            +set Count 1 +
            +label a +
              $solo +
              inc COUNT +
              if le $count 8 +
                goto A +
              endif +
            $A +
            + +

            -

            -
            -
            Carl Brandt and Clinton Roemer. Standardized Chord - Symbol Notation. Roerick Music Co. Sherman Oaks, CA. +Note that the ``Print'' lines are used for debugging purposes. The case +of the variable names has been mixed to illustrate the fact that +``Solo'' is the same as ``SOLO'' which is the same as ``solo''.

            -

            -
            +Now, if you don't like things that look like old BASIC program code, +you could just as easily duplicate the above with:

            -And, finally, to all those music teachers my parents and I paid for, -and the many people who have helped by listening and providing helpful -suggestions and encouragement in my musical pursuits for the -last 40 plus years that I've been banging, squeezing and blowing. You know -who you are--thanks. + + + +
            + Groove Swing +
            +repeat +
              repeat +
                Print Section A +
                C +
                G +
                If Def count +
                  eof +
                Endif +
                Endrepeat +
                Print Section B +
                Dm +
                Em +
                Set Count 1 +
                Repeat +
                  Print Solo $Count +
                  Am +
                  Inc Count +
                Repeatending 7 +
              Repeatend +
            +Repeatend
            + +

            -


            +The choice is up to you. + +

            + +

            +Where's the GUI? +

            + +

            +I really think that +MMA is a cool program. But, it needs a + GUI. Are you planning on writing one? Will you help me if I + start to write one? + +

            +Thanks for the kind comments! The author likes +MMA too. A lot! + +

            +Some attempts have been made to write a number of GUIs for + +MMA . But, nothing seemed to be much more useful than the existing +text interface. So, why waste too much time? There is nothing wrong with +graphical programming interfaces, but perhaps not in this case. + +

            +But, I may well be wrong. If you think it'd be better with a +GUI ...well, this is open source and you are more than +welcome to write one. If you do, I'd suggest that you make your +program a front-end which lets a user compile standard +MMA files. If +you find that more error reporting, etc. is required to interact +properly with your code, let me know and I'll probably be quite +willing to make those kind of changes. + +

            + +

            +Where's the manual index? +

            + +

            +Yes,this manual needs an index. I just don't have the time +to go though and do all the necessary work. Is there a volunteer? + +

            + +

            + +

            bob -2007-03-07 +2008-09-28
            diff --git a/mma/docs/html/ref/node29.html b/mma/docs/html/ref/node29.html index d50d29d..2b69f58 100644 --- a/mma/docs/html/ref/node29.html +++ b/mma/docs/html/ref/node29.html @@ -1,4 +1,4 @@ - + -Command Summary - +Symbols and Constants + @@ -25,419 +25,3442 @@ original version by: Nikos Drakos, CBLU, University of Leeds - - + next - up - previous
            - Next: About this document ... - Up: Next: Bibliography and Thanks + Up: Reference Manual - Previous: Bibliography and Thanks -
            + Previous: Frequency Asked Questions
            +
            + +Subsections -

            -Command Summary + + +
            + +

            + +
            +Symbols and Constants

            -

            -TRACK Accent <beat adj> Adjust volume for specified beat(s) in each bar of a track. -
            -

            -

            AdjustVolume <name=value> Set the volume ratios for named volume(s). -
            -

            -

            AllTracks <cmds> Applies cmds(s) to all active tracks. -
            -

            -

            TRACK Articulate <value> ... Duration/holding-time of notes. -
            -

            -

            Author <stuff> A specialized comment used by documentation extractors. -
            -

            -

            AutoSoloTracks <tracks> Set the tracks used in auto assigning solo/melody notes. -
            -

            -

            BarNumbers Leading <number> on data line (ignored). -
            -

            -

            BarRepeat Data bars can repeat with a ``* nn'' -
            -

            -

            BeatAdjust <beats> Adjust current pointer by <beats>. -
            -

            -

            Begin Delimits the start of a block. -
            -

            -

            TRACK ChShare <track> Force track to share MIDI track. -
            -

            -

            TRACK Channel <1..16> Force the MIDI channel for a track. -
            -

            -

            TRACK ChannelPref <1..16> Set a preferred channel for track. -
            -

            -

            ChordAdjust <Tonic=adj> Adjust center point of selected chords. -
            -

            -

            Comment <text> ignore/discard <text>. -
            -

            -

            TRACK Compress <value> ... Enable chord compression for track. -
            -

            -

            TRACK Copy <source> Overlay <source> track to sepecified track. -
            -

            -

            [TRACK] Cresc <[start] end count> Decrease volume over bars. -
            -

            -

            [TRACK] Cut <beat> Force all notes off at <beat> offset. -
            -

            -

            Debug <options> Selectively enable/disable debugging levels. -
            -

            -

            Dec <name> [value] Decrement the value of variable <name> by 1 or <value>. -
            -

            -

            [TRACK] Decresc <[start] end count> Increase volume over bars. -
            -

            -

            DefChord <name notelist scalelist> Define a new chord. -
            -

            -

            DefGroove <name> [Description] Define a new groove. -
            -

            -

            TRACK Define <pattern> Define a pattern to use in a track. -
            -

            -

            TRACK Delete Delete specified track for future use. -
            -

            -

            TRACK Direction [Up | Down | BOTH | RANDOM] ... Set direction of runs in Scale, Apreggio and Walk tracks. -
            -

            -

            Doc <stuff> A special comment used by documentation extractors. -
            -

            -

            DocVar <description> A specialized comment used to document user variables in a library file. -
            -

            -

            DrumTR <old>=<new> translates MIDI drum tone <old> to <new>. -
            -

            -

            TRACK DrumType Force a solo track to be a drum track. -
            -

            -

            DrumVolTr <tone>=<adj> ... adjusts volume for specified drum tone. -
            -

            -

            TRACK DupRoot <octave> Duplicate the root note in a chord to lower/higher octave. -
            -

            -

            End Delimits the end of a block. -
            -

            -

            EndIf End processing of ``IF''. -
            -

            -

            EndMset End of a ``Mset'' section. -
            -

            -

            EndRepeat [count] End a repeated section. -
            -

            -

            Eof Immediately stop/end input file. -
            -

            -

            Fermata <beat> <count> <adjustment> Expand <beat> for <count> by <adjustment percentage. -
            -

            -

            TRACK ForceOut Force voicing and raw data output for track. -
            -

            -

            Goto <name> jump processing to <name>. -
            -

            -

            Groove <name> Enable a previously defined groove. -
            -

            -

            GrooveClear Delete all current Grooves from memory. -
            -

            -

            TRACK Harmony [Option] ... Set harmony for Bass, Walk, Arpeggio, Scale, Solo and Melody tracks. -
            -

            -

            TRACK HarmonyOnly <Option> ... Force track to sound only harmony notes from current pattern. -
            -

            -

            TRACK HarmonyVolume <Percentage> ... Set the volume used by harmony notes. -
            -

            -

            If <test> <cmds> Test condition and process <cmds>. -
            -

            -

            IfEnd End processing of ``IF''. -
            -

            -

            Inc <name> [value] Increment the value of variable <name> by 1 or <value>. -
            -

            -

            Include <file> Include a file. -
            -

            -

            TRACK Invert <value> ... set the inversion factor for chords in track. -
            -

            -

            KeySig <sig> Set the key signature. -
            -

            -

            Label <name> Set <name> as a label for ``GOTO''. -
            -

            -

            TRACK Limit <value> Limit number of notes used in a chord to <value>. -
            -

            -

            Lyric <options> Set various lyrics options. -
            -

            -

            MIDI <values> Send raw MIDI commands to MIDI meta-track. -
            -

            -

            TRACK MIDIClear <Beat Controller Data> Set command (or series) of MIDI commands to send when track is completed. -
            -

            -

            MIDIFile <option> Set various MIDI file generation options. -
            -

            -

            TRACK MIDIGlis <1..127> Set MIDI portamento (glissando) value for track. -
            -

            -

            TRACK MIDIInc <File> <Options> Include an existing MIDI file into a track. -
            -

            -

            MIDIMark [offset] Label Inserts Label into the MIDI track. -
            -

            -

            TRACK MIDIPan <0..127> Set MIDI pan/balance for track. -
            -

            -

            TRACK MIDISeq <Beat Controller Data> options> ... Set MIDI controller data for a track. -
            -

            -

            MIDISplit <channel list> Force split output for track. -
            -

            -

            TRACK MIDITName <string> Assigns an alternate name to a MIDI track. -
            -

            -

            TRACK MIDIVoice <Beat Controller Data> Set ``one-time'' MIDI controller command for track. -
            -

            -

            TRACK MIDIVolume <1..128> Set MIDI volume for track. -
            -

            -

            TRACK Mallet <Rate=nn | Decay=nns> Set mallet repeat for track. -
            -

            -

            MmaEnd <file> Set filename to process after main file completed. -
            -

            -

            MmaStart <file> Set file to include before processing main file. -
            -

            -

            Mset <name> <lines> Set <variable> to series of lines. -
            -

            -

            MsetEnd End of a ``Mset'' section. -
            -

            -

            NewSet <name> <stuff> Set the variable <name> to <stuff>. -
            -

            -

            TRACK NoteSpan <start> <end> set MIDI range of notes for track. -
            -

            -

            TRACK Octave <0..10> ... Set the octave for track. -
            -

            -

            TRACK Off Disable note generation for specified track. -
            -

            -

            TRACK On Enable note generation for specified track. -
            -

            -

            Print <stuff> Print <stuff> to output during compile. Useful for debugging. -
            -

            -

            PrintActive Print list of active tracks to output. -
            -

            -

            PrintChord <name(s)> Print the chord and scale for specific chord types. -
            -

            -

            TRACK RSkip <Value> ... Skip/silence random percentage of notes. -
            -

            -

            TRACK RTime <Value] ... -
            -

            -

            TRACK RVolume <adj> ... Set volume randomization for track. -
            -

            -

            TRACK Range <value> Set number of octaves used in Scale and Arpeggio tracks. -
            -

            -

            Repeat Start a repeated section. -
            -

            -

            RepeatEnd [count] End a repeated section. -
            -

            -

            RepeatEnding Start a repeat-ending. -
            -

            -

            TRACK Riff <pattern> Define a special pattern to use in track for next bar. -
            -

            -

            RndSeed <Value> ... Seed random number generator. -
            -

            -

            RndSet <variable> <list of values> Randomly set variable. -
            -

            -

            TRACK ScaleType <Chromatic | Auto> ... Set type of scale. Only for Scale tracks. -
            -

            -

            Seq Set the sequence point (bar pattern number). -
            -

            -

            [TRACK] SeqClear Clears sequence for track (or all tracks). -
            -

            -

            [TRACK] SeqRnd <On/Off/Tracks> Enable random seqeuence selection for track (or all tracks). -
            -

            -

            [TRACK] SeqRndWeight <list of values> Sets the randomization weight for track or global. -
            -

            -

            SeqSize <value> Set the number of bars in a sequence. -
            -

            -

            TRACK Sequence <pattern> ... Set pattern(s) to use for track. -
            -

            -

            Set <name> <stuff> Set the variable <name> to <stuff>. -
            -

            -

            SetAutoLibPath <path> Set the Auto-Include file path. -
            -

            -

            SetIncPath <path> Set the path for included files. -
            -

            -

            SetLibPath <path> Set the path to the style file library. -
            -

            -

            SetOutPath <path> Set the output filename. -
            -

            -

            ShowVars Display user defined variables. -
            -

            -

            StackValue <stuff> Push <stuff> onto a temporary stack. Remove with special macro $_StackValue. -
            -

            -

            TRACK Strum <value> ... Set the strumming factor for Chord tracks. -
            -

            -

            SwingMode <on/off> Set swing mode timing. -
            -

            -

            Tempo <rate> Set the rate in beats per minute. -
            -

            -

            Time <count> Set number of beats in a bar. -
            -

            -

            TimeSig <nn dd> Set the MIDI timesignature (not used by MMA). -
            -

            -

            TRACK Tone <Note> ... Set the drum-tone to use in a sequence. -
            -

            -

            Transpose <value> Transpose all tracks to a different key. -
            -

            -

            UnSet <name> Remove the variable <name>. -
            -

            -

            [TRACK] Unify <On | Off> ... Unify overlapping notes. -
            -

            -

            Use <file> Include/import an existing .mma file. -
            -

            -

            VExpand <on/off> Set variable expansion. -
            -

            -

            TRACK Voice <instrument> ... Set MIDI voice for track. -
            -

            -

            VoiceTr <old=new> ... - translates MIDI instrument <old> to <new>. -
            -

            -

            VoiceVolTr <voice>=<adj> ... - adjusts volume for specified voice. -
            -

            -

            TRACK Voicing <options. Set the voicing for a chord track. -
            -

            -

            [TRACK] Volume <value> ... Set the volume for a track or all tracks. -
            -

            -

            -
            +This appendix is a reference to the chords that +MMA recognizes and +name/value tables for drum and instrument names. The tables have been +auto-generated by +MMA using the -D options.

            -


            + +

            +Chord Names +

            + +

            + +MMA recognizes standard chord names as listed below. The names are +case sensitive and must be entered in uppercase letters as shown: + +

            +A + A$\sharp$ + A$\flat$ + B + B$\sharp$ + B$\flat$ + C + C$\sharp$ + C$\flat$ + D + D$\sharp$ + D$\flat$ + E + E$\sharp$ + E$\flat$ + F + F$\sharp$ + F$\flat$ + G + G$\sharp$ + G$\flat$ + +

            +Please note that in your input files you must use a lowercase ``b'' or +an ``&'' to represent a $\flat$ and a ``#'' for a $\sharp$. + +

            +All ``7th'' chords are ``dominant 7th'' unless specifically noted as +``major''. A dominant 7th has a flattened 7th note (in a C7 chord this +is a b$\flat$; a C Major 7th chord has a b$\natural$). + +

            +For a more detailed listing of the chords, notes and scales you should +download the document www.mellowood.ca/mma/chords.pdf.gz. + +

            +The following types of chords are recognized (these are case sensitive +and must be in the mixed upper and lowercase shown): + +

            + +

            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            $\sharp$5Augmented triad.
            ($\flat$5)Major triad with flat 5th.
            +Augmented triad.
            +7An augmented chord (raised 5th) with a dominant 7th.
            +7$\flat$9$\sharp$11Augmented 7th with flat 9th and sharp 11th.
            +97th plus 9th with sharp 5th (same as aug9).
            +9M7An augmented chord (raised 5th) with a major 7th and 9th.
            +M7Major 7th with sharp 5th.
            119th chord plus 11th (3rd not voiced).
            11$\flat$97th chord plus flat 9th and 11th.
            137th (including 5th) plus 13th (the 9th and 11th are not voiced).
            13$\sharp$117th plus sharp 11th and 13th (9th not voiced).
            13$\sharp$97th (including 5th) plus 13th and sharp 9th (11th not voiced).
            13$\flat$57th with flat 5th, plus 13th (the 9th and 11th are not voiced).
            13$\flat$97th (including 5th) plus 13th and flat 9th (11th not voiced).
            13sus7sus, plus 9th and 13th
            13sus$\flat$97sus, plus flat 9th and 13th
            5Altered Fifth or Power Chord; root and 5th only.
            6Major tiad with added 6th.
            6(add9)6th with added 9th. This is sometimes notated as a slash chord in the form ``6/9''.
            696th with added 9th. This is sometimes notated as a slash chord in the form ``6/9''.
            77th.
            7$\sharp$117th plus sharp 11th (9th omitted).
            7$\sharp$5An augmented chord (raised 5th) with a dominant 7th.
            7$\sharp$5$\sharp$97th with sharp 5th and sharp 9th.
            7$\sharp$5$\flat$9An augmented chord (raised 5th) with a dominant 7th and flat 9th.
            7$\sharp$97th with sharp 9th.
            7$\sharp$9$\sharp$117th plus sharp 9th and sharp 11th.
            7$\sharp$9$\flat$137th with sharp 9th and flat 13th.
            7(omit3)7th with unvoiced 3rd.
            7+An augmented chord (raised 5th) with a dominant 7th.
            7+5An augmented chord (raised 5th) with a dominant 7th.
            7+97th with sharp 9th.
            7-57th, flat 5.
            7-97th with flat 9th.
            7alt7th with flat 5th and flat 9th.
            7$\flat$57th, flat 5.
            7$\flat$5$\sharp$97th with flat 5th and sharp 9th.
            7$\flat$5$\flat$97th with flat 5th and flat 9th.
            7$\flat$97th with flat 9th.
            7$\flat$9$\sharp$117th plus flat 9th and sharp 11th.
            7omit37th with unvoiced 3rd.
            7sus7th with suspended 4th, dominant 7th with 3rd raised half tone.
            7sus2A sus2 with dominant 7th added.
            7sus47th with suspended 4th, dominant 7th with 3rd raised half tone.
            7sus$\flat$97th with suspended 4th and flat 9th.
            97th plus 9th.
            9$\sharp$117th plus 9th and sharp 11th.
            9$\sharp$57th plus 9th with sharp 5th (same as aug9).
            9+57th plus 9th with sharp 5th (same as aug9).
            9-57th plus 9th with flat 5th.
            9$\flat$57th plus 9th with flat 5th.
            9sus7sus plus 9th.
            9sus47sus plus 9th.
            MMajor triad. This is the default and is used in the absense of any other chord type specification.
            M13Major 7th (including 5th) plus 13th (9th and 11th not voiced).
            M13$\sharp$11Major 7th plus sharp 11th and 13th (9th not voiced).
            M6Major tiad with added 6th.
            M7Major 7th.
            M7$\sharp$11Major 7th plus sharp 11th (9th omitted).
            M7$\sharp$5Major 7th with sharp 5th.
            M7(add13)7th (including 5th) plus 13th and flat 9th (11th not voiced).
            M7+5Major 7th with sharp 5th.
            M7-5Major 7th with a flat 5th.
            M7$\flat$5Major 7th with a flat 5th.
            M9Major 7th plus 9th.
            M9$\sharp$11Major 9th plus sharp 11th.
            add9Major chord plus 9th (no 7th.)
            augAugmented triad.
            aug7An augmented chord (raised 5th) with a dominant 7th.
            aug7$\sharp$9An augmented chord (raised 5th) with a dominant 7th and sharp 9th.
            aug7$\flat$9An augmented chord (raised 5th) with a dominant 7th and flat 9th.
            aug97th plus 9th with sharp 5th (same as aug9).
            aug9M7An augmented chord (raised 5th) with a major 7th and 9th.
            dimA dim7, not a triad!
            dim3Diminished triad (non-standard notation).
            dim7Diminished seventh.
            dim7(addM7)Diminished tirad with added Major 7th.
            mMinor triad.
            m$\sharp$5Minor triad with augmented 5th.
            m$\sharp$7Minor Triad plus Major 7th. You will also see this printed as ``m(maj7)'', ``m+7'', ``min(maj7)'' and ``min$\sharp$7'' (which +MMA accepts); as well as the +MMA invalid forms: ``-($\Delta$7)'', and ``min$\natural$7''.
            m(add9)Minor triad plus 9th (no 7th).
            m($\flat$5)Minor triad with flat 5th (aka dim).
            m(maj7)Minor Triad plus Major 7th. You will also see this printed as ``m(maj7)'', ``m+7'', ``min(maj7)'' and ``min$\sharp$7'' (which +MMA accepts); as well as the +MMA invalid forms: ``-($\Delta$7)'', and ``min$\natural$7''.
            m(sus9)Minor triad plus 9th (no 7th).
            m+5Minor triad with augmented 5th.
            m+7Minor Triad plus Major 7th. You will also see this printed as ``m(maj7)'', ``m+7'', ``min(maj7)'' and ``min$\sharp$7'' (which +MMA accepts); as well as the +MMA invalid forms: ``-($\Delta$7)'', and ``min$\natural$7''.
            m+7$\sharp$9Augmented minor 7 plus sharp 9th.
            m+7$\flat$9Augmented minor 7 plus flat 9th.
            m+7$\flat$9$\sharp$11Augmented minor 7th with flat 9th and sharp 11th.
            m119th with minor 3rd, plus 11th.
            m11$\flat$5Minor 7th with flat 5th plus 11th.
            m13Minor 7th (including 5th) plus 13th (9th and 11th not voiced).
            m6Minor 6th (flat 3rd plus a 6th).
            m6(add9)Minor 6th with added 9th. This is sometimes notated as a slash chord in the form ``m6/9''.
            m69Minor 6th with added 9th. This is sometimes notated as a slash chord in the form ``m6/9''.
            m7Minor 7th (flat 3rd plus dominant 7th).
            m7$\sharp$9Minor 7th with added sharp 9th.
            m7($\sharp$9)Minor 7th with added sharp 9th.
            m7(add11)Minor 7th plus 11th.
            m7(add13)Minor 7th plus 13th.
            m7($\flat$9)Minor 7th with added flat 9th.
            m7(omit5)Minor 7th with unvoiced 5th.
            m7-5Minor 7th, flat 5 (aka 1/2 diminished).
            m7$\flat$5Minor 7th, flat 5 (aka 1/2 diminished).
            m7$\flat$5$\flat$9Minor 7th with flat 5th and flat 9th.
            m7$\flat$9Minor 7th with added flat 9th.
            m7$\flat$9$\sharp$11Minor 7th plus flat 9th and sharp 11th.
            m7omit5Minor 7th with unvoiced 5th.
            m9Minor triad plus 7th and 9th.
            m9$\sharp$11Minor 7th plus 9th and sharp 11th.
            m9$\flat$5Minor triad, flat 5, plus 7th and 9th.
            mM7Minor Triad plus Major 7th. You will also see this printed as ``m(maj7)'', ``m+7'', ``min(maj7)'' and ``min$\sharp$7'' (which +MMA accepts); as well as the +MMA invalid forms: ``-($\Delta$7)'', and ``min$\natural$7''.
            mM7(add9)Minor Triad plus Major 7th and 9th.
            maj13Major 7th (including 5th) plus 13th (9th and 11th not voiced).
            maj7Major 7th.
            maj9Major 7th plus 9th.
            m$\flat$5Minor triad with flat 5th (aka dim).
            min$\sharp$7Minor Triad plus Major 7th. You will also see this printed as ``m(maj7)'', ``m+7'', ``min(maj7)'' and ``min$\sharp$7'' (which +MMA accepts); as well as the +MMA invalid forms: ``-($\Delta$7)'', and ``min$\natural$7''.
            min(maj7)Minor Triad plus Major 7th. You will also see this printed as ``m(maj7)'', ``m+7'', ``min(maj7)'' and ``min$\sharp$7'' (which +MMA accepts); as well as the +MMA invalid forms: ``-($\Delta$7)'', and ``min$\natural$7''.
            omit3(add9)Triad: root, 5th and 9th.
            omit3add9Triad: root, 5th and 9th.
            susSuspended 4th, major triad with the 3rd raised half tone.
            sus2Suspended 2nd, major triad with the major 2nd above the root substituted for 3rd.
            sus4Suspended 4th, major triad with the 3rd raised half tone.
            sus97sus plus 9th.
             
            +In modern pop charts the ``M'' in a major 7th chord (and other major +chords) is often represented by a ``$\Delta$''. When entering these +chords, just replace the ``$\Delta$'' with an ``M''. For example, +change ``G$\Delta$7'' to ``GM7''. + +

            +A chord name without a type is interpreted as a major chord (or +triad). For example, the chord ``C'' is identical to ``CM''. + +

            + +MMA has an large set of defined chords. However, you can add your +own with the DEFCHORD command, details + here. + +

            + +

            +
            +Octave Adjustment +

            + +

            +Depending on the key and chord sequence, a chord may end up in the +wrong octave. This is caused by +MMA 's internal routines which +create a chord: all of the tables are maintained for a ``C'' chord and +the others are derived from that point by subtracting or adding a +constant. To compensate you can add a leading ``-'' or ``+'' to the +chordname to force the movement of that chord and scale up or down an +octave. + +

            +For example, the following line will move the chord up and down for +the third and fourth beats: + +

            + + + +
            + Cm Fm -Gm +D7 + +
            + +

            +The effect of octave shifting is also highly dependent on the voicing +options in effect for the track. + +

            +You'll have to listen to the +MMA output to determine when +and where to use this adjustment. Hopefully, it won't be needed all +that much. + +

            +If you have a large number of chords to adjust, use the CHORDADJUST +command , here. + +

            + +

            +Altered Chords +

            + +

            +According to Standardized Chord Symbol Notation altered +chords should be written in the form +Cmi +$^{7}(^{\flat{}9}_{\sharp{}5})$. However, this is pretty hard to type +(and parse). So, we've used the convention that the altered +intervals should be written in numerical order: +Cm$\sharp$5$\flat$9. Also, note that we use ``m'' for ``minor'' which +appears to be more the conventional method than ``mi''. + +

            + +

            +Diminished Chords +

            + +

            +In most pop and jazz charts it is assumed that a diminished chord is +always a diminished 7th ...a diminished triad is never played. + +MMA continues this, sometimes erroneous +assumption.A.1You can change the behavior in several ways: change the chord notes and scale for a +``dim'' from a dim7 to a triad by following the instructions +here; use the slightly oddball +notation of ``m$\flat$5'' which generates a ``diminished triad''; or +use the more-oddball notation ``dim3''. + +

            +Notational notes: In printed music a ``diminished'' chord is sometimes +represented with a small circle symbol (eg. +``FO'') and a ``half-diminished'' as a +small slashed circle (e.g., ``CØ''). + +

            +A half-diminished chord in +MMA is specified with the notation +``m7$\flat$5''. + +

            + +

            +Slash Chords +

            + +

            +Charts sometimes use slash chords in the form ``Am/E''. This +notation is used, mainly, to indicate chord inversions. For example, +the chord notes in ``Am/E'' become ``E'', ``A'' and ``C'' with the +``E'' taking the root position. +MMA will accept chords of this type. +However, you may not notice any difference in the generated tracks due +to the inversions used by the current pattern. + +

            +You may also encounter slash chords where the slash-part of the chord +is not a note in the chord. Consider the ambiguous notation +``Dm/C''. The composer (or copyist) might mean to add a ``C'' bass +note to a ``Dm'' chord, or she might mean ``Dm7'', or even an inverted +``Dm7''. +MMA will handle these ...almost perfectly. When the +``slash'' part of the chord indicates a note which is not a +note in the chord, +MMA assumes that the indicated note should be +used in the bass line. Since each chord generated by +MMA also has a +``scale'' associated with it for use by bass and scale patterns this +works. For example, a C Major chord will have the scale ``c, d, e, f, +g, a, b''; a C Minor chord has the same scale, but with an e$\flat$. +If the slash note is contained in the scale, the scale will be rotated +so that the note becomes the ``root'' note. + +

            +A warning message will be printed if the note is not in both the chord +and the scale. + +

            +Another notation you may see is something like ``Dm/9''. Again, +the meaning is not clear. It probably means a ``Dm9'', or ``Dm9/E'' +... but since +MMA isn't sure this notation will generate an +error. + +

            +Please note that for fairly obvious reasons you cannot have both slash +notation and an inversion (see the next section). + +

            +For more details on ``slash chords'' your favorite +music theory book or teacher is highly recommended! + +

            + +

            +Chord Inversions +

            + +

            +Instead of using a slash chord you can specify an inversion to use with a chord. +The notation is simply an ``>'' and a number between -5 and 5 immediately following +the chord name. + +

            +The chord will be ``rotated'' as specified by the value after the ``>''. + +

            +For example, the chord ``C>2'' will generate the notes G, C and E; ``F>-1'' +gives C, F and A. + +

            +There is an important difference between this option and a slash chord: in inversions neither +the root note nor the associated scale are modified. + +

            + +

            + +
            +MIDI Voices +

            + +

            +When setting a voice for a track (i.e. Bass Voice NN), you can specify +the patch to use with a symbolic constant. Any combination of upper +and lower case is permitted. The following are the names with the +equivalent voice numbers: + +

            + +

            + +

            +Voices, Alphabetically +

            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            5thSawWave86
            Accordion21
            AcousticBass32
            AgogoBells113
            AltoSax65
            Applause/Noise126
            Atmosphere99
            BagPipe109
            Bandoneon23
            Banjo105
            BaritoneSax67
            Bass&Lead87
            Bassoon70
            BirdTweet123
            BottleBlow76
            BowedGlass92
            BrassSection61
            BreathNoise121
            Brightness100
            Celesta8
            Cello42
            Charang84
            ChifferLead83
            ChoirAahs52
            ChurchOrgan19
            Clarinet71
            Clavinet7
            CleanGuitar27
            ContraBass43
            Crystal98
            DistortonGuitar30
            EchoDrops102
            EnglishHorn69
            EPiano5
            Fantasia88
            Fiddle110
            FingeredBass33
            Flute73
            FrenchHorn60
            FretlessBass35
            Glockenspiel9
            Goblins101
            GuitarFretNoise120
            GuitarHarmonics31
            GunShot127
            HaloPad94
            Harmonica22
            HarpsiChord6
            HelicopterBlade125
            Honky-TonkPiano3
            IceRain96
            JazzGuitar26
            Kalimba108
            Koto107
            Marimba12
            MelodicTom1117
            MetalPad93
            MusicBox10
            MutedGuitar28
            MutedTrumpet59
            NylonGuitar24
            Oboe68
            Ocarina79
            OrchestraHit55
            OrchestralHarp46
            Organ116
            Organ217
            Organ318
            OverDriveGuitar29
            PanFlute75
            Piano10
            Piano21
            Piano32
            Piccolo72
            PickedBass34
            PizzicatoString45
            PolySynth90
            Recorder74
            ReedOrgan20
            ReverseCymbal119
            RhodesPiano4
            Santur15
            SawWave81
            SeaShore122
            Shakuhachi77
            Shamisen106
            Shanai111
            Sitar104
            SlapBass136
            SlapBass237
            SlowStrings49
            SoloVoice85
            SopranoSax64
            SoundTrack97
            SpaceVoice91
            SquareWave80
            StarTheme103
            SteelDrums114
            SteelGuitar25
            Strings48
            SweepPad95
            SynCalliope82
            SynthBass138
            SynthBass239
            SynthBrass162
            SynthBrass263
            SynthDrum118
            SynthStrings150
            SynthStrings251
            SynthVox54
            TaikoDrum116
            TelephoneRing124
            TenorSax66
            Timpani47
            TinkleBell112
            TremoloStrings44
            Trombone57
            Trumpet56
            Tuba58
            TubularBells14
            Vibraphone11
            Viola41
            Violin40
            VoiceOohs53
            WarmPad89
            Whistle78
            WoodBlock115
            Xylophone13
             
            +

            + +

            +Voices, By MIDI Value +

            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            0Piano1
            1Piano2
            2Piano3
            3Honky-TonkPiano
            4RhodesPiano
            5EPiano
            6HarpsiChord
            7Clavinet
            8Celesta
            9Glockenspiel
            10MusicBox
            11Vibraphone
            12Marimba
            13Xylophone
            14TubularBells
            15Santur
            16Organ1
            17Organ2
            18Organ3
            19ChurchOrgan
            20ReedOrgan
            21Accordion
            22Harmonica
            23Bandoneon
            24NylonGuitar
            25SteelGuitar
            26JazzGuitar
            27CleanGuitar
            28MutedGuitar
            29OverDriveGuitar
            30DistortonGuitar
            31GuitarHarmonics
            32AcousticBass
            33FingeredBass
            34PickedBass
            35FretlessBass
            36SlapBass1
            37SlapBass2
            38SynthBass1
            39SynthBass2
            40Violin
            41Viola
            42Cello
            43ContraBass
            44TremoloStrings
            45PizzicatoString
            46OrchestralHarp
            47Timpani
            48Strings
            49SlowStrings
            50SynthStrings1
            51SynthStrings2
            52ChoirAahs
            53VoiceOohs
            54SynthVox
            55OrchestraHit
            56Trumpet
            57Trombone
            58Tuba
            59MutedTrumpet
            60FrenchHorn
            61BrassSection
            62SynthBrass1
            63SynthBrass2
            64SopranoSax
            65AltoSax
            66TenorSax
            67BaritoneSax
            68Oboe
            69EnglishHorn
            70Bassoon
            71Clarinet
            72Piccolo
            73Flute
            74Recorder
            75PanFlute
            76BottleBlow
            77Shakuhachi
            78Whistle
            79Ocarina
            80SquareWave
            81SawWave
            82SynCalliope
            83ChifferLead
            84Charang
            85SoloVoice
            865thSawWave
            87Bass&Lead
            88Fantasia
            89WarmPad
            90PolySynth
            91SpaceVoice
            92BowedGlass
            93MetalPad
            94HaloPad
            95SweepPad
            96IceRain
            97SoundTrack
            98Crystal
            99Atmosphere
            100Brightness
            101Goblins
            102EchoDrops
            103StarTheme
            104Sitar
            105Banjo
            106Shamisen
            107Koto
            108Kalimba
            109BagPipe
            110Fiddle
            111Shanai
            112TinkleBell
            113AgogoBells
            114SteelDrums
            115WoodBlock
            116TaikoDrum
            117MelodicTom1
            118SynthDrum
            119ReverseCymbal
            120GuitarFretNoise
            121BreathNoise
            122SeaShore
            123BirdTweet
            124TelephoneRing
            125HelicopterBlade
            126Applause/Noise
            127GunShot
             
            +

            + +

            + +
            +Drum Notes +

            + +

            +When defining a drum tone, you can specify the patch to use with a +symbolic constant. Any combination of upper and lower case is +permitted. In addition to the drum tone name and the MIDI value, the +equivalent ``name'' in +$^{superscript}$ is included. The ``names'' may help you +find the tones on your keyboard. + +

            + +

            +Drum Notes, Alphabetically +

            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            Cabasa69$^{A}$
            Castanets84$^{C}$
            ChineseCymbal52$^{E}$
            Claves75$^{E\flat}$
            ClosedHiHat42$^{G\flat}$
            CowBell56$^{A\flat}$
            CrashCymbal149$^{D\flat}$
            CrashCymbal257$^{A}$
            HandClap39$^{E\flat}$
            HighAgogo67$^{G}$
            HighBongo60$^{C}$
            HighQ27$^{E\flat}$
            HighTimbale65$^{F}$
            HighTom150$^{D}$
            HighTom248$^{C}$
            HighWoodBlock76$^{E}$
            JingleBell83$^{B}$
            KickDrum136$^{C}$
            KickDrum235$^{B}$
            LongGuiro74$^{D}$
            LongLowWhistle72$^{C}$
            LowAgogo68$^{A\flat}$
            LowBongo61$^{D\flat}$
            LowConga64$^{E}$
            LowTimbale66$^{G\flat}$
            LowTom143$^{G}$
            LowTom241$^{F}$
            LowWoodBlock77$^{F}$
            Maracas70$^{B\flat}$
            MetronomeBell34$^{B\flat}$
            MetronomeClick33$^{A}$
            MidTom147$^{B}$
            MidTom245$^{A}$
            MuteCuica78$^{G\flat}$
            MuteHighConga62$^{D}$
            MuteSudro85$^{D\flat}$
            MuteTriangle80$^{A\flat}$
            OpenCuica79$^{G}$
            OpenHighConga63$^{E\flat}$
            OpenHiHat46$^{B\flat}$
            OpenSudro86$^{D}$
            OpenTriangle81$^{A}$
            PedalHiHat44$^{A\flat}$
            RideBell53$^{F}$
            RideCymbal151$^{E\flat}$
            RideCymbal259$^{B}$
            ScratchPull30$^{G\flat}$
            ScratchPush29$^{F}$
            Shaker82$^{B\flat}$
            ShortGuiro73$^{D\flat}$
            ShortHiWhistle71$^{B}$
            SideKick37$^{D\flat}$
            Slap28$^{E}$
            SnareDrum138$^{D}$
            SnareDrum240$^{E}$
            SplashCymbal55$^{G}$
            SquareClick32$^{A\flat}$
            Sticks31$^{G}$
            Tambourine54$^{G\flat}$
            VibraSlap58$^{B\flat}$
             
            +

            + +

            +Drum Notes, by MIDI Value +

            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            27HighQ$^{E\flat}$
            28Slap$^{E}$
            29ScratchPush$^{F}$
            30ScratchPull$^{G\flat}$
            31Sticks$^{G}$
            32SquareClick$^{A\flat}$
            33MetronomeClick$^{A}$
            34MetronomeBell$^{B\flat}$
            35KickDrum2$^{B}$
            36KickDrum1$^{C}$
            37SideKick$^{D\flat}$
            38SnareDrum1$^{D}$
            39HandClap$^{E\flat}$
            40SnareDrum2$^{E}$
            41LowTom2$^{F}$
            42ClosedHiHat$^{G\flat}$
            43LowTom1$^{G}$
            44PedalHiHat$^{A\flat}$
            45MidTom2$^{A}$
            46OpenHiHat$^{B\flat}$
            47MidTom1$^{B}$
            48HighTom2$^{C}$
            49CrashCymbal1$^{D\flat}$
            50HighTom1$^{D}$
            51RideCymbal1$^{E\flat}$
            52ChineseCymbal$^{E}$
            53RideBell$^{F}$
            54Tambourine$^{G\flat}$
            55SplashCymbal$^{G}$
            56CowBell$^{A\flat}$
            57CrashCymbal2$^{A}$
            58VibraSlap$^{B\flat}$
            59RideCymbal2$^{B}$
            60HighBongo$^{C}$
            61LowBongo$^{D\flat}$
            62MuteHighConga$^{D}$
            63OpenHighConga$^{E\flat}$
            64LowConga$^{E}$
            65HighTimbale$^{F}$
            66LowTimbale$^{G\flat}$
            67HighAgogo$^{G}$
            68LowAgogo$^{A\flat}$
            69Cabasa$^{A}$
            70Maracas$^{B\flat}$
            71ShortHiWhistle$^{B}$
            72LongLowWhistle$^{C}$
            73ShortGuiro$^{D\flat}$
            74LongGuiro$^{D}$
            75Claves$^{E\flat}$
            76HighWoodBlock$^{E}$
            77LowWoodBlock$^{F}$
            78MuteCuica$^{G\flat}$
            79OpenCuica$^{G}$
            80MuteTriangle$^{A\flat}$
            81OpenTriangle$^{A}$
            82Shaker$^{B\flat}$
            83JingleBell$^{B}$
            84Castanets$^{C}$
            85MuteSudro$^{D\flat}$
            86OpenSudro$^{D}$
             
            +

            + +

            + +
            +MIDI Controllers +

            + +

            +When specifying a MIDI Controller in a MIDISEQ or +MIDIVOICE command you can use the absolute value in (either as +a decimal number or in hexadecimal by prefixing the value with a +``0x''), or the symbolic name in the following tables. The tables have +been extracted from information at +http://www.midi.org/about-midi/table3.shtml. Note that all the +values in these tables are in hexadecimal notation. + +

            +Complete reference for this is not a part of +MMA . Please refer to a +detailed text on MIDI or the manual for your synthesizer. + +

            + +

            +Controllers, Alphabetically +

            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            AllNotesOff123
            AllSoundsOff120
            AttackTime73
            Balance8
            BalanceLSB40
            Bank0
            BankLSB32
            Breath2
            BreathLSB34
            Brightness74
            Chorus93
            Ctrl102102
            Ctrl103103
            Ctrl104104
            Ctrl105105
            Ctrl106106
            Ctrl107107
            Ctrl108108
            Ctrl109109
            Ctrl110110
            Ctrl111111
            Ctrl112112
            Ctrl113113
            Ctrl114114
            Ctrl115115
            Ctrl116116
            Ctrl117117
            Ctrl118118
            Ctrl119119
            Ctrl1414
            Ctrl1515
            Ctrl2020
            Ctrl2121
            Ctrl2222
            Ctrl2323
            Ctrl2424
            Ctrl2525
            Ctrl2626
            Ctrl2727
            Ctrl2828
            Ctrl2929
            Ctrl33
            Ctrl3030
            Ctrl3131
            Ctrl3535
            Ctrl4141
            Ctrl4646
            Ctrl4747
            Ctrl5252
            Ctrl5353
            Ctrl5454
            Ctrl5555
            Ctrl5656
            Ctrl5757
            Ctrl5858
            Ctrl5959
            Ctrl6060
            Ctrl6161
            Ctrl6262
            Ctrl6363
            Ctrl7979
            Ctrl8585
            Ctrl8686
            Ctrl8787
            Ctrl8888
            Ctrl8989
            Ctrl99
            Ctrl9090
            Data6
            DataDec97
            DataInc96
            DataLSB38
            DecayTime75
            Detune94
            Effect112
            Effect1LSB44
            Effect213
            Effect2LSB45
            Expression11
            ExpressionLSB43
            Foot4
            FootLSB36
            General116
            General1LSB48
            General217
            General2LSB49
            General318
            General3LSB50
            General419
            General4LSB51
            General580
            General681
            General782
            General883
            Hold269
            Legato68
            LocalCtrl122
            Modulation1
            ModulationLSB33
            NonRegLSB98
            NonRegMSB99
            OmniOff124
            OmniOn125
            Pan10
            PanLSB42
            Phaser95
            PolyOff126
            PolyOn127
            Portamento65
            PortamentoCtrl84
            PortamentoLSB37
            RegParLSB100
            RegParMSB101
            ReleaseTime72
            ResetAll121
            Resonance71
            Reverb91
            SoftPedal67
            Sostenuto66
            Sustain64
            Tremolo92
            Variation70
            VibratoDelay78
            VibratoDepth77
            VibratoRate76
            Volume7
            VolumeLSB39
             
            +

            + +

            +Controllers, by Value +

            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            0Bank
            1Modulation
            2Breath
            3Ctrl3
            4Foot
            5Portamento
            6Data
            7Volume
            8Balance
            9Ctrl9
            10Pan
            11Expression
            12Effect1
            13Effect2
            14Ctrl14
            15Ctrl15
            16General1
            17General2
            18General3
            19General4
            20Ctrl20
            21Ctrl21
            22Ctrl22
            23Ctrl23
            24Ctrl24
            25Ctrl25
            26Ctrl26
            27Ctrl27
            28Ctrl28
            29Ctrl29
            30Ctrl30
            31Ctrl31
            32BankLSB
            33ModulationLSB
            34BreathLSB
            35Ctrl35
            36FootLSB
            37PortamentoLSB
            38DataLSB
            39VolumeLSB
            40BalanceLSB
            41Ctrl41
            42PanLSB
            43ExpressionLSB
            44Effect1LSB
            45Effect2LSB
            46Ctrl46
            47Ctrl47
            48General1LSB
            49General2LSB
            50General3LSB
            51General4LSB
            52Ctrl52
            53Ctrl53
            54Ctrl54
            55Ctrl55
            56Ctrl56
            57Ctrl57
            58Ctrl58
            59Ctrl59
            60Ctrl60
            61Ctrl61
            62Ctrl62
            63Ctrl63
            64Sustain
            65Portamento
            66Sostenuto
            67SoftPedal
            68Legato
            69Hold2
            70Variation
            71Resonance
            72ReleaseTime
            73AttackTime
            74Brightness
            75DecayTime
            76VibratoRate
            77VibratoDepth
            78VibratoDelay
            79Ctrl79
            80General5
            81General6
            82General7
            83General8
            84PortamentoCtrl
            85Ctrl85
            86Ctrl86
            87Ctrl87
            88Ctrl88
            89Ctrl89
            90Ctrl90
            91Reverb
            92Tremolo
            93Chorus
            94Detune
            95Phaser
            96DataInc
            97DataDec
            98NonRegLSB
            99NonRegMSB
            100RegParLSB
            101RegParMSB
            102Ctrl102
            103Ctrl103
            104Ctrl104
            105Ctrl105
            106Ctrl106
            107Ctrl107
            108Ctrl108
            109Ctrl109
            110Ctrl110
            111Ctrl111
            112Ctrl112
            113Ctrl113
            114Ctrl114
            115Ctrl115
            116Ctrl116
            117Ctrl117
            118Ctrl118
            119Ctrl119
            120AllSoundsOff
            121ResetAll
            122LocalCtrl
            123AllNotesOff
            124OmniOff
            125OmniOn
            126PolyOff
            127PolyOn
             
            +

            +1 +


            Footnotes

            +
            +
            ... +assumption.A.1
            +
            Sometimes a reliable source agrees with us ...in +this case Standardized Chord Symbol Notation is quite clear +that ``dim'' is a Diminished 7th and a diminished triad should be +notated as mi$^{(\flat{}5)}$. + +
            +
            +
            bob -2007-03-07 +2008-09-28
            diff --git a/mma/docs/html/ref/node3.html b/mma/docs/html/ref/node3.html index 2115002..26d692e 100644 --- a/mma/docs/html/ref/node3.html +++ b/mma/docs/html/ref/node3.html @@ -1,4 +1,4 @@ - + - + next - up - previous
            - Next: Next: Patterns - Up: Up: Reference Manual - Previous: Previous: Running
            -
            +
            Subsections - @@ -148,10 +149,10 @@ Track Channels

            MIDI defines 16 distinct channels numbered 1 to 16.3.1 There is nothing which says that ``chording'' + HREF="#foot1007">3.1 There is nothing which says that ``chording'' should be sent to a specific channel, but the drum channel should always be channel 10.3.2 + HREF="#foot1008">3.2

            For MMA to produce any output, a MIDI channel must be assigned to a @@ -168,10 +169,10 @@ for other programs or as a ``keyboard track'' on your synth. In most cases this will work out just fine. However, there are a number of methods you can use to set the channels ``manually.'' You might want to read the sections on CHANNEL -(here), CHSHARE -(here), ON -(here), and OFF -(here). +(here), CHSHARE +(here), ON +(here), and OFF +(here).

            Why bother with all these channels? It would be much easier to put all @@ -278,8 +279,8 @@ Arpeggio

            -In musical terms an arpeggio3.3 is the notes of a chord played +In musical terms an arpeggio3.3 is the notes of a chord played one at a time. MMA arpeggio tracks take the current chord and, in accordance to the current pattern, play single notes from the chord. @@ -302,7 +303,7 @@ Scale

            -The playing of scales is a common musical embellishment which addes +The playing of scales is a common musical embellishment which adds depth and character to a piece.

            @@ -321,7 +322,7 @@ sums up the logic used to create the scales:

            Minor
            A melodic minor scale3.4 + HREF="#foot1057">3.4

            Diminished
            @@ -404,7 +405,7 @@ Automatic Melodies Real composers don't need to fear much from this feature ...but it can create some interesting effects. ARIA tracks use a predefined pattern to generate melodies over a chord progression. They -can be used to actually compose a bit of music or simply to +can be used to actually compose a bit of music or simply to augment a section of an existing piece.

            @@ -419,23 +420,28 @@ There are a number of ways to silence a track:

              -
            • Use the OFF (page [*]) command to stop the - generation of MIDI data, +
            • Use the OFF command to stop the generation of MIDI data + here.

            • -
            • Disable the sequence for the bar with an empty sequence (page - [*]). +
            • Disable the sequence for the bar with an empty sequence + here.

            • -
            • Delete the entire sequence with SEQCLEAR (page - [*]). +
            • Delete the entire sequence with SEQCLEAR + here.

            • -
            • Disable the MIDI channel with a ``Channel 0'' (page - [*]). +
            • Disable the MIDI channel with a ``Channel 0'' + here. + +

              +

            • +
            • Force only the generation of specific tracks with the -T command + line option here.

            • @@ -450,56 +456,57 @@ details.



              Footnotes

              -
              ... 16.3.1
              +
              ... 16.3.1
              The values 1 to 16 are used in this document. Internally they are stored as values 0 to 15.
              -
              ... 10.3.2
              +
              ... 10.3.2
              This is not a MIDI rule, but a convention established in the GM (General MIDI) standard. If you want to find out more about this, there are lots of books on MIDI available.
              -
              ...arpeggio3.3
              +
              ...arpeggio3.3
              The term is derived from the Italian ``to play like a harp''.
              -
              ... scale3.4
              +
              ... scale3.4
              If you think that support for Melodic and Harmonic minor scales is important, please contact us.
              -

              + +
              bob -2007-03-07 +2008-09-28
              diff --git a/mma/docs/html/ref/node30.html b/mma/docs/html/ref/node30.html index 9786b72..1c516b9 100644 --- a/mma/docs/html/ref/node30.html +++ b/mma/docs/html/ref/node30.html @@ -1,4 +1,4 @@ - + -About this document ... - +Bibliography and Thanks + @@ -18,56 +18,133 @@ original version by: Nikos Drakos, CBLU, University of Leeds + + - -next - + +next + up - previous
              - Up: Next: Command Summary + Up: Reference Manual - Previous: Command Summary -
              + Previous: Symbols and Constants
              +

              -About this document ... +Bibliography and Thanks

              - LOST LOGO

              -Reference Manual

              -This document was generated using the -LaTeX2HTML translator Version 2002-2-1 (1.71) +I've had help from a lot of different people and sources in developing +this program. If I have missed listing you in the CONTRIB +file shipped with the +MMA distribution, please let me know and I'll +add it right away. I really want to do this! +

              -Copyright © 1993, 1994, 1995, 1996, -Nikos Drakos, -Computer Based Learning Unit, University of Leeds. +I've also had the use of a number of reference materials: +

              +
              +
              Craig Anderson. MIDI for Musicians. Amsco Publishing, New +York, NY. + +

              +

              +
              +
              William Duckworth. Music Fundamentals. Wadsworth Publishing, +Belomnt, CA. + +

              +

              +
              +
              Michael Esterowitz. How To Play From A Fakebook. Ekay Music, +Inc. Katonah, NY. + +

              +

              +
              +
              Pete Goodliffe. MIDI documentation (for the TSE3 library). +http://tse3.sourceforge.net/. + +

              +

              +
              +
              Norman Lloyd. The Golden Encyclopedia Of Music. Golden Press, +New York, NY. + +

              +

              +
              +
              The MIDI Manufacturers Association. Various papers, tables and + other information. http://www.midi.org/. + +

              +

              +
              +
              Victor López. Latin Rhythms: Mystery Unraveled. Alfred Publishing Company. These are handout notes from the 2005 Midwest Clinic 59th Annual Conference, Chicago, Illinois, December 16, 2005. A PDF of this document is available on various Internet sites. + +

              +

              +
              +
              Carl Brandt and Clinton Roemer. Standardized Chord + Symbol Notation. Roerick Music Co. Sherman Oaks, CA. + +

              +

              +
              + +

              +And, finally, to all those music teachers my parents and I paid for, +and the many people who have helped by listening and providing helpful +suggestions and encouragement in my musical pursuits for the +last 40 plus years that I've been banging, squeezing and blowing. You know +who you are--thanks. + +

              + +

              + +

              +
              bob -2007-03-07 +2008-09-28
              diff --git a/mma/docs/html/ref/node31.html b/mma/docs/html/ref/node31.html new file mode 100644 index 0000000..3d5d7a4 --- /dev/null +++ b/mma/docs/html/ref/node31.html @@ -0,0 +1,472 @@ + + + + + +Command Summary + + + + + + + + + + + + + + + + + + + + + +

              +Command Summary +

              + +

              +

              +TRACK Accent <beat adj> Adjust volume for specified beat(s) in each bar of a track. +
              +

              +

              AdjustVolume <name=value> Set the volume ratios for named volume(s). +
              +

              +

              AllGrooves apply a command to all grooves. +
              +

              +

              AllTracks <cmds> Applies cmds(s) to all active tracks. +
              +

              +

              TRACK Articulate <value> ... Duration/holding-time of notes. +
              +

              +

              Author <stuff> A specialized comment used by documentation extractors. +
              +

              +

              AutoSoloTracks <tracks> Set the tracks used in auto assigning solo/melody notes. +
              +

              +

              BarNumbers Leading <number> on data line (ignored). +
              +

              +

              BarRepeat Data bars can repeat with a ``* nn'' +
              +

              +

              BeatAdjust <beats> Adjust current pointer by <beats>. +
              +

              +

              Begin Delimits the start of a block. +
              +

              +

              TRACK ChShare <track> Force track to share MIDI track. +
              +

              +

              TRACK Channel <1..16> Force the MIDI channel for a track. +
              +

              +

              TRACK ChannelPref <1..16> Set a preferred channel for track. +
              +

              +

              ChordAdjust <Tonic=adj> Adjust center point of selected chords. +
              +

              +

              Comment <text> ignore/discard <text>. +
              +

              +

              TRACK Compress <value> ... Enable chord compression for track. +
              +

              +

              TRACK Copy <source> Overlay <source> track to specified track. +
              +

              +

              [TRACK] Cresc <[start] end count> Decrease volume over bars. +
              +

              +

              [TRACK] Cut <beat> Force all notes off at <beat> offset. +
              +

              +

              Debug <options> Selectively enable/disable debugging levels. +
              +

              +

              Dec <name> [value] Decrement the value of variable <name> by 1 or <value>. +
              +

              +

              [TRACK] Decresc <[start] end count> Increase volume over bars. +
              +

              +

              DefAlias Create an alias name for a Groove. +
              +

              +

              DefChord <name notelist scalelist> Define a new chord. +
              +

              +

              DefGroove <name> [Description] Define a new groove. +
              +

              +

              TRACK Define <pattern> Define a pattern to use in a track. +
              +

              +

              TRACK Delete Delete specified track for future use. +
              +

              +

              TRACK Direction [Up | Down | BOTH | RANDOM] ... Set direction of runs in Scale, Arpeggio and Walk tracks. +
              +

              +

              Doc <stuff> A special comment used by documentation extractors. +
              +

              +

              DocVar <description> A specialized comment used to document user variables in a library file. +
              +

              +

              DrumTR <old>=<new> translates MIDI drum tone <old> to <new>. +
              +

              +

              TRACK DrumType Force a solo track to be a drum track. +
              +

              +

              DrumVolTr <tone>=<adj> ... adjusts volume for specified drum tone. +
              +

              +

              TRACK DupRoot <octave> Duplicate the root note in a chord to lower/higher octave. +
              +

              +

              End Delimits the end of a block. +
              +

              +

              EndIf End processing of ``IF''. +
              +

              +

              EndMset End of a ``Mset'' section. +
              +

              +

              EndRepeat [count] End a repeated section. +
              +

              +

              Eof Immediately stop/end input file. +
              +

              +

              Fermata <beat> <count> <adjustment> Expand <beat> for <count> by <adjustment percentage. +
              +

              +

              TRACK ForceOut Force voicing and raw data output for track. +
              +

              +

              Goto <name> jump processing to <name>. +
              +

              +

              Groove <name> Enable a previously defined groove. +
              +

              +

              GrooveClear Delete all current Grooves from memory. +
              +

              +

              TRACK Harmony [Option] ... Set harmony for Bass, Walk, Arpeggio, Scale, Solo and Melody tracks. +
              +

              +

              TRACK HarmonyOnly <Option> ... Force track to sound only harmony notes from current pattern. +
              +

              +

              TRACK HarmonyVolume <Percentage> ... Set the volume used by harmony notes. +
              +

              +

              If <test> <cmds> Test condition and process <cmds>. +
              +

              +

              IfEnd End processing of ``IF''. +
              +

              +

              Inc <name> [value] Increment the value of variable <name> by 1 or <value>. +
              +

              +

              Include <file> Include a file. +
              +

              +

              TRACK Invert <value> ... set the inversion factor for chords in track. +
              +

              +

              KeySig <sig> Set the key signature. +
              +

              +

              Label <name> Set <name> as a label for ``GOTO''. +
              +

              +

              TRACK Limit <value> Limit number of notes used in a chord to <value>. +
              +

              +

              Lyric <options> Set various lyrics options. +
              +

              +

              MIDI <values> Send raw MIDI commands to MIDI meta-track. +
              +

              +

              TRACK MIDIClear <Beat Controller Data> Set command (or series) of MIDI commands to send when track is completed. +
              +

              +

              MIDIFile <option> Set various MIDI file generation options. +
              +

              +

              TRACK MIDIGlis <1..127> Set MIDI portamento (glissando) value for track. +
              +

              +

              TRACK MIDIInc <File> <Options> Include an existing MIDI file into a track. +
              +

              +

              MIDIMark [offset] Label Inserts Label into the MIDI track. +
              +

              +

              TRACK MIDIPan <0..127> Set MIDI pan/balance for track. +
              +

              +

              TRACK MIDISeq <Beat Controller Data> options> ... Set MIDI controller data for a track. +
              +

              +

              MIDISplit <channel list> Force split output for track. +
              +

              +

              TRACK MIDITName <string> Assigns an alternate name to a MIDI track. +
              +

              +

              TRACK MIDIVoice <Beat Controller Data> Set ``one-time'' MIDI controller command for track. +
              +

              +

              TRACK MIDIVolume <1..128> Set MIDI volume for track. +
              +

              +

              TRACK Mallet <Rate=nn | Decay=nns> Set mallet repeat for track. +
              +

              +

              MmaEnd <file> Set filename to process after main file completed. +
              +

              +

              MmaStart <file> Set file to include before processing main file. +
              +

              +

              Mset <name> <lines> Set <variable> to series of lines. +
              +

              +

              MsetEnd End of a ``Mset'' section. +
              +

              +

              NewSet <name> <stuff> Set the variable <name> to <stuff>. +
              +

              +

              TRACK NoteSpan <start> <end> set MIDI range of notes for track. +
              +

              +

              TRACK Octave <0..10> ... Set the octave for track. +
              +

              +

              TRACK Off Disable note generation for specified track. +
              +

              +

              TRACK On Enable note generation for specified track. +
              +

              +

              Patch <options> Patch/Voice management. +
              +

              +

              Print <stuff> Print <stuff> to output during compile. Useful for debugging. +
              +

              +

              PrintActive Print list of active tracks to output. +
              +

              +

              PrintChord <name(s)> Print the chord and scale for specific chord types. +
              +

              +

              TRACK RSkip <Value> ... Skip/silence random percentage of notes. +
              +

              +

              TRACK RTime <Value] ... +
              +

              +

              TRACK RVolume <adj> ... Set volume randomization for track. +
              +

              +

              TRACK Range <value> Set number of octaves used in Scale and Arpeggio tracks. +
              +

              +

              Repeat Start a repeated section. +
              +

              +

              RepeatEnd [count] End a repeated section. +
              +

              +

              RepeatEnding Start a repeat-ending. +
              +

              +

              TRACK Riff <pattern> Define a special pattern to use in track for next bar. +
              +

              +

              RndSeed <Value> ... Seed random number generator. +
              +

              +

              RndSet <variable> <list of values> Randomly set variable. +
              +

              +

              TRACK ScaleType <Chromatic | Auto> ... Set type of scale. Only for Scale tracks. +
              +

              +

              Seq Set the sequence point (bar pattern number). +
              +

              +

              [TRACK] SeqClear Clears sequence for track (or all tracks). +
              +

              +

              [TRACK] SeqRnd <On/Off/Tracks> Enable random sequence selection for track (or all tracks). +
              +

              +

              [TRACK] SeqRndWeight <list of values> Sets the randomization weight for track or global. +
              +

              +

              SeqSize <value> Set the number of bars in a sequence. +
              +

              +

              TRACK Sequence <pattern> ... Set pattern(s) to use for track. +
              +

              +

              Set <name> <stuff> Set the variable <name> to <stuff>. +
              +

              +

              SetAutoLibPath <path> Set the Auto-Include file path. +
              +

              +

              SetIncPath <path> Set the path for included files. +
              +

              +

              SetLibPath <path> Set the path to the style file library. +
              +

              +

              SetMIDIplayer <program> Set the MIDI file player program. +
              +

              +

              SetOutPath <path> Set the output filename. +
              +

              +

              ShowVars Display user defined variables. +
              +

              +

              StackValue <stuff> Push <stuff> onto a temporary stack ($_StackValue pops). +
              +

              +

              TRACK Strum <value> ... Set the strumming factor for Chord tracks. +
              +

              +

              [TRACK] Swell <[start] end count> Change and restore volume over bars. +
              +

              +

              SwingMode <on/off> Set swing mode timing. +
              +

              +

              Synchronize <START | END> Insert a start/end synchronization mark. +
              +

              +

              Tempo <rate> Set the rate in beats per minute. +
              +

              +

              Time <count> Set number of beats in a bar. +
              +

              +

              TimeSig <nn dd> Set the MIDI time signature (not used by MMA). +
              +

              +

              TRACK Tone <Note> ... Set the drum-tone to use in a sequence. +
              +

              +

              Transpose <value> Transpose all tracks to a different key. +
              +

              +

              UnSet <name> Remove the variable <name>. +
              +

              +

              [TRACK] Unify <On | Off> ] ... Unify overlapping notes. +
              +

              +

              Use <file> Include/import an existing .mma file. +
              +

              +

              VExpand <on/off> Set variable expansion. +
              +

              +

              TRACK Voice <instrument> ... Set MIDI voice for track. +
              +

              +

              VoiceTr <old=new> ...- translates MIDI instrument <old> to <new>. +
              +

              +

              VoiceVolTr <voice>=<adj> ...- adjusts volume for specified voice. +
              +

              +

              TRACK Voicing <options. Set the voicing for a chord track. +
              +

              +

              [TRACK] Volume <value> ... Set the volume for a track or all tracks. +
              +

              +

              $(...) Delimits math expressions +
              +

              +

              $Name A user defined macro. +
              +

              +

              $_Name A predefined variable. +
              +

              +

              +
              + +

              + +

              + +
              +bob +2008-09-28 +
              + + diff --git a/mma/docs/html/ref/node32.html b/mma/docs/html/ref/node32.html new file mode 100644 index 0000000..560a6a9 --- /dev/null +++ b/mma/docs/html/ref/node32.html @@ -0,0 +1,74 @@ + + + + + +About this document ... + + + + + + + + + + + + + + + + + + + +

              +About this document ... +

              + LOST LOGO + +

              +Reference Manual

              +This document was generated using the +LaTeX2HTML translator Version 2002-2-1 (1.71) +

              +Copyright © 1993, 1994, 1995, 1996, +Nikos Drakos, +Computer Based Learning Unit, University of Leeds. +
              +Copyright © 1997, 1998, 1999, +Ross Moore, +Mathematics Department, Macquarie University, Sydney. +

              +The command line arguments were:
              + latex2html -split +1 -dir html -no_math -no_footnode -local_icons -up_url ../mma.html -up_title 'Main MMA Reference' mma.tex +

              +The translation was initiated by bob on 2008-09-28 +


              +
              +bob +2008-09-28 +
              + + diff --git a/mma/docs/html/ref/node4.html b/mma/docs/html/ref/node4.html index c4b2cc2..d468e43 100644 --- a/mma/docs/html/ref/node4.html +++ b/mma/docs/html/ref/node4.html @@ -1,4 +1,4 @@ - + - + next - up - previous
              - Next: Next: Sequences - Up: Up: Reference Manual - Previous: Previous: Tracks and Channels
              -
              +
              Subsections - @@ -89,7 +90,7 @@ Patterns MMA builds its output based on PATTERNs and SEQUENCEs supplied by you. These can be defined in the same file as the rest of the song data, or can be included (see -here) from a library file. +here) from a library file.

              A pattern is a definition for a voice or track which describes what @@ -151,11 +152,11 @@ The following concepts are used when defining a pattern: ``and ahh'' of the first beat is ``1.75'', etc. Using a beat offset greater than the number of beats in a bar or less than ``0'' is not permitted. Please note that offsets in the range ``0'' to ``.999'' - will actually be played in the previous bar (this can be + will actually be played in the previous bar (this can be useful in Jazz charts, and it will generate a warning!).4.1 See TIME - (here). + HREF="#foot1588">4.1 See TIME + (here).

              The offset can be further modified by appending a note length (see @@ -171,7 +172,7 @@ You can subtract note lengths as well, but this is rarely done. And, to make your style files completely unreadable, you can even use note length combinations. So, yes, the following pattern is fine:4.2 + HREF="#foot1589">4.2

              @@ -188,7 +189,7 @@ You can subtract note lengths as well, but this is rarely done. And,
              Duration
              The length of a note is somewhat standard musical notation. Since it is impractical to draw in graphical notes or to - use fractions (like 1/4) + use fractions (like 1/4) MMA , uses a shorthand notation detailed in the following table: @@ -199,8 +200,8 @@ You can subtract note lengths as well, but this is rarely done. And,
              - - + + @@ -257,7 +258,7 @@ You can subtract note lengths as well, but this is rarely done. And,

              The ``81'' and ``82'' notations represent the values of a pair of eighth notes in a swing pair. These values vary depending on the - setting of SWINGMODE SKEW, see here. + setting of SWINGMODE SKEW, see here.

              The note length ``0'' is a special value often used in drum @@ -278,33 +279,33 @@ Note lengths can be combined using ``+''. For example, to make a

              Note lengths can also be combined using a ``-''. For example, to make a dotted half you could use ``1-4''. Subtraction might appear - silly at first, but is useful in generating a note just a bit + silly at first, but is useful in generating a note just a bit shorter than its full beat. For example, ``1-0'' will generate a note 1 MIDI tick shorter than a whole note. This can be used in generating breaks in sustained tones.4.3 + HREF="#foot1591">4.3

              It is permissible to combine notes with ``dots'', ``+''s and ``-''s. The notation ``2.+4'' would be the same as a whole note.

              The actual duration given to a note will be adjusted by the - ARTICULATE value here). + ARTICULATE value here).

              Volume
              The MIDI velocity4.4 to use for the specified note. + HREF="#foot1370">4.4 to use for the specified note. For a detailed explanation of how MMA calculates the volume of a - note, see read this. + note, see read this.

              MIDI velocities are limited to the range 0 to 127. However, MMA does not check the volumes specified in a pattern for validity.4.5 + HREF="#foot1375">4.5

              In most cases velocities in the range 50 to 100 are useful. @@ -312,11 +313,11 @@ In most cases velocities in the range 50 to 100 are useful.

              Offset
              The offset into the current chord. If you have, for - example, a C minor chord (C, E$\flat$, and G) has 3 offsets: 0, 1 - and 2. Note that the offsets refer to the chord not the + ALT="$\flat$">, and G) has 3 offsets: 0, 1 + and 2. Note that the offsets refer to the chord not the scale. For example, a musician might refer to the ``fifth''--this means the fifth note of a scale ...in a major chord this is the third note, which has an offset of 2 in @@ -329,8 +330,8 @@ In most cases velocities in the range 50 to 100 are useful.

              Patterns can be defined for BASS, WALK, CHORD, ARPEGGIO and DRUM tracks. All patterns are -shared by the tracks of the same type--Chord-Sus and -Chord-Piano share the patterns for Chord. As a +shared by the tracks of the same type--Chord-Sus and +Chord-Piano share the patterns for Chord. As a convenience, MMA will permit you to define a pattern for a sub-track, but remember that it will be shared by all similar tracks. @@ -359,7 +360,7 @@ and

              Will generate identical outcomes.4.6 + HREF="#foot1388">4.6

              @@ -402,14 +403,14 @@ even use both together if you're in a mood to obfuscate. The note offset can be further modified with a single accidental "#", "&" or "b". This modifier will raise or lower the note by a semitone.4.7 In the boogie-woogie + HREF="#foot1392">4.7 In the boogie-woogie library file a "6#" is used to generate a dominant 7th.

              NotationDescription
              NotationDescription
              1 Whole note
              - Bass Definition + Bass Definition
              @@ -426,7 +427,7 @@ library file a "6#" is used to generate a dominant 7th.


              -
              Sheet Music Equivalent +
              Sheet Music Equivalent


              @@ -444,7 +445,7 @@ library file a "6#" is used to generate a dominant 7th.

              This example defines 4 bass notes (probably staccato eight notes) at beats 1, 2, 3 and 4 in a -4/4 time bar. The first note is the root of the chord, the +4/4 time bar. The first note is the root of the chord, the second is the fifth; the third note is the third; the last note is the root up an octave. The volumes of the notes are set to a MIDI velocity of 90 for beats 1 and 3 and 80 for beats 2 and 4. @@ -453,14 +454,14 @@ of 90 for beats 1 and 3 and 80 for beats 2 and 4. MMA refers to note tables to determine the ``scale'' to use in a bass pattern. Each recognized chord type has an associated scale. For -example, the chord ``Cm'' consists of the notes ``c'', ``e$\flat$'' -and ``g''; the scale for this chord is ``c, d, e$\flat$'' +and ``g''; the scale for this chord is ``c, d, e$\flat$, f, g, a, b''. + ALT="$\flat$">, f, g, a, b''.

              Due to the ease in which specific notes of a scale can be specified, @@ -482,7 +483,7 @@ A Chord pattern is defined with:
              - Position Duration Volume1 Volume2 .. ; ... + Position Duration Volume1 Volume2 ...; ...
              @@ -497,7 +498,7 @@ remaining notes.
              - Chord Definition + Chord Definition
              @@ -516,7 +517,7 @@ remaining notes.


              -
              Sheet Music Equivalent +
              Sheet Music Equivalent


              @@ -531,7 +532,7 @@ remaining notes.

              This example defines a -4/4 pattern in a quarter, quarter, quarter, triplet rhythm. +4/4 pattern in a quarter, quarter, quarter, triplet rhythm. The quarter notes sound on beats 1, 2 and 3; the triplet is played on beat 4. The example assumes that you have C major for beats 1 and 2, and G major for 3 and 4. @@ -571,21 +572,21 @@ An Arpeggio pattern is defined with: The arpeggio tracks play notes from a chord one at a time. This is quite different from chords where the notes are played all at once--refer to the STRUM directive -(here). +(here).

              Each group consists of an beat offset, the note duration, and the note volume. You have no choice as to which notes of a chord are played (however, they are played in alternating ascending/descending order.4.8 Volumes are + HREF="#foot1594">4.8 Volumes are selected for the specific beat, not for the actual note.

              - Arpeggio Definition + Arpeggio Definition
              @@ -602,7 +603,7 @@ selected for the specific beat, not for the actual note.


              -
              Sheet Music Equivalent
              +
              Sheet Music Equivalent

              Lost Image @@ -614,7 +615,7 @@ selected for the specific beat, not for the actual note.

              This example plays quarter note -on beats 1, 2, 3 and 4 of a bar in 4/4 time. +on beats 1, 2, 3 and 4 of a bar in 4/4 time.

              @@ -637,7 +638,7 @@ A Walking Bass pattern is defined with:

              Walking bass tracks play up and down the first part of a scale, paying attention to the ``color''4.9 of the + HREF="#foot1596">4.9 of the chord. Walking bass lines are very common in jazz and swing music. They appear quite often as an ``emphasis'' bar in marches. @@ -651,7 +652,7 @@ current chord (you cannot change this).
              - Walking Bass Definition + Walking Bass Definition
              @@ -675,7 +676,7 @@ current chord (you cannot change this).

              This example plays a bass note -on beats 1, 2 and 3 of a bar in 3/4 time. +on beats 1, 2 and 3 of a bar in 3/4 time.

              @@ -703,7 +704,7 @@ duration, and volume.
              - Scale Definition + Scale Definition
              @@ -737,8 +738,8 @@ are set to a MIDI velocity of 90.

              Scale patterns are quite useful in endings. More options for scales detailed in the SCALEDIRECTION -(here) and SCALETYPE -(here) sections. +(here) and SCALETYPE +(here) sections.

              @@ -790,7 +791,7 @@ A Drum pattern is defined with:
              - Drum Definition + Drum Definition
              @@ -813,7 +814,7 @@ A Drum pattern is defined with:

              This example plays a drum sound on -beats 1, 2, 3 and 4 of a bar in 4/4 time. The MIDI velocity +beats 1, 2, 3 and 4 of a bar in 4/4 time. The MIDI velocity (volume) of the drum is 100 on beats 1 and 3; 80 on beats 2 and 4.

              @@ -885,13 +886,13 @@ To repeat the same ``tone'' in a sequence list, use a single ``/''.

              The ``tone'' can be specified with a MIDI note value or with a symbolic name. For example, a snare drum could be specified as ``38'' -or ``SnareDrum1''. The Drumnames +or ``SnareDrum1''. The Drumnames appendix lists all the defined symbolic names.

              It is possible to substitute tone values. See -TONETR. +TONETR.

              @@ -994,7 +995,7 @@ The ``*'' is absolutely required.
              - Multiply Define + Multiply Define
              @@ -1026,7 +1027,7 @@ Drum Define S64 S1 * 64

              In this example a Drum pattern is defined which plays a drum tone on beat 1 (assuming -4/4 time). Then a new pattern, ``S13'', is created. This is +4/4 time). Then a new pattern, ``S13'', is created. This is the old ``S1'' multiplied by 2. This new pattern will play a tone on beats 1 and 3. @@ -1054,7 +1055,7 @@ swing pattern which might be useful on a snare drum.
              - Swing Beat Drum Definition + Swing Beat Drum Definition
              @@ -1072,7 +1073,7 @@ End


              -
              Sheet Music Equivalent, Normal Notation +
              Sheet Music Equivalent, Normal Notation


              @@ -1081,7 +1082,7 @@ End


              -
              Sheet Music Equivalent, Actual Rhythm +
              Sheet Music Equivalent, Actual Rhythm

              Lost Image @@ -1099,7 +1100,7 @@ and process it though

              Even cooler4.10 is combining a multiplier, and + HREF="#foot1563">4.10 is combining a multiplier, and existing pattern and a new pattern all in one statement. The following is quite legal (and useful): @@ -1135,7 +1136,7 @@ option with the above definition.

              -An existing pattern can be modified by shifting it a beat, or +An existing pattern can be modified by shifting it a beat, or portion of a beat. This is done in a MMA definition with the SHIFT directive. This @@ -1146,7 +1147,7 @@ play on beat 1, and then a second pattern played on beat 3.
              - Shift Pattern Definition + Shift Pattern Definition
              @@ -1222,33 +1223,33 @@ which would create the same pattern as the longer:



              Footnotes

              -
              ... warning!).4.1
              +
              ... warning!).4.1
              The exception is that RTIME may move the chord back into the bar.
              -
              ... fine:4.2
              +
              ... fine:4.2
              The start offset is the value of the first of a pair - of swing eights plus a quarter before the second beat. + of swing eights plus a quarter before the second beat.
              -
              ... tones.4.3
              +
              ... tones.4.3
              See the supplied GROOVE ``Bluegrass'' for an example.
              -
              ... velocity4.4
              +
              ... velocity4.4
              MIDI ``note on'' events are declared with a ``velocity'' value. Think of this as the ``striking pressure'' on a piano.
              -
              ... validity.4.5
              +
              ... validity.4.5
              This is a feature that you probably don't want to use, but if you want to ensure that a note is always sounded use a very large value (e.g., 1000) for the volume. That way, future @@ -1256,28 +1257,28 @@ which would create the same pattern as the longer: be clipped to the maximum permitted MIDI velocity.
              -
              ... outcomes.4.6
              +
              ... outcomes.4.6
              What really happens is that this definition is stored in a slot named ``DRUM''.
              -
              ... +
              ... semitone.4.7
              + HREF="node4.html#tex2html25">4.7
              Be careful using this feature ...certain scales/chords may return non-musical results.
              -
              ... +
              ... order.4.8
              + HREF="node4.html#tex2html26">4.8
              See the DIRECTION command - (here). + (here).
              -
              ... ``color''4.9
              +
              ... ``color''4.9
              The color of a chord are items like ``minor'', ``major'', etc. The current walking bass algorithm generates acceptable (uninspired) lines. If you want something @@ -1285,34 +1286,35 @@ order. -
              ... cooler4.10
              +
              ... cooler4.10
              In this case the word ``cool'' substitutes for the more correct ``useful''.
              -

              + +
              bob -2007-03-07 +2008-09-28
              diff --git a/mma/docs/html/ref/node5.html b/mma/docs/html/ref/node5.html index 42b88c4..a9e6882 100644 --- a/mma/docs/html/ref/node5.html +++ b/mma/docs/html/ref/node5.html @@ -1,4 +1,4 @@ - + - + next - up - previous
              - Next: Next: Grooves - Up: Up: Reference Manual - Previous: Previous: Patterns
              -
              +
              Subsections - @@ -87,7 +88,7 @@ each track in your song:
              - Track Sequence Pattern1 Pattern2 ... + Track Sequence Pattern1 Pattern2 ...
              @@ -106,7 +107,7 @@ definition in a set of curly brackets ``{ }''.
              - Simple Sequence + Simple Sequence
              @@ -149,12 +150,12 @@ Arpeggio Sequence { 1 1 100 * 8 } { 1 1 80 * 4 } pattern. The Drum, Chord and Bass patterns repeat on every bar; the Drum-1 sequence repeats after 2 bars. Note how the Arpeggio pattern is defined at run-time.5.1 + HREF="#foot2222">5.1

              If there are fewer patterns than SEQSIZE, the sequence will be filled out to correct size. If the number of patterns used is greater than SEQSIZE (see -directives) a warning +directives) a warning message will be printed and the pattern list will be truncated.

              @@ -209,14 +210,14 @@ Walk Sequence z / / Walk4-4

              If you already have a sequence defined5.2 you can repeat or copy the existing pattern by + HREF="#foot2237">5.2 you can repeat or copy the existing pattern by using a single ``*'' as the pattern name. This is useful when you are -modifying an exisiting sequence. +modifying an existing sequence.

              For example, assume that we have created a four bar GROOVE called ``Neato''. Now, we want to change the CHORD pattern to -use for an introduction ... but, we really only want to change the +use for an introduction ...but, we really only want to change the fourth bar in the pattern:

              @@ -235,7 +236,7 @@ Defgroove NeatoIntro

              When a sequence is created a series of pointers to the existing patterns are created. If you change the definition of a particular -pattern later in your file the new definition will have no +pattern later in your file the new definition will have no effect on your existing sequences.

              @@ -285,7 +286,7 @@ Alternately, the command:

              -deletes all drum sequences. This includes the track ``Drum'', +deletes all drum sequences. This includes the track ``Drum'', ``Drum1'', etc.

              @@ -302,7 +303,7 @@ If you use a sub-track:

              only the sequence for that track is cleared.5.3 + HREF="#foot2321">5.3

              In addition to clearing the sequence pattern, the following other settings are restored to a default condition: @@ -362,7 +363,7 @@ CHORD using this command. The command

              -resets all CHORD tracks, whereas the command: +resets all CHORD tracks, whereas the command:

              @@ -374,13 +375,16 @@ resets all CHORD tracks, whereas the command:

              -resets the CHORD-FOO track. If you need to clear only +resets the CHORD-FOO track. If you need to clear only the CHORD track use the ``-'' option.

              -

              -SeqRnd +

              + + +
              +SeqRnd

              @@ -739,13 +743,16 @@ tracks) randomization.

              -

              -SeqRndWeight +

              + + +
              +SeqRndWeight

              When SEQRND is enabled each sequence for the track (or globally) has an equal chance -of being selected. There are times when you may want to change this behaviour. For example, +of being selected. There are times when you may want to change this behavior. For example, you might have a sequence like this:

              @@ -807,7 +814,7 @@ For example: sets it to 4 bars. The SeqSize applies to all tracks.

              -This command resets the sequence counter to 1. +This command resets the sequence counter to 1.

              If some sequences have already been defined, they will be truncated or @@ -818,8 +825,8 @@ until it is long enough.



              Footnotes

              -
              ... run-time.5.1
              +
              ... run-time.5.1
              If you run MMA with the ``-s'' option you'll see pattern names in the format ``_1''. The leading @@ -827,15 +834,15 @@ until it is long enough. sequence.
              -
              ... defined5.2
              +
              ... defined5.2
              In reality there is always a sequence defined for every track, but it might be a series of ``rest'' bars.
              -
              ... cleared.5.3
              +
              ... cleared.5.3
              It is probably easier to use the command: @@ -845,32 +852,33 @@ until it is long enough.
              if that is - what you want to do. In this case only sequence pattern is + what you want to do. In this case only sequence pattern is cleared.
              -

              + +
              bob -2007-03-07 +2008-09-28
              diff --git a/mma/docs/html/ref/node6.html b/mma/docs/html/ref/node6.html index a59f563..9aa2d02 100644 --- a/mma/docs/html/ref/node6.html +++ b/mma/docs/html/ref/node6.html @@ -1,4 +1,4 @@ - + - + next - up - previous
              - Next: Next: Riffs - Up: Up: Reference Manual - Previous: Previous: Sequences
              -
              +
              Subsections -
              @@ -118,15 +123,15 @@ command: A groove name can include any character, including digits and punctuation. However, it cannot include a space character (used as a delimiter) or a '/'6.1, nor can consist solely of digits6.2 + HREF="#foot2645">6.1, nor can consist solely of digits6.2

              In normal operation the documentation strings are ignored. However, when MMA is run with the -Dx command line option these strings are -printed to the terminal screen in LATEX format. The standard library -document is generated from this data. The comments must be -suitable for LATEX: this means that special symbols like ``#'', +printed to the terminal screen in LATEX format. The standard library +document is generated from this data. The comments must be +suitable for LATEX: this means that special symbols like ``#'', ``&'', etc. must be ``quoted'' with a preceding `` \''.

              @@ -243,7 +248,7 @@ A few cautions:

                -
              • Pattern definitions are not saved in grooves. Redefining +
              • Pattern definitions are not saved in grooves. Redefining a pattern results in a new pattern definition. Sequences use the pattern definition in effect when the sequence is declared. @@ -296,7 +301,7 @@ except by going though it.

                You might find this handy if you have a piece with an alternating time -signature. For example, you might have a 3/4 4/4 +signature. For example, you might have a 3/4 4/4 song. Rather than creating a 2 bar groove, you could do something like: @@ -327,12 +332,12 @@ When you use the ``list'' feature of GROOVEs you should be aware of what happens with the bar sequence number. Normally the sequence number is incremented after each bar is processed; and, when a new groove is selected the sequence number is reset (see SEQ, -discussed here). When +discussed here). When you use a list which changes the GROOVE after each bar the -sequence number is reset after each bar ...with one exeption: if +sequence number is reset after each bar ...with one exception: if the same GROOVE is being used for two or more bars the sequence will not be reset.6.3 + HREF="#foot2768">6.3

                Another way to select GROOVEs is to use a list of grooves with a leading value. This lets you select the GROOVE to use based on the value of a variable ...handy if you want different sounds for repeated sections. Again, an example: @@ -344,7 +349,7 @@ Another way to select GROOVEs is to use a list of grooves with a
                Repeat
                  Groove $loop BossaNovaSus BossaNova1Sus BossaNovaFill -
                  print This is loop $Loop ... Groove is $_Groove +
                  print This is loop $Loop ...Groove is $_Groove
                  1 A / Am
                  Inc Loop // Bump the counter value
                @@ -355,7 +360,7 @@ RepeatEnd 4

              -If you use this option, make sure the value of the counter is greater than 0. Also, note that the values larger than the list count are ``looped'' to be valid. The use of ``/''s for repeated names is also permitted. For an example have a look at the file grooves.mma, included in this distribution. You could get the same results with various ``if'' statements, but this is easier. +If you use this option, make sure the value of the counter is greater than 0. Also, note that the values larger than the list count are ``looped'' to be valid. The use of ``/''s for repeated names is also permitted. For an example have a look at the file grooves.mma, included in this distribution. You could get the same results with various ``if'' statements, but this is easier.

              @@ -401,9 +406,9 @@ appropriate function is called and file parsing continues. If it is not a simple command MMA tests to see if it is a track specific command. But to do that, it first has to test the first word to see if -it is a valid track name like Bass or Chord-Major. And, +it is a valid track name like Bass or Chord-Major. And, if it is a valid track name and that track doesn't exist, the track is -created...this is done before the rest of the command is +created...this is done before the rest of the command is processed. So, if you have a command like:

              @@ -433,20 +438,20 @@ you'll have a number of things happening:

                -
              1. The track Bass-Foo will be created. This is not an issue +
              2. The track Bass-Foo will be created. This is not an issue to be concerned over since no data will be created for this new track unless you set a SEQUENCE for it.

              3. As part of the creation, all the existing GROOVEs will - have the Bass-Foo track (with its default/empty settings) + have the Bass-Foo track (with its default/empty settings) added to them.

              4. And the current setting you think you're modifying with the - Bass-Foe settings will be created with the Bass-Foo + Bass-Foe settings will be created with the Bass-Foo settings (which are nothing).

                @@ -469,6 +474,260 @@ you will get a warning.

                +Groove Aliases +

                + +

                +In an attempt to make the entire groove naming issue simpler, an +additional command has been added. More complication to make life +simpler. + +

                +You can create an alias for any defined GROOVE name with: + +

                + + + +
                + DefAlias NewAlias SomeGroove + +
                + +

                +Now you can refer to the groove ``SomeGroove'' with the name +``NewAlias''. + +

                +A few rules: + +

                + +

                  +
                • the alias name must not be the name of a currently defined + groove, +
                • +
                • when defining a new groove you cannot use the name of an alias. +
                • +
                + +

                +Groove aliases are a tool designed to make it possible to have a +standard set of groove names in +MMA usable at the same time as the +standard library. + +

                +There is a major difference between a groove alias and the simple act +of assigning two names to the same groove. Consider this snippet: + +

                + + + +
                + ...define some things ... +
                +Defgroove Good +
                +Defgroove Good2
                + +
                + +

                +You now have both ``good'' and ``good2'' assigned to the same set of +sequences, etc. Now, lets change something: + +

                + + + +
                + Groove Good +
                +Chord Voice Accordion +
                ... +
                + +
                + +

                +Now, the groove ``good'' has an accordion voicing; ``good2'' still has +whatever the old ``good'' had. Compare this with: + +

                + + + +
                + ...define some things ... +
                +DefGroove Good +
                +DefAlias Good2 Good
                + +
                + +

                +Now, make the same change: + +

                + + + +
                + Groove Good +
                +Chord Voice Accordion
                + +
                + +

                +By using an alias ``good2'' now points to the changed ``good''. + +

                + +

                +AllGrooves +

                + +

                +There are times when you wish to change a setting in a set of library +files. For example, you like the Rhumba library sounds, but, +for a particular song you'd like a punchier bass sound. Now, it is +fairly easy to create a new library file for this; or you can set the +new bass settings each time you select a different GROOVE. + +

                +Much easier is to apply your changes to all the GROOVEs in the +file. For example: + +

                + + + +
                + Use Rhumba +
                +Begin AllGrooves +
                +Bass Articulate 50 +
                +Bass Volume +20 +
                +Walk Articulate 50 +
                +Walk Volume +10 +
                +End +
                ...
                + +
                + +

                +The ALLGROOVES command operates by applying its arguments to each +GROOVE currently defined. This includes the environment you are +currently in, even if this is not a defined GROOVE. + +

                +You can use the command with or without a track modifier: + +

                + + + +
                + AllGrooves Volume p + +
                + +

                +or + +

                + + + +
                + AllGrooves Chord Octave 5 + +
                + +

                +Everything after the directive is interpreted as a legitimate +MMA command. A warning message will be displayed if the command had no +effect. The warning ``No tracks affected with ...'' will be +displayed if nothing was done. This could be due to a misspelt command +or track name, or the fact that the specified track does not exist. + +

                +If you want to ``undo'' the effect of the ALLGROOVES just import +the library file again with: + +

                + + + +
                + Use stdlib/rhumba +
                +Groove Rhumba
                + +
                + +

                +or remove all the current GROOVEs from memory with: + +

                + + + +
                + GrooveClear +
                +Groove Rhumba
                + +
                + +

                +In both cases you'll end up with the original GROOVE settings. + +

                +A few notes: + +

                + +

                  +
                • This command only effects GROOVEs which have +been loaded into memory either by loading a library file or otherwise +creating a GROOVE. + +

                  +

                • +
                • Be careful what commands you use since they are applied rather + blindly. For example, the command: + +

                  + + + +
                  + AllTracks BeatAdjust 2 + +
                  + +

                  +will insert 2 additional beats for each GROOVE you have. So, if +you have 10 GROOVEs you would insert 20 beats. Not what you +intended. TEMPO and other commands will cause similar problems. + +

                  +

                • +
                + +

                + +

                Deleting Grooves

                @@ -509,18 +768,21 @@ Endif In this case you could set the variable ``ChordVoice'' before loading any of the GROOVEs in the file. All works! Now, assume that you have a repeated section and want to change the voice. Simply changing -the variable does not work. The library file isn't re-read -since the exisiting GROOVE data is already in memory. Using +the variable does not work. The library file isn't re-read +since the existing GROOVE data is already in memory. Using GROOVECLEAR erases the existing data and forces a re-reading of the library file.

                Please note that low-level setting like MIDI track assignments are -not changed by this command. +not changed by this command. + +

                +Groove aliases are also deleted with this command.

                -

                +

                Library Issues

                @@ -541,12 +803,12 @@ something like: at the appropriate position in your input file.

                -One minor problem which may arise is that more than one library +One minor problem which may arise is that more than one library file has defined the same groove name. This might happen if you have a third-party library file. For the proposes of this example, lets assume that the standard library file ``rhumba.mma'' and a second file ``xyz-rhumba.mma'' both define the groove ``Rhumba2''. The -auto-load routines +auto-load routines which search the library database will load the first ``Rhumba2'' it finds, and the search order cannot be determined. To overcome this possible problem, do a explicit loading of the correct file. In this @@ -579,51 +841,53 @@ just before the groove call. The USE will read the specified file and overwrite the old definition of ``Rhumba2'' with its own.

                -This issue in covered in more detail on page [*] -of this manual. +This issue in covered in more detail here in this manual. + +



                Footnotes

                -
                ... '/'6.1
                +
                ... '/'6.1
                The '/' is reserved for future enhancements.
                -
                ... digits6.2
                -
                12345 and 2 are invalid; 11foo11 and a2-2 are permitted. +
                ... digits6.2
                +
                12345 and 2 are invalid; 11foo11 and a2-2 are permitted.
                -
                ... reset.6.3
                +
                ... reset.6.3
                Actually, MMA checks to see the next GROOVE in the list is the same as the current one, and if it is then no change is done.
                -

                + +
                bob -2007-03-07 +2008-09-28
                diff --git a/mma/docs/html/ref/node7.html b/mma/docs/html/ref/node7.html index db98445..87642e7 100644 --- a/mma/docs/html/ref/node7.html +++ b/mma/docs/html/ref/node7.html @@ -1,4 +1,4 @@ - + - + next - up - previous
                - Next: Next: Musical Data Format - Up: Up: Reference Manual - Previous: Previous: Grooves
                -
                +

                @@ -165,9 +166,9 @@ Drum-Clap Riff Emph8

              -Here the Emph8 pattern is defined as a series of eighth notes. +Here the Emph8 pattern is defined as a series of eighth notes. This is applied for the third and fifth bars. If you compile and play this example -you will hear a sporadic hand-clap on bar 3. The Drum-Clap +you will hear a sporadic hand-clap on bar 3. The Drum-Clap track was previously defined in the Blues GROOVE as random claps on beats 2 and 4--our RIFF changes this to a louder volume with multiple hits. @@ -260,7 +261,7 @@ SOLO or MELODY track. Please see 7.1 a number of patterns to be processed sequentially. Each + HREF="#foot3206">7.1 a number of patterns to be processed sequentially. Each successive RIFF command adds a pattern to the stack; these patterns are then ``pulled'' from the stack as successive chord lines are processed. @@ -293,43 +294,44 @@ Chord Riff 1 2 100; 3 8 90;

              -In this example the first Chord Riff will be used in bar 4; the +In this example the first Chord Riff will be used in bar 4; the second in bar 5. For an example of this see the sample file -egs/riffs.mma. +egs/riffs.mma.

              I often use this feature when creating a SOLO line.


              Footnotes

              -
              ... +
              ... ``stack''7.1
              + HREF="node7.html#tex2html35">7.1
              Actually a queue or FIFO (First In, First Out) buffer.
              -

              + +
              bob -2007-03-07 +2008-09-28
              diff --git a/mma/docs/html/ref/node8.html b/mma/docs/html/ref/node8.html index b55d3ea..4ed5427 100644 --- a/mma/docs/html/ref/node8.html +++ b/mma/docs/html/ref/node8.html @@ -1,4 +1,4 @@ - + - + next - up - previous
              - Next: Next: Lyrics - Up: Up: Reference Manual - Previous: Previous: Riffs
              -
              +
              Subsections - @@ -203,7 +204,7 @@ Bar Repeat Quite often music has several sequential identical bars. Instead of typing these bars over and over again, MMA has an optional -multiplier which can be placed at the end of a line of music +multiplier which can be placed at the end of a line of music data. The multiplier or factor can is specified as ``* NN'' This will cause the current bar to repeated the specified number of times. For example: @@ -243,7 +244,7 @@ For example:

              specifies four different chords in a bar. It should be obvious by now -that in a piece in 4/4 you'll end up with a ``Cm'' chord on +that in a piece in 4/4 you'll end up with a ``Cm'' chord on beat 1, ``Dm'' on 2, etc.

              @@ -312,7 +313,7 @@ smart, but it doesn't read minds. MMA recognizes a wide variety of chords in standard notation. In addition, you can specify slash chords and shift the octave up or down. Refer to the complete table in the appendix for -details. +details.

              @@ -373,7 +374,7 @@ Assuming the ``C'' is the chord and ``AB'' are the track specifiers:

              CzAB -
              mutes the APREGGIO and BASS tracks, +
              mutes the ARPEGGIO and BASS tracks,

              z @@ -445,38 +446,39 @@ Case Sensitivity

              In direct conflict with the rest of the rules for input files, all -chord names are case sensitive. This means that you can - not use notations like ``cm''--use ``Cm'' instead. +chord names are case sensitive. This means that you can + not use notations like ``cm''--use ``Cm'' instead.

              The ``z'' and the associated track specifiers are also case sensitive. -For example, the form ``Zc'' will not work! +For example, the form ``Zc'' will not work!

              -


              + +
              bob -2007-03-07 +2008-09-28
              diff --git a/mma/docs/html/ref/node9.html b/mma/docs/html/ref/node9.html index 6f0198c..f0793db 100644 --- a/mma/docs/html/ref/node9.html +++ b/mma/docs/html/ref/node9.html @@ -1,4 +1,4 @@ - + - + next - up - previous
              - Next: Next: Solo and Melody Tracks - Up: Up: Reference Manual - Previous: Previous: Musical Data Format
              -
              +
              Subsections - @@ -87,8 +88,8 @@ sequencers can display them as a file is played. Some, but not all.

              I'm not aware of any keyboards which display lyrics; and most Linux based players do not display them. Exceptions to the rule are the -programs Kmid which displays and highlights lyrics almost in a -Karaoke manner, xplaymidi and timidity which display the +programs Kmid which displays and highlights lyrics almost in a +Karaoke manner, xplaymidi and timidity which display the lyrics in a secondary panel.

              @@ -98,25 +99,25 @@ lyrics NOT to be useful in a program like a melody playing while they are vocalizing (really, they are no different in this than any other instrumentalist). And some platforms9.1 other than Linux support lyric display in a more + HREF="#foot3690">9.1 other than Linux support lyric display in a more useful format.

              -The ``Standard MIDI File'' document describes a Lyric Meta-event: +The ``Standard MIDI File'' document describes a Lyric Meta-event:

              -

              FF 05 len text Lyric. A lyric to be sung. +
              FF 05 len text Lyric. A lyric to be sung. Generally, each syllable will be a separate lyric event which begins at the event's time.9.2
              + HREF="#foot3694">9.2

              Unfortunately, not all players and creators follow the specification--the most notable exception are ``.kar'' files. These -files eschew the Lyric event and place their lyrics as a -Text Event. There are programs strewn on the net which convert +files eschew the Lyric event and place their lyrics as a +Text Event. There are programs strewn on the net which convert between the two formats (but I really don't know if conversion is needed). @@ -249,7 +250,7 @@ constructs like ``C7zCS'' will appear with only the chord name.

              -Chord Tranposition +Chord Transposition

              @@ -269,9 +270,9 @@ in the LYRIC command:

              -Please note that the Lyrics code does not look at the global +Please note that the Lyrics code does not look at the global TRANSPOSE setting.9.3 + HREF="#foot3720">9.3

              MMA isn't too smart in it's transposition and will often display the @@ -308,9 +309,9 @@ Adding a lyric to your song is a simple matter ...and like so many things, there is more than one way to do it.

              -Lyrics can be set for a bar in-between a pair of []s +Lyrics can be set for a bar in-between a pair of []s somewhere in a data bar.9.4 For + HREF="#foot3726">9.4 For example:

              @@ -343,11 +344,11 @@ The alternate method is to use the LYRIC SET direc

              Unlike the other LYRIC options, the SET option must be the last one on a line, and it does not use the ``='' sign. If you are -setting the lyric for a single verse the []s are optional; +setting the lyric for a single verse the []s are optional; however, for multiple verses they are used (just like they are when you include the lyric in a data/chord line). The advantage to using LYRIC SET is that you can specify multiple bars of lyrics at -one point in your file. See the sample file egs/lyrics.mma for +one point in your file. See the sample file egs/lyrics.mma for an example.

              @@ -363,14 +364,14 @@ the start of the bar.

                -
              • A \r is converted into an EOL character (hex - value 0x0D). A \r should appear at the end of each +
              • A \r is converted into an EOL character (hex + value 0x0D). A \r should appear at the end of each lyrical line.

              • -
              • A \n is converted into a LF character (hex - value 0x0A). A \n should appear at the end of each +
              • A \n is converted into a LF character (hex + value 0x0A). A \n should appear at the end of each verse or paragraph.

                @@ -457,10 +458,10 @@ There are a couple of special cases: At times you may wish to override MMA 's method of determining the beat offsets for a lyric or a single syllable in a lyric. You can -specify the beat in the bar by enclosing the value in ``$< >$'' + ALT="$< >$">'' brackets. For example, suppose that your song starts with a pickup bar and you'd like the lyrics for the first bar to start on beat 4: @@ -476,29 +477,29 @@ F [ Young lovers ]

              -Assuming 4/4 the above would put the word ``Hello'' at beat +Assuming 4/4 the above would put the word ``Hello'' at beat 4 of the first bar; ``Young'' on the first beat of bar 2; and ``lovers'' on beat 3 of bar 2.

              -Note: there must not be a space inside the ``$< >$'', nor can there be + ALT="$< >$">'', nor can there be a space between the bracket and the syllable it applies to.

              -Only the first ``$< >$'' is checked. So, if you really want to have -the characters ``$< >$'' is checked. So, if you really want to have +the characters ``$<$'' or ``$<$'' or ``$>$'' in a lyric just include a dummy to + ALT="$>$">'' in a lyric just include a dummy to keep MMA happy: @@ -512,16 +513,16 @@ keep

              -This example 9.5 shows a complete +This example9.5 shows a complete song with lyrics. You should also examine the file -egs/lyrics.mma for an alternate example. +egs/lyrics.mma for an alternate example.

              - Twinkle, Twinkle, Little Star + Twinkle, Twinkle, Little Star
              @@ -595,62 +596,63 @@ A few combinations are not permitted:

              Footnotes

              -
              ... +
              ... platforms9.1
              + HREF="node9.html#tex2html36">9.1
              Pointers and reviews to other players would be would appreciated.
              -
              ... time.9.2
              +
              ... time.9.2
              I am quoting from ``MIDI Documentation'' distributed with the TSE Library. Pete Goodliffe, Oct. 21, 1999. Page 41.
              -
              ... setting.9.3
              +
              ... setting.9.3
              This is a feature! It permits you to have separate control over music generation and chord symbol display.
              -
              ... bar.9.4
              +
              ... bar.9.4
              Although the lyric can be placed anywhere in the bar, it is recommended that you only place the lyric at the end of the bar. All the examples follow this style.
              -
              ...eg:twk 9.5
              +
              ...eg:twk9.5
              Included in - this distribution as songs/twinkle.mma. + this distribution as songs/twinkle.mma.
              -

              + +
              bob -2007-03-07 +2008-09-28
              diff --git a/mma/docs/html/tut/index.html b/mma/docs/html/tut/index.html index 9f5cbc7..83c6e8d 100644 --- a/mma/docs/html/tut/index.html +++ b/mma/docs/html/tut/index.html @@ -1,4 +1,4 @@ - + + +

              @@ -53,12 +54,12 @@ original version by: Nikos Drakos, CBLU, University of Leeds ALT="LOST LOGO">

              - Tutorial -

              + Tutorial +

              Bob van der Poel

              Wynndel, BC, Canada

              -

              March 7, 2007

              +

              September 28, 2008

              @@ -68,7 +69,7 @@ original version by: Nikos Drakos, CBLU, University of Leeds -

                +