diff --git a/mma/MMA/alloc.py b/mma/MMA/alloc.py index 2ec1045..05bbf27 100644 --- a/mma/MMA/alloc.py +++ b/mma/MMA/alloc.py @@ -2,7 +2,7 @@ # alloc.py """ -This module is an integeral part of the program +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 @@ -19,10 +19,10 @@ 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 - +Bob van der Poel + """ - + import MMA.patChord import MMA.patWalk import MMA.patBass @@ -30,74 +30,77 @@ import MMA.patDrum import MMA.patScale import MMA.patArpeggio import MMA.patSolo +import MMA.patAria import gbl from MMA.common import * trkClasses = { - 'BASS' : MMA.patBass.Bass, - 'CHORD' : MMA.patChord.Chord, - 'ARPEGGIO' : MMA.patArpeggio.Arpeggio, - 'SCALE' : MMA.patScale.Scale, - 'DRUM' : MMA.patDrum.Drum, - 'WALK' : MMA.patWalk.Walk, - 'MELODY' : MMA.patSolo.Melody, - 'SOLO' : MMA.patSolo.Solo } + 'BASS' : MMA.patBass.Bass, + 'CHORD' : MMA.patChord.Chord, + 'ARPEGGIO' : MMA.patArpeggio.Arpeggio, + 'SCALE' : MMA.patScale.Scale, + 'DRUM' : MMA.patDrum.Drum, + 'WALK' : MMA.patWalk.Walk, + 'MELODY' : MMA.patSolo.Melody, + 'SOLO' : MMA.patSolo.Solo, + 'ARIA' : MMA.patAria.Aria +} def trackAlloc(name, err): - """ Check existence of track and create if possible. + """ Check existence of track and create if possible. - If 'err' is set, the function will 'error out' if - it's not possible to create the track. Otherwise, - it is content to return without creation taking place. - """ + If 'err' is set, the function will 'error out' if + it's not possible to create the track. Otherwise, + it is content to return without creation taking place. + """ - # If the track already exists, just return - - if name in gbl.tnames: - return + # If the track already exists, just return - # Get the trackname. Can be just a type, or type-name. - - if '-' in name: - base, ext = name.split('-',1) - else: - ext = None - base = name + if name in gbl.tnames: + return + + # Get the trackname. Can be just a type, or type-name. + + if '-' in name: + base, ext = name.split('-',1) + else: + ext = None + base = name - """ See if there is a track class 'base'. If there is, then - 'f' points to the initialization function for the class. - If not, we either error (err==1) or return (err==0). - """ + """ See if there is a track class 'base'. If there is, then + 'f' points to the initialization function for the class. + If not, we either error (err==1) or return (err==0). + """ - if trkClasses.has_key(base): - f = trkClasses[base] - else: - if err: - error("There is no track class '%s' for trackname '%s'" % (base, name) ) - else: - return + if trkClasses.has_key(base): + f = trkClasses[base] + else: + if err: + error("There is no track class '%s' for trackname '%s'" % (base, name) ) + else: + return - # Now attempt to allocate the track - - gbl.tnames[name] = newtk = f(name) + # Now attempt to allocate the track - # Set the sequence size of new track - - newtk.setSeqSize() + gbl.tnames[name] = newtk = f(name) - # Update current grooves to reflect new track. - - for slot in gbl.settingsGroove.keys(): - newtk.saveGroove(slot) + # Set the sequence size of new track - - if gbl.debug: - print "Creating new track", name + newtk.setSeqSize() + + # Update current grooves to reflect new track. + + for slot in gbl.settingsGroove.keys(): + newtk.saveGroove(slot) + + + if gbl.debug: + print "Creating new track", name + + return - return - diff --git a/mma/MMA/auto.py b/mma/MMA/auto.py index 370049f..f8deb05 100644 --- a/mma/MMA/auto.py +++ b/mma/MMA/auto.py @@ -19,7 +19,7 @@ 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 +Bob van der Poel """ @@ -34,7 +34,7 @@ import MMA.parse from MMA.common import * grooveDir = {} -mmadir = ".mmaDB" # constant, name of the lib database file +mmadir = ".mmaDB" # constant, name of the lib database file fileCount = 0 grooveCount = 0 gdDate = None @@ -42,161 +42,160 @@ processedFiles = [] mkGrooveList = [] def updateGrooveList(n): - """ Called from parse when new grooves are defined in a -g. """ + """ Called from parse when new grooves are defined in a -g. """ - global mkGrooveList + global mkGrooveList - mkGrooveList.append(n) + mkGrooveList.append(n) def libUpdate(): - """ Update the mma library database file(s) with -g or -G option. + """ 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 + global fileCount, gdDate, grooveDir, processedfiles - print "Creating MMA groove directory database(s). Standby..." + print "Creating MMA groove directory database(s). Standby..." - """ gbl.libPath points to one main directory tree which should include - gbl.autoLib (defaults to 'stdlib'). We create a separate .mmaDB - file for each directory found in the main tree. IE. if we have the - directories stdlib and bvstuff we end up with stdlib/.mmaDB and - bvstuff/.mmaDB. + """ gbl.libPath points to one main directory tree which should include + gbl.autoLib (defaults to 'stdlib'). We create a separate .mmaDB + file for each directory found in the main tree. IE. if we have the + directories stdlib and bvstuff we end up with stdlib/.mmaDB and + bvstuff/.mmaDB. - """ + """ - for d in os.listdir(gbl.libPath): - libpath = os.path.join(gbl.libPath, d) + for d in os.listdir(gbl.libPath): + libpath = os.path.join(gbl.libPath, d) - if not os.path.isdir(libpath): # skip files, just process directories - continue + if not os.path.isdir(libpath): # skip files, just process directories + continue - """ Attempt to read existing database - There is a flag gbl.makeGrvDefs set to 0, 1, 2 - 0 - there was no -g or -G so we're not here - 1 - -g - read existing database and update - 2 - -G - don't read existing, create new - """ + """ Attempt to read existing database + There is a flag gbl.makeGrvDefs set to 0, 1, 2 + 0 - there was no -g or -G so we're not here + 1 - -g - read existing database and update + 2 - -G - don't read existing, create new + """ - grooveDir = {} - gdDate = None + grooveDir = {} + gdDate = None - if gbl.makeGrvDefs == 1: - try: - infile = os.path.join(libpath, mmadir) - f=file(infile, "rb") - f.readline() # Read/discard comment line - grooveDir = pickle.load(f) - f.close() - gdDate = os.path.getmtime(infile) - except: - pass + if gbl.makeGrvDefs == 1: + try: + infile = os.path.join(libpath, mmadir) + f=file(infile, "rb") + f.readline() # Read/discard comment line + grooveDir = pickle.load(f) + f.close() + gdDate = os.path.getmtime(infile) + except: + pass - dolibupdate(libpath, '') + dolibupdate(libpath, '') - # Strip out defs of deleted (not found) files. + # Strip out defs of deleted (not found) files. - for f in grooveDir.keys(): - if f not in processedFiles: - print " Deleting: %s" % f - del grooveDir[f] + for f in grooveDir.keys(): + if f not in processedFiles: + print " Deleting: %s" % f + del grooveDir[f] - try: - outpath = file(os.path.join(libpath, mmadir), 'wb') - except: - error("Error creating lib-database file '%s'. CRITICAL!" - % libpath) + try: + outpath = file(os.path.join(libpath, mmadir), 'wb') + except: + error("Error creating lib-database file '%s'. CRITICAL!" % libpath) - outpath.write("### mmaDB ... AUTOGENERATED BINARY DATA. " - "DO NOT EDIT!!!\n") - pickle.dump(grooveDir, outpath, pickle.HIGHEST_PROTOCOL ) - outpath.close() + outpath.write("### mmaDB ... AUTOGENERATED BINARY DATA. " + "DO NOT EDIT!!!\n") + pickle.dump(grooveDir, outpath, pickle.HIGHEST_PROTOCOL ) + outpath.close() - print - print "Database update complete." - print " Files processed: %s" % fileCount - print " Total number of grooves: %s" % grooveCount + print + print "Database update complete." + print " Files processed: %s" % fileCount + print " Total number of grooves: %s" % grooveCount - sys.exit(0) + sys.exit(0) def dolibupdate(root, subdir): - """ Recursive function to read groove files in a directory. """ + """ Recursive function to read groove files in a directory. """ - global fileCount, grooveCount, gdDate, grooveDir, processedFiles, mkGrooveList + global fileCount, grooveCount, gdDate, grooveDir, processedFiles, mkGrooveList - if subdir == '.': - print "Skipping: '.'" - return + if subdir == '.': + print "Skipping: '.'" + return - if subdir: - print " Processing library directory '%s'." % subdir + if subdir: + print " Processing library directory '%s'." % 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. - """ + """ 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. + """ - p = os.path.join(root,subdir) - dirfiles = os.listdir(p) + p = os.path.join(root,subdir) + dirfiles = os.listdir(p) - if "MMAIGNORE" in dirfiles: - print "Skipping: %s" % p - return + if "MMAIGNORE" in dirfiles: + print "Skipping: %s" % p + return - for fn in sorted(dirfiles): + for fn in sorted(dirfiles): - # Ignore hidden files and emacs auto-save and dead. + # Ignore hidden files and emacs auto-save and dead. - if fn.startswith('.') or fn.startswith('#'): - continue + if fn.startswith('.') or fn.startswith('#'): + continue - # Create full path name + # Create full path name - f=os.path.join(root, subdir, fn) + f=os.path.join(root, subdir, fn) - if os.path.isdir(f): - dolibupdate(root, os.path.join(subdir,fn)) # recursive! + if os.path.isdir(f): + dolibupdate(root, os.path.join(subdir,fn)) # recursive! - elif f.endswith(gbl.ext): - ename = os.path.join(subdir, fn) + elif f.endswith(gbl.ext): + ename = os.path.join(subdir, fn) - processedFiles.append(ename) + processedFiles.append(ename) - if gdDate and grooveDir.has_key(ename) and \ - os.path.getmtime(f) < gdDate: - print " Existing: %s" % f - grooveCount += len(grooveDir[ename]) - continue + if gdDate and grooveDir.has_key(ename) and \ + os.path.getmtime(f) < gdDate: + print " Existing: %s" % f + grooveCount += len(grooveDir[ename]) + continue - if grooveDir.has_key(ename): - print " Updating: %s" % f - else: - print " Creating: %s" % f - mkGrooveList = [] - gbl.mtrks = {} - for c in gbl.midiAssigns.keys(): - gbl.midiAssigns[c]=[] - for a,v in enumerate(gbl.midiAvail): - gbl.midiAvail[a]=0 - gbl.mtrks[0]=MMA.midi.Mtrk(0) - gbl.tnames = {} - MMA.parse.parseFile(f) # read current file, grab grooves + if grooveDir.has_key(ename): + print " Updating: %s" % f + else: + print " Creating: %s" % f + mkGrooveList = [] + gbl.mtrks = {} + for c in gbl.midiAssigns.keys(): + gbl.midiAssigns[c]=[] + for a,v in enumerate(gbl.midiAvail): + gbl.midiAvail[a]=0 + gbl.mtrks[0]=MMA.midi.Mtrk(0) + gbl.tnames = {} + MMA.parse.parseFile(f) # read current file, grab grooves - fileCount += 1 # just so we can report to user - grooveCount += len(mkGrooveList) + fileCount += 1 # just so we can report to user + grooveCount += len(mkGrooveList) - grooveDir[ename]=mkGrooveList + grooveDir[ename]=mkGrooveList - else: - if not f.endswith(mmadir): - print " Ignoring: %s" % f + else: + if not f.endswith(mmadir): + print " Ignoring: %s" % f @@ -204,52 +203,53 @@ def dolibupdate(root, subdir): def loadGrooveDir(g): - """ Try to auto-load a groove from the library. + """ Try to auto-load a groove from the library. - The compliation of all the MMADIR files is stored in the dict - grooveDir{}. + The compliation of all the MMADIR files is stored in the dict + grooveDir{}. - Check the main libpath directory for the MMADIR file. The - names of the files and corresponding grooves are extracted. - This is stored in a dictionary with the filename as the key - and a list of grooves as the data. - """ + Check the main libpath directory for the MMADIR file. The + names of the files and corresponding grooves are extracted. + This is stored in a dictionary with the filename as the key + and a list of grooves as the data. + """ - global grooveDir + global grooveDir - """ If the global dict grooveDir is empty we first load the MMADIR info. - We're assuming that not much goes wrong here...if we don't find - the database we set grooveDir{} to a BS value to avoid future - load attempts. The entire load is in a try, which means it either - all works, or not ... - """ + """ If the global dict grooveDir is empty we first load the MMADIR info. + We're assuming that not much goes wrong here...if we don't find + the database we set grooveDir{} to a BS value to avoid future + load attempts. The entire load is in a try, which means it either + all works, or not ... + """ - if not grooveDir: - try: - infile = os.path.join(gbl.libPath, gbl.autoLib, mmadir) - f=file(infile, "rb") - f.readline() # Read/discard comment line - grooveDir = pickle.load(f) - f.close() - except: - grooveDir[0]='' + if not grooveDir: + try: + infile = os.path.join(gbl.libPath, gbl.autoLib, mmadir) + f=file(infile, "rb") + f.readline() # Read/discard comment line + grooveDir = pickle.load(f) + f.close() + except: + grooveDir[0]='' - """ Search the dict for a match. grooveDir{} is a dictionary - for lists. Each dictionary key is filename (eg: "lib/rhumba.mma") - and the list associated with it is a list of grooves defined - in that file. Just a matter of stepping though the dict. and - returning the proper filename. + """ Search the dict for a match. grooveDir{} is a dictionary + for lists. Each dictionary key is filename (eg: "lib/rhumba.mma") + and the list associated with it is a list of grooves defined + in that file. Just a matter of stepping though the dict. and + returning the proper filename. - RETURN: Lib-Filename if found - None if not found - """ + RETURN: Lib-Filename if found + None if not found + """ - for filename, namelist in grooveDir.items(): - if g in namelist: - return filename + for filename, namelist in grooveDir.items(): + if g in namelist: + return filename + + return None - return None diff --git a/mma/MMA/chords.py b/mma/MMA/chords.py index 0cc9426..76a6dc4 100644 --- a/mma/MMA/chords.py +++ b/mma/MMA/chords.py @@ -19,7 +19,7 @@ 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 +Bob van der Poel """ @@ -27,69 +27,69 @@ import copy from MMA.common import * -from MMA.chordtable import _chords +from MMA.chordtable import chords def defChord(ln): - """ Add a new chord type to the _chords{} dict. """ + """ Add a new chord type to the chords{} dict. """ - emsg="DefChord needs NAME (NOTES) (SCALE)" + emsg="DefChord needs NAME (NOTES) (SCALE)" - # At this point ln is a list. The first item should be - # the new chord type name. + # At this point ln is a list. The first item should be + # the new chord type name. - if not len(ln): - error(emsg) - name = ln.pop(0) - if name in _chords.keys(): - warning("Redefining chordtype '%s'." % name) + if not len(ln): + error(emsg) + name = ln.pop(0) + if name in chords.keys(): + warning("Redefining chordtype '%s'" % name) - if '/' in name: - error("A slash in not permitted in chord type name") + if '/' in name: + error("A slash in not permitted in chord type name") - if '>' in name: - error("A '>' in not permitted in chord type name") + if '>' in name: + error("A '>' in not permitted in chord type name") - ln=pextract(''.join(ln), '(', ')') + ln=pextract(''.join(ln), '(', ')') - if ln[0] or len(ln[1])!=2: - error(emsg) + if ln[0] or len(ln[1])!=2: + error(emsg) - notes=ln[1][0].split(',') - if len(notes) < 2 or len(notes)>8: - error("There must be 2..8 notes in a chord, not '%s'." % len(note)) - notes.sort() - for i,v in enumerate(notes): - v=stoi(v, "Note offsets in chord must be integers, not '%s'." % v) - if v<0 or v>24: - error("Note offsets in chord must be 0..24, not '%s'." % v) - notes[i]=v + notes=ln[1][0].split(',') + if len(notes) < 2 or len(notes)>8: + error("There must be 2..8 notes in a chord, not '%s'" % len(note)) + notes.sort() + for i,v in enumerate(notes): + v=stoi(v, "Note offsets in chord must be integers, not '%s'" % v) + if v<0 or v>24: + error("Note offsets in chord must be 0..24, not '%s'" % v) + notes[i]=v - scale=ln[1][1].split(',') - if len(scale) != 7: - error("There must be 7 offsets in chord scale, not '%s'" % len(scale)) - scale.sort() - for i,v in enumerate(scale): - v=stoi(v, "Scale offsets in chord must be integers, not '%s'." % v) - if v<0 or v>24: - error("Scale offsets in chord must be 0..24, not '%s'." % v) - scale[i]=v + scale=ln[1][1].split(',') + if len(scale) != 7: + error("There must be 7 offsets in chord scale, not '%s'" % len(scale)) + scale.sort() + for i,v in enumerate(scale): + v=stoi(v, "Scale offsets in chord must be integers, not '%s'" % v) + if v<0 or v>24: + error("Scale offsets in chord must be 0..24, not '%s'" % v) + scale[i]=v - _chords[name] = ( notes, scale, "User Defined") + chords[name] = ( notes, scale, "User Defined") - if gbl.debug: - print "ChordType '%s', %s" % (name, _chords[name]) + if gbl.debug: + print "ChordType '%s', %s" % (name, chords[name]) def printChord(ln): - """ Display the note/scale/def for chord(s). """ + """ Display the note/scale/def for chord(s). """ - for c in ln: - if not _chords.has_key(c): - error("Chord '%s' is unknown" % c) - print c, ':', _chords[c][0], _chords[c][1], _chords[c][2] + for c in ln: + if not chords.has_key(c): + error("Chord '%s' is unknown" % c) + print c, ':', chords[c][0], chords[c][1], chords[c][2] """ @@ -100,53 +100,53 @@ 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? """ -_chordAdjust = { - 'Gb':-6, - 'G' :-5, - 'G#':-4, 'Ab':-4, - 'A' :-3, - 'A#':-2, 'Bb':-2, - 'B' :-1, 'Cb':-1, - 'B#': 0, 'C' : 0, - 'C#': 1, 'Db': 1, - 'D' : 2, - 'D#': 3, 'Eb': 3, - 'E' : 4, 'Fb': 4, - 'E#': 5, 'F' : 5, - 'F#': 6 } +cdAdjust = { + 'Gb':-6, + 'G' :-5, + 'G#':-4, 'Ab':-4, + 'A' :-3, + 'A#':-2, 'Bb':-2, + 'B' :-1, 'Cb':-1, + 'B#': 0, 'C' : 0, + 'C#': 1, 'Db': 1, + 'D' : 2, + 'D#': 3, 'Eb': 3, + 'E' : 4, 'Fb': 4, + 'E#': 5, 'F' : 5, + 'F#': 6 } def chordAdjust(ln): - """ Adjust the chord point up/down one octave. """ + """ Adjust the chord point up/down one octave. """ - if not ln: - error("ChordAdjust: Needs at least one argument.") + if not ln: + error("ChordAdjust: Needs at least one argument") - for l in ln: - try: - pitch, octave = l.split('=') - except: - error("Each arg must contain an '=', not '%s'." % l) + for l in ln: + try: + pitch, octave = l.split('=') + except: + error("Each arg must contain an '=', not '%s'" % l) - if pitch not in _chordAdjust: - error("ChordAdjust: '%s' is not a valid pitch." % pitch) + if pitch not in cdAdjust: + error("ChordAdjust: '%s' is not a valid pitch" % pitch) - octave = stoi(octave, "ChordAdjust: expecting integer, not '%s'." % octave) + octave = stoi(octave, "ChordAdjust: expecting integer, not '%s'" % octave) - p=_chordAdjust[pitch] - if octave == 0: - if p < -6: - _chordAdjust[pitch] += 12 - elif p > 6: - _chordAdjust[pitch]-=12 + p=cdAdjust[pitch] + if octave == 0: + if p < -6: + cdAdjust[pitch] += 12 + elif p > 6: + cdAdjust[pitch]-=12 - elif octave == -1 and p <= 6 and p >= -6: - _chordAdjust[pitch] -= 12 + elif octave == -1 and p <= 6 and p >= -6: + cdAdjust[pitch] -= 12 - elif octave == 1 and p <= 6 and p >= -6: - _chordAdjust[pitch] += 12 + elif octave == 1 and p <= 6 and p >= -6: + cdAdjust[pitch] += 12 - else: - error("ChordAdjust: '%s' is not a valid octave. Use 1, 0 or -1." % octave) + else: + error("ChordAdjust: '%s' is not a valid octave. Use 1, 0 or -1" % octave) @@ -155,348 +155,330 @@ def chordAdjust(ln): ############################### class ChordNotes: - """ The Chord class creates and manipulates chords for MMA. The - class is initialized with a call with the chord name. Eg: + """ The Chord class creates and manipulates chords for MMA. The + class is initialized with a call with the chord name. Eg: - ch = ChordNotes("Am") + ch = ChordNotes("Am") - The following methods and variables are defined: + The following methods and variables are defined: - noteList - the notes in the chord as a list. The "Am" - would be [9, 12, 16]. + noteList - the notes in the chord as a list. The "Am" + would be [9, 12, 16]. - noteListLen - length of noteList. + noteListLen - length of noteList. - tonic - the tonic of the chord ("Am" would be "A"). + tonic - the tonic of the chord ("Am" would be "A"). - chordType - the type of chord ("Am" would be "m"). + chordType - the type of chord ("Am" would be "m"). - rootNote - the root note of the chord ("Am" would be a 9). + rootNote - the root note of the chord ("Am" would be a 9). - bnoteList - the original chord notes, bypassing any - invert(), etc. mangling. + bnoteList - the original chord notes, bypassing any + invert(), etc. mangling. - scaleList - a 7 note list representing a scale similar to - the chord. + scaleList - a 7 note list representing a scale similar to + the chord. - reset() - resets noteList to the original chord notes. - This is useful to restore the original after - chord note mangling by invert(), etc. without having to - create a new chord object. + reset() - resets noteList to the original chord notes. + This is useful to restore the original after + chord note mangling by invert(), etc. without having to + create a new chord object. - invert(n) - Inverts a chord by 'n'. This is done inplace and - returns None. 'n' can have any integer value, but -1 and 1 - are most common. The order of the notes is not changed. Eg: + invert(n) - Inverts a chord by 'n'. This is done inplace and + returns None. 'n' can have any integer value, but -1 and 1 + are most common. The order of the notes is not changed. Eg: - ch=Chord('Am') - ch.noteList == [9, 12, 16] - ch.invert(1) - ch.noteList = [21, 12, 16] + ch=Chord('Am') + ch.noteList == [9, 12, 16] + ch.invert(1) + ch.noteList = [21, 12, 16] - compress() - Compresses the range of a chord to a single octave. This is - done inplace and return None. Eg: + compress() - Compresses the range of a chord to a single octave. This is + done inplace and return None. Eg: - ch=Chord("A13") - ch.noteList == [1, 5, 8, 11, 21] - ch.compress() - ch.noteList == [1, 5, 8, 11, 10 ] + ch=Chord("A13") + ch.noteList == [1, 5, 8, 11, 21] + ch.compress() + ch.noteList == [1, 5, 8, 11, 10 ] - limit(n) - Limits the range of the chord 'n' notes. Done inplace - and returns None. Eg: + limit(n) - Limits the range of the chord 'n' notes. Done inplace + and returns None. Eg: - ch=Chord("CM711") - ch.noteList == [0, 4, 7, 11, 15, 18] - ch.limit(4) - ch.noteList == [0, 4, 7, 11] + ch=Chord("CM711") + ch.noteList == [0, 4, 7, 11, 15, 18] + ch.limit(4) + ch.noteList == [0, 4, 7, 11] - """ + """ - ################# - ### Functions ### - ################# + ################# + ### Functions ### + ################# - def __init__(self, name, line=''): - """ Create a chord object. Pass the chord name as the only arg. + def __init__(self, name, line=''): + """ Create a chord object. Pass the chord name as the only arg. - NOTE: Chord names ARE case-sensitive! + NOTE: Chord names ARE case-sensitive! - The chord NAME at this point is something like 'Cm' or 'A#7'. - Split off the tonic and the type. - If the 2nd char is '#' or 'b' we have a 2 char tonic, - otherwise, it's the first char only. + The chord NAME at this point is something like 'Cm' or 'A#7'. + Split off the tonic and the type. + If the 2nd char is '#' or 'b' we have a 2 char tonic, + otherwise, it's the first char only. - A chord can start with a single '+' or '-'. This moves - the entire chord and scale up/down an octave. + A chord can start with a single '+' or '-'. This moves + the entire chord and scale up/down an octave. - Note pythonic trick: By using ranges like [1:2] we - avoid runtime errors on too-short strings. If a 1 char - string, name[1] is an error; name[1:2] just returns None. + Note pythonic trick: By using ranges like [1:2] we + avoid runtime errors on too-short strings. If a 1 char + string, name[1] is an error; name[1:2] just returns None. - Further note: I have tried to enable caching of the generated - chords, but found no speed difference. So, to make life simpler - I've decided to generate a new object each time. + Further note: I have tried to enable caching of the generated + chords, but found no speed difference. So, to make life simpler + I've decided to generate a new object each time. - """ + """ - slash = None - octave = 0 - inversion = 0 + slash = None + octave = 0 + inversion = 0 - if name == 'z': - self.tonic = self.chordType = None - self.noteListLen = 0 - self.notesList = self.bnoteList = [] - return + if name == 'z': + self.tonic = self.chordType = None + self.noteListLen = 0 + self.notesList = self.bnoteList = [] + return - if '/' in name and '>' in name: - error("You cannot use both an inversion and a slash in the same chord.") + if '/' in name and '>' in name: + error("You cannot use both an inversion and a slash in the same chord") - if '>' in name: - name, inversion = name.split('>', 1) - inversion = stoi(inversion, "Expecting interger after '>'.") - if inversion < -5 or inversion > 5: - error("Chord inversions limited to -5 to 5 (more seems silly).") + if '>' in name: + name, inversion = name.split('>', 1) + inversion = stoi(inversion, "Expecting interger after '>'") + if inversion < -5 or inversion > 5: + error("Chord inversions limited to -5 to 5 (more seems silly)") - if name.startswith('-'): - name = name[1:] - octave = -12 + if name.startswith('-'): + name = name[1:] + octave = -12 - if name.startswith('+'): - name = name[1:] - octave = 12 + if name.startswith('+'): + name = name[1:] + octave = 12 - name = name.replace('&', 'b') + name = name.replace('&', 'b') - # Strip off the slash part of the chord. Use later - # to do proper inversion. + # Strip off the slash part of the chord. Use later + # to do proper inversion. - if name.find('/') > 0: - name, slash = name.split('/') + if name.find('/') > 0: + name, slash = name.split('/') - if name[1:2] in ( '#b' ): - tonic = name[0:2] - ctype = name[2:] - else: - tonic = name[0:1] - ctype = name[1:] + if name[1:2] in ( '#b' ): + tonic = name[0:2] + ctype = name[2:] + else: + tonic = name[0:1] + ctype = name[1:] - if not ctype: # If no type, make it a Major - ctype='M' + if not ctype: # If no type, make it a Major + ctype='M' - try: - notes = _chords[ctype][0] - adj = _chordAdjust[tonic] + octave - except: - error( "Illegal/Unknown chord name: '%s'." % name ) + try: + notes = chords[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.chordType = ctype - self.tonic = tonic - self.rootNote = self.noteList[0] + 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.chordType = ctype + self.tonic = tonic + self.rootNote = self.noteList[0] - self.noteListLen = len(self.noteList) + self.noteListLen = len(self.noteList) - # Inversion + # Inversion - if inversion: - self.invert(inversion) - self.bnoteList = tuple(self.noteList) + if inversion: + self.invert(inversion) + self.bnoteList = tuple(self.noteList) - # Do inversions if there is a valid slash notation. + # Do inversions if there is a valid slash notation. - if slash: - if not _chordAdjust.has_key(slash): - error("The note '%s' in the slash chord is unknown." % slash) + if slash: + if not cdAdjust.has_key(slash): + error("The note '%s' in the slash chord is unknown" % slash) - r=_chordAdjust[slash] # r = -6 to 6 + 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. + # If the slash note is in the chord we invert + # the chord so the slash note is in root position. - c_roted = 0 - s=self.noteList - for octave in [0, 12, 24]: - if r+octave in s: - rot=s.index(r+octave) - for i in range(rot): - s.append(s.pop(0)+12) - if s[0] >= 12: - for i,v in enumerate(s): - s[i] = v-12 - self.noteList = s - self.bnoteList = tuple(s) - self.rootNote = self.noteList[0] - c_roted = 1 - break + c_roted = 0 + s=self.noteList + for octave in [0, 12, 24]: + if r+octave in s: + rot=s.index(r+octave) + for i in range(rot): + s.append(s.pop(0)+12) + if s[0] >= 12: + for i,v in enumerate(s): + s[i] = v-12 + self.noteList = s + self.bnoteList = tuple(s) + self.rootNote = self.noteList[0] + c_roted = 1 + break - s_roted = 0 - s=list(self.scaleList) - for octave in [0, 12, 24]: - if r+octave in s: - rot=s.index(r+octave) - for i in range(rot): - s.append(s.pop(0)+12) - if s[0] > 12: - for i,v in enumerate(s): - s[i] = v-12 - self.scaleList=tuple(s) - s_roted = 1 - break + s_roted = 0 + s=list(self.scaleList) + for octave in [0, 12, 24]: + if r+octave in s: + rot=s.index(r+octave) + for i in range(rot): + s.append(s.pop(0)+12) + if s[0] > 12: + for i,v in enumerate(s): + s[i] = v-12 + self.scaleList=tuple(s) + s_roted = 1 + break - if not c_roted and not s_roted: - warning("The slash chord note '%s' not in " - "chord or scale." % slash) + if not c_roted and not s_roted: + warning("The slash chord note '%s' not in chord or scale" % slash) - elif not c_roted: - warning("The slash chord note '%s' not in " - "chord '%s'" % (slash, name)) + elif not c_roted: + warning("The slash chord note '%s' not in chord '%s'" % (slash, name)) - elif not s_roted: # Probably will never happen :) - warning("The slash chord note '%s' not in " - "scale for the chord '%s'" % (slash, name)) + elif not s_roted: # Probably will never happen :) + warning("The slash chord note '%s' not in scale for the chord '%s'" % (slash, name)) - def reset(self): - """ Restores notes array to original, undoes mangling. """ + def reset(self): + """ Restores notes array to original, undoes mangling. """ - self.noteList = list(self.bnoteList[:]) - self.noteListLen = len(self.noteList) + self.noteList = list(self.bnoteList[:]) + self.noteListLen = len(self.noteList) - def invert(self, n): - """ Apply an inversion to a chord. + def invert(self, n): + """ Apply an inversion to a chord. - This does not reorder any notes, which means that the root note of - the chord reminds in postion 0. We just find that highest/lowest - notes in the chord and adjust their octave. + This does not reorder any notes, which means that the root note of + the chord reminds in postion 0. We just find that highest/lowest + notes in the chord and adjust their octave. - NOTE: Done on the existing list of notes. Returns None. - """ + NOTE: Done on the existing list of notes. Returns None. + """ - if n: - c=self.noteList[:] + if n: + c=self.noteList[:] - while n>0: # Rotate up by adding 12 to lowest note - n -= 1 - c[c.index(min(c))]+=12 + while n>0: # Rotate up by adding 12 to lowest note + n -= 1 + c[c.index(min(c))]+=12 - while n<0: # Rotate down, subtract 12 from highest note - n += 1 - c[c.index(max(c))]-=12 + while n<0: # Rotate down, subtract 12 from highest note + n += 1 + c[c.index(max(c))]-=12 - self.noteList = c + self.noteList = c - return None + return None - def compress(self): - """ Compress a chord to one ocatve. + def compress(self): + """ Compress a chord to one ocatve. - Get max permitted value. This is the lowest note - plus 12. Note: use the unmodifed value bnoteList! - """ + Get max permitted value. This is the lowest note + plus 12. Note: use the unmodifed value bnoteList! + """ - mx = self.bnoteList[0] + 12 - c=[] + mx = self.bnoteList[0] + 12 + c=[] - for i, n in enumerate(self.noteList): - if n > mx: - n -= 12 - c.append(n) + for i, n in enumerate(self.noteList): + if n > mx: + n -= 12 + c.append(n) - self.noteList = c + self.noteList = c - return None + return None - def limit(self, n): - """ Limit the number of notes in a chord. """ + def limit(self, n): + """ Limit the number of notes in a chord. """ - if n < self.noteListLen: - self.noteList = self.noteList[:n] - self.noteListLen = len(self.noteList) + if n < self.noteListLen: + self.noteList = self.noteList[:n] + self.noteListLen = len(self.noteList) - return None + return None - def center1(self, lastChord): - """ Descriptive comment needed here!!!! """ + def center1(self, lastChord): + """ Descriptive comment needed here!!!! """ - def minDistToLast(x, lastChord): - dist=99 - for j in range(len(lastChord)): - if abs(x-lastChord[j])0): - return 1 - elif (x<0): - return -1 - else: - return 0 + def sign(x): + if (x>0): + return 1 + elif (x<0): + return -1 + else: + return 0 - # Only change what needs to be changed compared to the last chord - # (leave notes where they are if they are in the new chord as well). + # Only change what needs to be changed compared to the last chord + # (leave notes where they are if they are in the new chord as well). - if lastChord: - ch=self.noteList + if lastChord: + ch=self.noteList - for i in range(len(ch)): + for i in range(len(ch)): - # minimize distance to last chord + # minimize distance to last chord - oldDist = minDistToLast(ch[i], lastChord) - while abs(minDistToLast(ch[i] - sign(oldDist)*12, - lastChord)) < abs(oldDist): - ch[i] -= 12* sign(oldDist) - oldDist = minDistToLast(ch[i], lastChord) + oldDist = minDistToLast(ch[i], lastChord) + while abs(minDistToLast(ch[i] - sign(oldDist)*12, + lastChord)) < abs(oldDist): + ch[i] -= 12* sign(oldDist) + oldDist = minDistToLast(ch[i], lastChord) - return None + return None - def center2(self, centerNote, noteRange): - """ Need COMMENT """ + def center2(self, centerNote, noteRange): + """ Need COMMENT """ - ch=self.noteList - for i,v in enumerate(ch): + ch=self.noteList + for i,v in enumerate(ch): - dist = v - centerNote - if dist < -noteRange: - ch[i] = v + 12 * ( abs(dist) / 12+1 ) - if dist > noteRange: - ch[i] = v - 12 * ( abs(dist) / 12+1 ) + dist = v - centerNote + if dist < -noteRange: + ch[i] = v + 12 * ( abs(dist) / 12+1 ) + if dist > noteRange: + ch[i] = v - 12 * ( abs(dist) / 12+1 ) - return None + return None ######## End of Chord class ##### -def docs(): - """ Print out a list of chord names and docs in LaTex. """ - - import copy - - # Just in case someone else wants to use _chords, work on a copy - - chords=copy.copy(_chords) - - for n in sorted(chords.keys()): - nm=n.replace("#", '$\\sharp$') - nm=nm.replace('b', '$\\flat$') - print "\\insline{%s}{%s}" % (nm, chords[n][2]) - - diff --git a/mma/MMA/chordtable.py b/mma/MMA/chordtable.py index 9bfe5c1..99b0fe7 100644 --- a/mma/MMA/chordtable.py +++ b/mma/MMA/chordtable.py @@ -19,7 +19,7 @@ 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 +Bob van der Poel @@ -53,222 +53,348 @@ A = Bbb= 9 As = Bb = 10 B = Cb = 11 -_chords = { - 'M': ((C, E, G ), - (C, D, E, F, G, A, B), - "Major triad. This is the default and is used in " - "the absense of any other chord type specification."), +chords = { + 'M': ((C, E, G ), + (C, D, E, F, G, A, B), + "Major triad. This is the default and is used in " + "the absense of any other chord type specification."), - 'm': ((C, Eb, G ), - (C, D, Eb, F, G, Ab, Bb), - "Minor triad."), + '(b5)': ((C, E, Gb ), + (C, D, E, F, Gb, A, B), + "Major triad with flat 5th."), - 'mb5': ((C, Eb, Gb ), - (C, D, Eb, F, Gb, Ab, Bb), - "Minor triad with flat 5th."), + 'add9': ((C, E, G, D+12), + (C, D, E, F, G, A, D+12), + "Major chord plus 9th (no 7th.)"), - 'm#5': ((C, Eb, Gs ), - (C, D, Eb, F, Gs, Ab, Bb), - "Major triad with augmented 5th."), + 'm': ((C, Eb, G ), + (C, D, Eb, F, G, Ab, Bb), + "Minor triad."), - 'm6': ((C, Eb, G, A ), - (C, D, Eb, F, G, A, Bb), - "Minor 6th."), + 'mb5': ((C, Eb, Gb ), + (C, D, Eb, F, Gb, Ab, Bb), + "Minor triad with flat 5th (aka dim)."), - 'm6(add9)': ((C, Eb, G, D+12, A+12), - (C, D, Eb, F, G, A, B), - "Minor 6th with added 9th. This is sometimes notated as a slash chord " - "in the form ``m6/9''." ), + 'm#5': ((C, Eb, Gs ), + (C, D, Eb, F, Gs, Ab, Bb), + "Minor triad with augmented 5th."), - 'm7': ((C, Eb, G, Bb ), - (C, D, Eb, F, G, Ab, Bb), - "Minor 7th."), + 'm6': ((C, Eb, G, A ), + (C, D, Eb, F, G, A, Bb), + "Minor 6th (flat 3rd plus a 6th)."), - 'mM7': ((C, Eb, G, B ), - (C, D, Eb, F, G, Ab, B), - "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\ \emph{invalid} " - "forms: ``-($\Delta$7)'', and ``min$\\natural$7''."), + 'm6(add9)': ((C, Eb, G, D+12, A+12), + (C, D, Eb, F, G, A, Bb), + "Minor 6th with added 9th. This is sometimes notated as a slash chord " + "in the form ``m6/9''." ), - 'm7b5': ((C, Eb, Gb, Bb ), - (C, D, Eb, F, Gb, Ab, Bb), - "Minor 7th, flat 5 (aka 1/2 diminished). "), + 'm7': ((C, Eb, G, Bb ), + (C, D, Eb, F, G, Ab, Bb), + "Minor 7th (flat 3rd plus dominant 7th)."), - 'm7b9': ((C, Eb, G, Bb, Db+12 ), - (C, Db, Eb, F, G, Ab, Bb), - "Minor 7th with added flat 9th."), + 'mM7': ((C, Eb, G, B ), + (C, D, Eb, F, G, Ab, B), + "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\ \emph{invalid} " + "forms: ``-($\Delta$7)'', and ``min$\\natural$7''."), - '7': ((C, E, G, Bb ), - (C, D, E, F, G, A, Bb), - "Dominant 7th."), + 'm+7b9': ((C, Eb, Gs, Bb, Db+12), + (C, Db, Eb, F, Gs, Ab, Bb), + "Augmented minor 7 plus flat 9th."), - '7#5': ((C, E, Gs, Bb ), - (C, D, E, F, Gs, A, Bb), - "7th, sharp 5."), + 'm+7#9': ((C, Eb, Gs, Bb, Ds+12), + (C, Ds, Eb, F, Gs, Ab, Bb), + "Augmented minor 7 plus sharp 9th."), + + 'mM7(add9)': ((C, Eb, G, B, D+12), + (C, D, Eb, F, G, Ab, B), + "Minor Triad plus Major 7th and 9th."), - '7b5': ((C, E, Gb, Bb ), - (C, D, E, F, Gb, A, Bb), - "7th, flat 5."), + 'm7b5': ((C, Eb, Gb, Bb ), + (C, D, Eb, F, Gb, Ab, Bb), + "Minor 7th, flat 5 (aka 1/2 diminished). "), - 'dim7': ((C, Eb, Gb, Bbb ), - (C, D, Eb, F, Gb, Ab, Bbb ), # missing 8th note - "Diminished seventh."), + 'm7b9': ((C, Eb, G, Bb, Db+12 ), + (C, Db, Eb, F, G, Ab, Bb), + "Minor 7th with added flat 9th."), - 'aug': ((C, E, Gs ), - (C, D, E, F, Gs, A, B ), - "Augmented triad."), + 'm7#9': ((C, Eb, G, Bb, Ds+12 ), + (C, Ds, Eb, F, G, Ab, Bb), + "Minor 7th with added sharp 9th."), - '6': ((C, E, G, A ), - (C, D, E, F, G, A, B), - "Major tiad with added 6th."), + '7': ((C, E, G, Bb ), + (C, D, E, F, G, A, Bb), + "7th."), - '6(add9)': ((C, E, G, D+12, A+12), - (C, D, E, F, G, A, B), - "6th with added 9th. This is sometimes notated as a slash chord " - "in the form ``6/9''."), + '7b5': ((C, E, Gb, Bb ), + (C, D, E, F, Gb, A, Bb), + "7th, flat 5."), - 'M7': ((C, E, G, B), - (C, D, E, F, G, A, B), - "Major 7th."), + 'dim7': ((C, Eb, Gb, Bbb ), + (C, D, Eb, F, Gb, Ab, Bbb ), # missing 8th note + "Diminished seventh."), + + 'dim7(addM7)': ((C, Eb, Gb, A, B), + (C, D, Eb, F, Gb, A, B), + "Diminished tirad with added Major 7th."), - 'M7#5': ((C, E, Gs, B), - (C, D, E, F, Gs, A, B), - "Major 7th with sharp 5th."), + 'aug': ((C, E, Gs ), + (C, D, E, F, Gs, A, B ), + "Augmented triad."), - 'M7b5': ((C, E, Gb, B ), - (C, D, E, F, Gb, A, B ), - "Major 7th with a flat 5th."), + '6': ((C, E, G, A ), + (C, D, E, F, G, A, B), + "Major tiad with added 6th."), - '9': ((C, E, G, Bb, D+12 ), - (C, D, E, F, G, A, Bb), - "Dominant 7th plus 9th."), + '6(add9)': ((C, E, G, D+12, A+12), + (C, D, E, F, G, A, B), + "6th with added 9th. This is sometimes notated as a slash chord " + "in the form ``6/9''."), - 'sus9': ((C, E, G, D+12), - (C, D, E, F, G, A, D+12), - "Dominant 7th plus 9th, omit 7th."), + 'M7': ((C, E, G, B), + (C, D, E, F, G, A, B), + "Major 7th."), - '9b5': ((C, E, Gb, Bb, D+12 ), - (C, D, E, F, Gb, A, Bb), - "Dominant 7th plus 9th with flat 5th."), + 'M7#5': ((C, E, Gs, B), + (C, D, E, F, Gs, A, B), + "Major 7th with sharp 5th."), - 'm9': ((C, Eb, G, Bb, D+12 ), - (C, D, Eb, F, G, Ab, Bb), - "Minor triad plus 7th and 9th."), + 'M7b5': ((C, E, Gb, B ), + (C, D, E, F, Gb, A, B ), + "Major 7th with a flat 5th."), - 'm9b5': ((C, Eb, Gb, Bb, D+12 ), - (C, D, Eb, F, Gb, Ab, Bb), - "Minor triad, flat 5, plus 7th and 9th."), + '9': ((C, E, G, Bb, D+12 ), + (C, D, E, F, G, A, Bb), + "7th plus 9th."), - 'm(sus9)':((C, Eb, G, D+12 ), - (C, D, Eb, F, G, Ab, D+12), - "Minor triad plus 9th (no 7th)."), + - 'M9': ((C, E, G, B, D+12 ), - (C, D, E, F, G, A, B), - "Major 7th plus 9th."), + '9b5': ((C, E, Gb, Bb, D+12 ), + (C, D, E, F, Gb, A, Bb), + "7th plus 9th with flat 5th."), - '7b9': ((C, E, G, Bb, Db+12 ), - (C, Db, E, F, G, A, Bb), - "Dominant 7th with flat 9th."), + 'm9': ((C, Eb, G, Bb, D+12 ), + (C, D, Eb, F, G, Ab, Bb), + "Minor triad plus 7th and 9th."), - '7#9': ((C, E, G, Bb, Ds+12 ), - (C, Ds, E, F, G, A, Bb), - "Dominant 7th with sharp 9th."), + 'm7b5b9': ((C, Eb, Gb, Bb, Db+12), + (C, Db, Eb, F, Gb, Ab, Bb), + "Minor 7th with flat 5th and flat 9th."), - '7b5b9':((C, E, Gb, Bb, Db+12 ), - (C, Db, E, F, Gb, A, Bb), - "Dominant 7th with flat 5th and flat 9th."), + 'm9b5': ((C, Eb, Gb, Bb, D+12 ), + (C, D, Eb, F, Gb, Ab, Bb), + "Minor triad, flat 5, plus 7th and 9th."), - '7b5#9':((C, E, Gb, Bb, Ds+12 ), - (C, Ds, E, F, Gb, A, Bb), - "Dominant 7th with flat 5th and sharp 9th."), + 'm(sus9)':((C, Eb, G, D+12 ), + (C, D, Eb, F, G, Ab, D+12), + "Minor triad plus 9th (no 7th)."), - '7#5#9':((C, E, Gs, Bb, Ds+12 ), - (C, Ds, E, F, Gs, A, Bb), - "Dominant 7th with sharp 5th and sharp 9th."), + 'M9': ((C, E, G, B, D+12 ), + (C, D, E, F, G, A, B), + "Major 7th plus 9th."), - '7#5b9':((C, E, Gs, Bb, Db+12 ), - (C, Db, E, F, Gs, A, Bb), - "Dominant 7th with sharp 5th and flat 9th."), + 'M9#11': ((C, E, G, B, D+12, Fs+12), + (C, D, E, Fs, G, A, B), + "Major 9th plus sharp 11th."), - 'aug7': ((C, E, Gs, Bb ), - (C, D, E, F, Gs, A, Bb), - "An augmented chord (raised 5th) with a dominant 7th."), + '7b9': ((C, E, G, Bb, Db+12 ), + (C, Db, E, F, G, A, Bb), + "7th with flat 9th."), - 'aug7b9':((C, E, Gs, Bb, Db+12 ), - (C, Db, E, F, Gs, A, Bb), - "Augmented 7th with flat 5th and sharp 9th."), + '7#9': ((C, E, G, Bb, Ds+12 ), + (C, Ds, E, F, G, A, Bb), + "7th with sharp 9th."), - '11': ((C, E, G, Bb, D+12, F+12 ), - (C, D, E, F, G, A, Bb), - "9th chord plus 11th."), + '7#9b13': ((C, E, G, Bb, Ds+12, Ab+12 ), + (C, Ds, E, F, G, Ab, Bb), + "7th with sharp 9th and flat 13th."), - 'm11': ((C, Eb, G, Bb, D+12, F+12 ), - (C, D, Eb, F, G, Ab, Bb), - "9th with minor 3rd, plus 11th."), + '7b5b9':((C, E, Gb, Bb, Db+12 ), + (C, Db, E, F, Gb, A, Bb), + "7th with flat 5th and flat 9th."), - '11b9': ((C, E, G, Bb, Db+12, F+12 ), - (C, Db, E, F, G, A, Bb), - "9th chord plus flat 11th."), + '7b5#9':((C, E, Gb, Bb, Ds+12 ), + (C, Ds, E, F, Gb, A, Bb), + "7th with flat 5th and sharp 9th."), - '9#5': ((C, E, Gs, Bb, D+12 ), - (C, D, E, F, Gs, A, Bb), - "Dominant 7th plus 9th with sharp 5th."), + '7#5#9':((C, E, Gs, Bb, Ds+12 ), + (C, Ds, E, F, Gs, A, Bb), + "7th with sharp 5th and sharp 9th."), - '9#11': ((C, E, G, Bb, D+12, Fs+12 ), - (C, D, E, Fs, G, A, Bb), - "Dominant 7th plus 9th and sharp 11th."), + + 'aug7': ((C, E, Gs, Bb ), + (C, D, E, F, Gs, A, Bb), + "An augmented chord (raised 5th) with a dominant 7th."), - '7#9#11':((C, E, G, Bb, Ds+12, Fs+12 ), - (C, Ds, E, Fs, G, A, Bb), - "Dominant 7th plus sharp 9th and sharp 11th."), + 'aug7b9':((C, E, Gs, Bb, Db+12 ), + (C, Db, E, F, Gs, A, Bb), + "An augmented chord (raised 5th) with a dominant 7th and flat 9th."), + 'aug7#9':((C, E, Gs, Bb, Ds+12 ), + (C, Ds, E, F, Gs, A, Bb), + "An augmented chord (raised 5th) with a dominant 7th and sharp 9th."), - 'M7#11':((C, E, G, B, D+12, Fs+12 ), - (C, D, E, Fs, G, A, B), - "Major 7th plus 9th and sharp 11th."), + 'aug9M7':((C, E, Gs, B, D+12 ), + (C, D, E, F, Gs, A, B), + "An augmented chord (raised 5th) with a major 7th and 9th."), - # Sus chords. Not sure what to do with the associated scales. For - # now just duplicating the 2nd or 3rd in the scale seems to make sense. + '+7b9#11': ((C, E, Gs, Bb, Db+12, Fs+12), + (C, Db, E, Fs, G, A, Bb), + "Augmented 7th with flat 9th and sharp 11th."), - 'sus4': ((C, F, G ), - (C, D, F, F, G, A, B), - "Suspended 4th, major triad with 3rd raised half tone."), + 'm+7b9#11': ((C, Eb, Gs, Bb, Db+12, Fs+12), + (C, Db, Eb, Fs, Gs, A, Bb), + "Augmented minor 7th with flat 9th and sharp 11th."), - '7sus': ((C, F, G, Bb ), - (C, D, F, F, G, A, Bb), - "7th with suspended 4th, dominant 7th with 3rd " - "raised half tone."), + '11': ((C, C, G, Bb, D+12, F+12 ), + (C, D, E, F, G, A, Bb), + "9th chord plus 11th (3rd not voiced)."), - 'sus2': ((C, D, G ), - (C, D, D, F, G, A, B), - "Suspended 2nd, major triad with major 2nd above " - "root substituted for 3rd."), + 'm11': ((C, Eb, G, Bb, D+12, F+12 ), + (C, D, Eb, F, G, Ab, Bb), + "9th with minor 3rd, plus 11th."), - '7sus2':((C, D, G, Bb ), - (C, D, D, F, G, A, Bb), - "A sus2 with dominant 7th added."), + 'm7(add11)': ((C, Eb, G, Bb, F+12 ), + (C, D, Eb, F, G, Ab, Bb), + "Minor 7th plus 11th."), - # these two chords should probably NOT have the 5th included, - # but since a number of voicings depend on the 5th being - # the third note of the chord, they're here. + 'm9#11': ((C, Eb, G, Bb, D+12, Fs+12), + (C, D, Eb, Fs, G, A, Bb), + "Minor 7th plus 9th and sharp 11th."), - '13': ((C, E, G, Bb, A+12), - (C, D, E, F, G, A, Bb), - "Dominant 7th (including 5th) plus 13th."), + 'm7b9#11': ((C, Eb, G, Bb, Db+12, Fs+12), + (C, Db, Eb, Fs, G, A, Bb), + "Minor 7th plus flat 9th and sharp 11th."), - 'M13': ((C, E, G, B, A+12), - (C, D, E, F, G, A, B), - "Major 7th (including 5th) plus 13th."), + 'm7(add13)': ((C, Eb, G, Bb, A+12 ), + (C, D, Eb, F, G, A, Bb), + "Minor 7th plus 13th."), - # Because some patterns assume that the 3rd note in a chord is a 5th, - # or a varient, we duplicate the root into the position of the 3rd ... and - # to make the sound even we duplicate the 5th into the 4th position as well. + '11b9': ((C, E, G, Bb, Db+12, F+12 ), + (C, Db, E, F, G, A, Bb), + "7th chord plus flat 9th and 11th."), - '5': ((C, C, G, G ), - (C, D, E, F, G, A, B), - "Altered Fifth or Power Chord; root and 5th only."), + '9#5': ((C, E, Gs, Bb, D+12 ), + (C, D, E, F, Gs, A, Bb), + "7th plus 9th with sharp 5th (same as aug9)."), + + '9#11': ((C, E, G, Bb, D+12, Fs+12 ), + (C, D, E, Fs, G, A, Bb), + "7th plus 9th and sharp 11th."), + + '7#9#11':((C, E, G, Bb, Ds+12, Fs+12 ), + (C, Ds, E, Fs, G, A, Bb), + "7th plus sharp 9th and sharp 11th."), + + '7b9#11': ((C, E, G, Bb, Db+12, Fs+12 ), + (C, Db, E, Fs, G, A, Bb), + "7th plus flat 9th and sharp 11th."), + + '7#11':((C, E, G, Bb, Fs+12 ), + (C, D, E, Fs, G, A, Bb), + "7th plus sharp 11th (9th omitted)."), + + 'M7#11':((C, E, G, B, Fs+12 ), + (C, D, E, Fs, G, A, B), + "Major 7th plus sharp 11th (9th omitted)."), + + 'm11b5': ((C, Eb, Gb, Bb, D+12, F+12), + (C, D, Eb, F, Gb, A, Bb), + "Minor 7th with flat 5th plus 11th."), + + # Sus chords. Not sure what to do with the associated scales. For + # now just duplicating the 2nd or 3rd in the scale seems to make sense. + + 'sus4': ((C, F, G ), + (C, D, F, F, G, A, B), + "Suspended 4th, major triad with the 3rd raised half tone."), + + '7sus': ((C, F, G, Bb ), + (C, D, F, F, G, A, Bb), + "7th with suspended 4th, dominant 7th with 3rd " + "raised half tone."), + + '7susb9': ((C, F, G, Bb, Db+12), + (C, Db, F, F, G, A, Bb), + "7th with suspended 4th and flat 9th."), + + 'sus2': ((C, D, G ), + (C, D, D, F, G, A, B), + "Suspended 2nd, major triad with the major 2nd above the " + "root substituted for 3rd."), + + '7sus2':((C, D, G, Bb ), + (C, D, D, F, G, A, Bb), + "A sus2 with dominant 7th added."), + + 'sus9': ((C, F, G, Bb, D+12), + (C, D, F, F, G, A, Bb), + "7sus plus 9th."), + + '13sus': ((C, F, G, Bb, D+12, A+12), + (C, D, F, F, G, A, Bb), + "7sus, plus 9th and 13th"), + + '13susb9': ((C, F, G, Bb, Db+12, A+12), + (C, Db, F, F, G, A, Bb), + "7sus, plus flat 9th and 13th"), + + # these chords should probably NOT have the 5th included, + # but since a number of voicings depend on the 5th being + # the third note of the chord, they're here. + + '13': ((C, E, G, Bb, A+12), + (C, D, E, F, G, A, Bb), + "7th (including 5th) plus 13th (the 9th and 11th are not voiced)."), + + '13b5': ((C, E, Gb, Bb, A+12), + (C, D, E, F, Gb, A, Bb), + "7th with flat 5th, plus 13th (the 9th and 11th are not voiced)."), + + '13#9': ((C, E, G, Bb, Ds+12, A+12), + (C, Ds, E, F, G, A, Bb), + "7th (including 5th) plus 13th and sharp 9th (11th not voiced)."), + + '13b9': ((C, E, G, Bb, Db+12, A+12), + (C, Db, E, F, G, A, Bb), + "7th (including 5th) plus 13th and flat 9th (11th not voiced)."), + + 'M13': ((C, E, G, B, A+12), + (C, D, E, F, G, A, B), + "Major 7th (including 5th) plus 13th (9th and 11th not voiced)."), + + 'm13': ((C, Eb, G, Bb, A+12), + (C, D, Eb, F, G, A, Bb), + "Minor 7th (including 5th) plus 13th (9th and 11th not voiced)."), + + '13#11': ((C, E, G, Bb, Fs+12, A+12), + (C, D, E, Fs, G, A, Bb), + "7th plus sharp 11th and 13th (9th not voiced)."), + + 'M13#11': ((C, E, G, B, Fs+12, A+12), + (C, D, E, Fs, G, A, B), + "Major 7th plus sharp 11th and 13th (9th not voiced)."), + + # Because some patterns assume that the 3rd note in a chord is a 5th, + # or a varient, we duplicate the root into the position of the 3rd ... and + # to make the sound even we duplicate the 5th into the 4th position as well. + + '5': ((C, C, G, G ), + (C, D, E, F, G, A, B), + "Altered Fifth or Power Chord; root and 5th only."), + + 'omit3add9': ((C, C, G, D+12), + (C, D, E, F, G, A, Bb), + "Triad: root, 5th and 9th."), + + '7omit3': ((C, C, G, Bb), + (C, D, E, F, G, A, Bb), + "7th with unvoiced 3rd."), + + 'm7omit5': ((C, Eb, Bb), + (C, D, Eb, F, G, A, Bb), + "Minor 7th with unvoiced 5th."), } @@ -278,44 +404,58 @@ the original. """ aliases = ( - ('aug9', '9#5' , ''), - ('69', '6(add9)', ''), - ('m69', 'm6(add9)', ''), - ('9+5', '9#5' , ''), - ('m+5', 'm#5' , ''), - ('M6', '6' , ''), - ('m7-5', 'm7b5' , ''), - ('+', 'aug' , ''), - ('+7', 'aug7' , ''), - ('#5', 'aug' , ''), - ('7-9', '7b9' , ''), - ('7+9', '7#9' , ''), - ('maj7', 'M7' , ''), - ('M7-5', 'M7b5' , ''), - ('M7+5', 'M7#5' , ''), - ('7alt', '7b5b9', ''), - ('7sus4', '7sus' , ''), - ('7#11', '9#11' , ''), - ('7+', 'aug7' , ''), - ('7+5', '7#5' , ''), - ('7-5', '7b5' , ''), - ('sus', 'sus4' , ''), - ('m(maj7)', 'mM7' , ''), - ('m+7', 'mM7' , ''), - ('min(maj7)','mM7' , ''), - ('min#7', 'mM7' , ''), - ('m#7', 'mM7' , ''), - ('dim', 'dim7' , 'A dim7, not a triad!'), - ('9sus', 'sus9' , ''), - ('9-5', '9b5' , ''), - ('dim3', 'mb5' , 'Diminished triad (non-standard notation).') - ) + ('aug9', '9#5', ''), + ('+9', '9#5', ''), + ('+9M7', 'aug9M7', ''), + ('+M7', 'M7#5', ''), + ('m(add9)', 'm(sus9)', ''), + ('69', '6(add9)', ''), + ('m69', 'm6(add9)', ''), + ('m(b5)', 'mb5', ''), + ('m7(b9)', 'm7b9', ''), + ('m7(#9)', 'm7#9', ''), + ('9+5', '9#5', ''), + ('m+5', 'm#5', ''), + ('M6', '6', ''), + ('m7-5', 'm7b5', ''), + ('m7(omit5)','m7omit5', ''), + ('+', 'aug', ''), + ('+7', 'aug7', ''), + ('7(omit3)', '7omit3', ''), + ('#5', 'aug', ''), + ('7#5b9', 'aug7b9', ''), + ('7-9', '7b9', ''), + ('7+9', '7#9', ''), + ('maj7', 'M7', ''), + ('M7-5', 'M7b5', ''), + ('M7+5', 'M7#5', ''), + ('M7(add13)','13b9', ''), + ('7alt', '7b5b9', ''), + ('7sus4', '7sus', ''), + ('7+', 'aug7', ''), + ('7#5', 'aug7', ''), + ('7+5', 'aug7', ''), + ('7-5', '7b5', ''), + ('sus', 'sus4', ''), + ('maj9', 'M9', ''), + ('maj13', 'M13', ''), + ('m(maj7)', 'mM7', ''), + ('m+7', 'mM7', ''), + ('min(maj7)','mM7', ''), + ('min#7', 'mM7', ''), + ('m#7', 'mM7', ''), + ('dim', 'dim7', 'A dim7, not a triad!'), + ('9sus', 'sus9', ''), + ('9-5', '9b5', ''), + ('dim3', 'mb5', 'Diminished triad (non-standard notation).'), + ('omit3(add9)','omit3add9', '') + ) for a,b,d in aliases: - n=_chords[b][0] - s=_chords[b][1] - if not d: - d=_chords[b][2] + n=chords[b][0] + s=chords[b][1] + if not d: + d=chords[b][2] - _chords[a] = (n, s, d) + chords[a] = (n, s, d) diff --git a/mma/MMA/common.py b/mma/MMA/common.py index 54e8c2f..b50865e 100644 --- a/mma/MMA/common.py +++ b/mma/MMA/common.py @@ -19,13 +19,13 @@ 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 +Bob van der Poel These are a collection of miscellaneous routines used in various parts of MMA. It is safe to load the whole works with: - from MMA.common import * + from MMA.common import * without side effects (yeah, right). @@ -38,136 +38,136 @@ import gbl class struct: - pass + pass def error(msg): - """ Print an error message and exit. + """ Print an error message and exit. - If the global line number is >=0 then print the line number - as well. - """ + If the global line number is >=0 then print the line number + as well. + """ - ln = "" - if gbl.lineno >= 0: - ln += "" % gbl.lineno + ln = "" + if gbl.lineno >= 0: + ln += "" % gbl.lineno - if gbl.inpath: - ln += "" % gbl.inpath.fname + if gbl.inpath: + ln += "" % gbl.inpath.fname - if ln: - ln += '\n' + if ln: + ln += '\n' - print "ERROR:%s %s" % (ln, msg) + print "ERROR:%s %s" % (ln, msg) - sys.exit(1) + sys.exit(1) def warning(msg): - """ Print warning message and return. """ + """ Print warning message and return. """ - if gbl.noWarn: - return + if gbl.noWarn: + return - ln = "" + ln = "" - if gbl.lineno >= 0: - ln = "" % gbl.lineno + if gbl.lineno >= 0: + ln = "" % gbl.lineno - if gbl.inpath: - ln += "" % gbl.inpath.fname + if gbl.inpath: + ln += "" % gbl.inpath.fname - print "Warning:%s\n %s" % (ln, msg) + print "Warning:%s\n %s" % (ln, msg) def getOffset(ticks, ran=None): - """ Calculate a midi offset into a song. + """ Calculate a midi offset into a song. - ticks == offset into the current bar. - ran == random adjustment from RTIME + ticks == offset into the current bar. + ran == random adjustment from RTIME - When calculating the random factor the test ensures - that a note never starts before the start of the bar. - This is important ... voice changes, etc. will be - buggered if we put the voice change after the first - note-on event. - """ + When calculating the random factor the test ensures + that a note never starts before the start of the bar. + This is important ... voice changes, etc. will be + buggered if we put the voice change after the first + note-on event. + """ - p = gbl.tickOffset + int(ticks) # int() cast is important! + p = gbl.tickOffset + int(ticks) # int() cast is important! - if ran: - r = randrange( -ran, ran+1 ) - if ticks == 0 and r < 0: - r=0 - p+=r + if ran: + r = randrange( -ran, ran+1 ) + if ticks == 0 and r < 0: + r=0 + p+=r - return p + return p def stoi(s, errmsg=None): - """ string to integer. """ + """ string to integer. """ - try: - return int(s, 0) - except: - if errmsg: - error(errmsg) - else: - error("Expecting integer value, not %s" % s) + try: + return int(s, 0) + except: + if errmsg: + error(errmsg) + else: + error("Expecting integer value, not %s" % s) def stof(s, errmsg=None): - """ String to floating point. """ + """ String to floating point. """ - try: - return float(s) - except: - if errmsg: - error(errmsg) - else: - error("Expecting a value, not %s" % s) + try: + return float(s) + except: + if errmsg: + error(errmsg) + else: + error("Expecting a value, not %s" % s) def printList(l): - """ Print each item in a list. Works for numeric and string.""" + """ Print each item in a list. Works for numeric and string.""" - for a in l: - print a, - print + for a in l: + print a, + print def pextract(s, open, close, onlyone=None): - """ Extract a parenthesized set of substrings. + """ 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' ] ) - """ + """ - subs =[] - while 1: - lstart = s.find(open) - lend = s.find(close) + subs =[] + while 1: + lstart = s.find(open) + lend = s.find(close) - if lstart>-1 and lstart < lend: - subs.append( s[lstart+len(open):lend].strip() ) - s = s[:lstart] + s[lend+len(close):] - if onlyone: - break - else: - break + if lstart>-1 and lstart < lend: + subs.append( s[lstart+len(open):lend].strip() ) + s = s[:lstart] + s[lend+len(close):] + if onlyone: + break + else: + break - return s.strip(), subs + return s.strip(), subs diff --git a/mma/MMA/docs.py b/mma/MMA/docs.py index 42f73e5..d268e2c 100644 --- a/mma/MMA/docs.py +++ b/mma/MMA/docs.py @@ -19,7 +19,7 @@ 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 +Bob van der Poel """ @@ -32,47 +32,47 @@ import MMA.midiC def docDrumNames(order): - """ Print LaTex table of drum names. """ + """ Print LaTex table of drum names. """ - notenames = ['E\\flat', 'E', 'F', 'G\\flat', 'G', 'A\\flat', - 'A', 'B\\flat', 'B', 'C', 'D\\flat', 'D'] * 5 + notenames = ['E\\flat', 'E', 'F', 'G\\flat', 'G', 'A\\flat', + 'A', 'B\\flat', 'B', 'C', 'D\\flat', 'D'] * 5 - n=zip( MMA.midiC.drumNames, range(27,len(MMA.midiC.drumNames)+27), notenames ) + n=zip( MMA.midiC.drumNames, range(27,len(MMA.midiC.drumNames)+27), notenames ) - if order == "a": - for a,v,m in sorted(n): - print "\\insline{%s} {%s$^{%s}$}" % (a, v, m ) + if order == "a": + for a,v,m in sorted(n): + print "\\insline{%s} {%s$^{%s}$}" % (a, v, m ) - else: - for a,v,m in n: - print "\\insline{%s} {%s$^{%s}$}" % (v, a, m) + else: + for a,v,m in n: + print "\\insline{%s} {%s$^{%s}$}" % (v, a, m) def docCtrlNames(order): - """ Print LaTex table of MIDI controller names. """ + """ Print LaTex table of MIDI controller names. """ - n=zip( MMA.midiC.ctrlNames, range(len(MMA.midiC.ctrlNames)) ) + n=zip( MMA.midiC.ctrlNames, range(len(MMA.midiC.ctrlNames)) ) - if order == "a": - for a,v in sorted(n): - print "\\insline{%s} {%02x}" % (a, v) + if order == "a": + for a,v in sorted(n): + print "\\insline{%s} {%02x}" % (a, v) - else: - for a,v in n: - print "\\insline{%02x} {%s}" % (v, a) + else: + for a,v in n: + print "\\insline{%02x} {%s}" % (v, a) def docInstNames(order): - """ Print LaTex table of instrument names. """ + """ Print LaTex table of instrument names. """ - n=zip( MMA.midiC.voiceNames, range(len(MMA.midiC.voiceNames)) ) - if order == "a": - for a,v in sorted(n): - a=a.replace('&', '\&') - print "\\insline{%s} {%s}" % (a, v) + n=zip( MMA.midiC.voiceNames, range(len(MMA.midiC.voiceNames)) ) + if order == "a": + for a,v in sorted(n): + a=a.replace('&', '\&') + print "\\insline{%s} {%s}" % (a, v) - else: - for a,v in n: - a=a.replace('&', '\&') - print "\\insline{%s} {%s}" % (v, a) + else: + for a,v in n: + a=a.replace('&', '\&') + print "\\insline{%s} {%s}" % (v, a) """ Whenever MMA encounters a DOC command, or if it defines @@ -91,129 +91,166 @@ fname = '' author="" notes="" defs=[] +variables=[] def docAuthor(ln): - global author + global author - author = ' '.join(ln) + author = ' '.join(ln) def docNote(ln): - """ Add a doc line. """ + """ Add a doc line. """ - global fname, notes + global fname, notes - if not gbl.docs or not ln: - return + if not gbl.docs or not ln: + return - # Grab the arg and data, save it + # Grab the arg and data, save it - fname = os.path.basename(gbl.inpath.fname) - if notes: - notes += ' ' - notes += ' '.join(ln) + fname = os.path.basename(gbl.inpath.fname) + if notes: + notes += ' ' + notes += ' '.join(ln) + +def docVars(ln): + """ Add a VARIABLE line (docs vars used in lib file).""" + + global fname, variables + + if not gbl.docs or not ln: + return + + fname = os.path.basename(gbl.inpath.fname) + variables.append([ln[0], ' '.join(ln[1:]) ] ) def docDefine(ln): - """ Save a DEFGROOVE comment string. + """ 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]...]] ...] - """ + """ - global defs + global defs - l = [ ln[0], gbl.seqSize, ' '.join(ln[1:]) ] - for a in sorted(gbl.tnames.keys()): - c=gbl.tnames[a] - if c.sequence and len(c.sequence) != c.sequence.count(None): - if c.vtype=='DRUM': - v=MMA.midiC.valueToDrum(c.toneList[0]) - else: - v=MMA.midiC.valueToInst(c.voice[0]) - l.append( [c.name, v ] ) + l = [ ln[0], gbl.seqSize, ' '.join(ln[1:]) ] + for a in sorted(gbl.tnames.keys()): + c=gbl.tnames[a] + if c.sequence and len(c.sequence) != c.sequence.count(None): + if c.vtype=='DRUM': + v=MMA.midiC.valueToDrum(c.toneList[0]) + else: + v=MMA.midiC.valueToInst(c.voice[0]) + l.append( [c.name, v ] ) - defs.append(l) + defs.append(l) def docDump(): - """ Print the LaTex docs. """ + """ Print the LaTex docs. """ - global fname, author, notes, defs + global fname, author, notes, defs, variables - if gbl.docs == 1: # latex docs - if notes: - if fname.endswith(gbl.ext): - fname='.'.join(fname.split('.')[:-1]) - print "\\filehead{%s}{%s}" % (totex(fname), totex(notes)) - print + if gbl.docs == 1: # latex docs + if notes: + if fname.endswith(gbl.ext): + fname='.'.join(fname.split('.')[:-1]) + print "\\filehead{%s}{%s}" % (totex(fname), totex(notes)) + print - if defs: - for l in defs: - print " \\instable{%s}{%s}{%s}{" % \ - (totex(l[0]), totex(l[2]), l[1] ) - for c,v in l[3:]: - print " \\insline{%s}{%s}" % (c.title(), totex(v)) - print " }" + if variables: + print " \\variables{" + for l in variables: + print " \\insvar{%s}{%s}" % ( totex(l[0]), totex(l[1]) ) + print " }" + print - if gbl.docs == 2: # html docs - if notes: - print '' % time.ctime() - print '' - print '' - if fname.endswith(gbl.ext): - fname='.'.join(fname.split('.')[:-1]) - print "

%s

" % fname.title() - print "

%s" % notes - if defs: - print "

    " - for l in defs: - print "
  • %s" % (l[0], l[0]) - print "
" - for l in defs: - print '' % l[0] - print '

' - print '' - print ' ' - print ' ' - print '
' - print '

%s

' % l[0] - print ' %s (%s) ' % ( l[2], l[1] ) - print '
' - print ' ' - for c,v in l[3:]: - print " " % (c.title(), v) - print '
%s %s
' - print '
' - print - print '' - defs = [] - notes = "" - author = "" + if defs: + for l in defs: + print " \\instable{%s}{%s}{%s}{" % \ + (totex(l[0]), totex(l[2]), l[1] ) + for c,v in l[3:]: + print " \\insline{%s}{%s}" % (c.title(), totex(v)) + print " }" + + if gbl.docs == 2: # html docs + if notes: + print '' % time.ctime() + print '' + print '' + if fname.endswith(gbl.ext): + fname='.'.join(fname.split('.')[:-1]) + print "

%s

" % fname.title() + print "

%s" % notes + + if variables: + print "

" + print '' + print ' ' + print ' ' + print '
' + print '

Variables

' + print '
' + print ' ' + for l in variables: + print " " + print " " % l[0] + print " " % l[1] + print " " + print '
%s %s
' + print '
' + + if defs: + print "

    " + for l in defs: + print "
  • %s" % (l[0], l[0]) + print "
" + for l in defs: + print '' % l[0] + print '' + print ' ' + print ' ' + print '
' + print '

%s

' % l[0] + print ' %s (%s) ' % ( l[2], l[1] ) + print '
' + print ' ' + for c,v in l[3:]: + print " " % (c.title(), v) + print '
%s %s
' + print '
' + print + print '' + defs = [] + variables=[] + notes = "" + author = "" def totex(s): - """ Parse a string and quote tex stuff. + """ Parse a string and quote tex stuff. - Also handles proper quotation style. - """ + Also handles proper quotation style. + """ - s = s.replace("$", "\\$") - s = s.replace("*", "$*$") - s = s.replace("\\", "\\\\") - s = s.replace("#", "\\#") - s = s.replace("&", "\\&") + s = s.replace("$", "\$") + s = s.replace("*", "$*$") + s = s.replace("_", "\\_") + #s = s.replace("\\", "\\\\") + s = s.replace("#", "\\#") + s = s.replace("&", "\\&") - q="``" - while s.count('"'): - i=s.find('"') - s=s[:i] + q + s[i+1:] - if q=="``": - q="''" - else: - a="``" + q="``" + while s.count('"'): + s=s.replace('"', q, 1) + if q=="``": + q="''" + else: + q="``" - return s + return s diff --git a/mma/MMA/file.py b/mma/MMA/file.py index bac7967..cd0cc0d 100644 --- a/mma/MMA/file.py +++ b/mma/MMA/file.py @@ -19,11 +19,10 @@ 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 +Bob van der Poel """ - import sys import os @@ -31,38 +30,38 @@ import gbl from MMA.common import * def locFile(name, lib): - """ Locate a filename. + """ 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 - exists = os.path.exists + ext=gbl.ext + exists = os.path.exists - name=os.path.expanduser(name) # for ~ expansion only + name=os.path.expanduser(name) # for ~ expansion only - if lib: - if not name.endswith(ext): - t=os.path.join(lib, name + ext) - if exists(t): - return t - t=os.path.join(lib, name) - if exists(t): - return t + if lib: + if not name.endswith(ext): + t=os.path.join(lib, name + ext) + if exists(t): + return t + t=os.path.join(lib, name) + if exists(t): + return t - if not name.endswith(ext): - t = name + ext - if exists(t): - return t + if not name.endswith(ext): + t = name + ext + if exists(t): + return t - if exists(name): - return name + if exists(name): + return name - return None + return None ########################### @@ -72,241 +71,241 @@ def locFile(name, lib): 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. - """ + class FileData: + """ After reading the file in bulk it is parsed and stored in this + data structure. Blanks lines and comments are removed. + """ - def __init__(self, lnum, data, label): - self.lnum=lnum - self.data=data - self.label=label + def __init__(self, lnum, data, label): + self.lnum=lnum + self.data=data + self.label=label - def __init__(self, fname): + def __init__(self, fname): - self.fdata=fdata=[] - self.lastline = None - self.lineptr = None - self.fname = None + self.fdata=fdata=[] + self.lastline = None + self.lineptr = None + self.fname = None - self.que = [] # que for pushed lines (mainly for REPEAT) - self.qnums = [] + self.que = [] # que for pushed lines (mainly for REPEAT) + self.qnums = [] - dataStore = self.FileData # shortcut to avoid '.'s + dataStore = self.FileData # shortcut to avoid '.'s - try: - inpath = file(fname, 'r') + try: + inpath = file(fname, 'r') - except: - error("Unable to open '%s' for input" % fname) + except: + error("Unable to open '%s' for input" % fname) - if gbl.debug or gbl.showFilenames: - print "Opening file '%s'." % fname + if gbl.debug or gbl.showFilenames: + print "Opening file '%s'." % fname - self.fname = fname + self.fname = fname - """ Read entire file, line by line: + """ Read entire file, line by line: - - strip off blanks, comments - - join continuation lines - - parse out LABELS - - create line numbers - """ + - strip off blanks, comments + - join continuation lines + - parse out LABELS + - create line numbers + """ - lcount=0 - label='' - labs=[] # track label defs, error if duplicate in same file - nlabs=[] # track linenumber label defs + lcount=0 + label='' + labs=[] # track label defs, error if duplicate in same file + nlabs=[] # track linenumber label defs - while 1: - l = inpath.readline() + while 1: + l = inpath.readline() - if not l: # EOF - break + if not l: # EOF + break - l= l.strip() - lcount += 1 + l= l.strip() + lcount += 1 - if not l: - continue + if not l: + continue - while l[-1] == '\\': - l = l[0:-1] + ' ' + inpath.readline().strip() - lcount +=1 + while l[-1] == '\\': + l = l[0:-1] + ' ' + inpath.readline().strip() + lcount +=1 - """ This next line splits the line at the first found - comment '//', drops the comment, and splits the - remaining line into tokens using whitespace delimiters. - Note that split() will strip off trailing and leading - spaces, so a strip() is not needed here. - """ + """ This next line splits the line at the first found + comment '//', drops the comment, and splits the + remaining line into tokens using whitespace delimiters. + Note that split() will strip off trailing and leading + spaces, so a strip() is not needed here. + """ - l = l.split('//',1)[0].split() + l = l.split('//',1)[0].split() - if not l: - continue + if not l: + continue - """ Parse out label lines. There are 2 different kinds of labels: - - LABEL XXX - and - - NNN + """ Parse out label lines. There are 2 different kinds of labels: + - LABEL XXX + and + - NNN - The first kind is treated as an exclusive. If a NNN label or previous - XXX duplicates, and error is generated. + The first kind is treated as an exclusive. If a NNN label or previous + XXX duplicates, and error is generated. - The LINE NUMBER type is not exclusive. If a duplicate NNN is found, the - last one is used. + The LINE NUMBER type is not exclusive. If a duplicate NNN is found, the + last one is used. - XXX NNN types can not duplicate each other. + XXX NNN types can not duplicate each other. - Also note that XXX lines are stripped from input as well as NNN lines - with only a NNN. - """ + Also note that XXX lines are stripped from input as well as NNN lines + with only a NNN. + """ - if l[0].upper()=='LABEL': - if len(l) !=2: - gbl.lineno = lcount - error("Usage: LABEL ") - label=l[1].upper() - if label[0]=='$': - gbl.lineno = lcount - error("Variables are not permitted as labels") - if label in labs: - gbl.lineno = lcount - error("Duplicate label specified in line %s." % lcount) - elif label in nlabs: - gbl.lineno = lcount - error("Label '%s' duplicates line number label" % label) - labs.append(label) + if l[0].upper()=='LABEL': + if len(l) !=2: + gbl.lineno = lcount + error("Usage: LABEL ") + label=l[1].upper() + if label[0]=='$': + gbl.lineno = lcount + error("Variables are not permitted as labels") + if label in labs: + gbl.lineno = lcount + error("Duplicate label specified in line %s" % lcount) + elif label in nlabs: + gbl.lineno = lcount + error("Label '%s' duplicates line number label" % label) + labs.append(label) - elif l[0].isdigit(): - label=l[0] + elif l[0].isdigit(): + label=l[0] - if label in labs: - gbl.lineno = lcount - error("Line number '%s' duplicates LABEL." % label) + if label in labs: + gbl.lineno = lcount + error("Line number '%s' duplicates LABEL" % label) - if not label in nlabs: - nlabs.append(label) - else: - for i, a in enumerate(fdata): - if a.label == label: - fdata[i].label='' + if not label in nlabs: + nlabs.append(label) + else: + for i, a in enumerate(fdata): + if a.label == label: + fdata[i].label='' - else: - label = None + else: + label = None - # Save the line, linenumber and (maybe) the label. + # Save the line, linenumber and (maybe) the label. - fdata.append( dataStore(lcount, l, label)) + fdata.append( dataStore(lcount, l, label)) - inpath.close() + inpath.close() - self.lineptr = 0 - self.lastline = len(fdata) + self.lineptr = 0 + self.lastline = len(fdata) - def toEof(self): - """ Move pointer to End of File. """ + def toEof(self): + """ Move pointer to End of File. """ - self.lineptr=self.lastline+1 - self.que = [] - self.qnums = [] + self.lineptr=self.lastline+1 + self.que = [] + self.qnums = [] - def goto(self, l): - """ Do a goto jump. + 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. - """ + """ - if not l: - error("No label specified") + if not l: + error("No label specified") - if self.que: - self.que=[] + if self.que: + self.que=[] - for i,a in enumerate(self.fdata): - if a.label == l: - self.lineptr=i - return + for i,a in enumerate(self.fdata): + if a.label == l: + self.lineptr=i + return - error("Label '%s' has not be set." % l) + error("Label '%s' has not be set" % l) - def push(self, q, nums): - """ Push a list of lines back into the input stream. + 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: - self.que = [''] - self.qnums=[gbl.lineno] + if not self.que: + self.que = [''] + self.qnums=[gbl.lineno] - q.reverse() - self.que.extend(q) - q.reverse() + q.reverse() + self.que.extend(q) + q.reverse() - nums.reverse() - self.qnums.extend(nums) - nums.reverse() + nums.reverse() + self.qnums.extend(nums) + nums.reverse() - def read(self): - """ Return a line. + 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: + while 1: - # Return a queued line if possible. + # Return a queued line if possible. - if self.que: - ln = self.que.pop(-1) + if self.que: + ln = self.que.pop(-1) - gbl.lineno = self.qnums.pop() + gbl.lineno = self.qnums.pop() - if not ln: - continue + if not ln: + continue - return ln + return ln - # Return the next line in the file. + # Return the next line in the file. - if self.lineptr>=self.lastline: - return None #### EOF + if self.lineptr>=self.lastline: + return None #### EOF - ln=self.fdata[self.lineptr].data - gbl.lineno = self.fdata[self.lineptr].lnum - self.lineptr +=1 + ln=self.fdata[self.lineptr].data + gbl.lineno = self.fdata[self.lineptr].lnum + self.lineptr +=1 - return ln + return ln diff --git a/mma/MMA/gbl.py b/mma/MMA/gbl.py index 53faa4d..4a22d18 100644 --- a/mma/MMA/gbl.py +++ b/mma/MMA/gbl.py @@ -18,47 +18,47 @@ 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 +Bob van der Poel """ import os -version = "1.0-rc2" # Version -- Oct 15/2006 +version = "1.1" # Version -- March 7/2007 """ mtrks is storage for the MIDI data as it is created. It is a dict of class Mtrk() instances. Keys are the - midi channel numbers. Ie, mtrks[2] is for channel 2, - etc. mtrks[0] is for the meta stuff. + midi channel numbers. Ie, mtrks[2] is for channel 2, + etc. mtrks[0] is for the meta stuff. """ mtrks = {} """ tnames is a dict of assigned track names. The keys are the track names; each entry is a pattern class instance. - We have tnames['BASS-FOO'], etc. + We have tnames['BASS-FOO'], etc. """ tnames = {} """ midiAssigns keeps track of channel/track assignments. The keys are midi channels (1..16), the data is a list of tracks assigned - to each channel. The tracks are only added, not deleted. Right - now this is only used in -c reporting. + to each channel. The tracks are only added, not deleted. Right + now this is only used in -c reporting. """ midiAssigns={} for c in range(0,17): - midiAssigns[c]=[] + midiAssigns[c]=[] """ midiAvail is a list with each entry representing a MIDI channel. As channels are allocated/deallocated the appropriated slot - is inc/decremented. + is inc/decremented. """ midiAvail=[ 0 ] * 17 # slots 0..16, slot 0 is not used. -deletedTracks = [] # list of deleted tracks for -c report +deletedTracks = [] # list of deleted tracks for -c report """ This is a user constructed list of names/channels. The keys are names, data is a channel. Eg. midiChPrefs['BASS-SUS']==9 @@ -71,74 +71,76 @@ midiChPrefs={} """ Groove storage. Each entry in settingsGroove{} has a keyname of a saved groove. - lastGroove and currentGroove are used by macros + lastGroove and currentGroove are used by macros """ -settingsGroove = {} +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] + 1 - set + 2 - set for specific tracks, track list starts at position [1] """ -seqRnd = [0] # set if SEQRND has been set +seqRnd = [0] # set if SEQRND has been set ############# String constants #################### -ext = ".mma" # extension for song/lib files. +ext = ".mma" # extension for song/lib files. ############## Tempo, and other midi positioning. ############# -BperQ = 192 # midi ticks per quarter note -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 +BperQ = 192 # midi ticks per quarter note +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 -transpose = 0 # Transpose is global (ignored by drum tracks) +transpose = 0 # Transpose is global (ignored by drum tracks) -lineno = -1 # used for error reporting +lineno = -1 # used for error reporting 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 + ############# Path and search variables. ############# libPath = '' -for p in ( "c:\\mma\\lib", "/usr/local/share/mma/lib", "/usr/share/mma/lib", "./lib"): - if os.path.isdir(p): - libPath=p - break +for p in ( "c:\\mma\\lib", "/usr/local/share/mma/lib", "/usr/share/mma/lib", "./lib"): + if os.path.isdir(p): + libPath=p + break incPath = '' for p in ( "c:\\mma\\includes", "/usr/local/share/mma/includes", - "/usr/share/mma/includes", "./includes"): - if os.path.isdir(p): - incPath=p - break + "/usr/share/mma/includes", "./includes"): + if os.path.isdir(p): + incPath=p + break autoLib = 'stdlib' -outPath = '' # Directory for MIDI file -mmaStart = [] # list of START files -mmaEnd = [] # list of END files -mmaRC = None # user specified RC file, overrides defaults -inpath = None # input file +outPath = '' # Directory for MIDI file +mmaStart = [] # list of START files +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. ############# @@ -146,24 +148,24 @@ runningStatus = 1 # running status enabled """ These variables are all set from the command line in MMA.opts.py. It's a bit of an easy-way-out to have them all here, but I don't think - it hurts too much. + it hurts too much. """ -debug = Ldebug = 0 -pshow = Lpshow = 0 -seqshow = Lseqshow = 0 -showrun = Lshowrun = 0 -noWarn = LnoWarn = 0 -noOutput = LnoOutput = 0 -showExpand = LshowExpand = 0 -showFilenames = LshowFilenames = 0 -chshow = Lchshow = 0 +debug = Ldebug = 0 +pshow = Lpshow = 0 +seqshow = Lseqshow = 0 +showrun = Lshowrun = 0 +noWarn = LnoWarn = 0 +noOutput = LnoOutput = 0 +showExpand = LshowExpand = 0 +showFilenames = LshowFilenames = 0 +chshow = Lchshow = 0 -outfile = None -infile = None -docs = 0 -maxBars = 500 -makeGrvDefs = 0 -cmdSMF = None +outfile = None +infile = None +docs = 0 +maxBars = 500 +makeGrvDefs = 0 +cmdSMF = None diff --git a/mma/MMA/harmony.py b/mma/MMA/harmony.py index 90aa450..2ef8188 100644 --- a/mma/MMA/harmony.py +++ b/mma/MMA/harmony.py @@ -19,7 +19,7 @@ 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 +Bob van der Poel """ @@ -29,110 +29,110 @@ from MMA.common import * def harmonize(hmode, note, chord): - """ Get harmony note(s) for given chord. """ + """ Get harmony note(s) for given chord. """ - hnotes = [] + hnotes = [] - for tp in hmode.split('+'): + for tp in hmode.split('+'): - if tp in ('2', '2BELOW'): - hnotes.append( gethnote(note, chord) ) + if tp in ('2', '2BELOW'): + hnotes.append( gethnote(note, chord) ) - elif tp == '2ABOVE': - hnotes.append( gethnote(note, chord)+12 ) + elif tp == '2ABOVE': + hnotes.append( gethnote(note, chord)+12 ) - elif tp in ( '3', '3BELOW'): - a = gethnote(note, chord) - b = gethnote(a, chord) - hnotes.extend( [a, b] ) + elif tp in ( '3', '3BELOW'): + a = gethnote(note, chord) + b = gethnote(a, chord) + hnotes.extend( [a, b] ) - elif tp == '3ABOVE': - a = gethnote(note, chord) - b = gethnote(a, chord) - hnotes.extend( [a+12, b+12] ) + elif tp == '3ABOVE': + a = gethnote(note, chord) + b = gethnote(a, chord) + hnotes.extend( [a+12, b+12] ) - elif tp in ('OPEN', "OPENBELOW"): - a=gethnote(note, chord) - hnotes.append( gethnote(a, chord)) + elif tp in ('OPEN', "OPENBELOW"): + a=gethnote(note, chord) + hnotes.append( gethnote(a, chord)) - elif tp == 'OPENABOVE': - a=gethnote(note, chord) - hnotes.append( gethnote(a, chord) + 12 ) + elif tp == 'OPENABOVE': + a=gethnote(note, chord) + hnotes.append( gethnote(a, chord) + 12 ) - elif tp in ('8', '8BELOW'): - hnotes.append( note - 12 ) + elif tp in ('8', '8BELOW'): + hnotes.append( note - 12 ) - elif tp == '8ABOVE': - hnotes.append( note + 12 ) + elif tp == '8ABOVE': + hnotes.append( note + 12 ) - elif tp in ('16', '16BELOW'): - hnotes.append( note - (2 * 12) ) + elif tp in ('16', '16BELOW'): + hnotes.append( note - (2 * 12) ) - elif tp == '16ABOVE': - hnotes.append( note + (2 * 12) ) + elif tp == '16ABOVE': + hnotes.append( note + (2 * 12) ) - elif tp in ('24', '24BELOW'): - hnotes.append( note - (3 * 12) ) + elif tp in ('24', '24BELOW'): + hnotes.append( note - (3 * 12) ) - elif tp == '24ABOVE': - hnotes.append( note + (3 * 12) ) - else: - error("Unknown harmony type '%s'." % tp) + elif tp == '24ABOVE': + hnotes.append( note + (3 * 12) ) + else: + error("Unknown harmony type '%s'" % tp) - """ Strip out duplicate notes from harmony list. Cute trick here, - we use the note values as keys for a new dictionary, assign - a null value, and return the list of keys. - """ + """ Strip out duplicate notes from harmony list. Cute trick here, + we use the note values as keys for a new dictionary, assign + a null value, and return the list of keys. + """ - return dict([(i, None) for i in hnotes]).keys() + return dict([(i, None) for i in hnotes]).keys() def gethnote(note, chord): - """ Determine harmony notes for a note based on the 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 " + \ - "0 which will sound bad." + wm="No harmony note found since no chord, using note " + \ + "0 which will sound bad" - if not chord: # should never happen! - warning(wm) - return 0 + if not chord: # should never happen! + warning(wm) + return 0 - ch = list(chord) # copy chord and sort - ch.sort() + ch = list(chord) # copy chord and sort + ch.sort() - # ensure that the note is in the chord + # ensure that the note is in the chord - while ch[-1] < note: - for i,n in enumerate(ch): - ch[i]+=12 + while ch[-1] < note: + for i,n in enumerate(ch): + ch[i]+=12 - while ch[0] >= note: - for i,v in enumerate(ch): - ch[i]-=12 + while ch[0] >= note: + for i,v in enumerate(ch): + ch[i]-=12 - # get one lower than the note + # get one lower than the note - while 1: - if not ch: # this probably can't happen - warning(wm) - return 0 + while 1: + if not ch: # this probably can't happen + warning(wm) + return 0 - h=ch.pop() - if h - +Bob van der Poel + """ import gbl @@ -29,320 +29,320 @@ from MMA.common import * class Lyric: - textev = None # set if TEXT EVENTS (not recommended) - barsplit = None # set if lyrics NOT split into sep. events for bar - versenum = 1 # current verse number of lyric - dupchords = 0 # set if we want chords as lyric events - transpose = 0 # tranpose chord names (for dupchords only) - - pushedLyrics = [] + textev = None # set if TEXT EVENTS (not recommended) + barsplit = None # set if lyrics NOT split into sep. events for bar + versenum = 1 # current verse number of lyric + dupchords = 0 # set if we want chords as lyric events + transpose = 0 # tranpose chord names (for dupchords only) - transNames = ( ('C', 'Db', 'D', 'Eb', 'E', 'F', 'Gb', 'G', 'Ab', 'A', 'Bb', 'B'), - ('C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#', 'A', 'A#', 'B')) - - transKey = 0 # 0==flat, 1=sharp - - chordnames={ - 'B#': 0, 'C' : 0, 'C#': 1, 'Db': 1, - 'D' : 2, 'D#': 3, 'Eb': 3, 'E' : 4, - 'Fb': 4, 'E#': 5, 'F' : 5, 'F#': 6, - 'Gb': 6, 'G' : 7, 'G#': 8, 'Ab': 8, - 'A' : 9, 'A#': 10,'Bb': 10,'B' : 11, - 'Cb':11 } + pushedLyrics = [] - - def __init__(self): - pass - + transNames = ( ('C', 'Db', 'D', 'Eb', 'E', 'F', 'Gb', 'G', 'Ab', 'A', 'Bb', 'B'), + ('C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#', 'A', 'A#', 'B')) - def setting(self): - """ Called from macro. """ + transKey = 0 # 0==flat, 1=sharp - a="Event=" - - if self.textev: a+="Text" - else: a+="Lyric" - - a+=" Split=" - if self.barsplit: a+="Bar" - else: a+="Normal" - - a += " Verse=%s" % self.versenum - - a += " Chords=" - if self.dupchords: a+="On" - else: a+="Off" - - a += " Transpose=%s" % self.transpose - - a += " CNames=" - if self.transKey: a+="Sharp" - else: a+="Flat" - - return a - - - def option(self, ln): - """ Set a lyric option. """ - - for i, l in enumerate(ln): - l=l.upper() - - # Single word options - - if l.upper()=="SET": - - if i>=len(ln): - s='' - else: - s=' '.join(ln[i+1:]).strip() - - if not s.startswith('['): - s = '[' + s + ']' - - self.pushedLyrics.append(s) - - break - - - # All the rest are OPT=VALUE pairs - - try: - a,v = l.split('=') - except: - error("Lyric options must be in CMD=VALUE pairs.") - - - if a == 'EVENT': - if v == 'TEXT': - self.textev = 1 - warning ("Lyric: Placing lyrics as TEXT EVENTS is not recommended.") - - elif v == 'LYRIC': - self.textev = None - if gbl.debug: - print "Lyric: lyrics set as LYRIC events." - - else: - error("Valid options for Lyric Event are TEXT or LYRIC.") - - - elif a == 'SPLIT': - if v == 'BAR': - self.barsplit = 1 - if gbl.debug: - print "Lyric: lyrics distributed thoughout bar." - - elif v == 'NORMAL': - self.barsplit = None - if gbl.debug: - print "Lyric: lyrics appear as one per bar." - - else: - error("Valid options for Lyric Split are BAR or NORMAL.") - - - elif a == 'VERSE': - if v.isdigit(): - self.versenum = int(v) - - elif v == 'INC': - self.versenum += 1 - - elif v == 'DEC': - self.versenum -= 1 - - else: - error("Valid options of Lyric Verse are or INC or DEC.") - - if self.versenum < 1: - error("Attempt to set Lyric Verse to %s. Values " - "must be > 0." % self.versenum) - - if gbl.debug: - print "Lyric: verse number set to %s" % self.versenum + chordnames={ + 'B#': 0, 'C' : 0, 'C#': 1, 'Db': 1, + 'D' : 2, 'D#': 3, 'Eb': 3, 'E' : 4, + 'Fb': 4, 'E#': 5, 'F' : 5, 'F#': 6, + 'Gb': 6, 'G' : 7, 'G#': 8, 'Ab': 8, + 'A' : 9, 'A#': 10,'Bb': 10,'B' : 11, + 'Cb':11 } - elif a == 'CHORDS': - if v in ('1', 'ON'): - self.dupchords = 1 - if gbl.debug: - print "Lyric: chords are duplicated as lyrics." - - elif v in ('0', 'OFF'): - self.dupchords = 0 - if gbl.debug: - print "Lyric: chords are NOT duplicated as lyrics." - - else: - error ("Expecting 'ON' or 'OFF' in Lyric directive, not 'CHORDS=%s'" % v) - - elif a == 'TRANSPOSE': - - v = stoi(v, "Lyric Tranpose expecting value, not %s" % v) - - if v < -12 or v > 12: - error("Lyric Tranpose %s out-of-range; must be -12..12." % v) - - self.transpose = v - - elif a == 'CNAMES': - - if v in ('#', 'SHARP'): - self.transKey = 1 - elif v in ('B', '&', 'FLAT'): - self.transKey = 0 - - else: - error("Lyric CNames expecting 'Sharp' or 'Flat', not '%s'" % v ) - - else: - error("Usage: Lyric expecting EVENT, SPLIT, VERSE, CHORDS, TRANSPOSE, CNAMES or SET, " - "not '%s'" % a ) + def __init__(self): + pass - - + def setting(self): + """ Called from macro. """ - def leftovers(self): - """ Just report leftovers on stack.""" - - if self.pushedLyrics: - warning("Lyrics remaining on stack.") + a="Event=" - - def extract(self, ln, rpt): - """ Extract lyric info from a chord line and place in META track. - - Returns line and lyric as 2 strings. + if self.textev: a+="Text" + else: a+="Lyric" - The lyric is returned for debugging purposes, but it has been - processed and inserted into the MIDI track. - """ - - a=ln.count('[') - b=ln.count(']') - - if a != b: - error("Mismatched []s for lyrics found in chord line.") - - if self.pushedLyrics: - if a or b: - error("Lyrics not permitted inline and as LYRIC SET") + a+=" Split=" + if self.barsplit: a+="Bar" + else: a+="Normal" - - ln = ln + self.pushedLyrics.pop(0) - a=b=1 # flag that we have lyrics, count really doesn't matter - - - if rpt > 1: - if self.dupchords: - error("Chord to lyrics not supported with bar repeat.") - elif a or b: - error("Bars with both repeat count and lyrics are not permitted.") + a += " Verse=%s" % self.versenum + + a += " Chords=" + if self.dupchords: a+="On" + else: a+="Off" + + a += " Transpose=%s" % self.transpose + + a += " CNames=" + if self.transKey: a+="Sharp" + else: a+="Flat" + + return a - ln, lyrics = pextract(ln, '[', ']') - + def option(self, ln): + """ Set a lyric option. """ - """ If the CHORDS=ON option is set, make a copy of the chords and - insert as lyric. This permits illegal chord lines, but they will - be caught by the parser. - """ - - if self.dupchords: - ly = [] - - 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:] + for i, l in enumerate(ln): + l=l.upper() - 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 - - else: - cn=v[0:1] - if self.chordnames.has_key(cn): - tr=self.chordnames[cn] + self.transpose + # Single word options - while tr>=12: tr-=12 - while tr<=-12: tr+=12 + if l.upper()=="SET": - if tr: - v = self.transNames[self.transKey][tr] + v[len(cn):] + if i>=len(ln): + s='' + else: + s=' '.join(ln[i+1:]).strip() - - ly.append(v) + if not s.startswith('['): + s = '[' + s + ']' - i=gbl.QperBar - len(ly) - if i>0: - ly.extend( ['/'] * i ) - lyrics.insert(0, ' '.join(ly) + '\\r') + self.pushedLyrics.append(s) + + break - v=self.versenum - - if len(lyrics) == 1: - v=1 + # All the rest are OPT=VALUE pairs - if v > len(lyrics): - lyrics = '' - else: - lyrics=lyrics[v-1] - - if not len(lyrics): - return (ln, []) + try: + a,v = l.split('=') + except: + error("Lyric options must be in CMD=VALUE pairs") - lyrics=lyrics.replace('\\r', ' \\r ') - lyrics=lyrics.replace('\\n', ' \\n ') - lyrics=lyrics.replace(' ', ' ') - if self.barsplit: - lyrics = [lyrics] - else: - lyrics = lyrics.split() + if a == 'EVENT': + if v == 'TEXT': + self.textev = 1 + warning ("Lyric: Placing lyrics as TEXT EVENTS is not recommended") - beat = 0 - bstep = gbl.QperBar / float(len(lyrics)) + elif v == 'LYRIC': + self.textev = None + if gbl.debug: + print "Lyric: lyrics set as LYRIC events." - - for t, a in enumerate(lyrics): - a,b = pextract(a, '<', '>', 1) + else: + error("Valid options for Lyric Event are TEXT or LYRIC") - if b and b[0]: - beat = stof(b[0], "Expecting value in <%s> in lyric." % b) - if beat < 1 or beat > gbl.QperBar+1: - error("Offset in lyric <> must be 1 to %s." % gbl.QperBar) - beat -= 1 - bstep = (gbl.QperBar-beat)/float((len(lyrics)-t)) - a = a.replace('\\r', '\r') - a = a.replace('\\n', '\n') + elif a == 'SPLIT': + if v == 'BAR': + self.barsplit = 1 + if gbl.debug: + print "Lyric: lyrics distributed thoughout bar." - if a and a != ' ': - if not a.endswith('-'): - a += ' ' - - p=getOffset(beat * gbl.BperQ) - if self.textev: - gbl.mtrks[0].addText(p, a) - else: - gbl.mtrks[0].addLyric(p, a) + elif v == 'NORMAL': + self.barsplit = None + if gbl.debug: + print "Lyric: lyrics appear as one per bar." + + else: + error("Valid options for Lyric Split are BAR or NORMAL") + + + elif a == 'VERSE': + if v.isdigit(): + self.versenum = int(v) + + elif v == 'INC': + self.versenum += 1 + + elif v == 'DEC': + self.versenum -= 1 + + else: + error("Valid options of Lyric Verse are or INC or DEC") + + if self.versenum < 1: + error("Attempt to set Lyric Verse to %s. Values " + "must be > 0" % self.versenum) + + if gbl.debug: + print "Lyric: verse number set to %s" % self.versenum + + + elif a == 'CHORDS': + if v in ('1', 'ON'): + self.dupchords = 1 + if gbl.debug: + print "Lyric: chords are duplicated as lyrics." + + elif v in ('0', 'OFF'): + self.dupchords = 0 + if gbl.debug: + print "Lyric: chords are NOT duplicated as lyrics." + + else: + error ("Expecting 'ON' or 'OFF' in Lyric directive, not 'CHORDS=%s'" % v) + + elif a == 'TRANSPOSE': + + v = stoi(v, "Lyric Tranpose expecting value, not %s" % v) + + if v < -12 or v > 12: + error("Lyric Tranpose %s out-of-range; must be -12..12" % v) + + self.transpose = v + + elif a == 'CNAMES': + + if v in ('#', 'SHARP'): + self.transKey = 1 + elif v in ('B', '&', 'FLAT'): + self.transKey = 0 + + else: + error("Lyric CNames expecting 'Sharp' or 'Flat', not '%s'" % v ) + + else: + error("Usage: Lyric expecting EVENT, SPLIT, VERSE, CHORDS, TRANSPOSE, CNAMES or SET, " + "not '%s'" % a ) + + + + + + def leftovers(self): + """ Just report leftovers on stack.""" + + if self.pushedLyrics: + warning("Lyrics remaining on stack") + + + def extract(self, ln, rpt): + """ Extract lyric info from a chord line and place in META track. + + Returns line and lyric as 2 strings. + + The lyric is returned for debugging purposes, but it has been + processed and inserted into the MIDI track. + """ + + a=ln.count('[') + b=ln.count(']') + + if a != b: + error("Mismatched []s for lyrics found in chord line") + + if self.pushedLyrics: + if a or b: + error("Lyrics not permitted inline and as LYRIC SET") + + + ln = ln + self.pushedLyrics.pop(0) + a=b=1 # flag that we have lyrics, count really doesn't matter + + + if rpt > 1: + if self.dupchords: + error("Chord to lyrics not supported with bar repeat") + elif a or b: + error("Bars with both repeat count and lyrics are not permitted") + + + ln, lyrics = pextract(ln, '[', ']') + + + """ If the CHORDS=ON option is set, make a copy of the chords and + insert as lyric. This permits illegal chord lines, but they will + be caught by the parser. + """ + + if self.dupchords: + ly = [] + + 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 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 + + 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):] + + + ly.append(v) + + i=gbl.QperBar - len(ly) + if i>0: + ly.extend( ['/'] * i ) + lyrics.insert(0, ' '.join(ly) + '\\r') + + + v=self.versenum + + if len(lyrics) == 1: + v=1 + + if v > len(lyrics): + lyrics = '' + else: + lyrics=lyrics[v-1] + + if not len(lyrics): + return (ln, []) + + lyrics=lyrics.replace('\\r', ' \\r ') + lyrics=lyrics.replace('\\n', ' \\n ') + lyrics=lyrics.replace(' ', ' ') + + if self.barsplit: + lyrics = [lyrics] + else: + lyrics = lyrics.split() + + beat = 0 + bstep = gbl.QperBar / float(len(lyrics)) + + + for t, a in enumerate(lyrics): + a,b = pextract(a, '<', '>', 1) + + if b and b[0]: + beat = stof(b[0], "Expecting value in <%s> in lyric" % b) + if beat < 1 or beat > gbl.QperBar+1: + error("Offset in lyric <> must be 1 to %s" % gbl.QperBar) + beat -= 1 + bstep = (gbl.QperBar-beat)/float((len(lyrics)-t)) + + a = a.replace('\\r', '\r') + a = a.replace('\\n', '\n') + + if a and a != ' ': + if not a.endswith('-'): + a += ' ' + + p=getOffset(beat * gbl.BperQ) + if self.textev: + gbl.mtrks[0].addText(p, a) + else: + gbl.mtrks[0].addLyric(p, a) + + beat += bstep + + return (ln, lyrics) - beat += bstep - - return (ln, lyrics) - # Create a single instance of the Lyric Class. diff --git a/mma/MMA/macro.py b/mma/MMA/macro.py index 9978c26..91eab54 100644 --- a/mma/MMA/macro.py +++ b/mma/MMA/macro.py @@ -19,11 +19,11 @@ 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 +Bob van der Poel The macros are stored, set and parsed in this single-instance class. At the top of MMAparse an instance in created with -something like: macros=MMMmacros.Macros(). +something like: macros=MMMmacros.Macros(). """ import gbl @@ -33,6 +33,7 @@ import MMA.midiC import MMA.lyric import MMA.translate import MMA.patSolo +import MMA.patAria import MMA.volume import MMA.notelen @@ -41,634 +42,655 @@ import random class Macros: - vars={} # storage - expandMode = 1 # flag for variable expansion - pushstack = [] + vars={} # storage + expandMode = 1 # flag for variable expansion + pushstack = [] - def __init__(self): + def __init__(self): - self.vars={} + self.vars={} - def stackValue(self, s): - self.pushstack.append(' '.join(s)) + def clear(self, ln): + if ln: + error("VarClear does not take an argument.") + self.vars={} + if gbl.debug: + print "All variable definitions cleared." + def stackValue(self, s): + self.pushstack.append(' '.join(s)) - def sysvar(self, s): - """ Create an internal macro. """ - # Simple/global system values + def sysvar(self, s): + """ Create an internal macro. """ - if s == 'KEYSIG': - a=MMA.patSolo.keySig.kSig - if a >= 0: - f='#' - else: - f='b' - return "%s%s" % (abs(a), f) + # Simple/global system values - elif s == 'TIME': - return str(gbl.QperBar) + if s == 'KEYSIG': + a=MMA.patSolo.keySig.kSig + if a >= 0: + f='#' + else: + f='b' + return "%s%s" % (abs(a), f) - elif s == 'TEMPO': - return str(gbl.tempo) + elif s == 'TIME': + return str(gbl.QperBar) - elif s == 'VOLUME': - return str(int(MMA.volume.volume * 100)) # INT() is important + elif s == 'TEMPO': + return str(gbl.tempo) - elif s == 'VOLUMERATIO': - return str((MMA.volume.vTRatio * 100)) + elif s == 'VOLUME': + return str(int(MMA.volume.volume * 100)) # INT() is important - elif s == 'LASTVOLUME': - return str(int(MMA.volume.lastVolume * 100)) + elif s == 'VOLUMERATIO': + return str((MMA.volume.vTRatio * 100)) - elif s == 'GROOVE': - return gbl.currentGroove + elif s == 'LASTVOLUME': + return str(int(MMA.volume.lastVolume * 100)) - elif s == 'LASTGROOVE': - return gbl.lastGroove + elif s == 'GROOVE': + return gbl.currentGroove - elif s == 'SEQRND': - if gbl.seqRnd[0] == 0: return "Off" - if gbl.seqRnd[0] == 1: return "On" - return ' '.join(gbl.seqRnd[1:]) + elif s == 'LASTGROOVE': + return gbl.lastGroove - elif s == 'SEQSIZE': - return str(gbl.seqSize) + elif s == 'SEQRND': + if gbl.seqRnd[0] == 0: return "Off" + if gbl.seqRnd[0] == 1: return "On" + return ' '.join(gbl.seqRnd[1:]) - elif s == 'SWINGMODE': - if gbl.swingMode: - a = "On" - else: - a = "Off" - return "%s Skew=%s" % (a, gbl.swingSkew) + elif s == 'SEQSIZE': + return str(gbl.seqSize) - elif s == 'TRANSPOSE': - return str(gbl.transpose) + elif s == 'SWINGMODE': + if gbl.swingMode: + a = "On" + else: + a = "Off" + return "%s Skew=%s" % (a, gbl.swingSkew) - elif s == 'STACKVALUE': - if not self.pushstack: - error( "Empty push/pull variable stack.") - return self.pushstack.pop() + elif s == 'TRANSPOSE': + return str(gbl.transpose) - elif s == 'DEBUG': - return "Debug=%s Filenames=%s Patterns=%s " \ - "Sequence=%s Runtime=%s Warnings=%s Expand=%s" % \ - (gbl.debug, gbl.showFilenames, gbl.pshow, gbl.seqshow, \ - gbl.showrun, int(not gbl.noWarn), gbl.showExpand) + elif s == 'STACKVALUE': + if not self.pushstack: + error( "Empty push/pull variable stack") + return self.pushstack.pop() + elif s == 'DEBUG': + return "Debug=%s Filenames=%s Patterns=%s " \ + "Sequence=%s Runtime=%s Warnings=%s Expand=%s" % \ + (gbl.debug, gbl.showFilenames, gbl.pshow, gbl.seqshow, \ + gbl.showrun, int(not gbl.noWarn), gbl.showExpand) - elif s == 'LASTDEBUG': - return "Debug=%s Filenames=%s Patterns=%s " \ - "Sequence=%s Runtime=%s Warnings=%s Expand=%s" % \ - (gbl.Ldebug, gbl.LshowFilenames, gbl.Lpshow, gbl.Lseqshow, \ - gbl.Lshowrun, int(not gbl.LnoWarn), gbl.LshowExpand) - elif s == 'VEXPAND': - if self.expandMode: - return "On" - else: - return "Off" + elif s == 'LASTDEBUG': + return "Debug=%s Filenames=%s Patterns=%s " \ + "Sequence=%s Runtime=%s Warnings=%s Expand=%s" % \ + (gbl.Ldebug, gbl.LshowFilenames, gbl.Lpshow, gbl.Lseqshow, \ + gbl.Lshowrun, int(not gbl.LnoWarn), gbl.LshowExpand) - elif s == "MIDISPLIT": - return ' '.join([str(x) for x in MMA.midi.splitChannels]) + elif s == 'VEXPAND': + if self.expandMode: + return "On" + else: + return "Off" - elif s == 'SEQRNDWEIGHT': - return ' '.join([str(x) for x in MMA.parse.seqRndWeight]) + elif s == "MIDISPLIT": + return ' '.join([str(x) for x in MMA.midi.splitChannels]) - elif s == 'AUTOLIBPATH': - return gbl.autoLib + elif s == 'SEQRNDWEIGHT': + return ' '.join([str(x) for x in MMA.parse.seqRndWeight]) - elif s == 'LIBPATH': - return gbl.libPath + elif s == 'AUTOLIBPATH': + return gbl.autoLib - elif s == 'INCPATH': - return gbl.incPath + elif s == 'LIBPATH': + return gbl.libPath - elif s == 'VOICETR': - return MMA.translate.vtable.retlist() + elif s == 'INCPATH': + return gbl.incPath - elif s == 'TONETR': - return MMA.translate.dtable.retlist() + elif s == 'VOICETR': + return MMA.translate.vtable.retlist() - elif s == 'OUTPATH': - return gbl.outPath + elif s == 'TONETR': + return MMA.translate.dtable.retlist() - elif s == 'BARNUM': - return str(gbl.barNum + 1) + elif s == 'OUTPATH': + return gbl.outPath - elif s == 'LINENUM': - return str(gbl.lineno) + elif s == 'BARNUM': + return str(gbl.barNum + 1) - elif s == 'LYRIC': - return MMA.lyric.lyric.setting() + elif s == 'LINENUM': + return str(gbl.lineno) - # Track vars ... these are in format TRACKNAME_VAR + elif s == 'LYRIC': + return MMA.lyric.lyric.setting() - a=s.rfind('_') - if a==-1: - error("Unknown system variable $_%s" % s) + # Track vars ... these are in format TRACKNAME_VAR - tname = s[:a] - func = s[a+1:] + a=s.rfind('_') + if a==-1: + error("Unknown system variable $_%s" % s) - if gbl.tnames.has_key(tname): - t=gbl.tnames[tname] - else: - error("System variable $_%s refers to nonexistent track." % s) + tname = s[:a] + func = s[a+1:] + if gbl.tnames.has_key(tname): + t=gbl.tnames[tname] + else: + error("System variable $_%s refers to nonexistent track" % s) - if func == 'ACCENT': - r=[] - for s in t.accent: - r.append("{") - for b,v in s: - r.append(str((b/gbl.BperQ)+1)) - r.append(str(int(v * 100))) - r.append("}") - return ' '.join(r) - elif func == 'ARTICULATE': - return ' '.join([str(x) for x in t.artic]) + if func == 'ACCENT': + r=[] + for s in t.accent: + r.append("{") + for b,v in s: + r.append(str((b/gbl.BperQ)+1)) + r.append(str(int(v * 100))) + r.append("}") + return ' '.join(r) - elif func == 'CHANNEL': - return str(t.channel) + elif func == 'ARTICULATE': + return ' '.join([str(x) for x in t.artic]) - elif func == 'COMPRESS': - return ' '.join([str(x) for x in t.compress]) + elif func == 'CHANNEL': + return str(t.channel) - elif func == 'DIRECTION': - return ' '.join([str(x) for x in t.direction]) + elif func == 'COMPRESS': + return ' '.join([str(x) for x in t.compress]) - elif func == 'DUPROOT': - if t.vtype != "CHORD": - error("Only CHORD tracks have DUPROOT") - return ' '.join([str(x) for x in t.dupRoot]) + elif func == 'DIRECTION': + if t.vtype == 'ARIA': + return ' '.join([str(x) for x in t.selectDir]) + else: + return ' '.join([str(x) for x in t.direction]) - elif func == 'HARMONY': - return ' '.join([str(x) for x in t.harmony]) + elif func == 'DUPROOT': + if t.vtype != "CHORD": + error("Only CHORD tracks have DUPROOT") + return ' '.join([str(x) for x in t.dupRoot]) - elif func == 'HARMONYVOLUME': - return ' '.join([str(int(a * 100)) for a in t.harmonyVolume]) + elif func == 'HARMONY': + return ' '.join([str(x) for x in t.harmony]) - elif func == 'INVERT': - return ' '.join([str(x) for x in t.invert]) + elif func == 'HARMONYVOLUME': + return ' '.join([str(int(a * 100)) for a in t.harmonyVolume]) - elif func == 'LIMIT': - return str( t.chordLimit ) + elif func == 'INVERT': + return ' '.join([str(x) for x in t.invert]) - elif func == 'MALLET': - if t.vtype not in ("SOLO", "MELODY"): - error("Mallet only valid in SOLO and MELODY tracks.") - return "Mallet Rate=%i Decay=%i" % (t.mallet, t.malletDecay*100) + elif func == 'LIMIT': + return str( t.chordLimit ) - elif func == 'OCTAVE': - return ' '.join([str(a/12) for a in t.octave]) + elif func == 'MALLET': + if t.vtype not in ("SOLO", "MELODY"): + error("Mallet only valid in SOLO and MELODY tracks") + return "Mallet Rate=%i Decay=%i" % (t.mallet, t.malletDecay*100) - elif func == 'RANGE': - return ' '.join([str(x) for x in t.chordRange]) + elif func == 'OCTAVE': + return ' '.join([str(a/12) for a in t.octave]) - elif func == 'RSKIP': - return ' '.join([str(int(a * 100)) for a in t.rSkip]) + elif func == 'RANGE': + return ' '.join([str(x) for x in t.chordRange]) - elif func == 'RTIME': - return ' '.join([str(x) for x in t.rTime]) + elif func == 'RSKIP': + return ' '.join([str(int(a * 100)) for a in t.rSkip]) - elif func == 'RVOLUME': - return ' '.join([str(int(a * 100)) for a in t.rVolume]) + elif func == 'RTIME': + return ' '.join([str(x) for x in t.rTime]) - elif func == 'SEQRND': - if t.seqRnd: return 'On' - else: return 'Off' + elif func == 'RVOLUME': + return ' '.join([str(int(a * 100)) for a in t.rVolume]) - elif func == 'SEQRNDWEIGHT': - return ' '.join([str(x) for x in t.seqRndWeight]) + elif func == 'SEQRND': + if t.seqRnd: return 'On' + else: return 'Off' - elif func == 'SPAN': - return "%s %s" % (t.spanStart, t.spanEnd) + elif func == 'SEQRNDWEIGHT': + return ' '.join([str(x) for x in t.seqRndWeight]) - elif func == 'STRUM': - if t.vtype != "CHORD": - error("Only CHORD tracks have STRUM") - return ' '.join([str(x) for x in t.strum]) + elif func == 'SPAN': + return "%s %s" % (t.spanStart, t.spanEnd) - elif func == 'TONE': - if t.vtype != "DRUM": - error("Only DRUM tracks have TONE") - return ' '.join([MMA.midiC.valueToDrum(a) for a in t.toneList]) + elif func == 'STRUM': + if t.vtype != "CHORD": + error("Only CHORD tracks have STRUM") + return ' '.join([str(x) for x in t.strum]) - elif func == 'UNIFY': - return ' '.join([str(x) for x in t.unify]) + elif func == 'TONE': + if t.vtype != "DRUM": + error("Only DRUM tracks have TONE") + return ' '.join([MMA.midiC.valueToDrum(a) for a in t.toneList]) - elif func == 'VOICE': - return ' '.join([MMA.midiC.voiceNames[a] for a in t.voice]) + elif func == 'UNIFY': + return ' '.join([str(x) for x in t.unify]) - elif func == 'VOICING': - if t.vtype != 'CHORD': - error("Only CHORD tracks have VOICING") - t=t.voicing - return "Mode=%s Range=%s Center=%s RMove=%s Move=%s Dir=%s" % \ - (t.mode, t.range, t.center, t.random, t.bcount, t.dir) + elif func == 'VOICE': + return ' '.join([MMA.midiC.voiceNames[a] for a in t.voice]) - elif func == 'VOLUME': - return ' '.join([str(int(a * 100)) for a in t.volume]) + elif func == 'VOICING': + if t.vtype != 'CHORD': + error("Only CHORD tracks have VOICING") + t=t.voicing + return "Mode=%s Range=%s Center=%s RMove=%s Move=%s Dir=%s" % \ + (t.mode, t.range, t.center, t.random, t.bcount, t.dir) - else: - error("Unknown system track variable %s." % s) + elif func == 'VOLUME': + return ' '.join([str(int(a * 100)) for a in t.volume]) + else: + 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 - with a "$xxx" is a variable. - l - list + def expand(self, l): + """ Loop though input line and make variable subsitutions. + MMA variables are pretty simple ... any word starting + with a "$xxx" is a variable. - RETURNS: new list with all subs done. - """ + l - list - if not self.expandMode: - return l + RETURNS: new list with all subs done. + """ - while 1: # Loop until no more subsitutions have been done - sub=0 - for i,s in enumerate(l): - if s[:2] == '$$': - continue + if not self.expandMode: + return l - if s[0]=='$': - s=s[1:].upper() + while 1: # Loop until no more subsitutions have been done + sub=0 + for i,s in enumerate(l): + if s[:2] == '$$': + continue - if s.startswith('_'): - ex=self.sysvar(s[1:]) + if s[0]=='$': + s=s[1:].upper() - elif not s in self.vars: - error("User variable '%s' has not been defined." % s ) + if s.startswith('_'): + ex=self.sysvar(s[1:]) - else: - ex=self.vars[s] + elif not s in self.vars: + error("User variable '%s' has not been defined" % s ) - if type(ex) == type([]): # MSET variable - if len(ex): - gbl.inpath.push( ex[1:], [gbl.lineno] * len(ex[1:])) - if len(ex): - ex=ex[0] - else: - ex=[] - else: # regular SET variable - ex=ex.split() + else: + ex=self.vars[s] - l=l[:i] + ex + l[i+1:] # ex might be a list, so this is needed - sub=1 - break + if type(ex) == type([]): # MSET variable + if len(ex): + gbl.inpath.push( ex[1:], [gbl.lineno] * len(ex[1:])) + if len(ex): + ex=ex[0] + else: + ex=[] + else: # regular SET variable + ex=ex.split() - if not sub: - break + l=l[:i] + ex + l[i+1:] # ex might be a list, so this is needed + sub=1 + break - return l + if not sub: + break + return l - def showvars(self, ln): - """ Display all currently defined variables. """ - if len(ln): - for a in ln: - a=a.upper() - if a in self.vars: - print "$%s: %s" % (a, self.vars[a]) - else: - print "$%s - not defined" % a + def showvars(self, ln): + """ Display all currently defined variables. """ - else: + if len(ln): + for a in ln: + a=a.upper() + if a in self.vars: + print "$%s: %s" % (a, self.vars[a]) + else: + print "$%s - not defined" % a - print "User variables defined:" - kys = self.vars.keys() - kys.sort() + else: - mx = 0 + print "User variables defined:" + kys = self.vars.keys() + kys.sort() - for a in kys: # get longest name - if len(a) > mx: - mx = len(a) + mx = 0 - mx = mx + 2 + for a in kys: # get longest name + if len(a) > mx: + mx = len(a) - for a in kys: - print " %-*s %s" % (mx, '$'+a, self.vars[a]) + mx = mx + 2 - def getvname(self, v): - """ Helper routine to validate variable name. """ + for a in kys: + print " %-*s %s" % (mx, '$'+a, self.vars[a]) - if v[0] in ('$', '_'): - error("Variable names cannot start with a '$' or '_'.") - return v.upper() + def getvname(self, v): + """ Helper routine to validate variable name. """ - def rndvar(self, ln): - """ Set a variable randomly from a list. """ + if v[0] in ('$', '_'): + error("Variable names cannot start with a '$' or '_'") + return v.upper() - if len(ln) < 2: - error("Use: RndSet Variable_Name ") + def rndvar(self, ln): + """ Set a variable randomly from a list. """ - v = self.getvname(ln[0]) + if len(ln) < 2: + error("Use: RndSet Variable_Name ") - self.vars[v] = random.choice(ln[1:]) + v = self.getvname(ln[0]) - if gbl.debug: - print "Variable $%s randomly set to '%s'" % (v, self.vars[v]) + self.vars[v] = random.choice(ln[1:]) - def setvar(self, ln): - """ Set a variable. Not the difference between the next 2 lines: - Set Bar BAR - Set Foo AAA BBB $bar - $Foo == "AAA BBB BAR" - Set Foo AAA + BBB + $bar - $Foo == "AAABBBBAR" + if gbl.debug: + print "Variable $%s randomly set to '%s'" % (v, self.vars[v]) - The "+"s just strip out interveing spaces. - """ + def newsetvar(self, ln): + """ Set a new variable. Ignore if already set. """ - if len(ln) < 1: - error("Use: SET VARIABLE_NAME [Value] [[+] [Value]]") + if not len(ln): + error("Use: NSET VARIABLE_NAME [Value] [[+] [Value]]") - v=self.getvname(ln.pop(0)) + if self.getvname(ln[0]) in self.vars: + return - t='' - addSpace = 0 - for i,a in enumerate(ln): - if a == '+': - addSpace = 0 - continue - else: - if addSpace: - t += ' ' - t += a - addSpace = 1 + self.setvar(ln) + def setvar(self, ln): + """ Set a variable. Not the difference between the next 2 lines: + Set Bar BAR + Set Foo AAA BBB $bar + $Foo == "AAA BBB BAR" + Set Foo AAA + BBB + $bar + $Foo == "AAABBBBAR" - self.vars[v]=t + The "+"s just strip out interveing spaces. + """ - if gbl.debug: - print "Variable $%s == '%s'" % (v, self.vars[v]) + if len(ln) < 1: + error("Use: SET VARIABLE_NAME [Value] [[+] [Value]]") + v=self.getvname(ln.pop(0)) - def msetvar(self, ln): - """ Set a variable to a number of lines. """ + t='' + addSpace = 0 + for i,a in enumerate(ln): + if a == '+': + addSpace = 0 + continue + else: + if addSpace: + t += ' ' + t += a + addSpace = 1 - if len(ln) !=1: - error("Use: MSET VARIABLE_NAME MsetEnd") - v=self.getvname(ln[0]) + self.vars[v]=t - lm=[] + if gbl.debug: + print "Variable $%s == '%s'" % (v, self.vars[v]) - while 1: - l=gbl.inpath.read() - if not l: - error("Reached EOF while looking for MSetEnd") - cmd=l[0].upper() - if cmd in ("MSETEND", 'ENDMSET'): - if len(l) > 1: - error("No arguments permitted for MSetEnd/EndMSet") - else: - break - lm.append(l) - self.vars[v]=lm + def msetvar(self, ln): + """ Set a variable to a number of lines. """ + if len(ln) !=1: + error("Use: MSET VARIABLE_NAME MsetEnd") - def unsetvar(self, ln): - """ Delete a variable reference. """ + v=self.getvname(ln[0]) + lm=[] - if len(ln) != 1: - error("Use: UNSET Variable") - v=ln[0].upper() - if v[0] == '_': - error("Internal variables cannot be deleted or modified.") + while 1: + l=gbl.inpath.read() + if not l: + error("Reached EOF while looking for MSetEnd") + cmd=l[0].upper() + if cmd in ("MSETEND", 'ENDMSET'): + if len(l) > 1: + error("No arguments permitted for MSetEnd/EndMSet") + else: + break + lm.append(l) - if v in self.vars: - del(macros.vars[v]) + self.vars[v]=lm - if gbl.debug: - print "Variable '%s' UNSET" % v - else: - warning("Attempt to UNSET nonexistent variable '%s'." % v) + def unsetvar(self, ln): + """ Delete a variable reference. """ - def vexpand(self, ln): - if len(ln) == 1: - cmd = ln[0].upper() - else: - cmd='' + if len(ln) != 1: + error("Use: UNSET Variable") + v=ln[0].upper() + if v[0] == '_': + error("Internal variables cannot be deleted or modified") - if cmd == 'ON': - self.expandMode=1 - if gbl.debug: - print "Variable expansion ON" + if v in self.vars: + del(macros.vars[v]) - elif cmd == 'OFF': - self.expandMode=0 - if gbl.debug: - print "Variable expansion OFF" + if gbl.debug: + print "Variable '%s' UNSET" % v + else: + warning("Attempt to UNSET nonexistent variable '%s'" % v) - else: - error("Use: Vexpand ON/Off.") + def vexpand(self, ln): - def varinc(self, ln): - """ Increment a variable. """ + if len(ln) == 1: + cmd = ln[0].upper() + else: + cmd='' - if len(ln) == 1: - inc=1 + if cmd == 'ON': + self.expandMode=1 + if gbl.debug: + print "Variable expansion ON" - elif len(ln) == 2: - inc = stof(ln[1], "Expecting a value (not %s) for Inc." % ln[1]) + elif cmd == 'OFF': + self.expandMode=0 + if gbl.debug: + print "Variable expansion OFF" - else: - error("Usage: INC Variable [value]") + else: + error("Use: Vexpand ON/Off") - v=ln[0].upper() - if v[0] == '_': - error("Internal variables cannot be modified.") + def varinc(self, ln): + """ Increment a variable. """ - if not v in self.vars: - error("Variable '%s' not defined" % v) + if len(ln) == 1: + inc=1 - vl=stoi(self.vars[v], "Variable must be a value to increment.") + inc + elif len(ln) == 2: + inc = stof(ln[1], "Expecting a value (not %s) for Inc" % ln[1]) - if vl == int(vl): - vl = int(vl) - self.vars[v]=str(vl) + else: + error("Usage: INC Variable [value]") - if gbl.debug: - print "Variable '%s' INC to %s" % (v, self.vars[v]) + v=ln[0].upper() + if v[0] == '_': + error("Internal variables cannot be modified") - def vardec(self, ln): - """ Decrement a varaiable. """ + if not v in self.vars: + error("Variable '%s' not defined" % v) - if len(ln) == 1: - dec = 1 + vl=stoi(self.vars[v], "Variable must be a value to increment") + inc - elif len(ln) == 2: - dec = stof(ln[1], "Expecting a value (not %s) for Inc." % ln[1]) + if vl == int(vl): + vl = int(vl) + self.vars[v]=str(vl) - else: - error("Usage: DEC Variable [value]") + if gbl.debug: + print "Variable '%s' INC to %s" % (v, self.vars[v]) - v=ln[0].upper() - if v[0] == '_': - error("Internal variables cannot be modified.") - if not v in self.vars: - error("Variable '%s' not defined" % v) + def vardec(self, ln): + """ Decrement a varaiable. """ - vl=stoi(self.vars[v], "Variable must be a value to decrement.") - dec + if len(ln) == 1: + dec = 1 - if vl == int(vl): - vl = int(vl) + elif len(ln) == 2: + dec = stof(ln[1], "Expecting a value (not %s) for Inc" % ln[1]) - self.vars[v]=str(vl) + else: + error("Usage: DEC Variable [value]") - if gbl.debug: - print "Variable '%s' DEC to %s" % (v, self.vars[v]) + v=ln[0].upper() + if v[0] == '_': + error("Internal variables cannot be modified") + if not v in self.vars: + error("Variable '%s' not defined" % v) - def varIF(self, ln): - """ Conditional variable if/then. """ + vl=stoi(self.vars[v], "Variable must be a value to decrement") - dec - def expandV(l): - """ Private func. """ + if vl == int(vl): + vl = int(vl) - l=l.upper() + self.vars[v]=str(vl) - if l[:2] == '$$': - l=l[2:] - if not l in self.vars: - error("String Variable '%s' does not exist." % l) - l=self.vars[l] + if gbl.debug: + print "Variable '%s' DEC to %s" % (v, self.vars[v]) - try: - v=float(l) - except: - v=None - return ( l, v ) + def varIF(self, ln): + """ Conditional variable if/then. """ + def expandV(l): + """ Private func. """ - def readblk(): - """ Private, reads a block until ENDIF, IFEND or ELSE. - Return (Terminator, lines[], linenumbers[] ) - """ + l=l.upper() - q=[] - qnum=[] - nesting=0 + if l[:2] == '$$': + l=l[2:] + if not l in self.vars: + error("String Variable '%s' does not exist" % l) + l=self.vars[l] - while 1: - l=gbl.inpath.read() - if not l: - error("EOF reached while looking for EndIf") + try: + v=float(l) + except: + v=None - cmd=l[0].upper() - if cmd == 'IF': - nesting+=1 - if cmd in ("IFEND", 'ENDIF', 'ELSE'): - if len(l) > 1: - error("No arguments permitted for IfEnd/EndIf/Else") - if not nesting: - break - if cmd != 'ELSE': - nesting -= 1 + return ( l, v ) - q.append(l) - qnum.append(gbl.lineno) - return (cmd, q, qnum) + def readblk(): + """ Private, reads a block until ENDIF, IFEND or ELSE. + Return (Terminator, lines[], linenumbers[] ) + """ + q=[] + qnum=[] + nesting=0 - if len(ln)<2: - error("Usage: IF ") + while 1: + l=gbl.inpath.read() + if not l: + error("EOF reached while looking for EndIf") - action = ln[0].upper() + cmd=l[0].upper() + if cmd == 'IF': + nesting+=1 + if cmd in ("IFEND", 'ENDIF', 'ELSE'): + if len(l) > 1: + error("No arguments permitted for IfEnd/EndIf/Else") + if not nesting: + break + if cmd != 'ELSE': + nesting -= 1 - # 1. do the unary options: DEF, NDEF + q.append(l) + qnum.append(gbl.lineno) - if action in ('DEF', 'NDEF'): - if len(ln) != 2: - error("Usage: IF %s VariableName" % action) + return (cmd, q, qnum) - v=ln[1].upper() - retpoint = 2 - if action == 'DEF': - compare = self.vars.has_key(v) - elif action == 'NDEF': - compare = ( not self.vars.has_key(v)) - else: - error("Unreachable unary conditional") + if len(ln)<2: + error("Usage: IF ") + action = ln[0].upper() - # 2. Binary ops: EQ, NE, etc. + # 1. do the unary options: DEF, NDEF - elif action in ('LT', 'LE', 'EQ', 'GE', 'GT', 'NE'): - if len(ln) != 3: - error("Usage: VARS %s Value1 Value2" % action) + if action in ('DEF', 'NDEF'): + if len(ln) != 2: + error("Usage: IF %s VariableName" % action) + v=ln[1].upper() + retpoint = 2 - s1,v1 = expandV(ln[1]) - s2,v2 = expandV(ln[2]) + if action == 'DEF': + compare = self.vars.has_key(v) + elif action == 'NDEF': + compare = ( not self.vars.has_key(v)) + else: + error("Unreachable unary conditional") - if type(v1) == type(1.0) and type(v2) == type(1.0): - s1=v1 - s2=v2 + # 2. Binary ops: EQ, NE, etc. - retpoint = 3 + elif action in ('LT', 'LE', 'EQ', 'GE', 'GT', 'NE'): + if len(ln) != 3: + error("Usage: VARS %s Value1 Value2" % action) - if action == 'LT': - compare = (v1 < v2) - elif action == 'LE': - compare = (v1 <= v2) - elif action == 'EQ': - compare = (v1 == v2) - elif action == 'GE': - compare = (v1 >= v2) - elif action == 'GT': - compare = (v1 > v2) - elif action == 'NE': - compare = (v1 != v2) - else: - error("Unreachable binary conditional") - else: - error("Usage: IF ...") + s1,v1 = expandV(ln[1]) + s2,v2 = expandV(ln[2]) + if type(v1) == type(1.0) and type(v2) == type(1.0): + s1=v1 + s2=v2 - """ Go read until end of if block. - We shove the block back if the compare was true. - Unless, the block is terminated by an ELSE ... then we need - to read another block and push back one of the two. - """ - cmd, q, qnum = readblk() + retpoint = 3 + if action == 'LT': + compare = (v1 < v2) + elif action == 'LE': + compare = (v1 <= v2) + elif action == 'EQ': + compare = (v1 == v2) + elif action == 'GE': + compare = (v1 >= v2) + elif action == 'GT': + compare = (v1 > v2) + elif action == 'NE': + compare = (v1 != v2) + else: + error("Unreachable binary conditional") - if cmd == 'ELSE': - cmd, q1, qnum1 = readblk() + else: + error("Usage: IF ...") - if cmd == 'ELSE': - error("Only one ELSE is permitted in IF construct.") - if not compare: - compare = 1 - q = q1 - qnum = qnum1 + """ Go read until end of if block. + We shove the block back if the compare was true. + Unless, the block is terminated by an ELSE ... then we need + to read another block and push back one of the two. + """ - if compare: - gbl.inpath.push( q, qnum ) + cmd, q, qnum = readblk() + + + if cmd == 'ELSE': + cmd, q1, qnum1 = readblk() + + if cmd == 'ELSE': + error("Only one ELSE is permitted in IF construct") + + if not compare: + compare = 1 + q = q1 + qnum = qnum1 + + if compare: + gbl.inpath.push( q, qnum ) macros = Macros() diff --git a/mma/MMA/main.py b/mma/MMA/main.py index e18cdb6..cb11f3d 100644 --- a/mma/MMA/main.py +++ b/mma/MMA/main.py @@ -19,7 +19,7 @@ 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 +Bob van der Poel """ @@ -47,13 +47,13 @@ import MMA.options MMA.options.opts() """ - LibPath and IncPath are set in MMA.globals. Debug setting isn't set - when the default is done. + LibPath and IncPath are set in MMA.globals. Debug setting isn't set + when the default is done. """ if gbl.debug: - print "Initialization has set LibPath set to", gbl.libPath - print "Initialization has set IncPath set to", gbl.incPath + print "Initialization has set LibPath set to", gbl.libPath + print "Initialization has set IncPath set to", gbl.incPath ####################################### @@ -75,25 +75,25 @@ gbl.docs = 0 rcread=0 -rcfiles = ('mmarc', 'c:\\mma\\mmarc', '~/.mmarc', '/usr/local/etc/mmarc', '/etc/mmarc' ) +rcfiles = ('mmarc', 'c:\\mma\\mmarc', '~/.mmarc', '/usr/local/etc/mmarc', '/etc/mmarc' ) if gbl.mmaRC: - rcfiles = [ gbl.mmaRC ] + rcfiles = [ gbl.mmaRC ] for i in rcfiles: - f = locFile(i, None) - if f: - if gbl.showrun: - print "Reading RC file '%s'" % f - MMA.parse.parseFile(f) - rcread+=1 - break - else: - if gbl.mmaRC: - error("Specified init file '%s' not found." % gbl.mmaRC) + f = locFile(i, None) + if f: + if gbl.showrun: + print "Reading RC file '%s'" % f + MMA.parse.parseFile(f) + rcread+=1 + break + else: + if gbl.mmaRC: + error("Specified init file '%s' not found" % gbl.mmaRC) if not rcread: - gbl.lineno = -1 - warning("No RC file was found or processed") + gbl.lineno = -1 + warning("No RC file was found or processed") gbl.docs = docOption # Restore doc options @@ -104,17 +104,17 @@ gbl.docs = docOption # Restore doc options # Note: This needs to be here, after reading of RC files if gbl.makeGrvDefs: - if gbl.infile: - error("No filename is permitted with the -g option") - from MMA.auto import libUpdate - libUpdate() # update and EXIT + if gbl.infile: + error("No filename is permitted with the -g option") + from MMA.auto import libUpdate + libUpdate() # update and EXIT ################################ # We need an input file for anything after this point. if not gbl.infile: - MMA.options.usage("No input filename specified.") + MMA.options.usage("No input filename specified.") # Add filename to meta track. @@ -124,35 +124,35 @@ gbl.mtrks[0].addText(0, "Input filename: %s" % gbl.infile) # Just extract docs (-Dx) to stdout. if docOption: - f=locFile(gbl.infile, None) - if not f: - error("File '%s' not found." % gbl.infile) - MMA.parse.parseFile(f) - sys.exit(0) + f=locFile(gbl.infile, None) + if not f: + error("File '%s' not found" % gbl.infile) + MMA.parse.parseFile(f) + sys.exit(0) ######################################################### # These cmdline options override settings in RC files if gbl.cmdSMF: - gbl.lineno = -1 - MMA.parse.setMidiFileType(['SMF=%s' % gbl.cmdSMF]) + gbl.lineno = -1 + MMA.parse.setMidiFileType(['SMF=%s' % gbl.cmdSMF]) ########################################## # Create the output filename. # If outfile was specified on cmd line then leave it alone. -# Otherwise ... -# 1. strip off the extension if it is .mma, -# 2. append .mid +# Otherwise ... +# 1. strip off the extension if it is .mma, +# 2. append .mid if gbl.outfile: - outfile = gbl.outfile + outfile = gbl.outfile else: - outfile, ext = os.path.splitext(gbl.infile) - if ext != gbl.ext: - outfile=gbl.infile - outfile += '.mid' + outfile, ext = os.path.splitext(gbl.infile) + if ext != gbl.ext: + outfile=gbl.infile + outfile += '.mid' outfile=os.path.expanduser(outfile) @@ -164,94 +164,94 @@ outfile=os.path.expanduser(outfile) # First the mmastart files for f in gbl.mmaStart: - fn = locFile(f, gbl.incPath) - if not fn: - warning("MmaStart file '%s' not found/processed." % fn) - MMA.parse.parseFile(fn) - gbl.lineno = -1 + fn = locFile(f, gbl.incPath) + if not fn: + warning("MmaStart file '%s' not found/processed" % fn) + MMA.parse.parseFile(fn) + gbl.lineno = -1 # The song file specified on the command line f = locFile(gbl.infile, None) if not f: - gbl.lineno = -1 - error("Input file '%s' not found." % gbl.infile) + gbl.lineno = -1 + error("Input file '%s' not found" % gbl.infile) MMA.parse.parseFile(f) # Finally, the mmaend files for f in gbl.mmaEnd: - fn = locFile(f, None) - if not fn: - warning("MmaEnd file '%s' not found/processed." % f) - MMA.parse.parseFile(fn) + fn = 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... if gbl.chshow: - print "\nFile '%s' parsed, but no MIDI file produced!" % gbl.infile - print - print "Tracks allocated:" - k=gbl.tnames.keys() - k.sort() - max=0 - for a in k + gbl.deletedTracks: - if len(a)>max: - max = len(a) - max+=1 - wrap=0 - for a in k: - wrap += max - if wrap>60: - wrap = max - print - print " %-*s" %( max, a), - print - print - if gbl.deletedTracks: - print "Deleted Tracks:" - wrap=0 - for a in gbl.deletedTracks: - wrap += max - if wrap>60: - wrap=max - print - print " %-*s" %( max,a), - print - print - print "Channel assignments:" - for c, n in sorted(gbl.midiAssigns.items()): - if n: - wrap = 3 - print " %2s" % c, - for nn in n: - wrap += max - if wrap>63: - print "\n ", - wrap=max+3 - print "%-*s" % (max,nn), + print "\nFile '%s' parsed, but no MIDI file produced!" % gbl.infile + print + print "Tracks allocated:" + k=gbl.tnames.keys() + k.sort() + max=0 + for a in k + gbl.deletedTracks: + if len(a)>max: + max = len(a) + max+=1 + wrap=0 + for a in k: + wrap += max + if wrap>60: + wrap = max + print + print " %-*s" %( max, a), + print + print + if gbl.deletedTracks: + print "Deleted Tracks:" + wrap=0 + for a in gbl.deletedTracks: + wrap += max + if wrap>60: + wrap=max + print + print " %-*s" %( max,a), + print + print + print "Channel assignments:" + for c, n in sorted(gbl.midiAssigns.items()): + if n: + wrap = 3 + print " %2s" % c, + for nn in n: + wrap += max + if wrap>63: + print "\n ", + wrap=max+3 + print "%-*s" % (max,nn), - print - print - sys.exit(0) + print + print + sys.exit(0) #################################### # Dry run, no output if gbl.noOutput: - warning( "Input file parsed successfully. No midi file generated.") - sys.exit(0) + warning( "Input file parsed successfully. No midi file generated") + sys.exit(0) ############################## # Create the output (MIDI) file -gbl.lineno=-1 # disable line nums for error/warning +gbl.lineno=-1 # disable line nums for error/warning """ We fix the outPath now. This lets you set outpath in the song file. @@ -271,11 +271,11 @@ gbl.lineno=-1 # disable line nums for error/warning """ if (not outfile.startswith('/')) and gbl.outPath and (not gbl.outfile): - if gbl.outPath[0] in '.\\/': - outfile = "%s/%s" % (gbl.outPath, outfile) - else: - head, tail = os.path.split(outfile) - outfile = "%s/%s/%s" % (head, gbl.outPath, tail) + if gbl.outPath[0] in '.\\/': + outfile = "%s/%s" % (gbl.outPath, outfile) + else: + head, tail = os.path.split(outfile) + outfile = "%s/%s/%s" % (head, gbl.outPath, tail) fileExist = os.path.exists(outfile) @@ -285,11 +285,11 @@ fileExist = os.path.exists(outfile) """ for n in gbl.tnames.values(): - if n.channel: - n.doMidiClear() - n.clearPending() - if n.riff: - warning("%s has pending Riff(s)" % n.name) + if n.channel: + n.doMidiClear() + n.clearPending() + if n.riff: + warning("%s has pending Riff(s)" % n.name) """ Check all the tracks and find total number used. When initializing each track (class) we made an initial entry @@ -297,36 +297,36 @@ for n in gbl.tnames.values(): track only has one entry we can safely skip the entire track. """ -trackCount=1 # account for meta track +trackCount=1 # account for meta track -for n in sorted(gbl.mtrks.keys())[1:]: # check all but 0 (meta) - if len(gbl.mtrks[n].miditrk) > 1: - trackCount += 1 +for n in sorted(gbl.mtrks.keys())[1:]: # check all but 0 (meta) + if len(gbl.mtrks[n].miditrk) > 1: + trackCount += 1 if trackCount == 1: # only meta track - if fileExist: - print - print "No data created. Did you remember to set a groove/sequence?" - if fileExist: - print "Existing file '%s' has not been modified." % outfile - sys.exit(1) + if fileExist: + print + print "No data created. Did you remember to set a groove/sequence?" + if fileExist: + print "Existing file '%s' has not been modified." % outfile + sys.exit(1) lyric.leftovers() if fileExist: - print "Overwriting existing", + print "Overwriting existing", else: - print "Creating new", + print "Creating new", print "midi file (%s bars): '%s'" % (gbl.barNum, outfile) try: - out = file(outfile, 'wb') + out = file(outfile, 'wb') except: - error("Can't open file '%s' for writing." % outfile) + error("Can't open file '%s' for writing" % outfile) MMA.midi.writeTracks(out) out.close() if gbl.debug: - print "Completed processing file '%s'." % outfile + print "Completed processing file '%s'." % outfile diff --git a/mma/MMA/mdefine.py b/mma/MMA/mdefine.py index 4772ac6..ebc6028 100644 --- a/mma/MMA/mdefine.py +++ b/mma/MMA/mdefine.py @@ -19,7 +19,7 @@ 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 +Bob van der Poel This class is used to parse lines of MDEFINE and stores the sequences for later recall. @@ -31,58 +31,58 @@ from MMA.common import * import MMA.midiC class Mdefine: - def __init__(self): - self.defs = {} + def __init__(self): + self.defs = {} - def get(self, name): - """ Return a predefine MIDI pattern.""" + def get(self, name): + """ Return a predefine MIDI pattern.""" - try: - return self.defs[name] - except: - error("The MDEFINE pattern %s has not been defined." % name) + try: + return self.defs[name] + except: + error("The MDEFINE pattern %s has not been defined" % name) - def set(self, name, ln): - """ Parse a MDEFINE line. + def set(self, name, ln): + """ Parse a MDEFINE line. - The line must be in the form: + The line must be in the form: - NAME [; ...] + NAME [; ...] - """ + """ - name = name.upper() + name = name.upper() - ln=ln.rstrip('; ') # dump trailing ';' and whitespace - ln = ln.split(';') - evs = [] - for l in ln: - l=l.split() + ln=ln.rstrip('; ') # dump trailing ';' and whitespace + ln = ln.split(';') + evs = [] + for l in ln: + l=l.split() - if len(l) == 1: - evs.extend( self.get(l[0].upper() )) - continue + if len(l) == 1: + evs.extend( self.get(l[0].upper() )) + continue - if len(l) != 3: - error("MDEFINE sequence must have 3 values: Beat, Ctrl, Datum") + if len(l) != 3: + error("MDEFINE sequence must have 3 values: Beat, Ctrl, Datum") - off=stof(l[0], "Value for offset must be integer/float") + off=stof(l[0], "Value for offset must be integer/float") - c=MMA.midiC.ctrlToValue(l[1]) - if c < 0: - c=stoi(l[1]) - if c < 0 or c > 0x7f: - error("Controller values must be 0x00 to 0x7f.") + c=MMA.midiC.ctrlToValue(l[1]) + if c < 0: + c=stoi(l[1]) + if c < 0 or c > 0x7f: + error("Controller values must be 0x00 to 0x7f") - d=stoi(l[2]) - if d < 0 or d > 0x7f: - error("MIDI Control Datum value must be 0x00 to 0x7f.") + d=stoi(l[2]) + if d < 0 or d > 0x7f: + error("MIDI Control Datum value must be 0x00 to 0x7f") - evs.append( [off, chr(c) + chr(d)]) + evs.append( [off, chr(c) + chr(d)]) - self.defs[name]=evs + self.defs[name]=evs mdef = Mdefine() diff --git a/mma/MMA/midi.py b/mma/MMA/midi.py index 5027f83..e3c9fd9 100644 --- a/mma/MMA/midi.py +++ b/mma/MMA/midi.py @@ -18,7 +18,7 @@ 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 +Bob van der Poel """ @@ -32,142 +32,142 @@ import MMA.midiC splitChannels = [] def setSplitChannels(ln): - """ Parser routine, sets up list of track to split. Overwrites existing. """ + """ Parser routine, sets up list of track to split. Overwrites existing. """ - global splitChannels + global splitChannels - splitChannels = [] + 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) + 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) - if gbl.debug: - print "SplitChannels: ", - printList(splitChannels) + if gbl.debug: + print "SplitChannels: ", + printList(splitChannels) #################### def writeTracks(out): - """ Write the accumulated MIDI tracks to file. """ + """ Write the accumulated MIDI tracks to file. """ - keys=gbl.mtrks.keys() - keys.sort() + keys=gbl.mtrks.keys() + keys.sort() - """ For type 0 MIDI files all data is contained in 1 track. - We take all our tracks and copy them to track 0, then - set up keys[] so that only track 0 remains. - """ + """ For type 0 MIDI files all data is contained in 1 track. + We take all our tracks and copy them to track 0, then + set up keys[] so that only track 0 remains. + """ - if gbl.midiFileType == 0: - trk0=gbl.mtrks[0].miditrk - for n in keys[1:]: - trk=gbl.mtrks[n].miditrk - for k,v in trk.items(): - if k in trk0: - trk0[k].extend(v) - else: - trk0[k]=v - keys=[0] + if gbl.midiFileType == 0: + trk0=gbl.mtrks[0].miditrk + for n in keys[1:]: + trk=gbl.mtrks[n].miditrk + for k,v in trk.items(): + if k in trk0: + trk0[k].extend(v) + else: + trk0[k]=v + keys=[0] - # Write header + # Write header - tcount = len(keys) - out.write( mkHeader(tcount, gbl.BperQ, gbl.midiFileType) ) + tcount = len(keys) + out.write( mkHeader(tcount, gbl.BperQ, gbl.midiFileType) ) - # Write data chunks for each track + # Write data chunks for each track - for n in keys: + for n in keys: - if len(gbl.mtrks[n].miditrk): + if len(gbl.mtrks[n].miditrk): - if gbl.debug: - print "Writing <%s> ch=%s;" % \ - (gbl.mtrks[n].trackname, n), + if gbl.debug: + print "Writing <%s> ch=%s;" % \ + (gbl.mtrks[n].trackname, n), + + if n in splitChannels and gbl.midiFileType: + tcount += writeSplitTrack(n, out) + else: + gbl.mtrks[n].writeMidiTrack(out) - if n in splitChannels and gbl.midiFileType: - tcount += writeSplitTrack(n, out) - else: - gbl.mtrks[n].writeMidiTrack(out) + """ We have increased the track count! So, we need to + fix the file header. This is offset 10/11 which contains + the number of tracks. The counter tcount has been + tracking this, so just seek, replace and seek back. + """ - """ We have increased the track count! So, we need to - fix the file header. This is offset 10/11 which contains - the number of tracks. The counter tcount has been - tracking this, so just seek, replace and seek back. - """ - - if tcount != len(keys): - out.seek(0) - out.write( mkHeader(tcount, gbl.BperQ, gbl.midiFileType) ) - out.seek(0, 2) # return to eof + if tcount != len(keys): + out.seek(0) + out.write( mkHeader(tcount, gbl.BperQ, gbl.midiFileType) ) + out.seek(0, 2) # return to eof 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 drum track into a separate track for the non-note + stuff and then a track for each note. + """ - tr = gbl.mtrks[channel].miditrk # track to split + 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 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. + """ - notes={} + notes={} - onEvent = 0x90 + (channel-1) - offEvent = 0x80 + (channel-1) + onEvent = 0x90 + (channel-1) + offEvent = 0x80 + (channel-1) - for offset in tr.keys(): - for x in range(len(tr[offset])-1, -1, -1): - ev = tr[offset][x] - if len(ev) == 3 and ( ord(ev[0]) in (onEvent, offEvent)): - n = ord(ev[1]) - else: - n = -1 # special value for non-note on events + for offset in tr.keys(): + for x in range(len(tr[offset])-1, -1, -1): + ev = tr[offset][x] + if len(ev) == 3 and ( ord(ev[0]) in (onEvent, offEvent)): + n = ord(ev[1]) + else: + n = -1 # special value for non-note on events - if not notes.has_key(n): # create a new mtrk if needed - notes[n]=Mtrk(10) + if not notes.has_key(n): # create a new mtrk if needed + notes[n]=Mtrk(10) - if offset in notes[n].miditrk: # copy event to new track - notes[n].miditrk[offset].append(ev) - else: - notes[n].miditrk[offset]=[ev] + if offset in notes[n].miditrk: # copy event to new track + notes[n].miditrk[offset].append(ev) + else: + notes[n].miditrk[offset]=[ev] - if gbl.debug: - print " Data has been split into %s tracks." % len(notes) + if gbl.debug: + print " Data has been split into %s tracks." % len(notes) - # Insert a channel name in all the new tracks. + # Insert a channel name in all the new tracks. - for a in notes.keys(): - if a == -1: - continue - if channel == 10: - m = "%s" % MMA.midiC.valueToDrum(a) - else: - m= "%s-%s" % (gbl.mtrks[channel].trackname, a) + for a in notes.keys(): + if a == -1: + continue + if channel == 10: + m = "%s" % MMA.midiC.valueToDrum(a) + else: + m= "%s-%s" % (gbl.mtrks[channel].trackname, a) - notes[a].addTrkName(0, m) + notes[a].addTrkName(0, m) - for a in sorted(notes.keys()): - notes[a].writeMidiTrack(out) + for a in sorted(notes.keys()): + notes[a].writeMidiTrack(out) - """ The split tracks have been written. Return the number of additional tracks - so that the caller can properly update the midi file header. Note that - len(notes)-1 IS CORRECT ... we've already figured on writing 1 track. - """ + """ The split tracks have been written. Return the number of additional tracks + so that the caller can properly update the midi file header. Note that + len(notes)-1 IS CORRECT ... we've already figured on writing 1 track. + """ - return len(notes)-1 + return len(notes)-1 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. @@ -176,384 +176,394 @@ def mkHeader(count, tempo, Mtype): class Mtrk: - def __init__(self, channel): - self.miditrk={} - self.channel = channel-1 - self.trackname = '' - self.lastEvent = [None] * 129 + def __init__(self, channel): + self.miditrk={} + self.channel = channel-1 + self.trackname = '' + self.lastEvent = [None] * 129 - def delDup(self, offset, cmd): - """Delete a duplicate event. Used by timesig, etc. """ + def delDup(self, offset, cmd): + """Delete a duplicate event. Used by timesig, etc. """ - tr=self.miditrk - lg=len(cmd) - if tr.has_key(offset): - for i,a in enumerate(tr[offset]): - if a[0:lg] == cmd: - del tr[offset][i] + tr=self.miditrk + lg=len(cmd) + if tr.has_key(offset): + for i,a in enumerate(tr[offset]): + if a[0:lg] == cmd: + del tr[offset][i] - def addTimeSig(self, offset, nn, dd, cc, bb): - """ Create a midi time signature. + def addTimeSig(self, offset, nn, dd, cc, bb): + """ Create a midi time signature. - delta - midi delta offset - nn = sig numerator, beats per measure - dd - sig denominator, 2=quarter note, 3=eighth, - cc - midi clocks/tick - bb - # of 32nd notes in quarter (normally 8) + delta - midi delta offset + nn = sig numerator, beats per measure + dd - sig denominator, 2=quarter note, 3=eighth, + cc - midi clocks/tick + bb - # of 32nd notes in quarter (normally 8) - This is only called by timeSig.set(). Don't - call this directly since the timeSig.set() checks for - duplicate settings. - """ + This is only called by timeSig.set(). Don't + call this directly since the timeSig.set() checks for + duplicate settings. + """ - cmd = chr(0xff) + chr(0x58) - self.delDup(offset, cmd) # NEEDED??? - self.addToTrack(offset, cmd + chr(0x04) + \ - chr(nn) + chr(dd) + chr(cc) + chr(bb) ) + cmd = chr(0xff) + chr(0x58) + self.delDup(offset, cmd) # NEEDED??? + self.addToTrack(offset, cmd + chr(0x04) + \ + chr(nn) + chr(dd) + chr(cc) + chr(bb) ) - def addKeySig(self, offset, n, mi): - """ Set the midi key signature. """ + def addKeySig(self, offset, n, mi): + """ Set the midi key signature. """ - cmd = chr(0xff) + chr(0x59) - self.delDup(offset, cmd) - self.addToTrack(offset, cmd + chr(0x02) + chr(n) + chr(mi) ) + cmd = chr(0xff) + chr(0x59) + self.delDup(offset, cmd) + self.addToTrack(offset, cmd + chr(0x02) + chr(n) + chr(mi) ) - def addMarker(self, offset, msg): - """ Create a midi MARKER event.""" + def addMarker(self, offset, msg): + """ Create a midi MARKER event.""" - self.addToTrack(offset, chr(0xff) + chr(0x06) + intToVarNumber(len(msg)) + msg ) + self.addToTrack(offset, chr(0xff) + chr(0x06) + intToVarNumber(len(msg)) + msg ) - def addText(self, offset, msg): - """ Create a midi TextEvent.""" + def addText(self, offset, msg): + """ Create a midi TextEvent.""" - self.addToTrack( offset, chr(0xff) + chr(0x01) + intToVarNumber(len(msg)) + msg ) + self.addToTrack( offset, chr(0xff) + chr(0x01) + intToVarNumber(len(msg)) + msg ) - def addLyric(self, offset, msg): - """ Create a midi lyric event. """ + def addLyric(self, offset, msg): + """ Create a midi lyric event. """ - self.addToTrack( offset, - chr(0xff) + chr(0x05) + intToVarNumber(len(msg)) + msg ) + self.addToTrack( offset, + chr(0xff) + chr(0x05) + intToVarNumber(len(msg)) + msg ) - def addTrkName(self, offset, msg): - """ Creates a midi track name event. """ + def addTrkName(self, offset, msg): + """ Creates a midi track name event. """ - offset = 0 # ignore user offset, always put this at 0 + offset = 0 # ignore user offset, always put this at 0 - self.trackname = msg + self.trackname = msg - cmd = chr(0xff) + chr(0x03) - self.delDup(offset, cmd) - self.addToTrack(offset, cmd + intToVarNumber(len(msg)) + msg ) + cmd = chr(0xff) + chr(0x03) + self.delDup(offset, cmd) + self.addToTrack(offset, cmd + intToVarNumber(len(msg)) + msg ) - def addProgChange( self, offset, program): - """ Create a midi program change. + def addProgChange( self, offset, program): + """ Create a midi program change. - program - midi program + program - midi program - Returns - packed string - """ + Returns - packed string + """ - self.addToTrack(offset, - chr(0xc0 | self.channel) + chr(program) ) + self.addToTrack(offset, + chr(0xc0 | self.channel) + chr(program) ) - def addGlis(self, offset, v): - """ Set the portamento. LowLevel MIDI. + def addGlis(self, offset, v): + """ Set the portamento. LowLevel MIDI. - This does 2 things: - 1. turns portamento on/off, - 2. sets the LSN rate. - """ + This does 2 things: + 1. turns portamento on/off, + 2. sets the LSN rate. + """ - if v == 0: - self.addToTrack(offset, - chr(0xb0 | self.channel) + chr(0x41) + chr(0x00) ) + if v == 0: + 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) ) + else: + 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.""" + 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): - """ Add arbitary control sequence to track.""" + def addCtl(self, offset, l): + """ Add arbitary control sequence to track.""" - self.addToTrack(offset, chr(0xb0 | self.channel) + l) + self.addToTrack(offset, chr(0xb0 | self.channel) + l) - def addNoteOff(self, offset): - """ Insert a "All Note Off" into the midi stream. + def addNoteOff(self, offset): + """ Insert a "All Note Off" into the midi stream. - Called from the cutTrack() function. - """ + Called from the cutTrack() function. + """ - self.addToTrack(offset, - chr(0xb0 | self.channel) + chr(0x7b) + chr(0) ) + self.addToTrack(offset, + chr(0xb0 | self.channel) + chr(0x7b) + chr(0) ) - def addChannelVol(self, offset, v): - """ Set the midi channel volume.""" + def addChannelVol(self, offset, v): + """ Set the midi channel volume.""" - self.addToTrack(offset, - chr(0xb0 | self.channel) + chr(0x07) + chr(v) ) + self.addToTrack(offset, + chr(0xb0 | self.channel) + chr(0x07) + chr(v) ) - def addTempo(self, offset, beats): - """ Create a midi tempo meta event. + 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) - self.delDup(offset, cmd) - self.addToTrack( offset, cmd + chr(0x03) + intTo3Byte(60000000/beats) ) + cmd = chr(0xff) + chr(0x51) + self.delDup(offset, cmd) + self.addToTrack( offset, cmd + chr(0x03) + intTo3Byte(60000000/beats) ) - def writeMidiTrack(self, out): - """ Create/write the MIDI track. + 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 + tr=self.miditrk - if gbl.debug: - ttl = 0 - lg=1 - for t in tr: - a=len(tr[t]) - if a > lg: - lg = a - ttl += a - print "Unique ts: %s; Ttl events %s; Average ev/ts %.2f" % \ - (len(tr), ttl, float(ttl)/len(tr) ) + """ 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. + """ - last = 0 + if gbl.synctick and self.channel >= 0: + self.addToTrack(0, chr(0x90 | self.channel) + chr(80) + chr(90) ) + self.addToTrack(1, chr(0x90 | self.channel) + chr(80) + chr(0) ) + + + if gbl.debug: + ttl = 0 + lg=1 + for t in tr: + a=len(tr[t]) + if a > lg: + lg = a + ttl += a + print "Unique ts: %s; Ttl events %s; Average ev/ts %.2f" % \ + (len(tr), ttl, float(ttl)/len(tr) ) - # Convert all events to MIDI deltas and store in - # the track array/list + last = 0 - tdata=[] # empty track container - lastSts=None # Running status tracker + # Convert all events to MIDI deltas and store in + # the track array/list - for a in sorted(tr.keys()): - delta = a-last - for d in tr[a]: + tdata=[] # empty track container + lastSts=None # Running status tracker - """ 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. - """ + for a in sorted(tr.keys()): + delta = a-last + for d in tr[a]: - if len(d) > 1: - if d[0] == lastSts: - d=d[1:] - else: - lastSts = d[0] - s=ord(lastSts) - if s < 0x80 or s > 0xef or not gbl.runningStatus: - lastSts = None + """ 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. + """ - tdata.extend( [ intToVarNumber(delta) , d ] ) - delta = 0 - last = a + if len(d) > 1: + if d[0] == lastSts: + d=d[1:] + else: + lastSts = d[0] + s=ord(lastSts) + if s < 0x80 or s > 0xef or not gbl.runningStatus: + lastSts = None - # Add an EOF to the track (included in total track size) + tdata.extend( [ intToVarNumber(delta) , d ] ) + delta = 0 + last = a - tdata.append( intToVarNumber(0)) - tdata.append( chr(0xff) + chr(0x2f) + chr(0x00) ) + # Add an EOF to the track (included in total track size) - tdata = ''.join(tdata) - totsize = len(tdata) + tdata.append( intToVarNumber(0)) + tdata.append( chr(0xff) + chr(0x2f) + chr(0x00) ) - out.write("MTrk") - out.write(intToLong(totsize)) - out.write( tdata ) + tdata = ''.join(tdata) + totsize = len(tdata) + out.write("MTrk") + out.write(intToLong(totsize)) + out.write( tdata ) - 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 + def addPairToTrack(self, boffset, startRnd, duration, note, v, unify): + """ Add a note on/off pair to a track. - 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. + 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 - Offsets | 200 | 300 | 320 | 420 - ---------|--------|--------|-------|-------- - Pair1 | on | | off | - Pair2 | | on | | off + 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. - 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! + Offsets | 200 | 300 | 320 | 420 + ---------|--------|--------|-------|-------- + Pair1 | on | | off | + Pair2 | | on | | off - However, if the unify flag is set we should end up with: + 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! - 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 - """ - # Start/end offsets + """ - onOffset = getOffset( boffset, startRnd) - offOffset = onOffset + duration + # Start/end offsets - # ON/OFF events + onOffset = getOffset( boffset, startRnd) + offOffset = onOffset + duration - onEvent = chr(0x90 | self.channel) + chr(note) + chr(v) - offEvent = onEvent[:-1] + chr(0) + # ON/OFF events - """ Check for overlap on last event set for this track and - do some ugly trickry. + onEvent = chr(0x90 | self.channel) + chr(note) + chr(v) + offEvent = onEvent[:-1] + chr(0) - - 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. + """ Check for overlap on last event set for this track and + do some ugly trickry. - - 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. + - 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. - - 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. + - 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 UNIFY is NOT set we insert a NOTE OFF at the current - on time. This replaces the OFF we just deleted. + - 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 SET we skip the above step, and we set the - noOnFlag so that the ON event isn't set. + - 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. - noOnFlag = None + """ - f=self.lastEvent[note] - if f >= onOffset and f <= offOffset: - tr=self.miditrk - for i in range(len(tr[f])): - if tr[f][i] == offEvent: - if len(tr[f]) == 1: - del(tr[f]) - else: - del(tr[f][i]) - if not unify: - self.addToTrack(onOffset, offEvent) - else: - noOnFlag=1 - break + noOnFlag = None - if not noOnFlag: - self.addToTrack(onOffset, onEvent ) - self.addToTrack(offOffset, offEvent ) + f=self.lastEvent[note] + if f >= onOffset and f <= offOffset: + tr=self.miditrk + for i in range(len(tr[f])): + if tr[f][i] == offEvent: + if len(tr[f]) == 1: + del(tr[f]) + else: + del(tr[f][i]) + if not unify: + self.addToTrack(onOffset, offEvent) + else: + noOnFlag=1 + break - # Save the NOTE OFF time for the next loop. + if not noOnFlag: + self.addToTrack(onOffset, onEvent ) + self.addToTrack(offOffset, offEvent ) - self.lastEvent[note] = offOffset + # Save the NOTE OFF time for the next loop. + self.lastEvent[note] = offOffset - def zapRangeTrack(self, start, end): - """ Clear NoteOn events from track in range: start ... end. - This is called from the fermata function. + def zapRangeTrack(self, start, end): + """ Clear NoteOn events from track in range: start ... end. - We delete the entire event list (3 bytes) from the buffer. This - can result in empty directory enteries, but that isn't a problem. - """ + This is called from the fermata function. - trk=self.miditrk - for a in trk: - if a>=start and a<=end: - for i in range(len(trk[a])-1, -1, -1): - e = trk[a][i] - if len(e)==3 and ord(e[0]) & 0xF0 == 0x90 and ord(e[2]): - del trk[a][i] + 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 + for a in trk: + if a>=start and a<=end: + for i in range(len(trk[a])-1, -1, -1): + e = trk[a][i] + if len(e)==3 and ord(e[0]) & 0xF0 == 0x90 and ord(e[2]): + del trk[a][i] - 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: + def addToTrack(self, offset, event): + """ Add an event to a track. - miditrk[123] = [event1, event2, ...] - """ + 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: - if offset<0: - offset=0 + miditrk[123] = [event1, event2, ...] + """ - tr=self.miditrk + if offset<0: + offset=0 - if offset in tr: - tr[offset].append(event) - else: - tr[offset]=[event] + tr=self.miditrk + + if offset in tr: + tr[offset].append(event) + else: + tr[offset]=[event] class TimeSig: - """ Track and set the current time signature. + """ Track and set the current time signature. - Timesigs are completely optional and are inserted into - the MIDI file by addTimeSig(). MMA routines ignore timesig - settings. - """ + Timesigs are completely optional and are inserted into + the MIDI file by addTimeSig(). MMA routines ignore timesig + settings. + """ - def __init__(self): - """ Initialze to null value, user will never set to this.""" + def __init__(self): + """ Initialze to null value, user will never set to this.""" - self.lastsig = (None,None) + self.lastsig = (None,None) - def set(self, nn, dd): - """ Set timesig. If no change from last value, ignore. """ + def set(self, nn, dd): + """ Set timesig. If no change from last value, ignore. """ - if self.lastsig != (nn, dd): - gbl.mtrks[0].addTimeSig(gbl.tickOffset, nn, dd, 48, 8) - self.lastsig = (nn, dd) + if self.lastsig != (nn, dd): + gbl.mtrks[0].addTimeSig(gbl.tickOffset, nn, dd, 48, 8) + self.lastsig = (nn, dd) - def get(self): - """ Return existing timesig. """ + def get(self): + """ Return existing timesig. """ - return self.lastsig + return self.lastsig timeSig = TimeSig() diff --git a/mma/MMA/midiC.py b/mma/MMA/midiC.py index 16b9aca..4fd4f3a 100644 --- a/mma/MMA/midiC.py +++ b/mma/MMA/midiC.py @@ -18,207 +18,72 @@ 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 +Bob van der Poel -This module contains the constant names for the various -MIDI controllers, and conversion routines. +This module contains interface for MIDI constants and conversion routines. """ from MMA.common import * - -""" 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] - - -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' ] - - -upperVoiceNames = [name.upper() for name in voiceNames] - -ctrlNames = [ - ### also see: http://www.midi.org/about-midi/table3.shtml - - ### 0-31 Double Precise Controllers - ### MSB (14-bits, 16,384 values) - - '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', - - ### 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] - +from MMA.miditables import * def drumToValue(name): - """ Get the value of the drum tone (-1==error). """ + """ 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) + 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) - if v <0 or v > 127: - error("Note in Drum Tone list must be 0..127, not %s" % v) + if v <0 or v > 127: + error("Note in Drum Tone list must be 0..127, not %s" % v) - return v + return v def instToValue(name): - """ Get the value of the instrument name (-1==error). """ + """ Get the value of the instrument name (-1==error). """ - try: - return upperVoiceNames.index(name.upper()) - except ValueError: - return -1 + try: + return upperVoiceNames.index(name.upper()) + except ValueError: + return -1 def ctrlToValue(name): - """ Get the value of the controler name (-1==error). """ + """ Get the value of the controler name (-1==error). """ - try: - return upperCtrlNames.index(name.upper()) - except ValueError: - return -1 + try: + return upperCtrlNames.index(name.upper()) + except ValueError: + return -1 def valueToInst(val): - """ Get the name of the inst. (or 'ERR'). """ + """ Get the name of the inst. (or 'ERR'). """ - try: - return voiceNames[val] - except IndexError: - return "ERROR" + try: + return voiceNames[val] + except IndexError: + return "ERROR" def valueToDrum(val): - """ Get the name of the drum tone. + """ 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). - """ + 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). + """ - if val<27 or val>86: - return str(val) - else: - return drumNames[val-27] + if val<27 or val>86: + return str(val) + else: + return drumNames[val-27] def valueToCtrl(val): - """ Get the name of the controller (or 'ERR'). """ + """ Get the name of the controller (or 'ERR'). """ - try: - return ctrlNames[val] - except IndexError: - return "ERROR" + try: + return ctrlNames[val] + except IndexError: + return "ERROR" diff --git a/mma/MMA/midiIn.py b/mma/MMA/midiIn.py index 83a68dd..5a9d7ee 100644 --- a/mma/MMA/midiIn.py +++ b/mma/MMA/midiIn.py @@ -19,7 +19,7 @@ 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 +Bob van der Poel """ @@ -38,482 +38,481 @@ offset = 0 # Current pointer into the MIDI file """ Helper functions It might be better to have these - functions setup in midiM.py ... but it's easier just - now to have it here. The main problem is that we are - reading from a buffer and don't know how many bytes to - pass back and forth. + functions setup in midiM.py ... but it's easier just + now to have it here. The main problem is that we are + reading from a buffer and don't know how many bytes to + pass back and forth. """ def mvarlen(): - """ Convert variable length midi value to int. """ + """ Convert variable length midi value to int. """ - global offset + global offset - x=0L - for i in range(4): + x=0L + for i in range(4): - try: - byte=ord(midifile[offset]) - offset += 1 - except: - error("Invalid MIDI file include (varlen->int).") + try: + byte=ord(midifile[offset]) + offset += 1 + except: + error("Invalid MIDI file include (varlen->int)") - if byte < 0x80: - x = ( x << 7 ) + byte - break - else: - x = ( x << 7 ) + ( byte & 0x7f ) + if byte < 0x80: + x = ( x << 7 ) + byte + break + else: + x = ( x << 7 ) + ( byte & 0x7f ) - return int(x) + return int(x) def chars(count): - """ Return 'count' chars from file (updates global pointer). """ + """ Return 'count' chars from file (updates global pointer). """ - global offset + global offset - bytes=midifile[offset:offset+count] - offset+=count - return bytes + bytes=midifile[offset:offset+count] + offset+=count + return bytes def m1i(): - """ Get 1 byte (updates global pointer). """ + """ Get 1 byte (updates global pointer). """ - global offset + global offset - try: - byte = midifile[offset] - offset += 1 - except: - error("Invalid MIDI file include (byte, offset=%s)." % offset) + try: + byte = midifile[offset] + offset += 1 + except: + error("Invalid MIDI file include (byte, offset=%s)" % offset) - return ord(byte) + return ord(byte) def m32i(): - """ Convert 4 bytes to integer. """ + """ Convert 4 bytes to integer. """ - global offset + global offset - x = 0L - for i in range(4): - try: - byte = midifile[offset] - offset += 1 - except: - error("Invalid MIDI file include (i32->int, offset=%s)." % offset) - x = (x << 8) + ord(byte) + x = 0L + for i in range(4): + try: + byte = midifile[offset] + offset += 1 + except: + error("Invalid MIDI file include (i32->int, offset=%s)" % offset) + x = (x << 8) + ord(byte) - return int(x) + return int(x) def m16i(): - """ Convert 2 bytes to integer. """ + """ Convert 2 bytes to integer. """ - global offset + global offset - x = 0L - for i in range(2): - try: - byte = midifile[offset] - offset += 1 - except: - error("Invalid MIDI file include (i16->int, offset=%s)." % offset) - x = (x << 8) + ord(byte) + x = 0L + for i in range(2): + try: + byte = midifile[offset] + offset += 1 + except: + error("Invalid MIDI file include (i16->int, offset=%s)" % offset) + x = (x << 8) + ord(byte) - return int(x) + return int(x) ###################################################### ## Main function, called from parser. def midiinc(ln): - """ Include a MIDI file into MMA generated files. """ + """ Include a MIDI file into MMA generated files. """ - global midifile, offset + global midifile, offset - filename = '' - doLyric = 0 - doText = 0 - volAdjust = 100 - octAdjust = 0 - transpose = None - channels = [] + filename = '' + doLyric = 0 + doText = 0 + volAdjust = 100 + octAdjust = 0 + transpose = None + channels = [] - # These are the start/end points for the included file. They are in - # beats, but are adjusted after the file is opened to ticks. + # These are the start/end points for the included file. They are in + # beats, but are adjusted after the file is opened to ticks. - istart=0 - iend = 0xffffff + istart=0 + iend = 0xffffff - for a in ln: - cmd, opt = a.split('=') + for a in ln: + cmd, opt = a.split('=') - cmd=cmd.upper() + cmd=cmd.upper() - if cmd == 'FILE': - filename = os.path.expanduser(opt) + if cmd == 'FILE': + filename = os.path.expanduser(opt) - elif cmd == 'VOLUME': - volAdjust = stoi(opt) + elif cmd == 'VOLUME': + volAdjust = stoi(opt) - elif cmd == 'OCTAVE': - octAdjust = stoi(opt) - if octAdjust < -4 or octAdjust > 4: - error("Octave adjustment must be -4 to 4, not %s." % opt) - octAdjust *= 12 + elif cmd == 'OCTAVE': + octAdjust = stoi(opt) + if octAdjust < -4 or octAdjust > 4: + error("Octave adjustment must be -4 to 4, not %s" % opt) + octAdjust *= 12 - elif cmd == 'TRANSPOSE': - transpose = stoi(opt) - if transpose < -24 or transpose > 24: - error("Tranpose must be -24 to 24, not %s." % opt) + elif cmd == 'TRANSPOSE': + transpose = stoi(opt) + if transpose < -24 or transpose > 24: + error("Tranpose must be -24 to 24, not %s" % opt) - elif cmd == 'START': - istart = stof(opt) + elif cmd == 'START': + istart = stof(opt) - elif cmd == 'END': - iend = stof(opt) + elif cmd == 'END': + iend = stof(opt) - elif cmd == 'TEXT': - opt=opt.upper() - if opt in ("ON", 1): - doText=1 - elif opt in ("OFF", 0): - doText=0 - else: - error("MidiInc Text= expecting 'ON' or 'OFF'") + elif cmd == 'TEXT': + opt=opt.upper() + if opt in ("ON", 1): + doText=1 + elif opt in ("OFF", 0): + doText=0 + else: + error("MidiInc Text= expecting 'ON' or 'OFF'") - elif cmd == 'LYRIC' and opt != '0': - opt=opt.upper() - if opt in ("ON", 1): - doLyric=1 - elif opt in ("OFF", 0): - doLyric=0 - else: - error("MidiInc Lyric= expecting 'ON' or 'OFF'") + elif cmd == 'LYRIC' and opt != '0': + opt=opt.upper() + if opt in ("ON", 1): + doLyric=1 + elif opt in ("OFF", 0): + doLyric=0 + else: + error("MidiInc Lyric= expecting 'ON' or 'OFF'") - # make sure this is last option ... it has to be a TRACKNAME=CHANNEL-NUMBER + # make sure this is last option ... it has to be a TRACKNAME=CHANNEL-NUMBER - else: - trackAlloc(cmd, 0) - if not cmd in gbl.tnames: - error("%s is not a valid MMA track." % cmd) + else: + trackAlloc(cmd, 0) + if not cmd in gbl.tnames: + error("%s is not a valid MMA track" % cmd) - ch = stoi(opt) - if ch < 1 or ch > 16: - error("MIDI channel for import must be 1..16, not %s." % ch) + ch = stoi(opt) + if ch < 1 or ch > 16: + error("MIDI channel for import must be 1..16, not %s" % ch) - channels.append( (cmd, ch-1)) + channels.append( (cmd, ch-1)) - if not channels: - if doLyric or doText: - warning("MidiInc: no import channels specified, only text or lyrics imported.") - else: - error("MidiInc: A channel to import and a destination track must be specified.") + if not channels: + if doLyric or doText: + warning("MidiInc: no import channels specified, only text or lyrics imported") + else: + error("MidiInc: A channel to import and a destination track must be specified") - if (istart >= iend) or (istart < 0) or (iend < 0): - error("MidiInc range invalid: start=%s, end=%s" % (istart, iend)) + if (istart >= iend) or (istart < 0) or (iend < 0): + error("MidiInc range invalid: start=%s, end=%s" % (istart, iend)) - if gbl.debug: - print "MidiInc: file=%s, Volume=%s, Octave=%s, Transpose=%s, Lyric=%s, Text=%s, Range=%s..%s"\ - % (filename, volAdjust, octAdjust, transpose, doLyric, doText, istart, iend) - for t, ch in channels: - print "MidiInc: Channel %s --> Track %s" % (ch+1, t) + if gbl.debug: + print "MidiInc: file=%s, Volume=%s, Octave=%s, Transpose=%s, Lyric=%s, Text=%s, Range=%s..%s"\ + % (filename, volAdjust, octAdjust, transpose, doLyric, doText, istart, iend) + for t, ch in channels: + print "MidiInc: Channel %s --> Track %s" % (ch+1, t) - # If transpose was NOT set, use the global transpose value + # If transpose was NOT set, use the global transpose value - if transpose == None: - transpose = gbl.transpose + if transpose == None: + transpose = gbl.transpose - octAdjust += transpose # this takes care of octave and transpose + octAdjust += transpose # this takes care of octave and transpose - try: - inpath = file(filename, "rb") - except: - error("Unable to open MIDI file %s for reading" % filename) + try: + inpath = file(filename, "rb") + except: + error("Unable to open MIDI file %s for reading" % filename) - midifile=inpath.read() - inpath.close() + midifile=inpath.read() + inpath.close() - # Create our storage: - # A dic with the channels 0-15 as keys for the midi note events - # 2 lists for lyrics and text events. These have tuples for (time, text) + # Create our storage: + # A dic with the channels 0-15 as keys for the midi note events + # 2 lists for lyrics and text events. These have tuples for (time, text) - events={} - for c in range(0,16): - events[c]=[] + events={} + for c in range(0,16): + events[c]=[] - textEvs=[] - lyricEvs=[] + textEvs=[] + lyricEvs=[] - # Ensure this is valid header + # Ensure this is valid header - hd=midifile[0:4] - if hd != 'MThd': - error("Expecting 'HThd', %s not a standard midi file." % filename) + hd=midifile[0:4] + if hd != 'MThd': + error("Expecting 'HThd', %s not a standard midi file" % filename) - offset = 4 - a = m32i() + offset = 4 + a = m32i() - if a != 6: - error("Expecting a 32 bit value of 6 in header") + if a != 6: + error("Expecting a 32 bit value of 6 in header") - format=m16i() + format=m16i() - if format not in (0,1): - error("MIDI file format %s not recognized" % format) + if format not in (0,1): + error("MIDI file format %s not recognized" % format) - ntracks=m16i() - beatDivision=m16i() + ntracks=m16i() + beatDivision=m16i() - if beatDivision != gbl.BperQ: - warning("MIDI file '%s' tick/beat of %s differs from MMA's " - "%s. Will try to compensate." % - (filename, beatDivision, gbl.BperQ)) + if beatDivision != gbl.BperQ: + warning("MIDI file '%s' tick/beat of %s differs from MMA's " + "%s. Will try to compensate" % + (filename, beatDivision, gbl.BperQ)) - # Adjust start/end to the file's tick + # Adjust start/end to the file's tick - istart *= beatDivision - iend *= beatDivision + istart *= beatDivision + iend *= beatDivision - midievents={} - firstNote = 0xffffff + midievents={} + firstNote = 0xffffff - for tr in range(ntracks): - tm=0 + for tr in range(ntracks): + tm=0 - hdr = midifile[offset:offset+4] - offset+=4 + hdr = midifile[offset:offset+4] + offset+=4 - if hdr != 'MTrk': - error("Malformed MIDI file in track header") - trlen = m32i() # track length, not used? + if hdr != 'MTrk': + error("Malformed MIDI file in track header") + trlen = m32i() # track length, not used? - lastevent = None + lastevent = None - """ Parse the midi file. We have to parse off each event, even - though many will just be thrown away. You can't just skip around - in a midi file :) In the future we might decide to include meta - stuff, etc. Or, we may not :) For now, we keep: - - note on - - note off - - key pressure - - control change - - program change - - channel pressure - - pitch blend - - text event - - lyric event - """ + """ Parse the midi file. We have to parse off each event, even + though many will just be thrown away. You can't just skip around + in a midi file :) In the future we might decide to include meta + stuff, etc. Or, we may not :) For now, we keep: + - note on + - note off + - key pressure + - control change + - program change + - channel pressure + - pitch blend + - text event + - lyric event + """ - while 1: - tm += mvarlen() # adjust total offset by delta + while 1: + tm += mvarlen() # adjust total offset by delta - ev=m1i() + ev=m1i() - if ev < 0x80: - if not lastevent: - error("Illegal running status in %s at %s" \ - % (midifile, offset)) - offset -= 1 - ev=lastevent + if ev < 0x80: + if not lastevent: + error("Illegal running status in %s at %s" % (midifile, offset)) + offset -= 1 + ev=lastevent - sValue = ev>>4 # Shift MSBs to get a 4 bit value - channel = ev & 0x0f + sValue = ev>>4 # Shift MSBs to get a 4 bit value + channel = ev & 0x0f - if sValue == 0x8: # note off event + if sValue == 0x8: # note off event - note=m1i() - vel=m1i() + note=m1i() + vel=m1i() - if octAdjust and channel != 10: - note += octAdjust - if note < 0 or note > 127: - continue + if octAdjust and channel != 10: + note += octAdjust + if note < 0 or note > 127: + continue - events[channel].append([tm, ev & 0xf0, chr(note)+chr(vel)]) + events[channel].append([tm, ev & 0xf0, chr(note)+chr(vel)]) - elif sValue == 0x9: # note on event - if tm < firstNote: - firstNote = tm + elif sValue == 0x9: # note on event + if tm < firstNote: + firstNote = tm - note=m1i() - vel=m1i() + note=m1i() + vel=m1i() - if octAdjust and channel != 10: - note += octAdjust - if note < 0 or note > 127: - continue + if octAdjust and channel != 10: + note += octAdjust + if note < 0 or note > 127: + continue - if volAdjust != 100: - vel = int( (vel*volAdjust)/100) - if vel<0: vel=1 - if vel>127: vel=127 + if volAdjust != 100: + vel = int( (vel*volAdjust)/100) + if vel<0: vel=1 + if vel>127: vel=127 - events[ev & 0xf].append([tm, ev & 0xf0, chr(note)+chr(vel)]) + events[ev & 0xf].append([tm, ev & 0xf0, chr(note)+chr(vel)]) - elif sValue == 0xa: # key pressure - events[ev & 0xf].append([tm, ev & 0xf0, chars(2)]) + elif sValue == 0xa: # key pressure + events[ev & 0xf].append([tm, ev & 0xf0, chars(2)]) - elif sValue == 0xb: # control change - events[ev & 0xf].append([tm, ev & 0xf0, chars(2)]) + elif sValue == 0xb: # control change + events[ev & 0xf].append([tm, ev & 0xf0, chars(2)]) - elif sValue == 0xc: # program change - events[ev & 0xf].append([tm, ev & 0xf0, chars(1)]) + elif sValue == 0xc: # program change + events[ev & 0xf].append([tm, ev & 0xf0, chars(1)]) - elif sValue == 0xd: # channel pressure - events[ev & 0xf].append([tm, ev & 0xf0, chars(1)]) + elif sValue == 0xd: # channel pressure + events[ev & 0xf].append([tm, ev & 0xf0, chars(1)]) - elif sValue == 0xe: # pitch blend - events[ev & 0xf].append([tm, ev & 0xf0, chars(2)]) + elif sValue == 0xe: # pitch blend + events[ev & 0xf].append([tm, ev & 0xf0, chars(2)]) - elif sValue == 0xf: # system, mostly ignored - if ev == 0xff: # meta events - a=m1i() + elif sValue == 0xf: # system, mostly ignored + if ev == 0xff: # meta events + a=m1i() - if a == 0x00: # sequence number - l=mvarlen() - offset += l + if a == 0x00: # sequence number + l=mvarlen() + offset += l - elif a == 0x01: # text (could be lyrics) - textEvs.append((tm, chars(mvarlen()))) + elif a == 0x01: # text (could be lyrics) + textEvs.append((tm, chars(mvarlen()))) - elif a == 0x02: # copyright - l=mvarlen() - offset += l + elif a == 0x02: # copyright + l=mvarlen() + offset += l - elif a == 0x03: # seq/track name - l=mvarlen() - offset += l + elif a == 0x03: # seq/track name + l=mvarlen() + offset += l - elif a == 0x04: # instrument name - l=mvarlen() - offset += l + elif a == 0x04: # instrument name + l=mvarlen() + offset += l - elif a == 0x05: # lyric - lyricEvs.append((tm, chars(mvarlen()))) + elif a == 0x05: # lyric + lyricEvs.append((tm, chars(mvarlen()))) - elif a == 0x06: # marker - l=mvarlen() - offset += l + elif a == 0x06: # marker + l=mvarlen() + offset += l - elif a == 0x07: # cue point - l=mvarlen() - offset += l + elif a == 0x07: # cue point + l=mvarlen() + offset += l - elif a == 0x21: # midi port - l=mvarlen() - offset += l + elif a == 0x21: # midi port + l=mvarlen() + offset += l - elif a == 0x2f: # end of track - l=mvarlen() - offset += l - break + elif a == 0x2f: # end of track + l=mvarlen() + offset += l + break - elif a == 0x51: #tempo - l=mvarlen() - offset += l + elif a == 0x51: #tempo + l=mvarlen() + offset += l - elif a == 0x54: # SMPTE offset - l=mvarlen() - offset += l + elif a == 0x54: # SMPTE offset + l=mvarlen() + offset += l - elif a == 0x58: # time sig - l=mvarlen() - offset += l + elif a == 0x58: # time sig + l=mvarlen() + offset += l - elif a == 0x59: # key sig - l=mvarlen() - offset += l + elif a == 0x59: # key sig + l=mvarlen() + offset += l - else: # probably 0x7f, proprietary event - l=mvarlen() - offset += l + else: # probably 0x7f, proprietary event + l=mvarlen() + offset += l - elif ev == 0xf0: # system exclusive - l=mvarlen() - offset += l + elif ev == 0xf0: # system exclusive + l=mvarlen() + offset += l - elif ev == 0xf2: # song position pointer, 2 bytes - offset += 2 + elif ev == 0xf2: # song position pointer, 2 bytes + offset += 2 - elif ev == 0xf3: # song select, 1 byte - offset += 1 - - else: # all others are single byte commands - pass + elif ev == 0xf3: # song select, 1 byte + offset += 1 + + else: # all others are single byte commands + pass - if ev >= 0x80 and ev <= 0xef: - lastevent = ev + if ev >= 0x80 and ev <= 0xef: + lastevent = ev - # Midi file parsed, add selected events to mma data + # Midi file parsed, add selected events to mma data - beatad = gbl.BperQ / float(beatDivision) + beatad = gbl.BperQ / float(beatDivision) - if doText: - inst=0 - disc=0 - for tm,tx in textEvs: - delta = tm-firstNote - if delta >= istart and delta <= iend: - gbl.mtrks[0].addText(gbl.tickOffset + int(delta * beatad), tx) - inst+=1 - else: - disc+=1 - if gbl.debug: - print"MidiInc text events: %s inserted, %s out of range." % (inst, disc) - - if doLyric: - inst=0 - disc=0 - for tm, tx in lyricEvs: - delta = tm-firstNote - if delta >= istart and delta <= iend: - gbl.mtrks[0].addLyric(gbl.tickOffset + int(delta * beatad), tx) - inst+=1 - else: - disc+=1 - if gbl.debug: - print"MidiInc lyric events: %s inserted, %s out of range." % (inst, disc) - - - for n,c in channels: - if not len(events[c]): - warning("No data to assign from imported channel %s to track %s." % (c+1, n)) - - inst=0 - disc=0 - for tr, ch in channels: - t=gbl.tnames[tr] - if not t.channel: - t.setChannel() - - t.clearPending() - if t.voice[0] != t.ssvoice: - gbl.mtrks[t.channel].addProgChange( gbl.tickOffset, t.voice[0]) - - channel = t.channel - track = gbl.mtrks[channel] - - for ev in events[ch]: - delta = ev[0]-firstNote - if delta >= istart and delta <= iend: - track.addToTrack( gbl.tickOffset + int(delta * beatad), - chr(ev[1] | channel-1) + ev[2] ) - inst+=1 - else: - disc+=1 - - if gbl.debug: - print"MidiInc events: %s inserted, %s out of range." % (inst, disc) + if doText: + inst=0 + disc=0 + for tm,tx in textEvs: + delta = tm-firstNote + if delta >= istart and delta <= iend: + gbl.mtrks[0].addText(gbl.tickOffset + int(delta * beatad), tx) + inst+=1 + else: + disc+=1 + if gbl.debug: + print"MidiInc text events: %s inserted, %s out of range." % (inst, disc) + + if doLyric: + inst=0 + disc=0 + for tm, tx in lyricEvs: + delta = tm-firstNote + if delta >= istart and delta <= iend: + gbl.mtrks[0].addLyric(gbl.tickOffset + int(delta * beatad), tx) + inst+=1 + else: + disc+=1 + if gbl.debug: + print"MidiInc lyric events: %s inserted, %s out of range." % (inst, disc) + + + for n,c in channels: + if not len(events[c]): + warning("No data to assign from imported channel %s to track %s" % (c+1, n)) + + inst=0 + disc=0 + for tr, ch in channels: + t=gbl.tnames[tr] + if not t.channel: + t.setChannel() + + t.clearPending() + if t.voice[0] != t.ssvoice: + gbl.mtrks[t.channel].addProgChange( gbl.tickOffset, t.voice[0]) + + channel = t.channel + track = gbl.mtrks[channel] + + for ev in events[ch]: + delta = ev[0]-firstNote + if delta >= istart and delta <= iend: + track.addToTrack( gbl.tickOffset + int(delta * beatad), + chr(ev[1] | channel-1) + ev[2] ) + inst+=1 + else: + disc+=1 + + if gbl.debug: + print"MidiInc events: %s inserted, %s out of range." % (inst, disc) diff --git a/mma/MMA/midiM.py b/mma/MMA/midiM.py index 25e0672..b2b39ae 100644 --- a/mma/MMA/midiM.py +++ b/mma/MMA/midiM.py @@ -18,7 +18,7 @@ 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 +Bob van der Poel This module contains the MIDI number (un)packing routines. @@ -29,29 +29,29 @@ MIDI expects. def intToWord(x): - """ Convert INT to a 2 byte MSB LSB value. """ + """ Convert INT to a 2 byte MSB LSB value. """ - return chr(x>>8 & 0xff) + chr(x & 0xff) + return chr(x>>8 & 0xff) + chr(x & 0xff) def intTo3Byte(x): - """ Convert INT to a 3 byte MSB...LSB value. """ + """ Convert INT to a 3 byte MSB...LSB value. """ - return intToLong(x)[1:] + return intToLong(x)[1:] def intToLong(x): - """ Convert INT to a 4 byte MSB...LSB value. """ + """ Convert INT to a 4 byte MSB...LSB value. """ - return intToWord(x>>16) + intToWord(x) + return intToWord(x>>16) + intToWord(x) def intToVarNumber(x): - """ Convert INT to a variable length MIDI value. """ + """ Convert INT to a variable length MIDI value. """ - lst = chr(x & 0x7f) - while 1: - x = x >> 7 - if x: - lst = chr((x & 0x7f) | 0x80) + lst - else: - return lst + lst = chr(x & 0x7f) + while 1: + x = x >> 7 + if x: + lst = chr((x & 0x7f) | 0x80) + lst + else: + return lst diff --git a/mma/MMA/miditables.py b/mma/MMA/miditables.py new file mode 100644 index 0000000..238bd0f --- /dev/null +++ b/mma/MMA/miditables.py @@ -0,0 +1,166 @@ + +# miditables.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 constant names for the various +MIDI controllers. + +Having only the constants in this separate file permits to +call this from other programs, mainly the mma doc creators. + +""" + + + +""" 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] + + +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' ] + + +upperVoiceNames = [name.upper() for name in voiceNames] + +ctrlNames = [ + ### also see: http://www.midi.org/about-midi/table3.shtml + + ### 0-31 Double Precise Controllers + ### MSB (14-bits, 16,384 values) + + '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', + + ### 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 6ce394e..5649bfa 100644 --- a/mma/MMA/notelen.py +++ b/mma/MMA/notelen.py @@ -2,7 +2,7 @@ # notelen.py """ -This module is an integeral part of the program +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 @@ -19,8 +19,8 @@ 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 - +Bob van der Poel + """ import gbl @@ -28,103 +28,103 @@ from MMA.common import * noteLenTable = { - '0' : 1, # special 0==1 midi tick - '1' : gbl.BperQ * 4, # whole note - '2' : gbl.BperQ * 2, # 1/2 - '23' : gbl.BperQ * 4 / 3, # 1/2 triplet - '4' : gbl.BperQ, # 1/4 - '43' : gbl.BperQ * 2 / 3, # 1/4 triplet - '8' : gbl.BperQ / 2, # 1/8 - '81' : None, # short 1/8 swing note - '82' : None, # long 1/8 swing note - '16' : gbl.BperQ / 4, # 1/16 - '32' : gbl.BperQ / 8, # 1/32 - '64' : gbl.BperQ / 16, # 1/64 - '6' : gbl.BperQ / 6, # 1/16 note triplet - '3' : gbl.BperQ / 3, # 1/8 note triplet - '5' : gbl.BperQ / 5 } # 1/8 note quintuplet + '0' : 1, # special 0==1 midi tick + '1' : gbl.BperQ * 4, # whole note + '2' : gbl.BperQ * 2, # 1/2 + '23' : gbl.BperQ * 4 / 3, # 1/2 triplet + '4' : gbl.BperQ, # 1/4 + '43' : gbl.BperQ * 2 / 3, # 1/4 triplet + '8' : gbl.BperQ / 2, # 1/8 + '81' : None, # short 1/8 swing note + '82' : None, # long 1/8 swing note + '16' : gbl.BperQ / 4, # 1/16 + '32' : gbl.BperQ / 8, # 1/32 + '64' : gbl.BperQ / 16, # 1/64 + '6' : gbl.BperQ / 6, # 1/16 note triplet + '3' : gbl.BperQ / 3, # 1/8 note triplet + '5' : gbl.BperQ / 5 } # 1/8 note quintuplet def swingMode(ln): - """ Enable/Disable Swing timing mode. """ + """ Enable/Disable Swing timing mode. """ - - emsg = "Use: SwingMode [ On, Off, 0, 1 Skew=xx ]." - - if not ln: - error(emsg) - - for v in ln: + emsg = "Use: SwingMode [ On, Off, 0, 1 Skew=xx ]." - a = v.upper() + if not ln: + error(emsg) - if a in ("ON", "1"): - gbl.swingMode = 1 - continue - - if a in ("OFF", "0"): - gbl.swingMode = 0 - continue - if a.find('=')>1: - a,b = a.split('=') + for v in ln: - if a == 'SKEW': - gbl.swingSkew = b - v = int( stoi(b) * gbl.BperQ / 100) - noteLenTable['81'] = v - noteLenTable['82'] = gbl.BperQ - v - continue + a = v.upper() - error(emsg) + if a in ("ON", "1"): + gbl.swingMode = 1 + continue + + if a in ("OFF", "0"): + gbl.swingMode = 0 + continue + + if a.find('=')>1: + a,b = a.split('=') + + if a == 'SKEW': + gbl.swingSkew = b + v = int( stoi(b) * gbl.BperQ / 100) + noteLenTable['81'] = v + noteLenTable['82'] = gbl.BperQ - v + continue + + error(emsg) + + if gbl.debug: + print "SwingMode: Status=%s, Skew Note lengths: %s and %s ticks." % \ + (gbl.swingMode, noteLenTable['81'], noteLenTable['82']) - if gbl.debug: - print "SwingMode: Status=%s, Skew Note lengths: %s and %s ticks." % \ - (gbl.swingMode, noteLenTable['81'], noteLenTable['82']) - swingMode(['Skew=66']) # Set the default swingskew values. -def getNoteLen(n): - """ Convert a Note to a midi tick length. - - Notes are 1==Whole, 4==Quarter, etc. - Notes can be dotted or double dotted. - Notes can be combined: 1+4 == 5 beats, 4. or 4+8 == dotted 1/4 +def getNoteLen(n): + """ Convert a Note to a midi tick length. + + Notes are 1==Whole, 4==Quarter, etc. + Notes can be dotted or double dotted. + Notes can be combined: 1+4 == 5 beats, 4. or 4+8 == dotted 1/4 1-4 == 3 beats, 1-0 == 4 beats less a midi tick - """ - - length = 0 - - n=n.replace('-', '+-') # change "2-4" to "2+-4" for easier parsing - n=n.replace('++-', '+-') # and in case we already used "+-", take out 2nd "+" - - for a in str(n).split('+'): - if a.endswith('..'): - dot = 2 - a=a[:-2] - elif a.endswith('.'): - dot = 1 - a=a[:-1] - else: - dot = 0 + """ - try: - if a.startswith('-'): - i = noteLenTable[a[1:]] * -1 - else: - i = noteLenTable[a] + length = 0 - except: - error("Unknown note duration %s" % n ) + n=n.replace('-', '+-') # change "2-4" to "2+-4" for easier parsing + n=n.replace('++-', '+-') # and in case we already used "+-", take out 2nd "+" - if dot == 2: - i += i/2 + i/4 - elif dot == 1: - i += i/2 - length += i - - return length + for a in str(n).split('+'): + if a.endswith('..'): + dot = 2 + a=a[:-2] + elif a.endswith('.'): + dot = 1 + a=a[:-1] + else: + dot = 0 + + try: + if a.startswith('-'): + i = noteLenTable[a[1:]] * -1 + else: + i = noteLenTable[a] + + except: + error("Unknown note duration %s" % n ) + + if dot == 2: + i += i/2 + i/4 + elif dot == 1: + i += i/2 + length += i + + return length diff --git a/mma/MMA/options.py b/mma/MMA/options.py index f6eba05..f56b0d5 100644 --- a/mma/MMA/options.py +++ b/mma/MMA/options.py @@ -18,7 +18,7 @@ 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 +Bob van der Poel """ @@ -38,188 +38,156 @@ from MMA.macro import macros def opts(): - """ Option parser. """ + """ Option parser. """ - try: - opts, args = getopt.gnu_getopt(sys.argv[1:], - "dpsS:ri:wneom:f:M:cgGvD:", [] ) + try: + opts, args = getopt.gnu_getopt(sys.argv[1:], + "dpsS:ri:wneom:f:M:cgGvD:0", [] ) - except getopt.GetoptError: - usage() + except getopt.GetoptError: + usage() - for o,a in opts: - if o == '-d': - gbl.debug = gbl.Ldebug = 1 + for o,a in opts: + + if o == '-d': + gbl.debug = gbl.Ldebug = 1 - elif o == '-o': - gbl.showFilenames = gbl.LshowFilenames = 1 + elif o == '-o': + gbl.showFilenames = gbl.LshowFilenames = 1 - elif o == '-p': - gbl.pshow = gbl.Lpshow = 1 + elif o == '-p': + gbl.pshow = gbl.Lpshow = 1 - elif o == '-s': - gbl.seqshow = gbl.Lseqshow = 1 + elif o == '-s': + gbl.seqshow = gbl.Lseqshow = 1 - elif o == '-S': - ln = a.split('=', 1) - macros.setvar(ln) + elif o == '-S': + ln = a.split('=', 1) + macros.setvar(ln) - elif o == '-r': - gbl.showrun = gbl.Lshowrun = 1 + elif o == '-r': + gbl.showrun = gbl.Lshowrun = 1 - elif o == '-w': - gbl.noWarn = gbl.LnoWarn = 1 + elif o == '-w': + gbl.noWarn = gbl.LnoWarn = 1 - elif o == '-n': - gbl.noOutput = gbl.LnoOutput = 1 + elif o == '-n': + gbl.noOutput = gbl.LnoOutput = 1 - elif o == '-e': - gbl.showExpand = gbl.LshowExpand = 1 + elif o == '-e': + gbl.showExpand = gbl.LshowExpand = 1 - elif o == '-c': - gbl.chshow = gbl.Lchshow = 1 + elif o == '-c': + gbl.chshow = gbl.Lchshow = 1 - elif o == '-f': - gbl.outfile = a + elif o == '-f': + gbl.outfile = a - elif o == '-i': - gbl.mmaRC = a + elif o == '-i': + gbl.mmaRC = a - elif o == '-g': - gbl.makeGrvDefs = 1 + elif o == '-g': + gbl.makeGrvDefs = 1 - elif o == '-G': - gbl.makeGrvDefs = 2 + elif o == '-G': + gbl.makeGrvDefs = 2 - elif o == '-m': - try: - a=int(a) - except: - error("Expecting -m arg to be a integer") - gbl.maxBars = a + elif o == '-m': + try: + a=int(a) + except: + error("Expecting -m arg to be a integer") + gbl.maxBars = a - elif o == '-v': - print "%s" % gbl.version - sys.exit(0) + elif o == '-v': + print "%s" % gbl.version + sys.exit(0) - elif o == '-M': - if a in ['0', '1']: - gbl.cmdSMF = a - else: - error("Only a '0' or '1' is permitted for the -M arg.") + elif o == '-M': + if a in ['0', '1']: + gbl.cmdSMF = a + else: + error("Only a '0' or '1' is permitted for the -M arg") - elif o == '-D': - if a == 'xl': - gbl.docs = 1 + elif o == '-D': + if a == 'xl': + gbl.docs = 1 - elif a == 'xh': - gbl.docs = 2 + elif a == 'xh': + gbl.docs = 2 - elif a == 'k': + elif a == 'k': - def pl(msg, lst): - print msg, - for i in sorted(lst.keys()): - print i, - print "\n" + def pl(msg, lst): + print msg, + for i in sorted(lst.keys()): + print i, + print "\n" - pl("Base track names:", MMA.alloc.trkClasses ) - pl("Commands:", MMA.parse.simpleFuncs) - pl("TrackCommands:", MMA.parse.trackFuncs) - print "Not complete ... subcommands, comments, chords..." - sys.exit(0) + pl("Base track names:", MMA.alloc.trkClasses ) + pl("Commands:", MMA.parse.simpleFuncs) + pl("TrackCommands:", MMA.parse.trackFuncs) + print "Not complete ... subcommands, comments, chords..." + sys.exit(0) + else: + print "Unknown -D option." + usage() - elif a == 'n': - MMA.chords.docs() - sys.exit(0) + elif o == '-0': + gbl.synctick = 1 - elif a == 'da': - MMA.docs.docDrumNames("a") - sys.exit(0) + else: + usage() # unreachable?? - elif a == 'dm': - MMA.docs.docDrumNames("m") - sys.exit(0) - - elif a == 'ia': - MMA.docs.docInstNames("a") - sys.exit(0) - - elif a == 'im': - MMA.docs.docInstNames("m") - sys.exit(0) - - elif a == 'ca': - MMA.docs.docCtrlNames("a") - sys.exit(0) - - elif a == 'cm': - MMA.docs.docCtrlNames("m") - sys.exit(0) - - else: - print "Unknown -D option." - usage() - - - else: - usage() # unreachable?? - - if args: - if gbl.infile: - usage("Only one input filename is permitted.") - gbl.infile = args.pop(0) + if args: + if gbl.infile: + usage("Only one input filename is permitted.") + gbl.infile = args.pop(0) def usage(msg=''): - """ Usage message. """ + """ Usage message. """ - txt=[ - "MMA - Musical Midi Accompaniment", - " Copyright 2003-5, Bob van der Poel. Version %s" % gbl.version , - " Distributed under the terms of the GNU Public License.", - " Usage: mma [opts ...] INFILE [opts ...]", - "", - "Options:", - " -c display default Channel assignments", - " -d enable lots of Debugging messages", - " -Dk print list of MMA keywords", - " -Dxl eXtract Latex doc blocks from file", - " -Dxh eXtract HTML doc blocks from file", - " -Dn print Note/chord table", - " -Ddm print Midi drum names (by MIDI value)", - " -Dda print Midi drum names (alphabetical)", - " -Dim print Inst. names (by MIDI value)", - " -Dia print Inst. names (alphabetical)", - " -Dcm print Controller names (by value)", - " -Dca print Controller names (alphabetical)", - " -e show parsed/Expanded lines", - " -f set output Filename", - " -g update Groove dependency database", - " -G create Groove dependency database", - " -i specify init (mmarc) file", - " -m set Maxbars (default == 500)", - " -M set SMF to 0 or 1", - " -n No generation of midi output", - " -o show complete filenames when Opened", - " -p display Patterns as they are defined", - " -r display Running progress", - " -s display Sequence info during run", - " -S Set macro 'var' to 'data'", - " -v display Version number", - " -w disable Warning messages" ] + txt=[ + "MMA - Musical Midi Accompaniment", + " Copyright 2003-5, Bob van der Poel. Version %s" % gbl.version , + " Distributed under the terms of the GNU Public License.", + " Usage: mma [opts ...] INFILE [opts ...]", + "", + "Options:", + " -c display default Channel assignments", + " -d enable lots of Debugging messages", + " -Dk print list of MMA keywords", + " -Dxl eXtract Latex doc blocks from file", + " -Dxh eXtract HTML doc blocks from file", + " -e show parsed/Expanded lines", + " -f set output Filename", + " -g update Groove dependency database", + " -G create Groove dependency database", + " -i specify init (mmarc) file", + " -m set Maxbars (default == 500)", + " -M set SMF to 0 or 1", + " -n No generation of midi output", + " -o show complete filenames when Opened", + " -p display Patterns as they are defined", + " -r display Running progress", + " -s display Sequence info during run", + " -S Set macro 'var' to 'data'", + " -v display Version number", + " -w disable Warning messages", + " -0 create sync at start of all channel tracks" ] - for a in txt: - print a + for a in txt: + print a - if msg: - print - print msg + if msg: + print + print msg - print - sys.exit(1) + print + sys.exit(1) diff --git a/mma/MMA/parse.py b/mma/MMA/parse.py index a188ac3..e7756cb 100644 --- a/mma/MMA/parse.py +++ b/mma/MMA/parse.py @@ -19,7 +19,7 @@ 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 +Bob van der Poel This module does all file parsing. Most commands @@ -54,28 +54,31 @@ from MMA.pat import seqBump 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 +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. """ class CTable: - chord = None # A pointer to the chordNotes structures - chordZ = None # set if chord is tacet - arpeggioZ = None # set if arpeggio is tacet - walkZ = None # set if walking bass is tacet - drumZ = None # set if drums are tacet - bassZ = None # set if bass is tacet - scaleZ = None # set if scale track is tacet + chord = None # A pointer to the chordNotes structures + chordZ = None # set if chord is tacet + arpeggioZ = None # set if arpeggio is tacet + walkZ = None # set if walking bass is tacet + drumZ = None # set if drums are tacet + bassZ = None # set if bass is tacet + scaleZ = None # set if scale track is tacet + ariaZ = None # set if aria track is tacet - def __init__(self, offset): - self.offset=offset + def __init__(self, offset): + self.offset=offset @@ -85,376 +88,378 @@ class CTable: def parseFile(n): - """ Open and process a file. Errors exit. """ + """ Open and process a file. Errors exit. """ - fp=gbl.inpath + fp=gbl.inpath - f=MMA.file.ReadFile(n) + f=MMA.file.ReadFile(n) - parse(f) - gbl.inpath=fp + parse(f) + gbl.inpath=fp - if gbl.debug: - print "File '%s' closed." % n + if gbl.debug: + print "File '%s' closed." % n def parse(inpath): - """ Process a mma input file. """ + """ Process a mma input file. """ - global beginData, lastChord - global groovesList, groovesCount + global beginData, lastChord + global groovesList, groovesCount - gbl.inpath = inpath + gbl.inpath = inpath - curline = None + curline = None - while 1: - curline = inpath.read() + while 1: + curline = inpath.read() - if curline == None: - MMA.docs.docDump() - break + if curline == None: + MMA.docs.docDump() + break - l = macros.expand(curline) + l = macros.expand(curline) - """ Handle BEGIN and END here. This is outside of the Repeat/End - and variable expand loops so SHOULD be pretty bullet proof. - Note that the beginData stuff is global to this module ... the - Include/Use directives check to make sure we're not doing that - inside a Begin/End. + """ Handle BEGIN and END here. This is outside of the Repeat/End + and variable expand loops so SHOULD be pretty bullet proof. + Note that the beginData stuff is global to this module ... the + Include/Use directives check to make sure we're not doing that + inside a Begin/End. - beginData[] is a list which we append to as more Begins are - encountered. + beginData[] is a list which we append to as more Begins are + encountered. - The placement here is pretty deliberate. Variable expand comes - later so you can't macorize BEGIN ... I think this makes sense. - """ + The placement here is pretty deliberate. Variable expand comes + later so you can't macorize BEGIN ... I think this makes sense. + """ - key=l[0].upper() - if key == 'BEGIN': - if not l: - error("Use: BEGIN STUFF.") - beginPoints.append(len(beginData)) - beginData.extend(l[1:]) - continue + key=l[0].upper() + if key == 'BEGIN': + if not l: + error("Use: Begin STUFF") + beginPoints.append(len(beginData)) + beginData.extend(l[1:]) + continue - if key == 'END': - if len(l) > 1: - error("No arguments permitted for End") - if not beginData: - error("No 'Begin' for 'End'") - beginData=beginData[:beginPoints.pop(-1)] - continue + if key == 'END': + if len(l) > 1: + error("No arguments permitted for END") + if not beginData: + error("No 'BEGIN' for 'END'") + beginData=beginData[:beginPoints.pop(-1)] + continue - if beginData: - l = beginData + l + if beginData: + l = beginData + l - action = l[0].upper() + action = l[0].upper() - if gbl.showExpand and action !='REPEAT': - print l + if gbl.showExpand and action !='REPEAT': + print l - # If the command is in the simple function table, jump & loop. + # If the command is in the simple function table, jump & loop. - if action in simpleFuncs: - simpleFuncs[action](l[1:]) - continue + if action in simpleFuncs: + simpleFuncs[action](l[1:]) + continue - """ We have several possibilities ... - 1. The command is a valid assigned track name, - 2. The command is a valid track name, but needs to be - dynamically allocated, - 3. It's really a chord action - """ + """ We have several possibilities ... + 1. The command is a valid assigned track name, + 2. The command is a valid track name, but needs to be + dynamically allocated, + 3. It's really a chord action + """ - if not action in gbl.tnames: - trackAlloc(action, 0) # ensure that track is allocated + if not action in gbl.tnames: + trackAlloc(action, 0) # ensure that track is allocated - if action in gbl.tnames: # BASS/DRUM/APEGGIO/CHORD + if action in gbl.tnames: # BASS/DRUM/APEGGIO/CHORD - name = action - if len(l) < 2: - error("Expecting argument after '%s'" % name) - action = l[1].upper() + name = action + if len(l) < 2: + error("Expecting argument after '%s'" % name) + action = l[1].upper() - if action in trackFuncs: - trackFuncs[action](name, l[2:]) - else: - error ("Don't know '%s'" % curline) + if action in trackFuncs: + trackFuncs[action](name, l[2:]) + else: + error ("Don't know '%s'" % curline) - continue + continue - ### Gotta be a chord data line! + ### Gotta be a chord data line! - """ A data line can have an optional bar number at the start - of the line. Makes debugging input easier. The next - block strips leading integers off the line. Note that - a line number on a line by itself it okay. - """ + """ A data line can have an optional bar number at the start + of the line. Makes debugging input easier. The next + block strips leading integers off the line. Note that + a line number on a line by itself it okay. + """ - if l[0].isdigit(): - l = l[1:] - if not l: # ignore empty lines - continue + if l[0].isdigit(): + l = l[1:] + if not l: # ignore empty lines + continue - """ A bar can have an optional repeat count. This must - be at the end of bar in the form '* xx'. - """ + """ A bar can have an optional repeat count. This must + be at the end of bar in the form '* xx'. + """ - if len(l)>1 and l[-2]=='*': - rptcount = stoi(l[-1], "Expecting integer after '*'") - l=l[:-2] - else: - rptcount = 1 + if len(l)>1 and l[-2]=='*': + rptcount = stoi(l[-1], "Expecting integer after '*'") + l=l[:-2] + else: + rptcount = 1 - """ Extract solo(s) from line ... this is anything in {}s. - The solo data is pushed into RIFFs and discarded from - the current line. - """ + """ Extract solo(s) from line ... this is anything in {}s. + The solo data is pushed into RIFFs and discarded from + the current line. + """ - l = ' '.join(l) - l = MMA.patSolo.extractSolo(l, rptcount) + 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 or + stuff previously stored with LYRICS SET. + """ - l, lyrics = lyric.extract(l, rptcount) + l, lyrics = lyric.extract(l, rptcount) - """ 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. - """ + """ 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() + l = l.split() - if not l: - error("Expecting music (chord) data. Even lines with\n" - " lyrics or solos still need a chord.") + 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: - error("Too many chords in line. Max is %s, not %s." % - (gbl.QperBar, len(l) ) ) - if i: - l.extend( ['/'] * i ) + i = gbl.QperBar - len(l) + if i<0: + error("Too many chords in line. Max is %s, not %s" % + (gbl.QperBar, len(l) ) ) + if i: + l.extend( ['/'] * i ) - """ We now have a valid line. It'll look something like: + """ We now have a valid line. It'll look something like: - ['Cm', '/', 'z', 'F#'] + ['Cm', '/', 'z', 'F#'] - For each bar we create a ctable structure. This is just - a list of CTables, one for each beat division. - Each entry has the offset (in midi ticks), chordname, etc. + For each bar we create a ctable structure. This is just + a list of CTables, one for each beat division. + Each entry has the offset (in midi ticks), chordname, etc. - Special processing in needed for 'z' options in chords. A 'z' can - be of the form 'CHORDzX', 'z!' or just 'z'. - """ + Special processing in needed for 'z' options in chords. A 'z' can + be of the form 'CHORDzX', 'z!' or just 'z'. + """ - beat = 0 - ctable = [] + beat = 0 + ctable = [] - for c in l: - if c == '/': - if not lastChord: - error("A chord has to be set before you can use a '/'.") - c = lastChord - else: - lastChord = c + for c in l: + if c == '/': + if not lastChord: + error("A chord has to be set before you can use a '/'") + c = lastChord + else: + lastChord = c - ctable.append(parseZs(c, beat)) - beat += 1 + ctable.append(parseZs(c, beat)) + beat += 1 - # Create MIDI data for the bar + # Create MIDI data for the bar - for rpt in range(rptcount): - if MMA.volume.futureVol: - MMA.volume.volume = MMA.volume.futureVol.pop(0) + for rpt in range(rptcount): + if MMA.volume.futureVol: + MMA.volume.volume = MMA.volume.futureVol.pop(0) - 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) + 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) - if gbl.seqRnd[0] == 1: - gbl.seqCount = randomSeq + 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. - This applies especially to chords. If the track class changes - the chord, then restore it before returning!!! - """ + """ Process each track. It is important that the track classes + are written so that the ctable passed to them IS NOT MODIFIED. + This applies especially to chords. If the track class changes + the chord, then restore it before returning!!! + """ - for a in gbl.tnames.values(): - seqSave = gbl.seqCount - if a.name in gbl.seqRnd: - gbl.seqCount = randomSeq + for a in gbl.tnames.values(): + seqSave = gbl.seqCount + if a.name in gbl.seqRnd: + gbl.seqCount = randomSeq - a.bar(ctable) ## process entire bar! + a.bar(ctable) ## process entire bar! - gbl.seqCount = seqSave + gbl.seqCount = seqSave - # Adjust counters + # Adjust counters - gbl.barNum += 1 + gbl.barNum += 1 - if gbl.barNum > gbl.maxBars: - error("Capacity exceeded. Maxbar setting is %s. Use -m option." - % gbl.maxBars) + if gbl.barNum > gbl.maxBars: + error("Capacity exceeded. Maxbar setting is %s. Use -m option" + % gbl.maxBars) - gbl.tickOffset += (gbl.QperBar * gbl.BperQ) + gbl.tickOffset += (gbl.QperBar * gbl.BperQ) - gbl.seqCount = (gbl.seqCount+1) % gbl.seqSize + 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). - """ + """ 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 groovesList: + groovesCount += 1 + if groovesCount > len(groovesList)-1: + groovesCount = 0 + slot = groovesList[groovesCount] - if slot != gbl.currentGroove: - grooveDo(slot) + if slot != gbl.currentGroove: + grooveDo(slot) - gbl.lastGroove = gbl.currentGroove - gbl.currentGroove = slot + gbl.lastGroove = gbl.currentGroove + gbl.currentGroove = slot - if gbl.debug: - print "Groove (list) setting restored from '%s'." % slot + if gbl.debug: + print "Groove (list) setting restored from '%s'." % slot - # Enabled with the -r command line option + # Enabled with the -r command line option - if gbl.showrun: - print "%3d:" % gbl.barNum, - for c in l: - print c, - if lyrics: - print lyrics, - print + if gbl.showrun: + print "%3d:" % gbl.barNum, + for c in l: + print c, + if lyrics: + print lyrics, + print def parseZs(c, beat): - """ Parse a chord in a barline, create Ctable and strips 'z's. + """ Parse a chord in a barline, create Ctable and strips 'z's. - This is called only from the main parser, but it's - complicated (ugly) enough to have its own function. - """ + This is called only from the main parser, but it's + complicated (ugly) enough to have its own function. + """ - ctab = CTable(beat * gbl.BperQ) + ctab = CTable(beat * gbl.BperQ) - if 'z' in c: - c, r = c.split('z', 1) # chord name/track mute + if 'z' in c: + c, r = c.split('z', 1) # chord name/track mute - if not c: - if r=='!': # mute all for 'z!' - r='DCAWBS' - c='z' # dummy chord name - elif not r: # mute all tracks except Drum 'z' - r='CBAWS' - c='z' + if not c: + if r=='!': # mute all for 'z!' + r='DCAWBSR' + c='z' # dummy chord name + elif not r: # mute all tracks except Drum 'z' + r='CBAWSR' + c='z' - else: - error("To mute individual tracks you must " - "use a chord/z combination not '%s'." % l) + else: + error("To mute individual tracks you must " + "use a chord/z combination not '%s'" % r) - else: # illegal construct -- 'Cz!' - if r=='!': - error("'%sz!' is illegal. 'z!' mutes all tracks " - "so you can't include the chord." % c) + else: # illegal construct -- 'Cz!' + if r=='!': + error("'%sz!' is illegal. 'z!' mutes all tracks " + "so you can't include the chord" % c) - elif not r: - error("'%sz' is illegal. You must specify tracks " - "if you use a chord." % c ) + elif not r: + error("'%sz' is illegal. You must specify tracks " + "if you use a chord" % c ) - for v in r: - if v == 'C': - ctab.chordZ = 1 - elif v == 'B': - ctab.bassZ = 1 - elif v == 'A': - ctab.arpeggioZ = 1 - elif v == 'W': - ctab.walkZ = 1 - elif v == 'D': - ctab.drumZ = 1 - elif v == 'S': - ctab.scaleZ = 1 + for v in r: + if v == 'C': + ctab.chordZ = 1 + elif v == 'B': + ctab.bassZ = 1 + elif v == 'A': + ctab.arpeggioZ = 1 + elif v == 'W': + ctab.walkZ = 1 + elif v == 'D': + ctab.drumZ = 1 + elif v == 'S': + ctab.scaleZ = 1 + elif v == 'R': + ctab.ariaZ = 1 - else: - error("Unknown voice '%s' for rest in '%s'." % (v,r)) + else: + error("Unknown voice '%s' for rest in '%s'" % (v,r)) - ctab.chord = MMA.chords.ChordNotes(c) + ctab.chord = MMA.chords.ChordNotes(c) - return ctab + return ctab ################################################################## def allTracks(ln): - """ Apply track to all tracks. """ + """ Apply track to all tracks. """ - allTypes = ('BASS', 'CHORD', 'ARPEGGIO', 'SCALE', 'DRUM', 'WALK', 'MELODY', 'SOLO') - ttypes = [] + allTypes = ('BASS', 'CHORD', 'ARPEGGIO', 'SCALE', 'DRUM', 'WALK', 'MELODY', 'SOLO') + ttypes = [] - if len(ln) < 1: - error("AllTracks: argument required.") + if len(ln) < 1: + error("AllTracks: argument (track?) required") - i = 0 - while i < len(ln) and ln[i].upper() in allTypes: - ttypes.append(ln[i].upper()) - i += 1 + i = 0 + while i < len(ln) and ln[i].upper() in allTypes: + ttypes.append(ln[i].upper()) + i += 1 - if ttypes == []: - ttypes = allTypes + if ttypes == []: + ttypes = allTypes - if i>=len(ln): - error("AllTracks: Additional argument required.") + if i>=len(ln): + error("AllTracks: Additional argument (command?) required") - cmd = ln[i].upper() - args = i+1 + cmd = ln[i].upper() + args = i+1 - if not cmd in trackFuncs: - error("AllTracks: command '%s' doen't exist." % cmd) + if not cmd in trackFuncs: + error("AllTracks: command '%s' doen't exist" % cmd) - for n in gbl.tnames: - if not gbl.tnames[n].vtype in ttypes: - continue + for n in gbl.tnames: + if not gbl.tnames[n].vtype in ttypes: + continue - trackFuncs[cmd](n, ln[args:]) + trackFuncs[cmd](n, ln[args:]) ####################################### # Do-nothing functions def comment(ln): - pass + pass def repeatend(ln): - error("Repeatend/EndRepeat without Repeat.") + error("Repeatend/EndRepeat without Repeat") def repeatending(ln): - error("Repeatending without Repeat.") + error("Repeatending without Repeat") def endmset(ln): - error("EndMset/MSetEnd without If.") + error("EndMset/MSetEnd without If") def ifend(ln): - error("ENDIF without IF.") + error("ENDIF without IF") def ifelse(ln): - error("ELSE without IF.") + error("ELSE without IF") @@ -463,144 +468,144 @@ def ifelse(ln): def repeat(ln): - """ Repeat/RepeatEnd/RepeatEnding. + """ Repeat/RepeatEnd/RepeatEnding. Read input until a RepeatEnd is found. The entire chunk is pushed back into the input stream the correct number of times. This accounts for endings and nested repeats. - """ + """ - def repeatChunk(): - q=[] - qnum=[] - nesting = 0 + def repeatChunk(): + q=[] + qnum=[] + nesting = 0 - while 1: - l=gbl.inpath.read() + while 1: + l=gbl.inpath.read() - if not l: - error("EOF encountered processing Repeat.") + if not l: + error("EOF encountered processing Repeat") - act=l[0].upper() + act=l[0].upper() - if act=='REPEAT': - nesting += 1 + if act=='REPEAT': + nesting += 1 - elif act in ('REPEATEND', 'ENDREPEAT') and nesting: - nesting -= 1 + elif act in ('REPEATEND', 'ENDREPEAT') and nesting: + nesting -= 1 - elif act == 'REPEATENDING' and nesting: - pass + elif act == 'REPEATENDING' and nesting: + pass - elif act in ('REPEATEND', 'ENDREPEAT', 'REPEATENDING'): - return (q, qnum, act, l[1:]) + elif act in ('REPEATEND', 'ENDREPEAT', 'REPEATENDING'): + return (q, qnum, act, l[1:]) - q.append(l) - qnum.append(gbl.lineno) + q.append(l) + qnum.append(gbl.lineno) - stack=[] - stacknum=[] - main=[] - mainnum=[] - ending = 0 + stack=[] + stacknum=[] + main=[] + mainnum=[] + ending = 0 - if ln: - error("REPEAT takes no arguments.") + if ln: + error("REPEAT takes no arguments") - main, mainnum, act, l = repeatChunk() + main, mainnum, act, l = repeatChunk() - while 1: - if act in ('REPEATEND', 'ENDREPEAT'): - if l: - l=macros.expand(l) - if len(l) == 2 and l[0].upper() == 'NOWARN': - l=l[1:] - warn=0 - else: - warn=1 + while 1: + if act in ('REPEATEND', 'ENDREPEAT'): + if l: + l=macros.expand(l) + if len(l) == 2 and l[0].upper() == 'NOWARN': + l=l[1:] + warn=0 + else: + warn=1 - if len(l) != 1: - error("%s: Use [NoWarn] Count." % act) + if len(l) != 1: + error("%s: Use [NoWarn] Count" % act) - count=stoi(l[0], "%s takes an integer arg." % act) + count=stoi(l[0], "%s takes an integer arg" % act) - if count == 2 and warn: - warning("%s count of 2 duplicates default. Did you mean 3 or more?" % act) + if count == 2 and warn: + warning("%s count of 2 duplicates default. Did you mean 3 or more?" % act) - elif count == 1 and warn: - warning("%s count of 1 means NO REPEAT." % act) + elif count == 1 and warn: + warning("%s count of 1 means NO REPEAT" % act) - elif count == 0 and warn: - warning("%s count of 0, Skipping entire repeated section." % act) + elif count == 0 and warn: + warning("%s count of 0, Skipping entire repeated section" % act) - elif count < 0: - error("%s count must be 0 or greater." % act) + elif count < 0: + error("%s count must be 0 or greater" % act) - elif count > 10 and warn: - warning("%s is a large value for %s." % (count, act) ) + elif count > 10 and warn: + warning("%s is a large value for %s" % (count, act) ) - else: - count=2 + else: + count=2 - if not ending: - count += 1 - for c in range(count-1): - stack.extend(main) - stacknum.extend(mainnum) - gbl.inpath.push(stack, stacknum) - break + if not ending: + count += 1 + for c in range(count-1): + stack.extend(main) + stacknum.extend(mainnum) + gbl.inpath.push(stack, stacknum) + break - elif act == 'REPEATENDING': - ending = 1 + elif act == 'REPEATENDING': + ending = 1 - if l: - l=macros.expand(l) - if len(l) == 2 and l[0].upper() == 'NOWARN': - warn=0 - l=l[1:] - else: - warn=1 + if l: + l=macros.expand(l) + if len(l) == 2 and l[0].upper() == 'NOWARN': + warn=0 + l=l[1:] + else: + warn=1 - if len(l) != 1: - error("REPEATENDING: Use [NoWarn] Count.") + if len(l) != 1: + error("REPEATENDING: Use [NoWarn] Count") - count=stoi(l[0], "RepeatEnding takes an integer arg.") + count=stoi(l[0], "RepeatEnding takes an integer arg") - if count < 0: - error("RepeatEnding count must be postive, not %s" % count) + if count < 0: + error("RepeatEnding count must be postive, not '%s'" % count) - elif count == 0 and warn: - warning("RepeatEnding count of 0, skipping section.") + elif count == 0 and warn: + warning("RepeatEnding count of 0, skipping section") - elif count == 1 and warn: - warning("RepeatEnding count of 1 duplicates default.") + elif count == 1 and warn: + warning("RepeatEnding count of 1 duplicates default") - elif count > 10 and warn: - warning("%s is a large value for RepeatEnding." % count) - else: - count = 1 + elif count > 10 and warn: + warning("%s is a large value for RepeatEnding" % count) + else: + count = 1 - rpt, rptnum, act, l = repeatChunk() + rpt, rptnum, act, l = repeatChunk() - for c in range(count): - stack.extend(main) - stacknum.extend(mainnum) - stack.extend(rpt) - stacknum.extend(rptnum) + for c in range(count): + stack.extend(main) + stacknum.extend(mainnum) + stack.extend(rpt) + stacknum.extend(rptnum) - else: - error("Unexpected line in REPEAT") + else: + error("Unexpected line in REPEAT") def goto(ln): - if len(ln) != 1: - error("Usage: GOTO Label") - gbl.inpath.goto(ln[0].upper()) + if len(ln) != 1: + error("Usage: GOTO Label") + gbl.inpath.goto(ln[0].upper()) def eof(ln): - gbl.inpath.toEof() + gbl.inpath.toEof() ####################################### @@ -608,197 +613,194 @@ def eof(ln): def setTime(ln): - """ Set the 'time sig'. + """ Set the 'time sig'. We do restrict the time setting to the range of 1..12. No particular reason, but we do need some limit? Certainly it has to be greater than 0. - """ + """ - if len(ln) != 1: - error("Use: Time N.") + if len(ln) != 1: + error("Use: Time N") - n = stoi(ln[0], "Argument for time must be integer.") + n = stoi(ln[0], "Argument for time must be integer") - if n < 1 or n > 12: - error("Time (beats/bar) must be 1..12.") + if n < 1 or n > 12: + error("Time (beats/bar) must be 1..12") - # If no change, just ignore this. + # If no change, just ignore this. - if gbl.QperBar != n: - gbl.QperBar = int(n) + if gbl.QperBar != n: + gbl.QperBar = int(n) - # Time changes zap all predfined sequences + # Time changes zap all predfined sequences - for a in gbl.tnames.values(): - a.clearSequence() + for a in gbl.tnames.values(): + a.clearSequence() def tempo(ln): - """ Set tempo. """ + """ Set tempo. """ - if not ln or len(ln) >2: - error("Use: Tempo [*,+,-]BperM [BARS].") + if not ln or len(ln) >2: + error("Use: Tempo [*,+,-]BperM [BARS]") - # Get new value. + # Get new value. - a = ln[0][0] - if a in "+-*": - v = stof(ln[0][1:], "Tempo expecting value for rate adjustment, not '%s'." % ln[0]) - if a == '-': - v = gbl.tempo - v - elif a == '+': - v += gbl.tempo - elif a == '*': - v *= gbl.tempo + a = ln[0][0] + if a in "+-*": + v = stof(ln[0][1:], "Tempo expecting value for rate adjustment, not '%s'" % ln[0]) + if a == '-': + v = gbl.tempo - v + elif a == '+': + v += gbl.tempo + elif a == '*': + v *= gbl.tempo - else: - v = stof(ln[0], "Tempo expecting rate, not '%s'." % ln[0]) + else: + v = stof(ln[0], "Tempo expecting rate, not '%s'" % ln[0]) - # is this immediate or over time? + # is this immediate or over time? - if len(ln) == 1: - gbl.tempo = int(v) - gbl.mtrks[0].addTempo(gbl.tickOffset, gbl.tempo) - if gbl.debug: - print "Set Tempo to %s" % gbl.tempo + if len(ln) == 1: + gbl.tempo = int(v) + gbl.mtrks[0].addTempo(gbl.tickOffset, gbl.tempo) + if gbl.debug: + print "Set Tempo to %s" % gbl.tempo - else: # Do a tempo change over bar count - bars = ln[1] + else: # Do a tempo change over bar count + bars = ln[1] - bars = stof(bars, "Expecting value, not %s" % bars ) - numbeats = int(bars * gbl.QperBar) + bars = stof(bars, "Expecting value, not %s" % bars ) + numbeats = int(bars * gbl.QperBar) - if numbeats < 1: - error("Beat count must be greater than 1.") + if numbeats < 1: + error("Beat count must be greater than 1") - # Vary the rate in the meta track + # Vary the rate in the meta track - tincr = (v - gbl.tempo) / float(numbeats) # incr per beat - bstart = gbl.tickOffset # start - boff = 0 - tempo = gbl.tempo + tincr = (v - gbl.tempo) / float(numbeats) # incr per beat + bstart = gbl.tickOffset # start + boff = 0 + tempo = gbl.tempo - for n in range(numbeats): - tempo += tincr - if tempo: - gbl.mtrks[0].addTempo(bstart + boff, int(tempo)) - boff += gbl.BperQ + for n in range(numbeats): + tempo += tincr + if tempo: + gbl.mtrks[0].addTempo(bstart + boff, int(tempo)) + boff += gbl.BperQ - if tempo != v: - gbl.mtrks[0].addTempo(bstart + boff, int(v) ) + if tempo != v: + gbl.mtrks[0].addTempo(bstart + boff, int(v) ) - gbl.tempo = int(v) + gbl.tempo = int(v) - if gbl.debug: - print "Set future Tempo to %s over %s beats" % \ - ( int(tempo), numbeats) + if gbl.debug: + print "Set future Tempo to %s over %s beats" % \ + ( int(tempo), numbeats) def beatAdjust(ln): - """ Delete or insert some beats into the sequence. + """ Delete or insert some beats into the sequence. - This just adjusts the current song position. Nothing is - lost or added to the actual file. - """ + This just adjusts the current song position. Nothing is + lost or added to the actual file. + """ - if len(ln) != 1: - error("Use: BeatAdjust NN") + if len(ln) != 1: + error("Use: BeatAdjust NN") - adj = stof(ln[0], "Expecting a value (not %s) for BeatAdjust." % ln[0]) + adj = stof(ln[0], "Expecting a value (not %s) for BeatAdjust" % ln[0]) - gbl.tickOffset += int(adj * gbl.BperQ) + gbl.tickOffset += int(adj * gbl.BperQ) - if gbl.debug: - print "BeatAdjust: inserted %s at bar %s." % (adj, gbl.barNum + 1) + if gbl.debug: + print "BeatAdjust: inserted %s at bar %s." % (adj, gbl.barNum + 1) def cut(ln): - """ Insert a all-note-off into all tracks. """ + """ Insert a all-note-off into all tracks. """ - if not len(ln): - ln=['0'] + if not len(ln): + ln=['0'] - if len(ln) != 1: - error("Use: Cut Offset") + if len(ln) != 1: + error("Use: Cut Offset") - """ Loop though all the tracks. Note that trackCut() checks + """ Loop though all the tracks. Note that trackCut() checks to make sure that there is a need to insert in specified track. In this loop we create a list of channels as we loop though all the tracks, skipping over any duplicate channels or tracks with no channel assigned. - """ + """ - l=[] - for t in sorted(gbl.tnames.keys()): - c = gbl.tnames[t].channel - if not c or c in l: - continue - l.append(c) - trackCut(t, ln) + l=[] + for t in sorted(gbl.tnames.keys()): + c = gbl.tnames[t].channel + if not c or c in l: + continue + l.append(c) + trackCut(t, ln) def fermata(ln): - """ Apply a fermata timing to the specified beat. """ + """ Apply a fermata timing to the specified beat. """ - if len(ln) != 3: - error("Use: Fermata 'offset' 'duration' 'adjustment'") + if len(ln) != 3: + error("Use: Fermata 'offset' 'duration' 'adjustment'") - offset = stof(ln[0], "Expecting a value (not '%s') " - "for Fermata Offset." % ln[0] ) + offset = stof(ln[0], "Expecting a value (not '%s') " + "for Fermata Offset" % ln[0] ) - if offset < -gbl.QperBar or offset > gbl.QperBar: - warning("Fermata: %s is a large beat offset." % offset) + if offset < -gbl.QperBar or offset > gbl.QperBar: + warning("Fermata: %s is a large beat offset" % offset) - dur = stof(ln[1], "Expecting a value (not '%s') for Fermata " - "Duration." % ln[1]) + dur = stof(ln[1], "Expecting a value (not '%s') for Fermata Duration" % ln[1]) - if dur <= 0: - error("Fermata duration must be greater than 0.") + if dur <= 0: + error("Fermata duration must be greater than 0") - if dur > gbl.QperBar: - warning("Fermata: %s is a large duration.") + if dur > gbl.QperBar: + warning("Fermata: %s is a large duration" % dur) - adj = stof(ln[2], "Expecting a value (not '%s') for Fermata " - "Adjustment." % ln[2]) + adj = stof(ln[2], "Expecting a value (not '%s') for Fermata Adjustment" % ln[2]) - if adj< 100: - warning("Fermata: Adjustment less than 100 is shortening beat value.") + if adj< 100: + warning("Fermata: Adjustment less than 100 is shortening beat value") - if adj == 100: - error("Fermata: using value of 100 makes no difference, " - "must be an error.") + if adj == 100: + error("Fermata: using value of 100 makes no difference, must be an error") - moff=int(gbl.tickOffset + (gbl.BperQ * offset)) + moff=int(gbl.tickOffset + (gbl.BperQ * offset)) - if moff < 0: - error("Fermata offset comes before track start.") + if moff < 0: + error("Fermata offset comes before track start") - gbl.mtrks[0].addTempo(moff, int(gbl.tempo / (adj/100)) ) + gbl.mtrks[0].addTempo(moff, int(gbl.tempo / (adj/100)) ) - tickDur = int(gbl.BperQ * dur) + tickDur = int(gbl.BperQ * dur) - gbl.mtrks[0].addTempo(moff + tickDur, gbl.tempo) + gbl.mtrks[0].addTempo(moff + tickDur, gbl.tempo) - # Clear out NoteOn events in all tracks + # Clear out NoteOn events in all tracks - if offset < 0: - start = moff + int(.05 * gbl.BperQ) - end = moff + tickDur - int(.05 * gbl.BperQ) + if offset < 0: + start = moff + int(.05 * gbl.BperQ) + end = moff + tickDur - int(.05 * gbl.BperQ) - for n, tr in gbl.mtrks.items(): - if n <= 0: continue # skip meta track - tr.zapRangeTrack(start, end ) + for n, tr in gbl.mtrks.items(): + if n <= 0: continue # skip meta track + tr.zapRangeTrack(start, end ) - if gbl.debug: - print "Fermata: Beat %s, Duration %s, Change %s, Bar %s" % \ - (offset, dur, adj, gbl.barNum + 1) - if offset < 0: - print "\tNoteOn Events removed in tick range %s to %s" \ - % (start, end) + if gbl.debug: + print "Fermata: Beat %s, Duration %s, Change %s, Bar %s" % \ + (offset, dur, adj, gbl.barNum + 1) + if offset < 0: + print "\tNoteOn Events removed in tick range %s to %s" \ + % (start, end) ####################################### @@ -806,304 +808,332 @@ def fermata(ln): def grooveDefine(ln): - """ Define a groove. + """ Define a groove. - Current settings are assigned to a groove name. - """ + Current settings are assigned to a groove name. + """ - if not len(ln): - error("Use: DefGroove Name") + if not len(ln): + error("Use: DefGroove Name") - slot=ln[0].upper() + slot=ln[0].upper() - # Slot names can't contain a '/' (reserved) or be an integer (used in groove select). + # 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 '/' 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.isdigit(): + error("Invalid slot name '%s'. Cannot be only digits" % slot) - grooveDefineDo(slot) + grooveDefineDo(slot) - if gbl.debug: - print "Groove settings saved to '%s'." % slot + if gbl.debug: + print "Groove settings saved to '%s'." % slot - if gbl.makeGrvDefs: - MMA.auto.updateGrooveList(slot) + if gbl.makeGrvDefs: + MMA.auto.updateGrooveList(slot) - if len(ln) > 1: - MMA.docs.docDefine(ln) + if len(ln) > 1: + MMA.docs.docDefine(ln) def grooveDefineDo(slot): - for n in gbl.tnames.values(): - n.saveGroove(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)} + 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. """ + """ Select a previously defined groove. """ - global groovesList, groovesCount + global groovesList, groovesCount - if not ln: - error("Groove: needs agrument(s)") + if not ln: + error("Groove: needs agrument(s)") - tmpList =[] + 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 + 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 '/'.") + 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 not slot in gbl.settingsGroove: - if gbl.debug: - print "Groove '%s' not defined. Trying auto-load from libraries" \ - % slot + 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 + 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) + if l: + if gbl.debug: + print "Attempting to load groove '%s' from '%s'." \ + % (slot, l) - usefile([os.path.join(gbl.autoLib, 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) + 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 ) + else: + error("Groove '%s' could not be found in memory or library files" % slot ) - tmpList.append(slot) + tmpList.append(slot) - if not len(tmpList): - error("Use: Groove [selection] Name [...]") + 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 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] + if wh: + wh = (wh-1) % len(tmpList) + tmpList=tmpList[wh:wh+1] - slot=tmpList[0] - grooveDo(slot) + slot=tmpList[0] + grooveDo(slot) - groovesCount = 0 - if len(tmpList)==1: - groovesList=None - else: - groovesList=tmpList + groovesCount = 0 + if len(tmpList)==1: + groovesList=None + else: + groovesList=tmpList - gbl.lastGroove = gbl.currentGroove - gbl.currentGroove = slot - if gbl.lastGroove == '': - gbl.lastGroove = slot + gbl.lastGroove = gbl.currentGroove + gbl.currentGroove = slot + if gbl.lastGroove == '': + gbl.lastGroove = slot - if gbl.debug: - print "Groove settings restored from '%s'." % 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. """ + """ This is separate from groove() so we can call it from + usefile() with a qualified name. """ - global seqRndWeight + global seqRndWeight - oldSeqSize = gbl.seqSize + oldSeqSize = gbl.seqSize - g=gbl.settingsGroove[slot] + 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'] + 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) + 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. - """ + """ 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() + if oldSeqSize != gbl.seqSize: + for a in gbl.tnames.values(): + a.setSeqSize() - seqRndWeight = MMA.pat.seqBump(seqRndWeight) + seqRndWeight = MMA.pat.seqBump(seqRndWeight) - gbl.seqCount = 0 + 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 def include(ln): - """ Include a file. """ + """ Include a file. """ - global beginData + global beginData - if beginData: - error("INCLUDE not permitted in Begin/End block") + if beginData: + error("INCLUDE not permitted in Begin/End block") - if len(ln) != 1: - error("Use: Include FILE" ) + if len(ln) != 1: + error("Use: Include FILE" ) - fn = MMA.file.locFile(ln[0], gbl.incPath) - if not fn: - error("Could not find include file '%s'." % ln) + fn = MMA.file.locFile(ln[0], gbl.incPath) + if not fn: + error("Could not find include file '%s'" % ln) - else: - parseFile(fn) + else: + parseFile(fn) def usefile(ln): - """ Include a library file. """ + """ Include a library file. """ - global beginData + global beginData - if beginData: - error("USE not permitted in Begin/End block") + if beginData: + error("USE not permitted in Begin/End block") - if len(ln) != 1: - error("Use: Use FILE" ) + if len(ln) != 1: + error("Use: Use FILE") - ln = ln[0] - fn = MMA.file.locFile(ln, gbl.libPath) + ln = ln[0] + fn = MMA.file.locFile(ln, gbl.libPath) - if not fn: - error("Unable to locate library file '%s'." % ln) + if not fn: + error("Unable to locate library file '%s'" % ln) - """ USE saves current state, just like defining a groove. + """ USE saves current state, just like defining a groove. Here we use a magic number which can't be created with a defgroove ('cause it's an integer). Save, read, restore. - """ + """ - slot = 9988 - grooveDefineDo(slot) - parseFile(fn) - grooveDo(slot) + slot = gmagic + grooveDefineDo(slot) + parseFile(fn) + grooveDo(slot) def mmastart(ln): - if not ln: - error ("Use: MMAstart FILE [file...]") + if not ln: + error ("Use: MMAstart FILE [file...]") - gbl.mmaStart.extend(ln) + gbl.mmaStart.extend(ln) - if gbl.debug: - print "MMAstart set to:", - printList(ln) + if gbl.debug: + print "MMAstart set to:", + printList(ln) def mmaend(ln): - if not ln: - error ("Use: MMAend FILE [file...]") + if not ln: + error ("Use: MMAend FILE [file...]") - gbl.mmaEnd.extend(ln) + gbl.mmaEnd.extend(ln) - if gbl.debug: - print "MMAend set to:", - printList(ln) + if gbl.debug: + print "MMAend set to:", + printList(ln) def setLibPath(ln): - """ Set the LibPath variable. """ + """ Set the LibPath variable. """ - if len(ln) > 1: - error("Only one path can be entered for LibPath.") + if len(ln) > 1: + error("Only one path can be entered for LibPath") - f = os.path.expanduser(ln[0]) + f = os.path.expanduser(ln[0]) - if gbl.debug: - print "LibPath set to", f + if gbl.debug: + print "LibPath set to", f - gbl.libPath = f + gbl.libPath = f def setAutoPath(ln): - """ Set the autoPath variable. """ + """ Set the autoPath variable. """ - if len(ln) > 1: - error("Only one path can be entered for AutoLibPath.") + if len(ln) > 1: + error("Only one path can be entered for AutoLibPath") - f = os.path.expanduser(ln[0]) + f = os.path.expanduser(ln[0]) - MMA.auto.grooveDir = {} + MMA.auto.grooveDir = {} - # To avoid conflicts, delete all existing grooves (current seq not effected) + # To avoid conflicts, delete all existing grooves (current seq not effected) - gbl.settingsGroove = {} - gbl.lastGroove = '' - gbl.currentGroove = '' + gbl.settingsGroove = {} + gbl.lastGroove = '' + gbl.currentGroove = '' - if gbl.debug: - print "AutoLibPath set to", f + if gbl.debug: + print "AutoLibPath set to", f - gbl.autoLib = f + gbl.autoLib = f def setIncPath(ln): - """ Set the IncPath variable. """ + """ Set the IncPath variable. """ - if len(ln)>1: - error("Only one path is permitted in SetIncPath.") + if len(ln)>1: + error("Only one path is permitted in SetIncPath") - f = os.path.expanduser(ln[0]) + f = os.path.expanduser(ln[0]) - if gbl.debug: - print "IncPath set to", f + if gbl.debug: + print "IncPath set to", f - gbl.incPath=f + gbl.incPath=f def setOutPath(ln): - """ Set the Outpath variable. """ + """ Set the Outpath variable. """ - if not ln: - gbl.outPath = "" + if not ln: + gbl.outPath = "" - elif len(ln) > 1: - error ("Use: SetOutPath PATH.") + elif len(ln) > 1: + error ("Use: SetOutPath PATH") - else: - gbl.outPath = os.path.expanduser(ln[0]) + else: + gbl.outPath = os.path.expanduser(ln[0]) @@ -1111,306 +1141,306 @@ def setOutPath(ln): # Sequence def seqsize(ln): - """ Set the length of sequences. """ + """ Set the length of sequences. """ - global seqRndWeight + global seqRndWeight - if len(ln) !=1: - error("Usage 'SeqSize N'.") + if len(ln) !=1: + error("Usage 'SeqSize N'") - n = stoi(ln[0], "Argument for SeqSize must be integer.") + n = stoi(ln[0], "Argument for SeqSize must be integer") - # Setting the sequence size always resets the seq point + # Setting the sequence size always resets the seq point - gbl.seqCount = 0 + gbl.seqCount = 0 - """ Now set the sequence size for each track. The class call - will expand/contract existing patterns to match the new - size. - """ + """ Now set the sequence size for each track. The class call + will expand/contract existing patterns to match the new + size. + """ - if n != gbl.seqSize: - gbl.seqSize = n - for a in gbl.tnames.values(): - a.setSeqSize() + if n != gbl.seqSize: + gbl.seqSize = n + for a in gbl.tnames.values(): + a.setSeqSize() - seqRndWeight = seqBump(seqRndWeight) + seqRndWeight = seqBump(seqRndWeight) - if gbl.debug: - print "Set SeqSize to ", n + if gbl.debug: + print "Set SeqSize to ", n def seq(ln): - """ Set the sequence point. """ + """ Set the sequence point. """ - if len(ln) == 0: - s = 0 - elif len(ln)==1: - s = stoi(ln[0], "Expecting integer value after SEQ") - else: - error("Use: SEQ or SEQ NN to reset seq point.") + if len(ln) == 0: + s = 0 + elif len(ln)==1: + s = stoi(ln[0], "Expecting integer value after SEQ") + else: + error("Use: SEQ or SEQ NN to reset seq point") - if s > gbl.seqSize: - error("Sequence size is '%d', you can't set to '%d'." % - (gbl.seqSize, s)) + if s > gbl.seqSize: + error("Sequence size is '%d', you can't set to '%d'" % + (gbl.seqSize, s)) - if s==0: - s=1 + if s==0: + s=1 - if s<0: - error("Seq parm must be greater than 0, not %s", s) + if s<0: + error("Seq parm must be greater than 0, not %s", s) - gbl.seqCount = s-1 + gbl.seqCount = s-1 - if gbl.seqRnd[0] == 1: - warning("SeqRnd has been disabled by a Seq command.") - seqRnd = [0] + if gbl.seqRnd[0] == 1: + warning("SeqRnd has been disabled by a Seq command") + seqRnd = [0] def seqClear(ln): - """ Clear all sequences (except SOLO tracks). """ + """ Clear all sequences (except SOLO tracks). """ - if ln: - error ("Use: 'SeqClear' with no args") + if ln: + error ("Use: 'SeqClear' with no args") - for n in gbl.tnames.values(): - if n.vtype != "SOLO": - n.clearSequence() - MMA.volume.futureVol = [] + for n in gbl.tnames.values(): + if n.vtype != "SOLO": + n.clearSequence() + MMA.volume.futureVol = [] - setSeqRndWeight(['1']) + setSeqRndWeight(['1']) def setSeqRnd(ln): - """ Set random order for all tracks. """ + """ Set random order for all tracks. """ - emsg = "use [ON, OFF | TrackList ]." - if not ln: - error("SeqRnd:" + emsg) + emsg = "use [ON, OFF | TrackList ]" + if not ln: + error("SeqRnd:" + emsg) - a=ln[0].upper() + a=ln[0].upper() - if a in ("ON", "1") and len(ln) == 1: - gbl.seqRnd = [1] + if a in ("ON", "1") and len(ln) == 1: + gbl.seqRnd = [1] - elif a in ("OFF", "0") and len(ln) == 1: - gbl.seqRnd = [0] + 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) + 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" + 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. """ + """ Set global rnd weight. """ - global seqRndWeight + global seqRndWeight - if not ln: - error("Use: RndWeight .") + 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) + 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) + seqRndWeight = seqBump(tmp) - if gbl.debug: - print "RndWeight: ", - printList(seqRndWeight) + if gbl.debug: + print "RndWeight: ", + printList(seqRndWeight) def restart(ln): - """ Restart all tracks to almost-default condidions. """ + """ Restart all tracks to almost-default condidions. """ - if ln: - error ("Use: 'Restart' with no args") + if ln: + error ("Use: 'Restart' with no args") - for n in gbl.tnames.values(): - n.restart() + for n in gbl.tnames.values(): + n.restart() ####################################### # Midi def midiMarker(ln): - """ Parse off midi marker. """ + """ Parse off midi marker. """ - if len(ln) == 2: - offset = stof(ln[0]) - msg = ln[1] - elif len(ln) == 1: - offset = 0 - msg = ln[0] - else: - error("Usage: MidiMark [offset] Label.") + if len(ln) == 2: + offset = stof(ln[0]) + msg = ln[1] + elif len(ln) == 1: + offset = 0 + msg = ln[0] + else: + error("Usage: MidiMark [offset] Label") - offset = int(gbl.tickOffset + (gbl.BperQ * offset)) - if offset < 0: - error("MidiMark offset points before start of file.") + offset = int(gbl.tickOffset + (gbl.BperQ * offset)) + if offset < 0: + error("MidiMark offset points before start of file") - gbl.mtrks[0].addMarker(offset, msg) + gbl.mtrks[0].addMarker(offset, msg) def rawMidi(ln): - """ Send hex bytes as raw midi stream. """ + """ Send hex bytes as raw midi stream. """ - mb='' - for a in ln: - a=stoi(a) + mb='' + for a in ln: + a=stoi(a) - if a<0 or a >0xff: - error("All values must be in the range " - "0 to 0xff, not '%s'" % a) + if a<0 or a >0xff: + error("All values must be in the range " + "0 to 0xff, not '%s'" % a) - mb += chr(a) + mb += chr(a) - gbl.mtrks[0].addToTrack(gbl.tickOffset, mb) + gbl.mtrks[0].addToTrack(gbl.tickOffset, mb) - if gbl.debug: - print "Inserted raw midi in metatrack: ", - for b in mb: - print '%02x' % ord(b), - print + if gbl.debug: + print "Inserted raw midi in metatrack: ", + for b in mb: + print '%02x' % ord(b), + print def mdefine(ln): - """ Set a midi seq pattern. """ + """ Set a midi seq pattern. """ - if not ln: - error("MDefine needs arguments.") + if not ln: + error("MDefine needs arguments") - name = ln[0] - if name.startswith('_'): - error("Names with a leading underscore are reserved.") + name = ln[0] + if name.startswith('_'): + error("Names with a leading underscore are reserved") - if name.upper() == 'Z': - error("The name 'Z' is reserved.") + if name.upper() == 'Z': + error("The name 'Z' is reserved") - MMA.mdefine.mdef.set(name, ' '.join(ln[1:])) + MMA.mdefine.mdef.set(name, ' '.join(ln[1:])) def setMidiFileType(ln): - """ Set some MIDI file generation flags. """ + """ Set some MIDI file generation flags. """ - if not ln: - error("USE: MidiFile [SMF=0/1] [RUNNING=0/1]") + if not ln: + error("USE: MidiFile [SMF=0/1] [RUNNING=0/1]") - for l in ln: - try: - mode, val = l.upper().split('=') - except: - error("Each arg must contain an '=', not '%s'." % l) + for l in ln: + try: + mode, val = l.upper().split('=') + except: + error("Each arg must contain an '=', not '%s'" % l) - if mode == 'SMF': - if val == '0': - gbl.midiFileType = 0 - elif val == '1': - gbl.midiFileType = 1 - else: - error("Use: MIDIFile SMF=0/1") + if mode == 'SMF': + if val == '0': + gbl.midiFileType = 0 + elif val == '1': + gbl.midiFileType = 1 + else: + error("Use: MIDIFile SMF=0/1") - if gbl.debug: - print "Midi Filetype set to", gbl.midiFileType + if gbl.debug: + print "Midi Filetype set to", gbl.midiFileType - elif mode == 'RUNNING': - if val == '0': - gbl.runningStatus = 0 - elif val == '1': - gbl.runningStatus = 1 - else: - error("Use: MIDIFile RUNNING=0/1") + elif mode == 'RUNNING': + if val == '0': + gbl.runningStatus = 0 + elif val == '1': + gbl.runningStatus = 1 + else: + error("Use: MIDIFile RUNNING=0/1") - if gbl.debug: - print "Midi Running Status Generation set to", - if gbl.runningStatus: - print 'ON (Default)' - else: - print 'OFF' + if gbl.debug: + print "Midi Running Status Generation set to", + if gbl.runningStatus: + print 'ON (Default)' + else: + print 'OFF' - else: - error("Use: MIDIFile [SMF=0/1] [RUNNING=0/1]") + else: + error("Use: MIDIFile [SMF=0/1] [RUNNING=0/1]") def setChPref(ln): - """ Set MIDI Channel Preference. """ + """ Set MIDI Channel Preference. """ - if not ln: - error("Use: ChannelPref TRACKNAME=CHANNEL [...]") + if not ln: + error("Use: ChannelPref TRACKNAME=CHANNEL [...]") - for i in ln: - if '=' not in i: - error("Each item in ChannelPref must have an '='.") + for i in ln: + if '=' not in i: + error("Each item in ChannelPref must have an '='") - n,c = i.split('=') + n,c = i.split('=') - c = stoi(c, "Expecting an integer for ChannelPref, not '%s'." % c) + c = stoi(c, "Expecting an integer for ChannelPref, not '%s'" % c) - if c<1 or c>16: - error("Channel for ChannelPref must be 1..16, not %s." % c) + if c<1 or c>16: + error("Channel for ChannelPref must be 1..16, not %s" % c) - gbl.midiChPrefs[n.upper()]=c + gbl.midiChPrefs[n.upper()]=c - if gbl.debug: - print "ChannelPref:", - for n,c in gbl.midiChPrefs.items(): - print "%s=%s" % (n,c), - print + if gbl.debug: + print "ChannelPref:", + for n,c in gbl.midiChPrefs.items(): + print "%s=%s" % (n,c), + print def setTimeSig(ln): - """ Set the midi time signature. """ + """ Set the midi time signature. """ - if len(ln) == 1: - a=ln[0].upper() - if a == 'COMMON': - ln=('4','4') - elif a == 'CUT': - ln=('2','2') + if len(ln) == 1: + a=ln[0].upper() + if a == 'COMMON': + ln=('4','4') + elif a == 'CUT': + ln=('2','2') - if len(ln) != 2: - error("TimeSig: Usage (num dem) or ('cut' or 'common').") + if len(ln) != 2: + error("TimeSig: Usage (num dem) or ('cut' or 'common')") - nn = stoi(ln[0]) + nn = stoi(ln[0]) - if nn<1 or nn>126: - error("Timesig NN must be 1..126") + if nn<1 or nn>126: + error("Timesig NN must be 1..126") - dd = stoi(ln[1]) - if dd == 1: dd = 0 - elif dd == 2: dd = 1 - elif dd == 4: dd = 2 - elif dd == 8: dd = 3 - elif dd == 16: dd = 4 - elif dd == 32: dd = 5 - elif dd == 64: dd = 6 - else: - error("Unknown value for timesig denominator") + dd = stoi(ln[1]) + if dd == 1: dd = 0 + elif dd == 2: dd = 1 + elif dd == 4: dd = 2 + elif dd == 8: dd = 3 + elif dd == 16: dd = 4 + elif dd == 32: dd = 5 + elif dd == 64: dd = 6 + else: + error("Unknown value for timesig denominator") - MMA.midi.timeSig.set(nn,dd) + MMA.midi.timeSig.set(nn,dd) @@ -1420,125 +1450,125 @@ def setTimeSig(ln): def rndseed(ln): - """ Reseed the random number generator. """ + """ Reseed the random number generator. """ - if not ln: - random.seed() + if not ln: + random.seed() - elif len(ln)>1: - error("RNDSEED: requires 0 or 1 arguments.") - else: - random.seed(stof(ln[0])) + elif len(ln)>1: + error("RNDSEED: requires 0 or 1 arguments") + else: + random.seed(stof(ln[0])) def transpose(ln): - """ Set transpose value. """ + """ Set transpose value. """ - if len(ln) != 1: - error("Use: Transpose N.") + if len(ln) != 1: + error("Use: Transpose N") - t = stoi(ln[0], "Argument for Tranpose must be an integer, not '%s'" % ln[0]) - if t < -12 or t > 12: - error("Tranpose %s out-of-range; must be -12..12." % t) + t = stoi(ln[0], "Argument for Tranpose must be an integer, not '%s'" % ln[0]) + if t < -12 or t > 12: + error("Tranpose %s out-of-range; must be -12..12" % t) - gbl.transpose = t + gbl.transpose = t - if gbl.debug: - print "Set Transpose to %s" % t + if gbl.debug: + print "Set Transpose to %s" % t def lnPrint(ln): - """ Print stuff in a "print" command. """ + """ Print stuff in a "print" command. """ - print " ".join(ln) + print " ".join(ln) def printActive(ln): - """ Print a list of the active tracks. """ + """ Print a list of the active tracks. """ - print "Active tracks, groove:", gbl.currentGroove, ' '.join(ln) + print "Active tracks, groove:", gbl.currentGroove, ' '.join(ln) - for a in sorted(gbl.tnames.keys()): - f=gbl.tnames[a] - if f.sequence: - print " ",a - print + for a in sorted(gbl.tnames.keys()): + f=gbl.tnames[a] + if f.sequence: + print " ",a + print def setDebug(ln): - """ Set debugging options dynamically. """ + """ Set debugging options dynamically. """ - msg=( "Use: Debug MODE=On/Off where MODE is one or more of " - "DEBUG, FILENAMES, PATTERNS, SEQUENCE, " - "RUNTIME, WARNINGS or EXPAND." ) + msg=( "Use: Debug MODE=On/Off where MODE is one or more of " + "DEBUG, FILENAMES, PATTERNS, SEQUENCE, " + "RUNTIME, WARNINGS or EXPAND" ) - if not len(ln): - error(msg) + if not len(ln): + error(msg) - # save current flags + # save current flags - gbl.Ldebug = gbl.debug - gbl.LshowFilenames = gbl.showFilenames - gbl.Lpshow = gbl.pshow - gbl.Lseqshow = gbl.seqshow - gbl.Lshowrun = gbl.showrun - gbl.LnoWarn = gbl.noWarn - gbl.LnoOutput = gbl.noOutput - gbl.LshowExpand = gbl.showExpand - gbl.Lchshow = gbl.chshow + gbl.Ldebug = gbl.debug + gbl.LshowFilenames = gbl.showFilenames + gbl.Lpshow = gbl.pshow + gbl.Lseqshow = gbl.seqshow + gbl.Lshowrun = gbl.showrun + gbl.LnoWarn = gbl.noWarn + gbl.LnoOutput = gbl.noOutput + gbl.LshowExpand = gbl.showExpand + gbl.Lchshow = gbl.chshow - for l in ln: - try: - mode, val = l.upper().split('=') - except: - error("Each debug option must contain a '=', not '%s'" % l) + for l in ln: + try: + mode, val = l.upper().split('=') + except: + error("Each debug option must contain a '=', not '%s'" % l) - if val == 'ON' or val == '1': - setting = 1 - elif val == 'OFF' or val == '0': - setting = 0 - else: - error(msg) + if val == 'ON' or val == '1': + setting = 1 + elif val == 'OFF' or val == '0': + setting = 0 + else: + error(msg) - if mode == 'DEBUG': - gbl.debug = setting - if gbl.debug: - print "Debug=%s." % val + if mode == 'DEBUG': + gbl.debug = setting + if gbl.debug: + print "Debug=%s." % val - elif mode == 'FILENAMES': - gbl.showFilenames = setting - if gbl.debug: - print "ShowFilenames=%s." % val + elif mode == 'FILENAMES': + gbl.showFilenames = setting + if gbl.debug: + print "ShowFilenames=%s." % val - elif mode == 'PATTERNS': - gbl.pshow = setting - if gbl.debug: - print "Pattern display=%s." % val + elif mode == 'PATTERNS': + gbl.pshow = setting + if gbl.debug: + print "Pattern display=%s." % val - elif mode == 'SEQUENCE': - gbl.seqshow = setting - if gbl.debug: - print "Sequence display=%s." % val + elif mode == 'SEQUENCE': + gbl.seqshow = setting + if gbl.debug: + print "Sequence display=%s." % val - elif mode == 'RUNTIME': - gbl.showrun = setting - if gbl.debug: - print "Runtime display=%s." % val + elif mode == 'RUNTIME': + gbl.showrun = setting + if gbl.debug: + print "Runtime display=%s." % val - elif mode == 'WARNINGS': - gbl.noWarn = not(setting) - if gbl.debug: - print "Warning display=%s." % val + elif mode == 'WARNINGS': + gbl.noWarn = not(setting) + if gbl.debug: + print "Warning display=%s" % val - elif mode == 'EXPAND': - gbl.showExpand = setting - if gbl.debug: - print "Expand display=%s." % val + elif mode == 'EXPAND': + gbl.showExpand = setting + if gbl.debug: + print "Expand display=%s." % val - else: - error(msg) + else: + error(msg) @@ -1551,187 +1581,187 @@ def setDebug(ln): # Pattern/Groove def trackDefPattern(name, ln): - """ Define a pattern for a track. + """ Define a pattern for a track. - Use the type-name for all defines.... check the track - names and if it has a '-' in it, we use only the - part BEFORE the '-'. So DRUM-Snare becomes DRUM. - """ + Use the type-name for all defines.... check the track + names and if it has a '-' in it, we use only the + part BEFORE the '-'. So DRUM-Snare becomes DRUM. + """ - ln=ln[:] + ln=ln[:] - name=name.split('-')[0] + name=name.split('-')[0] - trackAlloc(name, 1) + trackAlloc(name, 1) - if ln: - pattern = ln.pop(0).upper() - else: - error("Define is expecting a pattern name.") + if ln: + pattern = ln.pop(0).upper() + else: + error("Define is expecting a pattern name") - if pattern in ('z', 'Z', '-'): - error("Pattern name '%s' is reserved." % pattern) + if pattern in ('z', 'Z', '-'): + error("Pattern name '%s' is reserved" % pattern) - if pattern.startswith('_'): - error("Names with a leading underscore are reserved.") + if pattern.startswith('_'): + error("Names with a leading underscore are reserved") - if not ln: - error("No pattern list given for '%s %s'." % (name, pattern) ) + if not ln: + error("No pattern list given for '%s %s'" % (name, pattern) ) - ln=' '.join(ln) - gbl.tnames[name].definePattern(pattern, ln) + ln=' '.join(ln) + gbl.tnames[name].definePattern(pattern, ln) def trackSequence(name, ln): - """ Define a sequence for a track. + """ Define a sequence for a track. - The format for a sequence: - TrackName Seq1 [Seq2 ... ] + The format for a sequence: + TrackName Seq1 [Seq2 ... ] - Note, that SeqX can be a predefined seq or { seqdef } - The {} is dynamically interpreted into a def. - """ + Note, that SeqX can be a predefined seq or { seqdef } + The {} is dynamically interpreted into a def. + """ - if not ln: - error ("Use: %s Sequence NAME [...]" % name) + if not ln: + error ("Use: %s Sequence NAME [...]" % name) - ln = ' '.join(ln) + ln = ' '.join(ln) - """ Extract out any {} definitions and assign them to new - define variables (__1, __99, etc) and melt them - back into the string. - """ + """ Extract out any {} definitions and assign them to new + define variables (__1, __99, etc) and melt them + back into the string. + """ - ids=1 - while 1: - sp = ln.find("{") + ids=1 + while 1: + sp = ln.find("{") - if sp<0: - break + if sp<0: + break - ln, s = pextract(ln, "{", "}", 1) - if not s: - error("Did not find matching '}' for '{'") + ln, s = pextract(ln, "{", "}", 1) + if not s: + error("Did not find matching '}' for '{'") - pn = "_%s" % ids - ids+=1 + pn = "_%s" % ids + ids+=1 - trk=name.split('-')[0] - trackAlloc(trk, 1) + trk=name.split('-')[0] + trackAlloc(trk, 1) - gbl.tnames[trk].definePattern(pn, s[0]) - ln = ln[:sp] + ' ' + pn + ' ' + ln[sp:] + gbl.tnames[trk].definePattern(pn, s[0]) + ln = ln[:sp] + ' ' + pn + ' ' + ln[sp:] - ln=ln.split() + ln=ln.split() - gbl.tnames[name].setSequence(ln) + gbl.tnames[name].setSequence(ln) -def trackSeqClear(name, ln): - """ Clear sequence for specified tracks. +def trackSeqClear(name, ln): + """ Clear sequence for specified tracks. - Note: "Drum SeqClear" clears all Drum tracks, - "Drum-3 SeqClear" clears track Drum-3. - """ + Note: "Drum SeqClear" clears all Drum tracks, + "Drum-3 SeqClear" clears track Drum-3. + """ - if ln: - error("No args permitted. Use %s SEQCLEAR" % name) + if ln: + error("No args permitted. Use %s SEQCLEAR" % name) - for n in gbl.tnames: - if n.find(name) == 0: - if gbl.debug: - print "SeqClear: Track %s cleared." % n - gbl.tnames[n].clearSequence() + for n in gbl.tnames: + if n.find(name) == 0: + if gbl.debug: + print "SeqClear: Track %s cleared." % n + gbl.tnames[n].clearSequence() def trackSeqRnd(name, ln): - """ Set random order for specified track. """ + """ Set random order for specified track. """ - if len(ln) != 1: - error("Use: %s SeqRnd [On, Off]." % name) + if len(ln) != 1: + error("Use: %s SeqRnd [On, Off]" % name) - gbl.tnames[name].setRnd(ln[0].upper()) + gbl.tnames[name].setRnd(ln[0].upper()) def trackSeqRndWeight(name, ln): - """ Set rnd weight for track. """ + """ Set rnd weight for track. """ - if not ln: - error("Use: %s RndWeight ." % name) + if not ln: + error("Use: %s RndWeight " % name) - gbl.tnames[name].setRndWeight(ln) + gbl.tnames[name].setRndWeight(ln) def trackRestart(name, ln): - """ Restart track to almost-default condidions. """ + """ Restart track to almost-default condidions. """ - if ln: - error ("Use: '%s Resart' with no args", name) + if ln: + error ("Use: '%s Resart' with no args", name) - gbl.tnames[name].restart() + gbl.tnames[name].restart() def trackGroove(name, ln): - """ Select a previously defined groove for a single track. """ + """ Select a previously defined groove for a single track. """ - if len(ln) != 1: - error("Use: %s Groove Name" % name) + if len(ln) != 1: + error("Use: %s Groove Name" % name) - slot = ln[0].upper() + slot = ln[0].upper() - if not slot in gbl.settingsGroove: - error("Groove '%s' not defined" % slot) + if not slot in gbl.settingsGroove: + error("Groove '%s' not defined" % slot) - g=gbl.tnames[name] - g.restoreGroove(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) + if g.sequence == [None] * len(g.sequence): + warning("'%s' Track Groove has no sequence. Track name error?" % name) - g.setSeqSize() + g.setSeqSize() - if gbl.debug: - print "%s Groove settings restored from '%s'." % (name, slot) + if gbl.debug: + print "%s Groove settings restored from '%s'." % (name, slot) def trackRiff(name, ln): - """ Set a riff for a track. """ + """ Set a riff for a track. """ - gbl.tnames[name].setRiff(' '.join(ln)) + gbl.tnames[name].setRiff(' '.join(ln)) def deleteTrks(ln): - """ Delete a track and free the MIDI track. """ + """ Delete a track and free the MIDI track. """ - if not len(ln): - error("Use Delete Track [...]") + if not len(ln): + error("Use Delete Track [...]") - for name in ln: - name=name.upper() - if name in gbl.tnames: - tr = gbl.tnames[name] - else: - error("Track '%s' does not exist" % name) + for name in ln: + name=name.upper() + if name in gbl.tnames: + tr = gbl.tnames[name] + else: + error("Track '%s' does not exist" % name) - if tr.channel: - tr.doMidiClear() - tr.clearPending() + if tr.channel: + tr.doMidiClear() + tr.clearPending() - if tr.riff: - warning("%s has pending RIFF(s)" % name) - gbl.midiAvail[tr.channel] -= 1 + if tr.riff: + warning("%s has pending RIFF(s)" % name) + gbl.midiAvail[tr.channel] -= 1 - # NOTE: Don't try deleting 'tr' since it's just a copy!! + # NOTE: Don't try deleting 'tr' since it's just a copy!! - del gbl.tnames[name] + del gbl.tnames[name] - if not name in gbl.deletedTracks: - gbl.deletedTracks.append(name) + if not name in gbl.deletedTracks: + gbl.deletedTracks.append(name) - if gbl.debug: - print "Track '%s' deleted" % name + if gbl.debug: + print "Track '%s' deleted" % name @@ -1739,127 +1769,126 @@ def deleteTrks(ln): # Volume def trackRvolume(name, ln): - """ Set random volume for specific track. """ + """ Set random volume for specific track. """ - if not ln: - error ("Use: %s RVolume N [...]." % name) + if not ln: + error ("Use: %s RVolume N [...]" % name) - gbl.tnames[name].setRVolume(ln) + gbl.tnames[name].setRVolume(ln) def trackCresc(name, ln): - gbl.tnames[name].setCresc(1, ln) - #error("(De)Crescendo only supported in master context.") + gbl.tnames[name].setCresc(1, ln) def trackDeCresc(name, ln): - gbl.tnames[name].setCresc(-1, ln) + gbl.tnames[name].setCresc(-1, ln) def trackVolume(name, ln): - """ Set volume for specific track. """ + """ Set volume for specific track. """ - if not ln: - error ("Use: %s Volume DYN [...]." % name) + if not ln: + error ("Use: %s Volume DYN [...]" % name) - gbl.tnames[name].setVolume(ln) + gbl.tnames[name].setVolume(ln) def trackChannelVol(name, ln): - """ Set the channel volume for a track.""" + """ Set the channel volume for a track.""" - if len(ln) != 1: - error("Use: %s ChannelVolume." % name) + if len(ln) != 1: + error("Use: %s ChannelVolume" % name) - v=stoi(ln[0], "Expecting integer arg, not %s." % ln[0]) + v=stoi(ln[0], "Expecting integer arg, not %s" % ln[0]) - if v<0 or v>127: - error("ChannelVolume must be 0..127") + if v<0 or v>127: + error("ChannelVolume must be 0..127") - gbl.tnames[name].setChannelVolume(v) + gbl.tnames[name].setChannelVolume(v) def trackAccent(name, ln): - """ Set emphasis beats for track.""" + """ Set emphasis beats for track.""" - gbl.tnames[name].setAccent(ln) + gbl.tnames[name].setAccent(ln) ####################################### # Timing def trackCut(name, ln): - """ Insert a ALL NOTES OFF at the given offset. """ + """ Insert a ALL NOTES OFF at the given offset. """ - if not len(ln): - ln=['0'] + if not len(ln): + ln=['0'] - if len(ln) != 1: - error("Use: %s Cut Offset" % name) + if len(ln) != 1: + error("Use: %s Cut Offset" % name) - offset = stof(ln[0], "Cut offset expecting value, (not '%s')." % ln[0]) + offset = stof(ln[0], "Cut offset expecting value, (not '%s')" % ln[0]) - if offset < -gbl.QperBar or offset > gbl.QperBar: - warning("Cut: %s is a large beat offset." % offset) + if offset < -gbl.QperBar or offset > gbl.QperBar: + warning("Cut: %s is a large beat offset" % offset) - moff = int(gbl.tickOffset + (gbl.BperQ * offset)) + moff = int(gbl.tickOffset + (gbl.BperQ * offset)) - if moff < 0: - error("Calculated offset for Cut comes before start of track.") + if moff < 0: + error("Calculated offset for Cut comes before start of track") - """ Insert allnoteoff directly in track. This skips the normal - queueing in pats because it would never take if at the end - of a track. - """ + """ Insert allnoteoff directly in track. This skips the normal + queueing in pats because it would never take if at the end + of a track. + """ - m = gbl.tnames[name].channel - if m and len(gbl.mtrks[m].miditrk) > 1: - gbl.mtrks[m].addNoteOff(moff) + m = gbl.tnames[name].channel + if m and len(gbl.mtrks[m].miditrk) > 1: + gbl.mtrks[m].addNoteOff(moff) - if gbl.debug: - print "%s Cut: Beat %s, Bar %s" % (name, offset, gbl.barNum + 1) + if gbl.debug: + print "%s Cut: Beat %s, Bar %s" % (name, offset, gbl.barNum + 1) def trackMallet(name, ln): - """ Set repeating-mallet options for solo/melody track. """ + """ Set repeating-mallet options for solo/melody track. """ - if not ln: - error("Use: %s Mallet [...]." % name) + if not ln: + error("Use: %s Mallet [...]" % name) - gbl.tnames[name].setMallet(ln) + gbl.tnames[name].setMallet(ln) def trackRtime(name, ln): - """ Set random timing for specific track. """ + """ Set random timing for specific track. """ - if not ln: - error ("Use: %s RTime N [...]." % name) + if not ln: + error ("Use: %s RTime N [...]" % name) - gbl.tnames[name].setRTime(ln) + gbl.tnames[name].setRTime(ln) def trackRskip(name, ln): - """ Set random skip for specific track. """ + """ Set random skip for specific track. """ - if not ln: - error ("Use: %s RSkip N [...]." % name) + if not ln: + error ("Use: %s RSkip N [...]" % name) - gbl.tnames[name].setRSkip(ln) + gbl.tnames[name].setRSkip(ln) def trackArtic(name, ln): - """ Set articulation. """ + """ Set articulation. """ - if not ln: - error("Use: %s Articulation N [...]." % name) + if not ln: + error("Use: %s Articulation N [...]" % name) - gbl.tnames[name].setArtic(ln) + gbl.tnames[name].setArtic(ln) ####################################### @@ -1867,129 +1896,129 @@ def trackArtic(name, ln): def trackCompress(name, ln): - """ Set (unset) compress for track. """ + """ Set (unset) compress for track. """ - if not ln: - error("Use: %s Compress " % name) + if not ln: + error("Use: %s Compress " % name) - gbl.tnames[name].setCompress(ln) + gbl.tnames[name].setCompress(ln) def trackVoicing(name, ln): - """ Set Voicing options. Only valid for chord tracks at this time.""" + """ Set Voicing options. Only valid for chord tracks at this time.""" - if not ln: - error("Use: %s Voicing [...]" % name) + if not ln: + error("Use: %s Voicing [...]" % name) - gbl.tnames[name].setVoicing(ln) + gbl.tnames[name].setVoicing(ln) def trackDupRoot(name, ln): - """ Set (unset) the root note duplication. Only applies to chord tracks. """ + """ Set (unset) the root note duplication. Only applies to chord tracks. """ - if not ln: - error("Use: %s DupRoot ..." % name) + if not ln: + error("Use: %s DupRoot ..." % name) - gbl.tnames[name].setDupRoot(ln) + gbl.tnames[name].setDupRoot(ln) def trackChordLimit(name, ln): - """ Set (unset) ChordLimit for track. """ + """ Set (unset) ChordLimit for track. """ - if len(ln) != 1: - error("Use: %s ChordLimit " % name) + if len(ln) != 1: + error("Use: %s ChordLimit " % name) - gbl.tnames[name].setChordLimit(ln[0]) + gbl.tnames[name].setChordLimit(ln[0]) def trackRange(name, ln): - """ Set (unset) Range for track. Only effects arp and scale. """ + """ Set (unset) Range for track. Only effects arp and scale. """ - if not ln: - error("Use: %s Range ... " % name) + if not ln: + error("Use: %s Range ... " % name) - gbl.tnames[name].setRange(ln) + gbl.tnames[name].setRange(ln) def trackInvert(name, ln): - """ Set invert for track.""" + """ Set invert for track.""" - if not ln: - error("Use: %s Invert N [...]." % name) + if not ln: + error("Use: %s Invert N [...]" % name) - gbl.tnames[name].setInvert(ln) + gbl.tnames[name].setInvert(ln) def trackSpan(name, ln): - """ Set midi note span for track. """ + """ Set midi note span for track. """ - if len(ln) != 2: - error("Use: %s Start End" % name) + if len(ln) != 2: + error("Use: %s Start End" % name) - start = stoi(ln[0], "Expecting integer for SPAN 1st arg.") - if start <0 or start >127: - error("Start arg for Span must be 0..127, not %s." % start) + start = stoi(ln[0], "Expecting integer for SPAN 1st arg") + if start <0 or start >127: + error("Start arg for Span must be 0..127, not %s" % start) - end = stoi(ln[1], "Expecting integer for SPAN 2nd arg.") - if end <0 or end >127: - error("End arg for Span must be 0..127, not %s." % end) + end = stoi(ln[1], "Expecting integer for SPAN 2nd arg") + if end <0 or end >127: + error("End arg for Span must be 0..127, not %s" % end) - if end <= start: - error("End arg for Span must be greater than start.") + if end <= start: + error("End arg for Span must be greater than start") - if end-start < 11: - error("Span range must be at least 12.") + if end-start < 11: + error("Span range must be at least 12") - gbl.tnames[name].setSpan(start, end) + gbl.tnames[name].setSpan(start, end) def trackOctave(name, ln): - """ Set octave for specific track. """ + """ Set octave for specific track. """ - if not ln: - error ("Use: %s Octave N [...], (n=0..10)" % name) + if not ln: + error ("Use: %s Octave N [...], (n=0..10)" % name) - gbl.tnames[name].setOctave( ln ) + gbl.tnames[name].setOctave( ln ) def trackStrum(name, ln): - """ Set all specified track strum. """ + """ Set all specified track strum. """ - if not ln: - error ("Use: %s Strum N [...]" % name) + if not ln: + error ("Use: %s Strum N [...]" % name) - gbl.tnames[name].setStrum( ln ) + gbl.tnames[name].setStrum( ln ) def trackHarmony(name, ln): - """ Set harmony value. """ + """ Set harmony value. """ - if not ln: - error("Use: %s Harmony N [...]" % name) + if not ln: + error("Use: %s Harmony N [...]" % name) - gbl.tnames[name].setHarmony(ln) + gbl.tnames[name].setHarmony(ln) def trackHarmonyOnly(name, ln): - """ Set harmony only for track. """ + """ Set harmony only for track. """ - if not ln: - error("Use: %s HarmonyOnly N [...]" % name) + if not ln: + error("Use: %s HarmonyOnly N [...]" % name) - gbl.tnames[name].setHarmonyOnly(ln) + gbl.tnames[name].setHarmonyOnly(ln) def trackHarmonyVolume(name, ln): - """ Set harmony volume for track.""" + """ Set harmony volume for track.""" - if not ln: - error("Use: %s HarmonyVolume N [...]" % name) + if not ln: + error("Use: %s HarmonyVolume N [...]" % name) - gbl.tnames[name].setHarmonyVolume(ln) + gbl.tnames[name].setHarmonyVolume(ln) ####################################### @@ -1997,364 +2026,367 @@ def trackHarmonyVolume(name, ln): def trackChannel(name, ln): - """ Set the midi channel for a track.""" + """ Set the midi channel for a track.""" - if not ln: - error("Use: %s Channel" % name) + if not ln: + error("Use: %s Channel" % name) - gbl.tnames[name].setChannel(ln[0]) + gbl.tnames[name].setChannel(ln[0]) def trackMdefine(name, ln): - """ Set a midi seq pattern. Ignore track name.""" + """ Set a midi seq pattern. Ignore track name.""" - mdefine(ln) + mdefine(ln) def trackMidiExt(ln): - """ Helper for trackMidiSeq() and trackMidiVoice().""" + """ Helper for trackMidiSeq() and trackMidiVoice().""" - ids=1 - while 1: - sp = ln.find("{") + ids=1 + while 1: + sp = ln.find("{") - if sp<0: - break + if sp<0: + break - ln, s = pextract(ln, "{", "}", 1) - if not s: - error("Did not find matching '}' for '{'") + ln, s = pextract(ln, "{", "}", 1) + if not s: + error("Did not find matching '}' for '{'") - pn = "_%s" % ids - ids+=1 + pn = "_%s" % ids + ids+=1 - MMA.mdefine.mdef.set(pn, s[0]) - ln = ln[:sp] + ' ' + pn + ' ' + ln[sp:] + MMA.mdefine.mdef.set(pn, s[0]) + ln = ln[:sp] + ' ' + pn + ' ' + ln[sp:] - return ln.split() + return ln.split() def trackMidiClear(name, ln): - """ Set MIDI command to send at end of groove. """ + """ Set MIDI command to send at end of groove. """ - if not ln: - error("Use %s MIDIClear Controller Data" % name) + if not ln: + error("Use %s MIDIClear Controller Data" % name) - if len(ln) == 1 and ln[0] == '-': - gbl.tnames[name].setMidiClear( '-' ) - else: - ln=' '.join(ln) - if '{' in ln or '}' in ln: - error("{}s are not permitted in %s MIDIClear command." % name) - gbl.tnames[name].setMidiClear( trackMidiExt( '{' + ln + '}' )) + if len(ln) == 1 and ln[0] == '-': + gbl.tnames[name].setMidiClear( '-' ) + else: + ln=' '.join(ln) + if '{' in ln or '}' in ln: + error("{}s are not permitted in %s MIDIClear command" % name) + gbl.tnames[name].setMidiClear( trackMidiExt( '{' + ln + '}' )) def trackMidiSeq(name, ln): - """ Set reoccurring MIDI command for track. """ + """ Set reoccurring MIDI command for track. """ - if not ln: - error("Use %s MidiSeq Controller Data " % name) + if not ln: + error("Use %s MidiSeq Controller Data" % name) - if len(ln) == 1 and ln[0]== '-': - gbl.tnames[name].setMidiSeq('-') - else: - gbl.tnames[name].setMidiSeq( trackMidiExt(' '.join(ln) )) + if len(ln) == 1 and ln[0]== '-': + gbl.tnames[name].setMidiSeq('-') + else: + gbl.tnames[name].setMidiSeq( trackMidiExt(' '.join(ln) )) def trackMidiVoice(name, ln): - """ Set single shot MIDI command for track. """ + """ Set single shot MIDI command for track. """ - if not ln: - error("Use %s MidiVoice Controller Data" % name) + if not ln: + error("Use %s MidiVoice Controller Data" % name) - if len(ln) == 1 and ln[0] == '-': - gbl.tnames[name].setMidiVoice( '-' ) - else: - gbl.tnames[name].setMidiVoice( trackMidiExt(' '.join(ln) )) + if len(ln) == 1 and ln[0] == '-': + gbl.tnames[name].setMidiVoice( '-' ) + else: + gbl.tnames[name].setMidiVoice( trackMidiExt(' '.join(ln) )) def trackChShare(name, ln): - """ Set MIDI channel sharing.""" + """ Set MIDI channel sharing.""" - if len(ln) !=1: - error("Use: %s ChShare TrackName" % name) + if len(ln) !=1: + error("Use: %s ChShare TrackName" % name) - gbl.tnames[name].setChShare(ln[0]) + gbl.tnames[name].setChShare(ln[0]) def trackVoice(name, ln): - """ Set voice for specific track. """ + """ Set voice for specific track. """ - if not ln: - error ("Use: %s Voice NN [...]" % name) + if not ln: + error ("Use: %s Voice NN [...]" % name) - gbl.tnames[name].setVoice(ln) + gbl.tnames[name].setVoice(ln) def trackPan(name, ln): - """ Set the Midi Pan value for a track.""" + """ Set the Midi Pan value for a track.""" - if len(ln) != 1: - error("Use: %s PAN NN" % name) + if len(ln) != 1: + error("Use: %s PAN NN" % name) - gbl.tnames[name].setPan(ln[0]) + gbl.tnames[name].setPan(ln[0]) def trackOff(name, ln): - """ Turn a track off """ + """ Turn a track off """ - if ln: - error("Use: %s OFF with no paramater." % name) + if ln: + error("Use: %s OFF with no paramater" % name) - gbl.tnames[name].setOff() + gbl.tnames[name].setOff() def trackOn(name, ln): - """ Turn a track on """ + """ Turn a track on """ - if ln: - error("Use: %s ON with no paramater." % name) + if ln: + error("Use: %s ON with no paramater" % name) - gbl.tnames[name].setOn() + gbl.tnames[name].setOn() def trackMidiName(name,ln): - """ Set channel track name.""" + """ Set channel track name.""" - if not ln: - error("Use: %s TrackName." % name) + if not ln: + error("Use: %s TrackName" % name) - gbl.tnames[name].setTname(ln[0]) + gbl.tnames[name].setTname(ln[0]) def trackTone(name, ln): - """ Set the tone (note). Only valid in drum tracks.""" + """ Set the tone (note). Only valid in drum tracks.""" - if not ln: - error("Use: %s Tone N [...]." % name) + if not ln: + error("Use: %s Tone N [...]" % name) - gbl.tnames[name].setTone(ln) + gbl.tnames[name].setTone(ln) def trackGlis(name, ln): - """ Enable/disable portamento. """ + """ Enable/disable portamento. """ - if len(ln) != 1: - error("Use: %s Portamento NN, off=0, 1..127==on." % name) + if len(ln) != 1: + error("Use: %s Portamento NN, off=0, 1..127==on" % name) - gbl.tnames[name].setGlis(ln[0]) + gbl.tnames[name].setGlis(ln[0]) def trackForceOut(name, ln): - """ Force output of voice settings. """ + """ Force output of voice settings. """ - if len(ln): - error("Use %s ForceOut (no options)." % name) + if len(ln): + error("Use %s ForceOut (no options)" % name) - gbl.tnames[name].setForceOut() + gbl.tnames[name].setForceOut() ####################################### # Misc def trackDrumType(name, ln): - """ Set a melody or solo track to be a drum solo track.""" + """ Set a melody or solo track to be a drum solo track.""" - tr = gbl.tnames[name] - if tr.vtype not in ('SOLO', 'MELODY'): - error ("Only Solo and Melody tracks can be to DrumType, not '%s'." - % name) - if ln: - error("No parmeters permitted for DrumType command.") + tr = gbl.tnames[name] + if tr.vtype not in ('SOLO', 'MELODY'): + error ("Only Solo and Melody tracks can be to DrumType, not '%s'" % name) + if ln: + error("No parmeters permitted for DrumType command") - tr.setDrumType() + tr.setDrumType() def trackDirection(name, ln): - """ Set scale/arp direction. """ + """ Set scale/arp direction. """ - if not ln: - error("Use: %s Direction OPT" % name) + if not ln: + error("Use: %s Direction OPT" % name) - gbl.tnames[name].setDirection(ln) + gbl.tnames[name].setDirection(ln) def trackScaletype(name, ln): - """ Set the scale type. """ + """ Set the scale type. """ - if not ln: - error("Use: %s ScaleType OPT" % name) + if not ln: + error("Use: %s ScaleType OPT" % name) - gbl.tnames[name].setScaletype(ln) + gbl.tnames[name].setScaletype(ln) def trackCopy(name, ln): - """ Copy setting in 'ln' to 'name'. """ + """ Copy setting in 'ln' to 'name'. """ - if len(ln) != 1: - error("Use: %s Copy ExistingTrack" % name) + if len(ln) != 1: + error("Use: %s Copy ExistingTrack" % name) - gbl.tnames[name].copySettings(ln[0].upper()) + gbl.tnames[name].copySettings(ln[0].upper()) def trackUnify(name, ln): - """ Set UNIFY for track.""" + """ Set UNIFY for track.""" - if not len(ln): - error("Use %s UNIFY 1 [...]" % name) + if not len(ln): + error("Use %s UNIFY 1 [...]" % name) - gbl.tnames[name].setUnify(ln) + gbl.tnames[name].setUnify(ln) """ ================================================================= - Command jump tables. These need to be at the end of this module - to avoid undefined name errors. The tables are only used in - the parse() function. + Command jump tables. These need to be at the end of this module + to avoid undefined name errors. The tables are only used in + the parse() function. - The first table is for the simple commands ... those which DO NOT - have a leading trackname. The second table is for commands which - require a leading track name. + The first table is for the simple commands ... those which DO NOT + have a leading trackname. The second table is for commands which + require a leading track name. - The alphabetic order is NOT needed, just convenient. + The alphabetic order is NOT needed, just convenient. """ simpleFuncs={ - 'ADJUSTVOLUME': MMA.volume.adjvolume, - 'ALLTRACKS': allTracks, - 'AUTHOR': MMA.docs.docAuthor, - 'AUTOSOLOTRACKS': MMA.patSolo.setAutoSolo, - 'BEATADJUST': beatAdjust, - 'CHANNELPREF': setChPref, - 'COMMENT': comment, - 'CRESC': MMA.volume.setCresc, - 'CUT': cut, - 'DEBUG': setDebug, - 'DEC': macros.vardec, - 'DECRESC': MMA.volume.setDecresc, - 'DEFCHORD': MMA.chords.defChord, - 'DEFGROOVE': grooveDefine, - 'DELETE': deleteTrks, - 'DOC': MMA.docs.docNote, - 'DRUMVOLTR': MMA.translate.drumVolTable.set, - 'ELSE': ifelse, - 'ENDIF': ifend, - 'ENDMSET': endmset, - 'ENDREPEAT': repeatend, - 'EOF': eof, - 'FERMATA': fermata, - 'GOTO': goto, - 'GROOVE': groove, - 'IF': macros.varIF, - 'IFEND': ifend, - 'INC': macros.varinc, - 'INCLUDE': include, - 'KEYSIG': MMA.patSolo.keySig.set, - 'LABEL': comment, - 'LYRIC': lyric.option, - 'MIDIDEF': mdefine, - 'MIDI': rawMidi, - 'MIDIFILE': setMidiFileType, - 'MIDIINC': MMA.midiIn.midiinc, - 'MIDIMARK': midiMarker, - 'MIDISPLIT': MMA.midi.setSplitChannels, - 'MMAEND': mmaend, - 'MMASTART': mmastart, - 'MSET': macros.msetvar, - 'MSETEND': endmset, - 'CHORDADJUST': MMA.chords.chordAdjust, - 'PRINT': lnPrint, - 'PRINTACTIVE': printActive, - 'PRINTCHORD': MMA.chords.printChord, - 'REPEAT': repeat, - 'REPEATEND': repeatend, - 'REPEATENDING': repeatending, - 'RESTART': restart, - 'RNDSEED': rndseed, - 'RNDSET': macros.rndvar, - 'SEQ': seq, - 'SEQCLEAR': seqClear, - 'SEQRND': setSeqRnd, - 'SEQRNDWEIGHT': setSeqRndWeight, - 'SEQSIZE': seqsize, - 'SET': macros.setvar, - 'SETAUTOLIBPATH': setAutoPath, - 'SETINCPATH': setIncPath, - 'SETLIBPATH': setLibPath, - 'SETOUTPATH': setOutPath, - 'SHOWVARS': macros.showvars, - 'STACKVALUE': macros.stackValue, - 'SWINGMODE': MMA.notelen.swingMode, - 'TEMPO': tempo, - 'TIME': setTime, - 'TIMESIG': setTimeSig, - 'TONETR': MMA.translate.dtable.set, - 'UNSET': macros.unsetvar, - 'USE': usefile, - 'VEXPAND': macros.vexpand, - 'VOICEVOLTR': MMA.translate.voiceVolTable.set, - 'VOICETR': MMA.translate.vtable.set, - 'VOLUME': MMA.volume.setVolume, - 'TRANSPOSE': transpose + 'ADJUSTVOLUME': MMA.volume.adjvolume, + 'ALLTRACKS': allTracks, + 'AUTHOR': MMA.docs.docAuthor, + 'AUTOSOLOTRACKS': MMA.patSolo.setAutoSolo, + 'BEATADJUST': beatAdjust, + 'CHANNELPREF': setChPref, + 'COMMENT': comment, + 'CRESC': MMA.volume.setCresc, + 'CUT': cut, + 'DEBUG': setDebug, + 'DEC': macros.vardec, + 'DECRESC': MMA.volume.setDecresc, + 'DEFCHORD': MMA.chords.defChord, + 'DEFGROOVE': grooveDefine, + 'DELETE': deleteTrks, + 'DOC': MMA.docs.docNote, + 'DOCVAR': MMA.docs.docVars, + 'DRUMVOLTR': MMA.translate.drumVolTable.set, + 'ELSE': ifelse, + 'ENDIF': ifend, + 'ENDMSET': endmset, + 'ENDREPEAT': repeatend, + 'EOF': eof, + 'FERMATA': fermata, + 'GOTO': goto, + 'GROOVE': groove, + 'GROOVECLEAR': grooveClear, + 'IF': macros.varIF, + 'IFEND': ifend, + 'INC': macros.varinc, + 'INCLUDE': include, + 'KEYSIG': MMA.patSolo.keySig.set, + 'LABEL': comment, + 'LYRIC': lyric.option, + 'MIDIDEF': mdefine, + 'MIDI': rawMidi, + 'MIDIFILE': setMidiFileType, + 'MIDIINC': MMA.midiIn.midiinc, + 'MIDIMARK': midiMarker, + 'MIDISPLIT': MMA.midi.setSplitChannels, + 'MMAEND': mmaend, + 'MMASTART': mmastart, + 'MSET': macros.msetvar, + 'MSETEND': endmset, + 'NEWSET': macros.newsetvar, + 'CHORDADJUST': MMA.chords.chordAdjust, + 'PRINT': lnPrint, + 'PRINTACTIVE': printActive, + 'PRINTCHORD': MMA.chords.printChord, + 'REPEAT': repeat, + 'REPEATEND': repeatend, + 'REPEATENDING': repeatending, + 'RESTART': restart, + 'RNDSEED': rndseed, + 'RNDSET': macros.rndvar, + 'SEQ': seq, + 'SEQCLEAR': seqClear, + 'SEQRND': setSeqRnd, + 'SEQRNDWEIGHT': setSeqRndWeight, + 'SEQSIZE': seqsize, + 'SET': macros.setvar, + 'SETAUTOLIBPATH': setAutoPath, + 'SETINCPATH': setIncPath, + 'SETLIBPATH': setLibPath, + 'SETOUTPATH': setOutPath, + 'SHOWVARS': macros.showvars, + 'STACKVALUE': macros.stackValue, + 'SWINGMODE': MMA.notelen.swingMode, + 'TEMPO': tempo, + 'TIME': setTime, + 'TIMESIG': setTimeSig, + 'TONETR': MMA.translate.dtable.set, + 'UNSET': macros.unsetvar, + 'USE': usefile, + 'VARCLEAR': macros.clear, + 'VEXPAND': macros.vexpand, + 'VOICEVOLTR': MMA.translate.voiceVolTable.set, + 'VOICETR': MMA.translate.vtable.set, + 'VOLUME': MMA.volume.setVolume, + 'TRANSPOSE': transpose } trackFuncs={ - 'ACCENT': trackAccent, - 'ARTICULATE': trackArtic, - 'CHANNEL': trackChannel, - 'MIDIVOLUME': trackChannelVol, - 'CHSHARE': trackChShare, - 'COMPRESS': trackCompress, - 'COPY': trackCopy, - 'CRESC': trackCresc, - 'CUT': trackCut, - 'DECRESC': trackDeCresc, - 'DIRECTION': trackDirection, - 'DRUMTYPE': trackDrumType, - 'DUPROOT': trackDupRoot, - 'FORCEOUT': trackForceOut, - 'GROOVE': trackGroove, - 'HARMONY': trackHarmony, - 'HARMONYONLY': trackHarmonyOnly, - 'HARMONYVOLUME': trackHarmonyVolume, - 'INVERT': trackInvert, - 'LIMIT': trackChordLimit, - 'MALLET': trackMallet, - 'MIDIDEF': trackMdefine, - 'MIDIGLIS': trackGlis, - 'MIDICLEAR': trackMidiClear, - 'MIDIPAN': trackPan, - 'MIDIGLIS': trackGlis, - 'MIDISEQ': trackMidiSeq, - 'MIDITNAME': trackMidiName, - 'MIDIVOICE': trackMidiVoice, - 'OCTAVE': trackOctave, - 'OFF': trackOff, - 'ON': trackOn, - 'RANGE': trackRange, - 'RESTART': trackRestart, - 'RIFF': trackRiff, - 'RSKIP': trackRskip, - 'RTIME': trackRtime, - 'RVOLUME': trackRvolume, - 'SCALETYPE': trackScaletype, - 'SEQCLEAR': trackSeqClear, - 'SEQRND': trackSeqRnd, - 'SEQUENCE': trackSequence, - 'SEQRNDWEIGHT': trackSeqRndWeight, - 'NOTESPAN': trackSpan, - 'STRUM': trackStrum, - 'TONE': trackTone, - 'UNIFY': trackUnify, - 'VOICE': trackVoice, - 'VOICING': trackVoicing, - 'VOLUME': trackVolume, - 'DEFINE': trackDefPattern + 'ACCENT': trackAccent, + 'ARTICULATE': trackArtic, + 'CHANNEL': trackChannel, + 'MIDIVOLUME': trackChannelVol, + 'CHSHARE': trackChShare, + 'COMPRESS': trackCompress, + 'COPY': trackCopy, + 'CRESC': trackCresc, + 'CUT': trackCut, + 'DECRESC': trackDeCresc, + 'DIRECTION': trackDirection, + 'DRUMTYPE': trackDrumType, + 'DUPROOT': trackDupRoot, + 'FORCEOUT': trackForceOut, + 'GROOVE': trackGroove, + 'HARMONY': trackHarmony, + 'HARMONYONLY': trackHarmonyOnly, + 'HARMONYVOLUME': trackHarmonyVolume, + 'INVERT': trackInvert, + 'LIMIT': trackChordLimit, + 'MALLET': trackMallet, + 'MIDIDEF': trackMdefine, + 'MIDIGLIS': trackGlis, + 'MIDICLEAR': trackMidiClear, + 'MIDIPAN': trackPan, + 'MIDIGLIS': trackGlis, + 'MIDISEQ': trackMidiSeq, + 'MIDITNAME': trackMidiName, + 'MIDIVOICE': trackMidiVoice, + 'OCTAVE': trackOctave, + 'OFF': trackOff, + 'ON': trackOn, + 'RANGE': trackRange, + 'RESTART': trackRestart, + 'RIFF': trackRiff, + 'RSKIP': trackRskip, + 'RTIME': trackRtime, + 'RVOLUME': trackRvolume, + 'SCALETYPE': trackScaletype, + 'SEQCLEAR': trackSeqClear, + 'SEQRND': trackSeqRnd, + 'SEQUENCE': trackSequence, + 'SEQRNDWEIGHT': trackSeqRndWeight, + 'NOTESPAN': trackSpan, + 'STRUM': trackStrum, + 'TONE': trackTone, + 'UNIFY': trackUnify, + 'VOICE': trackVoice, + 'VOICING': trackVoicing, + 'VOLUME': trackVolume, + 'DEFINE': trackDefPattern } diff --git a/mma/MMA/pat.py b/mma/MMA/pat.py index b3f7577..3a6791f 100644 --- a/mma/MMA/pat.py +++ b/mma/MMA/pat.py @@ -19,7 +19,7 @@ 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 +Bob van der Poel """ @@ -39,2076 +39,1940 @@ import MMA.mdefine import MMA.volume 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 + def __init__(self): + self.mode = None + 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.""" + """ Expand/contract an existing sequence list to the current seqSize.""" - while len(l) < gbl.seqSize: - l += l - return l[:gbl.seqSize] + while len(l) < gbl.seqSize: + l += l + return l[:gbl.seqSize] -pats = {} # Storage for all pattern defines +pats = {} # Storage for all pattern defines class PC: - """ Pattern class. + """ Pattern class. - Define classes for processing drum, chord, arp, and chord track. - These are mostly the same, so we create a base class and derive - the others from it. + Define classes for processing drum, chord, arp, and chord track. + These are mostly the same, so we create a base class and derive + the others from it. - We have a class for each track type. They are all derived - from the base 'Pats' class. These classes do special processing - like parsing a pattern tuple and creating a chord. + We have a class for each track type. They are all derived + from the base 'Pats' class. These classes do special processing + like parsing a pattern tuple and creating a chord. - No functions ever link to the code in this module, it is - only included into the real track class modules. + No functions ever link to the code in this module, it is + only included into the real track class modules. - """ + """ - def __init__(self, nm): + 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 - data is actually written to the track. Each item in - the midiPending list is a name (PAN, GLIS, etc), timeoffset, value. - """ + """ Midi commands like Pan, Glis, etc. are stacked until musical + data is actually written to the track. Each item in + the midiPending list is a name (PAN, GLIS, etc), timeoffset, value. + """ - self.midiPending = [] + self.midiPending = [] - self.riff = [] + self.riff = [] - self.disable = 0 + self.disable = 0 - if self.vtype == 'DRUM': - self.setChannel('10') - if not gbl.mtrks[self.channel].trackname: - gbl.mtrks[self.channel].addTrkName(0, 'Drum') + self.clearSequence() + - self.clearSequence() + self.inited = 1 - self.inited = 1 + ########################################## + ## These are called from process() to set options - ########################################## - ## These are called from process() to set options + def setCompress(self, ln): + """ set/unset the compress flag. """ - def setCompress(self, ln): - """ set/unset the compress flag. """ + ln=self.lnExpand(ln, 'Compress') - ln=self.lnExpand(ln, 'Compress') + tmp = [] - tmp = [] + for n in ln: - for n in ln: + n = stoi(n, "Argument for %s Compress must be a value" \ + % self.name) - n = stoi(n, "Argument for %s Compress must be a value." \ - % self.name) + if n < 0 or n > 5: + error("Compress %s out-of-range; must be 0 to 5" % n) - if n < 0 or n > 5: - error("Compress %s out-of-range; must be 0 to 5." % n) + if n and self.vtype=='CHORD' and self.voicing.mode: + vwarn = 1 - if n and self.vtype=='CHORD' and self.voicing.mode: - vwarn = 1 + tmp.append(n) - tmp.append(n) + self.compress = seqBump(tmp) - self.compress = seqBump(tmp) + if self.vtype not in ("CHORD", "ARPEGGIO"): + warning ("Compress is ignored in %s tracks" % self.vtype) - if self.vtype not in ("CHORD", "ARPEGGIO"): - warning ("Compress is ignored in %s tracks." % self.vtype) + if gbl.debug: + print "Set %s Compress to:" % self.name, + printList(self.compress) - if gbl.debug: - print "Set %s Compress to " % self.name, - printList(ln) + def setRange(self, ln): + """ set range. """ - def setRange(self, ln): - """ set range. """ + ln=self.lnExpand(ln, 'Range') - ln=self.lnExpand(ln, 'Range') + tmp = [] - tmp = [] + for n in ln: - for n in ln: + n = stof(n) + if n == 0: + n=1 + if n <= 0 or n >= 6: + error("Range %s out-of-range; must be between 0..6, not %s" % (self.name, n)) - n = stof(n) - if n == 0: - n=1 - if n <= 0 or n >= 6: - error("Range %s out-of-range; must be between 0..6, not %s." % (self.name, n)) + tmp.append(n) - tmp.append(n) + self.chordRange = seqBump(tmp) - self.chordRange = seqBump(tmp) + if self.vtype not in ("SCALE", "ARPEGGIO", "ARIA"): + warning ("Range ignored in '%s' tracks" % self.vtype) - if self.vtype not in ("SCALE", "ARPEGGIO"): - warning ("Range has no effect in '%s' tracks." % self.vtype) + if gbl.debug: + print "Set %s Range to:" % self.name, + printList(self.chordRange) - if gbl.debug: - print "Set %s Range to " % self.name, - printList(ln) + def setVoicing(self, ln): + """ set the Voicing Mode options. - def setVoicing(self, ln): - """ set the Voicing Mode options. """ + This is a stub. The real code is in patChord.py (settings are + only valid for that type). """ - if self.vtype != "CHORD": - error("Voicing is not supported for %s tracks." % self.vtype) + error("Voicing is not supported for %s tracks" % self.vtype) - for l in ln: - try: - mode, val = l.upper().split('=') - except: - error("Each Voicing option must contain a '=', not '%s'" % l) - if mode == 'MODE': - valid= ("-", "OPTIMAL", "NONE", "ROOT", "COMPRESSED", "INVERT") + def setForceOut(self): + """ Set the force output flag. This does 2 things: assigns + a midi channel and sends the voicing setting to the track. + """ - if not val in valid: - error("Valid Voicing Modes are: %s" % " ".join(valid)) + if not self.channel: + self.setChannel() + self.clearPending() - if val in ('-', 'NONE',"ROOT"): - val = None + self.insertVoice() - if val and (max(self.invert) + max(self.compress)): - warning("Setting both VoicingMode and Invert/Compress " - "is not a good idea") + def setDupRoot(self, ln): + """ set/unset root duplication. - """ When we set voicing mode we always reset this. This forces - the voicingmode code to restart its rotations. - """ + This is a stub. Only valid for CHORDs and that is where the code is.""" - self.lastChord = [] - self.voicing.mode = val + warning("RootDup has no effect in %s tracks" % self.vtype) - elif mode == 'RANGE': - val = stoi(val, "Argument for %s Voicing Range " - "must be a value." % self.name) + def setChordLimit(self, ln): + """ set/unset the chordLimit flag. """ - if val < 1 or val > 30: - error("Voicing Range '%s' out-of-range; " - "must be 1 to 30." % val) + n = stoi(ln, "Argument for %s ChordLimit must be a value" % self.name) - self.voicing.range = val + if n < 0 or n > 8: + error("ChordLimit %s out-of-range; must be 0 to 8" % n) + self.chordLimit = n - elif mode == 'CENTER': - val = stoi(val, "Argument for %s Voicing Center " - "must be a value." % self.name) + if self.vtype not in ("CHORD", "ARPEGGIO"): + warning ("Limit is ignored in %s tracks" % self.vtype) - if val < 1 or val > 12: - error("Voicing Center %s out-of-range; " - "must be 1 to 12." % val) + if gbl.debug: + print "Set %s ChordLimit to %s" % (self.name, n) - self.voicing.center = val - elif mode == 'RMOVE': - val = stoi(val, "Argument for %s Voicing Random " - "must be a value." % self.name) + def setChannel(self, ln=None): + """ Set the midi-channel number for a track. - if val < 0 or val > 100: - error("Voicing Random value must be 0 to 100 " - "not %s" % val) + - Checks for channel duplication + - Auto assigns channel number if ln=='' - self.voicing.random = val - self.voicing.bcount = 0 - elif mode == 'MOVE': - val = stoi(val, "Argument for %s Voicing Move " - "must be a value." % self.name) + If no track number was passed, then we try to + auto-alloc a track. First, we see if a preference + was set via MidiChPref. If these is no preference, + or if the preferred channel is already allocated + we go though the list, top to bottom, to find + an available channel. + """ - if val < 0 : - error("Voicing Move (bar count) must >= 0, not %s" % val) - if val > 20: - warning("Voicing Move (bar count) %s is quite large" % val) + if not ln: + try: + c=gbl.midiChPrefs[self.name] + except: + c=0 - self.voicing.bcount = val - self.voicing.random = 0 + if not c or gbl.midiAvail[c]: + c=-1 + for a in range(16, 0, -1): + if a!=10 and not gbl.midiAvail[a]: + c=a + break - elif mode == 'DIR': - val = stoi(val, "Argument for %s Voicing Dir (move direction) " - "must be a value." % self.name) + if c < 0: + error("No MIDI channel is available for %s,\n" + "Try CHShare or Delete unused tracks" % self.name) - if not val in (1,0,-1): - error("Voicing Move Dir -1, 0 or 1, not %s" % val) + else: + c = stoi(ln, "%s Channel assignment expecting Value, not %s" % + (self.name, ln)) - self.voicing.dir = val + if c<0 or c>16: + error("%s Channel must be 0..16, not %s" % (self.name, ln)) + if c == 10: + if self.vtype == 'DRUM': + pass + elif self.vtype in ('SOLO', 'MELODY') and self.drumType: + pass + else: + error("Channel 10 is reserved for DRUM, not %s" % self.name) - if gbl.debug: - v=self.voicing - print "Set %s Voicing MODE=%s" % (self.name, v.mode), - print "RANGE=%s CENTER=%s" % (v.range, v.center), - print "RMOVE=%s MOVE=%s DIR=%s" % (v.random, v.bcount, v.dir) + if self.vtype == 'DRUM' and c != 10: + error("DRUM tracks must be assigned to channel 10") + # Disable the channel. - def setForceOut(self): - """ Set the force output flag. This does 2 things: assigns - a midi channel and sends the voicing setting to the track. - """ + if c == 0: + if gbl.midiAvail[self.channel]: + gbl.midiAvail[self.channel] -= 1 + s="%s channel disabled" % self.name + if gbl.midiAvail[self.channel]: + s+=" Other tracks are still using channel %s" % self.channel + else: + s+=" Channel %s available" % self.channel + warning(s) + self.channel = 0 + self.disable = 1 + return - if not self.channel: - self.setChannel() - self.clearPending() - self.insertVoice() + if c != 10: + for a, tr in gbl.tnames.items(): + if a == self.name: # okay to reassign same number + continue + if tr.channel == c: + error("Channel %s is assigned to %s" % (c, tr.name ) ) - def setDupRoot(self, ln): - """ set/unset root duplication. """ + self.channel = c + if not self.name in gbl.midiAssigns[c]: + gbl.midiAssigns[c].append(self.name) - if self.vtype != 'CHORD': - error("RootDup can only be applied to CHORD tracks.") + gbl.midiAvail[c]+=1 - ln=self.lnExpand(ln, 'DupRoot') - tmp = [] + if not c in gbl.mtrks: + gbl.mtrks[c]=MMA.midi.Mtrk(c) + offset=0 + if gbl.debug: + print "MIDI channel %s buffer created" % c + else: + offset = gbl.tickOffset - for n in ln: - n = stoi(n, "Argument for %s DupRoot must be a value." % self.name) + if c != 10: + f=0 + for a, i in enumerate(self.midiPending): + if i[0]=='TNAME': + f=1 + if not f: + self.midiPending.append(('TNAME', 0, self.name.title() )) - if n < -9 or n > 9: - error("DupRoot %s out-of-range; must be -9 to 9." % n) + if gbl.debug: + print "MIDI Channel %s assigned to %s" % (self.channel, self.name) - tmp.append( n * 12 ) - self.dupRoot = seqBump(tmp) + def setChShare(self, ln): + """ Share midi-channel setting. """ - if gbl.debug: - print "Set %s DupRoot to " % self.name, - printList(ln) + if self.channel: # If channel already assigned, ignore + warning("Channel for %s has previously been assigned " + "(can't ChShare)" % self.name) + 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. + """ - def setChordLimit(self, ln): - """ set/unset the chordLimit flag. """ + sc = ln.upper() - n = stoi(ln, "Argument for %s ChordLimit must be a value." % self.name) + MMA.alloc.trackAlloc(sc, 1) - if n < 0 or n > 8: - error("ChordLimit %s out-of-range; must be 0 to 8." % n) + if not sc in gbl.tnames: + error("Channel '%s' does not exist. No such name" % sc) - self.chordLimit = n + if sc == self.name: + error("%s can't share MIDI channel with itself" % sc) - if self.vtype not in ("CHORD", "ARPEGGIO"): - warning ("Limit is ignored in %s tracks." % self.vtype) + if not gbl.tnames[sc].channel: + gbl.tnames[sc].setChannel() - if gbl.debug: - print "Set %s ChordLimit to %s" % (self.name, n) + schannel = gbl.tnames[sc].channel + if not schannel: + error("CHShare attempted to assign MIDI channel for %s, but " + "none avaiable" % self.name) - def setChannel(self, ln=None): - """ Set the midi-channel number for a track. - - Checks for channel duplication - - Auto assigns channel number if ln=='' + """ Actually do the assignment. Also copy voice/octave from + base track to this one ... it's going to use that voice anyway? + """ + self.channel = schannel - If no track number was passed, then we try to - auto-alloc a track. First, we see if a preference - was set via MidiChPref. If these is no preference, - or if the preferred channel is already allocated - we go though the list, top to bottom, to find - an available channel. - """ + self.voice = gbl.tnames[sc].voice[:] + self.octave = gbl.tnames[sc].octave[:] - if not ln: - try: - c=gbl.midiChPrefs[self.name] - except: - c=0 - if not c or gbl.midiAvail[c]: - c=-1 - for a in range(16, 0, -1): - if a!=10 and not gbl.midiAvail[a]: - c=a - break + # Update the avail. lists - if c < 0: - error("No MIDI channel is available for %s.\n" - "Try CHShare or Delete unused tracks." % self.name) + gbl.midiAssigns[self.channel].append(self.name) + gbl.midiAvail[self.channel]+=1 - else: - c = stoi(ln, "%s Channel assignment expecting Value, not %s" % - (self.name, ln)) - if c<0 or c>16: - error("%s Channel must be 0..16, not %s" % (self.name, ln)) + def setChannelVolume(self, v): + """ LowLevel MIDI command. Set Channel Voice. """ - if c == 10: - if self.vtype == 'DRUM': - pass - elif self.vtype in ('SOLO', 'MELODY') and self.drumType: - pass - else: - error("Channel 10 is reserved for DRUM, not %s." % self.name) + self.midiPending.append(( "CVOLUME", gbl.tickOffset, v) ) - if self.vtype == 'DRUM' and c != 10: - error("DRUM tracks must be assigned to channel 10.") + if gbl.debug: + print "Set %s MIDIChannelVolume to %s" % (self.name, v) - # Disable the channel. + def setTname(self, n): + """ Set the track name. - if c == 0: - if gbl.midiAvail[self.channel]: - gbl.midiAvail[self.channel] -= 1 - s="%s channel disabled." % self.name - if gbl.midiAvail[self.channel]: - s+=" Other tracks are still using channel %s." % self.channel - else: - s+=" Channel %s available." % self.channel - warning(s) - self.channel = 0 - self.disable = 1 - return + This is stacked and only gets output if track generates MIDI. + It is a handy way to override MMA's track naming. + """ + self.midiPending.append(('TNAME', 0, n )) + if gbl.debug: + print "Set %s track name for MIDI to %s" % (self.name, n) - if c != 10: - for a, tr in gbl.tnames.items(): - if a == self.name: # okay to reassign same number - continue + def setPan(self, ln): + """ Set MIDI Pan for this track. """ - if tr.channel == c: - error("Channel %s is assigned to %s." % (c, tr.name ) ) + v = stoi(ln[0], "Expecting integer value 0..127") - self.channel = c - if not self.name in gbl.midiAssigns[c]: - gbl.midiAssigns[c].append(self.name) + if v<0 or v>127: + error("PAN value must be 0..127") - gbl.midiAvail[c]+=1 + self.midiPending.append( ("PAN", gbl.tickOffset, v)) - if not c in gbl.mtrks: - gbl.mtrks[c]=MMA.midi.Mtrk(c) - offset=0 - if gbl.debug: - print "MIDI channel %s buffer created." % c - else: - offset = gbl.tickOffset + if gbl.debug: + print "Set %s MIDIPan to %s" % (self.name, v) - if c != 10: - f=0 - for a, i in enumerate(self.midiPending): - if i[0]=='TNAME': - f=1 - if not f: - self.midiPending.append(('TNAME', 0, self.name.title() )) - if gbl.debug: - print "MIDI Channel %s assigned to %s." % (self.channel, self.name) + def setGlis(self, ln): + """ Set MIDI Glis for this track. """ - def setChShare(self, ln): - """ Share midi-channel setting. """ + v = stoi(ln, "Expecting integer for Portamento") - if self.channel: # If channel already assigned, ignore - warning("Channel for %s has previously been assigned " - "(can't ChShare)." % self.name) - return + if v<0 or v>127: + error("Value for Portamento must be 0..127") - """ 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. - """ + self.midiPending.append( ("GLIS", gbl.tickOffset, v)) - sc = ln.upper() + if gbl.debug: + print "Set %s MIDIPortamento to %s" % (self.name, v) - MMA.alloc.trackAlloc(sc, 1) - if not sc in gbl.tnames: - error("Channel '%s' does not exist. No such name." % sc) - if sc == self.name: - error("%s can't share MIDI channel with itself." % sc) + def setStrum(self, ln): + """ Set Strum time. CHORD only option. """ + warning("Strum has no effect in %s tracks" % self.name) - if not gbl.tnames[sc].channel: - gbl.tnames[sc].setChannel() - schannel = gbl.tnames[sc].channel + def setTone(self, ln): + """ Set Tone. Error trap, only drum tracks have tone. """ - if not schannel: - error("CHShare attempted to assign MIDI channel for %s, but " - "none avaiable." % self.name) + error("Tone command not supported for %s track" % self.name) - """ Actually do the assignment. Also copy voice/octave from - base track to this one ... it's going to use that voice anyway? - """ + def setOn(self): + """ Turn ON track. """ - self.channel = schannel + self.disable = 0 + self.ssvoice = -1 - self.voice = gbl.tnames[sc].voice[:] - self.octave = gbl.tnames[sc].octave[:] + if gbl.debug: + print "%s Enabled" % self.name - # Update the avail. lists + def setOff(self): + """ Turn OFF track. """ - gbl.midiAssigns[self.channel].append(self.name) - gbl.midiAvail[self.channel]+=1 + self.disable = 1 + if gbl.debug: + print "%s Disabled" % self.name - def setChannelVolume(self, v): - """ LowLevel MIDI command. Set Channel Voice. """ - self.midiPending.append(( "CVOLUME", gbl.tickOffset, v) ) - if gbl.debug: - print "Set %s MIDIChannelVolume to %s" % (self.name, v) + def setRVolume(self, ln): + """ Set the volume randomizer for a track. """ - def setTname(self, n): - """ Set the track name. + ln = self.lnExpand(ln, 'RVolume') + tmp = [] - This is stacked and only gets output if track generates MIDI. - It is a handy way to override MMA's track naming. - """ + for n in ln: - self.midiPending.append(('TNAME', 0, n )) - if gbl.debug: - print "Set %s track name for MIDI to %s" % (self.name, n) + n = stoi(n, "Argument for %s RVolume must be a value" % self.name) - def setPan(self, ln): - """ Set MIDI Pan for this track. """ + if n < 0 or n > 100: + error("RVolume %s out-of-range; must be 0..100" % n) - v = stoi(ln[0], "Expecting integer value 0..127") + if n > 30: + warning("%s is a large RVolume value!" % n) - if v<0 or v>127: - error("PAN value must be 0..127") + tmp.append( n/100. ) - self.midiPending.append( ("PAN", gbl.tickOffset, v)) + self.rVolume = seqBump(tmp) - if gbl.debug: - print "Set %s MIDIPan to %s" % (self.name, v) + if gbl.debug: + print "Set %s Rvolume to:" % self.name, + for n in self.rVolume: + print int(n * 100), + print + def setRSkip(self, ln): + """ Set the note random skip factor for a track. """ - def setGlis(self, ln): - """ Set MIDI Glis for this track. """ + ln = self.lnExpand(ln, 'RSkip') + tmp = [] - v = stoi(ln, "Expecting integer for Portamento") + for n in ln: + n = stoi(n, "Expecting integer after in RSkip") - if v<0 or v>127: - error("Value for Portamento must be 0..127") + if n < 0 or n > 99: + error("RSkip arg must be 0..99") - self.midiPending.append( ("GLIS", gbl.tickOffset, v)) + tmp.append(n/100.) - if gbl.debug: - print "Set %s MIDIPortamento to %s" % (self.name, v) + self.rSkip = seqBump(tmp) + if gbl.debug: + print "Set %s RSkip to:" % self.name, + for n in self.rSkip: + print int(n * 100), + print - def setStrum(self, ln): - """ Set Strum time. """ + def setRTime(self, ln): + """ Set the timing randomizer for a track. """ - # Strum is only valid for CHORD tracks. + ln=self.lnExpand(ln, 'RTime') + tmp = [] - if self.vtype != "CHORD": - error( "Strum is only valid in Chord tracks, you tried to " - "set it in a %s track." % self.name) + for n in ln: + n=stoi(n, "Expecting an integer for Rtime") + if n < 0 or n > 100: + error("RTime %s out-of-range; must be 0..100" % n) - ln=self.lnExpand(ln, 'Strum') - tmp = [] + tmp.append(n) - for n in ln: - n = stoi(n, "Argument for %s Strum must be an integer" % self.name) + self.rTime = seqBump(tmp) - if n < 0 or n > 100: - error("Strum %s out-of-range; must be 0..100." % n) + if gbl.debug: + print "Set %s RTime to:" % self.name, + printList(self.rTime) - tmp.append(n) - self.strum = seqBump(tmp) + def setRnd(self, arg): + """ Enable random pattern selection from sequence.""" - if gbl.debug: - print "Set %s Strum to %s" % (self.name, self.strum) + if arg in ("ON", "1"): + self.seqRnd = 1 + elif arg in ("OFF", "0"): + self.seqRnd = 0 - def setTone(self, ln): - """ Set Tone. Error trap, only drum tracks have tone. """ + else: + error("SeqRnd: '%s' is not a valid option" % arg) - error("Tone command not supported for %s track." % self.name) + if gbl.debug: + if self.seqRnd: + a="On" + else: + a="Off" + print "%s SeqRnd: %s" % (self.name, a) - def setOn(self): - """ Turn ON track. """ + def setRndWeight(self, ln): + """ Set weighting factors for seqrnd. """ - self.disable = 0 - self.ssvoice = -1 + ln = self.lnExpand(ln, "SeqRndWeight") + tmp = [] - if gbl.debug: - print "%s Enabled" % self.name + for n in ln: + n = stoi(n) + if n < 0: error("SeqRndWeight: Values must be 0 or greater") + tmp.append(n) + self.seqRndWeight = seqBump(tmp) - def setOff(self): - """ Turn OFF track. """ + if gbl.debug: + print "%s SeqRndWeight:" % self.name, + printList(self.seqRndWeight) - self.disable = 1 - if gbl.debug: - print "%s Disabled" % self.name + def setDirection(self, ln): + """ Set scale direction. """ + ln = self.lnExpand(ln, "Direction") + tmp = [] + for n in ln: + n = n.upper() + if not n in ('UP', 'DOWN', 'BOTH', 'RANDOM'): + error("Unknown %s Direction '%s'" % (self.name, n) ) + tmp.append(n) - def setRVolume(self, ln): - """ Set the volume randomizer for a track. """ + self.direction = seqBump(tmp) - ln = self.lnExpand(ln, 'RVolume') - tmp = [] + if self.vtype == 'SCALE': + self.lastChord = None + self.lastNote = -1 - for n in ln: - n = stoi(n, "Argument for %s RVolume must be a value." % self.name) + if gbl.debug: + print "Set %s Direction to:" % self.name, + printList(self.direction) - if n < 0 or n > 100: - error("RVolume %s out-of-range; must be 0..100." % n) - if n > 30: - warning("%s is a large RVolume value!" % n) + def setScaletype(self, ln): + """ Set scale type. - tmp.append( n/100. ) + This is a error stub. The real code is in the permitted track code. + """ - self.rVolume = seqBump(tmp) + warning("ScaleType has no effect in %s tracks") % self.vtype - if gbl.debug: - print "Set %s Rvolume to " % self.name, - for n in self.rVolume: - print int(n * 100), - print + def setInvert(self, ln): + """ Set inversion for track. - def setRSkip(self, ln): - """ Set the note random skip factor for a track. """ + This can be applied to any track, + but has no effect in drum tracks. It inverts the chord + by one rotation for each value. + """ - ln = self.lnExpand(ln, 'RSkip') - tmp = [] + ln=self.lnExpand(ln, "Invert") - for n in ln: - n = stoi(n, "Expecting integer after in RSkip") + vwarn = 0 + tmp = [] - if n < 0 or n > 99: - error("RSkip arg must be 0..99") + for n in ln: + n = stoi(n, "Argument for %s Invert must be an integer" % self.name) - tmp.append(n/100.) + if n and self.vtype=='CHORD' and self.voicing.mode: + vwarn = 1 - self.rSkip = seqBump(tmp) + tmp.append(n) - if gbl.debug: - print "Set %s RSkip to " % self.name, - for n in self.rSkip: - print int(n * 100), - print + self.invert = seqBump(tmp) + if self.vtype not in ("CHORD", "ARPEGGIO"): + warning ("Invert is ignored in %s tracks" % self.vtype) - def setRTime(self, ln): - """ Set the timing randomizer for a track. """ + if vwarn: + warning("Setting both Voicing Mode and Invert is not a good idea") - ln=self.lnExpand(ln, 'RTime') - tmp = [] + if gbl.debug: + print "Set %s Invert to:" % self.name, + printList(self.invert) - for n in ln: - n=stoi(n, "Expecting an integer for Rtime") - if n < 0 or n > 100: - error("RTime %s out-of-range; must be 0..100." % n) - tmp.append(n) + def setOctave(self, ln): + """ Set the octave for a track. """ - self.rTime = seqBump(tmp) + ln=self.lnExpand(ln, 'Octave') + tmp = [] - if gbl.debug: - print "Set %s RTime to " % self.name, - printList(ln) + for n in ln: + n = stoi(n, "Argument for %s Octave must be an integer" % self.name) + if n < 0 or n > 10: + error("Octave %s out-of-range; must be 0..10" % n) + tmp.append( n * 12 ) - def setRnd(self, arg): - """ Enable random pattern selection from sequence.""" + self.octave = seqBump(tmp) - if arg in ("ON", "1"): - self.seqRnd = 1 + if gbl.debug: + print "Set %s Octave to:" % self.name, + for i in self.octave: + print i/12, + print - elif arg in ("OFF", "0"): - self.seqRnd = 0 - else: - error("SeqRnd: '%s' is not a valid option." % arg) + def setSpan(self, start, end): + """ Set span. - if gbl.debug: - if self.seqRnd: - a="On" - else: - a="Off" - print "%s SeqRnd: %s" % (self.name, a) + Note: The start/end parm has been verified in parser. + """ - def setRndWeight(self, ln): - """ Set weighting factors for seqrnd. """ + if self.vtype == 'DRUM': + warning("Span has no effect in Drum tracks") - ln = self.lnExpand(ln, "SeqRndWeight") - tmp = [] + self.spanStart = start + self.spanEnd = end - for n in ln: - n = stoi(n) - if n < 0: error("SeqRndWeight: Values must be 0 or greater.") - tmp.append(n) + if gbl.debug: + print "Set %s Span to %s...%s" % (self.name, self.spanStart, self.spanEnd) - self.seqRndWeight = seqBump(tmp) - if gbl.debug: - print "%s SeqRndWeight: " % self.name, - printList(self.seqRndWeight) + def setHarmony(self, ln): + """ Set the harmony. """ + ln=self.lnExpand(ln, 'Harmony') + tmp = [] - def setDirection(self, ln): - """ Set scale direction. """ + for n in ln: + n = n.upper() + if n in ( '-', '-0', 'NONE'): + n = None - ln = self.lnExpand(ln, "Direction") - tmp = [] + tmp.append(n) - for n in ln: - n = n.upper() - if not n in ('UP', 'DOWN', 'BOTH', 'RANDOM'): - error("Unknown %s Direction '%s'." % (self.name, n) ) - tmp.append(n) + self.harmony = seqBump(tmp) - self.direction = seqBump(tmp) + if self.vtype in ( 'CHORD', 'DRUM' ): + warning("Harmony setting for %s track ignored" % self.vtype) - if self.vtype == 'SCALE': - self.lastChord = None - self.lastNote = -1 + if gbl.debug: + print "Set %s Harmony to:" % self.name, + printList(self.harmony) - if gbl.debug: - print "Set %s Direction to " % self.name, - printList(ln) + def setHarmonyOnly(self, ln): + """ Set the harmony only. """ - def setScaletype(self, ln): - """ Set scale type. """ + ln=self.lnExpand(ln, 'HarmonyOnly') + tmp = [] - if self.vtype != 'SCALE': - error("ScaleType only valid in Scale tracks.") + for n in ln: + n = n.upper() + if n in ('-', '0'): + n = None - ln = self.lnExpand(ln, "ScaleType") - tmp = [] + tmp.append(n) - for n in ln: - n = n.upper() - if not n in ( 'CHROMATIC', 'AUTO'): - error("Unknown %s ScaleType. Only Chromatic and Auto are valid." % self.name) - tmp.append(n) + self.harmony = seqBump(tmp) + self.harmonyOnly = seqBump(tmp) - self.scaleType = seqBump(tmp) + if self.vtype in ( 'CHORD', 'DRUM'): + warning("HarmonyOnly setting for %s track ignored" % self.vtype) - if gbl.debug: - print "Set %s ScaleType to " % self.name, - printList(ln) + if gbl.debug: + print "Set %s HarmonyOnly to:" % self.name, + printList(self.harmonyOnly) + def setHarmonyVolume(self, ln): + """ Set harmony volume adjustment. """ - def setInvert(self, ln): - """ Set inversion for track. + ln=self.lnExpand(ln, 'HarmonyOnly') + tmp = [] - This can be applied to any track, - but has no effect in drum tracks. It inverts the chord - by one rotation for each value. - """ + for n in ln: + v=stoi(n) - ln=self.lnExpand(ln, "Invert") - vwarn = 0 - tmp = [] + if v<0: + error("HarmonyVolume adjustment must be positive integer") + tmp.append(v/100.) - for n in ln: - n = stoi(n, "Argument for %s Invert must be an integer" % self.name) + self.harmonyVolume = seqBump(tmp) - if n and self.vtype=='CHORD' and self.voicing.mode: - vwarn = 1 + if self.vtype in ( 'CHORD', 'DRUM' ): + warning("HarmonyVolume adjustment for %s track ignored" % self.vtype) - tmp.append(n) + if gbl.debug: + print "Set %s HarmonyVolume to:" % self.name, + printList(self.harmonyVolume) - self.invert = seqBump(tmp) - if self.vtype not in ("CHORD", "ARPEGGIO"): - warning ("Invert is ignored in %s tracks." % self.vtype) + def setSeqSize(self): + """ Expand existing pattern list. """ - if vwarn: - warning("Setting both Voicing Mode and Invert is not a good idea") + self.sequence = seqBump(self.sequence) + if self.midiVoice: + self.midiVoice = seqBump(self.midiVoice) + if self.midiSeq: + self.midiSeq = seqBump(self.midiSeq) + self.invert = seqBump(self.invert) + self.artic = seqBump(self.artic) + self.volume = seqBump(self.volume) + self.voice = seqBump(self.voice) + self.rVolume = seqBump(self.rVolume) + self.rSkip = seqBump(self.rSkip) + self.rTime = seqBump(self.rTime) + self.seqRndWeight = seqBump(self.seqRndWeight) + self.strum = seqBump(self.strum) + self.octave = seqBump(self.octave) + self.harmony = seqBump(self.harmony) + self.harmonyOnly = seqBump(self.harmonyOnly) + self.harmonyVolume = seqBump(self.harmonyVolume) + self.direction = seqBump(self.direction) + self.scaleType = seqBump(self.scaleType) + self.compress = seqBump(self.compress) + self.chordRange = seqBump(self.chordRange) + self.dupRoot = seqBump(self.dupRoot) + self.unify = seqBump(self.unify) + self.accent = seqBump(self.accent) - if gbl.debug: - print "Set %s Invert to " % self.name, - printList(ln) + if self.vtype == "DRUM": + self.toneList = seqBump(self.toneList) - def setOctave(self, ln): - """ Set the octave for a track. """ + def setVoice(self, ln): + """ Set the voice for a track. - ln=self.lnExpand(ln, 'Octave') - tmp = [] + Note, this just sets flags, the voice is set in bar(). + ln[] is not nesc. set to the correct length. + """ - for n in ln: - n = stoi(n, "Argument for %s Octave must be an integer" % self.name) - if n < 0 or n > 10: - error("Octave %s out-of-range; must be 0..10." % n) + ln=self.lnExpand(ln, 'Voice') + tmp = [] - tmp.append( n * 12 ) + for n in ln: + n = MMA.translate.vtable.get(n) + a=MMA.midiC.instToValue(n) - self.octave = seqBump(tmp) + 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 gbl.debug: - print "Set %s Octave to" % self.name, - for i in self.octave: - print i/12, - print + self.voice = seqBump(tmp) - def setSpan(self, start, end): - """ Set span. + if self.channel and len(gbl.midiAssigns[self.channel])>1: + a='' + for n in gbl.midiAssigns[self.channel]: + if n != self.name: + a += ' %s' % n + warning("Track %s is shared with %s,\n" + " changing voice may create conflict" % (a,self.name)) - Note: The start/end parm has been verified in parser. - """ + if gbl.debug: + print "Set %s Voice to:" % self.name, + for a in self.voice: + print MMA.midiC.valueToInst(a), + print - if self.vtype == "DRUM": - error("Span not supported in Drum tracks.") - self.spanStart = start - self.spanEnd = end + def setMidiClear(self, ln): + """ Set MIDIclear sequences. """ - if gbl.debug: - print "Set %s Span to %s...%s." % (self.name, self.spanStart, self.spanEnd) + if ln[0] in 'zZ-': + self.midiClear = None + else: + self.midiClear = MMA.mdefine.mdef.get(ln[0]) - def setHarmony(self, ln): - """ Set the harmony. """ + if gbl.debug: + print "%s MIDIClear: %s" % (self.name, self.midiSeqFmt(self.midiClear)) - ln=self.lnExpand(ln, 'Harmony') - tmp = [] + def doMidiClear(self): + """ Reset MIDI settings. """ - for n in ln: - n = n.upper() - if n in ( '-', '-0', 'NONE'): - n = None + if self.midiSent: + if not self.midiClear: + warning("%s: Midi data has been inserted with MIDIVoice/Seq " + "but no MIDIClear data is present" % self.name) - tmp.append(n) + else: + for i in self.midiClear: + gbl.mtrks[self.channel].addCtl(gbl.tickOffset, i[1]) - self.harmony = seqBump(tmp) + self.midiSent = 0 - if self.vtype in ( 'CHORD', 'DRUM' ): - warning("Harmony setting for %s track ignored" % self.vtype) - if gbl.debug: - print "Set %s Harmony to" % self.name, - printList(self.harmony) + def setMidiSeq(self, ln): + """ Set a midi sequence for a track. + This is sent for every bar. Syntax is: + hh .. ; ... - def setHarmonyOnly(self, ln): - """ Set the harmony only. """ + or a single '-' to disable. + """ + """ lnExpand() works here! The midi data has been converted to + pseudo-macros already in the parser. """ - ln=self.lnExpand(ln, 'HarmonyOnly') - tmp = [] + ln=self.lnExpand(ln, "MidiSeq") - for n in ln: - n = n.upper() - if n in ('-', '0'): - n = None + seq = [] + for a in ln: + if a in 'zZ-': + seq.append(None) + else: + seq.append(MMA.mdefine.mdef.get(a.upper())) - tmp.append(n) + if seq.count(None) == len(seq): + self.midiSeq = [] + else: + self.midiSeq = seqBump( seq ) - self.harmony = seqBump(tmp) - self.harmonyOnly = seqBump(tmp) + if gbl.debug: + print "%s MIDISeq:" % self.name, + for l in seq: + print '{ %s }' % self.midiSeqFmt(l), - if self.vtype in ( 'CHORD', 'DRUM'): - warning("HarmonyOnly setting for %s track ignored" % self.vtype) - if gbl.debug: - print "Set %s HarmonyOnly to" % self.name, - printList(self.harmonyOnly) + def setMidiVoice(self, ln): + """ Set a MIDI sequence for a track. - def setHarmonyVolume(self, ln): - """ Set harmony volume adjustment. """ + This is sent whenever we send a VOICE. Syntax is: + hh .. ; ... - ln=self.lnExpand(ln, 'HarmonyOnly') - tmp = [] + or a single '-' to disable. + """ - for n in ln: - v=stoi(n) + """ lnExpand() works here! The midi data has been converted to + pseudo-macros already in the parser. """ - if v<0: - error("HarmonyVolume adjustment must be positive integer") - tmp.append(v/100.) + ln = self.lnExpand(ln, 'MIDIVoice') - self.harmonyVolume = seqBump(tmp) + seq = [] + for a in ln: + if a in 'zZ': + seq.append(None) + else: + seq.append(MMA.mdefine.mdef.get(a.upper())) - if self.vtype in ( 'CHORD', 'DRUM' ): - warning("HarmonyVolume adjustment for %s track ignored" % self.vtype) + if seq.count(None) == len(seq): + self.midiVoice = [] + else: + self.midiVoice = seqBump( seq ) - if gbl.debug: - print "Set %s HarmonyVolume to" % self.name, - printList(self.harmonyVolume) + if gbl.debug: + print "%s MIDIVoice:" % self.name, + for l in seq: + print '{ %s }' % self.midiSeqFmt(l), + print - def setSeqSize(self): - """ Expand existing pattern list. """ - self.sequence = seqBump(self.sequence) - if self.midiVoice: - self.midiVoice = seqBump(self.midiVoice) - if self.midiSeq: - self.midiSeq = seqBump(self.midiSeq) - self.invert = seqBump(self.invert) - self.artic = seqBump(self.artic) - self.volume = seqBump(self.volume) - self.voice = seqBump(self.voice) - self.rVolume = seqBump(self.rVolume) - self.rSkip = seqBump(self.rSkip) - self.rTime = seqBump(self.rTime) - self.seqRndWeight = seqBump(self.seqRndWeight) - self.strum = seqBump(self.strum) - self.octave = seqBump(self.octave) - self.harmony = seqBump(self.harmony) - self.harmonyOnly = seqBump(self.harmonyOnly) - self.harmonyVolume = seqBump(self.harmonyVolume) - self.direction = seqBump(self.direction) - self.scaleType = seqBump(self.scaleType) - self.compress = seqBump(self.compress) - self.chordRange = seqBump(self.chordRange) - self.dupRoot = seqBump(self.dupRoot) - self.unify = seqBump(self.unify) - self.accent = seqBump(self.accent) + def midiSeqFmt(self, lst): + """ Used by setMidiVoice/Clear/Seq for debugging format. """ - if self.vtype == "DRUM": - self.toneList = seqBump(self.toneList) + if lst == None: + return '' + ret='' + for i in lst: + ret += "%s %s 0x%02x ; " % (i[0], + MMA.midiC.valueToCtrl(ord(i[1][0])), + ord(i[1][1])) + return ret.rstrip("; ") - def setVoice(self, ln): - """ Set the voice for a track. + def setVolume(self, ln): + """ Set the volume for a pattern. + ln - list of volume names (pp, mf, etc) + ln[] not nesc. correct length + """ - Note, this just sets flags, the voice is set in bar(). - ln[] is not nesc. set to the correct length. - """ + ln=self.lnExpand(ln, 'Volume') + tmp = [None] * len(ln) - ln=self.lnExpand(ln, 'Voice') - tmp = [] + for i,n in enumerate(ln): + a = MMA.volume.calcVolume(n, self.volume[i]) - for n in ln: - n = MMA.translate.vtable.get(n) - a=MMA.midiC.instToValue(n) + if self.vtype == 'DRUM': + a=MMA.translate.drumVolTable.get(self.toneList[i], a) + else: + a=MMA.translate.voiceVolTable.get(self.voice[i], a) + tmp[i] = a - 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 ) + self.volume = seqBump(tmp) - self.voice = seqBump(tmp) + if gbl.debug: + print "Set %s Volume to:" % self.name, + for a in self.volume: + print int(a * 100), + print - if self.channel and len(gbl.midiAssigns[self.channel])>1: - a='' - for n in gbl.midiAssigns[self.channel]: - if n != self.name: - a += ' %s' % n - warning("Track %s is shared with %s.\n" - " Changing voice may create conflict." % (a,self.name)) + def setCresc(self, dir, ln): + """ Set Crescendo for a track. """ + if len(ln) == 3: + self.setVolume([ln[0]]) + ln=ln[1:] - if gbl.debug: - print "Set %s Voice to: " % self.name, - for a in self.voice: - print MMA.midiC.valueToInst(a), - print + vol = self.volume[0] + if self.volume.count(vol) != len(self.volume): + warning("(De)Crescendo being used with track with variable sequence volumes") - def setMidiClear(self, ln): - """ Set MIDIclear sequences. """ + self.futureVols = MMA.volume.fvolume(dir, vol, ln) - if ln[0] in 'zZ-': - self.midiClear = None - else: - self.midiClear = MMA.mdefine.mdef.get(ln[0]) + def setMallet(self, ln): + """ Mallet (repeat) settngs. """ - if gbl.debug: - print "%s MIDIClear: %s" % (self.name, self.midiSeqFmt(self.midiClear)) + for l in ln: + try: + mode, val = l.upper().split('=') + except: + error("Each Mallet option must contain a '=', not '%s'" % l) + if mode == 'RATE': + self.mallet = getNoteLen(val) - def doMidiClear(self): - """ Reset MIDI settings. """ + elif mode == 'DECAY': + val = stof(val, "Mallet Decay must be a value, not '%s'" % val) - if self.midiSent: - if not self.midiClear: - warning("%s: Midi data has been inserted with MIDIVoice/Seq " - "but no MIDIClear data is present." % self.name) + if val < -50 or val > 50: + error("Mallet Decay rate must be -50..+50") - else: - for i in self.midiClear: - gbl.mtrks[self.channel].addCtl(gbl.tickOffset, i[1]) + self.malletDecay = val/100 - self.midiSent = 0 + if gbl.debug: + print "%s Mallet Rate:%s Decay:%s" % \ + (self.name, self.mallet, self.malletDecay) - def setMidiSeq(self, ln): - """ Set a midi sequence for a track. + def setAccent(self, ln): + """ Set the accent values. This is a list of lists, a list for each seq. """ - This is sent for every bar. Syntax is: - hh .. ; ... + tmp = [] - or a single '-' to disable. - """ - """ lnExpand() works here! The midi data has been converted to - pseudo-macros already in the parser. """ + """ 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. + """ - ln=self.lnExpand(ln, "MidiSeq") + ln = ' '.join(ln) + if not ln.startswith('{'): + ln='{' + ln +"}" - seq = [] - for a in ln: - if a in 'zZ-': - seq.append(None) - else: - seq.append(MMA.mdefine.mdef.get(a.upper())) + # Convert string to list. One entry per seq. - if seq.count(None) == len(seq): - self.midiSeq = [] - else: - self.midiSeq = seqBump( 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])) + else: + a,b = pextract(ln, "{", "}", 1) + ln=a.strip() + if len(b)==1 and b[0]=='/': + l.append('/') + else: + l.append(b[0].split()) - if gbl.debug: - print "%s MIDISeq:" % self.name, - for l in seq: - print '{ %s }' % self.midiSeqFmt(l), + ln=self.lnExpand(l, 'Accent') - def setMidiVoice(self, ln): - """ Set a MIDI sequence for a track. + for l in ln: + tt=[] + if len(l)/2*2 != len(l): + error("Use: %s Accent Beat Percentage [...]" % self.name) - This is sent whenever we send a VOICE. Syntax is: - hh .. ; ... + 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) + if v < -100 or v > 100: + error("Velocity adjustment (as percentage) must " + "be -100..100, not '%s'" % v) - or a single '-' to disable. - """ + tt.append( (b, v/100. ) ) + tmp.append(tt) - """ lnExpand() works here! The midi data has been converted to - pseudo-macros already in the parser. """ + self.accent = seqBump( tmp ) - ln = self.lnExpand(ln, 'MIDIVoice') + if gbl.debug: + print "%s Accent:" % self.name, + for s in self.accent: + print "{", + for b,v in s: + print '%s %s' % (1+(b/float(gbl.BperQ)), int(v*100)), + print "}", + print - seq = [] - for a in ln: - if a in 'zZ': - seq.append(None) - else: - seq.append(MMA.mdefine.mdef.get(a.upper())) - if seq.count(None) == len(seq): - self.midiVoice = [] - else: - self.midiVoice = seqBump( seq ) + def setArtic(self, ln): + """ Set the note articuation value. """ + ln=self.lnExpand(ln, 'Articulate') + tmp = [] - if gbl.debug: - print "%s MIDIVoice:" % self.name, - for l in seq: - print '{ %s }' % self.midiSeqFmt(l), - print + for n in ln: + a = stoi(n, "Expecting value in articulation setting") + if a < 1 or a > 200: + error("Articulation setting must be 1..200, not %s" % a) + if a>150: + warning("Large Articulate value: %s" % a) - def midiSeqFmt(self, lst): - """ Used by setMidiVoice/Clear/Seq for debugging format. """ + tmp.append(a) - if lst == None: - return '' - ret='' - for i in lst: - ret += "%s %s 0x%02x ; " % (i[0], - MMA.midiC.valueToCtrl(ord(i[1][0])), - ord(i[1][1])) - return ret.rstrip("; ") + self.artic = seqBump(tmp) + if gbl.debug: + print "Set %s Articulate to:" % self.name, + printList(self.artic) - def setVolume(self, ln): - """ Set the volume for a pattern. - ln - list of volume names (pp, mf, etc) - ln[] not nesc. correct length - """ - ln=self.lnExpand(ln, 'Volume') - tmp = [None] * len(ln) + def setUnify(self, ln): + """ Set unify. """ - for i,n in enumerate(ln): - a = MMA.volume.calcVolume(n, self.volume[i]) + ln = self.lnExpand(ln, "Unify") + tmp = [] - if self.vtype == 'DRUM': - a=MMA.translate.drumVolTable.get(self.toneList[i], a) - else: - a=MMA.translate.voiceVolTable.get(self.voice[i], a) - tmp[i] = a + for n in ln: + n=n.upper() + if n in ( 'ON', '1'): + tmp.append(1) + elif n in( 'OFF', '0'): + tmp.append(0) + else: + error("Unify accepts ON | OFF | 0 | 1") - self.volume = seqBump(tmp) + self.unify = seqBump(tmp) - if gbl.debug: - print "Set %s Volume to " % self.name, - for a in self.volume: - print int(a * 100), - print + if gbl.debug: + print "Set %s Unify to:" % self.name, + printList(self.unify) - def setCresc(self, dir, ln): - """ Set Crescendo for a track. """ - if len(ln) == 3: - self.setVolume([ln[0]]) - ln=ln[1:] + def lnExpand(self, ln, cmd): + """ Validate and expand a list passed to a set command. """ - vol = self.volume[0] + if len(ln) > gbl.seqSize: + warning("%s list truncated to %s patterns" % (self.name, gbl.seqSize) ) + ln = ln[:gbl.seqSize] + + last = None - if self.volume.count(vol) != len(self.volume): - warning("(De)Crescendo being used with track with variable sequence volumes.") + 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 - self.futureVols = MMA.volume.fvolume(dir, vol, ln) + return ln + def copySettings(self, cp): + """ Copy the voicing from a 2nd voice to the current one. """ + if not cp in gbl.tnames: + error("CopySettings does not know track '%s'" % cp) - def setMallet(self, ln): - """ Mallet (repeat) settngs. """ + cp=gbl.tnames[cp] - for l in ln: - try: - mode, val = l.upper().split('=') - except: - error("Each Mallet option must contain a '=', not '%s'" % l) + if cp.vtype != self.vtype: + error("Tracks must be of same type for copy ... " + "%s and %s aren't" % (self.name, cp.name)) + + self.volume = cp.volume[:] + self.rVolume = cp.rVolume[:] + self.accent = cp.accent[:] + self.rSkip = cp.rSkip[:] + self.rTime = cp.rTime[:] + self.strum = cp.strum[:] + self.octave = cp.octave[:] + self.harmony = cp.harmony[:] + self.harmonyOnly = cp.harmonyOnly[:] + self.harmonyVolume = cp.harmonyVolume[:] + self.direction = cp.direction[:] + self.scaleType = cp.scaleType[:] + self.voice = cp.voice[:] + self.invert = cp.invert[:] + self.artic = cp.artic[:] + self.compress = cp.compress[:] + + self.riff = cp.riff[:] + + if self.vtype == 'DRUM': + self.toneList = cp.toneList[:] + + + if gbl.debug: + print "Settings from %s copied to %s" % (cp.name, self.name) + + + + ################################################## + ## Save/restore grooves + + def saveGroove(self, gname): + """ Define a groove. + + Called by the 'DefGroove Name'. This is called for + + each track. + + If 'gname' is already defined it is overwritten. + + Note aux. function which may be defined for each track type. + """ + + self.grooves[gname] = { + 'ACCENT': self.accent[:], + 'ARTIC': self.artic[:], + 'COMPRESS': self.compress[:], + 'DIR': self.direction[:], + 'DUPROOT': self.dupRoot[:], + 'HARMONY': self.harmony[:], + 'HARMONYO': self.harmonyOnly[:], + 'HARMONYV': self.harmonyVolume[:], + 'INVERT': self.invert[:], + 'LIMIT': self.chordLimit, + 'RANGE': self.chordRange[:], + 'OCTAVE': self.octave[:], + '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[:], + '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), + } + + + if self.vtype == 'CHORD': + self.grooves[gname]['VMODE'] = copy.deepcopy(self.voicing) + + if self.vtype == 'DRUM': + self.grooves[gname]['TONES'] = self.toneList[:] - if mode == 'RATE': - self.mallet = getNoteLen(val) - elif mode == 'DECAY': - val = stof(val, "Mallet Decay must be a value, not '%s'." % val) + def restoreGroove(self, gname): + """ Restore a defined groove. """ + + self.doMidiClear() + + g = self.grooves[gname] + + self.sequence = g['SEQ'] + self.volume = g['VOLUME'] + self.accent = g['ACCENT'] + self.rTime = g['RTIME'] + self.rVolume = g['RVOLUME'] + self.rSkip = g['RSKIP'] + self.strum = g['STRUM'] + self.octave = g['OCTAVE'] + self.voice = g['VOICE'] + self.harmonyOnly= g['HARMONYO'] + self.harmony = g['HARMONY'] + self.harmonyVolume = g['HARMONYV'] + self.direction = g['DIR'] + self.scaleType = g['SCALE'] + self.invert = g['INVERT'] + self.artic = g['ARTIC'] + self.seqRnd = g['SEQRND' ] + self.seqRndWeight = g['SEQRNDWT'] + self.compress = g['COMPRESS'] + self.chordRange = g['RANGE'] + self.dupRoot = g['DUPROOT'] + self.chordLimit = g['LIMIT'] + self.unify = g['UNIFY'] + self.midiClear = g['MIDICLEAR'] + self.midiSeq = g['MIDISEQ'] + self.midiVoice = g['MIDIVOICE'] + self.spanStart, self.spanEnd = g['SPAN'] + self.mallet, self.malletDecay = g['MALLET'] + + if self.vtype == 'CHORD': + self.voicing = g['VMODE'] + + if self.vtype == 'DRUM': + self.toneList = g['TONES'] + + + """ It's quite possible that the track was created after + the groove was saved. This means that the data restored + was just the default stuff inserted when the track + was created ... which is fine, but the sequence size + isn't necs. right. We can probably test any list, and octave[] + is as good as any. + """ + + if len(self.octave) != gbl.seqSize: + self.setSeqSize() + + #################################### + ## Sequence functions + + def setSequence(self, ln): + """ Set the sequence for a track. + + The ln passed from the parser should be a list of existing + patterns, plus the special 'patterns' Z, z, -, and *. Remember + that the parser has already converted {} patterns to a special + pattern line _1. + + First we expand ln to the proper length. lnExpand() also + duplicates '/' to the previous pattern. + + Then we step though ln: + + - convert 'z', 'Z' and '-' to empty patterns. + + - duplicate the existing pattern for '*' + + - copy the defined pattern for everything else. + There's a bit of Python reference trickery here. + Eg, if we have the line: + + Bass Sequence B1 B2 + + the sequence is set with pointers to the existing + patterns defined for B1 and B2. Now, if we later change + the definitions for B1 or B2, the stored pointer DOEN'T + change. So, changing pattern definitions has NO EFFECT. + + """ + + + ln=self.lnExpand(ln, 'Sequence') + tmp = [None] * len(ln) + + for i, n in enumerate(ln): + n=n.upper() + + if n in ('Z', '-'): + tmp[i] = None + + elif n == '*': + tmp[i] = self.sequence[i] + + else: + p= (self.vtype, n) + if not p in pats: + error("Track %s does not have pattern '%s'" % p ) + tmp[i] = pats[p] + + self.sequence = seqBump(tmp) + + if gbl.seqshow: + print "%s sequence set:" % self.name, + for a in ln: + if a in "Zz-": + print "-", + else: + print a, + print - if val < -50 or val > 50: - error("Mallet Decay rate must be -50..+50") - self.malletDecay = val/100 + def clearSequence(self): + """ Clear sequence for track. - if gbl.debug: - print "%s Mallet Rate:%s Decay:%s " % \ - (self.name, self.mallet, self.malletDecay) + This is also called from __init__() to set the initial defaults for each track. + """ - def setAccent(self, ln): - """ Set the accent values. This is a list of lists, a list for each seq. """ + if self.vtype != 'SOLO' or not self.inited: + self.artic = [90] + self.sequence = [None] + self.seqRnd = 0 + self.seqRndWeight = [1] + if self.vtype == 'ARIA': + self.scaleType = ['CHORD'] + else: + self.scaleType = ['AUTO'] + self.rVolume = [0] + self.rSkip = [0] + self.rTime = [0] + self.octave = [4 * 12] + self.voice = [0] + self.chordRange = [1] + self.harmony = [None] + self.harmonyOnly = [None] + self.harmonyVolume = [.8] + self.strum = [0] + self.volume = [MMA.volume.vols['M'] ] + self.compress = [0] + self.dupRoot = [0] + self.chordLimit = 0 + self.invert = [0] + self.lastChord = [] + self.accent = [ [] ] + self.unify = [0] + self.midiClear = [] + self.midiSeq = [] + self.midiVoice = [] + self.spanStart = 0 + self.spanEnd = 127 + self.mallet = 0 + self.malletDecay = 0 + self.futureVols = [] - tmp = [] + if self.riff: + if len(self.riff) > 1: + warning("%s sequence clear deleting %s riffs" % (self.name, len(self.riff))) + else: + warning("%s sequence clear deleting unused riff" % self.name ) - """ 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. - """ + self.riff = [] - ln = ' '.join(ln) - if not ln.startswith('{'): - ln='{' + ln +"}" - # Convert string to list. One entry per seq. + if self.vtype == 'CHORD': + self.voicing = Voicing() + self.direction = ['UP'] + else: + self.direction = ['BOTH'] - 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])) - else: - a,b = pextract(ln, "{", "}", 1) - ln=a.strip() - if len(b)==1 and b[0]=='/': - l.append('/') - else: - l.append(b[0].split()) + self.setSeqSize() - ln=self.lnExpand(l, 'Accent') + ############################ + ### Pattern functions + ############################ - for l in ln: - tt=[] - if len(l)/2*2 != len(l): - error("Use: %s Accent Beat Percentage [...]" % self.name) + def definePattern(self, name, ln): + """ Define a Pattern. - 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) - if v < -100 or v > 100: - error("Velocity adjustment (as percentage) must " - "be -100..100, not '%s'." % v) + All patterns are stored in pats{}. The keys for this + are tuples -- (track type, pattern name). - tt.append( (b, v/100. ) ) - tmp.append(tt) + """ - self.accent = seqBump( tmp ) + name = name.upper() + slot = (self.vtype,name) - if gbl.debug: - print "%s Accent: " % self.name, - for s in self.accent: - print "{", - for b,v in s: - print '%s %s' % (1+(b/float(gbl.BperQ)), int(v*100)), - print "}", - print + # This is just for the debug code + if name.startswith('_'): + redef = "dynamic define" + elif slot in pats: + redef = name + ' redefined' + else: + redef = name + ' created' - def setArtic(self, ln): - """ Set the note articuation value. """ + ln = ln.rstrip('; ') # Delete optional trailing ';' & WS + pats[slot] = self.defPatRiff(ln) - ln=self.lnExpand(ln, 'Articulate') - tmp = [] + if gbl.pshow: + print "%s pattern %s:" % (self.name.title(), redef ) + self.printPattern(pats[slot]) - for n in ln: - a = stoi(n, "Expecting value in articulation setting.") - if a < 1 or a > 200: - error("Articulation setting must be 1..200, not %s." % a) - if a>150: - warning("Large Articulate value: %s" % a) + def setRiff(self, ln): + """ Define and set a Riff. """ - tmp.append(a) + solo = self.vtype in ("MELODY", "SOLO") - self.artic = seqBump(tmp) + if solo: + self.riff.append(ln) + else: + ln = ln.rstrip('; ') + if len(ln) == 1 and (ln[0] in ('Z','z','-')): + self.riff.append([]) + else: + self.riff.append(self.defPatRiff(ln)) - if gbl.debug: - print "Set %s Articulation to " % self.name, - printList(ln) + if gbl.pshow: + print "%s Riff:" % self.name, + if solo: + print self.riff[-1] + else: + self.printPattern(self.riff[-1]) - def setUnify(self, ln): - """ Set unify. """ + def defPatRiff(self, ln): + """ Worker function to define pattern. Shared by definePattern() + and setRiff(). + """ - ln = self.lnExpand(ln, "Unify") - tmp = [] + def mulPatRiff(oldpat, fact): + """ Multiply a pattern. """ - for n in ln: - n=n.upper() - if n in ( 'ON', '1'): - tmp.append(1) - elif n in( 'OFF', '0'): - tmp.append(0) - else: - error("Unify accepts ON | OFF | 0 | 1") + fact = stoi(fact, "The multiplier arg must be an integer not '%s'" % fact) - self.unify = seqBump(tmp) + if fact<1 or fact >100: + error("The multiplier arg must be in the range 2 to 100") - if gbl.debug: - print "Set %s Unify to " % self.name, - printList(self.unify) + """ Make N copies of pattern, adjusted so that the new copy has + all note lengths and start times adjusted. + eg: [[1, 2, 66], [3, 2, 88]] * 2 + becomes [[1,4,66], [2,4,88], [3,4,66], [4,4,88]]. + """ + new = [] + add = 0 + step = (gbl.BperQ * gbl.QperBar)/fact - 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] + for n in range(fact): + orig = copy.deepcopy(oldpat) + for z in orig: + z.offset = (z.offset / fact) + add + z.duration /= fact + if z.duration < 1: + z.duration = 1 - 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 + new.append(z) + add += step - return ln + return tuple( new ) - def copySettings(self, cp): - """ Copy the voicing from a 2nd voice to the current one. """ + def shiftPatRiff(oldpat, fact): - if not cp in gbl.tnames: - error("CopySettings does not know track '%s'." % cp) + fact = stof(fact, "The shift arg must be a value, not '%s'" % fact) - cp=gbl.tnames[cp] + # Adjust all the beat offsets - if cp.vtype != self.vtype: - error("Tracks must be of same type for copy ... " - "%s and %s aren't." % (self.name, cp.name)) + new = copy.deepcopy(oldpat) + max = gbl.BperQ * (gbl.QperBar) + for n in new: + n.offset += fact * gbl.BperQ + if n.offset < 0 or n.offset > max: + error("Pattern shift with factor %f has resulted in an " + "illegal offset" % fact ) - self.volume = cp.volume[:] - self.rVolume = cp.rVolume[:] - self.accent = cp.accent[:] - self.rSkip = cp.rSkip[:] - self.rTime = cp.rTime[:] - self.strum = cp.strum[:] - self.octave = cp.octave[:] - self.harmony = cp.harmony[:] - self.harmonyOnly = cp.harmonyOnly[:] - self.harmonyVolume = cp.harmonyVolume[:] - self.direction = cp.direction[:] - self.scaleType = cp.scaleType[:] - self.voice = cp.voice[:] - self.invert = cp.invert[:] - self.artic = cp.artic[:] - self.compress = cp.compress[:] - - self.riff = cp.riff[:] - - if self.vtype == 'DRUM': - self.toneList = cp.toneList[:] - - - if gbl.debug: - print "Settings from %s copied to %s." % (cp.name, self.name) - - - - ################################################## - ## Save/restore grooves - - def saveGroove(self, gname): - """ Define a groove. - - Called by the 'DefGroove Name'. This is called for - each track. - - If 'gname' is already defined it is overwritten. - - Note aux. function which may be defined for each track type. - """ - - self.grooves[gname] = { - 'ACCENT': self.accent[:], - 'ARTIC': self.artic[:], - 'COMPRESS': self.compress[:], - 'DIR': self.direction[:], - 'DUPROOT': self.dupRoot[:], - 'HARMONY': self.harmony[:], - 'HARMONYO': self.harmonyOnly[:], - 'HARMONYV': self.harmonyVolume[:], - 'INVERT': self.invert[:], - 'LIMIT': self.chordLimit, - 'RANGE': self.chordRange[:], - 'OCTAVE': self.octave[:], - '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[:], - '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) } - - - if self.vtype == 'CHORD': - self.grooves[gname]['VMODE'] = copy.deepcopy(self.voicing) - - if self.vtype == 'DRUM': - self.grooves[gname]['TONES'] = self.toneList[:] - - - def restoreGroove(self, gname): - """ Restore a defined groove. """ - - self.doMidiClear() - - g = self.grooves[gname] - - self.sequence = g['SEQ'] - self.volume = g['VOLUME'] - self.accent = g['ACCENT'] - self.rTime = g['RTIME'] - self.rVolume = g['RVOLUME'] - self.rSkip = g['RSKIP'] - self.strum = g['STRUM'] - self.octave = g['OCTAVE'] - self.voice = g['VOICE'] - self.harmonyOnly= g['HARMONYO'] - self.harmony = g['HARMONY'] - self.harmonyVolume = g['HARMONYV'] - self.direction = g['DIR'] - self.scaleType = g['SCALE'] - self.invert = g['INVERT'] - self.artic = g['ARTIC'] - self.seqRnd = g['SEQRND' ] - self.seqRndWeight = g['SEQRNDWT'] - self.compress = g['COMPRESS'] - self.chordRange = g['RANGE'] - self.dupRoot = g['DUPROOT'] - self.chordLimit = g['LIMIT'] - self.unify = g['UNIFY'] - self.midiClear = g['MIDICLEAR'] - self.midiSeq = g['MIDISEQ'] - self.midiVoice = g['MIDIVOICE'] - self.spanStart, self.spanEnd = g['SPAN'] - self.mallet, self.malletDecay = g['MALLET'] - - if self.vtype == 'CHORD': - self.voicing = g['VMODE'] - - if self.vtype == 'DRUM': - self.toneList = g['TONES'] - - - """ It's quite possible that the track was created after - the groove was saved. This means that the data restored - was just the default stuff inserted when the track - was created ... which is fine, but the sequence size - isn't necs. right. We can probably test any list, and octave[] - is as good as any. - """ - - if len(self.octave) != gbl.seqSize: - self.setSeqSize() - - #################################### - ## Sequence functions - - def setSequence(self, ln): - """ Set the sequence for a track. - - The ln passed from the parser should be a list of existing - patterns, plus the special 'patterns' Z, z, -, and *. Remember - that the parser has already converted {} patterns to a special - pattern line _1. - - First we expand ln to the proper length. lnExpand() also - duplicates '/' to the previous pattern. - - Then we step though ln: - - - convert 'z', 'Z' and '-' to empty patterns. - - - duplicate the existing pattern for '*' - - - copy the defined pattern for everything else. - There's a bit of Python reference trickery here. - Eg, if we have the line: - - Bass Sequence B1 B2 - - the sequence is set with pointers to the existing - patterns defined for B1 and B2. Now, if we later change - the definitions for B1 or B2, the stored pointer DOEN'T - change. So, changing pattern definitions has NO EFFECT. - - """ - - ln=self.lnExpand(ln, 'Sequence') - tmp = [None] * len(ln) - - for i, n in enumerate(ln): - n=n.upper() - - if n in ('Z', '-'): - tmp[i] = None - - elif n == '*': - tmp[i] = self.sequence[i] - - else: - p= (self.vtype, n) - if not p in pats: - error("Track %s does not have pattern '%s'." % p ) - tmp[i] = pats[p] - - self.sequence = seqBump(tmp) - - if gbl.seqshow: - print "%s sequence set:" % self.name, - for a in ln: - if a in "Zz-": print "-", - else: print a, - print - - - def clearSequence(self): - """ Clear sequence for track. - - This is also called from __init__() to set the initial defaults for each track. - - """ - - if self.vtype != 'SOLO' or not self.inited: - self.artic = [90] - self.sequence = [None] - self.seqRnd = 0 - self.seqRndWeight = [1] - self.scaleType = ['AUTO'] - self.rVolume = [0] - self.rSkip = [0] - self.rTime = [0] - self.octave = [4 * 12] - self.voice = [0] - self.chordRange = [1] - self.harmony = [None] - self.harmonyOnly = [None] - self.harmonyVolume = [.8] - self.strum = [0] - self.volume = [MMA.volume.vols['M'] ] - self.compress = [0] - self.dupRoot = [0] - self.chordLimit = 0 - self.invert = [0] - self.lastChord = [] - self.accent = [ [] ] - self.unify = [0] - self.midiClear = [] - self.midiSeq = [] - self.midiVoice = [] - self.spanStart = 0 - self.spanEnd = 127 - self.mallet = 0 - self.malletDecay = 0 - self.futureVols = [] + return tuple( new ) + def patsort(c1, c2): + """ Sort a pattern tuple. """ - if self.riff: - if len(self.riff) > 1: - warning("%s sequence clear deleting %s riffs." % (self.name, len(self.riff))) - else: - warning("%s sequence clear deleting unused riff" % self.name ) + if c1.offset < c2.offset: return -1 + if c1.offset == c2.offset: return 0 + else: return 1 - self.riff = [] - if self.vtype == 'CHORD': - self.voicing = Voicing() - self.direction = ['UP'] - else: - self.direction = ['BOTH'] + ### Start of main function... - self.setSeqSize() + # Convert the string to list... + # "1 2 3; 4 5 6" ---> [ [1,2,3], [4,5,6] ] + p = [] + ln = ln.upper().split(';') + for l in ln: + p.append(l.split()) - ############################ - ### Pattern functions - ############################ + plist=[] - def definePattern(self, name, ln): - """ Define a Pattern. + for ev in p: + more=[] + for i,e in enumerate(ev): + if e.upper() in ('SHIFT', '*'): + if i == 0: + error("Pattern definition can't start with SHIFT or *") + more = ev[i:] + ev=ev[:i] + break - All patterns are stored in pats{}. The keys for this - are tuples -- (track type, pattern name). + if len(ev) == 1: + nm = (self.vtype, ev[0]) - """ + if nm in pats: + if nm[0].startswith('_'): + error("You can't use a pattern name beginning with an underscore") + pt = pats[nm] - name = name.upper() - slot = (self.vtype,name) + else: + error("%s is not an existing %s pattern" % (nm[1], nm[0].title()) ) - # This is just for the debug code + else: + pt = [self.getPgroup(ev)] - if name.startswith('_'): - redef = "dynamic define" - elif slot in pats: - redef = name + ' redefined' - else: - redef = name + ' created' + while more: + cmd = more.pop(0) + if cmd not in ('SHIFT', '*'): + error("Expecting SHIFT or *, not '%s'" % cmd) - ln = ln.rstrip('; ') # Delete optional trailing ';' & WS - pats[slot] = self.defPatRiff(ln) + if not more: + error("Expecting factor after %s" % cmd) + if cmd == 'SHIFT': + pt = shiftPatRiff(pt, more.pop(0)) + elif cmd == '*': + pt = mulPatRiff(pt, more.pop(0)) - if gbl.pshow: - print "%s pattern %s:" % (self.name.title(), redef ) - self.printPattern(pats[slot]) + plist.extend(pt) - def setRiff(self, ln): - """ Define and set a Riff. """ + plist.sort(patsort) - solo = self.vtype in ("MELODY", "SOLO") + if gbl.swingMode: + len8 = getNoteLen('8') + len81 = getNoteLen('81') + len82 = getNoteLen('82') - if solo: - self.riff.append(ln) - else: - ln = ln.rstrip('; ') - if len(ln) == 1 and (ln[0] in ('Z','z','-')): - self.riff.append([]) - else: - self.riff.append(self.defPatRiff(ln)) + onBeats = [ x * gbl.BperQ for x in range(gbl.QperBar)] + offBeats = [ (x * gbl.BperQ + len8) for x in range(gbl.QperBar)] - if gbl.pshow: - print "%s Riff:" % self.name, - if solo: - print self.riff[-1] - else: - self.printPattern(self.riff[-1]) + for p in plist: + if p.duration == len8 or self.vtype=="DRUM" and p.duration==1: + if p.offset in onBeats: + if p.duration == len8: + p.duration = len81 + elif p.offset in offBeats: + if p.duration == len8: + p.duration = len82 + i=offBeats.index(p.offset) + p.offset = onBeats[i] + len81 + return plist - def defPatRiff(self, ln): - """ Worker function to define pattern. Shared by definePattern() - and setRiff(). - """ - def mulPatRiff(oldpat, fact): - """ Multiply a pattern. """ + def printPattern(self, pat): + """ Print a pattern. Used by debugging code.""" - fact = stoi(fact, "The multiplier arg must be an integer not '%s'." % fact) + s=[] + for p in pat: + s.append(" %2.2f %2.0f" % (1+(p.offset/float(gbl.BperQ)), + p.duration)) - if fact<1 or fact >100: - error("The multiplier arg must be in the range 2 to 100.") + if self.vtype == 'CHORD': + for a in p.vol: + s.append( " %2.0f" % a) + elif self.vtype == 'BASS': + f=str(p.noteoffset+1) - """ Make N copies of pattern, adjusted so that the new copy has - all note lengths and start times adjusted. - eg: [[1, 2, 66], [3, 2, 88]] * 2 - becomes [[1,4,66], [2,4,88], [3,4,66], [4,4,88]]. - """ + if p.accidental == 1: + f+="#" + elif p.accidental == -1: + f+="b" - new = [] - add = 0 - step = (gbl.BperQ * gbl.QperBar)/fact + if p.addoctave > 0: + f+="+" * (p.addoctave/12) + elif p.addoctave < 0: + f+="-" * (p.addoctave/-12) - for n in range(fact): - orig = copy.deepcopy(oldpat) - for z in orig: - z.offset = (z.offset / fact) + add - z.duration /= fact - if z.duration < 1: - z.duration = 1 + s.append( " %s %2.0f" % (f, p.vol ) ) - new.append(z) - add += step + elif self.vtype == 'ARPEGGIO': + s.append( " %2.0f " % p.vol ) - return tuple( new ) + elif self.vtype == 'DRUM': + s.append(" %2.0f" % p.vol) + elif self.vtype == 'WALK': + s.append(" %2.0f" % p.vol ) - def shiftPatRiff(oldpat, fact): + s.append(' ;') + s.append('\n') + s[-2]=' ' + print "".join(s) - fact = stof(fact, "The shift arg must be a value, not '%s'." % fact) - # Adjust all the beat offsets + def insertVoice(self): + """ Called from bar() and setForceOut(). Adds voice stuff to track.""" - new = copy.deepcopy(oldpat) - max = gbl.BperQ * (gbl.QperBar) - for n in new: - n.offset += fact * gbl.BperQ - if n.offset < 0 or n.offset > max: - error("Pattern shift with factor %f has resulted in an " - "illegal offset." % fact ) + sc = gbl.seqCount - return tuple( new ) + """ 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. + """ - def patsort(c1, c2): - """ Sort a pattern tuple. """ + if self.midiVoice: + v = self.midiVoice[sc] + if v and v != self.smidiVoice: + for i in v: + if not i[0]: + gbl.mtrks[self.channel].addCtl(gbl.tickOffset, i[1]) - if c1.offset < c2.offset: return -1 - if c1.offset == c2.offset: return 0 - else: return 1 + # Set the voice in the midi track if not previously done. + v=self.voice[sc] + if v != self.ssvoice: + gbl.mtrks[self.channel].addProgChange( gbl.tickOffset, v) + self.ssvoice = v - ### Start of main function... + # Mark ssvoice also in shared tracks - # Convert the string to list... - # "1 2 3; 4 5 6" ---> [ [1,2,3], [4,5,6] ] + for a in gbl.midiAssigns[self.channel]: + if gbl.tnames.has_key(a): + gbl.tnames[a].ssvoice = v - p = [] - ln = ln.upper().split(';') - for l in ln: - p.append(l.split()) + if gbl.debug: + print "Track %s Voice %s inserted" \ + % (self.name, MMA.midiC.valueToInst(v) ) - plist=[] + """ Our 2nd stab at MIDIVOICE. This time any sequences + with offsets >0 are sent. AND the smidiVoice and midiSent + variables are set. + """ + if self.midiVoice: + v = self.midiVoice[sc] + if v and v != self.smidiVoice: + for i in v: + if i[0]: + gbl.mtrks[self.channel].addCtl(gbl.tickOffset, i[1]) + self.smidiVoice = v + self.midiSent = 1 # used by MIDICLEAR - for ev in p: - more=[] - for i,e in enumerate(ev): - if e.upper() in ('SHIFT', '*'): - if i == 0: - error("Pattern definition can't start with" - "SHIFT or *") - more = ev[i:] - ev=ev[:i] - break - if len(ev) == 1: - nm = (self.vtype, ev[0]) + ######################### + ## Music processing + ######################### - if nm in pats: - if nm[0].startswith('_'): - error("You can't use a pattern name beginning" - " with an underscore.") - pt = pats[nm] - else: - error("%s is not an existing %s pattern." % (nm[1], nm[0].title()) ) + def bar(self, ctable): + """ Process a bar of music for this track. """ - else: - pt = [self.getPgroup(ev)] - while more: - cmd = more.pop(0) - if cmd not in ('SHIFT', '*'): - error("Expecting SHIFT or *, not '%s'." % cmd) + # Future vol == de(cresc). Done if track is on or off! - if not more: - error("Expecting factor after %s" % cmd) - if cmd == 'SHIFT': - pt = shiftPatRiff(pt, more.pop(0)) - elif cmd == '*': - pt = mulPatRiff(pt, more.pop(0)) + if self.futureVols: + self.volume = seqBump([self.futureVols.pop(0)]) - plist.extend(pt) + # If track is off don't do anything else. + if self.disable: + if self.riff: + self.riff.pop(0) + return - plist.sort(patsort) - if gbl.swingMode: - len8 = getNoteLen('8') - len81 = getNoteLen('81') - len82 = getNoteLen('82') + """ Decide which seq to use. This is either the current + seqCount, or if SeqRnd has been set for the track + it is a random pattern in the sequence. - onBeats = [ x * gbl.BperQ for x in range(gbl.QperBar)] - offBeats = [ (x * gbl.BperQ + len8) for x in range(gbl.QperBar)] + The class variable self.seq is set to the sequence to use. + """ - for p in plist: - if p.duration == len8 or self.vtype=="DRUM" and p.duration==1: - if p.offset in onBeats: - if p.duration == len8: - p.duration = len81 - elif p.offset in offBeats: - if p.duration == len8: - p.duration = len82 - i=offBeats.index(p.offset) - p.offset = onBeats[i] + len81 + 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) + else: + self.seq = gbl.seqCount - return plist + sc = self.seq + """ Get pattern for this sequence. Either a Riff or a Pattern. """ - def printPattern(self, pat): - """ Print a pattern. Used by debugging code.""" + if self.riff: + pattern = self.riff.pop(0) - s=[] - for p in pat: - s.append(" %2.2f %2.0f" % (1+(p.offset/float(gbl.BperQ)), - p.duration)) + else: + pattern = self.sequence[sc] - if self.vtype == 'CHORD': - for a in p.vol: - s.append( " %2.0f" % a) + if not pattern: + return - elif self.vtype == 'BASS': - f=str(p.noteoffset+1) + """ MIDI Channel assignment. If no channel is assigned try + to find an unused number and assign that. + """ - if p.accidental == 1: - f+="#" - elif p.accidental == -1: - f+="b" + if not self.channel: + self.setChannel() - if p.addoctave > 0: - f+="+" * (p.addoctave/12) - elif p.addoctave < 0: - f+="-" * (p.addoctave/-12) + # We are ready to create musical data. 1st do pending midi commands. - s.append( " %s %2.0f" % (f, p.vol ) ) + self.clearPending() - elif self.vtype == 'ARPEGGIO': - s.append( " %2.0f " % p.vol ) + self.insertVoice() - elif self.vtype == 'DRUM': - s.append(" %2.0f" % p.vol) + # Do MIDISeq for this voice - elif self.vtype == 'WALK': - s.append(" %2.0f" % p.vol ) + if self.midiSeq: + l = self.midiSeq[sc] + if l: + for i in l: + gbl.mtrks[self.channel].addCtl( getOffset(i[0]), i[1] ) + self.midiSent = 1 - s.append(' ;') - s.append('\n') - s[-2]=' ' - print "".join(s) + self.trackBar(pattern, ctable) - def insertVoice(self): - """ Called from bar() and setForceOut(). Adds voice stuff to track.""" - sc = gbl.seqCount + def clearPending(self): - """ 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. - """ + while self.midiPending: + c, off, v = self.midiPending.pop(0) + if c == 'TNAME': + gbl.mtrks[self.channel].addTrkName(off, v) + if gbl.debug: + print "%s Track name inserted at offset %s" % \ + (self.name, off) - if self.midiVoice: - v = self.midiVoice[sc] - if v and v != self.smidiVoice: - for i in v: - if not i[0]: - gbl.mtrks[self.channel].addCtl(gbl.tickOffset, i[1]) + elif c == 'GLIS': + gbl.mtrks[self.channel].addGlis(off, v) + if gbl.debug: + print "%s Glis at offset %s set to %s" % \ + (self.name, off, ord(chr(v))) - # Set the voice in the midi track if not previously done. + elif c == 'PAN': + gbl.mtrks[self.channel].addPan(off, v) + if gbl.debug: + print "%s Pan at offset %s set to %s" % \ + (self.name, off, v) - v=self.voice[sc] - if v != self.ssvoice: - gbl.mtrks[self.channel].addProgChange( gbl.tickOffset, v) - self.ssvoice = v + elif c == 'CVOLUME': + gbl.mtrks[self.channel].addChannelVol(off, v) + if gbl.debug: + print "%s ChannelVolume at offset %s set to %s" % \ + (self.name, off, v) - # Mark ssvoice also in shared tracks + else: + error("Unknown midi command pending. Call Bob") - for a in gbl.midiAssigns[self.channel]: - if gbl.tnames.has_key(a): - gbl.tnames[a].ssvoice = 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 - variables are set. - """ + def getChordInPos( self, offset, ctable): + """ Compare an offset to a list of ctables and return + the table entry active for the given beat. - if self.midiVoice: - v = self.midiVoice[sc] - if v and v != self.smidiVoice: - for i in v: - if i[0]: - gbl.mtrks[self.channel].addCtl(gbl.tickOffset, i[1]) - self.smidiVoice = v - self.midiSent = 1 # used by MIDICLEAR + We assume that the first offset in 'ctable' is 0! + We assme that 'offset' is >= 0! + Returns a ctable. + """ - ######################### - ## Music processing - ######################### + for i in range(len(ctable)-1, -1, -1): # reverse order + if offset >= ctable[i].offset: + break + return ctable[i] - def bar(self, ctable): - """ Process a bar of music for this track. """ + def adjustVolume(self, v, beat): + """ Adjust a note volume based on the track and global volume + setting. + """ - # Future vol == de(cresc). Done if track is on or off! + if not v: + return 0 - if self.futureVols: - self.volume = seqBump([self.futureVols.pop(0)]) + sc = self.seq - # If track is off don't do anything else. + if self.rSkip[sc] and random.random() < self.rSkip[sc]: + return 0 - if self.disable: - if self.riff: - self.riff.pop(0) - return + a1 = self.volume[sc] + if not a1: + return 0 + a1 *= MMA.volume.vTRatio + a2 = MMA.volume.volume + if not a2: + return 0 + a2 *= MMA.volume.vMRatio - """ Decide which seq to use. This is either the current - seqCount, or if SeqRnd has been set for the track - it is a random pattern in the sequence. + v *= ( a1 + a2 ) - The class variable self.seq is set to the sequence to use. - """ + for b,a in self.accent[sc]: + if b==beat: + v += (v * a) - 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) - else: - self.seq = gbl.seqCount + # take .rVolume % of current volume, add/sub result to current - sc = self.seq - #print self.name, sc - """ Get pattern for this sequence. Either a Riff or a Pattern. """ + if self.rVolume[sc]: + a = int(v * self.rVolume[sc]) + if a: + v += random.randrange(-a, a) - if self.riff: - pattern = self.riff.pop(0) + if v > 127: + v = 127 + elif v < 1: + v = 1 - else: - pattern = self.sequence[sc] + return int(v) - if not pattern: - return - """ MIDI Channel assignment. If no channel is assigned try - to find an unused number and assign that. - """ + def adjustNote(self, n): + """ Adjust a note for a given octave/transposition. + Ensure that the note is in range. + """ - if not self.channel: - self.setChannel() + n += self.octave[self.seq] + gbl.transpose - # We are ready to create musical data. 1st do pending midi commands. + while n < 0: + n += 12 + while n > 127: + n -= 12 - self.clearPending() + while n < self.spanStart: + n += 12 + while n > self.spanEnd: + n -= 12 - self.insertVoice() + return n - # Do MIDISeq for this voice - if self.midiSeq: - l = self.midiSeq[sc] - if l: - for i in l: - gbl.mtrks[self.channel].addCtl( getOffset(i[0]), i[1] ) - self.midiSent = 1 + def setBarOffset(self, v): + """ Convert a string into a valid bar offset in midi ticks. """ - self.trackBar(pattern, ctable) + m=v.find('-') + p=v.find('+') + if m>-1 and p>-1: + if m>p: + sp = p + sign = 1 + else: + sp = m + sign = -1 + elif m >- 1: + sp = m + sign = -1 - def clearPending(self): + elif p >- 1: + sp = p + sign = 1 - while self.midiPending: - c, off, v = self.midiPending.pop(0) - if c == 'TNAME': - gbl.mtrks[self.channel].addTrkName(off, v) - if gbl.debug: - print "%s Track name inserted at offset %s." % \ - (self.name, off) + else: + sp = None - elif c == 'GLIS': - gbl.mtrks[self.channel].addGlis(off, v) - if gbl.debug: - print "%s Glis at offset %s set to %s." % \ - (self.name, off, ord(chr(v))) + if sp: + note = v[sp+1:] + v = v[:sp] + else: + note = None - elif c == 'PAN': - gbl.mtrks[self.channel].addPan(off, v) - if gbl.debug: - print "%s Pan at offset %s set to %s." % \ - (self.name, off, v) - elif c == 'CVOLUME': - gbl.mtrks[self.channel].addChannelVol(off, v) - if gbl.debug: - print "%s ChannelVolume at offset %s set to %s" % \ - (self.name, off, v) + v=stof(v, "Value for %s bar offset must be integer/float" % self.name) + v = (v-1) * gbl.BperQ - else: - error("Unknown midi command pending. Call Bob.") + if note: + v += getNoteLen(note) * sign + if v < 0: + if v<-gbl.BperQ: + error("Defining %s Pattern, bar offset must be 0 or greater" % + self.name) + else: + warning("Offset in '%s' is '%s ticks' before bar start!" % (self.name, -v)) + if v >= gbl.QperBar * gbl.BperQ: + error("Defining %s Pattern, bar offset must be less than %s" % + (self.name, gbl.QperBar + 1)) - def getChordInPos( self, offset, ctable): - """ Compare an offset to a list of ctables and return - the table entry active for the given beat. - We assume that the first offset in 'ctable' is 0! - We assme that 'offset' is >= 0! + return int(v) - Returns a ctable. - """ - for i in range(len(ctable)-1, -1, -1): # reverse order - if offset >= ctable[i].offset: - break - return ctable[i] + def getDur(self, d): + """ Return the adjusted duration for a note. + The adjustment makes notes more staccato. Valid + adjustments are 1 to 100. 100 is not recommended. + """ + d = (d * self.artic[self.seq]) / 100 + if not d: + d = 1 - def adjustVolume(self, v, beat): - """ Adjust a note volume based on the track and global volume - setting. - """ + return d - if not v: - return 0 - sc = self.seq + def sendNote( self, offset, duration, note, velocity): + """ Send a note to the MIDI machine. This is called from all + track classes and handles niceties like mallet-repeat. + """ - if self.rSkip[sc] and random.random() < self.rSkip[sc]: - return 0 + if not velocity: + return - a1 = self.volume[sc] - if not a1: - return 0 - a1 *= MMA.volume.vTRatio + sc = self.seq - a2 = MMA.volume.volume - if not a2: - return 0 - a2 *= MMA.volume.vMRatio + rptr = self.mallet - v *= ( a1 + a2 ) + if rptr and duration > rptr: + ll = self.getDur(rptr) + offs = 0 + vel = velocity + count =0 - for b,a in self.accent[sc]: - if b==beat: - v += (v * a) + for q in range(duration/rptr): + gbl.mtrks[self.channel].addPairToTrack( + offset + offs, + self.rTime[sc], + ll, + note, + vel, + None ) - # take .rVolume % of current volume, add/sub result to current + offs += rptr + if self.malletDecay: + vel = int( vel + (vel * self.malletDecay) ) + if vel < 1: + vel = 1 + if vel > 255: + vel=255 + count+=1 - if self.rVolume[sc]: - a = int(v * self.rVolume[sc]) - if a: - v += random.randrange(-a, a) - - if v > 127: - v = 127 - elif v < 1: - v = 1 - - return int(v) - - - def adjustNote(self, n): - """ Adjust a note for a given octave/transposition. - Ensure that the note is in range. - """ - - n += self.octave[self.seq] + gbl.transpose - - while n < 0: - n += 12 - while n > 127: - n -= 12 - - while n < self.spanStart: - n += 12 - while n > self.spanEnd: - n -= 12 - - return n - - - def setBarOffset(self, v): - """ Convert a string into a valid bar offset in midi ticks. """ - - m=v.find('-') - p=v.find('+') - - if m>-1 and p>-1: - if m>p: - sp = p - sign = 1 - else: - sp = m - sign = -1 - - elif m >- 1: - sp = m - sign = -1 - - elif p >- 1: - sp = p - sign = 1 - - else: - sp = None - - if sp: - note = v[sp+1:] - v = v[:sp] - 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 - - if v < 0: - if v<-gbl.BperQ: - error("Defining %s Pattern, bar offset must be 0 or greater." % - self.name) - else: - warning("Offset in '%s' is '%s ticks' before bar start!" % (self.name, -v)) - - if v >= gbl.QperBar * gbl.BperQ: - error("Defining %s Pattern, bar offset must be less than %s." % - (self.name, gbl.QperBar + 1)) - - - return int(v) - - - def getDur(self, d): - """ Return the adjusted duration for a note. - - The adjustment makes notes more staccato. Valid - adjustments are 1 to 100. 100 is not recommended. - """ - - d = (d * self.artic[self.seq]) / 100 - if not d: - d = 1 - - return d - - - def sendNote( self, offset, duration, note, velocity): - """ Send a note to the MIDI machine. This is called from all - track classes and handles niceties like mallet-repeat. - """ - - if not velocity: - return - - sc = self.seq - - rptr = self.mallet - - if rptr and duration > rptr: - ll = self.getDur(rptr) - offs = 0 - vel = velocity - count =0 - - for q in range(duration/rptr): - gbl.mtrks[self.channel].addPairToTrack( - offset + offs, - self.rTime[sc], - ll, - note, - vel, - None ) - - offs += rptr - if self.malletDecay: - vel = int( vel + (vel * self.malletDecay) ) - if vel < 1: - vel = 1 - if vel > 255: - vel=255 - count+=1 - - else: - gbl.mtrks[self.channel].addPairToTrack( - offset, - self.rTime[sc], - duration, - note, - velocity, - self.unify[sc] ) + else: + gbl.mtrks[self.channel].addPairToTrack( + offset, + self.rTime[sc], + duration, + note, + velocity, + self.unify[sc] ) diff --git a/mma/MMA/patAria.py b/mma/MMA/patAria.py new file mode 100644 index 0000000..13aaedb --- /dev/null +++ b/mma/MMA/patAria.py @@ -0,0 +1,228 @@ + +# patAria.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 gbl +from MMA.notelen import getNoteLen +from MMA.common import * +from MMA.harmony import harmonize +from MMA.pat import PC, seqBump + +import random + +class Aria(PC): + """ Pattern class for an aria (auto-melody) track. """ + + vtype = 'ARIA' + notes = [] + selectDir = [1] + noteptr = 0 + dirptr = 0 + lastChord = None + lastStype = None + lastRange = None + + + + def restoreGroove(self, gname): + """ Grooves are not saved/restored for aria tracks. But, seqsize is honored! """ + self.setSeqSize() + + def saveGroove(self, gname): + """ No save done for grooves. """ + pass + + + def getPgroup(self, ev): + """ Get group for aria pattern. + + Fields - start, length, velocity + + """ + + if len(ev) != 3: + error("There must be n groups of 3 in a pattern definition, " + "not <%s>" % ' '.join(ev) ) + + a = struct() + + a.offset = self.setBarOffset(ev[0]) + a.duration = getNoteLen( ev[1] ) + a.vol = stoi(ev[2], "Note volume in Aria definition not int") + + return a + + + def setScaletype(self, ln): + """ Set scale type. """ + + ln = self.lnExpand(ln, "ScaleType") + tmp = [] + + for n in ln: + n = n.upper() + if not n in ( 'CHROMATIC', 'AUTO', 'CHORD'): + error("Unknown %s ScaleType. Only Chromatic, Scale and Chord are valid" % self.name) + tmp.append(n) + + self.scaleType = seqBump(tmp) + + if gbl.debug: + print "Set %s ScaleType: " % self.name, + printList(self.scaleType) + + + def setDirection(self, ln): + """ Set direction for melody creation. + + This function replaces the pattern function of the same name ... + the command name is shared, the function is different. Note we + need to use a different storage name as well since + self.direction is managed in the PC class. + """ + + if not len(ln): + error("There must be at least one value for %s Direction." % self.name) + + self.selectDir = [] + for a in ln: + if a.upper() == 'R': + self.selectDir.append(a.upper()) + else: + a=stoi(a, "Expecting integer value or 'r'.") + if a < -4 or a > 4: + error("Aria direction must be 'r' or -4 to 4, not '%s'" % a) + self.selectDir.append(a) + + if gbl.debug: + print "Set %s Direction:" % self.name, + printList(self.selectDir) + + def restart(self): + self.ssvoice = -1 + + + def trackBar(self, pattern, ctable): + """ Do the aria bar. + + Called from self.bar() + + """ + + sc = self.seq + unify = self.unify[sc] + + for p in pattern: + ct = self.getChordInPos(p.offset, ctable) + + if ct.ariaZ: + continue + + thisChord = ct.chord.tonic + ct.chord.chordType + stype = self.scaleType[sc] + range = self.chordRange[sc] + + ### Generate notelist if nesc. + + if self.lastChord != thisChord or self.lastStype != stype or \ + self.lastRange != range: + + self.lastChord = thisChord + self.lastStype = stype + self.lastRange = range + + if stype == 'CHORD': + notelist = ct.chord.noteList + elif stype == 'CHROMATIC': + notelist = [ ct.chord.rootNote + x for x in range(0,12)] + else: + notelist = list(ct.chord.scaleList) + + o=0 + self.notes=[] + + while range >= 1: + for a in notelist: + self.notes.append(a+o) + o+=12 + range-=1 + + if range>0 and range<1: # for fractional scale lengths + range = int(len(notelist) * range) + if range < 2: # important, must be at least 2 notes in a scale + range=2 + for a in notelist[:range]: + self.notes.append(a+o) + + # grab a note from the list + + if self.dirptr >= len(self.selectDir): + self.dirptr=0 + + a = self.selectDir[self.dirptr] + if a == 'R': + a = random.choice( (-1, 0, 1) ) + self.noteptr += a + + if self.noteptr >= len(self.notes): + if a > 0: + self.noteptr = 0 + else: + self.noteptr = len(self.notes)-1 + elif self.noteptr < 0: + if a < 0: + self.noteptr = len(self.notes)-1 + else: + self.noteptr = 0 + + note = self.notes[self.noteptr] + + self.dirptr += 1 + + # output + + if not self.harmonyOnly[sc]: + self.sendNote( + p.offset, + self.getDur(p.duration), + self.adjustNote(note), + self.adjustVolume(p.vol, p.offset)) + + + if self.harmony[sc]: + h = harmonize(self.harmony[sc], note, ct.chord.noteList) + for n in h: + self.sendNote( + p.offset, + self.getDur(p.duration), + self.adjustNote(n), + self.adjustVolume(p.vol * self.harmonyVolume[sc], -1)) + + + + + + diff --git a/mma/MMA/patArpeggio.py b/mma/MMA/patArpeggio.py index 97c023f..4ca1a81 100644 --- a/mma/MMA/patArpeggio.py +++ b/mma/MMA/patArpeggio.py @@ -19,7 +19,7 @@ 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 +Bob van der Poel """ @@ -34,128 +34,128 @@ from MMA.pat import PC class Arpeggio(PC): - """ Pattern class for an arpeggio track. """ + """ Pattern class for an arpeggio track. """ - vtype = 'ARPEGGIO' - arpOffset = -1 - arpDirection = 1 + vtype = 'ARPEGGIO' + arpOffset = -1 + arpDirection = 1 - def getPgroup(self, ev): - """ Get group for apreggio pattern. + def getPgroup(self, ev): + """ Get group for apreggio pattern. - Fields - start, length, volume - """ + Fields - start, length, volume + """ - a = struct() - if len(ev) != 3: - error("There must be exactly 3 items in each group " - "for apreggio define, not <%s>." % ' '.join(ev) ) + a = struct() + if len(ev) != 3: + error("There must be exactly 3 items in each group " + "for apreggio define, not '%s'" % ' '.join(ev) ) - a.offset = self.setBarOffset(ev[0]) - a.duration = getNoteLen(ev[1]) - a.vol = stoi(ev[2], "Type error in Arpeggio definition.") + a.offset = self.setBarOffset(ev[0]) + a.duration = getNoteLen(ev[1]) + a.vol = stoi(ev[2], "Type error in Arpeggio definition") - return a + return a - def restart(self): - self.ssvoice = -1 - self.arpOffset=-1 - self.arpDirection=1 + def restart(self): + self.ssvoice = -1 + self.arpOffset=-1 + self.arpDirection=1 - def trackBar(self, pattern, ctable): - """ Do a arpeggio bar. + def trackBar(self, pattern, ctable): + """ Do a arpeggio bar. - Called from self.bar() + Called from self.bar() - """ + """ - sc = self.seq - direct = self.direction[sc] + sc = self.seq + direct = self.direction[sc] - for p in pattern: - tb = self.getChordInPos(p.offset, ctable) + for p in pattern: + tb = self.getChordInPos(p.offset, ctable) - if tb.arpeggioZ: - continue + if tb.arpeggioZ: + continue - if direct == 'DOWN': - self.arpDirection = -1 + if direct == 'DOWN': + self.arpDirection = -1 - if self.chordLimit: - tb.chord.limit(self.chordLimit) + if self.chordLimit: + tb.chord.limit(self.chordLimit) - if self.compress[sc]: - tb.chord.compress() + if self.compress[sc]: + tb.chord.compress() - if self.invert[sc]: - tb.chord.invert(self.invert[sc]) + if self.invert[sc]: + tb.chord.invert(self.invert[sc]) - # This should be optimized, it recreates the chord for every pattern. - # Problem is that one would need to check all the LIMIT, COMPRESS, etc - # settings each for each bar as well, so it's probably just as easy to - # leave it as is. Besides, this works. + # This should be optimized, it recreates the chord for every pattern. + # Problem is that one would need to check all the LIMIT, COMPRESS, etc + # settings each for each bar as well, so it's probably just as easy to + # leave it as is. Besides, this works. - ln = self.chordRange[sc] - o = 0 - ourChord = [] - while ln >= 1: - for a in tb.chord.noteList: - ourChord.append(a+o) - ln -= 1 - o += 12 + ln = self.chordRange[sc] + o = 0 + ourChord = [] + while ln >= 1: + for a in tb.chord.noteList: + ourChord.append(a+o) + ln -= 1 + o += 12 - if ln > 0 and ln < 1: # for fractional lengths - ln = int(tb.chord.noteListLen * ln) - if ln < 2: # important, min of 2 notes in arp. - ln=2 - for a in tb.chord.noteList[:ln]: - ourChord.append(a+o) + if ln > 0 and ln < 1: # for fractional lengths + ln = int(tb.chord.noteListLen * ln) + if ln < 2: # important, min of 2 notes in arp. + ln=2 + for a in tb.chord.noteList[:ln]: + ourChord.append(a+o) - if direct == 'BOTH': - if self.arpOffset < 0: - self.arpOffset = 1 - self.arpDirection = 1 - elif self.arpOffset >= len(ourChord): - self.arpOffset = len(ourChord)-2 - self.arpDirection = -1 + if direct == 'BOTH': + if self.arpOffset < 0: + self.arpOffset = 1 + self.arpDirection = 1 + elif self.arpOffset >= len(ourChord): + self.arpOffset = len(ourChord)-2 + self.arpDirection = -1 - elif direct == 'UP': - if self.arpOffset >= len(ourChord) or self.arpOffset < 0: - self.arpOffset = 0 - self.arpDirection = 1 + elif direct == 'UP': + if self.arpOffset >= len(ourChord) or self.arpOffset < 0: + self.arpOffset = 0 + self.arpDirection = 1 - elif direct == 'DOWN': - if self.arpOffset < 0 or self.arpOffset >= len(ourChord): - self.arpOffset = len(ourChord)-1 - self.arpDirection = -1 + elif direct == 'DOWN': + if self.arpOffset < 0 or self.arpOffset >= len(ourChord): + self.arpOffset = len(ourChord)-1 + self.arpDirection = -1 - if direct == 'RANDOM': - note = random.choice(ourChord) - else: - note = ourChord[self.arpOffset] + if direct == 'RANDOM': + note = random.choice(ourChord) + else: + note = ourChord[self.arpOffset] - self.arpOffset += self.arpDirection + self.arpOffset += self.arpDirection - if not self.harmonyOnly[sc]: - self.sendNote( - p.offset, - self.getDur(p.duration), - self.adjustNote(note), - self.adjustVolume(p.vol, p.offset) ) + if not self.harmonyOnly[sc]: + self.sendNote( + p.offset, + self.getDur(p.duration), + self.adjustNote(note), + self.adjustVolume(p.vol, p.offset) ) - if self.harmony[sc]: - h = harmonize(self.harmony[sc], note, ourChord) - for n in h: - self.sendNote( - p.offset, - self.getDur(p.duration), - self.adjustNote(n), - self.adjustVolume(p.vol * self.harmonyVolume[sc], -1) ) + if self.harmony[sc]: + h = harmonize(self.harmony[sc], note, ourChord) + for n in h: + self.sendNote( + p.offset, + self.getDur(p.duration), + self.adjustNote(n), + self.adjustVolume(p.vol * self.harmonyVolume[sc], -1) ) - tb.chord.reset() # important, other tracks chord object + tb.chord.reset() # important, other tracks chord object diff --git a/mma/MMA/patBass.py b/mma/MMA/patBass.py index bf95c02..df8f253 100644 --- a/mma/MMA/patBass.py +++ b/mma/MMA/patBass.py @@ -1,8 +1,8 @@ -# patBass.py +# patBass.py """ -This module is an integeral part of the program +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 @@ -19,10 +19,10 @@ 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 - +Bob van der Poel + """ - + import gbl @@ -33,102 +33,102 @@ from MMA.pat import PC class Bass(PC): - """ Pattern class for a bass track. """ + """ Pattern class for a bass track. """ - vtype = 'BASS' - - def getPgroup(self, ev): - """ Get group for bass pattern. - - Fields - start, length, note, volume - - """ - - if len(ev) != 4: - error("There must be n groups of 4 in a pattern definition, " - "not <%s>." % ' '.join(ev) ) + vtype = 'BASS' - a = struct() + def getPgroup(self, ev): + """ Get group for bass pattern. - a.offset = self.setBarOffset(ev[0]) - a.duration = getNoteLen( ev[1] ) + Fields - start, length, note, volume - offset = ev[2] - n=offset[0] - if n in "1234567": - a.noteoffset = int(n)-1 - else: - error("Note offset in Bass must be '1'...'7', not '%s'" % n ) - - n = offset[1:2] - if n == "#": - a.accidental = 1 - ptr = 2 - elif n == 'b' or n == 'b' or n == '&': - a.accidental = -1 - ptr = 2 - else: - a.accidental = 0 - ptr = 1 - - a.addoctave = 0 + """ - for n in ev[2][ptr:]: - if n == '+': - a.addoctave += 12 - elif n == '-': - a.addoctave -= 12 - - else: - error("Only '- + # b &' are permitted after a noteoffset, not '%s'" % n) - - a.vol = stoi(ev[3], "Note volume in Bass definition not int.") - - return a + if len(ev) != 4: + error("There must be n groups of 4 in a pattern definition, " + "not <%s>" % ' '.join(ev) ) - def restart(self): - self.ssvoice = -1 - + a = struct() - def trackBar(self, pattern, ctable): - """ Do the bass bar. - - Called from self.bar() - - """ - - sc = self.seq - unify = self.unify[sc] + a.offset = self.setBarOffset(ev[0]) + a.duration = getNoteLen( ev[1] ) + + offset = ev[2] + n=offset[0] + if n in "1234567": + a.noteoffset = int(n)-1 + else: + error("Note offset in Bass must be '1'...'7', not '%s'" % n ) + + n = offset[1:2] + if n == "#": + a.accidental = 1 + ptr = 2 + elif n == 'b' or n == 'b' or n == '&': + a.accidental = -1 + ptr = 2 + else: + a.accidental = 0 + ptr = 1 + + a.addoctave = 0 + + for n in ev[2][ptr:]: + if n == '+': + a.addoctave += 12 + elif n == '-': + a.addoctave -= 12 + + else: + error("Only '- + # b &' are permitted after a noteoffset, not '%s'" % n) + + a.vol = stoi(ev[3], "Note volume in Bass definition not int") + + return a + + def restart(self): + self.ssvoice = -1 + + + def trackBar(self, pattern, ctable): + """ Do the bass bar. + + Called from self.bar() + + """ + + sc = self.seq + unify = self.unify[sc] + + for p in pattern: + ct = self.getChordInPos(p.offset, ctable) + + if ct.bassZ: + continue + + + note = ct.chord.scaleList[p.noteoffset] + p.addoctave + p.accidental + + + if not self.harmonyOnly[sc]: + self.sendNote( + p.offset, + self.getDur(p.duration), + self.adjustNote(note), + self.adjustVolume(p.vol, p.offset)) + + + if self.harmony[sc]: + h = harmonize(self.harmony[sc], note, ct.chord.noteList) + for n in h: + self.sendNote( + p.offset, + self.getDur(p.duration), + self.adjustNote(n), + self.adjustVolume(p.vol * self.harmonyVolume[sc], -1)) - for p in pattern: - ct = self.getChordInPos(p.offset, ctable) - if ct.bassZ: - continue - - note = ct.chord.scaleList[p.noteoffset] + p.addoctave + p.accidental - - if not self.harmonyOnly[sc]: - self.sendNote( - p.offset, - self.getDur(p.duration), - self.adjustNote(note), - self.adjustVolume(p.vol, p.offset)) - - - if self.harmony[sc]: - h = harmonize(self.harmony[sc], note, ct.chord.noteList) - for n in h: - self.sendNote( - p.offset, - self.getDur(p.duration), - self.adjustNote(n), - self.adjustVolume(p.vol * self.harmonyVolume[sc], -1)) - - - - diff --git a/mma/MMA/patChord.py b/mma/MMA/patChord.py index fab7c0f..4bec74f 100644 --- a/mma/MMA/patChord.py +++ b/mma/MMA/patChord.py @@ -19,7 +19,7 @@ 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 +Bob van der Poel """ @@ -29,240 +29,376 @@ import random import gbl from MMA.notelen import getNoteLen from MMA.common import * -from MMA.pat import PC +from MMA.pat import PC, seqBump + class Chord(PC): - """ Pattern class for a chord track. """ + """ Pattern class for a chord track. """ - vtype = 'CHORD' + vtype = 'CHORD' - def getPgroup(self, ev): - """ Get group for chord pattern. + def setVoicing(self, ln): + """ set the Voicing Mode options. Only valid for CHORDS. """ - Tuples: [start, length, volume (,volume ...) ] - """ + for l in ln: + try: + mode, val = l.upper().split('=') + except: + error("Each Voicing option must contain a '=', not '%s'" % l) - if len(ev) < 3: - error("There must be at least 3 items in each group " - "of a chord pattern definition, not <%s>." % ' '.join(ev)) - a = struct() + if mode == 'MODE': + valid= ("-", "OPTIMAL", "NONE", "ROOT", "COMPRESSED", "INVERT") - a.offset = self.setBarOffset(ev[0]) - a.duration = getNoteLen(ev[1]) + if not val in valid: + error("Valid Voicing Modes are: %s" % " ".join(valid)) - vv = ev[2:] - if len(vv)>8: - error("Only 8 volumes are permitted in Chord definition, not %s." % len(vv)) + if val in ('-', 'NONE',"ROOT"): + val = None - a.vol = [0] * 8 - for i,v in enumerate(vv): - v=stoi(v, "Expecting integer in volume list for Chord definition.") - a.vol[i]=v - for i in range(i+1,8): # force remaining volumes - a.vol[i]=v + if val and (max(self.invert) + max(self.compress)): + warning("Setting both VoicingMode and Invert/Compress is not a good idea") - return a + """ When we set voicing mode we always reset this. This forces + the voicingmode code to restart its rotations. + """ - def restart(self): - self.ssvoice = -1 - self.lastChord = None + self.lastChord = [] + self.voicing.mode = val - def chordVoicing(self, chord, vMove): - """ Voicing algorithm by Alain Brenzikofer. """ + elif mode == 'RANGE': + val = stoi(val, "Argument for %s Voicing Range " + "must be a value" % self.name) - sc = self.seq - vmode=self.voicing.mode + if val < 1 or val > 30: + error("Voicing Range '%s' out-of-range; " + "must be 1 to 30" % val) - if vmode == "OPTIMAL": + self.voicing.range = val - # Initialize with a voicing around centerNote - chord.center1(self.lastChord) + elif mode == 'CENTER': + val = stoi(val, "Argument for %s Voicing Center " + "must be a value" % self.name) - # Adjust range and center + if val < 1 or val > 12: + error("Voicing Center %s out-of-range; " + "must be 1 to 12" % val) - if not (self.voicing.bcount or self.voicing.random): - chord.center2(self.voicing.center, self.voicing.range/2) + self.voicing.center = val + elif mode == 'RMOVE': + val = stoi(val, "Argument for %s Voicing Random " + "must be a value" % self.name) - # Move voicing + if val < 0 or val > 100: + error("Voicing Random value must be 0 to 100 " + "not %s" % val) - elif self.lastChord: - if (self.lastChord != chord.noteList ) and vMove: - chord.center2(self.voicing.center,self.voicing.range/2) - vMove = 0 + self.voicing.random = val + self.voicing.bcount = 0 - # Update voicingCenter + elif mode == 'MOVE': + val = stoi(val, "Argument for %s Voicing Move " + "must be a value" % self.name) - sum=0 - for n in chord.noteList: - sum += n - c=sum/chord.noteListLen + if val < 0 : + error("Voicing Move (bar count) must >= 0, not %s" % val) + if val > 20: + warning("Voicing Move (bar count) %s is quite large" % val) - """ If using random voicing move it it's possible to - get way off the selected octave. This check ensures - that the centerpoint stays in a tight range. - Note that if using voicingMove manually (not random) - it is quite possible to move the chord centers to very - low or high keyboard positions! - """ + self.voicing.bcount = val + self.voicing.random = 0 - if self.voicing.random: - if c < -4: c=0 - elif c >4: c=4 - self.voicing.center=c + elif mode == 'DIR': + val = stoi(val, "Argument for %s Voicing Dir (move direction) " + "must be a value" % self.name) + if not val in (1,0,-1): + error("Voicing Move Dir -1, 0 or 1, not %s" % val) - elif vmode == "COMPRESSED": - chord.compress() + self.voicing.dir = val - elif vmode == "INVERT": - if chord.rootNote < -2: - chord.invert(1) - elif chord.rootNote > 2: - chord.invert(-1) - chord.compress() + if gbl.debug: + v=self.voicing + print "Set %s Voicing MODE=%s" % (self.name, v.mode), + print "RANGE=%s CENTER=%s" % (v.range, v.center), + print "RMOVE=%s MOVE=%s DIR=%s" % (v.random, v.bcount, v.dir) - self.lastChord = chord.noteList[:] - return vMove + def setDupRoot(self, ln): + """ set/unset root duplication. Only for CHORDs """ - def trackBar(self, pattern, ctable): - """ Do a chord bar. Called from self.bar() """ + ln=self.lnExpand(ln, 'DupRoot') + tmp = [] - sc = self.seq - unify = self.unify[sc] + for n in ln: + n = stoi(n, "Argument for %s DupRoot must be a value" % self.name) - """ Set voicing move ONCE at the top of each bar. - The voicing code resets vmove to 0 the first - time it's used. That way only one movement is - done in a bar. - """ + if n < -9 or n > 9: + error("DupRoot %s out-of-range; must be -9 to 9" % n) - vmove = 0 + tmp.append( n * 12 ) - if self.voicing.random: - if random.randrange(100) <= self.voicing.random: - vmove = random.choice((-1,1)) - elif self.voicing.bcount and self.voicing.dir: - vmove = self.voicing.dir + self.dupRoot = seqBump(tmp) + if gbl.debug: + print "Set %s DupRoot to " % self.name, + printList(ln) - for p in pattern: - tb = self.getChordInPos(p.offset, ctable) - if tb.chordZ: - continue + def setStrum(self, ln): + """ Set Strum time. """ - self.crDupRoot = self.dupRoot[sc] + ln=self.lnExpand(ln, 'Strum') + tmp = [] - vmode = self.voicing.mode - vols = p.vol[0:tb.chord.noteListLen] + for n in ln: + n = stoi(n, "Argument for %s Strum must be an integer" % self.name) - # Limit the chord notes. This works even if THERE IS A VOICINGMODE! + if n < 0 or n > 100: + error("Strum %s out-of-range; must be 0..100" % n) - if self.chordLimit: - tb.chord.limit(self.chordLimit) + tmp.append(n) - """ Compress chord into single octave if 'compress' is set - We do it here, before octave, transpose and invert! - Ignored if we have a VOICINGMODE. - """ + self.strum = seqBump(tmp) - if self.compress[sc] and not vmode: - tb.chord.compress() + if gbl.debug: + print "Set %s Strum to %s" % (self.name, self.strum) - # Do the voicing stuff. - if vmode: - vmove=self.chordVoicing(tb.chord, vmove) + def getPgroup(self, ev): + """ Get group for chord pattern. - # Invert. + Tuples: [start, length, volume (,volume ...) ] + """ - if self.invert[sc]: - tb.chord.invert(self.invert[sc]) + if len(ev) < 3: + error("There must be at least 3 items in each group " + "of a chord pattern definition, not <%s>" % ' '.join(ev)) - # Set STRUM flags + a = struct() - strumAdjust = self.strum[sc] - strumOffset = 0 - sd = self.direction[sc] - if sd=='BOTH': - sd = 'BOTHDOWN' - if sd == 'BOTHDOWN': - sd = 'BOTHUP' - elif sd == 'BOTHUP': - sd = 'BOTHDOWN' + a.offset = self.setBarOffset(ev[0]) + a.duration = getNoteLen(ev[1]) - if strumAdjust and sd in ('DOWN', 'BOTHDOWN'): - strumOffset += strumAdjust * tb.chord.noteListLen - strumAdjust = -strumAdjust + vv = ev[2:] + if len(vv)>8: + error("Only 8 volumes are permitted in Chord definition, not %s" % len(vv)) + a.vol = [0] * 8 + for i,v in enumerate(vv): + v=stoi(v, "Expecting integer in volume list for Chord definition") + a.vol[i]=v - """ Voicing adjustment for 'jazz' or altered chords. If a chord (most - likely something like a M7 or flat-9 ends up with any 2 adjacent - notes separated by a single tone an unconfortable dissonance results. - This little check compares all notes in the chord and will cut the - volume of one note to reduce the disonance. Usually this will be - the root note volume being decreased. - """ + for i in range(i+1,8): # force remaining volumes + a.vol[i]=v - nl=tb.chord.noteList - l=len(nl) - for j in range(l-1): - r = nl[j] - for i in range(j+1, l): - if nl[i] in (r-1, r+1, r-13, r+13) and vols[i] >= vols[0]: - vols[j] = vols[i]/2 - break + return a - loo = zip(nl, vols) # this is a note/volume array of tuples + def restart(self): + self.ssvoice = -1 + self.lastChord = None - """ Duplicate the root. This can be set from a DupRoot command - or by chordVoicing(). Notes: - - The volume for the added root will be the average of the chord - notes (ignoring OFF notes) divided by 2. - - If the new note (after transpose and octave adjustments - is out of MIDI range it will be ignored. - """ + def chordVoicing(self, chord, vMove): + """ Voicing algorithm by Alain Brenzikofer. """ - if self.crDupRoot: - root = tb.chord.rootNote + self.crDupRoot - t = root + self.octave[sc] + gbl.transpose - if t >=0 and t < 128: - v=0 - c=0 - for vv in vols: - if vv: - v += vv - c += 2 - v /= c - loo.append( (tb.chord.rootNote + self.crDupRoot, v)) - for note, v in sorted(loo): # sorting low-to-high notes. Mainly for STRUM. - self.sendNote( - p.offset+strumOffset, - self.getDur(p.duration), - self.adjustNote(note), - self.adjustVolume( v, p.offset) ) + sc = self.seq + vmode=self.voicing.mode - strumOffset += strumAdjust + if vmode == "OPTIMAL": - tb.chord.reset() # important, other tracks chord object + # Initialize with a voicing around centerNote - # Adjust the voicingMove counter at the end of the bar + chord.center1(self.lastChord) - if self.voicing.bcount: - self.voicing.bcount -= 1 + # Adjust range and center + + if not (self.voicing.bcount or self.voicing.random): + chord.center2(self.voicing.center, self.voicing.range/2) + + + # Move voicing + + elif self.lastChord: + if (self.lastChord != chord.noteList ) and vMove: + chord.center2(self.voicing.center,self.voicing.range/2) + vMove = 0 + + # Update voicingCenter + + sum=0 + for n in chord.noteList: + sum += n + c=sum/chord.noteListLen + + """ If using random voicing move it it's possible to + get way off the selected octave. This check ensures + that the centerpoint stays in a tight range. + Note that if using voicingMove manually (not random) + it is quite possible to move the chord centers to very + low or high keyboard positions! + """ + + if self.voicing.random: + if c < -4: c=0 + elif c >4: c=4 + self.voicing.center=c + + + elif vmode == "COMPRESSED": + chord.compress() + + elif vmode == "INVERT": + if chord.rootNote < -2: + chord.invert(1) + + elif chord.rootNote > 2: + chord.invert(-1) + chord.compress() + + self.lastChord = chord.noteList[:] + + return vMove + + + def trackBar(self, pattern, ctable): + """ Do a chord bar. Called from self.bar() """ + + sc = self.seq + unify = self.unify[sc] + + """ Set voicing move ONCE at the top of each bar. + The voicing code resets vmove to 0 the first + time it's used. That way only one movement is + done in a bar. + """ + + vmove = 0 + + if self.voicing.random: + if random.randrange(100) <= self.voicing.random: + vmove = random.choice((-1,1)) + elif self.voicing.bcount and self.voicing.dir: + vmove = self.voicing.dir + + + for p in pattern: + tb = self.getChordInPos(p.offset, ctable) + + if tb.chordZ: + continue + + self.crDupRoot = self.dupRoot[sc] + + vmode = self.voicing.mode + vols = p.vol[0:tb.chord.noteListLen] + + # Limit the chord notes. This works even if THERE IS A VOICINGMODE! + + if self.chordLimit: + tb.chord.limit(self.chordLimit) + + """ Compress chord into single octave if 'compress' is set + We do it here, before octave, transpose and invert! + Ignored if we have a VOICINGMODE. + """ + + if self.compress[sc] and not vmode: + tb.chord.compress() + + # Do the voicing stuff. + + if vmode: + vmove=self.chordVoicing(tb.chord, vmove) + + # Invert. + + if self.invert[sc]: + tb.chord.invert(self.invert[sc]) + + # Set STRUM flags + + strumAdjust = self.strum[sc] + strumOffset = 0 + sd = self.direction[sc] + if sd=='BOTH': + sd = 'BOTHDOWN' + if sd == 'BOTHDOWN': + sd = 'BOTHUP' + elif sd == 'BOTHUP': + sd = 'BOTHDOWN' + + if strumAdjust and sd in ('DOWN', 'BOTHDOWN'): + strumOffset += strumAdjust * tb.chord.noteListLen + strumAdjust = -strumAdjust + + + """ Voicing adjustment for 'jazz' or altered chords. If a chord (most + likely something like a M7 or flat-9 ends up with any 2 adjacent + notes separated by a single tone an unconfortable dissonance results. + This little check compares all notes in the chord and will cut the + volume of one note to reduce the disonance. Usually this will be + the root note volume being decreased. + """ + + nl=tb.chord.noteList + l=len(nl) + for j in range(l-1): + r = nl[j] + for i in range(j+1, l): + if nl[i] in (r-1, r+1, r-13, r+13) and vols[i] >= vols[0]: + vols[j] = vols[i]/2 + break + + loo = zip(nl, vols) # this is a note/volume array of tuples + + + """ Duplicate the root. This can be set from a DupRoot command + or by chordVoicing(). Notes: + - The volume for the added root will be the average of the chord + notes (ignoring OFF notes) divided by 2. + - If the new note (after transpose and octave adjustments + is out of MIDI range it will be ignored. + """ + + if self.crDupRoot: + root = tb.chord.rootNote + self.crDupRoot + t = root + self.octave[sc] + gbl.transpose + if t >=0 and t < 128: + v=0 + c=0 + for vv in vols: + if vv: + v += vv + c += 2 + v /= c + loo.append( (tb.chord.rootNote + self.crDupRoot, v)) + + for note, v in sorted(loo): # sorting low-to-high notes. Mainly for STRUM. + self.sendNote( + p.offset+strumOffset, + self.getDur(p.duration), + self.adjustNote(note), + self.adjustVolume( v, p.offset) ) + + strumOffset += strumAdjust + + tb.chord.reset() # important, other tracks chord object + + # Adjust the voicingMove counter at the end of the bar + + if self.voicing.bcount: + self.voicing.bcount -= 1 diff --git a/mma/MMA/patDrum.py b/mma/MMA/patDrum.py index 20f293f..dd272ab 100644 --- a/mma/MMA/patDrum.py +++ b/mma/MMA/patDrum.py @@ -2,7 +2,7 @@ # patDrum.py """ -This module is an integeral part of the program +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 @@ -19,8 +19,8 @@ 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 - +Bob van der Poel + """ import gbl @@ -31,73 +31,84 @@ from MMA.pat import PC, seqBump class Drum(PC): - """ Pattern class for a drum track. """ + """ Pattern class for a drum track. """ - vtype = 'DRUM' - toneList = [38] + vtype = 'DRUM' + toneList = [38] - def setTone(self, ln): - """ Set a tone list. Only valid for DRUMs. - ln[] is not nesc. the right length. - """ - - ln=self.lnExpand(ln, 'Tone') - tmp = [] - - for n in ln: - tmp.append(MMA.translate.dtable.get(n)) + def __init__(self, ln): + """ init for drum track. """ - self.toneList = seqBump( tmp ) + PC.__init__(self, ln) + + self.setChannel('10') + if not gbl.mtrks[self.channel].trackname: + gbl.mtrks[self.channel].addTrkName(0, 'Drum') - def restart(self): - self.ssvoice = -1 - - - def getPgroup(self, ev): - """ Get group for a drum pattern. - - Fields - start, length, volume - """ + + def setTone(self, ln): + """ Set a tone list. Only valid for DRUMs. + ln[] is not nesc. the right length. + """ - if len(ev) != 3: - error("There must be at exactly 3 items in each " - "group of a drum define, not <%s>." % ' '.join(ev) ) + ln=self.lnExpand(ln, 'Tone') + tmp = [] + + for n in ln: + tmp.append(MMA.translate.dtable.get(n)) + + self.toneList = seqBump( tmp ) + + + def restart(self): + self.ssvoice = -1 + + + def getPgroup(self, ev): + """ Get group for a drum pattern. + + Fields - start, length, volume + """ + + if len(ev) != 3: + error("There must be at exactly 3 items in each " + "group of a drum define, not <%s>" % ' '.join(ev) ) + + a = struct() + + a.offset = self.setBarOffset(ev[0]) + a.duration = getNoteLen(ev[1]) + a.vol = stoi(ev[2], "Type error in Drum volume") + + return a + + + + def trackBar(self, pattern, ctable): + """ Do a drum bar. + + Called from self.bar() + + """ + + sc = self.seq + + for p in pattern: + tb = self.getChordInPos(p.offset, ctable) + + if tb.drumZ: + continue + + self.sendNote( + p.offset, + self.getDur(p.duration), + self.toneList[sc], + self.adjustVolume(p.vol, p.offset) ) - a = struct() - - a.offset = self.setBarOffset(ev[0]) - a.duration = getNoteLen(ev[1]) - a.vol = stoi(ev[2], "Type error in Drum volume.") - return a - - - def trackBar(self, pattern, ctable): - """ Do a drum bar. - - Called from self.bar() - - """ - - sc = self.seq - - for p in pattern: - tb = self.getChordInPos(p.offset, ctable) - - if tb.drumZ: - continue - self.sendNote( - p.offset, - self.getDur(p.duration), - self.toneList[sc], - self.adjustVolume(p.vol, p.offset) ) - - - - diff --git a/mma/MMA/patScale.py b/mma/MMA/patScale.py index dd76b50..21e7701 100644 --- a/mma/MMA/patScale.py +++ b/mma/MMA/patScale.py @@ -19,197 +19,213 @@ 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 +Bob van der Poel """ - - - import random from MMA.harmony import harmonize from MMA.notelen import getNoteLen import gbl from MMA.common import * -from MMA.pat import PC +from MMA.pat import PC, seqBump class Scale(PC): - """ Pattern class for a Scale track. """ + """ Pattern class for a Scale track. """ - vtype = 'SCALE' + vtype = 'SCALE' - lastNote = -1 - lastChord = None - lastStype = None - lastDirect = 1 - lastRange = 0 - sOffset = 0 - notes = None - dirfact = 1 + lastNote = -1 + lastChord = None + lastStype = None + lastDirect = 1 + lastRange = 0 + sOffset = 0 + notes = None + dirfact = 1 - def getPgroup(self, ev): - """ Get group for scale patterns. + def getPgroup(self, ev): + """ Get group for scale patterns. - Fields - start, length, volume - """ + Fields - start, length, volume + """ - if len(ev) != 3: - error("There must be at exactly 3 items in each group " - "in a Scale definition, not <%s>." % ' '.join(ev)) + if len(ev) != 3: + error("There must be at exactly 3 items in each group " + "in a Scale definition, not <%s>." % ' '.join(ev)) - a = struct() + a = struct() - a.offset = self.setBarOffset(ev[0]) - a.duration = getNoteLen(ev[1]) - a.vol = stoi(ev[2], "Type error in Scale definition") + a.offset = self.setBarOffset(ev[0]) + a.duration = getNoteLen(ev[1]) + a.vol = stoi(ev[2], "Type error in Scale definition") - return a + return a - def restart(self): - self.ssvoice = -1 - self.lastNote = -1 - self.lastChord = None - self.lastStype = None - self.lastDirect = 1 - self.lastRange = 0 - self.sOffset = 0 - self.notes = None - self.dirfact = 1 + def setScaletype(self, ln): + """ Set scale type. """ - def trackBar(self, pattern, ctable): - """ Do a scale bar. + ln = self.lnExpand(ln, "ScaleType") + tmp = [] - Called from self.bar() - """ + for n in ln: + n = n.upper() + if not n in ( 'CHROMATIC', 'AUTO'): + error("Unknown %s ScaleType. Only Chromatic and Auto are valid" % self.name) + tmp.append(n) - sc = self.seq - direct = self.direction[sc] - unify = self.unify[sc] + self.scaleType = seqBump(tmp) - # If the range or direction has changed, we just start - # with a new scale. + if gbl.debug: + print "Set %s ScaleType to " % self.name, + printList(ln) - t = self.chordRange[sc] - if t != self.lastRange: - self.lastRange = t - self.lastChord = None + def restart(self): + self.ssvoice = -1 + self.lastNote = -1 + self.lastChord = None + self.lastStype = None + self.lastDirect = 1 + self.lastRange = 0 + self.sOffset = 0 + self.notes = None + self.dirfact = 1 - if self.lastDirect != direct: - self.lastDirect = direct - self.lastChord = None + def trackBar(self, pattern, ctable): + """ Do a scale bar. - for p in pattern: + Called from self.bar() + """ - tb = self.getChordInPos(p.offset, ctable) + sc = self.seq + direct = self.direction[sc] + unify = self.unify[sc] - if tb.scaleZ: - continue + # If the range or direction has changed, we just start + # with a new scale. - thisChord = tb.chord.tonic + tb.chord.chordType - stype = self.scaleType[sc] + t = self.chordRange[sc] + if t != self.lastRange: + self.lastRange = t + self.lastChord = None - if thisChord != self.lastChord or stype != self.lastStype: - self.lastChord = thisChord - self.lastStype = stype + if self.lastDirect != direct: + self.lastDirect = direct + self.lastChord = None - if stype == 'CHROMATIC': - notelist = [ tb.chord.rootNote + x for x in range(0,12)] + for p in pattern: - else: - notelist = list(tb.chord.scaleList) + tb = self.getChordInPos(p.offset, ctable) - """ Get the current scale and append enuf copies - together for RANGE setting. If Range happens - to be 0 or 1 we end up with a single copy. - """ - - ln=self.chordRange[sc] # RANGE 1...x (def. == 1) - - o=0 - self.notes = [] - - while ln >= 1: - for a in notelist: - self.notes.append(a+o) - o+=12 - ln-=1 - - if ln>0 and ln<1: # for fractional scale lengths - ln = int(len(notelist) * ln) - if ln < 2: # important, must be at least 2 notes in a scale - ln=2 - for a in notelist[:ln]: - self.notes.append(a+o) - - if direct == 'DOWN': - self.dirfact = -1 - if self.lastNote == -1: - self.sOffset = len(self.notes)-1 - else: - self.sOffset = 0 - - if self.lastNote > -1: - if self.lastNote in self.notes: - self.sOffset = self.notes.index(self.lastNote) - - else: - self.sOffset=len(self.notes)-1 - for i, a in enumerate(self.notes): - if a>self.lastNote: - self.sOffset = i - break + if tb.scaleZ: + continue - # Keep offset into note list in range + thisChord = tb.chord.tonic + tb.chord.chordType + stype = self.scaleType[sc] - # only > end of list if BOTH or UP + if thisChord != self.lastChord or stype != self.lastStype: + self.lastChord = thisChord + self.lastStype = stype - if self.sOffset >= len(self.notes): - if direct == 'BOTH': - self.dirfact = -1 - self.sOffset = len(self.notes)-2 - else: ## UP - self.sOffset = 0 + if stype == 'CHROMATIC': + notelist = [ tb.chord.rootNote + x for x in range(0,12)] + + else: + notelist = list(tb.chord.scaleList) - # only < start of list if DOWN or BOTH + """ Get the current scale and append enuf copies + together for RANGE setting. If Range happens + to be 0 or 1 we end up with a single copy. + """ - elif self.sOffset < 0: - if direct == 'BOTH': - self.dirfact = 1 - self.sOffset = 1 - else: ## DOWN - self.sOffset = len(self.notes)-1 + ln=self.chordRange[sc] # RANGE 1...x (def. == 1) - if direct == 'RANDOM': - note = random.choice(self.notes) - else: - note = self.notes[self.sOffset] - self.sOffset += self.dirfact + o=0 + self.notes = [] - self.lastNote = note + while ln >= 1: + for a in notelist: + self.notes.append(a+o) + o+=12 + ln-=1 - if not self.harmonyOnly[sc]: - self.sendNote( - p.offset, - self.getDur(p.duration), - self.adjustNote(note), - self.adjustVolume(p.vol, p.offset)) + if ln>0 and ln<1: # for fractional scale lengths + ln = int(len(notelist) * ln) + if ln < 2: # important, must be at least 2 notes in a scale + ln=2 + for a in notelist[:ln]: + self.notes.append(a+o) + + if direct == 'DOWN': + self.dirfact = -1 + if self.lastNote == -1: + self.sOffset = len(self.notes)-1 + else: + self.sOffset = 0 + + if self.lastNote > -1: + if self.lastNote in self.notes: + self.sOffset = self.notes.index(self.lastNote) + + else: + self.sOffset=len(self.notes)-1 + for i, a in enumerate(self.notes): + if a>self.lastNote: + self.sOffset = i + break - if self.harmony[sc]: - ch = self.getChordInPos(p.offset, ctable).chord.noteList - h = harmonize(self.harmony[sc], note, ch) - for n in h: - self.sendNote( - p.offset, - self.getDur(p.duration), - self.adjustNote(n), - self.adjustVolume(self.harmonyVolume[sc] * p.vol, -1) ) + # Keep offset into note list in range + + # only > end of list if BOTH or UP + + if self.sOffset >= len(self.notes): + if direct == 'BOTH': + self.dirfact = -1 + self.sOffset = len(self.notes)-2 + else: ## UP + self.sOffset = 0 + + # only < start of list if DOWN or BOTH + + elif self.sOffset < 0: + if direct == 'BOTH': + self.dirfact = 1 + self.sOffset = 1 + else: ## DOWN + self.sOffset = len(self.notes)-1 + + if direct == 'RANDOM': + note = random.choice(self.notes) + else: + note = self.notes[self.sOffset] + self.sOffset += self.dirfact + + self.lastNote = note + + if not self.harmonyOnly[sc]: + self.sendNote( + p.offset, + self.getDur(p.duration), + self.adjustNote(note), + self.adjustVolume(p.vol, p.offset)) + + + if self.harmony[sc]: + ch = self.getChordInPos(p.offset, ctable).chord.noteList + h = harmonize(self.harmony[sc], note, ch) + for n in h: + self.sendNote( + p.offset, + self.getDur(p.duration), + self.adjustNote(n), + self.adjustVolume(self.harmonyVolume[sc] * p.vol, -1) ) diff --git a/mma/MMA/patSolo.py b/mma/MMA/patSolo.py index 4c49996..f3a32c9 100644 --- a/mma/MMA/patSolo.py +++ b/mma/MMA/patSolo.py @@ -19,7 +19,7 @@ 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 +Bob van der Poel """ @@ -34,500 +34,512 @@ import MMA.volume class NoteList: - def __init__(self, length): - self.dur = length - self.velocity = [] - self.nl = [] + def __init__(self, length): + self.dur = length + self.velocity = [] + self.nl = [] ############################## class Melody(PC): - """ The melody and solo tracks are identical, expect that - the solo tracks DO NOT get saved in grooves and are only - initialized once. - """ + """ The melody and solo tracks are identical, expect that + the solo tracks DO NOT get saved in grooves and are only + initialized once. + """ - vtype = 'MELODY' - drumType = None + vtype = 'MELODY' + drumType = None + + endTilde = [] + drumTone = 38 - endTilde = [] - drumTone = 38 + def setDrumType(self): + """ Set this track to be a drum track. """ - def setDrumType(self): - """ Set this track to be a drum track. """ + if self.channel: + error("You cannot change a track to DRUM once it has been used") - if self.channel: - error("You cannot change a track to DRUM once it has been used.") + self.drumType = 1 + self.setChannel('10') - self.drumType = 1 - self.setChannel('10') + def definePattern(self, name, ln): + error("Melody/solo patterns cannot be defined") - def definePattern(self, name, ln): - error("Melody/solo patterns cannot be defined.") + def restart(self): + self.ssvoice = -1 - def restart(self): - self.ssvoice = -1 + def setTone(self, ln): + """ A solo track can have a tone, if it is DRUMTYPE.""" - def setTone(self, ln): - """ A solo track can have a tone, if it is DRUMTYPE.""" + if not self.drumType: + error("You must set a Solo track to DrumType before setting Tone") - if not self.drumType: - error("You must set a Solo track to DrumType before setting Tone.") + if len(ln) > 1: + error("Only 1 value permitted for Drum Tone in Solo tracks") - if len(ln) > 1: - error("Only 1 value permitted for Drum Tone in Solo tracks.") + self.drumTone = MMA.translate.dtable.get(ln[0]) - self.drumTone = MMA.translate.dtable.get(ln[0]) + def getLine(self, pat, ctable): + """ Extract a melodyline for solo/melody tracks. + This is only called from trackbar(), but it's nicer + to isolate it here. - def getLine(self, pat, ctable): - """ Extract a melodyline for solo/melody tracks. - This is only called from trackbar(), but it's nicer - to isolate it here. - """ + RETURNS: notes structure. This is a dictionary. Each key represents + an offset in MIDI ticks in the current bar. The data for + each entry is an array of notes, a duration and velocity: - sc = self.seq - barEnd = gbl.BperQ*gbl.QperBar + notes[offset].dur - duration in ticks + notes[offset].velocity[] - velocity for notes + notes[offset].defaultVel - default velocity for this offset + notes[offset].nl[] - list of notes (if the only note value + is None this is a rest placeholder) - acc=keySig.getAcc() + """ - # list of notename to midivalues + sc = self.seq + barEnd = gbl.BperQ*gbl.QperBar - midiNotes = {'c':0, 'd':2, 'e':4, 'f':5, 'g':7, 'a':9, 'b':11, 'r':None } + acc=keySig.getAcc() - """ The initial string is in the format "1ab;4c;;4r;". The trailing - ';' is important and needed. If we don't have this requirement - we can't tell if the last note is a repeat of the previous. For - example, if we have coded "2a;2a;" as "2a;;" and we didn't - have the 'must end with ;' rule, we end up with "2a;" and - then we make this into 2 notes...or do we? Easiest just to - insist that all bars end with a ";". - """ + # list of notename to midivalues - if not pat.endswith(';'): - error("All Solo strings must end with a ';'") + midiNotes = {'c':0, 'd':2, 'e':4, 'f':5, 'g':7, 'a':9, 'b':11, 'r':None } - """ Take our list of note/value pairs and decode into - a list of midi values. Quite ugly. - """ + """ The initial string is in the format "1ab;4c;;4r;". The trailing + ';' is important and needed. If we don't have this requirement + we can't tell if the last note is a repeat of the previous. For + example, if we have coded "2a;2a;" as "2a;;" and we didn't + have the 'must end with ;' rule, we end up with "2a;" and + then we make this into 2 notes...or do we? Easiest just to + insist that all bars end with a ";". + """ - if gbl.swingMode: - len8 = getNoteLen('8') - len81 = getNoteLen('81') - len82 = getNoteLen('82') - onBeats = [ x * gbl.BperQ for x in range(gbl.QperBar)] - offBeats = [ (x * gbl.BperQ + len8) for x in range(gbl.QperBar)] + if not pat.endswith(';'): + error("All Solo strings must end with a ';'") + """ Take our list of note/value pairs and decode into + a list of midi values. Quite ugly. + """ - length = getNoteLen('4') # default note length - lastc = '' # last parsed note - velocity = 90 # intial/default velocity for solo notes - harmony = self.harmony[sc] - harmOnly = self.harmonyOnly[sc] + if gbl.swingMode: + len8 = getNoteLen('8') + len81 = getNoteLen('81') + len82 = getNoteLen('82') + onBeats = [ x * gbl.BperQ for x in range(gbl.QperBar)] + offBeats = [ (x * gbl.BperQ + len8) for x in range(gbl.QperBar)] - notes={} # A dict of NoteList, keys == offset - if self.drumType: - isdrum = 1 - lastc = str(self.drumTone) - else: - isdrum = None + length = getNoteLen('4') # default note length + lastc = '' # last parsed note + velocity = 90 # intial/default velocity for solo notes - pat = pat.replace(' ', '').split(';')[:-1] + notes={} # A dict of NoteList, keys == offset - # set initial offset into bar + if self.drumType: + isdrum = 1 + lastc = str(self.drumTone) + else: + isdrum = None - if pat[0].startswith("~"): - pat[0]=pat[0][1:] - if not self.endTilde or self.endTilde[1] != gbl.tickOffset: - error("Previous line did not end with '~'.") - else: - offset = self.endTilde[0] - else: - offset = 0 - lastOffset = None + pat = pat.replace(' ', '').split(';')[:-1] - # Strip off trailing ~ + # set initial offset into bar - if pat[-1].endswith("~"): - self.endTilde = [1, gbl.tickOffset + (gbl.BperQ * gbl.QperBar) ] - pat[-1]=pat[-1][:-1] - else: - self.endTilde = [] + if pat[0].startswith("~"): + pat[0]=pat[0][1:] + if not self.endTilde or self.endTilde[1] != gbl.tickOffset: + error("Previous line did not end with '~'") + else: + offset = self.endTilde[0] + else: + offset = 0 + lastOffset = None + # Strip off trailing ~ - # Begin parse loop + if pat[-1].endswith("~"): + self.endTilde = [1, gbl.tickOffset + (gbl.BperQ * gbl.QperBar) ] + pat[-1]=pat[-1][:-1] + else: + self.endTilde = [] - for a in pat: - if a == '<>': - continue - if offset >= barEnd: - error("Attempt to start Solo note '%s' after end of bar." % a) + # Begin parse loop - # strip out all '' setting and adjust velocity + for a in pat: + if a == '<>': + continue - a, vls = pextract(a, "<", ">") - if vls: - if len(vls) > 1: - error("Only 1 volume string is permitted per note-set") + if offset >= barEnd: + error("Attempt to start Solo note '%s' after end of bar" % a) - vls = vls[0].upper().strip() - if not vls in MMA.volume.vols: - error("%s string Expecting a valid volume, not '%s'" % \ - (self.name, vls)) - velocity *= MMA.volume.vols[vls] + # strip out all '' setting and adjust velocity + a, vls = pextract(a, "<", ">") + if vls: + if len(vls) > 1: + error("Only 1 volume string is permitted per note-set") - """ Split the chord chunk into a note length and notes. Each - part of this is optional and defaults to the previously - parsed value. - """ + vls = vls[0].upper().strip() + if not vls in MMA.volume.vols: + error("%s string Expecting a valid volume, not '%s'" % \ + (self.name, vls)) + velocity *= MMA.volume.vols[vls] - i = 0 - while i < len(a): - if not a[i] in '1234568.+': - break - else: - i+=1 - if i: - l=getNoteLen(a[0:i]) - c=a[i:] - else: - l=length - c=a + """ Split the chord chunk into a note length and notes. Each + part of this is optional and defaults to the previously + parsed value. + """ - if not c: - c=lastc - if not c: - error("You must specify the first note in a solo line") + i = 0 + while i < len(a): + if not a[i] in '1234568.+': + break + else: + i+=1 - length = l # set defaults for next loop - lastc = c + if i: + l=getNoteLen(a[0:i]) + c=a[i:] + else: + l=length + c=a + if not c: + c=lastc + if not c: + error("You must specify the first note in a solo line") - """ 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 - a series of '+'s or '-'s. Drum solos must have each - note separated by ','s: "Snare1,Kick1,44". - """ + length = l # set defaults for next loop + lastc = c - if isdrum: - c=c.split(',') - else: - c=list(c) - while 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 + a series of '+'s or '-'s. Drum solos must have each + note separated by ','s: "Snare1,Kick1,44". + """ - # Parse off note name or 'r' for a rest + if isdrum: + c=c.split(',') + else: + c=list(c) - name = c.pop(0) + while c: - if name == 'r' and (offset in notes or c): - error("You cannot combine a rest with a note in " - "a chord for solos.") + # Parse off note name or 'r' for a rest + name = c.pop(0) - if not isdrum: - if not name in midiNotes: - error("%s encountered illegal note name '%s'." - % (self.name, name)) + if name == 'r' and (offset in notes or c): + error("You cannot combine a rest with a note in a chord for solos") - v = midiNotes[ name ] - # Parse out a "#', '&' or 'n' accidental. + if not isdrum: + if not name in midiNotes: + error("%s encountered illegal note name '%s'" + % (self.name, name)) - if c and c[0]=='#': - c.pop(0) - acc[name] = 1 + v = midiNotes[ name ] - elif c and c[0]=='&': - c.pop(0) - acc[name] = -1 + # Parse out a "#', '&' or 'n' accidental. - elif c and c[0]=='n': - c.pop(0) - acc[name] = 0 + if c and c[0]=='#': + c.pop(0) + acc[name] = 1 - if v != None: - v += acc[name] + elif c and c[0]=='&': + c.pop(0) + acc[name] = -1 - # Parse out +/- (or series) for octave + elif c and c[0]=='n': + c.pop(0) + acc[name] = 0 - if c and c[0] == '+': - while c and c[0] == '+': - c.pop(0) - v += 12 - elif c and c[0] == '-': - while c and c[0] == '-': - c.pop(0) - v -= 12 + if v != None: + v += acc[name] - else: - if not name: # just for leading '.'s - continue - if name == 'r': - v = midiNotes[ name ] - elif name == '*': - v = self.drumTone - else: - v = MMA.translate.dtable.get(name) + # Parse out +/- (or series) for octave + if c and c[0] == '+': + while c and c[0] == '+': + c.pop(0) + v += 12 + elif c and c[0] == '-': + while c and c[0] == '-': + c.pop(0) + v -= 12 - """ Swingmode -- This tests for successive 8ths on/off beat - If found, the first is converted to 'long' 8th, the 2nd to a 'short' - and the offset for the 2nd is adjusted to comp. for the 'long'. - """ + else: + if not name: # just for leading '.'s + continue + if name == 'r': + v = midiNotes[ name ] + elif name == '*': + v = self.drumTone + else: + v = MMA.translate.dtable.get(name) - if gbl.swingMode and l==len8 and \ - offset in offBeats and \ - lastOffset in onBeats and \ - lastOffset in notes: - if notes[lastOffset].dur == len8: - offset = lastOffset + len81 - notes[lastOffset].dur = len81 - l=len82 + """ Swingmode -- This tests for successive 8ths on/off beat + If found, the first is converted to 'long' 8th, the 2nd to a 'short' + and the offset for the 2nd is adjusted to comp. for the 'long'. + """ - # create a new note[] entry for this offset + if gbl.swingMode and l==len8 and \ + offset in offBeats and \ + lastOffset in onBeats and \ + lastOffset in notes: + if notes[lastOffset].dur == len8: + offset = lastOffset + len81 + notes[lastOffset].dur = len81 + l=len82 - if not offset in notes: - notes[offset] = NoteList(l) - # add note event to note[] array + # create a new note[] entry for this offset - notes[offset].nl.append(v) - notes[offset].velocity.append(self.adjustVolume(velocity, offset)) + if not offset in notes: + notes[offset] = NoteList(l) - """ Do harmony. This is done for each chord as they are - parsed out. So, after parsing out the "16g" from the solo - string "4a;16g;4c;" we add the harmony notes to the 'g' note. + # add note event to note[] array - The chord is not processed if this is a "drum-type", if there is - more than one note in the chord (we assume user harmony), - if the chord for the current beat is a 'z', or if the note - is a 'rest' (note==None). - """ + notes[offset].nl.append(v) + notes[offset].velocity.append(self.adjustVolume(velocity, offset)) - if harmony and offset in notes and not isdrum: - nn=notes[offset] + notes[offset].defaultVel = velocity # needed for addHarmony() - if len(nn.nl) == 1 and nn.nl[0] != None: - tb = self.getChordInPos(offset, ctable) + lastOffset = offset + offset += l - if not tb.chordZ: - h = harmonize(harmony, nn.nl[0], tb.chord.bnoteList) + if offset <= barEnd: + if self.endTilde: + error("Tilde at end of bar has no effect") - """ If harmonyonly set then drop note, substitute harmony, - else append harmony notes to chord. - """ + else: + if self.endTilde: + self.endTilde[0]=offset-barEnd + else: + warning("%s, end of last note overlaps end of bar by %2.3f " + "beat(s)." % (self.name, (offset-barEnd)/float(gbl.BperQ))) - for i in range(len(h)): - nn.velocity.append(self.adjustVolume(velocity * - self.harmonyVolume[sc], offset)) + return notes - if harmOnly: - nn.nl = h - else: - nn.nl.extend(h) - lastOffset = offset - offset += l + def addHarmony(self, notes, ctable): + """ Add harmony to solo notes. """ + sc=self.seq - if offset <= barEnd: - if self.endTilde: - error("Tilde at end of bar has no effect.") + harmony = self.harmony[sc] + harmOnly = self.harmonyOnly[sc] + + + for offset in notes: + nn = notes[offset] + + if len(nn.nl) == 1 and nn.nl[0] != None: + tb = self.getChordInPos(offset, ctable) + + if tb.chordZ: + continue - else: - if self.endTilde: - self.endTilde[0]=offset-barEnd - else: - warning("%s, end of last note overlaps end of bar by %2.3f " - "beat(s)." % (self.name, (offset-barEnd)/float(gbl.BperQ))) + h = harmonize(harmony, nn.nl[0], tb.chord.bnoteList) - return notes + """ If harmonyonly set then drop note, substitute harmony, + else append harmony notes to chord. + """ + + if harmOnly: + nn.nl = h + nn.velocity = [] + off=0 + else: + nn.nl.extend(h) + off=1 + # Create velocites for harmony note(s) - def trackBar(self, pat, ctable): - """ Do the solo/melody line. Called from self.bar() """ + for i in range(off,len(nn.nl)): + nn.velocity.append(self.adjustVolume(nn.defaultVel * + self.harmonyVolume[sc], offset)) - notes = self.getLine(pat, ctable) + return notes - """ The notes structure is a dictionary. Each key represents an offset - in MIDI ticks in the current bar. The data for each entry is an array - of notes, a duration and velocity: - notes[offset].dur - duration in ticks - notes[offset].velocity[] - velocity for notes - notes[offset].nl[] - list of notes (if the only note value is None - this is a rest placeholder) - """ + def trackBar(self, pat, ctable): + """ Do the solo/melody line. Called from self.bar() """ - sc=self.seq - unify = self.unify[sc] + notes = self.getLine(pat, ctable) - rptr = self.mallet + if self.harmony[self.seq] and not self.drumType: + self.addHarmony(notes, ctable) - for offset in sorted(notes.keys()): - nn=notes[offset] + sc=self.seq + unify = self.unify[sc] - for n,v in zip(nn.nl, nn.velocity): - if n == None: # skip rests - continue + rptr = self.mallet - if not self.drumType: # octave, transpose - n = self.adjustNote(n) + for offset in sorted(notes.keys()): + nn=notes[offset] - self.sendNote( offset, self.getDur(nn.dur), n, v) + for n,v in zip(nn.nl, nn.velocity): + if n == None: # skip rests + continue + + if not self.drumType: # octave, transpose + n = self.adjustNote(n) + + self.sendNote( offset, self.getDur(nn.dur), n, v) class Solo(Melody): - """ Pattern class for a solo track. """ + """ Pattern class for a solo track. """ - vtype = 'SOLO' + vtype = 'SOLO' - # Grooves are not saved/restored for solo tracks. + # Grooves are not saved/restored for solo tracks. - def restoreGroove(self, gname): - self.setSeqSize() + def restoreGroove(self, gname): + self.setSeqSize() - def saveGroove(self, gname): - pass + def saveGroove(self, gname): + pass ################################## """ Keysignature. This is only used in the solo/melody tracks so it probably makes sense to have the parse routine here as well. To - contain everything in one location we make a single instance class - of the whole mess. + contain everything in one location we make a single instance class + of the whole mess. """ class KeySig: - def __init__(self): - self.kSig = 0 + def __init__(self): + self.kSig = 0 - majKy = { "C" : 0, "G" : 1, "D" : 2, - "A" : 3, "E" : 4, "B" : 5, - "F#": 6, "C#": 7, "F" : -1, - "Bb": -2, "Eb": -3, "Ab": -4, - "Db": -5, "Gb": -6, "Cb": -7 } + majKy = { "C" : 0, "G" : 1, "D" : 2, + "A" : 3, "E" : 4, "B" : 5, + "F#": 6, "C#": 7, "F" : -1, + "Bb": -2, "Eb": -3, "Ab": -4, + "Db": -5, "Gb": -6, "Cb": -7 } - minKy = { "A" : 0, "E" : 1, "B" : 2, - "F#": 3, "C#": 4, "G#": 5, - "D#": 6, "A#": 7, "D" : -1, - "G" : -2, "C" : -3, "F" : -4, - "Bb": -5, "Eb": -6, "Ab": -7 } + minKy = { "A" : 0, "E" : 1, "B" : 2, + "F#": 3, "C#": 4, "G#": 5, + "D#": 6, "A#": 7, "D" : -1, + "G" : -2, "C" : -3, "F" : -4, + "Bb": -5, "Eb": -6, "Ab": -7 } - def set(self,ln): - """ Set the keysignature. Used by solo tracks.""" + def set(self,ln): + """ Set the keysignature. Used by solo tracks.""" - mi = 0 + mi = 0 - if len(ln) < 1 or len(ln) > 2: - error("KeySig only takes 1 or 2 arguments.") + if len(ln) < 1 or len(ln) > 2: + error("KeySig only takes 1 or 2 arguments") - if len(ln) == 2: - l=ln[1][0:3].upper() - if l == 'MIN': - mi=1 - elif l == 'MAJ': - mi=0 - else: - error("KeySig 2nd arg must be 'Major' or 'Minor', not '%s'" % ln[1]) + if len(ln) == 2: + l=ln[1][0:3].upper() + if l == 'MIN': + mi=1 + elif l == 'MAJ': + mi=0 + else: + error("KeySig 2nd arg must be 'Major' or 'Minor', not '%s'" % ln[1]) - l=ln[0] + l=ln[0] - t=l[0].upper() + l[1:] + t=l[0].upper() + l[1:] - if mi and t in self.minKy: - self.kSig = self.minKy[t] - elif not mi and t in self.majKy: - self.kSig = self.majKy[t] - elif l[0] in "ABCDEFG": - error("There is no key signature name: '%s'" % l) + if mi and t in self.minKy: + self.kSig = self.minKy[t] + elif not mi and t in self.majKy: + self.kSig = self.majKy[t] + elif l[0] in "ABCDEFG": + error("There is no key signature name: '%s'" % l) - else: - c=l[0] - f=l[1].upper() + else: + c=l[0] + f=l[1].upper() - if not f in ("B", "&", "#"): - error("2nd char in KeySig must be 'b' or '#', not '%s'" % f) + if not f in ("B", "&", "#"): + error("2nd char in KeySig must be 'b' or '#', not '%s'" % f) - if not c in "01234567": - error("1st char in KeySig must be digit 0..7, not '%s'" % c) + if not c in "01234567": + error("1st char in KeySig must be digit 0..7, not '%s'" % c) - self.kSig = int(c) + self.kSig = int(c) - if f in ('B', '&'): - self.kSig = -self.kSig + if f in ('B', '&'): + self.kSig = -self.kSig - if not c in "01234567": - error("1st char in KeySig must be digit 0..7, not '%s'" % c) + if not c in "01234567": + error("1st char in KeySig must be digit 0..7, not '%s'" % c) - # Set the midi meta track with the keysig. This doen't do anything - # in the playback, but other programs may use it. + # Set the midi meta track with the keysig. This doen't do anything + # in the playback, but other programs may use it. - n = self.kSig - if n < 0: - n = 256 + n + n = self.kSig + if n < 0: + n = 256 + n - gbl.mtrks[0].addKeySig(gbl.tickOffset, n, mi) + gbl.mtrks[0].addKeySig(gbl.tickOffset, n, mi) - if gbl.debug: - n = self.kSig - if n >= 0: - f = "Sharps" - else: - f = "Flats" + if gbl.debug: + n = self.kSig + if n >= 0: + f = "Sharps" + else: + f = "Flats" - print "KeySig set to %s %s" % (abs(n), f) + print "KeySig set to %s %s" % (abs(n), f) - def getAcc(self): - """ The solo parser needs to know which notes are accidentals. - This is simple with a keysig table. There is an entry for each note, - either -1,0,1 corresponding to flat,natural,sharp. We populate - the table for each bar from the keysig value. As we process - the bar data we update the table. There is one flaw here---in - real music an accidental for a note in a give octave does not - effect the following same-named notes in different octaves. - In this routine IT DOES. + def getAcc(self): + """ The solo parser needs to know which notes are accidentals. + This is simple with a keysig table. There is an entry for each note, + either -1,0,1 corresponding to flat,natural,sharp. We populate + the table for each bar from the keysig value. As we process + the bar data we update the table. There is one flaw here---in + real music an accidental for a note in a give octave does not + effect the following same-named notes in different octaves. + In this routine IT DOES. - NOTE: This is recreated for each bar of music for each solo/melody track. - """ + NOTE: This is recreated for each bar of music for each solo/melody track. + """ - acc = {'a':0, 'b':0, 'c':0, 'd':0, 'e':0, 'f':0, 'g':0 } - ks=self.kSig + acc = {'a':0, 'b':0, 'c':0, 'd':0, 'e':0, 'f':0, 'g':0 } + ks=self.kSig - if ks < 0: - for a in range( abs(ks) ): - acc[ ['b','e','a','d','g','c','f'][a] ] = -1 + if ks < 0: + for a in range( abs(ks) ): + acc[ ['b','e','a','d','g','c','f'][a] ] = -1 - else: - for a in range(ks): - acc[ ['f','c','g','d','a','e','b'][a] ] = 1 + else: + for a in range(ks): + acc[ ['f','c','g','d','a','e','b'][a] ] = 1 - return acc + return acc keySig=KeySig() # single instance + ####################### """ When solos are included in a chord/data line they are @@ -539,83 +551,83 @@ autoSoloTracks = [ 'SOLO', 'SOLO-1', 'SOLO-2', 'SOLO-3' ] def setAutoSolo(ln): - """ Set the order and names of tracks to use when assigning - automatic solos (specified on chord lines in {}s). - """ + """ Set the order and names of tracks to use when assigning + automatic solos (specified on chord lines in {}s). + """ - global autoSoloTracks + global autoSoloTracks - if not len(ln): - error("You must specify at least one track for autosolos.") + if not len(ln): + error("You must specify at least one track for autosolos") - autoSoloTracks = [] - for n in ln: - n=n.upper() - MMA.alloc.trackAlloc(n, 1) - if gbl.tnames[n].vtype not in ('MELODY', 'SOLO'): - error("All autotracks must be Melody or Solo tracks, " - "not %s." % gbl.tnames[n].vtype) + autoSoloTracks = [] + for n in ln: + n=n.upper() + MMA.alloc.trackAlloc(n, 1) + if gbl.tnames[n].vtype not in ('MELODY', 'SOLO'): + error("All autotracks must be Melody or Solo tracks, not %s" % gbl.tnames[n].vtype) - autoSoloTracks.append(n) + autoSoloTracks.append(n) - if gbl.debug: - print "AutoSolo track names:", - for a in autoSoloTracks: - print a, - print + if gbl.debug: + print "AutoSolo track names:", + for a in autoSoloTracks: + print a, + print ############### + def extractSolo(ln, rptcount): - """ Parser calls this to extract solo strings. """ + """ Parser calls this to extract solo strings. """ - a = ln.count('{') - b = ln.count('}') + a = ln.count('{') + b = ln.count('}') - if a != b: - error("Mismatched {}s for solo found in chord line.") + if a != b: + error("Mismatched {}s for solo found in chord line") - if a: - if rptcount > 1: - error("Bars with both repeat count and solos are not permitted.") + if a: + if rptcount > 1: + error("Bars with both repeat count and solos are not permitted") - ln, solo = pextract(ln, '{', '}') + ln, solo = pextract(ln, '{', '}') - if len(solo) > len(autoSoloTracks): - error("Too many melody/solo riffs in chord line. %s used, " - "only %s defined." % (len(solo), len(autoSoloTracks)) ) + if len(solo) > len(autoSoloTracks): + error("Too many melody/solo riffs in chord line. %s used, " + "only %s defined" % (len(solo), len(autoSoloTracks)) ) - firstSolo = solo[0][:] # save for autoharmony tracks + firstSolo = solo[0][:] # save for autoharmony tracks - """ We have the solo information. Now we loop though each "solo" and: - 1. Ensure or Create a MMA track for the solo - 2. Push the solo data into a Riff for the given track. - """ - - for s, trk in zip(solo, autoSoloTracks): - MMA.alloc.trackAlloc(trk, 1) - gbl.tnames[trk].setRiff( s.strip() ) - - - """ After all the solo data is interpreted and sent to the - correct track, we check any leftover tracks. If any of these - tracks are empty of data AND are harmonyonly the note - data from the first track is interpeted again for that - track. Tricky: the max() is needed since harmonyonly can - have different setting for each bar...this way - the copy is done if ANY bar in the seq has harmonyonly set. + """ We have the solo information. Now we loop though each "solo" and: + 1. Ensure or Create a MMA track for the solo + 2. Push the solo data into a Riff for the given track. """ - for t in autoSoloTracks[1:]: - if gbl.tnames.has_key(t) and gbl.tnames[t].riff == [] \ - and max(gbl.tnames[t].harmonyOnly): - gbl.tnames[t].setRiff( firstSolo[:] ) + for s, trk in zip(solo, autoSoloTracks): + MMA.alloc.trackAlloc(trk, 1) + gbl.tnames[trk].setRiff( s.strip() ) - if gbl.debug: - print "%s duplicated to %s for HarmonyOnly." % (trk, t) - return ln + """ After all the solo data is interpreted and sent to the + correct track, we check any leftover tracks. If any of these + tracks are empty of data AND are harmonyonly the note + data from the first track is interpeted again for that + track. Tricky: the max() is needed since harmonyonly can + have different setting for each bar...this way + the copy is done if ANY bar in the seq has harmonyonly set. + """ + + for t in autoSoloTracks[1:]: + if gbl.tnames.has_key(t) and gbl.tnames[t].riff == [] \ + and max(gbl.tnames[t].harmonyOnly): + gbl.tnames[t].setRiff( firstSolo[:] ) + + if gbl.debug: + print "%s duplicated to %s for HarmonyOnly." % (trk, t) + + return ln diff --git a/mma/MMA/patWalk.py b/mma/MMA/patWalk.py index d026930..63fe4dc 100644 --- a/mma/MMA/patWalk.py +++ b/mma/MMA/patWalk.py @@ -2,7 +2,7 @@ # patWalk.py """ -This module is an integeral part of the program +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 @@ -19,8 +19,8 @@ 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 - +Bob van der Poel + """ @@ -34,131 +34,131 @@ from MMA.pat import PC class Walk(PC): - """ Pattern class for a walking bass track. """ + """ Pattern class for a walking bass track. """ - vtype = 'WALK' - walkChoice = 0 - - def getPgroup(self, ev): - """ Get group for walking bass pattern. - - Fields - start, length, volume - """ + vtype = 'WALK' + walkChoice = 0 - if len(ev) != 3: - error("There must be at exactly 3 items in each group in " - "a Walking Bass definition, not <%s>." % ' '.join(ev)) + def getPgroup(self, ev): + """ Get group for walking bass pattern. - a = struct() - - a.offset = self.setBarOffset(ev[0]) - a.duration = getNoteLen(ev[1]) - a.vol = stoi(ev[2], "Type error in Walking Bass definition") + Fields - start, length, volume + """ - return a - + if len(ev) != 3: + error("There must be at exactly 3 items in each group in " + "a Walking Bass definition, not <%s>" % ' '.join(ev)) - def restart(self): - self.ssvoice = -1 - self.walkChoice = 0 - - - def trackBar(self, pattern, ctable): - """ Do a waling bass bar. - - Called from self.bar() - - """ + a = struct() - sc=self.seq - dir = self.direction[sc] - unify = self.unify[sc] - - for p in pattern: - - tb = self.getChordInPos(p.offset, ctable) - - if tb.walkZ: - continue - - root = tb.chord.rootNote # root note of chord + a.offset = self.setBarOffset(ev[0]) + a.duration = getNoteLen(ev[1]) + a.vol = stoi(ev[2], "Type error in Walking Bass definition") - """ Create a note list from the current scale. We do - this for each beat, but it's pretty fast. The note - list is simply notes 0..6 of the scale PLUS notes - 1..5 reversed. So, a Cmajor chord would result in - the note list (0,2,4,5,7,9,7,5,4,2). - - Note that we deliberately skip the 7th. Too often - the chord is a Major but the melody note will be - the dom. 7th and the M7 will sound off. So, just - err on the side of caution. - - If DIR is UP or DOWN we don't append the 2nd half - of the scale. - - If DIR is DOWN we reverse the order as well. - """ - - wNotes = list(tb.chord.scaleList[0:6]) - if dir not in ('UP', 'DOWN'): - b = list(tb.chord.scaleList[1:5]) - b.reverse() - wNotes += b - - if dir == 'DOWN': - wNotes.reverse() - - - # Ensure that the offset is in range. - - if self.walkChoice >= len(wNotes) or self.walkChoice < 0: - self.walkChoice = 0 - - """ Even with a walking bass it's nice to have the chord root on - beat 1 ... not all the time, but most. This bit of code ensures - that more that 50% of beat ones will have the root. - """ - - - if p.offset == 0 and random.choice((0,1)): - self.walkChoice=0 - - note = wNotes[self.walkChoice] - - """ Adjust offset for NEXT TIME. If the direction is - up/down we just increment the pointer. If we have - direction set to RANDOM then we select either -1, - 0 or 1 with equal change for moving up, down or - not-at-all. With BOTH we have a preference to move up. - """ - - - if dir in ('UP', 'DOWN'): - self.walkChoice += 1 - elif dir == 'RANDOM': - self.walkChoice += random.choice((0,1,-1)) - else: # BOTH - self.walkChoice += random.choice( (-1,0,0,2,2,1,1,1,1,1,1,1)) - - - if not self.harmonyOnly[sc]: - self.sendNote( - p.offset, - self.getDur(p.duration), - self.adjustNote(note), - self.adjustVolume(p.vol, p.offset) ) + return a - if self.harmony[sc]: - ch = self.getChordInPos(p.offset, ctable).chord.noteList - h = harmonize(self.harmony[sc], note, ch) - for n in h: - self.sendNote( - p.offset, - self.getDur(p.duration), - self.adjustNote(n), - self.adjustVolume(p.vol * self.harmonyVolume[sc], -1) ) + def restart(self): + self.ssvoice = -1 + self.walkChoice = 0 + + + def trackBar(self, pattern, ctable): + """ Do a waling bass bar. + + Called from self.bar() + + """ + + sc=self.seq + dir = self.direction[sc] + unify = self.unify[sc] + + for p in pattern: + + tb = self.getChordInPos(p.offset, ctable) + + if tb.walkZ: + continue + + root = tb.chord.rootNote # root note of chord + + """ Create a note list from the current scale. We do + this for each beat, but it's pretty fast. The note + list is simply notes 0..6 of the scale PLUS notes + 1..5 reversed. So, a Cmajor chord would result in + the note list (0,2,4,5,7,9,7,5,4,2). + + Note that we deliberately skip the 7th. Too often + the chord is a Major but the melody note will be + the dom. 7th and the M7 will sound off. So, just + err on the side of caution. + + If DIR is UP or DOWN we don't append the 2nd half + of the scale. + + If DIR is DOWN we reverse the order as well. + """ + + wNotes = list(tb.chord.scaleList[0:6]) + if dir not in ('UP', 'DOWN'): + b = list(tb.chord.scaleList[1:5]) + b.reverse() + wNotes += b + + if dir == 'DOWN': + wNotes.reverse() + + + # Ensure that the offset is in range. + + if self.walkChoice >= len(wNotes) or self.walkChoice < 0: + self.walkChoice = 0 + + """ Even with a walking bass it's nice to have the chord root on + beat 1 ... not all the time, but most. This bit of code ensures + that more that 50% of beat ones will have the root. + """ + + + if p.offset == 0 and random.choice((0,1)): + self.walkChoice=0 + + note = wNotes[self.walkChoice] + + """ Adjust offset for NEXT TIME. If the direction is + up/down we just increment the pointer. If we have + direction set to RANDOM then we select either -1, + 0 or 1 with equal change for moving up, down or + not-at-all. With BOTH we have a preference to move up. + """ + + + if dir in ('UP', 'DOWN'): + self.walkChoice += 1 + elif dir == 'RANDOM': + self.walkChoice += random.choice((0,1,-1)) + else: # BOTH + self.walkChoice += random.choice( (-1,0,0,2,2,1,1,1,1,1,1,1)) + + + if not self.harmonyOnly[sc]: + self.sendNote( + p.offset, + self.getDur(p.duration), + self.adjustNote(note), + self.adjustVolume(p.vol, p.offset) ) + + + if self.harmony[sc]: + ch = self.getChordInPos(p.offset, ctable).chord.noteList + h = harmonize(self.harmony[sc], note, ch) + for n in h: + self.sendNote( + p.offset, + self.getDur(p.duration), + self.adjustNote(n), + self.adjustVolume(p.vol * self.harmonyVolume[sc], -1) ) diff --git a/mma/MMA/translate.py b/mma/MMA/translate.py index e1d3ffc..7f4534a 100644 --- a/mma/MMA/translate.py +++ b/mma/MMA/translate.py @@ -19,7 +19,7 @@ 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 +Bob van der Poel This module handles voice name translations. @@ -32,114 +32,116 @@ 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. """ + from the VOICE command. If a translation exists the translation is + substituted. +""" class Vtable: - def __init__(self): - self.table = {} + def __init__(self): + self.table = {} - def retlist(self): + def retlist(self): - l=[] - for n in sorted(self.table.keys()): - l.append("%s=%s" % (n.title(), self.table[n])) + l=[] + for n in sorted(self.table.keys()): + l.append("%s=%s" % (n.title(), self.table[n])) - return ' '.join(l) + return ' '.join(l) - def set(self, ln): - """ Set a name/alias for voice translation, called from parser. """ + def set(self, ln): + """ Set a name/alias for voice translation, called from parser. """ - if not ln: - self.table = {} - if gbl.debug: - print "Voice Translaion table reset." + if not ln: + self.table = {} + if gbl.debug: + print "Voice Translaion table reset." - return + return - for l in ln: - l=l.upper() - if l.count('=') != 1: - error("Each translation pair must be in the format Voice=Alias") - v,a = l.split('=') - self.table[v] = a + for l in ln: + l=l.upper() + if l.count('=') != 1: + error("Each translation pair must be in the format Voice=Alias") + v,a = l.split('=') + self.table[v] = a - if gbl.debug: - print "Voice Translations: ", - for l in ln: - print l, - print + if gbl.debug: + print "Voice Translations: ", + for l in ln: + print l, + print - def get(self, name): - """ Return a translation or original. """ + def get(self, name): + """ Return a translation or original. """ - name=name.upper() - if self.table.has_key(name): - return self.table[name] + name=name.upper() + if self.table.has_key(name): + return self.table[name] - else: - return name + else: + return name -vtable=Vtable() # Create single class instance. +vtable=Vtable() # Create single class instance. """ This is just like the Vtable, but it is used for DRUM TONES. We use -this translation when a TONE is set for a drum in setTone() and when a -tone is selected in a Solo/Melody DRUM track. """ + this translation when a TONE is set for a drum in setTone() and when a + tone is selected in a Solo/Melody DRUM track. +""" class Dtable: - def __init__(self): - self.table = {} + def __init__(self): + self.table = {} - def retlist(self): + def retlist(self): - l=[] - for n in sorted(self.table.keys()): - l.append("%s=%s" % ( MMA.midiC.valueToDrum(n), - MMA.midiC.valueToDrum(self.table[n]))) + l=[] + for n in sorted(self.table.keys()): + l.append("%s=%s" % ( MMA.midiC.valueToDrum(n), + MMA.midiC.valueToDrum(self.table[n]))) - return ' '.join(l) + return ' '.join(l) - def set(self, ln): - """ Set a name/alias for drum tone translation, called from parser. """ + def set(self, ln): + """ Set a name/alias for drum tone translation, called from parser. """ - if not ln: - self.table = {} - if gbl.debug: - print "DrumTone Translaion table reset." + if not ln: + self.table = {} + if gbl.debug: + print "DrumTone Translaion table reset." - return + return - for l in ln: - l=l.upper() - if l.count('=') != 1: - error("Each translation pair must be in the format Voice=Alias") - v,a = l.split('=') + for l in ln: + l=l.upper() + if l.count('=') != 1: + 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) + v=MMA.midiC.drumToValue(v) + a=MMA.midiC.drumToValue(a) - self.table[v] = a - if gbl.debug: - print "DrumTone Translation: %s=%s" % \ - (MMA.midiC.valueToDrum(v), MMA.midiC.valueToDrum(a)) + self.table[v] = a + 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. """ + def get(self, name): + """ Return a translation or original. """ - v=MMA.midiC.drumToValue(name) + v=MMA.midiC.drumToValue(name) - if self.table.has_key(v): - return self.table[v] + if self.table.has_key(v): + return self.table[v] - else: - return v + else: + return v @@ -147,105 +149,106 @@ dtable=Dtable() """ Volume adjustment. Again, similar to voice/tone translations, -but this is for the volume. The table creates a percentage adjustment -for tones/voices specified. When a TRACK VOLUME is set in -MMApat.setVolume() the routine checks here for an adjustment. """ + but this is for the volume. The table creates a percentage adjustment + for tones/voices specified. When a TRACK VOLUME is set in + MMApat.setVolume() the routine checks here for an adjustment. +""" class VoiceVolTable: - def __init__(self): - self.table = {} + def __init__(self): + self.table = {} - def retlist(self): - l=[] - for n in sorted(self.table.keys()): - l.append("%s=%s" % ( MMA.midiC.valueToInst(n), self.table[n])) + def retlist(self): + l=[] + for n in sorted(self.table.keys()): + l.append("%s=%s" % ( MMA.midiC.valueToInst(n), self.table[n])) - return ' '.join(l) + return ' '.join(l) - def set(self, ln): - """ Set a name/alias for voice volume adjustment, called from parser. """ + def set(self, ln): + """ Set a name/alias for voice volume adjustment, called from parser. """ - if not ln: - self.table = {} - if gbl.debug: - print "Voice Volume Adjustment table reset." + if not ln: + self.table = {} + if gbl.debug: + print "Voice Volume Adjustment table reset." - return + return - for l in ln: - l=l.upper() - if l.count('=') != 1: - error("Each translation pair must be in the format Voice=Ajustment") - v,a = l.split('=') + for l in ln: + l=l.upper() + if l.count('=') != 1: + error("Each translation pair must be in the format Voice=Ajustment") + v,a = l.split('=') - v=MMA.midiC.instToValue(v) - a=stoi(a) - if a<1 or a>200: - error("Voice volume adjustments must be in range 1 to 200, not %." % a) - self.table[v] = a/100. - if gbl.debug: - print "Voice Volume Adjustment: %s=%s" % (MMA.midiC.valueToInst(v), a) + v=MMA.midiC.instToValue(v) + a=stoi(a) + if a<1 or a>200: + error("Voice volume adjustments must be in range 1 to 200, not %s" % a) + self.table[v] = a/100. + if gbl.debug: + print "Voice Volume Adjustment: %s=%s" % (MMA.midiC.valueToInst(v), a) - def get(self, v, vol): - """ Return an adjusted value or original. """ + def get(self, v, vol): + """ Return an adjusted value or original. """ - if self.table.has_key(v): - vol = int(vol * self.table[v]) + if self.table.has_key(v): + vol = int(vol * self.table[v]) - return vol + return vol voiceVolTable=VoiceVolTable() class DrumVolTable: - def __init__(self): - self.table = {} + def __init__(self): + self.table = {} - def retlist(self): + def retlist(self): - l=[] - for n in sorted(self.table.keys()): - l.append("%s=%s" % ( MMA.midiC.valueToDrum(n), self.table[n])) + l=[] + for n in sorted(self.table.keys()): + l.append("%s=%s" % ( MMA.midiC.valueToDrum(n), self.table[n])) - return ' '.join(l) + return ' '.join(l) - def set(self, ln): - """ Set a name/alias for voice volume adjustment, called from parser. """ + def set(self, ln): + """ Set a name/alias for voice volume adjustment, called from parser. """ - if not ln: - self.table = {} - if gbl.debug: - print "Drum Volume Adjustment table reset." + if not ln: + self.table = {} + if gbl.debug: + print "Drum Volume Adjustment table reset." - return + return - for l in ln: - l=l.upper() - if l.count('=') != 1: - error("Each translation pair must be in the format Drum=Ajustment") - v,a = l.split('=') + for l in ln: + l=l.upper() + if l.count('=') != 1: + error("Each translation pair must be in the format Drum=Ajustment") + v,a = l.split('=') - v=MMA.midiC.instToValue(v) - a=stoi(a) - if a<1 or a>200: - error("Drum volume adjustments must be in range 1 to 200, not %." % a) - self.table[v] = a/100. - if gbl.debug: - print "Drum Volume Adjustment: %s=%s" % (MMA.midiC.valueToDrum(v), a) + v=MMA.midiC.instToValue(v) + a=stoi(a) + if a<1 or a>200: + error("Drum volume adjustments must be in range 1 to 200, not %s" % a) + self.table[v] = a/100. + if gbl.debug: + print "Drum Volume Adjustment: %s=%s" % (MMA.midiC.valueToDrum(v), a) - def get(self, v, vol): - """ Return an adjusted value or original. """ + def get(self, v, vol): + """ Return an adjusted value or original. """ - if self.table.has_key(v): - vol = int(vol * self.table[v]) + if self.table.has_key(v): + vol = int(vol * self.table[v]) - return vol + return vol drumVolTable=DrumVolTable() diff --git a/mma/MMA/volume.py b/mma/MMA/volume.py index 7a90c8b..3b3dbda 100644 --- a/mma/MMA/volume.py +++ b/mma/MMA/volume.py @@ -2,7 +2,7 @@ # volume.py """ -This module is an integeral part of the program +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 @@ -19,8 +19,8 @@ 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 - +Bob van der Poel + """ from MMA.common import * @@ -28,20 +28,20 @@ from MMA.common import * """ Volumes are specified in musical terms, but converted to midi velocities. This table has a list of percentage changes - to apply to the current volume. Used in both track and global - situations. Note that the volume for 'ffff' is 200%--this will - most likely generate velocities outside the midi range of 0..127. - But that's fine since mma will adjust volumes into the valid - range. Using very high percentages will ensure that 'ffff' notes - are (most likely) sounded with a maximum velocity. + to apply to the current volume. Used in both track and global + situations. Note that the volume for 'ffff' is 200%--this will + most likely generate velocities outside the midi range of 0..127. + But that's fine since mma will adjust volumes into the valid + range. Using very high percentages will ensure that 'ffff' notes + are (most likely) sounded with a maximum velocity. """ vols={ 'OFF': 0.00, 'PPPP': 0.05, 'PPP': 0.10, 'PP': 0.25, 'P': 0.40, 'MP': 0.70, - 'M': 1.00, 'MF': 1.10, 'F': 1.30, - 'FF': 1.60, 'FFF': 1.80, 'FFFF': 2.00 } + 'M': 1.00, 'MF': 1.10, 'F': 1.30, + 'FF': 1.60, 'FFF': 1.80, 'FFFF': 2.00 } -volume = vols['M'] # default global volume +volume = vols['M'] # default global volume lastVolume = volume futureVol = [] vTRatio = .6 @@ -49,158 +49,160 @@ vMRatio = 1-vTRatio def adjvolume(ln): - """ Adjust the ratio used in the volume table and track/global ratio. """ + """ Adjust the ratio used in the volume table and track/global ratio. """ - global vols, vTRatio, vMRatio - - if not ln: - error("Use: AdjustVolume DYN=RATIO [..].") + global vols, vTRatio, vMRatio - for l in ln: + if not ln: + error("Use: AdjustVolume DYN=RATIO [..]") - try: - v,r = l.split('=') - except: - error("AdjustVolume expecting DYN=RATIO pair, not '%s'." % l) - - v=v.upper() + for l in ln: - if v == 'RATIO': + try: + v,r = l.split('=') + except: + error("AdjustVolume expecting DYN=RATIO pair, not '%s'" % l) - r=stof(r) + v=v.upper() - if r<0 or r>100: - error("VolumeRatio must be value 0 to 100.") + if v == 'RATIO': - vTRatio = r/100 - vMRatio = 1-vTRatio + r=stof(r) - elif v in vols: - vols[v] = calcVolume(r, vols[v]) - - else: - error("Dynamic '%s' for AdjustVolume is unknown." % v ) - + if r<0 or r>100: + error("VolumeRatio must be value 0 to 100") + + vTRatio = r/100 + vMRatio = 1-vTRatio + + elif v in vols: + vols[v] = calcVolume(r, vols[v]) + + else: + error("Dynamic '%s' for AdjustVolume is unknown" % v ) - if gbl.debug: - print "Volume Ratio: %s%% Track / %s%% Master" % ( vTRatio * 100, vMRatio * 100) - print "Volume table:", - for a in vols: - print "%s=%s" % (a, int(vols[a] * 100)), - print - + if gbl.debug: + print "Volume Ratio: %s%% Track / %s%% Master" % ( vTRatio * 100, vMRatio * 100) + print "Volume table:", + for a in vols: + print "%s=%s" % (a, int(vols[a] * 100)), + print + + def calcVolume(new, old): - """ Calculate a new volume "new" possibly adjusting from "old". """ + """ Calculate a new volume "new" possibly adjusting from "old". """ - if new[0] == '-' or new[0] == '+': - a = stoi(new, "Volume expecting value for %% adjustment, not %s." % new) - v = old + (old * a/100.) + if new[0] == '-' or new[0] == '+': + a = stoi(new, "Volume expecting value for %% adjustment, not %s" % new) + v = old + (old * a/100.) - elif new[0] in "0123456789": - v = stoi(new, "Volume expecting value, not '%s'" % new) / 100. - - else: - new = new.upper() - - adj = None - - if '+' in new: - new,adj = new.split('+') - elif '-' in new: - new,adj = new.split('-') - adj = '-' + adj + elif new[0] in "0123456789": + v = stoi(new, "Volume expecting value, not '%s'" % new) / 100. - if not new in vols: - error("Unknown volume '%s'." % new) + else: + new = new.upper() - v=vols[new] + adj = None - if adj: - a = stoi(adj, "Volume expecting adjustment value, not %s." % adj) - v += (v * (a/100.)) + if '+' in new: + new,adj = new.split('+') + elif '-' in new: + new,adj = new.split('-') + adj = '-' + adj - return v + if not new in vols: + error("Unknown volume '%s'" % new) + + v=vols[new] + + if adj: + a = stoi(adj, "Volume expecting adjustment value, not %s" % adj) + v += (v * (a/100.)) + + return v def setVolume(ln): - """ Set master volume. """ + """ Set master volume. """ - global volume, lastVolume - - lastVolume = volume - - if len(ln) != 1: - error ("Use: Volume DYNAMIC.") + global volume, lastVolume - volume = calcVolume(ln[0], volume) - - if gbl.debug: - print "Volume: %s%%" % volume + lastVolume = volume + + if len(ln) != 1: + error ("Use: Volume DYNAMIC") + + volume = calcVolume(ln[0], volume) + + if gbl.debug: + print "Volume: %s%%" % volume # The next 2 are called from the parser. def setCresc(ln): - setCrescendo(1, ln) + setCrescendo(1, ln) def setDecresc(ln): - setCrescendo(-1, ln) - + setCrescendo(-1, ln) + def setCrescendo(dir, ln): - """ Combined (de)cresc() """ - - global futureVol, volume, lastVolume + """ Combined (de)cresc() """ - lastVolume = volume + global futureVol, volume, lastVolume - if len(ln) == 3: - setVolume([ln[0]]) - ln=ln[1:] + lastVolume = volume - - futureVol = fvolume(dir, volume, ln) + if len(ln) not in (2, 3): + error("Usage: (De)Cresc [start-Dynamic] final-Dynamic bar-count") + + if len(ln) == 3: + setVolume([ln[0]]) + ln=ln[1:] + + futureVol = fvolume(dir, volume, ln) # Used by both the 2 funcs above and from TRACK.setCresc() def fvolume(dir, startvol, ln): - """ Create a list of future vols. Called by (De)Cresc. """ + """ Create a list of future vols. Called by (De)Cresc. """ - # Get destination volume - - destvol = calcVolume(ln[0], startvol) + # Get destination volume - 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.") - - if dir > 0 and destvol < startvol: - warning("Cresc volume less than current setting. " ) - - elif dir < 0 and destvol > startvol: - warning("Decresc volume greater than current setting. " ) - - elif destvol == startvol: - warning("(De)Cresc volume equal to current setting. " ) + destvol = calcVolume(ln[0], startvol) - bcount -= 1 - step = ( destvol-startvol ) / bcount + bcount = stoi(ln[1], "Type error in bar count for (De)Cresc, '%s'" % ln[1] ) - volList=[startvol] - - for a in range(bcount-1): - startvol += step - volList.append( startvol) - - volList.append(destvol) + if bcount <= 0: + error("Bar count for (De)Cresc must be postive") + + if dir > 0 and destvol < startvol: + warning("Cresc volume less than current setting" ) + + elif dir < 0 and destvol > startvol: + warning("Decresc volume greater than current setting" ) + + elif destvol == startvol: + warning("(De)Cresc volume equal to current setting" ) + + bcount -= 1 + step = ( destvol-startvol ) / bcount + + volList=[startvol] + + for a in range(bcount-1): + startvol += step + volList.append( startvol) + + volList.append(destvol) + + return volList - return volList - diff --git a/mma/cp-install b/mma/cp-install index 00dac7c..3ef1840 100755 --- a/mma/cp-install +++ b/mma/cp-install @@ -15,15 +15,40 @@ def okay(msg): # Simple python script to install mma from tarball # This should be fixed to be more versatile. Volunteers? -########################################### -####### Banner, get destination +# Before we do anything, make sure we have an up-to-date python. + +pyMaj=2 +pyMin=4 + +if sys.version_info[0] < pyMaj or sys.version_info[1] < pyMin: + print + print "You need a more current version of Python to run MMA and this install script." + print "We're looking for something equal or greater than version %s.%s" % \ + (pyMaj,pyMin) + print "Current Python version is ", sys.version + print + sys.exit(0) + + +# Banner. Check to make sure user has root permissions. print """ This script will install mma, the standard library and the python modules. +""" -YOU WILL NEED TO BE LOGGED IN AS ROOT TO CONTINUE! +try: + u=os.getuid() +except: + u=1 +if u: + okay("""You do not appear to be running this script as 'root' user. +Continuing will probably cause all kinds of strange errors +and a generally unsatisfactory experience. But, we can try... +""") + +print """ We recommend that you install the package with this script in the default locations. This script will create a directory 'mma' in /usr/local/share. If this isn't @@ -48,6 +73,7 @@ bin='/usr/local/bin/mma' if os.path.exists(bin): okay("Existing mma executable '%s' is being overwritten." % bin) + os.remove(bin) print "Copying mma to", bin diff --git a/mma/docs/html/lib/index.html b/mma/docs/html/lib/index.html index c62d1fe..4371f88 100644 --- a/mma/docs/html/lib/index.html +++ b/mma/docs/html/lib/index.html @@ -48,15 +48,17 @@ information from the each library file:
  • The file description from the "Doc Note" directive. +
  • Any user variables documented in "DocVar" directives. +
  • Each groove description: This is the optional text following a DefGroove directive. -
      -
    • The sequence size. This is extracted from the current groove +
        +
      • The sequence size. This is extracted from the current groove information and was set with the SeqSize directive. It is displayed in a small box after the groove description. -
      • A "summary" of the voices used in the groove. Note that a +
      • A "summary" of the voices used in the groove. Note that a different voice or MIDI note is possible for each bar in the sequence size; however, this listing only lists the selection for the first bar. @@ -65,86 +67,99 @@ information from the each library file:

      If you find that you don't have some of the grooves listed below in your distribution - you need to run the program mklibdoc.py to update these docs. Not all style files are - distributed in the default MMA distribution. + you need to run the program mklibdoc.py to update these docs. Not all style files are + distributed in the default MMA distribution.


      Index


      These grooves can be used from a program just by using their name.

      +
    • Kara

    • +
    • Yamaha


    These grooves can be used from a program just by using their name.

    Stdlib

    Use the following grooves with a "use" directive.

    Kara

    + +

    Yamaha

    +

    @@ -153,4 +168,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: Sun Oct 15 11:26:36 2006 \ No newline at end of file +

    Created: Wed Mar 7 11:50:18 2007 \ 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 f650e68..c6bc689 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

    @@ -21,7 +21,6 @@
  • 50sFill-In-DD -

    50sMain-A

    @@ -39,7 +38,6 @@
    -

    50sFill-In-AA

    @@ -57,7 +55,6 @@
    -

    50sIntro-A

    @@ -75,7 +72,6 @@
    -

    50sEnding-A

    @@ -96,7 +92,6 @@
    -

    50sMain-B

    @@ -114,7 +109,6 @@
    -

    50sFill-In-BB

    @@ -133,7 +127,6 @@
    -

    50sFill-In-BA

    @@ -152,7 +145,6 @@
    -

    50sIntro-B

    @@ -171,7 +163,6 @@
    -

    50sEnding-B

    @@ -193,7 +184,6 @@
    -

    50sMain-C

    @@ -212,7 +202,6 @@
    -

    50sFill-In-CC

    @@ -232,7 +221,6 @@
    -

    50sIntro-C

    @@ -251,7 +239,6 @@
    -

    50sEnding-C

    @@ -273,7 +260,6 @@
    -

    50sMain-D

    @@ -291,7 +277,6 @@
    -

    50sFill-In-DD

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

    Kfunk1

    @@ -14,7 +14,6 @@
  • Ending-A -

    Main-A

    @@ -35,7 +34,6 @@
    -

    Fill-In-AA

    @@ -57,7 +55,6 @@
    -

    Fill-In-AB

    @@ -80,7 +77,6 @@
    -

    Main-B

    @@ -104,7 +100,6 @@
    -

    Fill-In-BA

    @@ -130,7 +125,6 @@
    -

    Fill-In-BB

    @@ -155,7 +149,6 @@
    -

    Intro-A

    @@ -179,7 +172,6 @@
    -

    Ending-A

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

    Twi

    @@ -14,7 +14,6 @@
  • Ending-B -

    Main-A

    @@ -32,7 +31,6 @@
    -

    Fill-In-AA

    @@ -51,7 +49,6 @@
    -

    Fill-In-AB

    @@ -73,7 +70,6 @@
    -

    Main-B

    @@ -94,7 +90,6 @@
    -

    Fill-In-BA

    @@ -116,7 +111,6 @@
    -

    Fill-In-BB

    @@ -136,7 +130,6 @@
    -

    Intro-B

    @@ -155,7 +148,6 @@
    -

    Ending-B

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

    50Srock

    @@ -12,7 +12,6 @@
  • 50sRockEnd -

    50sRock

    @@ -32,7 +31,6 @@
    -

    50sRockSus

    @@ -53,7 +51,6 @@
    -

    50sRock1

    @@ -73,7 +70,6 @@
    -

    50sRock1Sus

    @@ -94,7 +90,6 @@
    -

    50sRockIntro

    @@ -114,7 +109,6 @@
    -

    50sRockEnd

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

    60Srock

    @@ -11,7 +11,6 @@
  • 60sRockEnd -

    60sRock

    @@ -30,7 +29,6 @@
    -

    60sRock1

    @@ -48,7 +46,6 @@
    -

    60sRockSus

    @@ -68,7 +65,6 @@
    -

    60sRock1Sus

    @@ -87,7 +83,6 @@
    -

    60sRockEnd

    diff --git a/mma/docs/html/lib/stdlib/8beat.html b/mma/docs/html/lib/stdlib/8beat.html index 177c010..b4f1355 100644 --- a/mma/docs/html/lib/stdlib/8beat.html +++ b/mma/docs/html/lib/stdlib/8beat.html @@ -1,4 +1,4 @@ - +

    8Beat

    @@ -8,10 +8,10 @@
  • 8BeatSus
  • 8Beat1
  • 8Beat1Sus +
  • 8BeatIntro
  • 8BeatEnd -

    8Beat

    @@ -30,7 +30,6 @@
    -

    8BeatSus

    @@ -50,7 +49,6 @@
    -

    8Beat1

    @@ -70,7 +68,6 @@
    -

    8Beat1Sus

    @@ -90,8 +87,25 @@

  • + + + + +
    +

    8BeatIntro

    + Straight-ahead four bar introduction. (4) +
    + + + + + + + + +
    Bass FingeredBass
    Chord Honky-TonkPiano
    Chord-Guitar CleanGuitar
    Drum-Chh ClosedHiHat
    Drum-Kick KickDrum1
    Drum-Ohh OpenHiHat
    Drum-Snare SnareDrum1
    +
    -

    8BeatEnd

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

    Ballad

    @@ -12,9 +12,9 @@
  • BalladIntro1
  • BalladIntro2
  • BalladEnd +
  • Ballad1End -

    Ballad

    @@ -40,7 +40,6 @@
    -

    BalladSus

    @@ -67,7 +66,6 @@
    -

    Ballad1

    @@ -93,7 +91,6 @@
    -

    Ballad1Sus

    @@ -120,7 +117,6 @@
    -

    BalladIntro

    @@ -142,7 +138,6 @@
    -

    BalladIntro1

    @@ -163,7 +158,6 @@
    -

    BalladIntro2

    @@ -185,7 +179,6 @@
    -

    BalladEnd

    @@ -210,5 +203,30 @@

  • + + + + +
    +

    Ballad1End

    + A simpler 4 bar ending. We still have a harp, but it's doing quarter note arpeggios. (4) +
    + + + + + + + + + + + + + + + +
    Arpeggio OrchestralHarp
    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 new file mode 100644 index 0000000..be13e34 --- /dev/null +++ b/mma/docs/html/lib/stdlib/ballad128.html @@ -0,0 +1,113 @@ + + + +

    Ballad128

    +

    A 12/8 Ballad. Written for "Memory" This is written in 4/4, so, when figuring tempo use a dotted quarter for the beat count. +

    + + + + +
    +

    Ballad128

    + A very simple, relaxed 12/8 ballad pattern. (4) +
    + + + + + + +
    Bass AcousticBass
    Chord OrchestralHarp
    Drum-Kick SideKick
    Drum-Snare SnareDrum2
    Walk AcousticBass
    +
    + + + + +
    +

    Ballad128Plus

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

    Ballad128Sus

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

    Ballad128SusPlus

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

    Ballad128Intro

    + This 4 bar intro plays bass notes and harp arpeggios. It pretty much assumes a 7th chord on the 4th bar. (4) +
    + + + + + +
    Arpeggio OrchestralHarp
    Bass AcousticBass
    Bass-Intro OrchestralHarp
    Walk AcousticBass
    +
    + + + + +
    +

    Ballad128End

    + A 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 a3bd670..0a918f9 100644 --- a/mma/docs/html/lib/stdlib/basicrock.html +++ b/mma/docs/html/lib/stdlib/basicrock.html @@ -1,4 +1,4 @@ - +

    Basicrock

    @@ -11,7 +11,6 @@
  • BasicRockEnd -

    BasicRock

    @@ -31,7 +30,6 @@
    -

    BasicRockSus

    @@ -52,7 +50,6 @@
    -

    BasicRock4

    @@ -71,7 +68,6 @@
    -

    BasicRock4Sus

    @@ -91,7 +87,6 @@
    -

    BasicRockEnd

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

    Beguine

    @@ -11,9 +11,9 @@
  • BeguineFill
  • BeguineIntro
  • BeguineEnd +
  • Beguine2End -

    Beguine

    @@ -35,7 +35,6 @@
    -

    BeguineSus

    @@ -58,7 +57,6 @@
    -

    Beguine1

    @@ -81,7 +79,6 @@
    -

    Beguine1Sus

    @@ -105,7 +102,6 @@
    -

    BeguineFill

    @@ -127,7 +123,6 @@
    -

    BeguineIntro

    @@ -149,7 +144,6 @@
    -

    BeguineEnd

    @@ -171,5 +165,25 @@

  • + + + + +
    +

    Beguine2End

    + A more abrupt 2 bar ending. (2) +
    + + + + + + + + + + +
    Bass FretlessBass
    Chord Piano2
    Drum Claves
    Drum-Hconga MuteHighConga
    Drum-Hh ClosedHiHat
    Drum-Lconga LowConga
    Drum-Maraca Maracas
    Drum-Toms1 MidTom1
    Drum-Toms2 MidTom2
    +
    diff --git a/mma/docs/html/lib/stdlib/bigband.html b/mma/docs/html/lib/stdlib/bigband.html index f909e35..fca82af 100644 --- a/mma/docs/html/lib/stdlib/bigband.html +++ b/mma/docs/html/lib/stdlib/bigband.html @@ -1,4 +1,4 @@ - +

    Bigband

    @@ -13,6 +13,7 @@
  • BigBand8
  • BigBand8Sus
  • BigBandFill +
  • BigBand1Fill
  • BigBandIntro
  • BigBandEnd
  • BigBand1End @@ -20,7 +21,6 @@
  • BigBand4End -

    BigBand

    @@ -39,7 +39,6 @@
    -

    BigBandSus

    @@ -58,7 +57,6 @@
    -

    BigBandPlus

    @@ -78,7 +76,6 @@
    -

    BigBandSusPlus

    @@ -98,7 +95,6 @@
    -

    BigBand1

    @@ -118,7 +114,6 @@
    -

    BigBand1Sus

    @@ -139,7 +134,6 @@
    -

    BigBand8

    @@ -159,7 +153,6 @@
    -

    BigBand8Sus

    @@ -180,7 +173,6 @@
    -

    BigBandFill

    @@ -196,8 +188,25 @@

  • + + + + +
    +

    BigBand1Fill

    + Louder, 4 in the bar fill. (1) +
    + + + + + + + + +
    Bass AcousticBass
    Chord Trombone
    Chord-Hits1 MutedTrumpet
    Drum-Hh OpenHiHat
    Drum-Kick KickDrum1
    Drum-Ride RideCymbal1
    Drum-Snare SnareDrum1
    +
    -

    BigBandIntro

    @@ -216,7 +225,6 @@
    -

    BigBandEnd

    @@ -234,7 +242,6 @@
    -

    BigBand1End

    @@ -253,7 +260,6 @@
    -

    BigBand2End

    @@ -272,7 +278,6 @@
    -

    BigBand4End

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

    Bluegrass

    @@ -12,7 +12,6 @@
  • BlueGrassEnd -

    BlueGrass

    @@ -30,7 +29,6 @@
    -

    BlueGrassClap

    @@ -49,7 +47,6 @@
    -

    BlueGrassBottle

    @@ -69,7 +66,6 @@
    -

    BlueGrassBottleClap

    @@ -89,7 +85,6 @@
    -

    BlueGrassSus

    @@ -108,7 +103,6 @@
    -

    BlueGrassEnd

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

    Blues

    @@ -14,7 +14,6 @@
  • BluesEnd -

    Blues

    @@ -32,7 +31,6 @@
    -

    BluesTriple

    @@ -50,7 +48,6 @@
    -

    BluesSus

    @@ -69,7 +66,6 @@
    -

    BluesTripleSus

    @@ -88,7 +84,6 @@
    -

    Blues1

    @@ -107,7 +102,6 @@
    -

    Blues1Sus

    @@ -127,7 +121,6 @@
    -

    BluesIntro

    @@ -145,7 +138,6 @@
    -

    BluesEnd

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

    Boggiewoggie

    @@ -11,7 +11,6 @@
  • BoggieWoggieEnd -

    BoggieWoggie

    @@ -25,7 +24,6 @@
    -

    BoggieWoggie1

    @@ -39,7 +37,6 @@
    -

    BoggieWoggie2

    @@ -53,7 +50,6 @@
    -

    BoggieWoggie3

    @@ -67,7 +63,6 @@
    -

    BoggieWoggieEnd

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

    Bolero

    @@ -18,7 +18,6 @@
  • Bolero1End -

    Bolero

    @@ -38,7 +37,6 @@
    -

    BoleroFill

    @@ -59,7 +57,6 @@
    -

    BoleroSus

    @@ -80,7 +77,6 @@
    -

    BoleroSusFill

    @@ -102,7 +98,6 @@
    -

    BoleroIntro

    @@ -122,7 +117,6 @@
    -

    BoleroEnd

    @@ -143,7 +137,6 @@
    -

    Bolero1

    @@ -161,7 +154,6 @@
    -

    Bolero1Fill

    @@ -180,7 +172,6 @@
    -

    Bolero1Sus

    @@ -199,7 +190,6 @@
    -

    Bolero1SusFill

    @@ -219,7 +209,6 @@
    -

    Bolero1Intro

    @@ -237,7 +226,6 @@
    -

    Bolero1End

    diff --git a/mma/docs/html/lib/stdlib/bossanova.html b/mma/docs/html/lib/stdlib/bossanova.html index 6011cb8..389c380 100644 --- a/mma/docs/html/lib/stdlib/bossanova.html +++ b/mma/docs/html/lib/stdlib/bossanova.html @@ -1,4 +1,4 @@ - +

    Bossanova

    @@ -7,6 +7,8 @@
  • BossaNova
  • BossaNovaSus
  • BossaNova1Sus +
  • BossaNova2Sus +
  • BossaNova3Sus
  • BossaNovaFill
  • BossaNovaIntro
  • BossaNovaIntro8 @@ -15,7 +17,6 @@
  • BossaNova2End -

    BossaNova

    @@ -38,7 +39,6 @@
    -

    BossaNovaSus

    @@ -62,7 +62,6 @@
    -

    BossaNova1Sus

    @@ -85,8 +84,54 @@

  • + + + + +
    +

    BossaNova2Sus

    + Basic Bossa with decending string pattern. (4) +
    + + + + + + + + + + + + + +
    Bass JazzGuitar
    Bass-Sus Strings
    Chord JazzGuitar
    Drum Cabasa
    Drum-Chh ClosedHiHat
    Drum-Clave Claves
    Drum-Kick KickDrum2
    Drum-Lowbongo LowBongo
    Drum-Lowconga LowConga
    Drum-Muteconga MuteHighConga
    Drum-Openhiconga OpenHighConga
    Drum-Sidekick SideKick
    +
    + + + + +
    +

    BossaNova3Sus

    + A combination of BossaNova1Sus and BossaNova2Sus. Alternating bars of decending strings with full chords. (4) +
    + + + + + + + + + + + + + + +
    Bass JazzGuitar
    Bass-Sus Strings
    Chord JazzGuitar
    Chord-Sus Strings
    Drum Cabasa
    Drum-Chh ClosedHiHat
    Drum-Clave Claves
    Drum-Kick KickDrum2
    Drum-Lowbongo LowBongo
    Drum-Lowconga LowConga
    Drum-Muteconga MuteHighConga
    Drum-Openhiconga OpenHighConga
    Drum-Sidekick SideKick
    +
    -

    BossaNovaFill

    @@ -110,7 +155,6 @@
    -

    BossaNovaIntro

    @@ -133,7 +177,6 @@
    -

    BossaNovaIntro8

    @@ -156,7 +199,6 @@
    -

    BossaNovaEnd

    @@ -180,7 +222,6 @@
    -

    BossaNova1End

    @@ -205,7 +246,6 @@
    -

    BossaNova2End

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

    Broadway

    @@ -12,7 +12,6 @@
  • BroadWayEnd -

    Broadway

    @@ -32,7 +31,6 @@
    -

    Broadway1

    @@ -53,7 +51,6 @@
    -

    BroadwaySus

    @@ -74,7 +71,6 @@
    -

    Broadway1Sus

    @@ -96,7 +92,6 @@
    -

    BroadwayIntro

    @@ -116,7 +111,6 @@
    -

    BroadWayEnd

    diff --git a/mma/docs/html/lib/stdlib/calypso.html b/mma/docs/html/lib/stdlib/calypso.html index f5bc691..057db9b 100644 --- a/mma/docs/html/lib/stdlib/calypso.html +++ b/mma/docs/html/lib/stdlib/calypso.html @@ -1,4 +1,4 @@ - +

    Calypso

    @@ -11,7 +11,6 @@
  • CalypsoEnd -

    Calypso

    @@ -28,7 +27,6 @@
    -

    CalypsoSus

    @@ -46,7 +44,6 @@
    -

    Calypso1

    @@ -63,7 +60,6 @@
    -

    Calypso1Sus

    @@ -81,7 +77,6 @@
    -

    CalypsoEnd

    diff --git a/mma/docs/html/lib/stdlib/chacha.html b/mma/docs/html/lib/stdlib/chacha.html index 1b256d1..31a836e 100644 --- a/mma/docs/html/lib/stdlib/chacha.html +++ b/mma/docs/html/lib/stdlib/chacha.html @@ -1,18 +1,41 @@ - +

    Chacha

    -

    A popular, albeit somewhat dated and make trite by Americanized versions, The Cha-Cha-Cha remains a popular rhythm with broad audience appeal. I've used ``Rico Vacilon'' as a demo. This file was mostly developed from the patterns in``Latin Rhythms: Mystery Unraveled'' by Victor Lopez. +

    The Cha-Cha-Cha remains a popular rhythm with broad audience appeal, despite the fact that it is somewhat dated and made trite by Americanized versions. I've used "Rico Vacilon" as a demo. This file was mostly developed from the patterns in "Latin Rhythms: Mystery Unraveled" by Victor Lopez. +

    + + + +
    +

    Variables

    +
    + + + + + + + + + + + + + +
    ArpeggioOctave The Octave setting for the flute arpeggios (default=7)
    ArpeggioVoice Voice for the ChaCha1 Arpeggios (default=Flute)
    ScaleVoice Voice for the accending scale in ChaCha1Fill (default=Flute)
    +

    -

    ChaCha

    @@ -35,7 +58,6 @@
    -

    ChaCha1

    @@ -59,7 +81,6 @@
    -

    ChaChaSus

    @@ -83,7 +104,6 @@
    -

    ChaCha1Sus

    @@ -107,8 +127,52 @@

    + + + + +
    +

    ChaChaFill

    + A one bar fill. (1) +
    + + + + + + + + + + + + +
    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
    +
    + + + + +
    +

    ChaCha1Fill

    + Fill with accending flute run. Makes a good section introduction. (1) +
    + + + + + + + + + + + + + +
    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
    Scale Flute
    +
    -

    ChaChaIntro

    @@ -131,7 +195,6 @@
    -

    ChaChaEnd

    diff --git a/mma/docs/html/lib/stdlib/countryblues.html b/mma/docs/html/lib/stdlib/countryblues.html index 67858fe..cc9335a 100644 --- a/mma/docs/html/lib/stdlib/countryblues.html +++ b/mma/docs/html/lib/stdlib/countryblues.html @@ -1,4 +1,4 @@ - +

    Countryblues

    @@ -19,7 +19,6 @@
  • CountryBluesEnd -

    CountryBlues

    @@ -38,7 +37,6 @@
    -

    CountryBluesSus

    @@ -58,7 +56,6 @@
    -

    CountryBluesWalk

    @@ -76,7 +73,6 @@
    -

    CountryBluesWalkSus

    @@ -95,7 +91,6 @@
    -

    CountryBlues1

    @@ -114,7 +109,6 @@
    -

    CountryBlues1Sus

    @@ -134,7 +128,6 @@
    -

    CountryBlues1Walk

    @@ -152,7 +145,6 @@
    -

    CountryBlues1WalkSus

    @@ -171,7 +163,6 @@
    -

    CountryBluesFill

    @@ -191,7 +182,6 @@
    -

    CountryBluesWalkFill

    @@ -210,7 +200,6 @@
    -

    CountryBlues1Fill

    @@ -230,7 +219,6 @@
    -

    CountryBlues1WalkFill

    @@ -249,7 +237,6 @@
    -

    CountryBluesEnd

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

    Countryswing

    @@ -14,7 +14,6 @@
  • CountrySwingEnd -

    CountrySwing

    @@ -31,7 +30,6 @@
    -

    CountrySwingSus

    @@ -49,7 +47,6 @@
    -

    CountrySwing1

    @@ -67,7 +64,6 @@
    -

    CountrySwing1Sus

    @@ -86,7 +82,6 @@
    -

    CountrySwing2

    @@ -104,7 +99,6 @@
    -

    CountrySwing2Sus

    @@ -123,7 +117,6 @@
    -

    CountrySwingIntro

    @@ -139,7 +132,6 @@
    -

    CountrySwingEnd

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

    Countrywaltz

    @@ -19,7 +19,6 @@
  • CountryWaltzEnd -

    CountryWaltz

    @@ -36,7 +35,6 @@
    -

    CountryWaltzSus

    @@ -54,7 +52,6 @@
    -

    CountryWaltz1

    @@ -72,7 +69,6 @@
    -

    CountryWaltz1Sus

    @@ -91,7 +87,6 @@
    -

    CountryWaltz2

    @@ -109,7 +104,6 @@
    -

    CountryWaltz2Sus

    @@ -128,7 +122,6 @@
    -

    CountryWaltzWalk

    @@ -145,7 +138,6 @@
    -

    CountryWaltzWalkSus

    @@ -163,7 +155,6 @@
    -

    CountryWaltz1Walk

    @@ -181,7 +172,6 @@
    -

    Countrywaltz2Walk

    @@ -199,7 +189,6 @@
    -

    CountryWaltz1SusWalk

    @@ -218,7 +207,6 @@
    -

    CountryWaltz2SusWalk

    @@ -237,7 +225,6 @@
    -

    CountryWaltzEnd

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

    Desert

    @@ -10,7 +10,6 @@
  • DesertEnd -

    Desert

    @@ -28,7 +27,6 @@
    -

    DesertSus

    @@ -47,7 +45,6 @@
    -

    DesertFill

    @@ -66,7 +63,6 @@
    -

    DesertEnd

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

    Dixie

    @@ -12,7 +12,6 @@
  • DixieEnd -

    Dixie

    @@ -31,7 +30,6 @@
    -

    Dixie1

    @@ -50,7 +48,6 @@
    -

    Dixie2

    @@ -70,7 +67,6 @@
    -

    Dixie3

    @@ -90,7 +86,6 @@
    -

    DixieStrum

    @@ -109,7 +104,6 @@
    -

    DixieEnd

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

    Dixiemarch

    @@ -12,7 +12,6 @@
  • DixieMarchEnd -

    DixieMarch

    @@ -29,7 +28,6 @@
    -

    DixieMarchPlus

    @@ -47,7 +45,6 @@
    -

    DixieMarchSus

    @@ -65,7 +62,6 @@
    -

    DixieMarchSusPlus

    @@ -84,7 +80,6 @@
    -

    DixieMarchIntro

    @@ -101,7 +96,6 @@
    -

    DixieMarchEnd

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

    Easyswing

    @@ -29,7 +29,6 @@
  • EasySwingEnd -

    EasySwing

    @@ -46,7 +45,6 @@
    -

    EasySwingSus

    @@ -64,7 +62,6 @@
    -

    EasySwingFill

    @@ -82,7 +79,6 @@
    -

    EasySwingWalk

    @@ -98,7 +94,6 @@
    -

    EasySwingWalkSus

    @@ -115,7 +110,6 @@
    -

    EasySwingWalkFill

    @@ -133,7 +127,6 @@
    -

    EasySwing1

    @@ -150,7 +143,6 @@
    -

    EasySwing1Sus

    @@ -168,7 +160,6 @@
    -

    EasySwing1Fill

    @@ -186,7 +177,6 @@
    -

    EasySwing2

    @@ -203,7 +193,6 @@
    -

    EasySwing2Sus

    @@ -221,7 +210,6 @@
    -

    EasySwing2Fill

    @@ -239,7 +227,6 @@
    -

    EasySwing42

    @@ -256,7 +243,6 @@
    -

    EasySwing42Sus

    @@ -274,7 +260,6 @@
    -

    EasySwing42Fill

    @@ -292,7 +277,6 @@
    -

    EasySwing42Walk

    @@ -308,7 +292,6 @@
    -

    EasySwing42WalkSus

    @@ -325,7 +308,6 @@
    -

    EasySwing42WalkFill

    @@ -342,7 +324,6 @@
    -

    EasySwingIntro

    @@ -358,7 +339,6 @@
    -

    EasySwingIntro1

    @@ -374,7 +354,6 @@
    -

    EasySwingIntro2

    @@ -390,7 +369,6 @@
    -

    EasySwingIntro3

    @@ -407,7 +385,6 @@
    -

    EasySwingEnd

    diff --git a/mma/docs/html/lib/stdlib/fastblues.html b/mma/docs/html/lib/stdlib/fastblues.html index 71f38c0..a56c3d0 100644 --- a/mma/docs/html/lib/stdlib/fastblues.html +++ b/mma/docs/html/lib/stdlib/fastblues.html @@ -1,4 +1,4 @@ - +

    Fastblues

    @@ -13,7 +13,6 @@
  • FastBluesEnd -

    FastBlues

    @@ -33,7 +32,6 @@
    -

    FastBluesSus

    @@ -54,7 +52,6 @@
    -

    FastBluesWalk

    @@ -74,7 +71,6 @@
    -

    FastBluesWalkSus

    @@ -95,7 +91,6 @@
    -

    FastBlues1

    @@ -116,7 +111,6 @@
    -

    FastBlues1Sus

    @@ -138,7 +132,6 @@
    -

    FastBluesEnd

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

    Folk

    @@ -11,7 +11,6 @@
  • FolkEnd -

    Folk

    @@ -26,7 +25,6 @@
    -

    FolkWalk

    @@ -41,7 +39,6 @@
    -

    FolkArticulated

    @@ -58,7 +55,6 @@
    -

    FolkIntro

    @@ -73,7 +69,6 @@
    -

    FolkEnd

    diff --git a/mma/docs/html/lib/stdlib/foxtrot.html b/mma/docs/html/lib/stdlib/foxtrot.html index 865b122..f170d45 100644 --- a/mma/docs/html/lib/stdlib/foxtrot.html +++ b/mma/docs/html/lib/stdlib/foxtrot.html @@ -1,4 +1,4 @@ - +

    Foxtrot

    @@ -16,7 +16,6 @@
  • FoxTrot1End -

    Foxtrot

    @@ -36,7 +35,6 @@
    -

    FoxtrotSus

    @@ -57,7 +55,6 @@
    -

    FoxTrotPlus

    @@ -78,7 +75,6 @@
    -

    FoxTrotSusPlus

    @@ -100,7 +96,6 @@
    -

    Foxtrot1

    @@ -122,7 +117,6 @@
    -

    FoxTrot1Sus

    @@ -145,7 +139,6 @@
    -

    FoxTrotIntro

    @@ -165,7 +158,6 @@
    -

    FoxtrotFill

    @@ -185,7 +177,6 @@
    -

    FoxTrotEnd

    @@ -203,7 +194,6 @@
    -

    FoxTrot1End

    diff --git a/mma/docs/html/lib/stdlib/frenchwaltz.html b/mma/docs/html/lib/stdlib/frenchwaltz.html index 3769a40..ee74236 100644 --- a/mma/docs/html/lib/stdlib/frenchwaltz.html +++ b/mma/docs/html/lib/stdlib/frenchwaltz.html @@ -1,35 +1,70 @@ - +

    Frenchwaltz

    -

    These try to do the "French Cafe" sound. +

    These try to do the "French Cafe" sound. The song "Pigalle" works quite well with this. Note the setting of the BassRegister variable which tries to emulate the "switches" on a real accordion. In this case we have an accordion with three reed banks labeled "L", "M" and "H"--this will make large changes to the accordion um-pa-pa stuff +

    + + + +
    +

    Variables

    +
    + + + + + + + + + + + + + +
    BassRegister Sets the bass register, 1=L 2=LM 3=LH 4=LMH 5=M 6=MH 7=H (Default=4).
    CSeq Internal, Chord sequence list,
    BSeq Internal, Bass sequence list.
    +

    -

    FrenchWaltz

    - Accordion umm-paa. Ya either love it or hate it! (8) + Accordion umm-pa-pa. Ya either love it or hate it! (8)
    - - + + + + + +
    Bass Accordion
    Chord Accordion
    Bass-H Accordion
    Bass-L Accordion
    Bass-M Accordion
    Chord-Guitar NylonGuitar
    Chord-H Accordion
    Chord-L Accordion
    Chord-M Accordion
    Drum-Tam Tambourine
    Drum-Tri OpenTriangle
    -

    FrenchWaltzSus

    @@ -37,9 +72,13 @@
    - - + + + + + + @@ -47,7 +86,6 @@
    Bass Accordion
    Chord Accordion
    Bass-H Accordion
    Bass-L Accordion
    Bass-M Accordion
    Chord-Guitar NylonGuitar
    Chord-H Accordion
    Chord-L Accordion
    Chord-M Accordion
    Chord-Sus Strings
    Drum-Tam Tambourine
    Drum-Tri OpenTriangle
    -

    FrenchWaltz1

    @@ -56,15 +94,37 @@
    - - + + + + + + +
    Arpeggio Accordion
    Bass Accordion
    Chord Accordion
    Bass-H Accordion
    Bass-L Accordion
    Bass-M Accordion
    Chord-Guitar NylonGuitar
    Chord-H Accordion
    Chord-L Accordion
    Chord-M Accordion
    Drum-Tam Tambourine
    Drum-Tri OpenTriangle
    + + + + +
    +

    FrenchWaltz1Fill

    + Adds an accending run. (8) +
    + + + + + + + + +
    Arpeggio Accordion
    Chord-H Accordion
    Chord-L Accordion
    Chord-M Accordion
    Drum-Tam Tambourine
    Drum-Tri OpenTriangle
    Scale Accordion
    +
    -

    FrenchWaltz1Sus

    @@ -73,16 +133,219 @@
    - - + + + + + + +
    Arpeggio Accordion
    Bass Accordion
    Chord Accordion
    Bass-H Accordion
    Bass-L Accordion
    Bass-M Accordion
    Chord-Guitar NylonGuitar
    Chord-H Accordion
    Chord-L Accordion
    Chord-M Accordion
    Chord-Sus Strings
    Drum-Tam Tambourine
    Drum-Tri OpenTriangle
    + + + + +
    +

    FrenchWaltz1FillSus

    + Arpeggios, run and sustained strings. (8) +
    + + + + + + + + + +
    Arpeggio Accordion
    Chord-H Accordion
    Chord-L Accordion
    Chord-M Accordion
    Chord-Sus Strings
    Drum-Tam Tambourine
    Drum-Tri OpenTriangle
    Scale Accordion
    +
    + + + + +
    +

    FrenchWaltz2

    + A simple, little counter melody on a piano. (8) +
    + + + + + + + + + + + +
    Arpeggio Piano1
    Bass-H Accordion
    Bass-L Accordion
    Bass-M Accordion
    Chord-Guitar NylonGuitar
    Chord-H Accordion
    Chord-L Accordion
    Chord-M Accordion
    Drum-Tam Tambourine
    Drum-Tri OpenTriangle
    +
    + + + + +
    +

    FrenchWaltz2Fill

    + Add a piano run to the counter melody. (8) +
    + + + + + + + + +
    Arpeggio Piano1
    Chord-H Accordion
    Chord-L Accordion
    Chord-M Accordion
    Drum-Tam Tambourine
    Drum-Tri OpenTriangle
    Scale Piano1
    +
    + + + + +
    +

    FrenchWaltz2Sus

    + Piano counter melody and sustained strings. (8) +
    + + + + + + + + + + + + +
    Arpeggio Piano1
    Bass-H Accordion
    Bass-L Accordion
    Bass-M Accordion
    Chord-Guitar NylonGuitar
    Chord-H Accordion
    Chord-L Accordion
    Chord-M Accordion
    Chord-Sus Strings
    Drum-Tam Tambourine
    Drum-Tri OpenTriangle
    +
    + + + + +
    +

    FrenchWaltz2FillSus

    + Piano counter melody and run with sustained strings. (8) +
    + + + + + + + + + +
    Arpeggio Piano1
    Chord-H Accordion
    Chord-L Accordion
    Chord-M Accordion
    Chord-Sus Strings
    Drum-Tam Tambourine
    Drum-Tri OpenTriangle
    Scale Piano1
    +
    + + + + +
    +

    FrenchWaltz3

    + A simple, little counter melody on a viola. (8) +
    + + + + + + + + + + + +
    Arpeggio Viola
    Bass-H Accordion
    Bass-L Accordion
    Bass-M Accordion
    Chord-Guitar NylonGuitar
    Chord-H Accordion
    Chord-L Accordion
    Chord-M Accordion
    Drum-Tam Tambourine
    Drum-Tri OpenTriangle
    +
    + + + + +
    +

    FrenchWaltz3Fill

    + Add a string run to the counter melody. (8) +
    + + + + + + + + +
    Arpeggio Viola
    Chord-H Accordion
    Chord-L Accordion
    Chord-M Accordion
    Drum-Tam Tambourine
    Drum-Tri OpenTriangle
    Scale Viola
    +
    + + + + +
    +

    FrenchWaltz2Sus

    + Viola counter melody and sustained strings. (8) +
    + + + + + + + + + + + + +
    Arpeggio Viola
    Bass-H Accordion
    Bass-L Accordion
    Bass-M Accordion
    Chord-Guitar NylonGuitar
    Chord-H Accordion
    Chord-L Accordion
    Chord-M Accordion
    Chord-Sus Strings
    Drum-Tam Tambourine
    Drum-Tri OpenTriangle
    +
    + + + + +
    +

    FrenchWaltz3FillSus

    + Viola counter melody and run with sustained strings. (8) +
    + + + + + + + + + +
    Arpeggio Viola
    Chord-H Accordion
    Chord-L Accordion
    Chord-M Accordion
    Chord-Sus Strings
    Drum-Tam Tambourine
    Drum-Tri OpenTriangle
    Scale Viola
    +
    + + + + +
    +

    FrenchWaltzIntro

    + A 4 bar intro. (8) +
    + + + + + + + + + + +
    Bass-H Accordion
    Bass-L Accordion
    Bass-M Accordion
    Chord-Guitar NylonGuitar
    Chord-H Accordion
    Chord-L Accordion
    Chord-M Accordion
    Drum-Tam Tambourine
    Drum-Tri OpenTriangle
    +
    -

    FrenchWaltzEnd

    @@ -90,8 +353,12 @@
    - - + + + + + + @@ -99,7 +366,6 @@
    Bass Accordion
    Chord Accordion
    Bass-H Accordion
    Bass-L Accordion
    Bass-M Accordion
    Chord-H Accordion
    Chord-L Accordion
    Chord-M Accordion
    Drum-Tam Tambourine
    Drum-Tri OpenTriangle
    Scale Strings
    -

    FrenchWaltz1End

    @@ -107,8 +373,12 @@
    - - + + + + + + diff --git a/mma/docs/html/lib/stdlib/guitarballad.html b/mma/docs/html/lib/stdlib/guitarballad.html index 3cc092f..0956967 100644 --- a/mma/docs/html/lib/stdlib/guitarballad.html +++ b/mma/docs/html/lib/stdlib/guitarballad.html @@ -1,4 +1,4 @@ - +

    Guitarballad

    @@ -12,7 +12,6 @@
  • GuitarBalladEnd -

  • Bass Accordion
    Chord Accordion
    Bass-H Accordion
    Bass-L Accordion
    Bass-M Accordion
    Chord-H Accordion
    Chord-L Accordion
    Chord-M Accordion
    Drum-Tam Tambourine
    Drum-Tri OpenTriangle
    Scale Accordion

    GuitarBallad

    @@ -30,7 +29,6 @@
    -

    GuitarBallad1

    @@ -49,7 +47,6 @@
    -

    GuitarBalladSus

    @@ -68,7 +65,6 @@
    -

    GuitarBallad1Sus

    @@ -88,7 +84,6 @@
    -

    GuitarBalladIntro

    @@ -106,7 +101,6 @@
    -

    GuitarBalladEnd

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

    Hillcountry

    @@ -13,7 +13,6 @@
  • HillCountryEnd -

    HillCountry

    @@ -29,7 +28,6 @@
    -

    HillCountryPlus

    @@ -46,7 +44,6 @@
    -

    HillCountrySus

    @@ -63,7 +60,6 @@
    -

    HillCountrySusPlus

    @@ -81,7 +77,6 @@
    -

    HillCountryFill

    @@ -97,7 +92,6 @@
    -

    HillCountryIntro

    @@ -113,7 +107,6 @@
    -

    HillCountryEnd

    diff --git a/mma/docs/html/lib/stdlib/jazz-54.html b/mma/docs/html/lib/stdlib/jazz-54.html index 9fc1b1e..09c4cb1 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

    @@ -9,7 +9,6 @@
  • Jazz54Intro -

    Jazz54

    @@ -26,7 +25,6 @@
    -

    Jazz54Walk

    @@ -43,7 +41,6 @@
    -

    Jazz54Intro

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

    Jazzguitar

    +

    For jazz ballads. This has ONLY a guitar (well, expect for the sustained versions). Mostly chords, but some bass and arpeggio is included. The song "Django" is a bit of a demo. +

    + + + +
    +

    Variables

    +
    + + + + + +
    SustainVoice Voice for the sustained versions (default=TremoloStrings).
    +
    +

    + + + + +
    +

    JazzGuitar

    + A very basic 4 to the bar accompaniment. (4) +
    + + + +
    Bass JazzGuitar
    Chord JazzGuitar
    +
    + + + + +
    +

    JazzGuitarWalk

    + Changes the bass pattern to walking. (4) +
    + + + +
    Chord JazzGuitar
    Walk JazzGuitar
    +
    + + + + +
    +

    JazzGuitar1

    + Our basic pattern with arpeggios every 4th bar. (4) +
    + + + + +
    Arpeggio JazzGuitar
    Bass JazzGuitar
    Chord JazzGuitar
    +
    + + + + +
    +

    JazzGuitar1Walk

    + Walking bass with arpeggios every 4th bar. (4) +
    + + + + +
    Arpeggio JazzGuitar
    Chord JazzGuitar
    Walk JazzGuitar
    +
    + + + + +
    +

    JazzGuitar2

    + Basic pattern with more strum and syncopation. (4) +
    + + + +
    Bass JazzGuitar
    Chord JazzGuitar
    +
    + + + + +
    +

    JazzGuitar2Walk

    + The strum pattern with walking bass (4) +
    + + + +
    Chord JazzGuitar
    Walk JazzGuitar
    +
    + + + + +
    +

    JazzGuitar3

    + Add arpeggios every 4 bars to the syncopated strumming. (4) +
    + + + + +
    Arpeggio JazzGuitar
    Bass JazzGuitar
    Chord JazzGuitar
    +
    + + + + +
    +

    JazzGuitar3Walk

    + Aprpeggios and walking bass. (4) +
    + + + + +
    Arpeggio JazzGuitar
    Chord JazzGuitar
    Walk JazzGuitar
    +
    + + + + +
    +

    JazzGuitarSus

    + Sustained strings added to basic pattern. (4) +
    + + + + +
    Bass JazzGuitar
    Chord JazzGuitar
    Chord-Sus TremoloStrings
    +
    + + + + +
    +

    JazzGuitar1Sus

    + Sustained strings added to JazzGuitar1. (4) +
    + + + + + +
    Arpeggio JazzGuitar
    Bass JazzGuitar
    Chord JazzGuitar
    Chord-Sus TremoloStrings
    +
    + + + + +
    +

    JazzGuitar2Sus

    + Sustained strings added to JazzGuitar2. (4) +
    + + + + +
    Bass JazzGuitar
    Chord JazzGuitar
    Chord-Sus TremoloStrings
    +
    + + + + +
    +

    JazzGuitar3Sus

    + Sustained strings added to JazzGuitar3 (4) +
    + + + + + +
    Arpeggio JazzGuitar
    Bass JazzGuitar
    Chord JazzGuitar
    Chord-Sus TremoloStrings
    +
    + + + + +
    +

    JazzGuitarWalkSus

    + Sustained strings added to JazzGuitarWalk. (4) +
    + + + + +
    Chord JazzGuitar
    Chord-Sus TremoloStrings
    Walk JazzGuitar
    +
    + + + + +
    +

    JazzGuitar1WalkSus

    + Sustained strings added to JazzGuitarWalk1. (4) +
    + + + + + +
    Arpeggio JazzGuitar
    Chord JazzGuitar
    Chord-Sus TremoloStrings
    Walk JazzGuitar
    +
    + + + + +
    +

    JazzGuitar2WalkSus

    + Sustained strings added to JazzGuitarWalk2. (4) +
    + + + + +
    Chord JazzGuitar
    Chord-Sus TremoloStrings
    Walk JazzGuitar
    +
    + + + + +
    +

    JazzGuitar3WalkSus

    + Sustained strings added to JazzGuitarWalk3. (4) +
    + + + + + +
    Arpeggio JazzGuitar
    Chord JazzGuitar
    Chord-Sus TremoloStrings
    Walk JazzGuitar
    +
    + + + + +
    +

    JazzGuitarIntro

    + A 4 bar, arpeggiating introduction. (4) +
    + + + + +
    Arpeggio JazzGuitar
    Bass JazzGuitar
    Chord JazzGuitar
    +
    + + + + +
    +

    JazzGuitar1Intro

    + A 4 bar intro with a bass run on bar 4. (4) +
    + + + +
    Bass JazzGuitar
    Chord JazzGuitar
    +
    + + + + +
    +

    JazzGuitarEnd

    + Soft, 2 bar ending. (2) +
    + + + +
    Bass JazzGuitar
    Chord JazzGuitar
    +
    + + + + +
    +

    JazzGuitarEnd1

    + Soft, 1 bar ending. (1) +
    + + + +
    Bass JazzGuitar
    Chord JazzGuitar
    +
    + + diff --git a/mma/docs/html/lib/stdlib/jazzwaltz.html b/mma/docs/html/lib/stdlib/jazzwaltz.html index e6a9c21..e5f8efc 100644 --- a/mma/docs/html/lib/stdlib/jazzwaltz.html +++ b/mma/docs/html/lib/stdlib/jazzwaltz.html @@ -1,4 +1,4 @@ - +

    Jazzwaltz

    @@ -15,7 +15,6 @@
  • JazzWaltz1End -

    JazzWaltz

    @@ -34,7 +33,6 @@
    -

    JazzWaltzSus

    @@ -54,7 +52,6 @@
    -

    JazzWaltz1

    @@ -74,7 +71,6 @@
    -

    JazzWaltz1Sus

    @@ -95,7 +91,6 @@
    -

    JazzWaltzIntro

    @@ -114,7 +109,6 @@
    -

    JazzWaltzIntro8

    @@ -133,7 +127,6 @@
    -

    JazzWaltzFill

    @@ -151,7 +144,6 @@
    -

    JazzWaltzEnd

    @@ -169,7 +161,6 @@
    -

    JazzWaltz1End

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

    Jive

    @@ -20,7 +20,6 @@
  • JiveEnd -

    Jive

    @@ -38,7 +37,6 @@
    -

    JiveClap

    @@ -57,7 +55,6 @@
    -

    JiveSus

    @@ -76,7 +73,6 @@
    -

    JiveClapSus

    @@ -96,7 +92,6 @@
    -

    JivePlus

    @@ -115,7 +110,6 @@
    -

    JiveSusPlus

    @@ -135,7 +129,6 @@
    -

    Jive1

    @@ -153,7 +146,6 @@
    -

    Jive1Clap

    @@ -172,7 +164,6 @@
    -

    Jive1Sus

    @@ -191,7 +182,6 @@
    -

    Jive1ClapSus

    @@ -211,7 +201,6 @@
    -

    Jive1Plus

    @@ -230,7 +219,6 @@
    -

    Jive1SusPlus

    @@ -250,7 +238,6 @@
    -

    JiveIntro

    @@ -269,7 +256,6 @@
    -

    JiveEnd

    diff --git a/mma/docs/html/lib/stdlib/lfusion.html b/mma/docs/html/lib/stdlib/lfusion.html index 7bc3c2c..d31dbef 100644 --- a/mma/docs/html/lib/stdlib/lfusion.html +++ b/mma/docs/html/lib/stdlib/lfusion.html @@ -1,4 +1,4 @@ - +

    Lfusion

    @@ -12,7 +12,6 @@
  • Lfusion1End -

    LFusion

    @@ -41,7 +40,6 @@
    -

    LFusionSus

    @@ -70,7 +68,6 @@
    -

    LFusion1

    @@ -98,7 +95,6 @@
    -

    LFusion1Sus

    @@ -127,7 +123,6 @@
    -

    LFusionEnd

    @@ -150,7 +145,6 @@
    -

    Lfusion1End

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

    Lighttango

    @@ -8,11 +8,11 @@
  • LightTangoSus
  • LightTango1
  • LightTango1Sus +
  • LightTangoFill
  • LightTangoIntro
  • LightTangoEnd -

    LightTango

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

    LightTangoSus

    @@ -55,7 +54,6 @@
    -

    LightTango1

    @@ -76,7 +74,6 @@
    -

    LightTango1Sus

    @@ -97,8 +94,26 @@

  • + + + + +
    +

    LightTangoFill

    + A one bar fill pattern. (1) +
    + + + + + + + + + +
    Bass AcousticBass
    Bass-Piano Piano1
    Chord-Accordion Accordion
    Chord-Guitar NylonGuitar
    Drum-Clave Claves
    Drum-Kick KickDrum1
    Drum-Phh PedalHiHat
    Drum-Snare SnareDrum1
    +
    -

    LightTangoIntro

    @@ -119,7 +134,6 @@
    -

    LightTangoEnd

    diff --git a/mma/docs/html/lib/stdlib/lullaby.html b/mma/docs/html/lib/stdlib/lullaby.html new file mode 100644 index 0000000..500a312 --- /dev/null +++ b/mma/docs/html/lib/stdlib/lullaby.html @@ -0,0 +1,125 @@ + + + +

    Lullaby

    +

    Gentle, soft lullaby in 4. Written for "Good Night". +

    + + + +
    +

    Variables

    +
    + + + + + + + + + +
    ChordVoice Voice used in Chord tracks (defaults to JazzGuitar).
    ChordOctave Octave for Chord track (default 4)
    +
    +

    + + + + +
    +

    Lullaby

    + Just a solo guitar in 4. (1) +
    + + +
    Chord JazzGuitar
    +
    + + + + +
    +

    Lullaby1

    + Adds in a bit of bass. (1) +
    + + + +
    Bass JazzGuitar
    Chord JazzGuitar
    +
    + + + + +
    +

    LullabyWalk

    + Adds an 8th note walking bass line. (1) +
    + + + +
    Chord JazzGuitar
    Walk JazzGuitar
    +
    + + + + +
    +

    LullabySus

    + Add some sustained strings to our guitar. (1) +
    + + + +
    Chord JazzGuitar
    Chord-Sus SlowStrings
    +
    + + + + +
    +

    Lullaby1Sus

    + A bit of bass with the strings. (1) +
    + + + + +
    Bass JazzGuitar
    Chord JazzGuitar
    Chord-Sus SlowStrings
    +
    + + + + +
    +

    LullabyWalkSus

    + Strings and walking bass. (1) +
    + + + + +
    Chord JazzGuitar
    Chord-Sus SlowStrings
    Walk JazzGuitar
    +
    + + + + +
    +

    LullabyEnd

    + Two half notes on the guitar. (1) +
    + + +
    Chord JazzGuitar
    +
    + + diff --git a/mma/docs/html/lib/stdlib/mambo.html b/mma/docs/html/lib/stdlib/mambo.html index fb0d4d0..e93a912 100644 --- a/mma/docs/html/lib/stdlib/mambo.html +++ b/mma/docs/html/lib/stdlib/mambo.html @@ -1,4 +1,4 @@ - +

    Mambo

    @@ -16,7 +16,6 @@
  • MamboEnd -

    Mambo

    @@ -37,7 +36,6 @@
    -

    Mambo1

    @@ -58,7 +56,6 @@
    -

    Mambo2

    @@ -80,7 +77,6 @@
    -

    Mambo3

    @@ -102,7 +98,6 @@
    -

    MamboSus

    @@ -124,7 +119,6 @@
    -

    Mambo1Sus

    @@ -146,7 +140,6 @@
    -

    Mambo2Sus

    @@ -169,7 +162,6 @@
    -

    Mambo3Sus

    @@ -192,7 +184,6 @@
    -

    MamboIntro

    @@ -213,7 +204,6 @@
    -

    MamboEnd

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

    March

    @@ -15,7 +15,6 @@
  • MarchEnd -

    MilIntro4

    @@ -29,7 +28,6 @@
    -

    MilIntro2

    @@ -43,7 +41,6 @@
    -

    March

    @@ -61,7 +58,6 @@
    -

    March1

    @@ -80,7 +76,6 @@
    -

    March1Slow

    @@ -98,7 +93,6 @@
    -

    March2

    @@ -116,7 +110,6 @@
    -

    March3

    @@ -136,7 +129,6 @@
    -

    March4

    @@ -155,7 +147,6 @@
    -

    MarchEnd

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

    Merengue

    @@ -14,7 +14,6 @@
  • MerengueEnd -

    Merengue

    @@ -34,7 +33,6 @@
    -

    Merengue1

    @@ -54,7 +52,6 @@
    -

    Merengue2

    @@ -75,7 +72,6 @@
    -

    MerengueSus

    @@ -96,7 +92,6 @@
    -

    Merengue1Sus

    @@ -117,7 +112,6 @@
    -

    Merengue2Sus

    @@ -139,7 +133,6 @@
    -

    MerengueIntro

    @@ -159,7 +152,6 @@
    -

    MerengueEnd

    diff --git a/mma/docs/html/lib/stdlib/metronome.html b/mma/docs/html/lib/stdlib/metronome.html index 0dbcf0e..7b23275 100644 --- a/mma/docs/html/lib/stdlib/metronome.html +++ b/mma/docs/html/lib/stdlib/metronome.html @@ -1,4 +1,4 @@ - +

    Metronome

    @@ -9,7 +9,6 @@
  • Metronome2-4 -

    Metronome2

    @@ -23,7 +22,6 @@
    -

    Metronome4

    @@ -37,7 +35,6 @@
    -

    Metronome2-4

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

    Metronome3

    @@ -7,7 +7,6 @@
  • Metronome3 -

    Metronome3

    diff --git a/mma/docs/html/lib/stdlib/modernjazz.html b/mma/docs/html/lib/stdlib/modernjazz.html index 2f3f1f9..b219429 100644 --- a/mma/docs/html/lib/stdlib/modernjazz.html +++ b/mma/docs/html/lib/stdlib/modernjazz.html @@ -1,8 +1,22 @@ - +

    Modernjazz

    A jazz style which has a bit of raunch and swing. Works well with Peggy Lee's "Fever". +

    + + + +
    +

    Variables

    +
    + + + + + +
    ApreggioVoice Voice for the alternating apreggios in ModernJazz1 (Default=MutedTrumpet). Also used in Introduction and Ending.
    +

    -

    ModernJazz

    @@ -32,7 +45,6 @@
    -

    ModernJazz1

    @@ -54,7 +66,6 @@
    -

    ModernJazzSus

    @@ -75,7 +86,6 @@
    -

    ModernJazz1Sus

    @@ -98,7 +108,6 @@
    -

    ModernJazzIntro

    @@ -118,7 +127,6 @@
    -

    ModernJazzEnd

    diff --git a/mma/docs/html/lib/stdlib/pianoballad.html b/mma/docs/html/lib/stdlib/pianoballad.html index 28b58a9..0c11e71 100644 --- a/mma/docs/html/lib/stdlib/pianoballad.html +++ b/mma/docs/html/lib/stdlib/pianoballad.html @@ -1,4 +1,4 @@ - +

    Pianoballad

    @@ -12,7 +12,6 @@
  • PianoBalladEnd -

    PianoBallad

    @@ -30,7 +29,6 @@
    -

    PianoBallad1

    @@ -49,7 +47,6 @@
    -

    PianoBalladSus

    @@ -68,7 +65,6 @@
    -

    PianoBallad1Sus

    @@ -88,7 +84,6 @@
    -

    PianoBalladIntro

    @@ -106,7 +101,6 @@
    -

    PianoBalladEnd

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

    Polka

    @@ -16,7 +16,6 @@
  • PolkaEnd -

    Polka

    @@ -36,7 +35,6 @@
    -

    PolkaSus

    @@ -57,7 +55,6 @@
    -

    PolkaArp

    @@ -78,7 +75,6 @@
    -

    PolkaSusArp

    @@ -100,7 +96,6 @@
    -

    Polka1

    @@ -120,7 +115,6 @@
    -

    Polka1Sus

    @@ -141,7 +135,6 @@
    -

    Polka1Arp

    @@ -162,7 +155,6 @@
    -

    Polka1SusArp

    @@ -184,7 +176,6 @@
    -

    PolkaIntro

    @@ -203,7 +194,6 @@
    -

    PolkaEnd

    diff --git a/mma/docs/html/lib/stdlib/popballad.html b/mma/docs/html/lib/stdlib/popballad.html index 1565c4c..8f49e7d 100644 --- a/mma/docs/html/lib/stdlib/popballad.html +++ b/mma/docs/html/lib/stdlib/popballad.html @@ -1,4 +1,4 @@ - +

    Popballad

    @@ -7,10 +7,11 @@
  • PopBallad
  • PopBallad1
  • PopBallad2 +
  • PopBalladSus +
  • PopBalladIntro
  • PopBalladEnd -

    PopBallad

    @@ -31,7 +32,6 @@
    -

    PopBallad1

    @@ -55,7 +55,6 @@
    -

    PopBallad2

    @@ -74,8 +73,48 @@

  • + + + + +
    +

    PopBalladSus

    + A slightly lighter version, with strings. (4) +
    + + + + + + + + + + + +
    Arpeggio Atmosphere
    Bass AcousticBass
    Chord Piano2
    Chord-Sus TremoloStrings
    Drum-Cabasa Cabasa
    Drum-Cym CrashCymbal1
    Drum-Hh ClosedHiHat
    Drum-Kick KickDrum1
    Drum-Shake Shaker
    Drum-Snare SnareDrum1
    +
    + + + + +
    +

    PopBalladIntro

    + A simple introduction. (4) +
    + + + + + + + + + + +
    Arpeggio Atmosphere
    Bass AcousticBass
    Chord Piano2
    Drum-Cabasa Cabasa
    Drum-Cym CrashCymbal1
    Drum-Hh ClosedHiHat
    Drum-Kick KickDrum1
    Drum-Shake Shaker
    Drum-Snare SnareDrum1
    +
    -

    PopBalladEnd

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

    Quickstep

    @@ -14,7 +14,6 @@
  • QuickStepEnd -

    QuickStep

    @@ -32,7 +31,6 @@
    -

    QuickStepHit

    @@ -51,7 +49,6 @@
    -

    QuickStepSus

    @@ -70,7 +67,6 @@
    -

    QuickStepHitSus

    @@ -90,7 +86,6 @@
    -

    QuickStepDuh

    @@ -109,7 +104,6 @@
    -

    QuickStepDuhSus

    @@ -129,7 +123,6 @@
    -

    QuickStepIntro

    @@ -147,7 +140,6 @@
    -

    QuickStepEnd

    diff --git a/mma/docs/html/lib/stdlib/rb.html b/mma/docs/html/lib/stdlib/rb.html index e9f2942..9d0ee13 100644 --- a/mma/docs/html/lib/stdlib/rb.html +++ b/mma/docs/html/lib/stdlib/rb.html @@ -1,4 +1,4 @@ - +

    Rb

    @@ -10,7 +10,6 @@
  • R&BEnd -

    R&B

    @@ -32,7 +31,6 @@
    -

    R&BSus

    @@ -54,7 +52,6 @@
    -

    R&BIntro

    @@ -75,7 +72,6 @@
    -

    R&BEnd

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

    Rhumba

    @@ -23,7 +23,6 @@
  • RhumbaEnd1 -

    Rhumba

    @@ -45,7 +44,6 @@
    -

    RhumbaSus

    @@ -68,7 +66,6 @@
    -

    RhumbaTriple

    @@ -89,7 +86,6 @@
    -

    RhumbaTripleSus

    @@ -111,7 +107,6 @@
    -

    RhumbaTriple12

    @@ -132,7 +127,6 @@
    -

    RhumbaTriple12Sus

    @@ -154,7 +148,6 @@
    -

    RhumbaTriple34

    @@ -176,7 +169,6 @@
    -

    RhumbaTriple34Sus

    @@ -198,7 +190,6 @@
    -

    Rhumba1

    @@ -221,7 +212,6 @@
    -

    Rhumba1Sus

    @@ -245,7 +235,6 @@
    -

    Rhumba2

    @@ -268,7 +257,6 @@
    -

    Rhumba2Sus

    @@ -292,7 +280,6 @@
    -

    Rhumba3

    @@ -315,7 +302,6 @@
    -

    Rhumba3Sus

    @@ -339,7 +325,6 @@
    -

    RhumbaIntro

    @@ -360,7 +345,6 @@
    -

    RhumbaEnd

    @@ -383,7 +367,6 @@
    -

    RhumbaEnd1

    diff --git a/mma/docs/html/lib/stdlib/rock-128.html b/mma/docs/html/lib/stdlib/rock-128.html index 9931e6b..fd2308c 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

    @@ -10,7 +10,6 @@
  • Rock128End -

    Rock128

    @@ -27,7 +26,6 @@
    -

    Rock128Sus

    @@ -46,7 +44,6 @@
    -

    Rock128Intro

    @@ -63,7 +60,6 @@
    -

    Rock128End

    diff --git a/mma/docs/html/lib/stdlib/rockballad.html b/mma/docs/html/lib/stdlib/rockballad.html index 6fa657c..e2576d5 100644 --- a/mma/docs/html/lib/stdlib/rockballad.html +++ b/mma/docs/html/lib/stdlib/rockballad.html @@ -1,17 +1,37 @@ - +

    Rockballad

    Written for slowish/doo-wop things like "You Belong To Me". +

    + + + +
    +

    Variables

    +
    + + + + + + + + + +
    SusVoice Voice used for sustained voicing in RockBalladVoice (default=ChoirAahs).
    SusVoiceOctave Octave for sustained voices (default=4).
    +

    -

    RockBallad

    @@ -28,8 +48,24 @@

    + + + + +
    +

    RockBallad1

    + Same as the basic pattern, but skips the chord triplet on bar 4. (4) +
    + + + + + + + +
    Bass FretlessBass
    Chord JazzGuitar
    Drum ClosedHiHat
    Drum-Kick KickDrum1
    Drum-Snare SnareDrum1
    Walk FretlessBass
    +
    -

    RockBalladFill

    @@ -47,8 +83,25 @@

  • + + + + +
    +

    RockBallad1Fill

    + Guitar apreggio fills without 4th bar triplets. (4) +
    + + + + + + + + +
    Arpeggio JazzGuitar
    Bass FretlessBass
    Chord JazzGuitar
    Drum ClosedHiHat
    Drum-Kick KickDrum1
    Drum-Snare SnareDrum1
    Walk FretlessBass
    +
    -

    RockBalladVoice

    @@ -67,7 +120,6 @@
    -

    RockBalladIntro

    @@ -85,7 +137,6 @@
    -

    RockBalladEnd

    @@ -102,5 +153,21 @@

  • + + + + +
    +

    RockBalladEnd1

    + Simple 2 bar ending. (2) +
    + + + + + + +
    Bass FretlessBass
    Chord JazzGuitar
    Drum ClosedHiHat
    Drum-Kick KickDrum1
    Drum-Snare SnareDrum1
    +
    diff --git a/mma/docs/html/lib/stdlib/samba.html b/mma/docs/html/lib/stdlib/samba.html index f8f39e6..30fa59a 100644 --- a/mma/docs/html/lib/stdlib/samba.html +++ b/mma/docs/html/lib/stdlib/samba.html @@ -1,4 +1,4 @@ - +

    Samba

    @@ -14,7 +14,6 @@
  • SambaEnd -

    Samba

    @@ -35,7 +34,6 @@
    -

    SambaFill

    @@ -57,7 +55,6 @@
    -

    SambaPlus

    @@ -78,7 +75,6 @@
    -

    SambaSus

    @@ -100,7 +96,6 @@
    -

    SambaSusFill

    @@ -123,7 +118,6 @@
    -

    SambaSusPlus

    @@ -145,7 +139,6 @@
    -

    SambaIntro

    @@ -166,7 +159,6 @@
    -

    SambaEnd

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

    Shuffleboggie

    +

    A blues-like shuffle beat. Written for Kansas City. +

    + + + + +
    +

    ShuffleBoggie

    + Blues with a shuffle style. (2) +
    + + + + + + + + + + + +
    Bass SlapBass1
    Bass-Piano Piano2
    Chord-Guitar MutedGuitar
    Chord-Piano Piano2
    Chord-Sax TenorSax
    Drum-Chh ClosedHiHat
    Drum-Clap HandClap
    Drum-Kick KickDrum1
    Drum-Ohh OpenHiHat
    Drum-Snare SnareDrum2
    +
    + + + + +
    +

    ShuffleBoggie1

    + Adds an articulated guitar riff to the basic beat. (2) +
    + + + + + + + + + + + + +
    Arpeggio CleanGuitar
    Bass SlapBass1
    Bass-Piano Piano2
    Chord-Guitar MutedGuitar
    Chord-Piano Piano2
    Chord-Sax TenorSax
    Drum-Chh ClosedHiHat
    Drum-Clap HandClap
    Drum-Kick KickDrum1
    Drum-Ohh OpenHiHat
    Drum-Snare SnareDrum2
    +
    + + + + +
    +

    ShuffleBoggieSus

    + Blues with violins. Sort of odd, but we can call them fiddles! (2) +
    + + + + + + + + + + + + +
    Bass SlapBass1
    Bass-Piano Piano2
    Chord-Guitar MutedGuitar
    Chord-Piano Piano2
    Chord-Sax TenorSax
    Chord-Sus Strings
    Drum-Chh ClosedHiHat
    Drum-Clap HandClap
    Drum-Kick KickDrum1
    Drum-Ohh OpenHiHat
    Drum-Snare SnareDrum2
    +
    + + + + +
    +

    ShuffleBoggieIntro

    + A two bar intro. Short, loud and sweet. (2) +
    + + + + + + + + + +
    Bass SlapBass1
    Chord-Guitar MutedGuitar
    Chord-Piano Piano2
    Chord-Sax TenorSax
    Drum-Chh ClosedHiHat
    Drum-Clap HandClap
    Drum-Kick KickDrum1
    Drum-Snare SnareDrum2
    +
    + + + + +
    +

    ShuffleBoggieIntro4

    + A four bar intro. (4) +
    + + + + + + + + + +
    Bass SlapBass1
    Chord-Guitar MutedGuitar
    Chord-Piano Piano2
    Chord-Sax TenorSax
    Drum-Chh ClosedHiHat
    Drum-Clap HandClap
    Drum-Kick KickDrum1
    Drum-Snare SnareDrum2
    +
    + + + + +
    +

    ShuffleBoggieEnd

    + Very simple ending, hits on 1, 2 and 3 of last bar. (2) +
    + + + + + + + + + +
    Bass SlapBass1
    Chord-Guitar MutedGuitar
    Chord-Piano Piano2
    Chord-Sax TenorSax
    Drum-Chh ClosedHiHat
    Drum-Clap HandClap
    Drum-Kick KickDrum1
    Drum-Snare SnareDrum2
    +
    + + diff --git a/mma/docs/html/lib/stdlib/ska.html b/mma/docs/html/lib/stdlib/ska.html index 5fbe6dd..e3d90c8 100644 --- a/mma/docs/html/lib/stdlib/ska.html +++ b/mma/docs/html/lib/stdlib/ska.html @@ -1,4 +1,4 @@ - +

    Ska

    @@ -12,7 +12,6 @@
  • SkaEnd -

    Ska

    @@ -34,7 +33,6 @@
    -

    Ska1

    @@ -57,7 +55,6 @@
    -

    SkaSus

    @@ -80,7 +77,6 @@
    -

    Ska1Sus

    @@ -104,7 +100,6 @@
    -

    SkaClap

    @@ -127,7 +122,6 @@
    -

    SkaEnd

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

    Slowblues

    @@ -18,7 +18,6 @@
  • SlowBluesEnd -

    SlowBlues

    @@ -36,7 +35,6 @@
    -

    SlowBluesFill

    @@ -54,7 +52,6 @@
    -

    SlowBluesFill1

    @@ -72,7 +69,6 @@
    -

    SlowBluesFill2

    @@ -90,7 +86,6 @@
    -

    SlowBluesFill3

    @@ -108,7 +103,6 @@
    -

    SlowBluesSus

    @@ -127,7 +121,6 @@
    -

    SlowBluesWalk4

    @@ -144,7 +137,6 @@
    -

    SlowBluesWalk4Sus

    @@ -162,7 +154,6 @@
    -

    SlowBluesWalk8

    @@ -180,7 +171,6 @@
    -

    SlowBluesWalk8Sus

    @@ -199,7 +189,6 @@
    -

    SlowBluesIntro

    @@ -216,7 +205,6 @@
    -

    SlowBluesEnd

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

    Slowbolero

    @@ -10,7 +10,6 @@
  • SlowBoleroEnd -

    SlowBolero

    @@ -32,7 +31,6 @@
    -

    SlowBoleroSus

    @@ -55,7 +53,6 @@
    -

    SlowBoleroIntro

    @@ -77,7 +74,6 @@
    -

    SlowBoleroEnd

    diff --git a/mma/docs/html/lib/stdlib/slowcountry.html b/mma/docs/html/lib/stdlib/slowcountry.html index da757ee..01080d2 100644 --- a/mma/docs/html/lib/stdlib/slowcountry.html +++ b/mma/docs/html/lib/stdlib/slowcountry.html @@ -1,4 +1,4 @@ - +

    Slowcountry

    @@ -14,7 +14,6 @@
  • SlowCountryEnd -

    SlowCountry

    @@ -32,7 +31,6 @@
    -

    SlowCountrySus

    @@ -51,7 +49,6 @@
    -

    SlowCountryFill

    @@ -70,7 +67,6 @@
    -

    SlowCountryWalk

    @@ -86,7 +82,6 @@
    -

    SlowCountryWalkSus

    @@ -103,7 +98,6 @@
    -

    SlowCountryWalkFill

    @@ -122,7 +116,6 @@
    -

    SlowCountryIntro

    @@ -139,7 +132,6 @@
    -

    SlowCountryEnd

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

    Slowjazz

    @@ -21,7 +21,6 @@
  • SlowJazz2End -

    SlowJazz

    @@ -39,7 +38,6 @@
    -

    SlowJazzSus

    @@ -58,7 +56,6 @@
    -

    SlowJazzWalk

    @@ -75,7 +72,6 @@
    -

    SlowJazzWalkSus

    @@ -93,7 +89,6 @@
    -

    SlowJazz1

    @@ -111,7 +106,6 @@
    -

    SlowJazz1Sus

    @@ -130,7 +124,6 @@
    -

    SlowJazz1Walk

    @@ -147,7 +140,6 @@
    -

    SlowJazz1WalkSus

    @@ -165,7 +157,6 @@
    -

    SlowJazz2

    @@ -183,7 +174,6 @@
    -

    SlowJazz2Sus

    @@ -202,7 +192,6 @@
    -

    SlowJazzIntro

    @@ -220,7 +209,6 @@
    -

    SlowJazz1Intro

    @@ -238,7 +226,6 @@
    -

    SlowJazz2Intro

    @@ -255,7 +242,6 @@
    -

    SlowJazzEnd

    @@ -272,7 +258,6 @@
    -

    SlowJazz2End

    diff --git a/mma/docs/html/lib/stdlib/softrock.html b/mma/docs/html/lib/stdlib/softrock.html index 6aa4d33..2418439 100644 --- a/mma/docs/html/lib/stdlib/softrock.html +++ b/mma/docs/html/lib/stdlib/softrock.html @@ -1,4 +1,4 @@ - +

    Softrock

    @@ -13,7 +13,6 @@
  • SoftRockEnd -

    SoftRock

    @@ -31,7 +30,6 @@
    -

    SoftRockSus

    @@ -50,7 +48,6 @@
    -

    SoftRock1

    @@ -69,7 +66,6 @@
    -

    SoftRock1Sus

    @@ -89,7 +85,6 @@
    -

    SoftRockIntro

    @@ -106,7 +101,6 @@
    -

    SoftRockSusIntro

    @@ -124,7 +118,6 @@
    -

    SoftRockEnd

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

    Softshoe

    Syncopated ditty for the old dancers. Written for "Me and My Shadow". +

    + + + +
    +

    Variables

    +
    + + + + + +
    ChordVoice Voice used in Chord tracks (defaults to Piano2).
    +

    -

    Softshoe

    @@ -30,7 +43,6 @@
    -

    SoftShoePlus

    @@ -49,7 +61,6 @@
    -

    SoftShoeSus

    @@ -68,7 +79,6 @@
    -

    SoftShoeSusPlus

    @@ -88,7 +98,6 @@
    -

    SoftShoeIntro

    @@ -105,7 +114,6 @@
    -

    SoftShoeEnd

    diff --git a/mma/docs/html/lib/stdlib/son.html b/mma/docs/html/lib/stdlib/son.html index 7b188a4..2e9574c 100644 --- a/mma/docs/html/lib/stdlib/son.html +++ b/mma/docs/html/lib/stdlib/son.html @@ -1,4 +1,4 @@ - +

    Son

    @@ -10,7 +10,6 @@
  • SonEnd -

    Son

    @@ -33,7 +32,6 @@
    -

    SonSus

    @@ -57,7 +55,6 @@
    -

    SonIntro

    @@ -80,7 +77,6 @@
    -

    SonEnd

    diff --git a/mma/docs/html/lib/stdlib/swing.html b/mma/docs/html/lib/stdlib/swing.html index 9a88ccd..2929643 100644 --- a/mma/docs/html/lib/stdlib/swing.html +++ b/mma/docs/html/lib/stdlib/swing.html @@ -1,4 +1,4 @@ - +

    Swing

    @@ -34,7 +34,6 @@
  • Swing2End -

    Swing

    @@ -55,7 +54,6 @@
    -

    SwingWalk

    @@ -76,7 +74,6 @@
    -

    SwingTriple

    @@ -97,7 +94,6 @@
    -

    SwingPlus

    @@ -119,7 +115,6 @@
    -

    SwingWalkPlus

    @@ -141,7 +136,6 @@
    -

    SwingSus

    @@ -163,7 +157,6 @@
    -

    SwingPlusSus

    @@ -186,7 +179,6 @@
    -

    SwingWalkSus

    @@ -208,7 +200,6 @@
    -

    SwingWalkPlusSus

    @@ -231,7 +222,6 @@
    -

    Swing1

    @@ -252,7 +242,6 @@
    -

    Swing1Walk

    @@ -273,7 +262,6 @@
    -

    Swing1Triple

    @@ -293,7 +281,6 @@
    -

    Swing1Sus

    @@ -315,7 +302,6 @@
    -

    Swing1WalkSus

    @@ -337,7 +323,6 @@
    -

    Swing1Plus

    @@ -359,7 +344,6 @@
    -

    Swing1PlusSus

    @@ -382,7 +366,6 @@
    -

    Swing1WalkPlus

    @@ -404,7 +387,6 @@
    -

    Swing1WalkPlusSus

    @@ -427,7 +409,6 @@
    -

    Swing2

    @@ -449,7 +430,6 @@
    -

    Swing2Triple

    @@ -469,7 +449,6 @@
    -

    Swing2Plus

    @@ -492,7 +471,6 @@
    -

    Swing2Sus

    @@ -515,7 +493,6 @@
    -

    Swing2PlusSus

    @@ -539,7 +516,6 @@
    -

    SwingIntro

    @@ -560,7 +536,6 @@
    -

    SwingIntro2

    @@ -581,7 +556,6 @@
    -

    SwingEnd

    @@ -600,7 +574,6 @@
    -

    Swing1End

    @@ -621,7 +594,6 @@
    -

    Swing2End

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

    Tango

    @@ -9,7 +9,6 @@
  • TangoEnd -

    Tango

    @@ -30,7 +29,6 @@
    -

    Tango1

    @@ -51,7 +49,6 @@
    -

    TangoEnd

    diff --git a/mma/docs/html/lib/stdlib/vienesewaltz.html b/mma/docs/html/lib/stdlib/vienesewaltz.html index d392024..638793b 100644 --- a/mma/docs/html/lib/stdlib/vienesewaltz.html +++ b/mma/docs/html/lib/stdlib/vienesewaltz.html @@ -1,4 +1,4 @@ - +

    Vienesewaltz

    @@ -11,7 +11,6 @@
  • VieneseWaltzEnd -

    VieneseWaltz

    @@ -28,7 +27,6 @@
    -

    VieneseWaltzSus

    @@ -46,7 +44,6 @@
    -

    VieneseWaltz1

    @@ -64,7 +61,6 @@
    -

    VieneseWaltz1Sus

    @@ -83,7 +79,6 @@
    -

    VieneseWaltzEnd

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

    Waltz

    @@ -17,7 +17,6 @@
  • WaltzEnd -

    Waltz

    @@ -36,7 +35,6 @@
    -

    WaltzSus

    @@ -56,7 +54,6 @@
    -

    Waltz1

    @@ -77,7 +74,6 @@
    -

    Waltz1Sus

    @@ -99,7 +95,6 @@
    -

    WaltzWalk

    @@ -117,7 +112,6 @@
    -

    WaltzWalkSus

    @@ -136,7 +130,6 @@
    -

    Waltz1Walk

    @@ -156,7 +149,6 @@
    -

    Waltz1WalkSus

    @@ -177,7 +169,6 @@
    -

    WaltzIntro

    @@ -196,7 +187,6 @@
    -

    Waltz1Intro

    @@ -215,7 +205,6 @@
    -

    WaltzEnd

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

    Zydeco

    @@ -13,7 +13,6 @@
  • ZydecoPlusEnd -

    Zydeco

    @@ -29,7 +28,6 @@
    -

    ZydecoPlus

    @@ -46,7 +44,6 @@
    -

    ZydecoSus

    @@ -63,7 +60,6 @@
    -

    ZydecoSusPlus

    @@ -81,7 +77,6 @@
    -

    ZydecoIntro

    @@ -97,7 +92,6 @@
    -

    ZydecoEnd

    @@ -113,7 +107,6 @@
    -

    @@ -225,7 +223,7 @@ just sets the variable $test with no value. @@ -233,15 +231,21 @@ just sets the variable $test with no value. + MIDISMF section here. + + +.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.


    @@ -272,7 +276,7 @@ The current installation of

    MMA will update the groove database with all files in the - current LIBPATH. All files must have a ``.mma'' + 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. @@ -283,18 +287,19 @@ The current installation of just in case something really goes wrong.

    +details here. @@ -326,21 +332,6 @@ The current installation of - - - - - - - - - - - - - - -

    ZydecoPlusEnd

    diff --git a/mma/docs/html/lib/yamaha/mambo.html b/mma/docs/html/lib/yamaha/mambo.html new file mode 100644 index 0000000..da3d8e9 --- /dev/null +++ b/mma/docs/html/lib/yamaha/mambo.html @@ -0,0 +1,309 @@ + + + +

    Mambo

    +

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

    + + + + +
    +

    Main-A

    + Good, basic beat. (4) +
    + + + + + + + + + + + + + + + +
    Bass-11 FingeredBass
    Bass-13 JazzGuitar
    Bass-9 Piano1
    Chord-12 Piano1
    Chord-15 BrassSection
    Chord-4 Piano1
    Drum-Claves Claves
    Drum-Cowbell CowBell
    Drum-Highbongo HighBongo
    Drum-Lowbongo LowBongo
    Drum-Lowconga LowConga
    Drum-Maracas Maracas
    Drum-Mutehighconga MuteHighConga
    Drum-Openhighconga OpenHighConga
    +
    + + + + +
    +

    Fill-AA

    + An okay single bar fill for Main-A. (1) +
    + + + + + + + + + + + + + + +
    Bass-11 FingeredBass
    Bass-13 JazzGuitar
    Bass-9 Piano1
    Chord-12 Piano1
    Chord-4 Piano1
    Drum-Claves Claves
    Drum-Cowbell CowBell
    Drum-Highbongo HighBongo
    Drum-Lowbongo LowBongo
    Drum-Lowconga LowConga
    Drum-Maracas Maracas
    Drum-Mutehighconga MuteHighConga
    Drum-Openhighconga OpenHighConga
    +
    + + + + +
    +

    Fill-AB

    + Single bar horn fill. (1) +
    + + + + + + + + + + + + +
    Bass-13 JazzGuitar
    Bass-9 Piano1
    Chord-12 Piano1
    Chord-15 BrassSection
    Chord-4 Piano1
    Drum-Highbongo HighBongo
    Drum-Lowbongo LowBongo
    Drum-Lowconga LowConga
    Drum-Maracas Maracas
    Drum-Mutehighconga MuteHighConga
    Drum-Openhighconga OpenHighConga
    +
    + + + + +
    +

    Intro-A

    + Good horns, but odd sounding piano/bass. (2) +
    + + + + + + + + + + + + +
    Bass-11 FingeredBass
    Bass-13 JazzGuitar
    Bass-16 TenorSax
    Bass-9 Piano1
    Chord-12 Piano1
    Chord-15 BrassSection
    Chord-4 Piano1
    Drum-Lowconga LowConga
    Drum-Maracas Maracas
    Drum-Openhighconga OpenHighConga
    Drum-Vibraslap VibraSlap
    +
    + + + + +
    +

    Ending-A

    + Rolling drums and final horns. (1) +
    + + + + + + + + + + +
    Bass-11 FingeredBass
    Bass-16 TenorSax
    Bass-9 Piano1
    Chord-12 Piano1
    Chord-15 BrassSection
    Chord-4 Piano1
    Drum-Lowconga LowConga
    Drum-Openhighconga OpenHighConga
    Drum-Shaker Shaker
    +
    + + + + +
    +

    Break-AA

    + A nice transition section. (2) +
    + + + + + + + + + + + + + + +
    Bass-11 FingeredBass
    Bass-13 JazzGuitar
    Bass-9 Piano1
    Chord-12 Piano1
    Chord-4 Piano1
    Drum-Claves Claves
    Drum-Cowbell CowBell
    Drum-Highbongo HighBongo
    Drum-Lowbongo LowBongo
    Drum-Lowconga LowConga
    Drum-Maracas Maracas
    Drum-Mutehighconga MuteHighConga
    Drum-Openhighconga OpenHighConga
    +
    + + + + +
    +

    Main-B

    + Nice variation of main pattern with horn section. (4) +
    + + + + + + + + + + + + + + + + + + +
    Bass-11 FingeredBass
    Bass-13 JazzGuitar
    Bass-16 TenorSax
    Bass-3 TenorSax
    Bass-9 Piano1
    Chord-12 Piano1
    Chord-15 BrassSection
    Chord-2 BrassSection
    Drum-Cabasa Cabasa
    Drum-Claves Claves
    Drum-Cowbell CowBell
    Drum-Highbongo HighBongo
    Drum-Lowbongo LowBongo
    Drum-Lowconga LowConga
    Drum-Maracas Maracas
    Drum-Mutehighconga MuteHighConga
    Drum-Openhighconga OpenHighConga
    +
    + + + + +
    +

    Fill-BA

    + Abrupt horns. Good for ending loop-back. (1) +
    + + + + + + + + + + + + +
    Bass-11 FingeredBass
    Bass-13 JazzGuitar
    Bass-9 Piano1
    Chord-12 Piano1
    Chord-15 BrassSection
    Chord-2 BrassSection
    Drum-Cowbell CowBell
    Drum-Highbongo HighBongo
    Drum-Lowbongo LowBongo
    Drum-Mutehighconga MuteHighConga
    Drum-Ridecymbal2 RideCymbal2
    +
    + + + + +
    +

    Fill-BB

    + Sharp horns make this a possible intro. (1) +
    + + + + + + + + + + + + + + + + +
    Bass-11 FingeredBass
    Bass-13 JazzGuitar
    Bass-9 Piano1
    Chord-12 Piano1
    Chord-15 BrassSection
    Chord-2 BrassSection
    Drum-Cabasa Cabasa
    Drum-Claves Claves
    Drum-Cowbell CowBell
    Drum-Highbongo HighBongo
    Drum-Lowbongo LowBongo
    Drum-Lowconga LowConga
    Drum-Maracas Maracas
    Drum-Mutehighconga MuteHighConga
    Drum-Openhighconga OpenHighConga
    +
    + + + + +
    +

    Intro-B

    + Decent enough introduction. (2) +
    + + + + + + + + + + + + + + +
    Bass-11 FingeredBass
    Bass-13 JazzGuitar
    Bass-16 TenorSax
    Bass-9 Piano1
    Chord-12 Piano1
    Chord-15 BrassSection
    Drum-Cabasa Cabasa
    Drum-Claves Claves
    Drum-Cowbell CowBell
    Drum-Lowconga LowConga
    Drum-Mutehighconga MuteHighConga
    Drum-Openhighconga OpenHighConga
    Drum-Shaker Shaker
    +
    + + + + +
    +

    Ending-B

    + Pretty busy, but might be okay with a slower tempo. (1) +
    + + + + + + + + + + + + + +
    Bass-11 FingeredBass
    Bass-9 Piano1
    Chord-12 Piano1
    Chord-15 BrassSection
    Drum-Claves Claves
    Drum-Cowbell CowBell
    Drum-Highbongo HighBongo
    Drum-Lowbongo LowBongo
    Drum-Lowconga LowConga
    Drum-Maracas Maracas
    Drum-Mutehighconga MuteHighConga
    Drum-Openhighconga OpenHighConga
    +
    + + + + +
    +

    Break-BB

    + Good fill with drums on bar 1 and horns on 2. (2) +
    + + + + + + + + + + + + + + + + + + +
    Bass-11 FingeredBass
    Bass-13 JazzGuitar
    Bass-9 Piano1
    Chord-12 Piano1
    Chord-15 BrassSection
    Drum-Cabasa Cabasa
    Drum-Claves Claves
    Drum-Cowbell CowBell
    Drum-Highagogo HighAgogo
    Drum-Highbongo HighBongo
    Drum-Hightimbale HighTimbale
    Drum-Lowbongo LowBongo
    Drum-Lowconga LowConga
    Drum-Lowtom2 LowTom2
    Drum-Maracas Maracas
    Drum-Mutehighconga MuteHighConga
    Drum-Openhighconga OpenHighConga
    +
    + + diff --git a/mma/docs/html/lib/yamaha/quando-g.s280.html b/mma/docs/html/lib/yamaha/quando-g.s280.html new file mode 100644 index 0000000..83980ac --- /dev/null +++ b/mma/docs/html/lib/yamaha/quando-g.s280.html @@ -0,0 +1,332 @@ + + + +

    Quando-G.S280

    +

    Converted from QUANDO-G.S280.sty. A nice, light samba. Use in a tempo range from 80 to 100 bpm (faster than that it sounds too busy). Library filename: yamaha/quando-g.s280.mma. +

    + + + + +
    +

    Main-A

    + Steady Samba beat. (8) +
    + + + + + + + +
    Bass-11 FingeredBass
    Chord-12 SteelGuitar
    Chord-15 Marimba
    Chord-9 Piano1
    Drum-Shaker Shaker
    Drum-Tambourine Tambourine
    +
    + + + + +
    +

    Fill-AA

    + Good fill for repeats with Main-A. (1) +
    + + + + + + + + + + +
    Bass-11 FingeredBass
    Chord-13 CleanGuitar
    Chord-15 Marimba
    Chord-9 Piano1
    Drum-Lowconga LowConga
    Drum-Mutehighconga MuteHighConga
    Drum-Openhighconga OpenHighConga
    Drum-Shaker Shaker
    Drum-Tambourine Tambourine
    +
    + + + + +
    +

    Intro-A

    + A one bar intro with a heavy hit on beat 1. (1) +
    + + + + + + + + + +
    Bass-11 FingeredBass
    Chord-12 SteelGuitar
    Chord-15 Marimba
    Chord-16 BrassSection
    Chord-9 Piano1
    Drum-Mutehighconga MuteHighConga
    Drum-Shaker Shaker
    Drum-Tambourine Tambourine
    +
    + + + + +
    +

    Ending-A

    + Good ending to go with Main-A. (2) +
    + + + + + + + + + + + +
    Bass-11 FingeredBass
    Chord-12 SteelGuitar
    Chord-15 Marimba
    Chord-16 BrassSection
    Chord-9 Piano1
    Drum-Lowconga LowConga
    Drum-Mutehighconga MuteHighConga
    Drum-Openhighconga OpenHighConga
    Drum-Shaker Shaker
    Drum-Tambourine Tambourine
    +
    + + + + +
    +

    Main-B

    + Adds horn section to Main-A. (8) +
    + + + + + + + + + +
    Bass-11 FingeredBass
    Chord-12 SteelGuitar
    Chord-15 Marimba
    Chord-16 BrassSection
    Chord-9 Piano1
    Drum-Mutehighconga MuteHighConga
    Drum-Shaker Shaker
    Drum-Tambourine Tambourine
    +
    + + + + +
    +

    Fill-BB

    + Fill for Main-B. (1) +
    + + + + + + + + + + + +
    Bass-11 FingeredBass
    Chord-13 CleanGuitar
    Chord-15 Marimba
    Chord-16 BrassSection
    Chord-9 Piano1
    Drum-Lowconga LowConga
    Drum-Mutehighconga MuteHighConga
    Drum-Openhighconga OpenHighConga
    Drum-Shaker Shaker
    Drum-Tambourine Tambourine
    +
    + + + + +
    +

    Fill-BA

    + Simple fill with horns. (1) +
    + + + + + + + + + + + +
    Bass-11 FingeredBass
    Chord-13 CleanGuitar
    Chord-15 Marimba
    Chord-16 BrassSection
    Chord-9 Piano1
    Drum-Lowconga LowConga
    Drum-Mutehighconga MuteHighConga
    Drum-Openhighconga OpenHighConga
    Drum-Shaker Shaker
    Drum-Tambourine Tambourine
    +
    + + + + +
    +

    Intro-B

    + This is an 8 bar introduction. The first 6 bars are a just a Main-A, but bars 7 and 8 have the anticipated hits. (8) +
    + + + + + + + + + + + +
    Bass-11 FingeredBass
    Chord-12 SteelGuitar
    Chord-15 Marimba
    Chord-16 BrassSection
    Chord-9 Piano1
    Drum-Lowconga LowConga
    Drum-Mutehighconga MuteHighConga
    Drum-Openhighconga OpenHighConga
    Drum-Shaker Shaker
    Drum-Tambourine Tambourine
    +
    + + + + +
    +

    Ending-B

    + This 8 bar ending duplicates Main-B with a single bar "ending". (8) +
    + + + + + + + + + + + + + +
    Bass-11 FingeredBass
    Chord-12 SteelGuitar
    Chord-15 Marimba
    Chord-16 BrassSection
    Chord-9 Piano1
    Drum-Highagogo HighAgogo
    Drum-Lowagogo LowAgogo
    Drum-Lowconga LowConga
    Drum-Mutehighconga MuteHighConga
    Drum-Openhighconga OpenHighConga
    Drum-Shaker Shaker
    Drum-Tambourine Tambourine
    +
    + + + + +
    +

    Main-C

    + Pretty much like Main-B, but the horns are softer. (8) +
    + + + + + + + + + + + +
    Bass-11 FingeredBass
    Chord-12 SteelGuitar
    Chord-15 Marimba
    Chord-16 BrassSection
    Chord-9 Piano1
    Drum-Lowconga LowConga
    Drum-Mutehighconga MuteHighConga
    Drum-Openhighconga OpenHighConga
    Drum-Shaker Shaker
    Drum-Tambourine Tambourine
    +
    + + + + +
    +

    Fill-CC

    + Abrupt fill with hit on 1. (1) +
    + + + + + + + + +
    Bass-11 FingeredBass
    Chord-12 SteelGuitar
    Chord-15 Marimba
    Chord-9 Piano1
    Drum-Mutehighconga MuteHighConga
    Drum-Shaker Shaker
    Drum-Tambourine Tambourine
    +
    + + + + +
    +

    Intro-C

    + Pretty much like Intro-B. (8) +
    + + + + + + + + + + + +
    Bass-11 FingeredBass
    Chord-12 SteelGuitar
    Chord-15 Marimba
    Chord-16 BrassSection
    Chord-9 Piano1
    Drum-Lowconga LowConga
    Drum-Mutehighconga MuteHighConga
    Drum-Openhighconga OpenHighConga
    Drum-Shaker Shaker
    Drum-Tambourine Tambourine
    +
    + + + + +
    +

    Ending-C

    + This 8 bar ending duplicates Main-C with an "end" on the last bar. (8) +
    + + + + + + + + + + + + + +
    Bass-11 FingeredBass
    Chord-12 SteelGuitar
    Chord-15 Marimba
    Chord-16 BrassSection
    Chord-9 Piano1
    Drum-Highagogo HighAgogo
    Drum-Lowagogo LowAgogo
    Drum-Lowconga LowConga
    Drum-Mutehighconga MuteHighConga
    Drum-Openhighconga OpenHighConga
    Drum-Shaker Shaker
    Drum-Tambourine Tambourine
    +
    + + + + +
    +

    Main-D

    + Much like Main-A, but a bit brighter percussion. (8) +
    + + + + + + + + + + + + + + +
    Bass-11 FingeredBass
    Chord-12 SteelGuitar
    Chord-13 CleanGuitar
    Chord-15 Marimba
    Chord-9 Piano1
    Drum-Handclap HandClap
    Drum-Highagogo HighAgogo
    Drum-Lowagogo LowAgogo
    Drum-Lowconga LowConga
    Drum-Mutehighconga MuteHighConga
    Drum-Openhighconga OpenHighConga
    Drum-Shaker Shaker
    Drum-Tambourine Tambourine
    +
    + + + + +
    +

    Fill-DD

    + Loud fill with a brass hit on beat 1. (1) +
    + + + + + + + + + +
    Bass-11 FingeredBass
    Chord-12 SteelGuitar
    Chord-15 Marimba
    Chord-16 BrassSection
    Chord-9 Piano1
    Drum-Mutehighconga MuteHighConga
    Drum-Shaker Shaker
    Drum-Tambourine Tambourine
    +
    + + diff --git a/mma/docs/html/lib/yamaha/w-rock.html b/mma/docs/html/lib/yamaha/w-rock.html new file mode 100644 index 0000000..7c83c1f --- /dev/null +++ b/mma/docs/html/lib/yamaha/w-rock.html @@ -0,0 +1,165 @@ + + + +

    W-Rock

    +

    A very basic rock style. Original file: w-rock.sty. Library filename: yamaha/w-rock.mma. +

    + + + + +
    +

    Intro-A

    + A drum-only intro. Probably not that useful? (1) +
    + + + +
    Drum-Closedhihat ClosedHiHat
    Drum-Snaredrum1 SnareDrum1
    +
    + + + + +
    +

    Main-A

    + Good rhythm with drums and guitar. (2) +
    + + + + + + + + +
    Bass-11 FingeredBass
    Bass-14 MutedGuitar
    Chord-12 Piano1
    Chord-13 OverDriveGuitar
    Drum-Kickdrum1 KickDrum1
    Drum-Pedalhihat PedalHiHat
    Drum-Snaredrum1 SnareDrum1
    +
    + + + + +
    +

    Fill-AB

    + Fill sounds pretty much like MAIN-A pattern. (1) +
    + + + + + + + + +
    Bass-11 FingeredBass
    Bass-14 MutedGuitar
    Chord-12 Piano1
    Chord-13 OverDriveGuitar
    Drum-Kickdrum1 KickDrum1
    Drum-Pedalhihat PedalHiHat
    Drum-Snaredrum1 SnareDrum1
    +
    + + + + +
    +

    Main-B

    + Much like "A" with an added horn section. (4) +
    + + + + + + + + + + +
    Bass-11 FingeredBass
    Bass-14 MutedGuitar
    Bass-15 BrassSection
    Bass-16 AltoSax
    Chord-12 Piano1
    Chord-13 OverDriveGuitar
    Drum-Kickdrum1 KickDrum1
    Drum-Pedalhihat PedalHiHat
    Drum-Snaredrum1 SnareDrum1
    +
    + + + + +
    +

    Ending-A

    + Single bar ending. Not too final sounding. (1) +
    + + + + + + +
    Bass-14 MutedGuitar
    Chord-13 OverDriveGuitar
    Drum-Kickdrum1 KickDrum1
    Drum-Pedalhihat PedalHiHat
    Drum-Snaredrum1 SnareDrum1
    +
    + + + + +
    +

    Ending-B

    + A drum-only ending. (1) +
    + + + + +
    Drum-Kickdrum1 KickDrum1
    Drum-Pedalhihat PedalHiHat
    Drum-Snaredrum1 SnareDrum1
    +
    + + + + +
    +

    Fill-AA

    + Okay fill or change bar. (1) +
    + + + + + + + + +
    Bass-11 FingeredBass
    Bass-14 MutedGuitar
    Chord-12 Piano1
    Chord-13 OverDriveGuitar
    Drum-Kickdrum1 KickDrum1
    Drum-Pedalhihat PedalHiHat
    Drum-Snaredrum1 SnareDrum1
    +
    + + + + +
    +

    Fill-BA

    + A cymbal crash on beat 1 creates a fill. (1) +
    + + + + + + + +
    Bass-11 FingeredBass
    Chord-12 Piano1
    Drum-Crashcymbal1 CrashCymbal1
    Drum-Kickdrum1 KickDrum1
    Drum-Pedalhihat PedalHiHat
    Drum-Snaredrum1 SnareDrum1
    +
    + + + + +
    +

    Fill-BB

    + No drums, just bass and piano. (1) +
    + + + +
    Bass-11 FingeredBass
    Chord-12 Piano1
    +
    + + diff --git a/mma/docs/html/lib/yamaha/western.html b/mma/docs/html/lib/yamaha/western.html new file mode 100644 index 0000000..b492cc6 --- /dev/null +++ b/mma/docs/html/lib/yamaha/western.html @@ -0,0 +1,236 @@ + + + +

    Western

    +

    Original file: WESTERN.STY. Try this if you like a classic fiddle or banjo sound. Library file: yamaha/western.sty. +

    + + + + +
    +

    Main-A

    + A bit like a train taking off. (2) +
    + + + + + + + + + + + +
    Bass-11 AcousticBass
    Bass-13 CleanGuitar
    Bass-14 Violin
    Bass-15 Banjo
    Bass-9 Piano1
    Chord-12 SteelGuitar
    Drum-Kickdrum2 KickDrum2
    Drum-Ridebell RideBell
    Drum-Scratchpush ScratchPush
    Drum-Snaredrum2 SnareDrum2
    +
    + + + + +
    +

    Fill-AA

    + A fill which sounds better than the main pattern. (1) +
    + + + + + + + + + + + + +
    Bass-11 AcousticBass
    Bass-13 CleanGuitar
    Bass-14 Violin
    Bass-15 Banjo
    Bass-9 Piano1
    Chord-12 SteelGuitar
    Drum-Crashcymbal2 CrashCymbal2
    Drum-Kickdrum2 KickDrum2
    Drum-Ridebell RideBell
    Drum-Scratchpush ScratchPush
    Drum-Snaredrum2 SnareDrum2
    +
    + + + + +
    +

    Fill-AB

    + Goes well with the train. (1) +
    + + + + + + + + + + +
    Bass-11 AcousticBass
    Bass-13 CleanGuitar
    Bass-14 Violin
    Bass-15 Banjo
    Bass-9 Piano1
    Chord-12 SteelGuitar
    Drum-Crashcymbal2 CrashCymbal2
    Drum-Kickdrum2 KickDrum2
    Drum-Snaredrum2 SnareDrum2
    +
    + + + + +
    +

    Intro-A

    + A pluck on 1,2,3 with added snare. (1) +
    + + + + + +
    Bass-9 Piano1
    Drum-Crashcymbal2 CrashCymbal2
    Drum-Snaredrum2 SnareDrum2
    Drum-Squareclick SquareClick
    +
    + + + + +
    +

    Ending-A

    + A banjo run with a final chord. (1) +
    + + + + + + + + + + + + + + +
    Bass-11 AcousticBass
    Bass-13 CleanGuitar
    Bass-14 Violin
    Bass-15 Banjo
    Bass-9 Piano1
    Chord-12 SteelGuitar
    Chord-16 Piano1
    Drum-Crashcymbal1 CrashCymbal1
    Drum-Crashcymbal2 CrashCymbal2
    Drum-Kickdrum2 KickDrum2
    Drum-Midtom1 MidTom1
    Drum-Ridebell RideBell
    Drum-Snaredrum2 SnareDrum2
    +
    + + + + +
    +

    Main-B

    + Very blue-grassy with picked banjo. (4) +
    + + + + + + + + + + + +
    Bass-11 AcousticBass
    Bass-13 CleanGuitar
    Bass-14 Violin
    Bass-15 Banjo
    Bass-9 Piano1
    Chord-12 SteelGuitar
    Chord-16 Piano1
    Drum-Kickdrum2 KickDrum2
    Drum-Ridebell RideBell
    Drum-Snaredrum2 SnareDrum2
    +
    + + + + +
    +

    Fill-BA

    + Somehow the train is running over the banjo. (1) +
    + + + + + + + + + + + + + +
    Bass-11 AcousticBass
    Bass-13 CleanGuitar
    Bass-14 Violin
    Bass-15 Banjo
    Bass-9 Piano1
    Chord-12 SteelGuitar
    Chord-16 Piano1
    Drum-Crashcymbal2 CrashCymbal2
    Drum-Hightom1 HighTom1
    Drum-Kickdrum2 KickDrum2
    Drum-Ridebell RideBell
    Drum-Snaredrum2 SnareDrum2
    +
    + + + + +
    +

    Fill-BB

    + And I thought the banjo had been run over. (1) +
    + + + + + + + + + + + + + + +
    Bass-11 AcousticBass
    Bass-13 CleanGuitar
    Bass-14 Violin
    Bass-15 Banjo
    Bass-9 Piano1
    Chord-12 SteelGuitar
    Chord-16 Piano1
    Drum-Crashcymbal2 CrashCymbal2
    Drum-Kickdrum2 KickDrum2
    Drum-Ridebell RideBell
    Drum-Scratchpush ScratchPush
    Drum-Snaredrum2 SnareDrum2
    Drum-Sticks Sticks
    +
    + + + + +
    +

    Intro-B

    + A banjo introduction. (4) +
    + + + + + + + + + + + + + + +
    Bass-11 AcousticBass
    Bass-13 CleanGuitar
    Bass-14 Violin
    Bass-15 Banjo
    Bass-9 Piano1
    Chord-12 SteelGuitar
    Chord-16 Piano1
    Drum-Crashcymbal2 CrashCymbal2
    Drum-Kickdrum2 KickDrum2
    Drum-Midtom1 MidTom1
    Drum-Midtom2 MidTom2
    Drum-Ridebell RideBell
    Drum-Snaredrum2 SnareDrum2
    +
    + + + + +
    +

    Ending-B

    + Fiddle sounding end. Okay. (1) +
    + + + + + + + + + + + + + +
    Bass-11 AcousticBass
    Bass-13 CleanGuitar
    Bass-14 Violin
    Bass-15 Banjo
    Bass-9 Piano1
    Chord-12 SteelGuitar
    Chord-16 Piano1
    Drum-Crashcymbal1 CrashCymbal1
    Drum-Crashcymbal2 CrashCymbal2
    Drum-Kickdrum2 KickDrum2
    Drum-Midtom1 MidTom1
    Drum-Snaredrum2 SnareDrum2
    +
    + + diff --git a/mma/docs/html/mma.html b/mma/docs/html/mma.html index 549ba5c..23fcec5 100644 --- a/mma/docs/html/mma.html +++ b/mma/docs/html/mma.html @@ -48,7 +48,7 @@ and may not completely reflect all the details in the originals. version is created with mklibdoc.py, supplied with the binary distribution.

    This page and all the other MMA materials are the responsibility of - Bob van der Poel . + Bob van der Poel . diff --git a/mma/docs/html/ref/img1.png b/mma/docs/html/ref/img1.png index f1cea87..effeab0 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 027383e..2a33534 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 cfb6a9a..3b65b78 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 9bca1ba..ac5ae8a 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 b23ae40..a43c08b 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 99cf231..763679b 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 d275c92..cde0d59 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 a4e113b..3e02013 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 99b68e5..2be0cf7 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 d91c99e..0245523 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 932f4e7..984411d 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 2e46384..2d8f92f 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 80f2d56..ab5197d 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 442957c..34f8a52 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 c045399..0ab8a2d 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 27b49bc..d1a9663 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 4120bfa..22b6ccf 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 2ef2472..3970d32 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 new file mode 100644 index 0000000..3eafb96 Binary files /dev/null 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 new file mode 100644 index 0000000..015abd0 Binary files /dev/null and b/mma/docs/html/ref/img27.png differ diff --git a/mma/docs/html/ref/img3.png b/mma/docs/html/ref/img3.png index f518af2..fe932ca 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 1e711fd..0bde52f 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 6a406ee..845f3e6 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 cc7d1d5..d0059cf 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 12468ce..03b6063 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 6481bb0..5126e60 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 c254496..8589f07 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 03c8c96..c7b8d6e 100644 --- a/mma/docs/html/ref/index.html +++ b/mma/docs/html/ref/index.html @@ -23,17 +23,17 @@ original version by: Nikos Drakos, CBLU, University of Leeds - next - up previous
    - Next: Next: Overview and Introduction - Up: Up: Main MMA Reference

    @@ -50,7 +50,7 @@ original version by: Nikos Drakos, CBLU, University of Leeds

    LOST LOGO + ALT="LOST LOGO">

    Reference Manual

    @@ -58,7 +58,7 @@ original version by: Nikos Drakos, CBLU, University of Leeds

    Bob van der Poel

    Wynndel, BC, Canada

    -

    October 15, 2006

    +

    March 7, 2007

    @@ -69,565 +69,579 @@ original version by: Nikos Drakos, CBLU, University of Leeds


    -
  • Patterns +
  • Including Existing Patterns in New Definitions +
  • Multiplying and Shifting Patterns
    -
  • Sequences
    -
  • Grooves
    -
  • Riffs -
  • Musical Data Format
    -
  • Lyrics
    -
  • Solo and Melody Tracks
    -
  • Chord Voicing -
      -
    • Voicing -
        -
      • Voicing Mode -
      • Voicing Range -
      • Voicing Center
      • Voicing Move + HREF="node11.html">Automatic Melodies: Aria Tracks
      • Voicing Dir + HREF="node12.html">Chord Voicing + + HREF="node12.html#SECTION001210000000000000000">Voicing +
        • ChordAdjust + HREF="node12.html#SECTION001211000000000000000">Voicing Mode
        • Compress + HREF="node12.html#SECTION001212000000000000000">Voicing Range
        • DupRoot + HREF="node12.html#SECTION001213000000000000000">Voicing Center
        • Invert + HREF="node12.html#SECTION001214000000000000000">Voicing Move
        • Limit + HREF="node12.html#SECTION001215000000000000000">Voicing Dir
        • NoteSpan + HREF="node12.html#SECTION001216000000000000000">Voicing Rmove +
      • Range + HREF="node12.html#SECTION001220000000000000000">ChordAdjust
      • DefChord + HREF="node12.html#SECTION001230000000000000000">Compress
      • PrintChord + HREF="node12.html#SECTION001240000000000000000">DupRoot
      • Notes -
      -
      + HREF="node12.html#SECTION001250000000000000000">Invert
    • Harmony -
        + HREF="node12.html#SECTION001260000000000000000">Limit
      • Harmony + HREF="node12.html#SECTION001270000000000000000">NoteSpan
      • HarmonyOnly + HREF="node12.html#SECTION001280000000000000000">Range
      • HarmonyVolume -
      -
      + HREF="node12.html#SECTION001290000000000000000">DefChord
    • Tempo and Timing -
        + HREF="node12.html#SECTION0012100000000000000000">PrintChord
      • Tempo + HREF="node12.html#SECTION0012110000000000000000">Notes +
      +
    • Time + HREF="node13.html">Harmony +
      • TimeSig + HREF="node13.html#SECTION001310000000000000000">Harmony
      • BeatAdjust + HREF="node13.html#SECTION001320000000000000000">HarmonyOnly
      • Fermata + HREF="node13.html#SECTION001330000000000000000">HarmonyVolume +
      +
    • Cut -
    -
    + HREF="node14.html">Tempo and Timing +
    -
  • Sequences
    -
  • Grooves
    -
  • Riffs -
  • Musical Data Format
    -
  • Lyrics
    -
  • Solo and Melody Tracks
    -
  • Chord Voicing -
      -
    • Voicing -
        -
      • Voicing Mode -
      • Voicing Range -
      • Voicing Center
      • Voicing Move + HREF="node11.html">Automatic Melodies: Aria Tracks
      • Voicing Dir + HREF="node12.html">Chord Voicing + + HREF="node12.html#SECTION001210000000000000000">Voicing +
        • ChordAdjust + HREF="node12.html#SECTION001211000000000000000">Voicing Mode
        • Compress + HREF="node12.html#SECTION001212000000000000000">Voicing Range
        • DupRoot + HREF="node12.html#SECTION001213000000000000000">Voicing Center
        • Invert + HREF="node12.html#SECTION001214000000000000000">Voicing Move
        • Limit + HREF="node12.html#SECTION001215000000000000000">Voicing Dir
        • NoteSpan + HREF="node12.html#SECTION001216000000000000000">Voicing Rmove +
      • Range + HREF="node12.html#SECTION001220000000000000000">ChordAdjust
      • DefChord + HREF="node12.html#SECTION001230000000000000000">Compress
      • PrintChord + HREF="node12.html#SECTION001240000000000000000">DupRoot
      • Notes -
      -
      + HREF="node12.html#SECTION001250000000000000000">Invert
    • Harmony -
        + HREF="node12.html#SECTION001260000000000000000">Limit
      • Harmony + HREF="node12.html#SECTION001270000000000000000">NoteSpan
      • HarmonyOnly + HREF="node12.html#SECTION001280000000000000000">Range
      • HarmonyVolume -
      -
      + HREF="node12.html#SECTION001290000000000000000">DefChord
    • Tempo and Timing -
        + HREF="node12.html#SECTION0012100000000000000000">PrintChord
      • Tempo + HREF="node12.html#SECTION0012110000000000000000">Notes +
      +
    • Time + HREF="node13.html">Harmony +
      • TimeSig + HREF="node13.html#SECTION001310000000000000000">Harmony
      • BeatAdjust + HREF="node13.html#SECTION001320000000000000000">HarmonyOnly
      • Fermata + HREF="node13.html#SECTION001330000000000000000">HarmonyVolume +
      +
    • Cut -
    -
    + HREF="node14.html">Tempo and Timing +
    • Swing + HREF="node14.html#SECTION001410000000000000000">Tempo
    • Volume and Dynamics -

      -Bob -2006-10-15 +bob +2007-03-07
      diff --git a/mma/docs/html/ref/mupex/arp4s.png b/mma/docs/html/ref/mupex/arp4s.png index e28181e..044231e 100644 Binary files a/mma/docs/html/ref/mupex/arp4s.png and b/mma/docs/html/ref/mupex/arp4s.png differ diff --git a/mma/docs/html/ref/mupex/bassb8.png b/mma/docs/html/ref/mupex/bassb8.png index ee83a52..d39ec46 100644 Binary files a/mma/docs/html/ref/mupex/bassb8.png and b/mma/docs/html/ref/mupex/bassb8.png differ diff --git a/mma/docs/html/ref/mupex/chord43.png b/mma/docs/html/ref/mupex/chord43.png index dca90aa..ad30247 100644 Binary files a/mma/docs/html/ref/mupex/chord43.png and b/mma/docs/html/ref/mupex/chord43.png differ diff --git a/mma/docs/html/ref/mupex/cmajor.png b/mma/docs/html/ref/mupex/cmajor.png index 38e8f82..c0642b1 100644 Binary files a/mma/docs/html/ref/mupex/cmajor.png and b/mma/docs/html/ref/mupex/cmajor.png differ diff --git a/mma/docs/html/ref/mupex/fermata.png b/mma/docs/html/ref/mupex/fermata.png index 96f5e87..44c346c 100644 Binary files a/mma/docs/html/ref/mupex/fermata.png and b/mma/docs/html/ref/mupex/fermata.png differ diff --git a/mma/docs/html/ref/mupex/fermata2.png b/mma/docs/html/ref/mupex/fermata2.png index f9e5ab1..7942da0 100644 Binary files a/mma/docs/html/ref/mupex/fermata2.png and b/mma/docs/html/ref/mupex/fermata2.png differ diff --git a/mma/docs/html/ref/mupex/repeat.png b/mma/docs/html/ref/mupex/repeat.png index bc1193d..38d32a9 100644 Binary files a/mma/docs/html/ref/mupex/repeat.png and b/mma/docs/html/ref/mupex/repeat.png differ diff --git a/mma/docs/html/ref/mupex/soloeg.png b/mma/docs/html/ref/mupex/soloeg.png index 6350fa2..ccd3726 100644 Binary files a/mma/docs/html/ref/mupex/soloeg.png and b/mma/docs/html/ref/mupex/soloeg.png differ diff --git a/mma/docs/html/ref/mupex/swingconv.png b/mma/docs/html/ref/mupex/swingconv.png index 0398b96..1dabce8 100644 Binary files a/mma/docs/html/ref/mupex/swingconv.png and b/mma/docs/html/ref/mupex/swingconv.png differ diff --git a/mma/docs/html/ref/mupex/swingdrum8-3.png b/mma/docs/html/ref/mupex/swingdrum8-3.png index ec241e7..81eb33c 100644 Binary files a/mma/docs/html/ref/mupex/swingdrum8-3.png and b/mma/docs/html/ref/mupex/swingdrum8-3.png differ diff --git a/mma/docs/html/ref/mupex/swingdrum8.png b/mma/docs/html/ref/mupex/swingdrum8.png index 405df9e..72b6386 100644 Binary files a/mma/docs/html/ref/mupex/swingdrum8.png and b/mma/docs/html/ref/mupex/swingdrum8.png differ diff --git a/mma/docs/html/ref/mupex/tilde.png b/mma/docs/html/ref/mupex/tilde.png index 105a0c9..72e7fde 100644 Binary files a/mma/docs/html/ref/mupex/tilde.png and b/mma/docs/html/ref/mupex/tilde.png differ diff --git a/mma/docs/html/ref/mupex/tilde2.png b/mma/docs/html/ref/mupex/tilde2.png index 6dafab7..2c25cd8 100644 Binary files a/mma/docs/html/ref/mupex/tilde2.png and b/mma/docs/html/ref/mupex/tilde2.png differ diff --git a/mma/docs/html/ref/mupex/trip1.png b/mma/docs/html/ref/mupex/trip1.png index e7de399..329d0e4 100644 Binary files a/mma/docs/html/ref/mupex/trip1.png and b/mma/docs/html/ref/mupex/trip1.png differ diff --git a/mma/docs/html/ref/mupex/trip3.png b/mma/docs/html/ref/mupex/trip3.png index f667ea3..3156219 100644 Binary files a/mma/docs/html/ref/mupex/trip3.png and b/mma/docs/html/ref/mupex/trip3.png differ diff --git a/mma/docs/html/ref/node1.html b/mma/docs/html/ref/node1.html index 79eac85..4c6f582 100644 --- a/mma/docs/html/ref/node1.html +++ b/mma/docs/html/ref/node1.html @@ -26,21 +26,21 @@ original version by: Nikos Drakos, CBLU, University of Leeds - next - up - previous
      - Next: Next: Running - Up: Up: Reference Manual - Previous: Previous: Reference Manual

      @@ -49,32 +49,32 @@ original version by: Nikos Drakos, CBLU, University of Leeds Subsections @@ -87,9 +87,9 @@ Overview and Introduction

      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 @@ -121,7 +121,7 @@ License, Version and Legalities

      The program MMA was written by and is copyright Robert van der Poel, -2002--2006. +2002--2007.

      This program, the accompanying documentation, and library files can be @@ -140,40 +140,51 @@ The current version of this package is maintained at: http://www.mellowood.ca/mma/.

      -This document reflects version 1.0-rc2 +This document reflects version 1.1 of MMA .

      - - +
      -
      -
      Warning: This program - is currently in a beta state. The commands used in the - input files, the output, the overall logic and anything else you - can think of might change in the future. - + +
      +
      +
      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. +

      -

      +


      -
      +

      -

      This manual most likely has lots of errors. Spelling, grammar, and -probably a number of the examples need fixing. Please give me a hand -and report anything...it'll make it much easier for me to -generate a really good product for all of us to enjoy. +
      Sorry for this disclaimer, but we live in paranoid times. +
      +

      +

      +
      +
      +
      +

      +

      This manual most likely has lots of errors. Spelling, grammar, and + probably a number of the examples need fixing. Please give me a hand + and report anything...it'll make it much easier for me to + generate a really good product for all of us to enjoy. -
      +
      -
      +

      -

      +


      -
      +

      -

      +
      +

      @@ -185,12 +196,12 @@ 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; and users really need to refer to the manual to get the most out of -the program. Even the author refers to the manual. Really. +the program. Even the author frequently refers to the manual. Really.

      I have tried to present the various commands in a logical and useful @@ -218,12 +229,12 @@ Typographic Conventions

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

    • Websites look like this: http://users.xplornet.com/~bvdp + HREF="http://www.mellowood.ca/mma/index.html">http://www.mellowood.ca/mma/index.html

    • Filenames are set in bold typewriter font: filename.mma @@ -236,12 +247,12 @@ Typographic Conventions

      - - +
      + +
      + A command from a file -
      A command from a file
      - -
      +

    • @@ -251,12 +262,12 @@ Typographic Conventions

      - - +
      + +
      + $ enter this -
      $ enter this
      - -
      +

      @@ -341,7 +352,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!

      @@ -352,7 +363,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. @@ -374,16 +385,22 @@ input files. Don't use a word processor!

      -The script install will install +The scripts cp-install or ln-install will install MMA properly on most Linux -systems. It assumes that main script is to be installed in +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 can edit the paths in the script. The only supported alternate to use is /usr/share/mma.

      -In addition, you can run +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 MMA from the directory created by the untar. This is not recommended, but will show some of MMA 's @@ -392,7 +409,7 @@ 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 the install script. +/usr/local/) to run either install script.

      If you want to install @@ -430,12 +447,12 @@ To create a MIDI file you need to:

      - - +
      + +
      + $ mma myfile <ENTER> -
      $ mma myfile <ENTER>
      - -
      +

      will invoke @@ -466,7 +483,7 @@ An input file consists of the following information:

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

      2. @@ -500,7 +517,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: @@ -525,11 +542,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.

        @@ -545,17 +562,17 @@ a file which looked something like:

        - - +
        - -
        Tempo 120 + +
        + Tempo 120
        Fm
        C7 -
        ...
        +
        ... -
        +

        and end up with a MIDI file which played the specified chords over a @@ -634,7 +651,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).

        @@ -652,36 +669,36 @@ This means that the command:

        - - +
        + +
        + Tempo 120 -
        Tempo 120
        - -
        +

        could be entered in your file as:

        - - +
        + +
        + TEMPO 120 -
        TEMPO 120
        - -
        +

        or even

        - - +
        + +
        + TeMpO 120 -
        TeMpO 120
        - -
        +

        for the exact same results. @@ -694,12 +711,12 @@ 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
        Musical MIDI Accompaniment and the short form @@ -709,14 +726,14 @@ are in mixed case; this is detailed in Musical no association between the two.
        -
        ... +
        ... MIDI1.2
        MIDI is an acronym for Musical Instrument Digital Interface.
        -
        ... perspectives.... perspectives.1.3
        The problem, all humor aside, is that the viewpoints of a program's author and user are quite @@ -724,14 +741,14 @@ different. The two ``see'' problems and solutions differently, and for a user manual the programmer's view is not the best.
        -
        ...mma...mma1.4
        In the distribution this is mma.py. It is renamed to save a few keystrokes when entering the command.
        -
        ... slashes).... slashes).1.5
        The first choice for a comment character was a single ``#'', but that sign is used for @@ -740,26 +757,26 @@ a user manual the programmer's view is not the best.

        - next - up - previous
        - Next: Next: Running - Up: Up: Reference Manual - Previous: Previous: Reference Manual
        -Bob -2006-10-15 +bob +2007-03-07
        diff --git a/mma/docs/html/ref/node10.html b/mma/docs/html/ref/node10.html index 01cceff..62b8326 100644 --- a/mma/docs/html/ref/node10.html +++ b/mma/docs/html/ref/node10.html @@ -26,21 +26,21 @@ original version by: Nikos Drakos, CBLU, University of Leeds - next - up - previous
        - Next: Chord Voicing - Up: Next: Automatic Melodies: Aria Tracks + Up: Reference Manual - Previous: Previous: Lyrics

        @@ -49,22 +49,22 @@ original version by: Nikos Drakos, CBLU, University of Leeds Subsections @@ -111,12 +111,12 @@ the top of a song:

        - - +
        + +
        + Solo Voice TenorSax -
        Solo Voice TenorSax
        - -
        +

        On the other hand, MELODY tracks save and restore grooves just @@ -125,15 +125,15 @@ in a song file:

        - - +
        - -
        Melody Voice TenorSax + +
        + Melody Voice TenorSax
        Groove Blues -
        ... musical data
        +
        ... musical data -
        +

        no one will be surprised to find that the MELODY track @@ -160,18 +160,18 @@ be covered later in this chapter):

        - - +
        - -
        Solo Riff 4c;2d;4f; + +
        + Solo Riff 4c;2d;4f;
        F
        Solo Riff 4.a;8g#;4a;4c+;
        -F
        +F -
        +

        In this example the melody has been added to the song file. @@ -185,14 +185,14 @@ rewritten as:

        - - +
        - -
        F {4c;2d;4f;} + +
        + F {4c;2d;4f;}
        -F {4.a;8g#;4a;4c+;}
        +F {4.a;8g#;4a;4c+;} -
        +

        By default the note data is inserted into the SOLO track. If @@ -211,7 +211,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="#foot4027">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 +230,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 +240,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.

        @@ -275,9 +275,9 @@ Please note that when you specify a chord in WIDTH="19" HEIGHT="33" ALIGN="MIDDLE" BORDER="0" SRC="img4.png" ALT="$>$"> in the chord specification - (here) Of course, it is + (here) Of course, it is probably easier to set accented beats with the ACCENT - directive (here). + directive (here).

        @@ -313,12 +313,12 @@ space and tab characters (which are ignored by

        -
        - - +
        - Solo Notation -
        - + + +
        + Solo Notation +
        + Lost Image

        @@ -327,10 +327,9 @@ space and tab characters (which are ignored by

        - - +
        - -
        KeySig 1b + +
        + KeySig 1b
        F { 4ca-; 2da-; 4fd; }
        @@ -338,14 +337,16 @@ F { 4.af; 8g#f; 4af; c+f; }
        F { 4ca-; 2da-; 4fc; }
        -F { 1af; }
        +F { 1af; } -
        +

        -

        +

        @@ -378,14 +379,14 @@ It can be handled in three different ways in your score:

        • - - +
          - -
          F {4c;d;e;4+2f;} + +
          + F {4c;d;e;4+2f;}
          -F {2r;2c;}
          +F {2r;2c;} -
          +

          In this case you @@ -396,14 +397,14 @@ In this case you

        • - - +
          - -
          F {4c;d;e;4+2f~}; + +
          + F {4c;d;e;4+2f~};
          -F {2r;2c;}
          +F {2r;2c;} -
          +

          This time a ~ character has been added to the end of @@ -413,14 +414,14 @@ This time a ~ character has been added to the end of

        • - - +
          - -
          F {4c;d;e;4+2f~;} + +
          + F {4c;d;e;4+2f~;}
          -F {~2c;}
          +F {~2c;} -
          +

          The cleanest method is shown here. The ~forces the @@ -448,16 +449,16 @@ empty chord marker:

          - - +
          - -
          C {4c;d;e;4+2f~;} + +
          + C {4c;d;e;4+2f~;}
          C {~<>~;}
          -C {~2c;}
          +C {~2c;} -
          +

          @@ -477,18 +478,18 @@ confusion! For example, the following all generate four quarter note

          - - +
          - -
          Solo Riff 4f; 4f; 4f; 4f; + +
          + Solo Riff 4f; 4f; 4f; 4f;
          Solo Riff 4f; f; f; f;
          Solo Riff 4f; 4; 4; 4;
          -Solo Riff 4f; ; ; ;
          +Solo Riff 4f; ; ; ; -
          +

          @@ -515,12 +516,12 @@ set the key signature for the song:

          - - +
          + +
          + KeySig 2b -
          KeySig 2b
          - -
          +

          The argument consists of a single digit ``0'' to ``7'' followed by a @@ -551,16 +552,15 @@ 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="#foot4032">10.2

          To summarize, the following are all valid KEYSIG directives:

          - - +
          - -
          KeySig 2# Major + +
          + KeySig 2# Major
          KeySig 1b
          @@ -568,9 +568,10 @@ KeySig 0b Min
          KeySig F Min
          -KeySig A Major
          +KeySig A Major -
          +

          @@ -586,17 +587,17 @@ 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:

          - - +
          + +
          + AutoSoloTracks Melody-Oboe Melody-Trumpet Melody-Horn -
          AutoSoloTracks Melody-Oboe Melody-Trumpet Melody-Horn
          - -
          +

          Any number of tracks can be specified in this command, but they must @@ -609,35 +610,35 @@ for tracks set as HARMONYONLY. Again, an example:

          - - +
          - -
          AutoSoloTracks Solo-1 Solo-2 Solo-3 Solo-4 + +
          + AutoSoloTracks Solo-1 Solo-2 Solo-3 Solo-4
          Solo-2 HarmonyOnly 3Above
          -Solo-3 HarmonyOnly 8Above
          +Solo-3 HarmonyOnly 8Above -
          +

          Of course, some voicing is also set ...and a chord line:

          - - +
          + +
          + C {4a;b;c;d;} -
          C {4a;b;c;d;}
          - -
          +

          -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. @@ -655,16 +656,16 @@ first thing to do is to set a track as a drum solo type:

          - - +
          + +
          + Solo-MyDrums DrumType -
          Solo-MyDrums DrumType
          - -
          +

          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. @@ -690,12 +691,12 @@ Some examples:

          - - +
          + +
          + Solo-MyDrums Riff 4 SnareDrum1; ; r ; SnareDrum1; -
          Solo-MyDrums Riff 4 SnareDrum1; ; r ; SnareDrum1;
          - -
          +

          would create a snare hit on beats 1, 2 and 4 of a bar. Note how the @@ -703,12 +704,12 @@ second hit uses the default tone set in the first beat.

          - - +
          + +
          + Solo-MyDrums Riff 8,38;;;; -
          Solo-MyDrums Riff 8,38;;;;
          - -
          +

          creates 4 hits, starting on beat 1. Instead of ``names'' @@ -717,12 +718,12 @@ how ``,'' is used to separate the initial length from the first tone.

          - - +
          + +
          + Solo-MyDrums Riff 4 SnareDrum1,53,81; r; 4 SideKick ; -
          Solo-MyDrums Riff 4 SnareDrum1,53,81; r; 4 SideKick ;
          - -
          +

          creates a ``chord'' of 3 tones on beat 1, a rest on beat 2, and a @@ -744,10 +745,9 @@ the following example:

          - - +
          - -
          Begin Solo-Block + +
          + Begin Solo-Block
            DrumType
            Tone LowWoodBlock
          @@ -757,21 +757,20 @@ End Solo-Block Riff 4r; SnareDrum; * ; ;
             ...
          -Solo-Block Riff 4;;;;
          +Solo-Block Riff 4;;;; -
          +

          The first solo created will have a rest on beat 1, a SnareDrum on beat 2 and LowWoodBlock on beats 3 and 4. The second will have LowWoodBlock on each beat. -

          -



          Footnotes

          -
          ... semicolon.... semicolon.10.1
          I have borrowed heavily from the notation program MUP for the syntax used here. For notation I highly @@ -781,36 +780,36 @@ on each beat. HREF="http://www.Arkkra.com/">http://www.Arkkra.com/.
          -
          ... event.... 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.

          - next - up - previous
          - Next: Chord Voicing - Up: Next: Automatic Melodies: Aria Tracks + Up: Reference Manual - Previous: Previous: Lyrics
          -Bob -2006-10-15 +bob +2007-03-07
          diff --git a/mma/docs/html/ref/node11.html b/mma/docs/html/ref/node11.html index acb5951..d19506e 100644 --- a/mma/docs/html/ref/node11.html +++ b/mma/docs/html/ref/node11.html @@ -7,8 +7,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds Jens Lippmann, Marek Rouchal, Martin Wilck and others --> -Chord Voicing - +Automatic Melodies: Aria Tracks + @@ -26,1281 +26,259 @@ original version by: Nikos Drakos, CBLU, University of Leeds - next - up - previous
          - Next: Harmony - Up: Next: Chord Voicing + Up: Reference Manual - Previous: Previous: Solo and Melody Tracks

          - -Subsections - - - -

          - +
          -Chord Voicing +Automatic Melodies: Aria Tracks

          -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. +ARIA tracks are designed to let +MMA automatically generate +something resembling melody. Honest, this will never put real +composers on the unemployment line (well, no more than they are mostly +there already).

          -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: +You might want to use an ARIA to embellish a section of a song (like +an introduction or an ending). Or you can have +MMA generate a complete +melody over the song chords.

          -

          - Lost Image - -
          +In a traditional song the melody depends on two parts: patterns +(IE. note lengths, volume, articulation) and pitch (usually determined +by the chords in a song). If you have been using +MMA at all you will +know that that chords are the building block of what +MMA does +already. So, to generate a melody we just need some kind of +pattern. And, since +MMA already uses patterns in most things it +does, it is a short step to use a specialized pattern to generate a +melody.

          -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. +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?

          -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. +Just like other track, you can create as many ARIAs as you +want. So, you can have the tracks ARIA-1, ARIA, and +ARIA-SILLY all at the same time. And, the majority of other +commands (like OCTAVE, ARTICULATE, etc.) apply to ARIAs.

          -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 -algorithms11.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: +The following commands are important to note:

          -
          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. +

          Range
          +
          Just like scale tracks. A RANGE of 2 would let +MMA work on a 2 +octave chord, etc.

          -
          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. +
          ScaleType
          +
          Much like a scale track. By default, the setting for this +is CHORD. But, you can use AUTO, SCALE or CHROMATIC. AUTO and SCALE +are identical and force +MMA to select notes from the scale associated +with the current chord; CHROMATIC generates an 11 tone scale starting +at the root note of the chord.

          -
          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. +
          Direction
          +
          As +MMA processes the song it moves a note-selection pointer +up or down. By default DIRECTION is set to the single value "1" which +tells +MMA to add 1 after each note is generated. However, you can set +the value to an integer -4 to 4 or the special value "r". With "r" a +random value -1, 0 or 1 will be used. Important: in an ARIA +track the sequence size/point is ignored for DIRECTION.

          - -

          -Voicing Range -

          +A bit more detail on defining an ARIA:

          -To get wider or closer voicings, you may define a range for the -voicings. This can be adjusted with the RANGE option: +First, here is a simplified sample track definition:

          - -
          - -
          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 + +
          + Begin Aria
          -chords.. +Voice JazzGuitar
          -Chord-Piano Voicing Move=5 Dir=1 +Volume f
          -more chords.. +Sequence 1.5 8 90; 2 8 90; 2.5 8 90;
          -Chord-Piano Voicing Move=5 Dir=-1 +3 8 90; 3.5 8 90; 4 8 90; 4.5 8 90
          -more chords..
          +Direction r 0 0 1 -1 0 0 1 r + -
          +

          - -

          -Voicing Dir -

          +Next assume that we have a few bars of music with only a CMajor +chord the default RANGE of ``1'' and the default SCALETYPE +of ``Scale'. The following table shows the notes which would be generated +for each time event:

          -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
          + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + + + + + + + + + + + + + -
          EventOffset PointerNote
          G-5
          10c
          G$\sharp$-4
          20c
          A$\flat$-4
          31e
          A-3
          43 .. 0c
          A$\sharp$-2
          54 .. 0c
          B$\flat$-2
          6-2 .. 2g
          7randomc, e or g
          8randomc, e, or g
          9....etc.
          -
          - -
          - - - - - - - - - - - - - - - - - - - - - -
          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.11.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 octave11.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.11.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.11.5The RANGE command specifies the number of octaves11.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. +In the above table the ``..'' notation indicates that the offset is +out-of-range and converted to the second value.

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

          - - -
          - -
          DefChord NAME (NoteList) (ScaleList)
          - -
          +If you were to change the SCALETYPE or RANGE you would get a +completely different series.

          -where: +Please note the following:

            -
          • 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''. +
          • 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: + +

            + +

              +
            • Load a groove. Let's say it has a SEQSIZE of 4. +
            • +
            • Create an ARIA. Use 4 patterns to match the groove size (if you + don't +MMA will expand the sequence size for the ARIA, just + like other tracks). +
            • +
            • 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 + tracks as well, but it might be unexpected here. +
            • +

          • -
          • 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$). +
          • DIRECTION can not be changed on a bar per bar basis. It applies to +the entire sequence.

          -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. +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 +patterns; use HARMONLYONLY with a different voice and pattern.

          - - -
          - -
          DefChord 15 (0,4) (0, 0, 0, 0, 0, 0, 0) -
          -15 C / G / -
          -16 C15 / G15
          - -
          +Oh, and have fun!

          -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

          -
          -
          ... -algorithms11.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. - -
          -
          ... -values.11.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''. - -
          -
          ... octave11.3
          -
          Some accordions - have ``freebass'' switches which overcomes this, but that is the - exception. - -
          -
          ... notes.11.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.11.5
          -
          Not quite true: they -use whatever notes are in the chord, which might exceed an octave span. - -
          -
          ... octaves11.6
          -
          Again, not quite true: the -command just duplicates the arpeggio notes the number of times specified in the -RANGE setting. - -
          -

          +
          - next - up - previous
          - Next: Harmony - Up: Next: Chord Voicing + Up: Reference Manual - Previous: Previous: Solo and Melody Tracks
          -Bob -2006-10-15 +bob +2007-03-07
          diff --git a/mma/docs/html/ref/node12.html b/mma/docs/html/ref/node12.html index a2ea753..95eb149 100644 --- a/mma/docs/html/ref/node12.html +++ b/mma/docs/html/ref/node12.html @@ -7,8 +7,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds Jens Lippmann, Marek Rouchal, Martin Wilck and others --> -Harmony - +Chord Voicing + @@ -26,22 +26,22 @@ 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: Automatic Melodies: Aria Tracks

          @@ -49,296 +49,1259 @@ original version by: Nikos Drakos, CBLU, University of Leeds 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 +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: + +

          + + + +
          + 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.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 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. +The syntax of the command is quite strict:

          -

          -
          -Harmony -

          - -

          -To enable harmony notes, use a command like: - -

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

          +where: + +

          + +

            +
          • 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
          -
          +

          -You can set a different harmony method for each bar in your sequence. +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.

          -The following are valid harmony methods: - -

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

          -

          -
          2Above
          -
          The same as ``2'', but the harmony note is raised an - octave. - -

          -

          -
          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. +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:

          -

          -
          -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: - -

          - - - +
          + + +
          + DefChord maj12 (0, 4, 7, 11, 19) (0, 2, 4, 5, 7, 9, 11) -
          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
          +
          + +

          +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 ) -
          +

          -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. +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.

          -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. +It is even easier to use the non-standard notation ``dim3'' to specify +a diminished triad.

          -

          -
          -HarmonyVolume -

          +

          +PrintChord +

          -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: +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 -
          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. -


          +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. + +
          +
          ... +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. + +
          +

          - next - up - previous
          - Next: Tempo and Timing - Up: Next: Harmony + Up: Reference Manual - Previous: Chord Voicing + Previous: Automatic Melodies: Aria Tracks
          -Bob -2006-10-15 +bob +2007-03-07
          diff --git a/mma/docs/html/ref/node13.html b/mma/docs/html/ref/node13.html index 300c4b4..6976eb3 100644 --- a/mma/docs/html/ref/node13.html +++ b/mma/docs/html/ref/node13.html @@ -7,8 +7,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds Jens Lippmann, Marek Rouchal, Martin Wilck and others --> -Tempo and Timing - +Harmony + @@ -26,22 +26,22 @@ 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

          @@ -49,834 +49,296 @@ original version by: Nikos Drakos, CBLU, University of Leeds Subsections

          - +
          -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 -

          - -

          -The tempo of a piece is set in Beats per Minute with the ``Tempo'' -directive. - -

          - - -
          - -
          Tempo 120
          - -
          - -

          -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): - -

          - - -
          - -
          Tempo +10
          - -
          - -

          -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 -

          +Harmony + + +

          +To enable harmony notes, use a command like:

          -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: - -

          - - - +
          + +
          + Solo Harmony 2 -
          Time 4
          - -
          +

          -For 3/4 use: +You can set a different harmony method for each bar in your sequence.

          +The following are valid harmony methods: - -
          - -
          Time 3
          - -
          +

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

          -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.13.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: - -

          - -

            -
          • You may want to insert some extra (silent) beats at the end of - bar to simulate a pause, - -

            -

          • -
          • You may want to delete some beats to handle a ``short'' bar. - -

            -

          • -
          - -

          -Both instances 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. - -

          - -

          -
          -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.13.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.13.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.13.1
          -
          The time value is saved/restored with grooves so - setting a time is redundant in this case. -
          -
          ... -beat.13.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.13.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. +


          - next - up - previous
          - Next: Swing - Up: Next: Tempo and Timing + Up: Reference Manual - Previous: Harmony + Previous: Chord Voicing
          -Bob -2006-10-15 +bob +2007-03-07
          diff --git a/mma/docs/html/ref/node14.html b/mma/docs/html/ref/node14.html index 8c59e8e..8541607 100644 --- a/mma/docs/html/ref/node14.html +++ b/mma/docs/html/ref/node14.html @@ -7,8 +7,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds Jens Lippmann, Marek Rouchal, Martin Wilck and others --> -Swing - +Tempo and Timing + @@ -26,282 +26,910 @@ 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.

          - - +
          + + +
          + Tempo 120 -
          SwingMode On
          +
          + +

          +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): + +

          + + +
          + Tempo +10 -
          +

          -This directive accepts the value ``On'' and ``Off'' or ``1'' and -``0''. +will increase the current rate to 130 beats/minute.

          -With SWINGMODE enabled -MMA takes some extra steps when creating -patterns and processing of SOLO and MELODY parts. +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:

            -
          • 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.

          - -
          - -
          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 + + + +
          + Adding Extra Beats +
          + + + +
          + 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 +
          ... -
          +

          + + +

          -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: +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:

            -
          • 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.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. + +
          +
          ... +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. + +
          +

          - next - up - previous
          - Next: Volume and Dynamics - Up: Next: Swing + Up: Reference Manual - Previous: Tempo and Timing + Previous: Harmony
          -Bob -2006-10-15 +bob +2007-03-07
          diff --git a/mma/docs/html/ref/node15.html b/mma/docs/html/ref/node15.html index 018d835..70417a1 100644 --- a/mma/docs/html/ref/node15.html +++ b/mma/docs/html/ref/node15.html @@ -7,8 +7,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds Jens Lippmann, Marek Rouchal, Martin Wilck and others --> -Volume and Dynamics - +Swing + @@ -26,847 +26,282 @@ 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. -15.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,15.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'': + +

          + + +
          + SwingMode On -
          Volume ff -
          -Decresc Off 5 -
          -G / Gm / * 5
          - -
          +

          -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''15.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. - -

          - -

          -
          -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: +With SWINGMODE enabled +MMA takes some extra steps when creating +patterns and processing of SOLO and MELODY parts.

            -
          • No generated value will be out of the valid MIDI velocity range - of 1 to 127. +
          • Any eighth note in a pattern ``on the beat'' (1, 2, etc.) is converted to a + ``81'' note.

          • -
          • A different value can be used for each bar in a sequence: - -

            - - -
            - -
            Scale RVolume 10 0 / 20
            - -
            +

          • 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.

          • -
          • A ``/'' can be used to repeat values. +
          • 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.

          - -

          -Saving and Restoring Volumes -

          +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.

          -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. +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%.

          -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. +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.

          -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: +The setting:

          - - +
          + + +
          + SwingMode Skew=60 -
          Groove Wonderful +
          + +

          +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
          -Chord-Piano Volume ff +SwingMode Skew=30 +
          ... Set Drum-1 pattern/groove
          -DefGroove Wonderful
          +SwingMode Skew=whatever +
          ... Set Drum-2 -
          +

          -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. +This will give different rates for different tracks. I'll probably not +enjoy your results, but I play polkas on the accordion for fun.

          -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: +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 ... -
          Repeat -
          -Volume mf -
          .... -
          -Cresc ff 5 -
          ... -
          -EndRepeat
          - -
          +

          -Another useful technique is the use of the $_LASTVOLUME -macro. For example: +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 ... -
          Volume pp -
          ... -
          -Cresc f 5 -
          ... -
          $_LastVolume // restores to pp
          - -
          +

          -


          Footnotes

          -
          -
          ... song.15.1
          -
          We'll try to be consistent and refer to a MIDI - ``volume'' as a ``velocity'' and internal -MMA adjustments to velocity as volumes. +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. -
          -
          ...sec-pats,15.2
          -
          Solo and - Melody track notes use an initial velocity of 90. +

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

          -
          ... musicians''15.3
          -
          as opposed to mechanical. +

          +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: + +

          + +

            +
          • If a bar has both swing and straight eighths. + +

            +

          • +
          • If the note following an eighth is not an eight. + +

            +

          • +
          +
          - next - up - previous
          - Next: Repeats - Up: Next: Volume and Dynamics + Up: Reference Manual - Previous: Swing + Previous: Tempo and Timing
          -Bob -2006-10-15 +bob +2007-03-07
          diff --git a/mma/docs/html/ref/node16.html b/mma/docs/html/ref/node16.html index 7fd9221..1d08b5b 100644 --- a/mma/docs/html/ref/node16.html +++ b/mma/docs/html/ref/node16.html @@ -7,8 +7,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds Jens Lippmann, Marek Rouchal, Martin Wilck and others --> -Repeats - +Volume and Dynamics + @@ -26,258 +26,908 @@ 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. +16.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 ENDREPEAT16.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,16.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
          -
          +
          + + + +

          +The setting OFF is useful for generating fades at the end of a + piece. For example:

          -

          -In this example -MMA produces -music with bars: - -

          -

          -1, 2, 3, + + +
          + Volume ff
          -1, 2, 3, +Decresc Off 5
          -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: - -

          - - - +
          +G / Gm / * 5 -
          Repeat +
          + +

          +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). + +

          + +


          -1  Am -
          -2  Cm -
          -RepeatEnd 3
          +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 -
          +

          -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: +However, it is much easier to use a definition which has all the + velocities the same:

          - - +
          + + +
          + Define Walk W1234 1 1 90 * 4 -
          Repeat -
          -1 Am -
          -2 C -
          -RepeatEnding 2 -
          -3 D7 -
          -RepeatEnd 2
          +
          + +

          +and use the ACCENT command to increase or decrease the volume + of notes on certain beats: + +

          + + +
          + Walk Accent 1 20 2 -10 4 -10 -
          +

          -Produces: -

          -1, 2, 3, -
          -1, 2, 3, -
          -1, 2, -
          -1, 2 +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:

          -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: - -

          - - - +
          + +
          + Bass Accent {1 20} / / {1 30 3 30} -
          Repeat -
          ... -
          -RepeatEnd Nowarn 1
          - -
          +
          + +

          +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: + +

          + +

            +
          • 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. + +

          + +

          +
          +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: + +

          + + + +
          + 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
          + +

          -There must be one REPEATEND or ENDREPEAT for every -REPEAT. Any number of REPEATENDINGs can be included -before the REPEATEND.


          Footnotes

          -
          ...ENDREPEAT16.1
          -
          The reason for both - ENDREPEAT and REPEATEND is to match IFEND and - ENDIF. +
          ... 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.

          - next - up - previous
          - Next: Variables, Conditionals and Jumps - Up: Next: Repeats + Up: Reference Manual - Previous: Volume and Dynamics + Previous: Swing
          -Bob -2006-10-15 +bob +2007-03-07
          diff --git a/mma/docs/html/ref/node17.html b/mma/docs/html/ref/node17.html index fef618c..25e716b 100644 --- a/mma/docs/html/ref/node17.html +++ b/mma/docs/html/ref/node17.html @@ -7,8 +7,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds Jens Lippmann, Marek Rouchal, Martin Wilck and others --> -Variables, Conditionals and Jumps - +Repeats + @@ -26,1393 +26,259 @@ 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 ENDREPEAT17.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. - -

            -

          • - - -

            -To begin, the following list shows the available commands to set and manipulate variables: - -

            - - - +
            - -
            Set VariableName
            String
            + Lost Image +

            -Mset VariableName ... MsetEnd
            -UnSet VariableName
            -ShowVars +

            + + +
            + Repeat
            -Inc Variablename [value] +1 Am
            -Dec Variablename [value] +2 C
            -Vexpand ON/Off
            - -
            - -

            -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). - -

            -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: - -

            - - -
            - -
            Set Silly Am / Bm / +RepeatEnding 2
            -1 $Silly
            - -
            - -

            -The first line creates the variable ``Silly''; the second creates a -bar of music with the chords ``Am / Bm /''. - -

            -Note that the ``$'' must be the first item on a line or follow a -space character. For example, the following will NOT work: - -

            - - -
            - -
            Set Silly 4a;b;c;d; +3 D7
            -1 Am {$Silly}
            - -
            - -

            -However: - -

            - - -
            - -
            1 Am { $Silly}
            - -
            - -

            -will work fine. - -

            -Following are details on all the available variable commands: - -

            - -

            -Set [string] -

            - -

            -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 +RepeatEnding
            -Repeat -
            ... +4 D7 / Dm
            -Set a $_Groove + Sus +RepeatEnd
            -Groove $a -
            ... +5 G7
            -Groove Rhumba1 +6 A
            + +
            + + +

            + +

            + +

            +In this example +MMA produces +music with bars: + +

            +

            +1, 2, 3,
            -Repeatend
            - -
            - -

            -This can be useful in calling GROOVE variations. - -

            - -

            +1, 2, 3,
            -Mset [lines] MsetEnd/EndMset -

            - -

            -This command is quite similar to SET, but MSET expects -multiple lines. An example: - -

            - - - +
            - -
            MSet LongVar +1, 2, 4,
            -1 Cm +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: + +

            + + +
            + Repeat
            -2 Gm +1  Am
            -3 G7 +2  Cm
            -MsetEnd
            +RepeatEnd 3 -
            +

            -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 +Will expand to: +
            +1, 2,
            -EndMset +1, 2,
            -Begin Print -
              $Spam +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: + +

            + + +
            + Repeat
            -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 +1 Am
            -Set Foobar 4 +2 C
            -Showvars +RepeatEnding 2
            -Inc FooBar 4 +3 D7
            -Inc PassCount +RepeatEnd 2
            + +
            + +

            +Produces: +

            +1, 2, 3,
            -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 +1, 2, 3,
            -Set RightC G / +1, 2,
            -VExpand Off +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 +
            ...
            -Set Full $LeftC $RightC -
            -VExpand On
            +RepeatEnd Nowarn 1 -
            +

            -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.17.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 IFEND17.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.17.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.17.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. - -
            -
            ...IFEND17.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.17.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. +
            ...ENDREPEAT17.1
            +
            The reason for both + ENDREPEAT and REPEATEND is to match IFEND and + ENDIF.

            - next - up - previous
            - Next: Low Level MIDI Commands - Up: Next: Variables, Conditionals and Jumps + Up: Reference Manual - Previous: Repeats + Previous: Volume and Dynamics
            -Bob -2006-10-15 +bob +2007-03-07
            diff --git a/mma/docs/html/ref/node18.html b/mma/docs/html/ref/node18.html index b4b8bd3..b14934b 100644 --- a/mma/docs/html/ref/node18.html +++ b/mma/docs/html/ref/node18.html @@ -7,8 +7,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds Jens Lippmann, Marek Rouchal, Martin Wilck and others --> -Low Level MIDI Commands - +Variables, Conditionals and Jumps + @@ -37,11 +37,11 @@ original version by: Nikos Drakos, CBLU, University of Leeds previous
            Next: Fine Tuning (Translations) + HREF="node19.html">Low Level MIDI Commands Up: Reference Manual Previous: Variables, Conditionals and Jumps + HREF="node17.html">Repeats

            @@ -50,1450 +50,1298 @@ original version by: Nikos Drakos, CBLU, University of Leeds

            - +
            -Low Level MIDI Commands +Variables, Conditionals and Jumps

            -The commands discussed in this chapter directly effect your MIDI -output devices. - -

            -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. +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.

            -

            -
            -Channel +

            +Variables

            -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: +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:

            - - +
            +
              +
            • For use in setting up conditional segments of your file, + +

              +

            • +
            • As a shortcut to entering complex chord sequences. + +

              +

            • +
            + +

            +To begin, the following list shows the available commands to set and manipulate variables: + +

            + + + +
            + Set VariableName String +
            +Mset VariableName ... MsetEnd +
            +UnSet VariableName +
            +ShowVars +
            +Inc Variablename [value] +
            +Dec Variablename [value] +
            +Vexpand ON/Off
            -
            Bass Channel 8
            +
            + +

            +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). + +

            +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: + +

            + + +
            + Set Silly Am / Bm / +
            +1 $Silly
            -
            +

            -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. +The first line creates the variable ``Silly''; the second creates a +bar of music with the chords ``Am / Bm /''.

            - -

            -You can disable a channel at any time by using a channel number of 0: +Note that the ``$'' must be the first item on a line or follow a +space character. For example, the following will NOT work:

            - - +
            + + +
            + Set Silly 4a;b;c;d; +
            +1 Am {$Silly}
            -
            Arpeggio-1 Channel 0
            +
            + +

            +However: + +

            + + +
            + 1 Am { $Silly} -
            +

            -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). +will work fine.

            -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. - -

            -It's quite acceptable to do channel reassignments in the middle of a -song. Just assign channel 0 to the unneeded track first. - -

            -MIDI channel settings are not saved in GROOVEs. +Following are details on all the available variable commands:

            -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. +

            +Set +

            -A more general method is to use CHANNELPREF detailed below. +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:

            -You can access the currently assigned channel with the $_TRACK_CHANNEL macro. + + + +
            + 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.

            -ChannelPref +Predefined Variables

            -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: +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:

            - -
            - -
            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. - -

            - -

            + + +
            + Debug Warnings=off +
            ... stuff generating annoying warnings
            -ChShare +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

            - -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. +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.

            -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. +The first set of tests are unary (they take no arguments):

            -If you have different tracks with the same voicing, it's quite simple. -For example, you might have an arpeggio and scale track: +

            +
            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
            -
            Arpeggio Sequence A16 z -
            -Arpeggio Voice Piano1 -
            -Scale Sequence z S8 -
            -Scale Voice Piano1
            +
            + +

            +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 -
            +

            -In this example, -MMA will use different MIDI channels for the -Arpeggio and the Scale. Now, if you force channel -sharing: +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 -
            Scale ChShare Arpeggio
            +
            + +

            +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
            -
            +

            -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? +the comparison is passed the line:

            - - +
            + + +
            + If GT A B abc -
            Arpeggio Sequence A16 z -
            -Arpeggio Voice Piano1 Strings -
            -Scale Sequence z S8 -
            -Scale ChShare Arpeggio
            +
            + +

            +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 -
            +

            -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. +would generate a comparison between ``A B'' and ``ABC''.

            -So, the general rule for track channel sharing is to use only one voice. +Delayed expansion can be applied to either variable. It only works in +an IF directive.

            -One more example which doesn't work: +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
            -
            Arpeggio Sequence A8 +
            + +

            +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
            -Scale Sequence S4 +Else +
              Groove Rhumba
            -Arpeggio Voice Piano1 -
            -Scale Voice Piano1 -
            -Scale ChShare Arpeggio
            +Endif -
            +

            -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. +The ELSE statement(s) are processed only if the test for the +IF test is false.

            -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. +Nesting of IFs is permitted:

            -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 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
            + +

            -This command will always display a warning message. - -

            -For another, simpler, way of reassigning MIDI tracks and letting -MMA do most of the work for you, refer to the -DELETE command. +works just fine. Indentation has been used in these examples to clearly +show the nesting and conditions. You should do the same.

            -ForceOut +Goto

            -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 oversome 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:18.1 -

            - - -
            - -
            MIDI 0xff 0x59 0x02 0xff 0x00
            - -
            - -

            -Some cautions: - -

              -
            • -MMA makes no attempt to verify the validity of the data! - -

              -

            • -
            • The ``Length'' field must be manually calculated. - -

              -

            • -
            • Malformed sequences can create unplayable 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 . - -

            -

            -
            - -

            -You can set the filetype in an RC file (or, for that matter, in any -file processed by -MMA ) with the command: - -

            - - -
            - -
            MidiFile SMF=0
            - -
            - -

            -or - -

            - - -
            - -
            MidiFile SMF=1
            - -
            - -

            -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: - -

            - - -
            - -
            MidiFile Running=0
            - -
            - -

            -or enabled (but this is the default) with: - -

            - - -
            - -
            MidiFile Running=1
            - -
            - -

            -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. - -

            - -

            -MIDIGlis -

            - -

            -This sets the MIDI portamento18.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 disard 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 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. Example: SOLO=1 - -

            -

            -
            - -

            -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: - -

            - -

              -
            • MIDI files to be included do not have to have the same tempo. - MIDI adjusts this automatically on playback. 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. - -

              -

            • -
            • 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). - -

              -

            • -
            - -

            - -

            -MIDIMark -

            - -

            -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). - -

            - - -
            - -
            MidiMark Label
            - -
            - -

            -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. - -

            -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:18.3 -

            - - -
            - -
            Include swing -
            -Groove Swing -
            -Bass MIDIPan 0 -
            -Walk MIDIPan 0 -
            -1 C -
            -2 C -
            ... -
            -123 C -
            -Bass MIDIPan 64 -
            -Walk MIDIPan 64
            - -
            - -

            - -

            -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: +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 simple series like: +
            2. A command defining a label, and,

              - - -
              - -
              MIDISeq 1 ReleaseTime 50; 3 ReleaseTime 0
              - -
              - -

              -in this case the commands are applied to beats 1 and 3 in each bar - of the sequence. +

            3. +
            4. The GOTO command.

            -

            . - -

            - -

            -As a set of names predefined in an MIDIDEF command:

            - - +
            +

            +A label is set with the LABEL directive: + +

            + + +
            + Label Point1 -
            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. +The string defining the label can be any sequence of characters. +Labels are case-insensitive.

            -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: +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.

            - - -
            - -
            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 }
            - -
            - -

            - -

            -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 -

            - -

            -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 . - -

            -To use this feature: - -

            - - -
            - -
            MIDISplit <list of channels>
            - -
            - -

            -So, to split out just the drum channel18.4 you would have the command: - -

            - - -
            - -
            MIDISplit 10
            - -
            - -

            -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: - -

            - - -
            - -
            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: +A few considerations on labels and linenumbers:

              -
            • -MMA tracks the events sent for each bar and will not duplicate - sequences. +
            • A duplicate label generated with a LABEL command will + generate an error.

            • -
            • 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! +
            • A line number label duplicating a LABEL is an error.

            • -
            • Do use the MIDICLEAR command ((details)) to ``undo'' anything - you've done via a MIDIVOICE command. +
            • 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.

            • @@ -1501,86 +1349,87 @@ Some technical notes:

              -

              +

              +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
              -MIDIVolume - - -

              -MIDI devices equipped with mixer settings can make use of the -``Channel'' or ``Master'' volume settings.18.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: - -

              - - -
              +1 Cm +
              +Label Foo +
              +2 Dm +
              +3 / +
              +Goto 5 +
              +4 Am +
              +5 Cm +
              +6 Dm -
              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. +

              +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.


              Footnotes

              -
              ... track:18.1
              -
              This is much easier to do - with the KeySig command, here +
              ... 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.
              -
              ... portamento18.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''. +
              ...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.
              -
              ... Example:18.3
              -
              This is much easier to do with the - MMAStart and MMAEnd options (details). - -
              -
              ... channel18.4
              -
              In -MMA this will always be -channel 10. - -
              -
              ... settings.18.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. +
              ... 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.

              @@ -1596,15 +1445,15 @@ channel 10. previous
              Next: Fine Tuning (Translations) + HREF="node19.html">Low Level MIDI Commands Up: Reference Manual Previous: Variables, Conditionals and Jumps + HREF="node17.html">Repeats
              -Bob -2006-10-15 +bob +2007-03-07
              diff --git a/mma/docs/html/ref/node19.html b/mma/docs/html/ref/node19.html index e80af14..5f92dfa 100644 --- a/mma/docs/html/ref/node19.html +++ b/mma/docs/html/ref/node19.html @@ -7,8 +7,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds Jens Lippmann, Marek Rouchal, Martin Wilck and others --> -Fine Tuning (Translations) - +Low Level MIDI Commands + @@ -26,22 +26,22 @@ original version by: Nikos Drakos, CBLU, University of Leeds - next - up - previous
              - Next: Other Commands and Directives - Up: Next: Fine Tuning (Translations) + Up: Reference Manual - Previous: Low Level MIDI Commands + Previous: Variables, Conditionals and Jumps

              @@ -49,491 +49,1562 @@ original version by: Nikos Drakos, CBLU, University of Leeds 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: - -

                - - -
                - -
                VoiceTR Piano1=Piano2 +


                -ToneTr SnareDrum2=SnareDrum1 -
                -VoiceVolTr Piano2=120 BottleBlow=80 -
                -DrumVolTr RideBell=90 Tambourine=120

                - -
                - -

                -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: - -

                - - -
                - -
                Include yamaha
                - -
                - -

                -

              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 +Channel

              -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: +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: + +

              + + + +
              + Bass Channel 8 + +
              + +

              +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. + +

              + +

              +You can disable a channel at any time by using a channel number of 0: + +

              + + + +
              + Arpeggio-1 Channel 0 + +
              + +

              +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). + +

              +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. + +

              +It's quite acceptable to do channel reassignments in the middle of a +song. Just assign channel 0 to the unneeded track first. + +

              +MIDI channel settings are not saved in GROOVEs. + +

              + +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 +

              + +

              +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 oversome 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:19.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 unplayable 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:

            - - +
            + + +
            + MidiFile SMF=0 -
            VoiceTr Piano1=Clavinet Hmmm=18
            +
            + +

            +or + +

            + + +
            + MidiFile SMF=1 -
            +

            -Note that you additional VOICETR commands will add entries to -the existing table. To clear the table use the command with no -arguments: +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:

            - - +
            + + +
            + MidiFile Running=0 -
            VoiceTr // Empty table
            +
            + +

            +or enabled (but this is the default) with: + +

            + + +
            + MidiFile Running=1 -
            +

            -Assuming the first command, the following will occur: +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.

            - -
            - -
            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. - -

            -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 portamento19.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 disard 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 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. Example: SOLO=1 + +

            +

            +
            + +

            +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. + MIDI adjusts this automatically on playback. 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).

            - - +
            + +
            + MidiMark Label -
            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: +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. + +

            +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:19.3 +

            + + + +
            + Include swing +
            +Groove Swing +
            +Bass MIDIPan 0 +
            +Walk MIDIPan 0 +
            +1 C +
            +2 C +
            ... +
            +123 C +
            +Bass MIDIPan 64 +
            +Walk MIDIPan 64
            + +
            + +

            + +

            +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. 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: +

          • A simple series like:

            - - +
            + +
            + MIDISeq 1 ReleaseTime 50; 3 ReleaseTime 0 -
            Begin Chord -
               Voice Piano2 -
               Volume mp -
               Sequence 1 4 90 -
            -End
            - -
            +

            -the following adjustments are made: - -

            - -

              -
            1. A lookup is done in the global volume table. The volume ``mf'' - is determined to be %85 for the set MIDI velocity, - -

              -

            2. -
            3. the adjusment 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. +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
            -DrumVolTr +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 }
            + +
            + +

            + +

            +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:

            - - +
            + +
            + MIDISplit <list of channels> -
            DrumVolTr SnareDrum1=120 HandClap=110
            - -
            +

            -The drum tone names can be symbolic constants, or MIDI values as in -the next example: +So, to split out just the drum channel19.4 you would have the command:

            - - +
            + +
            + MIDISplit 10 -
            DrumVolTr 44=90 31=55
            - -
            +

            -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.

            - -
            - -
            DrumVolTr // Empty table
            - -
            - +

            +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: + +

            + + + +
            + 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.19.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:19.1
            +
            This is much easier to do + with the KeySig command, here + +
            +
            ... portamento19.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:19.3
            +
            This is much easier to do with the + MMAStart and MMAEnd options (details). + +
            +
            ... channel19.4
            +
            In +MMA this will always be +channel 10. + +
            +
            ... settings.19.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. + +
            +

            - next - up - previous
            - Next: Other Commands and Directives - Up: Next: Fine Tuning (Translations) + Up: Reference Manual - Previous: Low Level MIDI Commands + Previous: Variables, Conditionals and Jumps
            -Bob -2006-10-15 +bob +2007-03-07
            diff --git a/mma/docs/html/ref/node2.html b/mma/docs/html/ref/node2.html index 4bf8398..7907337 100644 --- a/mma/docs/html/ref/node2.html +++ b/mma/docs/html/ref/node2.html @@ -26,21 +26,21 @@ original version by: Nikos Drakos, CBLU, University of Leeds - next - up - previous
            - Next: Next: Tracks and Channels - Up: Up: Reference Manual - Previous: Previous: Overview and Introduction

            @@ -49,11 +49,11 @@ original version by: Nikos Drakos, CBLU, University of Leeds Subsections @@ -73,16 +73,16 @@ name followed by the required options. For example,

            - - +
            + +
            + $ mma test -
            $ mma test
            - -
            +

            processes the file test2.1 and creates + HREF="#foot753">2.1 and creates the MIDI file test.mid.

            @@ -98,16 +98,17 @@ The following command line options are available:

            - - + + @@ -116,7 +117,7 @@ The following command line options are available: + HREF="#foot757">2.2 @@ -193,13 +193,12 @@ This makes perfect sense if you remember that the same line

            -

            OptionDescription
            OptionDescription
            - - +
            - Debugging and other + +
            + Debugging and other aids to figuring out what's going on. -
            +
            -v
            -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 @@ -140,27 +141,25 @@ The following command line options are available: Display running progress. The bar numbers are displayed as they are created complete with the original input line. Don't be confused by multiple listing of ``*'' lines. For example the line - - +
            -
            -33 Cm - * 2 -
            + +
            + 33 Cm + * 2 -
            +
            would be displayed as:

            - - +
            -
            -88: 33 Cm *2 + +
            + 88: 33 Cm *2
            -89: 33 Cm *2 -
            +89: 33 Cm *2 -
            +

            This makes perfect sense if you remember that the same line @@ -178,13 +177,14 @@ This makes perfect sense if you remember that the same line generated.

            - - +
            - Commands which modify + +
            + Commands which modify MMA 's behaviour. -
            +
            -S
            - +
            -
            -$ mma myfile -S tempo=120 -
            + +
            + $ mma myfile -S tempo=120 -
            +

            will process the file myfile.mma with the variable $Tempo @@ -207,13 +206,12 @@ will process the file myfile.mma with the variable $Tempo

            - - +
            -
            -$ mma myfile -S test -
            + +
            + $ mma myfile -S test -
            +

            just sets the variable $test with no value.

  • -mBARS 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="#foot706">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 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.
    -0Generate 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.
    - - +
    - Maintaining + +
    + Maintaining MMA 's database. -
    +
    @@ -254,7 +258,7 @@ just sets the variable $test with no value.
    - - +
    - File commands. + +
    + File commands. -
    +

    -i

    Specify the RC file to use. See -details here.

    @@ -304,13 +309,14 @@ The current installation of to it. This option lets you set the output MIDI file to any filename.

    - - +
    - The following commands + +
    + The following commands are used to create the documentation. As a user you should probably never have a need for any of them. -
    +
    -Dk
    -Dxh Same as -Dxl, but generates HTML output. Used by the mklibdoc.py tool.
    -DnCreate a table of the available chord types.
    -DdaCreate a table of the MIDI drum note names, arranged alphabetically.
    -DdmCreate a table of the MIDI drum note names, arranged by MIDI value.
    -DiaCreate a table of the MIDI instrument names, arranged alphabetically.
    -DimCreate a table of the MIDI instrument names, arranged by MIDI value.

    @@ -376,7 +367,7 @@ Programming Comments MMA is designed to read and write files; it is not a filter.2.4 + HREF="#foot764">2.4

    As noted earlier in this manual, MMA has been written entirely in @@ -396,28 +387,28 @@ I've done a bit of testing with Psyco


    Footnotes

    -
    ...test...test2.1
    Actually, the file test or test.mma is processed. Please read section - file extensions. + file extensions.
    -
    ... users.... 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!... song!2.3
    500 bars with 4 beats per bar at 200 BPM is about 10 minutes.
    -
    ... +
    ... filter.2.4
    A filter mode could be added to @@ -427,26 +418,26 @@ filter.

    - next - up - previous
    - Next: Next: Tracks and Channels - Up: Up: Reference Manual - Previous: Previous: Overview and Introduction
    -Bob -2006-10-15 +bob +2007-03-07
    diff --git a/mma/docs/html/ref/node20.html b/mma/docs/html/ref/node20.html index 49c1cc2..a16232f 100644 --- a/mma/docs/html/ref/node20.html +++ b/mma/docs/html/ref/node20.html @@ -7,8 +7,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds Jens Lippmann, Marek Rouchal, Martin Wilck and others --> -Other Commands and Directives - +Fine Tuning (Translations) + @@ -26,22 +26,22 @@ original version by: Nikos Drakos, CBLU, University of Leeds - next - up - previous
    - Next: Begin/End Blocks - Up: Next: Other Commands and Directives + Up: Reference Manual - Previous: Fine Tuning (Translations) + Previous: Low Level MIDI Commands

    @@ -49,1438 +49,491 @@ original version by: Nikos Drakos, CBLU, University of Leeds Subsections

    - +
    -Other Commands and Directives +Fine Tuning (Translations)

    -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. +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 subjects presented in this chapter are ordered alphabetically. +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: + +

      + + + +
      + VoiceTR Piano1=Piano2
      -AllTracks +ToneTr SnareDrum2=SnareDrum1 +
      +VoiceVolTr Piano2=120 BottleBlow=80 +
      +DrumVolTr RideBell=90 Tambourine=120
      + +
      + +

      +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: + +

      + + + +
      + Include yamaha + +
      + +

      +

    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

    -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: +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:

    +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): + +

    + + + +
    + 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 \
    -Comment +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

    -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. +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:

      -
    • Note duration modifiers such as articulate are applied to each - resultant note, +
    • Your syth lacks certain drum tones--in this case you may want + to set certain DRUMTR commands in a MMARC file.

    • -
    • 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. - -

      +

    • 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 disable this setting use a value of ``0''. +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:

    -

    -Decay -

    - -

    -You can adjust the volume (velocity) of the notes being repeated when -MALLET is enabled: - -

    - - - +
    + + +
    + ToneTR SnareDrum2=SnareDrum1 HandClap=44 -
    Drum-Snare Mallet Decay=-15
    +
    + +

    +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 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). +The syntax and usage of DRUMTR is quite similar to +VOICETR.

    -

    +


    -Octave +VoiceVolTr

    -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: +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 -
    Bass-1 Octave 3
    - -
    +

    -Sets the notes used in the ``Bass-1'' track one octave lower than normal. +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:

    -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 values20.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.20.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''. +
        +
      1. Piano2 will be played at %120 of the normal value,

      2. -
      3. 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. - -

        +

      4. Banjo (voice 105) will be played at %75 of the normal value.
      5. -
      6. 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. +The adjustments are made when a track VOLUME command is +encountered. For example, if the above translation has be set and -

      -

    • -
    - -

    -You can specify a different UNIFY for each bar in a sequence. -Repeated values can be represented with a ``/'': +MMA encounters the following commands:

    - -
    - -
    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. - -

    - -

    + + +
    + Begin Chord +
       Voice Piano2 +
       Volume mp +
       Sequence 1 4 90
    -Voice +End
    + +
    + +

    +the following adjustments are made: + +

    + +

      +
    1. A lookup is done in the global volume table. The volume ``mf'' + is determined to be %85 for the set MIDI velocity, + +

      +

    2. +
    3. the adjusment 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: + +

    + + + +
    + VoiceVolTr // Empty table + +
    + +

    + +

    +
    +DrumVolTr

    -The MIDI instrument or voice used for a track is set with: +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 example, if you wish to make the drum tones ``SnareDrum1'' and +``HandClap'' a bit louder:

    - - +
    + + +
    + DrumVolTr SnareDrum1=120 HandClap=110 -
    Chord-2 Voice Piano1
    +
    + +

    +The drum tone names can be symbolic constants, or MIDI values as in +the next example: + +

    + + +
    + DrumVolTr 44=90 31=55 -
    +

    -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 -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. - -

    -You can specify a different VOICE for each bar in a sequence. -Repeated values can be represented with a ``/'': +All drum tone translations can be disabled with:

    - - +
    + +
    + DrumVolTr // Empty table -
    Chord Voice Piano1 / / Piano2
    - -
    +
    +

    -It is possible to set up translations for the selected voice: see -VOICETR. - -

    -


    Footnotes

    -
    -
    ... values20.1
    -
    Yes, this is -a contradiction of terms. - -
    -
    ... -command.20.2
    -
    A warning message will also be displayed. - -
    -

    +
    - next - up - previous
    - Next: Begin/End Blocks - Up: Next: Other Commands and Directives + Up: Reference Manual - Previous: Fine Tuning (Translations) + Previous: Low Level MIDI Commands
    -Bob -2006-10-15 +bob +2007-03-07
    diff --git a/mma/docs/html/ref/node21.html b/mma/docs/html/ref/node21.html index 7630dea..3091b9c 100644 --- a/mma/docs/html/ref/node21.html +++ b/mma/docs/html/ref/node21.html @@ -7,8 +7,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds Jens Lippmann, Marek Rouchal, Martin Wilck and others --> -Begin/End Blocks - +Other Commands and Directives + @@ -26,22 +26,22 @@ original version by: Nikos Drakos, CBLU, University of Leeds - next - up - previous
    - Next: Documentation Strings - Up: Next: Begin/End Blocks + Up: Reference Manual - Previous: Other Commands and Directives + Previous: Fine Tuning (Translations)

    @@ -49,162 +49,1442 @@ original version by: Nikos Drakos, CBLU, University of Leeds Subsections

    - +
    -Begin/End Blocks +Other Commands and Directives

    -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: +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.

    - -
    - -
    Drum Define X 0 2 100; 50 2 90 +


    -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 +AllTracks

    -The BEGIN command requires any number of arguments. Valid -examples include: +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:

    - - +
    - -
    Begin Drum + +
    + Bass SeqRnd Off + ....
    -Begin Chord2 -
    -Begin Walk Define
    +Chord SeqRnd Off -
    +

    -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. +But,

    -

    -End + + +
    + 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

    -To finish off a BEGIN block, use a single END on a line -by itself. +When +MMA processes a music file, all the note lengths specified in a +pattern are converted to MIDI lengths.

    -Defining musical data, repeats, or other BEGINs inside a block -(other than COMMENT blocks) will not work. - -

    -Nesting is permitted. Eg: +For example in:

    - -
    + + +
    + Bass Define BB 1 4 1 100; 2 4 5 90; 3 4 1 80; 4 4 5 90 -
    Scale Begin -
        Begin Define -
            
    stuff
    -
        End -
        Sequence
    stuff
    +
    + +

    +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. + +

    + +


    -End - -

    +Copy +

    -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. -


    +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. + +

    + +

    +
    +Voice +

    + +

    +The MIDI instrument or voice used for a track is set with: + +

    + + + +
    + Chord-2 Voice Piano1 + +
    + +

    +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 +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. + +

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

    + + + +
    + Chord Voice Piano1 / / Piano2 + +
    + +

    +It is possible to set up translations for the selected voice: see +VOICETR. + +

    +


    Footnotes

    +
    +
    ... values21.1
    +
    Yes, this is +a contradiction of terms. + +
    +
    ... +command.21.2
    +
    A warning message will also be displayed. + +
    +

    - next - up - previous
    - Next: Documentation Strings - Up: Next: Begin/End Blocks + Up: Reference Manual - Previous: Other Commands and Directives + Previous: Fine Tuning (Translations)
    -Bob -2006-10-15 +bob +2007-03-07
    diff --git a/mma/docs/html/ref/node22.html b/mma/docs/html/ref/node22.html index a7c9e8d..b3ba144 100644 --- a/mma/docs/html/ref/node22.html +++ b/mma/docs/html/ref/node22.html @@ -7,8 +7,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds Jens Lippmann, Marek Rouchal, Martin Wilck and others --> -Documentation Strings - +Begin/End Blocks + @@ -26,22 +26,22 @@ original version by: Nikos Drakos, CBLU, University of Leeds - next - up - previous
    - Next: Paths, Files and Libraries - Up: Next: Documentation Strings + Up: Reference Manual - Previous: Begin/End Blocks + Previous: Other Commands and Directives

    @@ -49,130 +49,162 @@ original version by: Nikos Drakos, CBLU, University of Leeds 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 +Begin/End Blocks

    -A DOC command is pretty simple: +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:

    - - +
    + + +
    + Drum Define X 0 2 100; 50 2 90 +
    +Drum Define Y 0 2 100 +
    +Drum Sequence X Y
    -
    Doc This is a documentation string!
    +
    + +

    +Can be replaced with: + +

    + + +
    + Drum Begin +
        Define X 0 2 100; 50 2 90 +
        Define Y 0 2 100 + End +
    +Drum Sequence X Y
    -
    +

    -In most cases, DOCs are treated as COMMENTs. However, -if the -Dx22.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: +Or, even more simply, with:

    - - +
    + +
    + Drum Begin Define +
        X 0 2 100; 50 2 90 +
        Y 0 2 100 +
    +End
    -
    $ mma -Dx -w /usr/local/lib/mma/swing
    - -
    +

    -Note, the '-w' option has been used to suppress the printing of warning -messages. +If you examine some of the library files you will see that this +shortcut is used a lot. + +

    + +

    +Begin +

    + +

    +The BEGIN command requires any number of arguments. Valid +examples include: + +

    + + + +
    + Begin Drum +
    +Begin Chord2 +
    +Begin Walk Define
    + +
    + +

    +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.

    -Author +End

    -As part of the documentation package, there is a AUTHOR -command: +To finish off a BEGIN block, use a single END on a line +by itself. + +

    +Defining musical data, repeats, or other BEGINs inside a block +(other than COMMENT blocks) will not work. + +

    +Nesting is permitted. Eg:

    - - +
    + +
    + Scale Begin +
        Begin Define +
            
    stuff +
        End +
        Sequence
    stuff +
    +End
    -
    Author Bob van der Poel
    - -
    +

    -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. -


    Footnotes

    -
    -
    ...-Dx22.1
    -
    See the command - summary. - -
    -

    +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. +
    - next - up - previous
    - Next: Paths, Files and Libraries - Up: Next: Documentation Strings + Up: Reference Manual - Previous: Begin/End Blocks + Previous: Other Commands and Directives
    -Bob -2006-10-15 +bob +2007-03-07
    diff --git a/mma/docs/html/ref/node23.html b/mma/docs/html/ref/node23.html index 159cca5..3a758ab 100644 --- a/mma/docs/html/ref/node23.html +++ b/mma/docs/html/ref/node23.html @@ -7,8 +7,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds Jens Lippmann, Marek Rouchal, Martin Wilck and others --> -Paths, Files and Libraries - +Documentation Strings + @@ -26,22 +26,22 @@ original version by: Nikos Drakos, CBLU, University of Leeds - next - up - previous
    - Next: Creating Effects - Up: Next: Paths, Files and Libraries + Up: Reference Manual - Previous: Documentation Strings + Previous: Begin/End Blocks

    @@ -49,1053 +49,180 @@ original version by: Nikos Drakos, CBLU, University of Leeds Subsections
    -

    - -
    -Paths, Files and Libraries +

    +Documentation Strings

    -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. +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.

    -But, first a few comments on the location of the -MMA Python modules. +In addition to the commands listed in this chapter, you should also +note DEFGROOVES).

    -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: +For some real-life examples of how to document your library files, +look at any of the library files supplied with this distribution.

    -

      -
    • /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 +Doc

    -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. - -

    -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. - -

    -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. +A DOC command is pretty simple:

    -

    -Tilde Expansion -

    - -

    -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. - -

    -The result of this operation is system dependent. See the entry for -os.path.expanduser in the Python library reference. - -

    - -

    -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: - -

    - - - +
    + +
    + Doc This is a documentation string! -
    SetLibPath PATH
    - -
    +

    -You can have only one path in the SETLIBPATH directive. +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.

    -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 +For producing the +MMA Standard Library Reference a trivial +Python program is used to collate the output generated with a command like:

    - - +
    + +
    + $ mma -Dxl -w /usr/local/lib/mma/swing -
    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. +Note, the '-w' option has been used to suppress the printing of warning +messages.

    -

    -
    -Library Files +

    +Author

    -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''. +As part of the documentation package, there is a AUTHOR +command:

    -

    -
    -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): - -

        - - - +
        + +
        + Author Bob van der Poel -
        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: +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.

        - -
        - -
        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 +

    +DocVar

    -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: +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:

    -

      -
    • Modules can be in c: + + +
      + Begin DocVar
      -mma
      , - -
    • Include files can be in c: +ChordVoice Voice used in Chord tracks (defaults to Piano2).
      -mma +End +

      -includes
      , -
    • -
    • Library files can be in c: +If NDef ChordVoice
      -mma +Set ChordVoice Piano2
      -lib
      . +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

    +
    +
    ...-Dx23.1
    +
    See the command + summary. + +
    +

    - next - up - previous
    - Next: Creating Effects - Up: Next:
    Paths, Files and Libraries + Up: Reference Manual - Previous: Documentation Strings + Previous: Begin/End Blocks
    -Bob -2006-10-15 +bob +2007-03-07
    diff --git a/mma/docs/html/ref/node24.html b/mma/docs/html/ref/node24.html index fed3c8e..039828a 100644 --- a/mma/docs/html/ref/node24.html +++ b/mma/docs/html/ref/node24.html @@ -7,8 +7,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds Jens Lippmann, Marek Rouchal, Martin Wilck and others --> -Creating Effects - +Paths, Files and Libraries + @@ -26,22 +26,22 @@ original version by: Nikos Drakos, CBLU, University of Leeds - next - up - previous
    - Next: Frequency Asked Questions - Up: Next: Creating Effects + Up: Reference Manual - Previous: Paths, Files and Libraries + Previous: Documentation Strings

    @@ -49,168 +49,1053 @@ original version by: Nikos Drakos, CBLU, University of Leeds Subsections

    - +
    -Creating Effects +Paths, Files and Libraries

    -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. +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.

    -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: +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:

    - -
    - -
    1 C +
      +
    • /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). + +

    + +


    -2 G -
    -3 G -
    -4 C

    - -
    - -

    -as a simple test piece to apply tests to. - -

    - -

    -Overlapping Notes +File Extensions

    -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: +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.

    - - -
    - -
    Begin Scale -
        define S1 1 1+1+1+1 90 -
        define S32 S1 * 32 -
        Sequence S32 -
        ScaleType -
        Direction Both -
        Voice Accordion -
        Octave 5 -
    -End
    - -
    +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.

    -``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: +For files included with the USE directive, the directory set +with SETLIBPATH is first checked, followed by the current +directory.

    - - -
    - -
    define S1 1 1 90
    - -
    +For files included with the INCLUDE directive, the directory +set with SETINCPATH is first checked, followed by the current +directory.

    -to see what the effect is of the notes overlapping. +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.

    -Jungle Birds +Tilde Expansion

    -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''. +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. + +

    +The result of this operation is system dependent. See the entry for +os.path.expanduser in the Python library reference.

    - - +
    +

    +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: + +

    + + + +
    + SetLibPath PATH -
    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
    +
    + +

    +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 above is an extract from the -MMA score. The entire song is -included in the ``songs'' directory of this distribution. +The current setting can be accessed via the macro $_AutoLibPath. By +default the setting is ``stdlib''.

    -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. +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
      . + +

      +

    • +


    - next - up - previous
    - Next: Frequency Asked Questions - Up: Next: Creating Effects + Up: Reference Manual - Previous: Paths, Files and Libraries + Previous: Documentation Strings
    -Bob -2006-10-15 +bob +2007-03-07
    diff --git a/mma/docs/html/ref/node25.html b/mma/docs/html/ref/node25.html index f3651ea..49d1062 100644 --- a/mma/docs/html/ref/node25.html +++ b/mma/docs/html/ref/node25.html @@ -7,8 +7,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds Jens Lippmann, Marek Rouchal, Martin Wilck and others --> -Frequency Asked Questions - +Creating Effects + @@ -26,22 +26,22 @@ original version by: Nikos Drakos, CBLU, University of Leeds - next - up - previous
    - Next: Symbols and Constants - Up: Next: Frequency Asked Questions + Up: Reference Manual - Previous: Creating Effects + Previous: Paths, Files and Libraries

    @@ -49,223 +49,168 @@ original version by: Nikos Drakos, CBLU, University of Leeds Subsections

    - +
    -Frequency Asked Questions +Creating Effects

    -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. +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. + +

    +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: + +

    + + + +
    + 1 C +
    +2 G +
    +3 G +
    +4 C
    + +
    + +

    +as a simple test piece to apply tests to.

    -Chord Octaves +Overlapping Notes

    -I've keyed in a song but some of the chords sound way too high - (or low). +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:

    -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. + + +
    + Begin Scale +
        define S1 1 1+1+1+1 90 +
        define S32 S1 * 32 +
        Sequence S32 +
        ScaleType +
        Direction Both +
        Voice Accordion +
        Octave 5 +
    +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.

    -AABA Song Forms +Jungle Birds

    -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. - -

    -Using -MMA variables and some simple looping, one might try something like: +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''.

    - - +
    + +
    + 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
    -
    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. - -

    - -

    -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? +The above is an extract from the +MMA score. The entire song is +included in the ``songs'' directory of this distribution.

    +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.


    - next - up - previous
    - Next: Symbols and Constants - Up: Next: Frequency Asked Questions + Up: Reference Manual - Previous: Creating Effects + Previous: Paths, Files and Libraries
    -Bob -2006-10-15 +bob +2007-03-07
    diff --git a/mma/docs/html/ref/node26.html b/mma/docs/html/ref/node26.html index 9334355..93d44de 100644 --- a/mma/docs/html/ref/node26.html +++ b/mma/docs/html/ref/node26.html @@ -7,8 +7,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds Jens Lippmann, Marek Rouchal, Martin Wilck and others --> -Symbols and Constants - +Frequency Asked Questions + @@ -26,22 +26,22 @@ original version by: Nikos Drakos, CBLU, University of Leeds - next - up - previous
    - Next: Bibliography and Thanks - Up: Next: Symbols and Constants + Up: Reference Manual - Previous: Frequency Asked Questions + Previous: Creating Effects

    @@ -49,3132 +49,223 @@ original version by: Nikos Drakos, CBLU, University of Leeds Subsections + HREF="node26.html#SECTION002640000000000000000">Where's the manual index? +

    - +
    -Symbols and Constants +Frequency Asked Questions

    -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. +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.

    -Chord Names +Chord Octaves

    - -MMA recognizes standard chord names as listed below. The names are -case sensitive and must be entered in uppercase letters as shown: +I've keyed in a song but some of the chords sound way too high + (or low).

    -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$ +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 -

    -Please note that in your input files you must use a lowercase ``b'' or -an ``&'' to represent a $\flat$ and a ``#'' for a $\sharp$. - -

    -The following types of chords are recognized (these are case sensitive -and must be in the mixed upper and lowercase shown): +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.

    -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    $\sharp$5Augmented triad.
    +Augmented triad.
    +7An augmented chord (raised 5th) with a dominant 7th.
    119th chord plus 11th.
    11$\flat$99th chord plus flat 11th.
    13Dominant 7th (including 5th) plus 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''.
    7Dominant 7th.
    7$\sharp$11Dominant 7th plus 9th and sharp 11th.
    7$\sharp$57th, sharp 5.
    7$\sharp$5$\sharp$9Dominant 7th with sharp 5th and sharp 9th.
    7$\sharp$5$\flat$9Dominant 7th with sharp 5th and flat 9th.
    7$\sharp$9Dominant 7th with sharp 9th.
    7$\sharp$9$\sharp$11Dominant 7th plus sharp 9th and sharp 11th.
    7+An augmented chord (raised 5th) with a dominant 7th.
    7+57th, sharp 5.
    7+9Dominant 7th with sharp 9th.
    7-57th, flat 5.
    7-9Dominant 7th with flat 9th.
    7altDominant 7th with flat 5th and flat 9th.
    7$\flat$57th, flat 5.
    7$\flat$5$\sharp$9Dominant 7th with flat 5th and sharp 9th.
    7$\flat$5$\flat$9Dominant 7th with flat 5th and flat 9th.
    7$\flat$9Dominant 7th with flat 9th.
    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.
    9Dominant 7th plus 9th.
    9$\sharp$11Dominant 7th plus 9th and sharp 11th.
    9$\sharp$5Dominant 7th plus 9th with sharp 5th.
    9+5Dominant 7th plus 9th with sharp 5th.
    9-5Dominant 7th plus 9th with flat 5th.
    9$\flat$5Dominant 7th plus 9th with flat 5th.
    9susDominant 7th plus 9th, omit 7th.
    MMajor triad. This is the default and is used in the absense of any other chord type specification.
    M13Major 7th (including 5th) plus 13th.
    M6Major tiad with added 6th.
    M7Major 7th.
    M7$\sharp$11Major 7th plus 9th and sharp 11th.
    M7$\sharp$5Major 7th with sharp 5th.
    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.
    augAugmented triad.
    aug7An augmented chord (raised 5th) with a dominant 7th.
    aug7$\flat$9Augmented 7th with flat 5th and sharp 9th.
    aug9Dominant 7th plus 9th with sharp 5th.
    dimA dim7, not a triad!
    dim3Diminished triad (non-standard notation).
    dim7Diminished seventh.
    mMinor triad.
    m$\sharp$5Major 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(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+5Major 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''.
    m119th with minor 3rd, plus 11th.
    m6Minor 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.
    m7-5Minor 7th, flat 5 (aka 1/2 diminished).
    m7$\flat$5Minor 7th, flat 5 (aka 1/2 diminished).
    m7$\flat$9Minor 7th with added flat 9th.
    m9Minor triad plus 7th and 9th.
    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''.
    maj7Major 7th.
    m$\flat$5Minor triad with flat 5th.
    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''.
    susSuspended 4th, major triad with 3rd raised half tone.
    sus2Suspended 2nd, major triad with major 2nd above root substituted for 3rd.
    sus4Suspended 4th, major triad with 3rd raised half tone.
    sus9Dominant 7th plus 9th, omit 7th.
     
    -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''. +

    +AABA Song Forms +

    -A chord name without a type is interpreted as a major chord (or -triad). For example, the chord ``C'' is identical to ``CM''. +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. + +

    +Using +MMA variables and some simple looping, one might try something like:

    -MMA has an large set of defined chords. However, you can add your -own with the DEFCHORD command, details - here. - -

    - -

    + + +
    + Groove Swing +
    // Set the music into a +
    // series of macros
    -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: - -

    - - - +
    +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 +
    -
    Cm Fm -Gm +D7
    +
    + +

    +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 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. +The choice is up to you.

    -

    -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. You 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 +

    +Where's the GUI?

    -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: +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.

    -

    - -

    -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
     
    -

    - -

    - -
    -Drum Notes +

    +Where's the manual index?

    -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. +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?

    -

    -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}$
     
    -

    - -

    - -
    -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 -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    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
     
    -

    -


    - next - up - previous
    - Next: Bibliography and Thanks - Up: Next: Symbols and Constants + Up: Reference Manual - Previous: Frequency Asked Questions + Previous: Creating Effects
    -Bob -2006-10-15 +bob +2007-03-07
    diff --git a/mma/docs/html/ref/node27.html b/mma/docs/html/ref/node27.html index 7c5c62c..8798e66 100644 --- a/mma/docs/html/ref/node27.html +++ b/mma/docs/html/ref/node27.html @@ -7,8 +7,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds Jens Lippmann, Marek Rouchal, Martin Wilck and others --> -Bibliography and Thanks - +Symbols and Constants + @@ -37,83 +37,3408 @@ original version by: Nikos Drakos, CBLU, University of Leeds previous
    Next: Command Summary + HREF="node28.html">Bibliography and Thanks Up: Reference Manual Previous: Symbols and Constants + HREF="node26.html">Frequency Asked Questions

    + +Subsections -

    -Bibliography and Thanks + + +
    + +

    + +
    +Symbols and Constants

    -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 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.

    -I've also had the use of a number of reference materials: -

    -
    -
    Craig Anderson. MIDI for Musicians. Amsco Publishing, New -York, NY. + +

    +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: + +

    + + + +
    + 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 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. + +

    + +

    +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 +

    + +

    +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: + +

    + +

    + +

    +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
     
    +

    + +

    + +
    +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}$
    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}$
     
    +

    + +

    + +
    +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 +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    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)}$. +
    -
    -
    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. - -

    -

    -
    - -

    -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. - -

    -


    +

    @@ -126,15 +3451,15 @@ who you are--thanks. previous
    Next: Command Summary + HREF="node28.html">Bibliography and Thanks Up: Reference Manual Previous: Symbols and Constants + HREF="node26.html">Frequency Asked Questions
    -Bob -2006-10-15 +bob +2007-03-07
    diff --git a/mma/docs/html/ref/node28.html b/mma/docs/html/ref/node28.html index a9ab42b..110e230 100644 --- a/mma/docs/html/ref/node28.html +++ b/mma/docs/html/ref/node28.html @@ -7,8 +7,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds Jens Lippmann, Marek Rouchal, Martin Wilck and others --> -Command Summary - +Bibliography and Thanks + @@ -26,409 +26,121 @@ original version by: Nikos Drakos, CBLU, University of Leeds - next - up - previous
    - Next: About this document ... - Up: Next: Command Summary + Up: Reference Manual - Previous: Bibliography and Thanks + Previous: Symbols and Constants

    -Command Summary +Bibliography and Thanks

    -

    -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. -
    -

    -

    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. -
    -

    -

    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. -
    -

    -

    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. -
    -

    -

    -
    +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! + +

    +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.


    - next - up - previous
    - Next: About this document ... - Up: Next: Command Summary + Up: Reference Manual - Previous: Bibliography and Thanks + Previous: Symbols and Constants
    -Bob -2006-10-15 +bob +2007-03-07
    diff --git a/mma/docs/html/ref/node29.html b/mma/docs/html/ref/node29.html index 6f59668..d50d29d 100644 --- a/mma/docs/html/ref/node29.html +++ b/mma/docs/html/ref/node29.html @@ -7,8 +7,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds Jens Lippmann, Marek Rouchal, Martin Wilck and others --> -About this document ... - +Command Summary + @@ -18,56 +18,426 @@ original version by: Nikos Drakos, CBLU, University of Leeds + + -next - +next + up - previous
    - Up: Next: About this document ... + Up: Reference Manual - Previous: Command Summary + Previous: Bibliography and Thanks

    -About this document ... +Command Summary

    - LOST LOGO

    -Reference Manual

    -This document was generated using the -LaTeX2HTML translator Version 2002-2-1 (1.71) +

    +TRACK Accent <beat adj> Adjust volume for specified beat(s) in each bar of a track. +

    -Copyright © 1993, 1994, 1995, 1996, -Nikos Drakos, -Computer Based Learning Unit, University of Leeds. +

    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. +
    +

    +

    +
    + +

    +


    + + +next + +up + +previous
    -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 2006-10-15 -


    + Next: About this document ... + Up: Reference Manual + Previous: Bibliography and Thanks +
    -Bob -2006-10-15 +bob +2007-03-07
    diff --git a/mma/docs/html/ref/node3.html b/mma/docs/html/ref/node3.html index 92dab2c..2115002 100644 --- a/mma/docs/html/ref/node3.html +++ b/mma/docs/html/ref/node3.html @@ -26,21 +26,21 @@ original version by: Nikos Drakos, CBLU, University of Leeds - next - up - previous
    - Next: Next: Patterns - Up: Up: Reference Manual - Previous: Previous: Running

    @@ -49,31 +49,33 @@ original version by: Nikos Drakos, CBLU, University of Leeds Subsections @@ -112,8 +114,8 @@ When your library and song files are processed various tracks will be created. Each track is created a unique name. The track types are discussed later in this chapter, but for now they are BASS, CHORD, -WALK, DRUM, ARPEGGIO, SCALE, MELODY -and SOLO. +WALK, DRUM, ARPEGGIO, SCALE, MELODY, +SOLO and ARIA.

    All tracks are named by appending a ``-'' and ``name'' to the @@ -146,10 +148,10 @@ Track Channels

    MIDI defines 16 distinct channels numbered 1 to 16.3.1 There is nothing which says that ``chording'' + HREF="#foot960">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="#foot961">3.2

    For MMA to produce any output, a MIDI channel must be assigned to a @@ -166,10 +168,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 @@ -276,8 +278,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. @@ -319,7 +321,7 @@ sums up the logic used to create the scales:

    Minor
    A melodic minor scale3.4 + HREF="#foot1010">3.4

    Diminished
    @@ -392,6 +394,21 @@ transitions.

    +

    + +
    +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 +augment a section of an existing piece. + +

    +

    Silencing a Track

    @@ -402,7 +419,7 @@ There are a number of ways to silence a track:

      -
    • Use the OFF (page [*]) command to stop the +
    • Use the OFF (page [*]) command to stop the generation of MIDI data,

      @@ -418,7 +435,7 @@ There are a number of ways to silence a track:

    • Disable the MIDI channel with a ``Channel 0'' (page - [*]). + [*]).

    • @@ -433,14 +450,14 @@ details.



      Footnotes

      -
      ... 16.... 16.3.1
      The values 1 to 16 are used in this document. Internally they are stored as values 0 to 15.
      -
      ... 10.... 10.3.2
      This is not a MIDI rule, but a convention established in the GM (General MIDI) standard. If you @@ -448,13 +465,13 @@ details. available.
      -
      ...arpeggio...arpeggio3.3
      The term is derived from the Italian ``to play like a harp''.
      -
      ... scale... scale3.4
      If you think that support for Melodic and Harmonic minor scales is @@ -463,26 +480,26 @@ details.

      - next - up - previous
      - Next: Next: Patterns - Up: Up: Reference Manual - Previous: Previous: Running
      -Bob -2006-10-15 +bob +2007-03-07
      diff --git a/mma/docs/html/ref/node30.html b/mma/docs/html/ref/node30.html new file mode 100644 index 0000000..9786b72 --- /dev/null +++ b/mma/docs/html/ref/node30.html @@ -0,0 +1,73 @@ + + + + + +About this document ... + + + + + + + + + + + + + + + + +next + +up + +previous +
      + Up: Reference Manual + Previous: Command Summary +
      +
      + + +

      +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 2007-03-07 +


      +
      +bob +2007-03-07 +
      + + diff --git a/mma/docs/html/ref/node4.html b/mma/docs/html/ref/node4.html index f377269..c4b2cc2 100644 --- a/mma/docs/html/ref/node4.html +++ b/mma/docs/html/ref/node4.html @@ -26,21 +26,21 @@ original version by: Nikos Drakos, CBLU, University of Leeds - next - up - previous
      - Next: Next: Sequences - Up: Up: Reference Manual - Previous: Previous: Tracks and Channels

      @@ -49,28 +49,30 @@ original version by: Nikos Drakos, CBLU, University of Leeds Subsections @@ -87,7 +89,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 @@ -149,11 +151,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="#foot1523">4.1 See TIME + (here).

      The offset can be further modified by appending a note length (see @@ -169,15 +171,15 @@ 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="#foot1524">4.2

      - - +
      + +
      + Chord Define C1 2-81+4 82 90 -
      Chord Define C1 2-81+4 82 90
      - -
      +

      @@ -193,12 +195,12 @@ You can subtract note lengths as well, but this is rarely done. And,

      - - +
      - + +
      + - - + + @@ -247,14 +249,15 @@ You can subtract note lengths as well, but this is rarely done. And,
      NotationDescription
      NotationDescription
      1 Whole note
      -
      +

      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 @@ -275,33 +278,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="#foot1526">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="#foot1305">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="#foot1310">4.5

      In most cases velocities in the range 50 to 100 are useful. @@ -313,7 +316,7 @@ In most cases velocities in the range 50 to 100 are useful. WIDTH="12" HEIGHT="21" ALIGN="BOTTOM" BORDER="0" SRC="img1.png" ALT="$\flat$">, and G) has 3 offsets: 0, 1 - and 2. Note that the offsets refer to the chord not the + 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 @@ -326,8 +329,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. @@ -335,28 +338,28 @@ For example:

      - - +
      + +
      + Drum Define S1 1 0 50 -
      Drum Define S1 1 0 50
      - -
      +

      and

      - - +
      + +
      + Drum-woof Define S1 1 0 50 -
      Drum-woof Define S1 1 0 50
      - -
      +

      Will generate identical outcomes.4.6 + HREF="#foot1323">4.6

      @@ -369,12 +372,12 @@ A bass pattern is defined with:

      - - +
      + +
      + Position Duration Offset Volume ; ... -
      Position Duration Offset Volume ; ...
      - -
      +

      Each group consists of an beat offset for the start point, the note @@ -399,27 +402,27 @@ 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="#foot1327">4.7 In the boogie-woogie library file a "6#" is used to generate a dominant 7th.

      -
      - - +
      - Bass Definition -
      - + + +
      + Bass Definition +
      + - - +
      - -
      Bass Define Broken8 1 8 1 90 ; \ + +
      + Bass Define Broken8 1 8 1 90 ; \
          2 8 5 80 ; \
          3 8 3 90 ; \ -
          4 8 1+ 80
      +
          4 8 1+ 80 -
      +


      @@ -433,7 +436,8 @@ library file a "6#" is used to generate a dominant 7th. Lost Image -

      +

      @@ -476,12 +480,12 @@ A Chord pattern is defined with:

      - - +
      + +
      + Position Duration Volume1 Volume2 .. ; ... -
      Position Duration Volume1 Volume2 .. ; ...
      - -
      +

      Each group consists of an beat offset for the start point, the note @@ -491,24 +495,24 @@ remaining notes.

      -
      - - +
      - Chord Definition -
      - + + +
      + Chord Definition +
      + - - +
      - -
      Chord Define Straight4+3 1 4 100 ; \ + +
      + Chord Define Straight4+3 1 4 100 ; \
          2 4 90 ; \
          3 4 100 ; \
          4 3 90 ; \
          4.3 3 80 ; \ -
          4.6 3 80
      +
          4.6 3 80 -
      +


      @@ -520,7 +524,8 @@ remaining notes. Lost Image -

      +

      @@ -537,12 +542,12 @@ root and third of a chord to sound, you could use something like:

      - - +
      + +
      + Chord Define Dups 1 8 90 0 90 0; 3 8 90 0 90 0 -
      Chord Define Dups 1 8 90 0 90 0; 3 8 90 0 90 0
      - -
      +

      @@ -555,45 +560,45 @@ An Arpeggio pattern is defined with:

      - - +
      + +
      + Position Duration Volume ; ... -
      Position Duration Volume ; ...
      - -
      +

      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="#foot1529">4.8 Volumes are selected for the specific beat, not for the actual note.

      -
      - - +
      - Arpeggio Definition -
      - + + +
      + Arpeggio Definition +
      + - - +
      - -
      Arpeggio Define 4s 1 4 100; \ + +
      + Arpeggio Define 4s 1 4 100; \
          2 4 90; \
          3 4 100; \ -
          4 4 100
      +
          4 4 100 -
      +


      @@ -602,7 +607,8 @@ selected for the specific beat, not for the actual note. Lost Image -

      +

      @@ -621,17 +627,17 @@ A Walking Bass pattern is defined with:

      - - +
      + +
      + Position Duration Volume ; ... -
      Position Duration Volume ; ...
      - -
      +

      Walking bass tracks play up and down the first part of a scale, paying attention to the ``color''4.9 of the + HREF="#foot1531">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. @@ -643,26 +649,27 @@ current chord (you cannot change this).

      -
      - - +
      - Walking Bass Definition -
      - + + +
      + Walking Bass Definition +
      + - - +
      - -
      Walk Define Walk4 1 4 100 ; \ + +
      + Walk Define Walk4 1 4 100 ; \
          2 4 90; \ -
          3 4 90
      +
          3 4 90 -
      +

      -

      +

      @@ -681,12 +688,12 @@ A scale pattern is defined with:

      - - +
      + +
      + Position Duration Volume ; ... -
      Position Duration Volume ; ...
      - -
      +

      Each group consists of an beat offset for the start point, the note @@ -694,26 +701,27 @@ duration, and volume.

      -
      - - +
      - Scale Definition -
      - + + +
      + Scale Definition +
      + - - +
      - -
      Scale Define S1 1 1 90 + +
      + Scale Define S1 1 1 90
      Scale Define S4 S1 * 4
      -Scale Define S8 S1 * 8
      +Scale Define S8 S1 * 8 -
      +
      -
      +

      @@ -729,12 +737,34 @@ 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.

      -

      +

      +Aria +

      + +

      +An aria pattern is defined with: + +

      + + + +
      + Position Duration Volume ; ... + +
      + +

      +much like a scale pattern. Please refer to the the ARIA section +(here) for more details. + +

      + +


      Drum

      @@ -749,34 +779,35 @@ A Drum pattern is defined with:

      - - +
      + +
      + Position Duration Volume; ... -
      Position Duration Volume; ...
      - -
      +

      -
      - - +
      - Drum Definition -
      - + + +
      + Drum Definition +
      + - - +
      - -
      Drum Define S2 1 0 100; \ + +
      + Drum Define S2 1 0 100; \
          2 0 80 ; \
          3 0 100 ; \ -
          4 0 80
      +
          4 0 80 -
      +
      -
      +

      @@ -791,7 +822,7 @@ indicates 1 MIDI tick.

      -

      +


      Drum Tone

      @@ -813,10 +844,9 @@ more):

      - - +
      - -
      Drum Define S1 1 0 90 + +
      + Drum Define S1 1 0 90
      Drum Define S2 S1 * 2
      @@ -828,9 +858,10 @@ SeqSize 4
      Drum Sequence S4 S2 S2 S4
      -Drum Tone SnareDrum1 SideKick LowTom1 Slap
      +Drum Tone SnareDrum1 SideKick LowTom1 Slap -
      +

      Here the drum patterns ``S2'' and ``S4'' are defined to sound a drum @@ -854,13 +885,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.

      @@ -875,12 +906,12 @@ chord pattern (which is played on beats 1 and 3) as:

      - - +
      + +
      + Chord Define M13 1 4 80; 3 4 80 -
      Chord Define M13 1 4 80; 3 4 80
      - -
      +

      you can create a new pattern which plays on same beats and adds a @@ -888,12 +919,12 @@ single push note just before the third beat:

      - - +
      + +
      + Chord Define M1+3 M13; 2.5 16 80 0 -
      Chord Define M1+3 M13; 2.5 16 80 0
      - -
      +

      A few points to note: @@ -942,12 +973,12 @@ with a command like:

      - - +
      + +
      + Track Define NewPattern OldPattern * N -
      Track Define NewPattern OldPattern * N
      - -
      +

      where ``Track'' is a valid track name (``Chord'', ``Walk'', ``Bass'', @@ -961,16 +992,15 @@ The ``*'' is absolutely required.

      -
      - - +
      - Multiply Define -
      - - -
      - -
      Drum Define S1 1 1 100 + + + +
      + Multiply Define +
      + + +
      + Drum Define S1 1 1 100
      Drum Define S13 S1 * 2
      @@ -982,12 +1012,14 @@ Drum Define S16 S8 * 2
      Drum Define S32 S16 * 2
      -Drum Define S64 S1 * 64
      +Drum Define S64 S1 * 64 -
      +
      -
      +

      @@ -1020,23 +1052,23 @@ swing pattern which might be useful on a snare drum.

      -
      - - +
      - Swing Beat Drum Definition -
      - + + +
      + Swing Beat Drum Definition +
      + - - +
      - -
      Begin Drum Define + +
      + Begin Drum Define
          SB8 1 2+16 0 90 ; 3.66 4+32 80
          SB8 SB8 * 4
      -End
      +End -
      +


      @@ -1055,7 +1087,8 @@ End Lost Image -

      +

      @@ -1066,18 +1099,18 @@ and process it though

      Even cooler4.10 is combining a multiplier, and + HREF="#foot1498">4.10 is combining a multiplier, and existing pattern and a new pattern all in one statement. The following is quite legal (and useful):

      - - +
      + +
      + Drum Define D1234 1 0 90 * 4 -
      Drum Define D1234 1 0 90 * 4
      - -
      +

      which creates drum hits on beats 1, 2, 3 and 4. @@ -1087,12 +1120,12 @@ More contrived (but examples are needed) is:

      - - +
      + +
      + Drum Define Dfunny D1234 * 2; 1.5 0 70 * 2 -
      Drum Define Dfunny D1234 * 2; 1.5 0 70 * 2
      - -
      +

      If you're really interested in the result, run @@ -1102,7 +1135,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 @@ -1111,20 +1144,20 @@ play on beat 1, and then a second pattern played on beat 3.

      -
      - - +
      - Shift Pattern Definition -
      - + + +
      + Shift Pattern Definition +
      + - - +
      + +
      + Chord Define C1-3 1 3 90; \ +
          1.33 3 90; 1.66 3 90
      -
      Chord Define C1-3 1 3 90; \ -
          1.33 3 90; 1.66 3 90
      - -
      +


      @@ -1137,18 +1170,19 @@ play on beat 1, and then a second pattern played on beat 3.

      - - +
      + +
      + Chord Define C3-3 C1-3 Shift 2 -
      Chord Define C3-3 C1-3 Shift 2
      - -
      +

      Lost Image -

      +

      @@ -1164,56 +1198,56 @@ to define a series of quarter notes on the offbeat you could use:

      - - +
      + +
      + Drum Define D1234' 1 0 90 * 4 Shift .5 -
      Drum Define D1234' 1 0 90 * 4 Shift .5
      - -
      +

      which would create the same pattern as the longer:

      - - +
      + +
      + Drum Define D1234' 1.5 1 90; 2.5 1 90; 3.5 1 90; 4.5 1 90 -
      Drum Define D1234' 1.5 1 90; 2.5 1 90; 3.5 1 90; 4.5 1 90
      - -
      +



      Footnotes

      -
      ... warning!).... warning!).4.1
      The exception is that RTIME may move the chord back into the bar.
      -
      ... fine:... 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.... tones.4.3
      See the supplied GROOVE ``Bluegrass'' for an example.
      -
      ... velocity... velocity4.4
      MIDI ``note on'' events are declared with a ``velocity'' value. Think of this as the ``striking pressure'' on a piano.
      -
      ... validity.... 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 @@ -1222,27 +1256,27 @@ which would create the same pattern as the longer: be clipped to the maximum permitted MIDI velocity.
      -
      ... outcomes.... outcomes.4.6
      What really happens is that this definition is stored in a slot named ``DRUM''.
      -
      ... +
      ... semitone.4.7
      Be careful using this feature ...certain scales/chords may return non-musical results.
      -
      ... +
      ... order.4.8
      See the DIRECTION command - (here). + (here).
      -
      ... ``color''... ``color''4.9
      The color of a chord are items like ``minor'', ``major'', etc. The current walking bass algorithm @@ -1251,7 +1285,7 @@ order. -
      ... cooler... cooler4.10
      In this case the word ``cool'' substitutes for the more correct ``useful''. @@ -1259,26 +1293,26 @@ order.

      - next - up - previous
      - Next: Next: Sequences - Up: Up: Reference Manual - Previous: Previous: Tracks and Channels
      -Bob -2006-10-15 +bob +2007-03-07
      diff --git a/mma/docs/html/ref/node5.html b/mma/docs/html/ref/node5.html index bbd0ef3..42b88c4 100644 --- a/mma/docs/html/ref/node5.html +++ b/mma/docs/html/ref/node5.html @@ -26,21 +26,21 @@ original version by: Nikos Drakos, CBLU, University of Leeds - next - up - previous
      - Next: Next: Grooves - Up: Up: Reference Manual - Previous: Previous: Patterns

      @@ -49,15 +49,15 @@ original version by: Nikos Drakos, CBLU, University of Leeds Subsections @@ -85,12 +85,12 @@ each track in your song:

      - - +
      + +
      + Track Sequence Pattern1 Pattern2 ... -
      Track Sequence Pattern1 Pattern2 ...
      - -
      +

      ``Track'' can be any valid track name: ``Chord'', ``Walk'', @@ -104,17 +104,16 @@ definition in a set of curly brackets ``{ }''.

      -
      - - +
      - Simple Sequence -
      - + + +
      + Simple Sequence +
      + - - +
      - -
      SeqClear + +
      + SeqClear
      SeqSize 2
      @@ -134,12 +133,14 @@ Chord Sequence Broken8
      Bass Sequence Broken8
      -Arpeggio Sequence { 1 1 100 * 8 } { 1 1 80 * 4 }
      +Arpeggio Sequence { 1 1 100 * 8 } { 1 1 80 * 4 } -
      +
      -
      +

      @@ -148,12 +149,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="#foot2157">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.

      @@ -163,14 +164,14 @@ equivalent:

      - - +
      - -
      Bass Sequence Bass1 Bass1 Bass2 Bass2 + +
      + Bass Sequence Bass1 Bass1 Bass2 Bass2
      -Bass Sequence Bass1 / Bass2 /
      +Bass Sequence Bass1 / Bass2 / -
      +

      @@ -182,12 +183,12 @@ and decide to delete the Bass halfway though the song you could:

      - - +
      + +
      + Bass Sequence - -
      Bass Sequence -
      - -
      +

      The special sequences, ``-'' or ``z'', are also the equivalent of a @@ -197,18 +198,18 @@ with a 1-5 bass pattern on the first 3 bars and a walking bass on bar

      - - +
      - -
      Bass Sequence Bass4-13 / / z + +
      + Bass Sequence Bass4-13 / / z
      -Walk Sequence z / / Walk4-4
      +Walk Sequence z / / Walk4-4 -
      +

      If you already have a sequence defined5.2 you can repeat or copy the existing pattern by + HREF="#foot2172">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. @@ -220,21 +221,21 @@ fourth bar in the pattern:

      - - +
      - -
      Groove Neato + +
      + Groove Neato
      Chord Sequence * * * {1 2 90}
      -Defgroove NeatoIntro
      +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.

      @@ -260,12 +261,12 @@ when defining a new sequence and you want to be sure that no

      - - +
      + +
      + SeqClear -
      SeqClear
      - -
      +

      deletes all sequence information, with the important exception that @@ -276,15 +277,15 @@ Alternately, the command:

      - - +
      + +
      + Drum SeqClear -
      Drum SeqClear
      - -
      +

      -deletes all drum sequences. This includes the track ``Drum'', +deletes all drum sequences. This includes the track ``Drum'', ``Drum1'', etc.

      @@ -292,16 +293,16 @@ If you use a sub-track:

      - - +
      + +
      + Chord-Piano SeqClear -
      Chord-Piano SeqClear
      - -
      +

      only the sequence for that track is cleared.5.3 + HREF="#foot2254">5.3

      In addition to clearing the sequence pattern, the following other settings are restored to a default condition: @@ -353,27 +354,27 @@ CHORD using this command. The command

      - - +
      + +
      + Chord SeqClear -
      Chord SeqClear
      - -
      +

      -resets all CHORD tracks, whereas the command: +resets all CHORD tracks, whereas the command:

      - - +
      + +
      + Chord-Foo SeqClear -
      Chord-Foo SeqClear
      - -
      +

      -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.

      @@ -388,12 +389,12 @@ example, if you had a sequence:

      - - +
      + +
      + Drum-2 Sequence P1 P2 P3 z -
      Drum-2 Sequence P1 P2 P3 z
      - -
      +

      bar 1 would use ``P1'', bar 2 ``P2'', etc. However, it is quite @@ -408,12 +409,12 @@ sequences.

      - - +
      + +
      + Drum-Snare SeqRnd On -
      Drum-Snare SeqRnd On
      - -
      +

      @@ -421,12 +422,12 @@ sequences.

      - - +
      + +
      + SeqRnd On -
      SeqRnd On
      - -
      +

      @@ -434,12 +435,12 @@ sequences.

      - - +
      + +
      + SeqRnd Drum-Snare Chord-2 Chord-3 -
      SeqRnd Drum-Snare Chord-2 Chord-3
      - -
      +

      @@ -450,14 +451,14 @@ To disable random sequencing:

      - - +
      - -
      SeqRnd Off + +
      + SeqRnd Off
      -Drum SeqRnd Off
      +Drum SeqRnd Off -
      +

      To illustrate the different effects you can generate, assume that you @@ -467,18 +468,18 @@ sequence for each track with a commands similar to:

      - - +
      - -
      Drum-Snare Sequence D1 D2 D3 D4 + +
      + Drum-Snare Sequence D1 D2 D3 D4
      Drum-Low Sequence D11 D22 D33 D44
      Chord Sequence C1 C2 C3 C4
      -Bass Sequence B1 B2 B3 B4
      +Bass Sequence B1 B2 B3 B4 -
      +

      With no sequence randomization at all, the tracks will be be processed @@ -537,12 +538,12 @@ Next, assume we have set sequence randomization with:

      - - +
      + +
      + SeqRnd On -
      SeqRnd On
      - -
      +

      Now, the sequence may look like: @@ -605,14 +606,14 @@ Next, we will set randomization for a Drum and Chord track only:

      - - +
      - -
      Drum-Low SeqRnd On + +
      + Drum-Low SeqRnd On
      -Chord SeqRnd On
      +Chord SeqRnd On -
      +

      @@ -672,12 +673,12 @@ selected set of tracks. In this case we will set the Drum tracks only:

      - - +
      + +
      + SeqRnd Drum-Snare Drum-Low -
      SeqRnd Drum-Snare Drum-Low
      - -
      +

      @@ -749,12 +750,12 @@ you might have a sequence like this:

      - - +
      + +
      + Chord Sequence C1 C2 C3 C4 -
      Chord Sequence C1 C2 C3 C4
      - -
      +

      and you feel that the patterns C1 and C2 need to be used twice as often as C3 and C4. @@ -762,12 +763,12 @@ Simple:

      - - +
      + +
      + Chord SeqRndWeight 2 2 1 1 -
      Chord SeqRndWeight 2 2 1 1
      - -
      +

      Think of the random selection occurring like selecting balls out of bag. The SEQRNDWEIGHT @@ -795,18 +796,18 @@ For example:

      - - +
      + +
      + SeqSize 4 -
      SeqSize 4
      - -
      +

      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 @@ -817,7 +818,7 @@ until it is long enough.



      Footnotes

      -
      ... run-time.... run-time.5.1
      If you run MMA with the ``-s'' option @@ -826,50 +827,50 @@ until it is long enough. sequence.
      -
      ... defined... defined5.2
      In reality there is always a sequence defined for every track, but it might be a series of ``rest'' bars.
      -
      ... cleared.... cleared.5.3
      It is probably easier to use the command: - - +
      + +
      + Chord-Piano Sequence - -
      Chord-Piano Sequence -
      - -
      +
      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.

      - next - up - previous
      - Next: Next: Grooves - Up: Up: Reference Manual - Previous: Previous: Patterns
      -Bob -2006-10-15 +bob +2007-03-07
      diff --git a/mma/docs/html/ref/node6.html b/mma/docs/html/ref/node6.html index 290928a..a59f563 100644 --- a/mma/docs/html/ref/node6.html +++ b/mma/docs/html/ref/node6.html @@ -26,21 +26,21 @@ original version by: Nikos Drakos, CBLU, University of Leeds - next - up - previous
      - Next: Next: Riffs - Up: Up: Reference Manual - Previous: Previous: Sequences

      @@ -49,16 +49,20 @@ original version by: Nikos Drakos, CBLU, University of Leeds Subsections +
    +
    +
  • Deleting Grooves +
  • Library Issues +
    @@ -90,12 +94,12 @@ A groove can be created at anytime in an input file with the command:

    - - +
    + +
    + DefGroove SlowRhumba -
    DefGroove SlowRhumba
    - -
    +

    Optionally, you can include a documentation string to the end of this @@ -103,25 +107,25 @@ command:

    - - +
    + +
    + DefGroove SlowRumba A descriptive comment! -
    DefGroove SlowRumba A descriptive comment!
    - -
    +

    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="#foot2578">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 +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 `` \''. @@ -223,12 +227,12 @@ with:

    - - +
    + +
    + Groove Name -
    Groove Name
    - -
    +

    At this point all of the previously saved information is restored. @@ -239,7 +243,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. @@ -260,12 +264,12 @@ selected after each bar. For example:

      - - +
      + +
      + Groove Tango LightTango LightTangoSus LightTango -
      Groove Tango LightTango LightTangoSus LightTango
      - -
      +

      would create the following bars: @@ -298,12 +302,12 @@ like:

      - - +
      + +
      + Groove Groove34 Groove44 -
      Groove Groove34 Groove44
      - -
      +

      For long lists you can use the ``/'' to repeat the last groove in the @@ -311,33 +315,32 @@ list. The example above could be written:

      - - +
      + +
      + Groove Tango LightTango LightTangoSus / -
      Groove Tango LightTango LightTangoSus /
      - -
      +

      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 the same GROOVE is being used for two or more bars the sequence will not be reset.6.3 + HREF="#foot2663">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:

      - - +
      - -
      Set loop 1 // create counter with value of 1 + +
      + Set loop 1 // create counter with value of 1
      Repeat
        Groove $loop BossaNovaSus BossaNova1Sus BossaNovaFill @@ -346,9 +349,10 @@ Repeat
        Inc Loop // Bump the counter value
      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. @@ -365,12 +369,12 @@ in a track setting:

      - - +
      + +
      + Scale Groove Funny -
      Scale Groove Funny
      - -
      +

      In this case only the information saved in the corresponding @@ -397,31 +401,31 @@ 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:

      - - +
      + +
      + Bass-Foo Groove Something -
      Bass-Foo Groove Something
      - -
      +

      and you really meant to type:

      - - +
      + +
      + Bass-Foe Groove Something -
      Bass-Foe Groove Something
      - -
      +

      you'll have a number of things happening: @@ -429,20 +433,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).

        @@ -464,9 +468,61 @@ you will get a warning.

        -

        +

        +Deleting Grooves +

        + +

        +There are times when you might want +MMA to forget about all the +GROOVEs in its memory. Just do a: + +

        + + + +
        + GrooveClear + +
        + +

        +at any point in your input file and that is exactly what happens. But, +``why,'' you may ask, ``would one want to do this?'' One case would be +to force the re-reading of a library file. For example, a library file +might have a user setting like: + +

        + + + +
        + If Ndef ChordVoice +
        +Set ChordVoice Piano1 +
        +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 +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. + +

        + +

        Library Issues -

        +

        If you are using a groove from a library file, you just need to do @@ -474,23 +530,23 @@ something like:

        - - +
        + +
        + Groove Rhumba2 -
        Groove Rhumba2
        - -
        +

        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 @@ -498,12 +554,12 @@ case, simply do:

        - - +
        + +
        + Use xyz-rhumba -
        Use xyz-rhumba
        - -
        +

        near the top of your file. And if you wish to switch to the groove @@ -511,34 +567,34 @@ defined in the standard file, you can always do:

        - - +
        + +
        + Use rhumba -
        Use rhumba
        - -
        +

        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 [*] +This issue in covered in more detail on page [*] of this manual.


        Footnotes

        -
        ... '/'... '/'6.1
        The '/' is reserved for future enhancements.
        -
        ... digits... digits6.2
        12345 and 2 are invalid; 11foo11 and a2-2 are permitted.
        -
        ... reset.... reset.6.3
        Actually, MMA checks to see the next @@ -548,26 +604,26 @@ of this manual.

        - next - up - previous
        - Next: Next: Riffs - Up: Up: Reference Manual - Previous: Previous: Sequences
        -Bob -2006-10-15 +bob +2007-03-07
        diff --git a/mma/docs/html/ref/node7.html b/mma/docs/html/ref/node7.html index fa3edd7..db98445 100644 --- a/mma/docs/html/ref/node7.html +++ b/mma/docs/html/ref/node7.html @@ -26,21 +26,21 @@ original version by: Nikos Drakos, CBLU, University of Leeds - next - up - previous
        - Next: Next: Musical Data Format - Up: Up: Reference Manual - Previous: Previous: Grooves

        @@ -77,12 +77,12 @@ A RIFF is set with the command:

        - - +
        + +
        + Track Riff Pattern -
        Track Riff Pattern
        - -
        +

        where: @@ -110,10 +110,9 @@ Following is a short example using RIFF to change the Chord Patte

        - - +
        - -
        Groove Rhumba + +
        + Groove Rhumba
        1 Fm7
        @@ -125,9 +124,10 @@ Chord Riff 1 4 100; 3 8 90; 3.666 8 80; 4.333 8 70
        4 Eb6 / Eb
        -5 Fm7
        +5 Fm7 -
        +

        In this case there is a Rhumba Groove for the song; however, in bar 4 @@ -141,10 +141,9 @@ like the patterns used in a sequence.

        - - +
        - -
        Drum Define Emph8 1 0 128 * 8 + +
        + Drum Define Emph8 1 0 128 * 8
        Groove Blues
        @@ -160,14 +159,15 @@ Drum-Clap Riff Emph8
        Drum-Clap Riff Emph8
        -5 C
        +5 C -
        +

        -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. @@ -209,10 +209,9 @@ A few things to keep in mind when using RIFFs:

        - - +
        - -
        Mset CRiff + +
        + Mset CRiff
          Begin Scale
            Define Run 1 1 120
            Riff Run * $SSpeed @@ -238,9 +237,10 @@ Set SSpeed 8 Set SSpeed 12
        $CRIFF
        -5 C
        +5 C -
        +

      5. @@ -260,7 +260,7 @@ SOLO or MELODY track. Please see 7.1 a number of patterns to be processed sequentially. Each + HREF="#foot2960">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. @@ -271,10 +271,9 @@ customized pattern for bars 4 and 5 in a mythical song:

        - - +
        - -
        Groove Rhumba + +
        + Groove Rhumba
        1 Fm7
        @@ -288,12 +287,13 @@ Chord Riff 1 2 100; 3 8 90;
        4 Eb6 / Eb
        -5 Fm7
        +5 Fm7 -
        +

        -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. @@ -301,7 +301,7 @@ second in bar 5. For an example of this see the sample file I often use this feature when creating a SOLO line.


        Footnotes

        -
        ... +
        ... ``stack''7.1
        Actually a queue or FIFO (First In, First Out) @@ -310,26 +310,26 @@ buffer.

        - next - up - previous
        - Next: Next: Musical Data Format - Up: Up: Reference Manual - Previous: Previous: Grooves
        -Bob -2006-10-15 +bob +2007-03-07
        diff --git a/mma/docs/html/ref/node8.html b/mma/docs/html/ref/node8.html index 88aa72c..b55d3ea 100644 --- a/mma/docs/html/ref/node8.html +++ b/mma/docs/html/ref/node8.html @@ -26,21 +26,21 @@ original version by: Nikos Drakos, CBLU, University of Leeds - next - up - previous
        - Next: Next: Lyrics - Up: Up: Reference Manual - Previous: Previous: Riffs

        @@ -49,15 +49,15 @@ original version by: Nikos Drakos, CBLU, University of Leeds Subsections @@ -71,7 +71,7 @@ Musical Data Format

        Compared to patterns, sequences, grooves and the various directives used in -MMA , +MMA , the actual bar by bar chord notations are surprisingly simple.

        @@ -111,42 +111,45 @@ Formally, this becomes:

        - - +
        + +
        + [num] Chord [Chord ...] [lyric] [solo] [* Factor] -
        [num] Chord [Chord ...] [lyric] [solo] [* Factor]
        - -
        +

        As you can see, all that is really needed is a single chord. So, the line:

        - - +
        + +
        + Cm -
        Cm
        - -
        +

        is completely valid. As is:

        - - +
        + +
        + 10 Cm Dm Em Fm * 4 -
        10 Cm Dm Em Fm * 4
        - -
        +

        -The optional solo or melody data is enclosed in ``{ }''. The +The optional solo or melody data is enclosed in ``{ }''s. The complete format and use is detailed in the Solo and Melody Tracks. +

        +Lyrics are enclosed in ''[ ]'' brackets. See the Lyrics section. +

        @@ -172,10 +175,9 @@ example:

        - - +
        - -
        1 Cm * 4 + +
        + 1 Cm * 4
        2
        @@ -183,9 +185,10 @@ example:
        4
        -5 A
        +5 A -
        +

        In the above example bars 2, 3 and 4 are comment bars. @@ -200,19 +203,19 @@ 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:

        - - +
        + +
        + Cm / Dm / * 4 -
        Cm / Dm / * 4
        - -
        +

        produces 4 bars of output with each the first 2 beats of each bar a Cm @@ -231,12 +234,12 @@ For example:

        - - +
        + +
        + Cm Dm Em Fm -
        Cm Dm Em Fm
        - -
        +

        specifies four different chords in a bar. It should be obvious by now @@ -249,24 +252,24 @@ automatically with the last chord name on the line. In other words:

        - - +
        + +
        + Cm -
        Cm
        - -
        +

        and

        - - +
        + +
        + Cm Cm Cm Cm -
        Cm Cm Cm Cm
        - -
        +

        are equivalent (assuming 4 beats per bar). There must be one (or more) @@ -278,24 +281,24 @@ last chord. So:

        - - +
        + +
        + Cm / Dm / -
        Cm / Dm /
        - -
        +

        is the same as

        - - +
        + +
        + Cm Cm Dm Dm -
        Cm Cm Dm Dm
        - -
        +

        It is perfectly okay to start a line with a ``/''. In this case the @@ -309,21 +312,21 @@ 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.

        Rests -

        +

        To disable a voice for a beat you can use a ``z'' for a chord name. If used by itself a ``z'' will disable all but the drum tracks for the given beat. However, you can disable ``Chord'', ``Arpeggio'', -``Scale'', ``Walk'' or ``Bass'' tracks as well by appending a track +``Scale'', ``Walk'', ``Aria'', or ``Bass'' tracks as well by appending a track specifier to the ``z''. Track specifiers are the single letters ``C'', -``A'', ``S'', ``W'', ``B'' or `D'' and ``!''. Track specifiers are +``A'', ``S'', ``W'', ``B'', ``R'' or `D'' and ``!''. Track specifiers are only valid if you also specify a chord. The track specifiers are:

        @@ -352,6 +355,10 @@ only valid if you also specify a chord. The track specifiers are:

        S
        All scale tracks, +

        +

        R +
        All aria tracks, +

        !
        All tracks (almost the same as DWBCA, see below). @@ -388,12 +395,12 @@ Assuming that you have a drum, chord and bass pattern defined:

        - - +
        + +
        + Fm z G7zC CmzD -
        Fm z G7zC CmzD
        - -
        +

        would generate the following beats: @@ -422,7 +429,7 @@ would generate the following beats:

        In addition, there is a super-z notation. ``z!'' forces all instruments to be silent for the given beats. ``z!'' is the same as -``zABCDW'', except that the latter is not valid since it needs a +``zABCDWR'', except that the latter is not valid since it needs a prefixed chord.

        @@ -438,38 +445,38 @@ 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!


        - next - up - previous
        - Next: Next: Lyrics - Up: Up: Reference Manual - Previous: Previous: Riffs
        -Bob -2006-10-15 +bob +2007-03-07
        diff --git a/mma/docs/html/ref/node9.html b/mma/docs/html/ref/node9.html index 4a3da3e..6f0198c 100644 --- a/mma/docs/html/ref/node9.html +++ b/mma/docs/html/ref/node9.html @@ -26,21 +26,21 @@ original version by: Nikos Drakos, CBLU, University of Leeds - next - up - previous
        - Next: Next: Solo and Melody Tracks - Up: Up: Reference Manual - Previous: Previous: Musical Data Format

        @@ -49,26 +49,26 @@ original version by: Nikos Drakos, CBLU, University of Leeds Subsections @@ -87,8 +87,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 +98,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="#foot3444">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. Generally, each syllable will be a separate lyric event which begins at the event's time.9.2
        + HREF="#foot3448">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). @@ -151,24 +151,24 @@ EVENT option is used to select the desired mode.

        - - +
        + +
        + Lyric EVENT=LYRIC -
        Lyric EVENT=LYRIC
        - -
        +

        selects the default LYRIC EVENT mode.

        - - +
        + +
        + Lyric EVENT=TEXT -
        Lyric EVENT=TEXT
        - -
        +

        selects the TEXT EVENT mode. Use of this option also prints a @@ -193,24 +193,24 @@ lyrics for several bars into one event. In this case simply set the

        - - +
        + +
        + Lyric SPLIT=BAR -
        Lyric SPLIT=BAR
        - -
        +

        You can return to normal (syllable/word) mode at anytime with:

        - - +
        + +
        + Lyric SPLIT=NORMAL -
        Lyric SPLIT=NORMAL
        - -
        +

        @@ -225,12 +225,12 @@ insert them as a lyrics. The option:

        - - +
        + +
        + Lyric CHORDS=On -
        Lyric CHORDS=On
        - -
        +

        will enable this. In this mode the chord line is parsed and inserted @@ -261,17 +261,17 @@ in the LYRIC command:

        - - +
        + +
        + Lyric CHORDS=On Transpose=2 -
        Lyric CHORDS=On Transpose=2
        - -
        +

        -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="#foot3474">9.3

        MMA isn't too smart in it's transposition and will often display the @@ -282,12 +282,12 @@ example:

        - - +
        + +
        + Lyric CHORDS=On Transpose=2 CNames=Flat -
        Lyric CHORDS=On Transpose=2 CNames=Flat
        - -
        +

        By default, the ``flat'' setting is used. In addition to ``Flat'' and @@ -310,35 +310,35 @@ things, there is more than one way to do it.

        Lyrics can be set for a bar in-between a pair of []s somewhere in a data bar.9.4 For + HREF="#foot3480">9.4 For example:

        - - +
        - -
        z [ Pardon ] + +
        + z [ Pardon ]
        C [ me, If I'm ]
        E7 [ sentimental, \r]
        -C [when we say good ]
        +C [when we say good ] -
        +

        The alternate method is to use the LYRIC SET directive:

        - - +
        + +
        + Lyric Set Hello Young Lovers -
        Lyric Set Hello Young Lovers
        - -
        +

        Unlike the other LYRIC options, the SET option must be @@ -384,12 +384,12 @@ In this case you simply specify two more sets of lyrics:

        - - +
        + +
        + A / Am / [First verse] [Second Verse] -
        A / Am / [First verse] [Second Verse]
        - -
        +

        However, for this work properly you must set the internal counter @@ -398,12 +398,12 @@ the command:

        - - +
        + +
        + Lyric Verse=Value | INC | DEC -
        Lyric Verse=Value | INC | DEC
        - -
        +

        This means that you can directly set the value (the default value is @@ -411,12 +411,12 @@ This means that you can directly set the value (the default value is

        - - +
        + +
        + Lyric Verse=2 -
        Lyric Verse=2
        - -
        +

        And you can increment or decrement the value with the INC and @@ -424,12 +424,12 @@ DEC options. This is handy at to use in repeat sections:

        - - +
        + +
        + Lyric Verse=Inc -
        Lyric Verse=Inc
        - -
        +

        You cannot set the value to a value less than 1. @@ -466,14 +466,14 @@ and you'd like the lyrics for the first bar to start on beat 4:

        - - +
        - -
        z z z C [ <4>Hello ] + +
        + z z z C [ <4>Hello ]
        -F [ Young lovers ]
        +F [ Young lovers ] -
        +

        Assuming 4/4 the above would put the word ``Hello'' at beat @@ -504,32 +504,31 @@ keep

        - - +
        + +
        + C [ <><Verse_1.>This is a Demo ] -
        C [ <><Verse_1.>This is a Demo ]
        - -
        +

        This example 9.5 shows a complete + HREF="#foot3545">9.5 shows a complete song with lyrics. You should also examine the file egs/lyrics.mma for an alternate example.

        -
        - - +
        - Twinkle, Twinkle, Little Star -
        - + + +
        + Twinkle, Twinkle, Little Star +
        + - - +
        - -
        Tempo 200 + +
        + Tempo 200
        Groove Folk
        @@ -561,12 +560,14 @@ Repeat
         
          Lyric Verse=Inc
        -RepeatEnd
        +RepeatEnd -
        +
        -
        +

        @@ -594,35 +595,35 @@ A few combinations are not permitted:



    Footnotes

    -
    ... +
    ... platforms9.1
    Pointers and reviews to other players would be would appreciated.
    -
    ... time.... time.9.2
    I am quoting from ``MIDI Documentation'' distributed with the TSE Library. Pete Goodliffe, Oct. 21, 1999. Page 41.
    -
    ... setting.... setting.9.3
    This is a feature! It permits you to have separate control over music generation and chord symbol display.
    -
    ... bar.... 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 ...eg:twk 9.5
    Included in this distribution as songs/twinkle.mma. @@ -630,26 +631,26 @@ platforms

    - next - up - previous
    - Next: Next: Solo and Melody Tracks - Up: Up: Reference Manual - Previous: Previous: Musical Data Format
    -Bob -2006-10-15 +bob +2007-03-07
    diff --git a/mma/docs/html/tut/index.html b/mma/docs/html/tut/index.html index ffdfe4a..9f5cbc7 100644 --- a/mma/docs/html/tut/index.html +++ b/mma/docs/html/tut/index.html @@ -50,7 +50,7 @@ original version by: Nikos Drakos, CBLU, University of Leeds

    LOST LOGO + ALT="LOST LOGO">

    Tutorial

    @@ -58,7 +58,7 @@ original version by: Nikos Drakos, CBLU, University of Leeds

    Bob van der Poel

    Wynndel, BC, Canada

    -

    October 15, 2006

    +

    March 7, 2007

    @@ -118,8 +118,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds


    -Bob -2006-10-15 +bob +2007-03-07
    diff --git a/mma/docs/html/tut/mma-tutorial.html b/mma/docs/html/tut/mma-tutorial.html index ffdfe4a..9f5cbc7 100644 --- a/mma/docs/html/tut/mma-tutorial.html +++ b/mma/docs/html/tut/mma-tutorial.html @@ -50,7 +50,7 @@ original version by: Nikos Drakos, CBLU, University of Leeds

    LOST LOGO + ALT="LOST LOGO">

    Tutorial

    @@ -58,7 +58,7 @@ original version by: Nikos Drakos, CBLU, University of Leeds

    Bob van der Poel

    Wynndel, BC, Canada

    -

    October 15, 2006

    +

    March 7, 2007

    @@ -118,8 +118,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds


    -Bob -2006-10-15 +bob +2007-03-07
    diff --git a/mma/docs/html/tut/mup/bass.png b/mma/docs/html/tut/mup/bass.png index 24f5f09..8fe24bf 100644 Binary files a/mma/docs/html/tut/mup/bass.png and b/mma/docs/html/tut/mup/bass.png differ diff --git a/mma/docs/html/tut/mup/deep.png b/mma/docs/html/tut/mup/deep.png index 668733b..c98fc07 100644 Binary files a/mma/docs/html/tut/mup/deep.png and b/mma/docs/html/tut/mup/deep.png differ diff --git a/mma/docs/html/tut/mup/drums.png b/mma/docs/html/tut/mup/drums.png index cfbdf38..1fb71b9 100644 Binary files a/mma/docs/html/tut/mup/drums.png and b/mma/docs/html/tut/mup/drums.png differ diff --git a/mma/docs/html/tut/mup/fella.png b/mma/docs/html/tut/mup/fella.png index 775a7c2..9254d62 100644 Binary files a/mma/docs/html/tut/mup/fella.png and b/mma/docs/html/tut/mup/fella.png differ diff --git a/mma/docs/html/tut/mup/piano.png b/mma/docs/html/tut/mup/piano.png index 93985e1..9ae1ab7 100644 Binary files a/mma/docs/html/tut/mup/piano.png and b/mma/docs/html/tut/mup/piano.png differ diff --git a/mma/docs/html/tut/node1.html b/mma/docs/html/tut/node1.html index 6e4354f..d6423a1 100644 --- a/mma/docs/html/tut/node1.html +++ b/mma/docs/html/tut/node1.html @@ -89,7 +89,7 @@ We hope to cover the following topics: The examples may include songs which are probably not in the public domain. Certainly ``Happy Birthday'' should be public domain, but isn't. User's should note1.1 that the + HREF="#foot186">1.1 that the copyrighted songs in this document are examples only. It is probably not legal for you to copy it or play them. If this document is violating copyright by including any of the sheet music used in the @@ -100,12 +100,13 @@ examples, please let us know and it will be removed.

    - - +
    - This is a draft document. + +
    + This is a draft document. Feedback is solicited! -
    +
    @@ -116,7 +117,7 @@ examples, please let us know and it will be removed.



    Footnotes

    -
    ... note... note1.1
    Bad pun intended! @@ -141,8 +142,8 @@ examples, please let us know and it will be removed. HREF="mma-tutorial.html">Tutorial
    -Bob -2006-10-15 +bob +2007-03-07
    diff --git a/mma/docs/html/tut/node2.html b/mma/docs/html/tut/node2.html index 691b862..ba04090 100644 --- a/mma/docs/html/tut/node2.html +++ b/mma/docs/html/tut/node2.html @@ -58,8 +58,8 @@ on the reference manual and the READMEs for this.

    -Bob -2006-10-15 +bob +2007-03-07
    diff --git a/mma/docs/html/tut/node3.html b/mma/docs/html/tut/node3.html index e6c3dc8..99f93ff 100644 --- a/mma/docs/html/tut/node3.html +++ b/mma/docs/html/tut/node3.html @@ -69,16 +69,17 @@ Fella Bird, Basic Edition

    -
    - - +
    - Sheet Music for a Popular Song -
    - + + +
    + Sheet Music for a Popular Song +
    + Lost Image -
    +

    @@ -139,12 +140,12 @@ After the comments in the file, the first line to note is:

    - - +
    + +
    + Tempo 120 -
    Tempo 120
    - -
    +

    This sets the tempo, or speed, of the piece to 120 beats per minute. You may @@ -162,12 +163,12 @@ we can select one of the predefined grooves:

    - - +
    + +
    + Groove Rhumba -
    Groove Rhumba
    - -
    +

    Note that this command also sets up the ``time signature'' to 4/4. @@ -182,12 +183,12 @@ indicates an ``F'' chord. So that's what we tell

    - - +
    + +
    + 1 F -
    1 F
    - -
    +

    We continue in a similar manner for the rest of the song. @@ -200,24 +201,24 @@ We could have entered the first bar as:

    - - +
    + +
    + 2 F F F F -
    2 F F F F
    - -
    +

    or, more simply:

    - - +
    + +
    + 2 F / / / -
    2 F / / /
    - -
    +

    and had the same result. But, who wants to do all that typing? @@ -230,12 +231,12 @@ The line:

    - - +
    + +
    + 16 F / / z! -
    16 F / / z!
    - -
    +

    causes an ``F'' chord to be used on the first three beats, the fourth @@ -251,12 +252,12 @@ Change to this directory and type the command:

    - - +
    + +
    + mma fella1 -
    mma fella1
    - -
    +

    Your computer should run the python script called ``mma'' and process the @@ -383,12 +384,12 @@ So, let's look at the changes.

    - - +
    + +
    + Groove Metronome2-4 -
    Groove Metronome2-4
    - -
    +

    This sets the current ``groove'' to a metronome. To find this groove @@ -402,12 +403,12 @@ to create an empty bar:

    - - +
    + +
    +    z * 2 -
       z * 2
    - -
    +

    Mind you, we could have specified a chord here and gotten the same @@ -469,8 +470,8 @@ improvement. HREF="node2.html">Installation

    -Bob -2006-10-15 +bob +2007-03-07
    diff --git a/mma/docs/html/tut/node4.html b/mma/docs/html/tut/node4.html index 2b75e9c..5a933d1 100644 --- a/mma/docs/html/tut/node4.html +++ b/mma/docs/html/tut/node4.html @@ -74,18 +74,19 @@ Deep River--A Swinging Spiritual

    -
    - - +
    - A Public Domain Song -
    - + + +
    + A Public Domain Song +
    + Lost Image
    -
    +

    @@ -99,24 +100,24 @@ We start out with a comment block.

    - - +
    + +
    + // Deep River -
    // Deep River
    - -
    +

    Start off by selecting the 4 beat metronome.

    - - +
    + +
    + Groove metronome2-4 -
    Groove metronome2-4
    - -
    +

    We want to surprise our listeners a bit, so we start off with a ``normal'' @@ -124,34 +125,34 @@ tempo. The single ``z'' produces a 4 beat introduction.

    - - +
    - -
    Tempo 90 + +
    + Tempo 90
    z
    -Groove FolkArticulated
    +Groove FolkArticulated -
    +

    As an introduction we play some nice, gentle chords for 4 bars.

    - - +
    - -
    1 F + +
    + 1 F
    2 Dm
    3 Gm
    -4 C7
    +4 C7 -
    +

    Surprise time. We are going to pump the tempo up to 140 BPM and @@ -159,14 +160,14 @@ select the Swing2 Groove.

    - - +
    - -
    Tempo 140 + +
    + Tempo 140
    -Groove Swing2
    +Groove Swing2 -
    +

    If we just did a switch of rhythm and tempo it'd be quite ``interesting''. @@ -178,26 +179,26 @@ drummer a real workout. So, here we double the time and put in a single

    - - +
    - -
    Tempo *2 + +
    + Tempo *2
    -z
    +z -
    +

    Now, we restore the tempo to the original 140.

    - - +
    + +
    + Tempo *.5 -
    Tempo *.5
    - -
    +

    Each time we restart the piece we want the same volume setting. This is bit @@ -206,26 +207,26 @@ of overkill, but it's supposed to be an example. So, we set the volume to

    - - +
    - -
    Volume mf + +
    + Volume mf
    -DefVolume Main
    +DefVolume Main -
    +

    Now, just like the sheet music we insert a repeat start.

    - - +
    + +
    + Repeat -
    Repeat
    - -
    +

    Set the volume, and advise @@ -234,24 +235,23 @@ next 8 bars.

    - - +
    - -
    SetVolume Main + +
    + SetVolume Main
    -Decresc mp 8
    +Decresc mp 8 -
    +

    This is straightforward chording.

    - - +
    - -
    5 F + +
    + 5 F
    6 Gm
    @@ -269,19 +269,19 @@ This is straightforward chording.
    13 Dm
    -14 Am
    +14 Am -
    +

    Increase the volume over the next 4 bars, and more chording.

    - - +
    - -
    Cresc ff 4 + +
    + Cresc ff 4

    15 Bb @@ -298,9 +298,10 @@ Increase the volume over the next 4 bars, and more chording.
    21 F
    -22 Gm
    +22 Gm -
    +

    This is the first/second ending. Note how we've put a ``2'' at the end @@ -308,17 +309,17 @@ of the next line ... this forces 2 repeats.

    - - +
    - -
    RepeatEnding 2 + +
    + RepeatEnding 2

    23 / / / C7
    -24 F
    +24 F -
    +

    For the second and third time we play this we want a more interesting @@ -327,24 +328,24 @@ its thing.

    - - +
    + +
    + Groove Swing2Plus -
    Groove Swing2Plus
    - -
    +

    This ends the repeated section.

    - - +
    + +
    + RepeatEnd -
    RepeatEnd
    - -
    +

    For our 2 bar ending we select the ``Swing2End'' groove. Next, we @@ -352,17 +353,17 @@ ritard our tempo over the next 2 bars.

    - - +
    - -
    Groove Swing2End + +
    + Groove Swing2End
    Tempo -40 2

    -1 / / / C7
    +1 / / / C7 -
    +

    The ``Swing2End'' groove has a neat little saxophone scale. But only on the @@ -372,18 +373,18 @@ the bar with the solo. We also set the solo to a louder volume.

    - - +
    - -
    Scale Volume ff + +
    + Scale Volume ff
    Seq 3
    1 F
    -Fermata -1 1 200
    +Fermata -1 1 200 -
    +

    To finish off the example, we add a bit of time to the last note with a fermata @@ -437,8 +438,8 @@ sample songs--then, it's all up to you. Have fun! HREF="node3.html">A Simple Example

    -Bob -2006-10-15 +bob +2007-03-07
    diff --git a/mma/docs/html/tut/node5.html b/mma/docs/html/tut/node5.html index 8b70294..d55d1dc 100644 --- a/mma/docs/html/tut/node5.html +++ b/mma/docs/html/tut/node5.html @@ -83,7 +83,7 @@ of you'll see here is just one way to create a GROOVE. We have tried to keep it simple and organized it in different sections so that you understand how the GROOVE was built.5.1 + HREF="#foot670">5.1

    The day that you decide to create your proper GROOVEs you'll have to read the manual in detail! @@ -105,18 +105,18 @@ and initialize some variables (those are explained in detail in the

    - - +
    - -
    SeqClear + +
    + SeqClear
    SeqSize 1
    Time 4
    -Timesig 4 4
    +Timesig 4 4 -
    +

    Now let start to create our patterns. @@ -162,13 +162,13 @@ patterns that we will use:

    - - +
    + +
    + Begin Drum Define +
        D1 1 8 90 ; 2.5 8 90 ; 4 8 90
    -
    Begin Drum Define -
        D1 1 8 90 ; 2.5 8 90 ; 4 8 90
    - -
    +

    @@ -183,18 +183,18 @@ So what have we done? Well, we have just translated what we have seen on the score. We have created a pattern D1 with a 8th note on beats 1, 2.5 and 4 and a velocity of 90.5.2 + HREF="#foot672">5.2

    Using the same logic we can create the pattern for the snare drum.

    - - +
    + +
    + S1 2 8 90 ; 4 8 90 -
    S1 2 8 90 ; 4 8 90
    - -
    +

    For the closed HiHat pattern we will use a little trick to avoid having to @@ -202,14 +202,14 @@ enter 8 notes

    - - +
    - -
    CH1 1 8 90 + +
    + CH1 1 8 90
    -C1 CH1 * 8
    +C1 CH1 * 8 -
    +

    As you can see we just define one note on the first beat and multiplied @@ -220,23 +220,22 @@ And we close the definition by adding

    - - +
    + +
    + End -
    End
    - -
    +

    Now that we have the patterns for our drum, we will create the different instruments.5.3 + HREF="#foot673">5.3

    - - +
    - -
    Begin Drum-Kick + +
    + Begin Drum-Kick
      Tone KickDrum1
      Sequence D1
    @@ -254,9 +253,10 @@ Begin Drum-HH
      Tone ClosedHiHat
      Sequence C1
    -End
    +End -
    +

    @@ -289,15 +289,15 @@ for the drum (the line after End) and we add:

    - - +
    - -
    Begin Bass Define + +
    + Begin Bass Define
      B1 1 4+8 1 90 ; 2.5 8 1 90 ; 3 8 1 90 ; 3.5 4 1 90 ; 4.5 8 1 90
    -End
    +End -
    +

    You will already recognize the timing of the riff, the duration and @@ -307,26 +307,26 @@ player is that we add in the pitch definition for the note to be played.

    If we look at the first note definition we see that beat 1 is a note with duration 4+8 (dotted quarter),5.4the note to play is the first + HREF="#foot633">5.4the note to play is the first (root) of the chord and the volume or velocity of the note is 90.5.5 + HREF="#foot674">5.5

    Now the only thing left is to add the bass player at the end of the file, the same way we did with the drums.

    - - +
    - -
    Begin Bass-Simple + +
    + Begin Bass-Simple
      Voice AcousticBass5.6 + HREF="#foot714">5.6
      Sequence B1
    -End
    +End -
    +

    @@ -359,7 +359,7 @@ here is just one of the possibilities.

    We will define both ``hands'' of the piano player separately.5.7 + HREF="#foot676">5.7

    Let's start with the easiest, the left hand. Actually if you think a bit about it, there is not a big difference between a bass player @@ -375,12 +375,12 @@ In the pattern section of our GROOVE we will add:

    - - +
    + +
    + L1 1 2+4 1 90 -
    L1 1 2+4 1 90
    - -
    +

    Remember: First beat, half+fourth note, root of the @@ -391,17 +391,17 @@ And we will create a new bass player

    - - +
    - -
    Begin Bass-LeftHandPiano + +
    + Begin Bass-LeftHandPiano
      Voice Piano1
      Sequence L1
      Octave 3 // This a new command, but simple to understand
    -End
    +End -
    +

    Now the right hand. What the right hand of the piano player does is @@ -414,23 +414,23 @@ On the example score we see that he plays the chord in his first inversion form, but for the sake of simplicity of this ``Getting started'' document we are just ignoring this and we will define the standard form of the chord.5.8 + HREF="#foot677">5.8

    Again, we go up in the definition section of our GROOVE and under the bass patterns we will enter the chord definition

    - - +
    - -
    Begin Chord Define + +
    + Begin Chord Define
      C1 1 2+4 80 ; 4 4 80 5.9 + HREF="#foot732">5.9
    -End
    +End -
    +

    As you can see the chord definition structure is a bit different from @@ -447,16 +447,16 @@ Finally we need our piano right hand player

    - - +
    - -
    Begin Chord-RightHandPiano + +
    + Begin Chord-RightHandPiano
      Voice Piano1
      Sequence C1
    -End
    +End -
    +

    @@ -474,25 +474,24 @@ in a song:

    - - +
    + +
    + DefGroove Myrock1 -
    DefGroove Myrock1
    - -
    +

    is added at the end of the file.

    The file that we created should look like this5.10 + HREF="#foot679">5.10

    - - +
    - -
    SeqClear + +
    + SeqClear
      SeqSize 1
      Timesig 4 4
       @@ -562,9 +561,10 @@ Begin Chord-RightHandPiano End
      
    -DefGroove Myrock1
    +DefGroove Myrock1 -
    +

    @@ -591,16 +591,16 @@ Now start a new textfile to create a song and start the file with:

    - - +
    - -
    Groove Myrock1 + +
    + Groove Myrock1
    Tempo 120
      -
    // Enter chords here
    +
    // Enter chords here -
    +

    Save the file as Mysong.mma and compile it as explained in the first @@ -630,7 +630,7 @@ so don't think you will learn it in a day.

    Also read the README files that are delivered with the distribution. You can find valuable information in these.5.11 + HREF="#foot667">5.11

    Have fun with MMA ! @@ -640,44 +640,44 @@ You can find valuable information in these.


    Footnotes

    -
    ... built.... built.5.1
    This chapter was written by Rony Steelandt of Kara Music Production with minor spelling and grammar fixes by Bob van der Poel.
    -
    ......5.2
    See MMA Reference Manual section [*] for more details.
    -
    ......5.3
    See MMA Reference Manual section [*] for more details.
    -
    ... quarter),... quarter),5.4
    When specifying the duration of a note the following are equal: ``4+8'', ``4.'' or ``8+8+8''.
    -
    ......5.5
    See MMA Reference Manual section [*] for more detail.
    -
    ... AcousticBass... AcousticBass5.6
    For drums we use TONE for other instruments we use VOICE.
    -
    ......5.7
    As many things in MMA there are different ways to define that kind @@ -685,26 +685,26 @@ of pattern. If you're curious, look at the Reference Manual section [*].
    -
    ......5.8
    If you are curious about how to define inverted chords, see the Reference Manual section [*], page [*].
    -
    ......5.9
    This is not exactly right, it will play the 7th on a C7 chord too, but this is beyond the scope of this tutorial.
    -
    ... this... this5.10
    If you are really lazy and don't want to type the text, you download the file here: http://www.kara-moon.com/MMA/tut1.mma.
    -
    ......5.11
    Amongst others, some very good information about fake books. @@ -729,8 +729,8 @@ the file here: A More Complex Example
    -Bob -2006-10-15 +bob +2007-03-07
    diff --git a/mma/docs/html/tut/node6.html b/mma/docs/html/tut/node6.html index 6527c09..5e71ba3 100644 --- a/mma/docs/html/tut/node6.html +++ b/mma/docs/html/tut/node6.html @@ -45,7 +45,7 @@ About this document ... LOST LOGO + ALT="LOST LOGO">

    Tutorial

    @@ -63,11 +63,11 @@ 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-tutorial.tex

    -The translation was initiated by Bob on 2006-10-15 +The translation was initiated by bob on 2007-03-07


    -Bob -2006-10-15 +bob +2007-03-07
    diff --git a/mma/egs/README b/mma/egs/README index 7ad1ad8..0fc62f3 100644 --- a/mma/egs/README +++ b/mma/egs/README @@ -15,7 +15,7 @@ are clearly public domain. This really does limit things! However, a gzip file of many songs is available on the main MMA website: - http://users.xplornet.com/~bvdp/mma/mma.html + http://www.mellowood.ca/mma/mma.html PLEASE NOTE THAT THE SONGS IN THE ARCHIVE ARE DISTRIBUTED FOR EDUCATIONAL PURPOSES ONLY. diff --git a/mma/egs/aria/aria.txt b/mma/egs/aria/aria.txt new file mode 100644 index 0000000..8e99ce9 --- /dev/null +++ b/mma/egs/aria/aria.txt @@ -0,0 +1,202 @@ + +This is the initial doc file for the new ARIA track. The plan is to +incorporate this into the main documentation once the command settles +down. In the meantime I really do want feedback. Thanks. + +Purpose: + +The new ARIA tracks are designed to let MMA auto generate +something resembling melody. Honest, this will never put real +composers on the unemployment line (well, no more than they are mostly +there already). + +You might want to use an ARIA to embellish a section of a song (like +an introduction or an ending). Or you can have MMA generate a complete +melody over the song chords. + + +Theory: + +In a traditional song the melody depends on two parts: patterns +(IE. note lengths, volume, articulation) and pitch (usually determined +by the chords in a song). If you have been using MMA at all you will +know that that chords are the building block of what MMA does +already. So, to generate a melody we just need some kind of +pattern. And, since MMA already uses patterns in most things it +does, it is a short step to use a specialized pattern to generate a +melody. + +It might serve to look at the two sample song files enclosed in this +package. Compile them and play them. Not to bad? + +Now, let's get into the command set. In addition to the existing +tracks, there is a new ARIA track defined. Just like other tracks, you +can create as many ARIAs as you want. So, you can have the tracks +Aria-1, Aria, and Aria-silly all at the same time. + +Most of the commands which you can apply to the other tracks also +apply to ARIAs. This includes things like VOICE, RTIME, VOLUME, HARMONY, etc. + +A few things work differently: + +PATTERN - the pattern definition for an ARIA is . Much like a Scale pattern. + +RANGE - Just like scale tracks. A RANGE of 2 would let MMA work on a 2 +octave chord, etc. + +SCALETYPE: Much like a scale track. By default, the setting for this +is CHORD. But, you can use AUTO, SCALE or CHROMATIC. AUTO and SCALE +are identical and force MMA to select notes from the scale associated +with the current chord; CHROMATIC generates an 11 tone scale starting +at the root note of the chord. + +DIRECTION: As MMA processes the song it moves a note-selection pointer +up or down. By default DIRECTION is set to the single value "1" which +tells MMA to add 1 after each note is generated. However, you can set +the value to an integer -4 to 4 or the special value "r". With "r" a +random value -1, 0 or 1 will be used. + +To further confuse, you can have a list of values for direction. Note +that this this has nothing to do with the sequence size! So, look at +this: + + Aria Direction 0 0 1 2 4 -2 r r 1 -1 + +Now, if we have a piece with only Cmajor chord the following notes +would be generated: + + Event Offset Pointer Note + 1 0 c + 2 0 c + 3 1 e + 4 3 -> 0 c + 5 4 -> 0 c + 6 -2 -> 2 g + 7 random c,e,g + 8 random c,e,g + 9 .... etc. + +But, if you were to change the SCALETYPE to SCALE you would get a +completely different series. + +Things to try: + +- use seqrnd in an ARIA for a less predictable pattern. + +- use HARMONYONLY with a 2nd voice. + +Other Changes: + +The 'z' notation has been expanded with a 'CHORDzR' (like 'zS', etc) to +disable an aria for specific beats. + +PROBLEMS and CAVEATS: + +1. 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: + + - load a groove. Let's say it has a seqsize of 4. + - create a ARIA. Use 4 patterns to match the groove size (if you + don't MMA will expand the sequence size for the ARIA stuff, just + like other tracks). + - 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 + tracks as well, but it might be unexpected here. + +2. DIRECTION can not be changed on a bar per bar basis. It applies to +the entire sequence. Probably not an issue. + +3. The timing for the elements in the sequence are hard +coded when you create the pattern. Example: + + Aria Pattern {1 1 90 * 4} + +will generate 1/4 notes on each beat. What if you want to have some +1/4, some 1/8 and some 1/2? Well, right now you can do this by having +3 different patterns and using a random selection. But, this is not +ideal. Suggestions? + + +3. The current method of doing all this is quite ugly. I have thought +that it might make some sense to save ARIAs with GROOVEs ... but +probably not. After all, the pattern _I_ think sounds great with a +bossanova might just suit you idea of rock. So, saving ARIAs as part +of a groove will probably not happen. I think it would limit things +too much. + +So, how do I see these things being used? One simple way might be to +have a ARIA directory. Easy to have this as a subdir in the existing +"includes" directory. Now, for each aria you create, make a +directory. So, let's assume you create something to sound like Joplin +(Scott, not Janis). And, we'll further assume that the pattern has 4 +built in styles. First off, create a directory +"includes/joplin". Next, create 5 files with some example code. First +off the main file which sets the voicing, etc. + +FILE: include/joblin/main + +-------------- + +seqsize 4 +Begin Aria + Voice Piano3 + Volume f + Articulate 120 + Harmony Open+8Below / / 8Below + Octave 6 + Rskip 10 + Rtime 10 + Rvolume 20 + Direction r 0 0 1 -1 0 0 1 r + ScaleType Chord / / Auto +End + +----------------- + +Next, the specific stuff for pattern 1: + +FILE: includes/joplin/pat1 + +----------------------- + +Include joplin/main /// this will load the aria voicing, etc. + +Aria Sequence {1.5 8 90; 2 8 90; 2.5 8 90; 3 8 90; 3.5 8 90; 4 8 90; 4.5 8 90} \ + {1 8 90; 1.5 8 90; 2 8 90; 2.5 8 90; 3 8 90; 3.5 8 90; 4 4 90 } + +------------------- + +Do similar stuff for patterns 2, 3 and 4. + + +Now, in your song you can do something like: + +-------------- + +Tempo 120 +Groove Swing +Include joplin/pat1 +..... + +include joplin/pat3 +.... + + +Comments on this will be accepted!!! Better ideas will be gratefully +accepted!!!!! + + +NOTE: I thought that it might be handy to be able to copy an +existing sequence/pattern (eg. the CHORD sequence) and use that for +the aria sequence. Matter of fact, I got it running ... but it's quite +useless since it just really duplicates the specified pattern and +notes and doesn't add enough interesting notes to be worthwhile. Just +a dead end. So, the code has been dumped. + + + + + diff --git a/mma/egs/aria/barb.mid b/mma/egs/aria/barb.mid new file mode 100644 index 0000000..d28d0dd Binary files /dev/null and b/mma/egs/aria/barb.mid differ diff --git a/mma/egs/aria/barb.mma b/mma/egs/aria/barb.mma new file mode 100644 index 0000000..7afb99d --- /dev/null +++ b/mma/egs/aria/barb.mma @@ -0,0 +1,114 @@ +// A test of aria. This uses the melodic pattern and chords +// for the rock piece Barbara Ann + +Groove Softrock +Tempo 180 +KeySig F + +/// Define some patterns for the flute solo. This makes it easier to +/// change between different patterns thoughout the piece. It might be +/// easier to have all this stuff in "standard patterns" of some kind +/// which get loaded from a file. Comments? + +mset pat1 + Begin Aria + Sequence {1 4 90; 2 4 90; 3 4. 90; 4 4 90} {1.5 4 90; 2.5 8 90; 3 3 90} + Direction 0 0 0 1 + End +endmset + +mset pat2 + Begin Aria + Sequence { 1 8 90; 1.5 8 90; 2 8 90; 2.5 8 90; 3 8 90; 3.5 8 90; 4.4 4 90} \ + { 1 1 90 * 4} + Direction 0 + End +Endmset + +mset pat3 + Begin Aria + Sequence {1 4 90; 2 8 90 ; 2.5 8 90; 3 2 90} \ + {1 8 90; 1.5 8 90; 2 8 90; 2.5 8 90} + Direction 1 + End +endmset + +/// This is the Aria setup. Nothing much, just set the voicing, etc. +/// Note: no sequence. + +Begin Aria + Voice Flute + Volume FF + Articulate 90 + Octave 6 + Harmony Open +End + +/// A 2nd aria for the counter melody. This time there is a sequence +/// (just half notes on 1/3. But, the track is turned off. + +Begin Aria-Counter + Voice JazzGuitar + Volume FF + Articulate 100 + Octave 5 + Sequence {1 1 90 * 2} + Direction r + + Off +End + + +////////////////////////////// +//// Start out piece + +Repeat + +$pat1 /// set the 1st pattern for the flute solo + +1 F +2 / +3 / +4 / +5 / +6 / +7 Bb +8 / +9 F +10 F + +$pat2 /// change to pattern 2 + + +11 C7 +12 Bb +13 F +14 / + +RepeatEnding 2 + +$pat3 /// change to pattern 3 +Aria-Counter On /// and turn on the counter melody +Aria Volume m + +15 F +16 / +17 F6 +18 F7 +19 Bb +20 / +21 F +22 / + +Aria-Counter Off /// counter melody off +$pat2 /// flute pattern 2 + +23 C7 +24 Bb +25 F +26 / + + +RepeatEnd + + diff --git a/mma/egs/aria/girl.mid b/mma/egs/aria/girl.mid new file mode 100644 index 0000000..f6b11bd Binary files /dev/null and b/mma/egs/aria/girl.mid differ diff --git a/mma/egs/aria/girl.mma b/mma/egs/aria/girl.mma new file mode 100644 index 0000000..700e401 --- /dev/null +++ b/mma/egs/aria/girl.mma @@ -0,0 +1,62 @@ +// Another test for auto-melody. These are the chords +// from Girl Talk. + +Tempo 70 +Keysig Eb + +Groove JazzGuitar + +Begin Aria + Voice JazzGuitar + Volume f + Articulate 120 + Harmony Open+8Below / / 8Below + Octave 6 + Rskip 10 + Rtime 10 + Rvolume 20 + Direction r 0 0 1 -1 0 0 1 r + ScaleType Chord / / Auto +End + +Repeat + +Aria Sequence {1.5 8 90; 2 8 90; 2.5 8 90; 3 8 90; 3.5 8 90; 4 8 90; 4.5 8 90} \ + {1 8 90; 1.5 8 90; 2 8 90; 2.5 8 90; 3 8 90; 3.5 8 90; 4 4 90 } + +Cresc p m 8 + + +5 EbM7 / A9 +6 AbM7 / Fm7 Bb7b9 +7 Gm7 / C7b9 +8 Fm7 Gm7 Ab6 Bb9 +9 Ebm7 / Abm7 +10 F7b5b9 / Fm7 Bb7b9 +11 Gm7 / C7b9 +12 Gm7 Abm6 Bbm6 C7 +13 Cm7 / F9 +14 Fm7 / Abm7 + +Aria Sequence {1 4 90; 2 2 90} + +15 Gm7 / Cm9 + + +Groove JazzGuitar +RepeatEnding + +16 Fm7 / Bb9 + +RepeatEnd + +Decresc m p 3 + +17 / Fm7 / Bb9 + +Groove JazzGuitarEnd +Aria Sequence { 1 2 90} + +18 EbM7 / GbM7 +19 Fm7 / E&7&9 + diff --git a/mma/egs/harmony/harmony.mid b/mma/egs/harmony/harmony.mid index 5b8ba0c..e35fdfc 100644 Binary files a/mma/egs/harmony/harmony.mid and b/mma/egs/harmony/harmony.mid differ diff --git a/mma/egs/lyrics/twinkle.mid b/mma/egs/lyrics/twinkle.mid index e808afa..8c1f9f0 100644 Binary files a/mma/egs/lyrics/twinkle.mid and b/mma/egs/lyrics/twinkle.mid differ diff --git a/mma/egs/lyrics/twinkle1.mid b/mma/egs/lyrics/twinkle1.mid index f5668dc..79d68cf 100644 Binary files a/mma/egs/lyrics/twinkle1.mid and b/mma/egs/lyrics/twinkle1.mid differ diff --git a/mma/egs/lyrics/twinkle2.mid b/mma/egs/lyrics/twinkle2.mid index 9cc5ced..b6ad177 100644 Binary files a/mma/egs/lyrics/twinkle2.mid and b/mma/egs/lyrics/twinkle2.mid differ diff --git a/mma/egs/lyrics/twinkle3.mid b/mma/egs/lyrics/twinkle3.mid index 558ab11..7d919ef 100644 Binary files a/mma/egs/lyrics/twinkle3.mid and b/mma/egs/lyrics/twinkle3.mid differ diff --git a/mma/egs/midi-inc/frankie.mid b/mma/egs/midi-inc/frankie.mid index 5a52192..035d9b6 100644 Binary files a/mma/egs/midi-inc/frankie.mid and b/mma/egs/midi-inc/frankie.mid differ diff --git a/mma/egs/misc/cascade.mid b/mma/egs/misc/cascade.mid index 11180d2..5f7d8da 100644 Binary files a/mma/egs/misc/cascade.mid and b/mma/egs/misc/cascade.mid differ diff --git a/mma/egs/misc/extended-voice.mid b/mma/egs/misc/extended-voice.mid index 1a0c899..e195e86 100644 Binary files a/mma/egs/misc/extended-voice.mid and b/mma/egs/misc/extended-voice.mid differ diff --git a/mma/egs/misc/grooves.mid b/mma/egs/misc/grooves.mid index f56e81e..70e5103 100644 Binary files a/mma/egs/misc/grooves.mid and b/mma/egs/misc/grooves.mid differ diff --git a/mma/egs/misc/macros.mid b/mma/egs/misc/macros.mid index 761b805..a2960e0 100644 Binary files a/mma/egs/misc/macros.mid and b/mma/egs/misc/macros.mid differ diff --git a/mma/egs/misc/volumes.mid b/mma/egs/misc/volumes.mid index e7f8a77..ce4cd6f 100644 Binary files a/mma/egs/misc/volumes.mid and b/mma/egs/misc/volumes.mid differ diff --git a/mma/egs/riffs/riffs.mid b/mma/egs/riffs/riffs.mid index 500ee76..78e7465 100644 Binary files a/mma/egs/riffs/riffs.mid and b/mma/egs/riffs/riffs.mid differ diff --git a/mma/egs/rndset/rndchords.mid b/mma/egs/rndset/rndchords.mid index 695ca0c..a238e0e 100644 Binary files a/mma/egs/rndset/rndchords.mid and b/mma/egs/rndset/rndchords.mid differ diff --git a/mma/egs/rndset/tempo.mid b/mma/egs/rndset/tempo.mid index dea09a8..ca243d9 100644 Binary files a/mma/egs/rndset/tempo.mid and b/mma/egs/rndset/tempo.mid differ diff --git a/mma/egs/scales/scales.mid b/mma/egs/scales/scales.mid index bdec692..b10c55f 100644 Binary files a/mma/egs/scales/scales.mid and b/mma/egs/scales/scales.mid differ diff --git a/mma/egs/simple/bill-bailey.mid b/mma/egs/simple/bill-bailey.mid index 40ed913..b015e78 100644 Binary files a/mma/egs/simple/bill-bailey.mid and b/mma/egs/simple/bill-bailey.mid differ diff --git a/mma/egs/simple/marine-hymn.mid b/mma/egs/simple/marine-hymn.mid index 524cd44..0212069 100644 Binary files a/mma/egs/simple/marine-hymn.mid and b/mma/egs/simple/marine-hymn.mid differ diff --git a/mma/egs/tutorial/README b/mma/egs/tutorial/README new file mode 100644 index 0000000..1cc986f --- /dev/null +++ b/mma/egs/tutorial/README @@ -0,0 +1,3 @@ +These are the mma source files from the tutorial. + +bvdp, Oct/2006 \ No newline at end of file diff --git a/mma/egs/tutorial/deep-river.mid b/mma/egs/tutorial/deep-river.mid new file mode 100644 index 0000000..483f463 Binary files /dev/null and b/mma/egs/tutorial/deep-river.mid differ diff --git a/mma/egs/tutorial/deep-river.mma b/mma/egs/tutorial/deep-river.mma new file mode 100644 index 0000000..56a77b6 --- /dev/null +++ b/mma/egs/tutorial/deep-river.mma @@ -0,0 +1,68 @@ +// Deep River + +Groove metronome2-4 + +Tempo 90 + z +Groove FolkArticulated + +1 F +2 Dm +3 Gm +4 C7 + +Tempo 140 +Groove Swing2 +Tempo *2 + + z + +Tempo *.5 +Volume mf + +Repeat +Decresc mp 8 + +5 F +6 Gm +7 Dm +8 Am C +9 F +10 Gm / Dm +11 F / C7 +12 F +13 Dm +14 Am + +Cresc ff 4 + +15 Bb +16 Am / / C7 +17 F +18 Gm +19 F / C7 +20 Am / Dm C7 +21 F +22 Gm + +RepeatEnding + +23 / / / C7 +24 F + +Groove Swing2Plus + +RepeatEnd + +Groove Swing2End +Tempo -40 2 + +1 / / / C7 + +Scale Volume ff +Seq 3 + +1 F +Fermata -1 1 200 + + diff --git a/mma/egs/tutorial/fella1.mid b/mma/egs/tutorial/fella1.mid new file mode 100644 index 0000000..d029347 Binary files /dev/null and b/mma/egs/tutorial/fella1.mid differ diff --git a/mma/egs/tutorial/fella1.mma b/mma/egs/tutorial/fella1.mma new file mode 100644 index 0000000..f8cfd5a --- /dev/null +++ b/mma/egs/tutorial/fella1.mma @@ -0,0 +1,23 @@ +// Sample tutorial file +// Fella Bird, try 1 + +Tempo 120 +Groove Rhumba + +1 F +2 F +3 C7 +4 F +5 F +6 F +7 C7 +8 F +9 Gm +10 F +11 C7 +12 F +13 Gm +14 F +15 C7 +16 F / / z! + diff --git a/mma/egs/tutorial/fella2.mid b/mma/egs/tutorial/fella2.mid new file mode 100644 index 0000000..ef5adad Binary files /dev/null and b/mma/egs/tutorial/fella2.mid differ diff --git a/mma/egs/tutorial/fella2.mma b/mma/egs/tutorial/fella2.mma new file mode 100644 index 0000000..305939b --- /dev/null +++ b/mma/egs/tutorial/fella2.mma @@ -0,0 +1,42 @@ +// Sample tutorial file +// Fella Bird, try 2 + +Tempo 120 +Groove Metronome2-4 + + z * 2 + +Groove Rhumba +Repeat +Volume mp +Cresc mf 4 + +1 F +2 F +3 C7 +4 F +5 F +6 F +7 C7 +8 F +9 Gm +10 F +11 C7 + +Decresc p 4 + +12 F +13 Gm +14 F +15 C7 + +RepeatEnding + +16 F / / z + +RepeatEnd + +17 F / / z! + cut -1 + + diff --git a/mma/lib/README b/mma/lib/README index 05440fe..e1caa04 100644 --- a/mma/lib/README +++ b/mma/lib/README @@ -25,6 +25,8 @@ Some initial guidelines.... >> Include an "Author" directive line. Currently this is treated as a comment, but we might use it in the future. +>> Do document ANY variables you use in the file with the DocVar command. + >> Add a DocDefine to the end of each goove definition. Something like: DefGroove Waltz This is a nice waltz groove. @@ -55,7 +57,7 @@ Some initial guidelines.... files. >> Do use the standard pattern include files! And don't rename the - patterns defined in them! + patterns defined in them ... well, unless you're sure you want to. >> Create patterns in logical order. The order in which you define them is also the order in which they'll be listed in the docs. diff --git a/mma/lib/stdlib/.mmaDB b/mma/lib/stdlib/.mmaDB index c2d3738..6092b43 100644 Binary files a/mma/lib/stdlib/.mmaDB and b/mma/lib/stdlib/.mmaDB differ diff --git a/mma/lib/stdlib/8beat.mma b/mma/lib/stdlib/8beat.mma index 9443c51..a24dd7e 100644 --- a/mma/lib/stdlib/8beat.mma +++ b/mma/lib/stdlib/8beat.mma @@ -175,7 +175,29 @@ DefGroove 8Beat1 Adds interest to bass line with alternate walking bars. Chord-Sus Groove 8BeatSus DefGroove 8Beat1Sus Adds sustained string to 8Beat1. - + +/////////////////////// +/// Intro + +Groove 8Beat + +Alltracks SeqRnd Off + +Drum-OHH Sequence * * * D1234 +Drum-CHH Sequence * * * D13 +Drum-Snare Sequence D24 / / / +Drum-Kick Sequence * * * D1 + +Bass Sequence Bmain / / B1 + +Chord Sequence P1 P2 P3 C123 + +Chord-Guitar Sequence G1 G1 G1 L1 + + +DefGroove 8BeatIntro Straight-ahead four bar introduction. + + /////////////////////////////////////// // 8BeatEnd diff --git a/mma/lib/stdlib/ballad.mma b/mma/lib/stdlib/ballad.mma index 5fd0f8a..70da4af 100644 --- a/mma/lib/stdlib/ballad.mma +++ b/mma/lib/stdlib/ballad.mma @@ -240,6 +240,11 @@ DefGroove BalladIntro2 Add in some sustained strings to BalladIntro1. Groove Ballad +Begin Alltracks + SeqRnd Off + Rskip 0 +End + Drum-Kick Sequence D13 Drum-Cym Sequence D1234 Drum-MuteTri Sequence D24 @@ -260,3 +265,25 @@ DefGroove BalladEnd A 4 bar ending with a scale played on a harp. \ The scale goes from 16ths, 8ths, quarters and half notes on \ bars 1 to 4. + +Groove BalladEnd + +Scale Sequence - + +Begin Arpeggio + SeqClear + Voice OrchestralHarp + Articulate 110 + Sequence A4 + Range 1.7 + Direction Up + Volume mf + Octave 5 + Harmony Open+8Below +End + +DefGroove Ballad1End A simpler 4 bar ending. We still have a harp, but it's \ + doing quarter note arpeggios. + + + diff --git a/mma/lib/stdlib/ballad128.mma b/mma/lib/stdlib/ballad128.mma new file mode 100644 index 0000000..f1c56f0 --- /dev/null +++ b/mma/lib/stdlib/ballad128.mma @@ -0,0 +1,157 @@ + +// ballad128 + +Begin Doc + A 12/8 Ballad. Written for "Memory" This is written in 4/4, so, when figuring + tempo use a dotted quarter for the beat count. +End + +Author Bob van der Poel + +SeqClear +Time 4 +Timesig 4 4 +Include stdpats + +///////// Additional Patterns + +Begin Chord Define + C3232 1 3 80; 1.33 3 80 ; 1.66 3 80; 2 4 90 + C3232 C3232; C3232 Shift 2 +End + +////////// Ballad + +SeqSize 4 + +Begin Drum-Snare + Tone SnareDrum2 + Sequence { 1 0 30 * 12} + Accent 1 100 2 100 3 100 4 100 + Volume p + Rtime 2 + Rvolume 5 +End + +Begin Drum-Kick + Tone SideKick + Volume pp + Sequence { 1 0 70 * 2} +End + +Begin Bass + Voice AcousticBass + Octave 3 + Articulate 120 + Volume m + Sequence {B13; 2.66 8 3 70; 4.66 8 3 70} / / z +End + +Begin Walk + Voice $_Bass_Voice + Octave $_Bass_Octave + Articulate $_Bass_Articulate + Volume $_Bass_Volume + Direction Down + Sequence z z z W1234 +End + +Begin Chord + Voice OrchestralHarp + Volume p + Articulate 110 + Octave 6 + Voicing Mode=Optimal + Sequence C3232 +End + +DefGroove Ballad128 A very simple, relaxed 12/8 ballad pattern. + +//////////////////// +// Arpeggios + +Groove Ballad128 + +Begin Arpeggio + Voice Piano1 + Volume m + Octave 5 + Direction Up + Range 1 + Sequence { 1 1+1 80 * 12} + Rskip 30 + Articulate 120 +End + +DefGroove Ballad128Plus Adds arpeggiated . + +///////////////////////////////// +// Add in sustained strings + +Groove Ballad128 + +Begin Chord-Sus + Voice TremoloStrings + Sequence { 1 1 90 0 90 0 * 4 } + Voicing Mode=Optimal + Octave 5 + Articulate 100 + Unify On + Rvolume 10 + Volume pp +End + +DefGroove Ballad128Sus Add in sustained TremoloStrings + +Groove Ballad128Plus +Chord-Sus Groove Ballad128Sus +DefGroove Ballad128SusPlus Sustained strings and apreggiating piano. + +/////////////////////////////////////////////////// +/// Intro ... just an arpeggio and bass, no drums + +Groove Ballad128 + +Drum-Snare Sequence - +Drum-Kick Sequence - +Chord Sequence - + +Begin Arpeggio + Voice $_Chord_Voice + Volume m + Octave 5 + Direction Both + Harmony Open+8Below + Range .9 / / 1 + Sequence { 1 1+1 80 * 12} / / z + Articulate 120 +End + +Begin Bass-Intro + Voice $_Arpeggio_Voice + Volume $_Arpeggio_Volume + Octave $_Arpeggio_Octave + Harmony $_Arpeggio_Harmony + Articulate $_Arpeggio_Articulate + Sequence z z z {1 8 6# 90; 1.33 8 6# 80; 1.66 8 6# 70; \ + 2 8 5 90; 2.33 8 5 80; 2.66 8 5 70; \ + 3 8 3 90; 3.33 8 3 80; 3.66 8 3 70; \ + 4 4 1 80 } +End + +DefGroove Ballad128Intro This 4 bar intro plays bass notes and harp arpeggios. \ + It pretty much assumes a 7th chord on the 4th bar. + +///////////////////////////////// +/// Ending + +Groove Ballad128 +SeqSize 2 + +Drum-Snare Sequence * {1 0 40 * 4} +Drum-Kick Sequence * +Bass Sequence * B11 +Walk Sequence - +Chord Sequence * C1234 + +DefGroove Ballad128End A 2 bar ending. diff --git a/mma/lib/stdlib/beguine.mma b/mma/lib/stdlib/beguine.mma index 1b12179..1060288 100644 --- a/mma/lib/stdlib/beguine.mma +++ b/mma/lib/stdlib/beguine.mma @@ -3,11 +3,11 @@ Begin Doc - This started life as a copy of the rumba patterns. I've changed - the drum sounds from snares to toms, and deleted hits on final 8th - beat. I really don't know the difference between a rhumba and a - beguine, so help would be welcome! - + This started life as a copy of the rumba patterns. I've changed + the drum sounds from snares to toms, and deleted hits on final 8th + beat. I really don't know the difference between a rhumba and a + beguine, so help would be welcome! + End Author Bob van der Poel @@ -44,7 +44,7 @@ Begin Drum-Maraca Rtime 2 RSkip 5 End - + Begin Drum-Lconga Tone LowConga Sequence D4 { D4; D3 shift .5 } @@ -108,8 +108,8 @@ End Begin Walk Voice FretLessBass Begin Define - Wa 1 4 85 ; 2.5 4 88 ; 4 4 80 - Wb Wa ; 4.5 8 77 + Wa 1 4 85 ; 2.5 4 88 ; 4 4 80 + Wb Wa ; 4.5 8 77 End Sequence Wa z Wb z Accent 1 20 @@ -129,7 +129,7 @@ End DefGroove Beguine Nice, smooth easy listening. -//////// Sustained strings in the background. +//////// Sustained strings in the background. Begin Chord-Sus Voice TremoloStrings @@ -151,7 +151,7 @@ DefGroove BeguineSus Adds in a sustained string. Groove Beguine Begin Arpeggio - Sequence A4 + Sequence A4 Invert 0 0 1 2 SeqRnd On Voice PizzicatoString @@ -183,11 +183,11 @@ Begin Drum-Wis /// added tone Volume mp Rvolume 5 Rtime 2 -End +End Drum-Maraca Sequence D8 Drum-Lconga Sequence D24 -Drum-Toms1 Sequence D3 +Drum-Toms1 Sequence D3 Drum-Toms2 Sequence D14 Drum-Hconga Sequence D2 Drum-HH Sequence D8 @@ -209,7 +209,7 @@ Alltracks RSkip 0 Drum Sequence * * * D12 Drum-Maraca Sequence * * * D12 Drum-Lconga Sequence D4 / / z -Drum-HH Sequence * +Drum-HH Sequence * Chord Sequence * * * {1 2 90} @@ -227,6 +227,8 @@ DefGroove BeguineIntro Simple enough 4 bar introduction. Groove Beguine +Alltracks SeqRnd Off + Begin Scale Sequence Scale8 Scale4 Scale2 Scale Voice SlowStrings @@ -244,5 +246,25 @@ DefGroove BeguineEnd Ending with string scales. Uses 8ths \ on the 4th. Use a CUT if the final chord sounds too long. +Groove Beguine +Seqsize 2 + +Alltracks SeqRnd Off + +Drum Sequence * D13 // claves +Drum-Maraca Sequence * D12 +Drum-Lconga Sequence D1234 z +Drum-Toms1 Sequence D13 / +Drum-Toms2 Sequence D1234 D12 +Drum-Hconga Sequence * +Drum-HH Sequence * + +Chord Sequence C1234 {1 2 90} +Walk Sequence z +Bass Sequence B13 B1 + +DefGroove Beguine2End A more abrupt 2 bar ending. + + diff --git a/mma/lib/stdlib/bigband.mma b/mma/lib/stdlib/bigband.mma index 3e138b9..104f4c1 100644 --- a/mma/lib/stdlib/bigband.mma +++ b/mma/lib/stdlib/bigband.mma @@ -231,6 +231,29 @@ End DefGroove BigBandFill Simple fill bar, good in an ending. +Groove BigBandFill + +// Drum-HH +Drum-Snare Sequence D13 +// Drum-Kick +// Drum-Ride + +Walk Sequence - +Begin Bass + Voice $_Walk_Voice + Octave $_Walk_Octave + Sequence B1234 +End + +Chord Sequence C1234 +Begin Chord-Hits1 + Octave 5 + Sequence {1 4. 80; 3 8. 95; 4 8 90} +End + +DefGroove BigBand1Fill Louder, 4 in the bar fill. + + /////////////////////////////////// // Intros diff --git a/mma/lib/stdlib/bossanova.mma b/mma/lib/stdlib/bossanova.mma index 7d3d47f..19bdb63 100644 --- a/mma/lib/stdlib/bossanova.mma +++ b/mma/lib/stdlib/bossanova.mma @@ -152,8 +152,7 @@ End DefGroove BossaNova Standard bossanova beat. ////////////////////////////////// -// BossaNovaSus -// Add in sustained 1st ,3rd and 5ths +// Sustained versions Groove BossaNova @@ -175,6 +174,8 @@ End DefGroove BossaNovaSus Adds sustained choir voices. +/// Back to 4 bar patterns + Groove BossaNova Begin Chord-Sus @@ -189,6 +190,36 @@ End DefGroove BossaNova1Sus Adds sustained strings. +Groove BossaNova + +Begin Bass-Sus + Voice Strings + Octave 6 + Harmony Open+8Below + Sequence {1 2. 5 90; 4 4 3 90} {1 1 1 90} + Articulate 120 + Unify On + Volume mp +End + +DefGroove BossaNova2Sus Basic Bossa with decending string pattern. + +Groove BossaNova1Sus +SeqSize 4 +Begin Bass-Sus + Groove BossaNova2Sus + Sequence * * z z +End + +Begin Chord-Sus + Sequence z z * * + Volume mp + Octave 6 +End + +DefGroove BossaNova3Sus A combination of BossaNova1Sus and BossaNova2Sus. Alternating \ + bars of decending strings with full chords. + ////////////////////////// // BossaNovaFill // Add some bells. Good for a 1/2 bar transition diff --git a/mma/lib/stdlib/chacha.mma b/mma/lib/stdlib/chacha.mma index eac946c..508d75d 100644 --- a/mma/lib/stdlib/chacha.mma +++ b/mma/lib/stdlib/chacha.mma @@ -3,15 +3,25 @@ Begin Doc - A popular, albeit somewhat dated and make trite by Americanized versions, - The Cha-Cha-Cha remains a popular rhythm with broad audience appeal. - I've used ``Rico Vacilon'' as a demo. - This file was mostly developed from the patterns in``Latin Rhythms: Mystery Unraveled'' - by Victor Lopez. + The Cha-Cha-Cha remains a popular rhythm with broad audience appeal, + despite the fact that it is somewhat dated and made trite by + Americanized versions. I've used "Rico Vacilon" as a demo. + This file was mostly developed from the patterns in + "Latin Rhythms: Mystery Unraveled" by Victor Lopez. End Author Bob van der Poel +NewSet ArpeggioOctave 7 +NewSet ArpeggioVoice Flute +NewSet ScaleVoice Flute + +Begin DocVar + ArpeggioOctave The Octave setting for the flute arpeggios (default=7) + ArpeggioVoice Voice for the ChaCha1 Arpeggios (default=Flute) + ScaleVoice Voice for the accending scale in ChaCha1Fill (default=Flute) +End + SeqClear Time 4 Timesig 4 4 @@ -121,11 +131,11 @@ DefGroove ChaCha Our basic, non-American, pattern. Groove ChaCha Begin Arpeggio - Voice Flute + Voice $ArpeggioVoice Volume m Articulate 80 SeqRnd On - Octave 7 + Octave $ArpeggioOctave Range 1 Direction Random Harmony Open @@ -138,6 +148,7 @@ End DefGroove ChaCha1 Adds in flute arpeggios. +////////////////////////// ////// Sustained Groove ChaCha @@ -161,6 +172,43 @@ Groove ChaCha1 Arpeggio-Sus Groove ChaChaSus DefGroove ChaCha1Sus Combines the flute and string arpeggios. +/////////////////////////// +//// Fills + +Groove ChaCha +Seqsize 1 + +Drum-Clave Sequence D1234 +//Drum-LGuiro +//Drum-SGuiro +Drum-HConga Sequence { D1234 Shift .5 } +Drum-LConga Sequence { D1234 Shift .75 } +//Drum-Snare +//Drum-HH +//Drum-MTom +//Drum-HTom +Bass Sequence {1 2. 1 120; 3 4 5 120} +Chord Sequence C13 + +DefGroove ChaChaFill A one bar fill. + +Groove ChaChaFill + +Begin Scale + Voice $ScaleVoice + Octave 6 + Volume mf + Sequence { 1 1 90 * 24 } + Articulate 102 + Range 2 + ScaleType Chromatic + Direction Up +End + +DefGroove ChaCha1Fill Fill with accending flute run. Makes a good section introduction. + + +//////////////////////////// ////// Introduction Groove ChaCha @@ -176,10 +224,11 @@ Drum-HH Sequence * * D16 D123 //Drum-MTom Sequence D4 //Drum-HTom Sequence {D4 Shift .5} Bass Sequence * * * B11 -Chord Sequence * * {C4; C4 Shift .5} L1 +Chord Sequence * * C1234 L1 DefGroove ChaChaIntro A plain 4 bar introduction. +///////////////////////// ///// Ending Groove ChaCha @@ -200,3 +249,4 @@ DefGroove ChaChaEnd The End. + diff --git a/mma/lib/stdlib/frenchwaltz.mma b/mma/lib/stdlib/frenchwaltz.mma index 08dac8c..dd78837 100644 --- a/mma/lib/stdlib/frenchwaltz.mma +++ b/mma/lib/stdlib/frenchwaltz.mma @@ -1,7 +1,13 @@ // frenchwaltz -Doc These try to do the "French Cafe" sound. +Begin Doc + These try to do the "French Cafe" sound. The song "Pigalle" works quite well + with this. Note the setting of the BassRegister variable which tries to + emulate the "switches" on a real accordion. In this case we have an accordion + with three reed banks labeled "L", "M" and "H"--this will make large changes + to the accordion um-pa-pa stuff +End Author Bob van der Poel @@ -10,46 +16,169 @@ Time 3 Timesig 3 4 Include stdpats34 +Begin DocVar + BassRegister Sets the bass register, 1=L 2=LM 3=LH 4=LMH 5=M 6=MH 7=H (Default=4). + CSeq Internal, Chord sequence list, + BSeq Internal, Bass sequence list. +End + +NewSet BassRegister 4 + +Begin Chord Define + A1 2 3 90 ; 3 3 90 // chords on 2,3 + A2 2 8. 90 ; 3 3 80 // same, but with 2 a bit draggy + A3 2 8. 70 ; 3 8. 60 // same, but a bit softer to use with bass walk +End + ////////////////////////////////////////////// ///// FrenchWaltz Cheezy 3/4 with accordion SeqSize 8 -// For the left hand chord (the basic accomp. on an -// accordion, we use a combination of a chord and -// bass pattern. The BASS track is a single note on -// beat 1, the CHORD track has full chords on 2, 3. -// Accordion basses are quite limited ... in most cases -// a single octave. So, to duplicate this sound we use -// the SPAN directive for Chord and Bass to limit -// the notes used from C3. +// For the left hand chord (the basic accomp. on an accordion) +// we use a combination of a chord and bass patterns. The BASS +// track is a single note on beat 1, the CHORD track has full +// chords on 2, 3. Accordion basses are quite limited ... in most +// cases a single octave. So, to duplicate this sound we use the +// NOTESPAN directive for Chord and Bass to limit the notes used. +// To get a fuller sound we duplicate the chord and bass tracks +// with a higher pitched register (a musette accordion would have +// the 2nd register slightly de-tuned). + +// Use macros for the sequences so they are easy to dup + +Set Cseq A1 / / A2 A1 / / A3 +Set Bseq B1 B1/5 B1 B1/5 B1 B1/5 B1/5 B123 + +// Create 3 tracks for chord and bass. Each track has same voice, etc. but +// has a different notespan. The notespan range corresponds to the register +// settings on an accordion. Ranges are F# to F (which matches what MMA uses). -Begin Chord - Begin Define - A1 2 3 70 ; 3 3 70 // chords on 2,3 - A2 2 8. 70 ; 3 3 60 // same, but with 2 a bit draggy - A3 2 8. 50 ; 3 8. 50 // same, but a bit softer to use with bass walk - End - Sequence A1 / / A2 A1 / / A3 - Voice Accordion - Octave 4 +Begin Chord-L + Sequence $Cseq Articulate 70 - NoteSpan 48 59 + Octave 4 // This has no effect! + NoteSpan 42 53 Volume mp End -Begin Bass - Voice $_Chord_Voice - Sequence B1 B1/5 B1 B1/5 B1 B1/5 B1/5 B123 +Begin Bass-L + Sequence $Bseq Articulate 60 - Octave $_Chord_Octave - Volume mp - NoteSpan $_Chord_Span + Octave $_Chord-L_Octave + Volume $_Chord-L_Volume + NoteSpan $_Chord-L_Span End -// Chunck/chunck/chunck guitar on 1/2/3 +// Set the voice for Chord-L. We copy this voicing to the other tracks +// so it has be set at least once. Wrap in case this is read a 2nd time. + +StackValue $_Debug + Debug Warnings=Off + Chord-L Voice Accordion + Bass-L Voice Accordion +Debug $_StackValue + + +Begin Chord-M + Copy Chord-L + NoteSpan 54 65 + Sequence $Cseq +End + +Begin Chord-H + Copy Chord-L + NoteSpan 66 77 + Sequence $Cseq +End + +Begin Bass-M + Copy Bass-L + NoteSpan $_Chord-M_Span + Sequence $Bseq +End + +Begin Bass-H + Copy Bass-L + NoteSpan $_Chord-H_Span + Sequence $Bseq +End + +// Setting of chshare and voice is done here in a no-warning +// wrapper. The problem is that if you re-read this file a +// bunch of warnings pop up. + +StackValue $_Debug + Debug Warnings=Off + Chord-M ChShare Chord-L + Chord-H ChShare Chord-L + Bass-L ChShare Chord-L + Bass-M ChShare Chord-L + Bass-H ChShare Chord-L +Debug $_StackValue + +// Now we look at the value in BassRegister and turn off the voices +// we're not using. You might think that you can do with by setting +// empty sequences (nope, we change the seqeunce for other grooves and +// you'd have to do this stuff again); deleting the track (same nope) +// or doing a 'OFF' (nope, on a re-read after a GrooveClear it stays OFF). +// All of these complications come with ChShare :) But turning the +// volume down to nothing does work. + +If Eq $BassRegister 1 + Chord-M Volume Off + Chord-H Volume Off + Chord-L Volume +30 + Bass-M Volume Off + Bass-H Volume Off + Bass-L Volume +30 +Endif + +If Eq $BassRegister 2 + Chord-H Volume Off + Bass-H Volume Off +Endif + +If Eq $BassRegister 3 + Chord-M Volume Off + Bass-M Volume Off +Endif + +If Eq $BassRegister 4 + Chord-L Volume -10 + Chord-M Volume -10 + Chord-H Volume -10 + Bass-L Volume -10 + Bass-M Volume -10 + Bass-H Volume -10 +Endif + +If Eq $BassRegister 5 + Chord-L Volume Off + Chord-H Volume Off + Bass-L Volume Off + Bass-H Volume Off +Endif + +If Eq $BassRegister 6 + Chord-L Volume Off + Bass-L Volume Off +Endif + +If Eq $BassRegister 7 + Chord-L Volume Off + Chord-M Volume Off + Chord-H Volume +20 + Bass-L Volume Off + Bass-M Volume Off + Bass-H Volume +20 +Endif + + +// To add a bit of life to this we get Django in to do +// a very straight strum/strum/strum on his guitar. Begin Chord-Guitar Sequence C123 @@ -62,6 +191,8 @@ Begin Chord-Guitar Articulate 90 End +// And some nice people do simple drums. + Begin Drum-Tam Sequence D23 Tone Tambourine @@ -80,9 +211,10 @@ Begin Drum-Tri Rtime 10 End -DefGroove FrenchWaltz Accordion umm-paa. Ya either love it or hate it! +DefGroove FrenchWaltz Accordion umm-pa-pa. Ya either love it or hate it! +///////////////////////////////////////////////// //////// Sustained strings in the background. Begin Chord-Sus @@ -95,16 +227,17 @@ Begin Chord-Sus Unify On End -DefGroove FrenchWaltzSus Add sustained strings to basic pattern. +DefGroove FrenchWaltzSus Add sustained strings to basic pattern. //////////////////////////////////////////////////// -// Alternate adds a light 1/8th and 1/4 note aprs +// Alternates + +/////// Accordion fills + Groove FrenchWaltz -Chord-Guitar Sequence - - Begin Arpeggio Sequence A6 / / A3 SeqRnd On @@ -121,24 +254,175 @@ End DefGroove FrenchWaltz1 FrenchWaltz with with accordion apreggios. +Begin Scale + Voice $_Arpeggio_Voice + Sequence {1 1 80 * 12 } + Octave 5 + Articulate 66 + Range 2 + Direction Up + Volume m +End + +Chord-L Sequence L1 +Chord-M Sequence L1 +Chord-H Sequence L1 +Bass-L Sequence - +Bass-M Sequence - +Bass-H Sequence - +Chord-Guitar Sequence - + +DefGroove FrenchWaltz1Fill Adds an accending run. + +Groove FrenchWaltz1 Chord-Sus Groove FrenchWaltzSus DefGroove FrenchWaltz1Sus Arpeggios and sustained strings. +Groove FrenchWaltz1Fill +Chord-Sus Groove FrenchWaltzSus +DefGroove FrenchWaltz1FillSus Arpeggios, run and sustained strings. + + +//////////// Piano Fills + + +Groove FrenchWaltz + +Begin Arpeggio + SeqClear + Sequence {1 4 90; 3 4 90} {1 2. 90} + SeqRnd On + Harmony Open + Voice Piano1 + Range 2 + Octave 5 + Direction Down + Volume mp + Rtime 2 +End + +DefGroove FrenchWaltz2 A simple, little counter melody on a piano. + +Begin Scale + Voice $_Arpeggio_Voice + Sequence {1 1 80 * 12 } + Octave 6 + Articulate 60 + Range 2 + Direction Up + Volume mp +End + +Chord-L Sequence L1 +Chord-M Sequence L1 +Chord-H Sequence L1 +Bass-L Sequence - +Bass-M Sequence - +Bass-H Sequence - +Chord-Guitar Sequence - + +DefGroove FrenchWaltz2Fill Add a piano run to the counter melody. + +Groove FrenchWaltz2 +Chord-Sus Groove FrenchWaltzSus +DefGroove FrenchWaltz2Sus Piano counter melody and sustained strings. + +Groove FrenchWaltz2Fill +Chord-Sus Groove FrenchWaltzSus +DefGroove FrenchWaltz2FillSus Piano counter melody and run with sustained strings. + + +/////////////// Violin Fills + + +Groove FrenchWaltz + +Begin Arpeggio + SeqClear + Sequence A1 A3 + Rskip 0 20 + SeqRnd On + Voice Viola + Range 2 + Octave 5 + Direction Up + Volume p + Rtime 2 + Rvolume 10 +End + +DefGroove FrenchWaltz3 A simple, little counter melody on a viola. + +Begin Scale + Voice $_Arpeggio_Voice + Sequence {1 1 80 * 12 } + Octave 5 + Range 2 + Direction Up + Volume mp +End + +Chord-L Sequence L1 +Chord-M Sequence L1 +Chord-H Sequence L1 +Bass-L Sequence - +Bass-M Sequence - +Bass-H Sequence - +Chord-Guitar Sequence - + +DefGroove FrenchWaltz3Fill Add a string run to the counter melody. + +Groove FrenchWaltz3 +Chord-Sus Groove FrenchWaltzSus +DefGroove FrenchWaltz2Sus Viola counter melody and sustained strings. + +Groove FrenchWaltz3Fill +Chord-Sus Groove FrenchWaltzSus +DefGroove FrenchWaltz3FillSus Viola counter melody and run with sustained strings. + +//////////////////////////////////////// +/// Introduction + +Groove FrenchWaltz + +Set Cseq * * * L1 +Set Bseq * * * {1 2 1 50} + +Chord-L Sequence $Cseq +Chord-M Sequence $Cseq +Chord-H Sequence $Cseq +Bass-L Sequence $Bseq +Bass-M Sequence $Bseq +Bass-H Sequence $Bseq +Chord-Guitar Sequence L1 +Drum-Tam Sequence * D1 * D1 +Drum-Tri Sequence D1 / / D123 + +DefGroove FrenchWaltzIntro A 4 bar intro. + ///////////////////////////////// -//// Ending +//// Endings Groove FrenchWaltz Seqsize 4 +Set Cseq A1 / / {1 2 40} +Set Bseq B1 B1/5 B1 {1 2 1 40} + Chord-Guitar Sequence - -Chord Sequence A1 / / {1 2 40} -Bass Sequence B1 B1/5 B1 {1 2 1 40} +Chord-L Sequence $Cseq +Chord-M Sequence $Cseq +Chord-H Sequence $Cseq +Bass-L Sequence $Bseq +Bass-M Sequence $Bseq +Bass-H Sequence $Bseq Drum-Tam Sequence D23 / / D1 Begin Scale SeqClear Sequence S6 S3 S3 {1 2 80} Direction Up + Range 3 Voice Strings Octave 5 Articulate 80 80 80 100 @@ -148,13 +432,12 @@ DefGroove FrenchWaltzEnd A scale with the strings to end \ the FrenchWaltz. The scales run from \ 16, 8, 4 and whole notes. - // Variation Begin Scale Voice Accordion Direction Down - Range 4 + Range 3 Octave 3 End @@ -162,3 +445,4 @@ DefGroove FrenchWaltz1End Same ending as FrenchWaltzEnd but with \ an accordion instead of strings. + diff --git a/mma/lib/stdlib/jazzguitar.mma b/mma/lib/stdlib/jazzguitar.mma new file mode 100644 index 0000000..47bb086 --- /dev/null +++ b/mma/lib/stdlib/jazzguitar.mma @@ -0,0 +1,244 @@ + +// jazzguitar + +Begin Doc + For jazz ballads. This has ONLY a guitar (well, expect for the sustained + versions). Mostly chords, but some + bass and arpeggio is included. The song "Django" is a bit of a demo. +End + +Author Bob van der Poel + +NewSet SustainVoice TremoloStrings + +Begin DocVar + SustainVoice Voice for the sustained versions (default=TremoloStrings). +End + +SeqClear +Time 4 +Timesig 4 4 +Include stdpats + +////////// Additional defines + + +//////////////////////// +// Basic + + +SeqSize 4 + +Begin Chord + Voice JazzGuitar + Articulate 95 + Voicing Mode=Optimal + Volume m + Octave 5 + Sequence C1234 +End + +Begin Bass + Voice $_Chord_Voice + Articulate 105 + Octave 3 + Volume mf + Sequence B13 / / {1 2 1 90; 2 8 3 80; 3 2 5 90} +End + + +DefGroove JazzGuitar A very basic 4 to the bar accompaniment. + +////////// Same, but with walking bass + +Groove JazzGuitar + +Bass Sequence - + +Begin Walk + Voice $_Bass_Voice + Articulate $_Bass_Articulate + Octave $_Bass_Octave + Volume $_Bass_Volume + Sequence W1234 / / W13 + Direction Down +End + +DefGroove JazzGuitarWalk Changes the bass pattern to walking. + +/// Add in arpeggios every 4th bar + +Groove JazzGuitar + +Chord Volume +0 / / -30 /// cut volume for chord on 4th bar + +Begin Arpeggio + Voice $_Chord_Voice + Articulate 140 + Rskip 10 + Octave 5 + Volume mf + Direction Down + Range .9 + Sequence z / / A8 +End + +DefGroove JazzGuitar1 Our basic pattern with arpeggios every 4th bar. + +Groove JazzGuitarWalk + Chord Groove JazzGuitar1 + Arpeggio Groove JazzGuitar1 +DefGroove JazzGuitar1Walk Walking bass with arpeggios every 4th bar. + +/// A bit of syncopation in the chords + +Groove JazzGuitar + +Begin Chord + Sequence {C1234; C24 Shift .66} + Strum 5 + Articulate 80 + Direction Both +End + +DefGroove JazzGuitar2 Basic pattern with more strum and syncopation. + +Groove JazzGuitar2 + Bass Sequence - + Walk Groove JazzGuitarWalk +DefGroove JazzGuitar2Walk The strum pattern with walking bass + +///////// + +Groove JazzGuitar2 + +Chord Volume +0 / / -30 +Begin Arpeggio + Groove JazzGuitar1 + Octave 5 + Sequence z / / {A4; A2 Shift 1.66} +End + +DefGroove JazzGuitar3 Add arpeggios every 4 bars to the syncopated strumming. + +Groove JazzGuitar3 + Bass Sequence - + Walk Groove JazzGuitarWalk +DefGroove JazzGuitar3Walk Aprpeggios and walking bass. + +//////////////////////////// +//// Sustained versions + +Groove JazzGuitar +Begin Chord-Sus + Voice $SustainVoice + Sequence {1 1 96 0 90 0 * 4} + Voicing Mode=Optimal + Octave 5 + Articulate 100 + Unify On + Volume p +End + +DefGroove JazzGuitarSus Sustained strings added to basic pattern. + +Groove JazzGuitar1 +Chord-Sus Groove JazzGuitarSus +DefGroove JazzGuitar1Sus Sustained strings added to JazzGuitar1. + +Groove JazzGuitar2 +Chord-Sus Groove JazzGuitarSus +DefGroove JazzGuitar2Sus Sustained strings added to JazzGuitar2. + +Groove JazzGuitar3 +Chord-Sus Groove JazzGuitarSus +DefGroove JazzGuitar3Sus Sustained strings added to JazzGuitar3 + +Groove JazzGuitarWalk +Chord-Sus Groove JazzGuitarSus +DefGroove JazzGuitarWalkSus Sustained strings added to JazzGuitarWalk. + +Groove JazzGuitar1Walk +Chord-Sus Groove JazzGuitarSus +DefGroove JazzGuitar1WalkSus Sustained strings added to JazzGuitarWalk1. + +Groove JazzGuitar2Walk +Chord-Sus Groove JazzGuitarSus +DefGroove JazzGuitar2WalkSus Sustained strings added to JazzGuitarWalk2. + +Groove JazzGuitar3Walk +Chord-Sus Groove JazzGuitarSus +DefGroove JazzGuitar3WalkSus Sustained strings added to JazzGuitarWalk3. + +////////////////////////////// +////// Intro + +Groove JazzGuitar + +Begin Chord + Sequence z z z L1 + Strum 15 + Volume mp + Octave 6 + Articulate 150 +End + +Begin Arpeggio + Voice $_Chord_Voice + Volume m + Octave 5 + Direction Up + Range 1.9 + Articulate 120 + Harmony Open + Sequence A8 / / z +End + +Bass Sequence B13 / / {1 1 1 90} + +DefGroove JazzGuitarIntro A 4 bar, arpeggiating introduction. + +/// a 2nd intro. We use the basic pattern, but add a little bass run +/// in the 4th bar. + +Groove JazzGuitar + +Chord Sequence * * * C12 +Bass Sequence * * * {1 4 1+ 90;2 8 5 90; 2.5 4. 3 90; 3 4 1 90; 4 4 1 90 } + + +DefGroove JazzGuitar1Intro A 4 bar intro with a bass run on bar 4. + + +/////////////// +//// Endings + +Groove JazzGuitar +SeqSize 2 + +Begin Chord + Sequence {1 8 90; 1.5 8 80; 2 8 90; 2.5 8 80; 3 4 80; 4 4 70} \ + {1 1 80 70 60 50; 3 1 70 60 50 40} + Direction Up + Strum 0 30 +End + +Begin Bass + Sequence B13 B1 +End + +DefGroove JazzGuitarEnd Soft, 2 bar ending. + + +Groove JazzGuitar +SeqSize 1 + +Begin Chord + Sequence {1 8 90; 1.5 8 84; 2 8 80; 2.5 8 70; 3 2 66} +End + +Begin Bass + Sequence {1 2. 1 90} +End + +DefGroove JazzGuitarEnd1 Soft, 1 bar ending. diff --git a/mma/lib/stdlib/lighttango.mma b/mma/lib/stdlib/lighttango.mma index 56568b0..1290d6c 100644 --- a/mma/lib/stdlib/lighttango.mma +++ b/mma/lib/stdlib/lighttango.mma @@ -149,6 +149,25 @@ DefGroove LightTango1 Change out the accordion for a piano. Chord-Sus Groove LightTangoSus DefGroove LightTango1Sus Add a sustained tone to the piano variant. +//////////////////////// +//// Fill + +Groove LightTango +Seqsize 1 + +// Drum-Kick +Drum-Snare Sequence D1234 +// Drum-PHH +Drum-Tam Sequence - +Drum-Clave Sequence D1234 +Chord-Accordion Sequence L2 +Chord-Guitar Sequence C8 +Bass-Piano Sequence B13 +Bass Sequence B13 + +DefGroove LightTangoFill A one bar fill pattern. + + ///////////////////// /// Introduction diff --git a/mma/lib/stdlib/lullaby.mma b/mma/lib/stdlib/lullaby.mma new file mode 100644 index 0000000..61adb78 --- /dev/null +++ b/mma/lib/stdlib/lullaby.mma @@ -0,0 +1,130 @@ + +// lullaby + +Doc Gentle, soft lullaby in 4. Written for "Good Night". + +Author Bob van der Poel + +Begin DocVar + ChordVoice Voice used in Chord tracks (defaults to JazzGuitar). + ChordOctave Octave for Chord track (default 4) +End + +NewSet ChordVoice JazzGuitar +NewSet ChordOctave 4 + + +SeqClear +Time 4 +Timesig 4 4 +Include stdpats + +///////// Additional Patterns + + +////////// Ballad + +SeqSize 1 + +Begin Chord + Voice $ChordVoice + Volume m + Octave $ChordOctave + Voicing Mode=Optimal + Articulate 110 + Rtime 3 + Rvolume 3 + Sequence {1 4 90 0; 2 4 0 90 0; 3 4 0 0 90 0; 4 4 0 90 0} + Accent 1 20 3 10 +End + +DefGroove Lullaby Just a solo guitar in 4. + + +Begin Bass + Voice JazzGuitar + Volume mp + Octave 2 + Rtime 2 + Rvolume 3 + Articulate 90 + Sequence B13 +End + +DefGroove Lullaby1 Adds in a bit of bass. + +Groove Lullaby + +Begin Walk + Voice JazzGuitar + Volume mp + Octave 3 + Rtime 2 + Rvolume 3 + Articulate 110 + Direction Up + Sequence W8 + Rskip 40 +End + +DefGroove LullabyWalk Adds an 8th note walking bass line. + + +/////////////////// +//// Sustained + +Groove Lullaby + +Begin Chord-Sus + Voice SlowStrings + Octave 5 + Volume p + Voicing Mode=Optimal + Articulate 100 + Unify On + Sequence {1 1 90 0 90 0 * 2} +End + +DefGroove LullabySus Add some sustained strings to our guitar. + +Groove LullabySus +Bass Groove Lullaby1 +DefGroove Lullaby1Sus A bit of bass with the strings. + +Groove LullabySus +Walk Groove LullabyWalk +DefGroove LullabyWalkSus Strings and walking bass. + + +/////////////////// +//// Intro + +Groove Lullaby1Sus + +SeqSize 4 + +Begin Chord + Volume -30 + Sequence * * * {1 1 90 0} +End + +Begin Bass + Volume +20 + Sequence * * * B1 +End + +Begin Chord-Sus + Volume +40 +End + +DefGroove LullabyIntro + + +/////////////////// +//// Ending + +Groove Lullaby + +Chord Sequence {1 1 90 0 * 2} + +DefGroove LullabyEnd Two half notes on the guitar. diff --git a/mma/lib/stdlib/modernjazz.mma b/mma/lib/stdlib/modernjazz.mma index 1cb2887..5b04106 100644 --- a/mma/lib/stdlib/modernjazz.mma +++ b/mma/lib/stdlib/modernjazz.mma @@ -8,6 +8,13 @@ End Author Bob van der Poel +NewSet ArpeggioVoice MutedTrumpet + +Begin DocVar + ApreggioVoice Voice for the alternating apreggios in ModernJazz1 \ + (Default=MutedTrumpet). Also used in Introduction and Ending. +End + SeqClear Time 4 Timesig 4 4 @@ -107,7 +114,7 @@ End DefGroove ModernJazz ModernJazz with just a piano and guitar. Begin Arpeggio - Voice MutedTrumpet + Voice $ArpeggioVoice Octave 5 Range 1 Volume mf @@ -119,7 +126,7 @@ Begin Arpeggio End Begin Bass-Trp - Voice MutedTrumpet + Voice $ArpeggioVoice Octave 5 Volume mf Rvolume 5 @@ -181,7 +188,7 @@ Chord-Guitar Sequence C1 Sync23 C1 L1 Chord-Piano Sequence C24 Sync34 C2 C1 Begin Chord-Trp - Voice MutedTrumpet + Voice $ArpeggioVoice Octave 5 Volume mf Rvolume 5 @@ -200,7 +207,7 @@ SeqSize 2 Arpeggio Sequence - Begin Bass-Trp - Voice MutedTrumpet + Voice $ArpeggioVoice Octave 5 Volume mf Articulate 70 diff --git a/mma/lib/stdlib/popballad.mma b/mma/lib/stdlib/popballad.mma index 98ad7ff..59be468 100644 --- a/mma/lib/stdlib/popballad.mma +++ b/mma/lib/stdlib/popballad.mma @@ -120,7 +120,9 @@ DefGroove PopBallad Plain old Pop Ballad. Groove PopBallad -Drum-HH Sequence - +Begin Drum-HH + Sequence - +End Begin Drum-Ride Tone RideCymbal1 @@ -184,6 +186,80 @@ Drum-Kick Sequence D1234 // Kill kickdrum offbeats Defgroove PopBallad2 A straighter version of the ballad. +///////////// +/// Sustained version + +Groove PopBallad + +Begin Drum-HH + Volume mp + sequence D13 +End + +Begin Drum-Cym + Sequence D1 z z z + Volume p +End + +Begin Drum-Kick + Volume mp +End + +Begin Drum-Snare + Sequence D24 + Volume mp +End + +Begin Drum-Cabasa + Volume m +End + +Begin Drum-Shake + Volume m +End + +// Bass -- no change + +Begin Chord + Octave 5 +End + +// Arpeggio - no change + + +Begin Chord-Sus + Voice TremoloStrings + Sequence { 1 1 90 70 80 0 * 4 } + Voicing Mode=Optimal + Octave 5 + Articulate 100 + Unify On + Rvolume 10 + Volume p +End + +DefGroove PopBalladSus A slightly lighter version, with strings. + +///////////////////// +///////////// Intro + +Groove PopBallad + +Drum-HH Sequence * * * D123 +Drum-Cym Sequence D1 / / z +Drum-Kick Sequence * * * D1 +Drum-Snare Sequence * * * D123 +Drum-Cabasa Sequence * * * z +Drum-Shake Sequence * * * z + +Bass Sequence * * * B1 + +Chord Sequence * * * L1 + +Arpeggio Sequence * * A4 A1 + +DefGroove PopBalladIntro A simple introduction. + /////// Ending diff --git a/mma/lib/stdlib/rockballad.mma b/mma/lib/stdlib/rockballad.mma index 4d83b88..60a7c76 100644 --- a/mma/lib/stdlib/rockballad.mma +++ b/mma/lib/stdlib/rockballad.mma @@ -9,6 +9,14 @@ End Author Bob van der Poel +NewSet SusVoice ChoirAahs +NewSet SusVoiceOctave 4 + +Begin DocVar + SusVoice Voice used for sustained voicing in RockBalladVoice (default=ChoirAahs). + SusVoiceOctave Octave for sustained voices (default=4). +End + SeqClear Time 4 Timesig 4 4 @@ -72,6 +80,13 @@ End DefGroove RockBallad Basic beat with triplet Hi-Hats. +Groove RockBallad + +Chord Sequence C1234 + +DefGroove RockBallad1 Same as the basic pattern, but skips the chord triplet on bar 4. + + ////////////////////////// // Guitar Fill @@ -88,26 +103,33 @@ Begin Arpeggio Articulate 105 End - DefGroove RockBalladFill Add guitar arpeggios. +Groove RockBallad1 +Arpeggio Groove RockBalladFill +DefGroove RockBallad1Fill Guitar apreggio fills without 4th bar triplets. + ///////////////////////////// // Adds some (sustained) voices Groove RockBallad Begin Chord-Sus - Voice ChoirAahs + Voice $SusVoice Sequence { 1 1 90 0 80 0 * 2} // Root and fifth notes only. Voicing mode=optimal Volume p - Octave 4 + Octave $SusVoiceOctave Articulate 100 Unify On End DefGroove RockBalladVoice Adds some cheese with choir voices. +Groove RockBallad1 +Chord-Sus Groove RockBalladVoice +DefGroove RockBallad1Voice + ///////////////////////////// //// Intro @@ -152,3 +174,13 @@ DefGroove RockBalladEnd Ending with a scaling tenor sax. Use Seq 1 \ to 4 for 16ths, 8th, 4th or 1/2 note runs. +Groove RockBallad + +Seqsize 2 + +Chord Sequence C1234 L2 +Bass Sequence B13 B1 +Walk Sequence - + +DefGroove RockBalladEnd1 Simple 2 bar ending. + diff --git a/mma/lib/stdlib/shuffleboggie.mma b/mma/lib/stdlib/shuffleboggie.mma new file mode 100644 index 0000000..ed44c30 --- /dev/null +++ b/mma/lib/stdlib/shuffleboggie.mma @@ -0,0 +1,204 @@ + +// shuffleboggie.mma + +Begin Doc + + A blues-like shuffle beat. Written for Kansas City. + +End + +Author Bob van der Poel + +SeqClear +Time 4 +Timesig 4 4 +Include stdpats + +//////// Additional patterns + + +///////////// + +SeqSize 2 +Begin Drum-Kick + Tone KickDrum1 + Volume mp + Sequence D1234 +End + +Begin Drum-Clap + Tone HandClap + Volume p + Sequence D24 +End + +Begin Drum-Snare + Tone SnareDrum2 + Volume mp + Sequence D24 +End + +Begin Drum-CHH + Tone ClosedHiHat + Volume p + Sequence {D1234; D24 Shift .666} +End + +Begin Drum-OHH + Tone OpenHiHat + Volume mp + Sequence {D1 Shift .666} + RSkip 50 +End + +Begin Chord-Sax + Voice TenorSax + Octave 4 + Voicing Mode=Optimal + Volume p + Articulate 80 + Sequence {1 8. 100 0; 1.66 16 80; 3 8 90 } +End + +Begin Chord-Piano + Voice Piano2 + Octave 5 + Volume mp + Sequence { C1234 Shift .666} + Articulate 60 +End + +Begin Bass-Piano + Voice $_Chord-Piano_Voice + Octave 4 + Volume $_Chord-Piano_Volume + Articulate $_Chord-Piano_Articulate + Sequence {1 1 1 90 * 4} +End + +Begin Chord-Guitar + Voice MutedGuitar + Volume m + Articulate 100 + Octave 5 + Sequence {1 4 90; 2 16 90; 2.666 8 100 0; 3 4 90; 4 16 90; 4.666 8 100 0} +End + +Begin Bass + Voice SlapBass1 + Volume f + Articulate 80 + Octave 3 + Sequence {1 4 1 90; 2 4 3 90; 3 8. 5 90; 4 8. 3 90} +End + + +DefGroove ShuffleBoggie Blues with a shuffle style. + +Groove ShuffleBoggie + +Alltracks Chord Bass Volume -20 + +Begin Arpeggio + Voice CleanGuitar + Octave 5 + Range 1 + Articulate 70 + Harmony Open + Sequence A4 {1 4 90; 2 16 90; 2.666 8 90; 3 4 90; 4 4 16; 4.666 8 90} + SeqRnd On + Rskip 10 + Rtime 20 + Rvolume 20 +End + +DefGroove ShuffleBoggie1 Adds an articulated guitar riff to the basic beat. + + + +///////////////// +/// Sustained + +Groove ShuffleBoggie + +Alltracks Chord Bass Volume -30 + +Begin Chord-Sus + Voice Strings + Sequence { 1 1 90 0 50 0 * 4 } { 1 1 50 0 90 0 * 4 } + SeqRnd On + Voicing Mode=Optimal + Rvolume 10 + Articulate 100 + Unify On + Volume m + Octave 5 +End + +DefGroove ShuffleBoggieSus Blues with violins. Sort of odd, but we can call them fiddles! + + +///////////// +/// Introduction + +Groove ShuffleBoggie + +Drum-Kick Sequence * D1 +Drum-Clap Sequence * D1 +Drum-Snare Sequence * D1 +Drum-CHH Sequence * D16 +Drum-OHH Sequence - + +Chord-Sax Sequence * {1 2 90} + +Chord-Piano Sequence * C1 +Bass-Piano Sequence - +Chord-Guitar Sequence * C1 + +Bass Sequence * {1 1 1 90} + + +DefGroove ShuffleBoggieIntro A two bar intro. Short, loud and sweet. + +Groove ShuffleBoggie +SeqSize 4 + +Drum-Kick Sequence * * * D1 +Drum-Clap Sequence * * * D1 +Drum-Snare Sequence * * * D1 +Drum-CHH Sequence * * * D16 +Drum-OHH Sequence - + +Chord-Sax Sequence * * * {1 2 90} + +Chord-Piano Sequence * * * C1 +Bass-Piano Sequence - +Chord-Guitar Sequence * * * C1 + +Bass Sequence * * * {1 1 1 90} + + +DefGroove ShuffleBoggieIntro4 A four bar intro. + +///////////// +/// Ending + +Groove ShuffleBoggie + + +Drum-Kick Sequence * D123 +Drum-Clap Sequence * D123 +Drum-Snare Sequence * D13 +Drum-CHH Sequence * z +Drum-OHH Sequence - + +Chord-Sax Sequence * C13 + +Chord-Piano Sequence * C123 +Bass-Piano Sequence - +Chord-Guitar Sequence * C123 + +Bass Sequence * B13 + + +DefGroove ShuffleBoggieEnd Very simple ending, hits on 1, 2 and 3 of last bar. \ No newline at end of file diff --git a/mma/lib/stdlib/slowcountry.mma b/mma/lib/stdlib/slowcountry.mma index 6c63cba..16f2b27 100644 --- a/mma/lib/stdlib/slowcountry.mma +++ b/mma/lib/stdlib/slowcountry.mma @@ -16,10 +16,7 @@ Time 4 // All these patterns are 4/4 Timesig 4 4 Include stdpats -Begin Chord - Define C13'4 1 2 90; 3 4 90 0; 3.5 8. 0 0 90 0; 4 4 90 -End /////////////////////////// /// SlowCountry @@ -40,10 +37,10 @@ Begin Chord Voice JazzGuitar Define CL4 1 2 80 60 ; 4 4 80 60 Sequence CL4 L2 CL4 L2 + Articulate 90 80 90 80 Volume mf Voicing Mode=Optimal - Articulate 95 - Strum 15 + Strum 10 15 10 15 Accent 1 10 3 5 RVolume 10 Octave 4 @@ -56,7 +53,7 @@ Begin Bass-Fill Define F1 3 4. 1 90; 3.5 4 5 90 Define F2 4.5 8 1 90 Sequence F1 F2 F1 z - Volume mp + Volume p End // Toggle between bass and walk for the bass line. diff --git a/mma/lib/stdlib/softshoe.mma b/mma/lib/stdlib/softshoe.mma index 27e523b..4ca8017 100644 --- a/mma/lib/stdlib/softshoe.mma +++ b/mma/lib/stdlib/softshoe.mma @@ -10,6 +10,14 @@ End Author Bob van der Poel +Begin DocVar + ChordVoice Voice used in Chord tracks (defaults to Piano2). +End + +If NDef ChordVoice + Set ChordVoice Piano2 +Endif + SeqClear Time 4 // All these patterns are 4/4 Timesig 4 4 @@ -68,7 +76,7 @@ Begin Walk End Begin Chord - Voice Piano2 + Voice $ChordVoice Volume mp Articulate 110 110 80 70 Octave 5 @@ -84,10 +92,10 @@ Begin Arpeggio Voice Clarinet Sequence {A4 Shift .5; A2} A8 A4 {A2 Shift .5} SeqRnd On - Harmony Open + Harmony OpenAbove Articulate 80 Octave 5 - Range 2 + Range 1.8 Direction Up Rskip 50 Volume p diff --git a/mma/lib/yamaha/.mmaDB b/mma/lib/yamaha/.mmaDB new file mode 100644 index 0000000..c41497c Binary files /dev/null and b/mma/lib/yamaha/.mmaDB differ diff --git a/mma/lib/yamaha/README b/mma/lib/yamaha/README new file mode 100644 index 0000000..985238d --- /dev/null +++ b/mma/lib/yamaha/README @@ -0,0 +1,16 @@ + +These files were converted from Yamaha .sty files I found on the +internet. All files were marked as "free", so I hope I'm not breaking +any copyrights! + +The files are documented with the other library files in the HTML docs +supplied with MMA. To use any of the files you need to do something like: + + Use yamaha/some-file + +at the top of your song. Then use the the various grooves like Main-A, etc. + +Have fun! + +bvdp, Feb/2007 + diff --git a/mma/lib/yamaha/mambo.mma b/mma/lib/yamaha/mambo.mma new file mode 100644 index 0000000..4908cce --- /dev/null +++ b/mma/lib/yamaha/mambo.mma @@ -0,0 +1,1730 @@ +///// Yamaha sty to MMA conversion by ys2mma.py +///// This file is a machine translation of a binary style file and +///// should be usable by MMA. However, it does not use all of the +///// features of MMA ... or those of a Yamaha synth. It should be hand +///// optimized for best results. + +///// Created: Mon Feb 19 17:24:00 2007 + +Begin Doc + Original file: mambo.sty + ... insert your comments here! +End +Author YOUR NAME HERE + +Time 4 +TimeSig 4 4 + + +////////////////////// +/////// Main-A +SeqClear +SeqSize 4 + +Begin Drum-CowBell + Tone CowBell + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1 0 89; 1.5 0 85; 2 0 78; 2.5 0 57; 2.75 0 61; 3 0 92; 3.5 0 68; 3.75 0 57; 4 0 85; 4.5 0 68; 4.75 0 78 } \ + {1 0 89; 1.5 0 85; 2 0 78; 2.5 0 57; 2.75 0 61; 3 0 92; 3.5 0 68; 3.75 0 57; 4 0 85; 4.5 0 68; 4.75 0 78 } \ + {1 0 89; 1.5 0 85; 2 0 78; 2.5 0 57; 2.75 0 61; 3 0 92; 3.5 0 68; 3.75 0 57; 4 0 85; 4.5 0 68; 4.75 0 78 } \ + {1 0 89; 1.5 0 85; 2 0 78; 2.5 0 57; 2.75 0 61; 3 0 92; 3.5 0 68; 3.75 0 57; 4 0 85; 4.5 0 68; 4.75 0 78 } +End + +Begin Drum-HighBongo + Tone HighBongo + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1.5 0 89; 1.75 0 89; 2.25 0 85; 2.75 0 78; 3.5 0 92; 4 0 81; 4.25 0 89; 4.75 0 96 } \ + {1.5 0 89; 1.75 0 89; 2.25 0 85; 2.75 0 78; 3.5 0 92; 4 0 81; 4.25 0 89 } \ + {1.5 0 89; 1.75 0 89; 2.25 0 85; 2.75 0 78; 3.5 0 92; 4 0 81; 4.25 0 89 } \ + {1.5 0 89; 1.75 0 89; 2.25 0 85; 2.75 0 78; 3.5 0 92; 4 0 81; 4.25 0 89 } +End + +Begin Drum-LowBongo + Tone LowBongo + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1 0 89; 3 0 89 } \ + {1 0 89; 3 0 89; 4.75 0 96 } \ + {1 0 89; 3 0 89; 4.75 0 96 } \ + {1 0 89; 3 0 89; 4.75 0 96 } +End + +Begin Drum-MuteHighConga + Tone MuteHighConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1.5 0 89; 3.5 0 103 } \ + {1.5 0 89; 3.5 0 103 } \ + {1.5 0 89; 3.5 0 103 } \ + {1.5 0 89; 3.5 0 103 } +End + +Begin Drum-OpenHighConga + Tone OpenHighConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {2.5 0 89; 2.75 0 92; 4.5 0 81; 4.75 0 103 } \ + {2.5 0 89; 2.75 0 92; 4.5 0 81; 4.75 0 103 } \ + {2.5 0 89; 2.75 0 92; 4.5 0 81; 4.75 0 103 } \ + {2.5 0 89; 2.75 0 92; 4.5 0 81; 4.75 0 103 } +End + +Begin Drum-LowConga + Tone LowConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1.75 0 96; 2 0 103 } \ + {1.75 0 96; 2 0 103 } \ + {1.75 0 96; 2 0 103 } \ + {1.75 0 96; 2 0 103 } +End + +Begin Drum-Maracas + Tone Maracas + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1 0 85; 1.75 0 71; 2 0 75; 2.75 0 75; 3 0 81; 3.75 0 75; 4 0 78; 4.75 0 75 } \ + {1 0 85; 1.75 0 71; 2 0 75; 2.75 0 75; 3 0 81; 3.75 0 75; 4 0 78; 4.75 0 75 } \ + {1 0 85; 1.75 0 71; 2 0 75; 2.75 0 75; 3 0 81; 3.75 0 75; 4 0 78; 4.75 0 75 } \ + {1 0 85; 1.75 0 71; 2 0 75; 2.75 0 75; 3 0 81; 3.75 0 75; 4 0 78; 4.75 0 75 } +End + +Begin Drum-Claves + Tone Claves + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1 0 78; 1.75 0 78; 2.5 0 85; 3.5 0 78; 4 0 85 } \ + {1 0 78; 1.75 0 78; 2.5 0 85; 3.5 0 78; 4 0 85 } \ + {1 0 78; 1.75 0 78; 2.5 0 85; 3.5 0 78; 4 0 85 } \ + {1 0 78; 1.75 0 78; 2.5 0 85; 3.5 0 78; 4 0 85 } +End + +Begin Chord-4 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1 16 80; 1.5 8 70; 1.75 16 95; 2.25 16 77; 2.75 16 68; 3.25 16 81; 3.75 16 93; 4.25 32 68; 4.5 8 77 } \ + {1 16 69; 1.25 16 79; 1.75 8 82; 2.25 16 81; 2.75 16 82; 3.25 16 82; 3.5 8 75; 4 32 73; 4.25 16 83; 4.75 16 87 } \ + {1 8 74; 1.5 16 66; 1.75 32 76; 2.25 16 72; 2.75 16 84; 3.25 32 80; 3.5 8 81; 4 32 84; 4.25 16 76; 4.75 32 70 } \ + {1 8 85; 1.5 16 68; 1.75 16 62; 2.25 16 79; 2.75 16 86; 3.25 16 78; 3.75 16 80; 4.25 16 80; 4.5 8 76 } +End + +Begin Bass-9 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Octave 3 + Sequence {1 0 7- 99; 1 0 6# 87; 1.5 0 4# 91; 1.75 0 4# 84; 2 0 6# 87; 2.5 0 4# 73; 2.75 0 4# 82; 3 0 7- 107; 3 0 6# 87; 3.5 0 4# 84; 3.75 0 7- 111; 3.75 0 4# 84; 4 0 6# 91; 4.5 0 4# 79; 4.75 0 4# 79 } \ + {1 0 7- 99; 1 0 6# 87; 1.5 0 4# 91; 1.75 0 4# 84; 2 0 6# 87; 2.5 0 4# 73; 2.75 0 4# 82; 3 0 7- 107; 3 0 6# 87; 3.5 0 4# 84; 3.75 0 7- 111; 3.75 0 4# 84; 4 0 6# 91; 4.5 0 4# 79; 4.75 0 4# 79 } \ + {1 0 7- 99; 1 0 6# 87; 1.5 0 4# 91; 1.75 0 4# 84; 2 0 6# 87; 2.5 0 4# 73; 2.75 0 4# 82; 3 0 7- 107; 3 0 6# 87; 3.5 0 4# 84; 3.75 0 7- 111; 3.75 0 4# 84; 4 0 6# 91; 4.5 0 4# 79; 4.75 0 4# 79 } \ + {1 0 7- 99; 1 0 6# 87; 1.5 0 4# 91; 1.75 0 4# 84; 2 0 6# 87; 2.5 0 4# 73; 2.75 0 4# 82; 3 0 7- 107; 3 0 6# 87; 3.5 0 4# 84; 3.75 0 7- 111; 3.75 0 4# 84; 4 0 6# 91; 4.5 0 4# 79; 4.75 0 4# 79 } +End + +Begin Bass-11 + Voice FingeredBass + Rvolume 0 + Rtime 0 + Volume MP + Octave 2 + Sequence {1 8. 1 111; 1.75 32 5 114; 2 8 5 91; 2.5 4 1 99; 3.75 8. 5 107; 4.5 4 1 107 } \ + {1.75 8. 5 99; 2.5 4 1 107; 3.75 8. 5 99; 4.5 4 1 99 } \ + {1.75 32 5 120; 2 8 5 87; 2.5 4 1 107; 3.75 8. 5 95; 4.5 4 1 115 } \ + {1.75 8. 5 113; 2.5 4 1 107; 3.5 4 5 107; 4.5 8 5 107 } +End + +Begin Chord-12 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1 8 93; 1.5 16 62; 1.75 8 90; 2.25 16 76; 2.75 16 82; 3.75 16 93; 4.25 16 80; 4.75 8. 82 } \ + {1.75 16 67; 2 16 89; 2.5 16 74; 2.75 16 71; 3.25 16 92; 3.75 16 88; 4.25 16 82; 4.75 8. 79 } \ + {1.5 16 71; 1.75 16 77; 2.25 16 80; 2.75 16 79; 3.25 16 84; 3.75 16 85; 4.25 16 76; 4.5 16 74 } \ + {1 8 77; 1.5 16 91; 2.25 16 84; 2.75 16 83; 3.25 16 76; 3.75 16 82; 4.25 16 84 } +End + +Begin Bass-13 + Voice JazzGuitar + Rvolume 0 + Rtime 0 + Volume MP + Octave 5 + Sequence {1.5 32 1 52; 1.5 32 3 60; 1.5 32 5 62; 1.75 32 1 66; 1.75 32 5 73; 1.75 32 3 82; 2.25 32 5 103; 2.25 32 3 95; 2.25 32 1 95; 4.25 0 3 71; 4.25 32 1 67; 4.25 32 5 79 } \ + {1.5 32 5 64; 1.75 32 5 82; 1.75 32 1 64; 1.75 32 3 87; 2.25 32 5 107; 2.25 32 1 87; 2.25 32 3 107; 3.25 32 1 63; 3.25 32 5 68; 3.25 32 3 73 } \ + {2.25 32 1 82; 2.25 32 5 103; 2.25 32 3 99; 3.25 32 1 71; 3.25 0 3 76; 3.25 32 5 79 } \ + {1.5 0 3 50; 1.5 32 5 52; 1.5 32 1 52; 1.75 0 1 46; 1.75 0 3 61; 1.75 32 5 64; 2.25 32 1 82; 2.25 32 3 95; 2.25 32 5 107; 3.25 32 3 82; 3.25 32 5 95; 3.75 0 3 63; 3.75 32 5 84; 4 32 1 87; 4 32 3 68 } +End + +Begin Chord-15 + Voice BrassSection + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence z {4.5 0 80 } z {1.5 32 86; 2.25 32 85; 4.5 32 87 } +End + +DefGroove Main-A Good, basic beat. + + +////////////////////// +/////// Fill-AA +SeqClear +SeqSize 1 + +Begin Drum-CowBell + Tone CowBell + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1 0 89; 1.5 0 85; 2 0 78; 2.5 0 57; 2.75 0 61; 3 0 92; 3.5 0 68; 3.75 0 57; 4 0 85; 4.5 0 68; 4.75 0 78 } +End + +Begin Drum-HighBongo + Tone HighBongo + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1.5 0 89; 1.75 0 89; 2.25 0 85; 2.75 0 78; 3.5 0 92; 4 0 81; 4.25 0 89 } +End + +Begin Drum-LowBongo + Tone LowBongo + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1 0 89; 3 0 89; 4.75 0 96 } +End + +Begin Drum-MuteHighConga + Tone MuteHighConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1.5 0 89; 3.5 0 103 } +End + +Begin Drum-OpenHighConga + Tone OpenHighConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {2.5 0 89; 2.75 0 92; 4.5 0 81; 4.75 0 103 } +End + +Begin Drum-LowConga + Tone LowConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1.75 0 96; 2 0 103 } +End + +Begin Drum-Maracas + Tone Maracas + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1 0 85; 1.75 0 71; 2 0 75; 2.75 0 75; 3 0 81; 3.75 0 75; 4 0 78; 4.75 0 75 } +End + +Begin Drum-Claves + Tone Claves + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1 0 78; 1.75 0 78; 2.5 0 85; 3.5 0 78; 4 0 85 } +End + +Begin Chord-4 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1 8 99; 1.5 32 84; 1.75 16 88; 2.25 16 94; 2.75 32 84; 3.25 16 87; 3.75 8. 86 } +End + +Begin Bass-9 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Octave 4 + Sequence {1 0 7- 99; 1 0 6# 87; 1.25 0 4# 115; 1.5 0 4# 91; 1.75 0 4# 115; 1.75 0 4# 84; 2 0 6# 87; 2.25 0 4# 119; 2.5 0 4# 73; 2.75 0 4# 82; 3 0 7- 107; 3 0 6# 87; 3.25 0 4# 111; 3.5 0 4# 84; 3.75 0 7- 111; 3.75 0 4# 119; 3.75 0 4# 84; 4 0 6# 91; 4.25 0 4 119; 4.5 0 4 123; 4.5 0 4# 79; 4.75 0 4# 79 } +End + +Begin Bass-11 + Voice FingeredBass + Rvolume 0 + Rtime 0 + Volume MP + Octave 2 + Sequence {1 8 1 103; 1.75 4 1 111; 3 8. 1 107; 3.75 8 1 107; 4.5 8 5 99 } +End + +Begin Chord-12 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1 8. 82; 1.75 16 80; 2.25 16 90; 2.75 8. 79; 3.75 8. 92 } +End + +Begin Bass-13 + Voice JazzGuitar + Rvolume 0 + Rtime 0 + Volume MP + Octave 5 + Sequence {1 16 5 84; 1.02 16 1 99; 1.04 16 3 99; 1.27 8 1 99; 1.29 16 3 103; 1.5 32 5 71; 1.75 8. 5 87; 1.77 8. 1 107; 1.79 8. 3 111; 2.25 16 5 87; 2.75 16 5 84; 2.77 16 1 103; 2.79 16 3 99; 3 8 5 79; 3.02 8 1 103; 3.04 8 3 99; 3.75 16 5 84; 3.77 16 1 95; 3.79 16 3 95; 4 8 5 82; 4.02 8 1 76; 4.04 8 3 91; 4.5 32 5 87 } +End + +DefGroove Fill-AA An okay single bar fill for Main-A. + + +////////////////////// +/////// Fill-AB +SeqClear +SeqSize 1 + +Begin Drum-HighBongo + Tone HighBongo + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1.5 0 103; 2.75 0 103; 3.5 0 85 } +End + +Begin Drum-LowBongo + Tone LowBongo + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1 0 103; 2.25 0 96 } +End + +Begin Drum-MuteHighConga + Tone MuteHighConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {3.5 0 107; 4.25 0 107; 4.5 0 103 } +End + +Begin Drum-OpenHighConga + Tone OpenHighConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1 0 96; 1.5 0 103; 2.25 0 103; 2.75 0 107 } +End + +Begin Drum-LowConga + Tone LowConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {3.12 0 107; 3.25 0 107; 3.75 0 107; 4.25 0 103; 4.75 0 103 } +End + +Begin Drum-Maracas + Tone Maracas + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1 0 85; 1.5 0 89; 2.25 0 89; 2.75 0 96 } +End + +Begin Chord-4 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 6 + Sequence {1 8 95; 1.5 8 101; 2.25 16 103; 2.75 16 107 } +End + +Begin Bass-9 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Octave 3 + Sequence {1 0 7- 107; 1 0 4# 103; 1.5 0 7- 119; 1.5 0 4# 99; 2.25 0 7- 107; 2.25 0 4# 107; 2.75 0 7- 111; 2.75 0 4# 99 } +End + +Begin Chord-12 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1 32 91; 1.5 8 99; 2.25 32 92; 2.75 16 104 } +End + +Begin Bass-13 + Voice JazzGuitar + Rvolume 0 + Rtime 0 + Volume MP + Octave 5 + Sequence {1 8 5 76; 1.02 8 1 68; 1.04 16 3 76; 1.5 8 5 82; 1.52 16 1 68; 1.54 16 3 84; 2.25 16 5 87; 2.27 32 1 87; 2.29 32 3 87; 2.75 16 5 87; 2.77 16 1 82; 2.79 16 3 84 } +End + +Begin Chord-15 + Voice BrassSection + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1 16 97; 2.25 32 97; 2.75 16 104 } +End + +DefGroove Fill-AB Single bar horn fill. + + +////////////////////// +/////// Intro-A +SeqClear +SeqSize 2 + +Begin Drum-VibraSlap + Tone VibraSlap + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence z {4 0 103 } +End + +Begin Drum-OpenHighConga + Tone OpenHighConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1.75 0 96; 3.5 0 103; 4.5 0 96 } \ + {1.75 0 96; 4 0 96; 4.5 0 103; 4.75 0 103 } +End + +Begin Drum-LowConga + Tone LowConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1 0 107; 2.5 0 99; 4 0 107 } \ + {1 0 107; 2.5 0 107; 3.25 0 73; 3.5 0 99 } +End + +Begin Drum-Maracas + Tone Maracas + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1 0 96; 1.75 0 96; 2.5 0 96; 4 0 96; 4.5 0 81 } \ + {1 0 96; 1.75 0 96; 2.5 0 96; 3.5 0 96; 4 0 92; 4.25 0 78; 4.5 0 96 } +End + +Begin Chord-4 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 7 + Sequence {1 8 119; 1.75 8 107; 2.5 4 115; 3.5 16 95; 4 16 115; 4.5 16 87 } \ + {1 8 115; 4.06 0 107; 4.11 0 68; 4.17 0 95; 4.21 0 99; 4.27 0 99; 4.32 0 87; 4.38 0 82; 4.43 0 84; 4.5 0 84; 4.55 0 87; 4.6 0 87; 4.65 0 91; 4.71 0 84; 4.77 0 87; 4.81 0 87; 4.86 0 91; 4.92 0 84 } +End + +Begin Bass-9 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Octave 4 + Sequence {1 0 7- 115; 1 0 4# 111; 1 0 4 127; 1 0 4# 115; 1.44 0 4 107; 1.5 0 4 99; 1.75 0 7- 115; 1.75 0 4 119; 1.75 0 5 119; 1.75 0 4# 107; 2.49 0 4 119; 2.5 0 7- 119; 2.5 0 4 115; 2.5 0 4# 115; 2.98 0 4 107; 3.23 0 4 115; 3.5 0 5 107; 3.5 0 4# 115; 3.76 0 4 107; 4 0 7- 115; 4 0 4 99; 4 0 4 103; 4 0 4# 107; 4.25 0 4 107; 4.5 0 5 111; 4.75 0 4 111; 4.85 0 4 107 } \ + {1 0 7- 107; 1 0 4# 115; 1 0 4 99; 1 0 4# 111; 1.5 0 4# 87; 1.75 0 7- 115; 1.75 0 4# 111; 1.75 0 5 115; 1.75 0 4# 115; 2.25 0 4 107; 2.3 0 4# 115; 2.5 0 7- 111; 2.5 0 4 115; 2.5 0 4# 123; 2.5 0 4 99; 2.76 0 4 99; 3.25 0 4 115; 3.5 0 4# 115; 3.5 0 5 111; 3.5 0 4# 99; 4 0 7- 123; 4 0 6 119; 4 0 6# 107; 4.03 0 4# 119; 4.28 0 4 115; 4.52 0 4 111; 4.78 0 4 123 } +End + +Begin Bass-11 + Voice FingeredBass + Rvolume 0 + Rtime 0 + Volume MP + Octave 3 + Sequence {1 8. 1 115; 1.75 8 1 99; 2.5 8. 1 103; 3.5 8 1 87; 4 8 1 99; 4.5 16 5 95 } \ + {1 8. 1 107 } +End + +Begin Chord-12 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1 8 91; 1.75 8 98; 2.5 8. 84; 3.5 8 88; 4 16 85; 4.5 16 73 } \ + {1 8 83 } +End + +Begin Bass-13 + Voice JazzGuitar + Rvolume 0 + Rtime 0 + Volume MP + Octave 5 + Sequence {1 8 3 84; 1.02 16 5 82; 1.04 8 1 84; 1.52 32 5 55; 1.75 32 3 84; 1.77 32 5 79; 1.79 32 1 84; 2.5 8. 3 107; 2.52 8. 5 87; 2.54 8. 1 91; 3.5 32 3 79; 3.52 32 5 76; 3.54 32 1 87; 4.02 32 5 84; 4.04 32 1 95; 4.5 32 3 95; 4.52 32 5 76 } \ + {1.02 8 3 82; 1.02 8 5 82; 1.04 8 1 91 } +End + +Begin Chord-15 + Voice BrassSection + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 6 + Sequence {1 8 111; 1.75 8 91; 2.5 8. 107; 3.25 16 99; 3.75 32 84; 4 16 115; 4.5 16 95 } \ + {1 8 111 } +End + +Begin Bass-16 + Voice TenorSax + Rvolume 0 + Rtime 0 + Volume MP + Octave 5 + Sequence {1 8 7- 115; 1 8 1 103; 1.75 8 5 95; 1.75 8 5 91; 2.5 4 7- 103; 2.5 4 1 103; 3.5 16 5 91; 3.5 16 5 87; 4 8 7- 103; 4 8 1 99; 4.5 16 5 82; 4.5 16 5 82 } \ + {1 8 7- 99; 1 8 1 115 } +End + +DefGroove Intro-A Good horns, but odd sounding piano/bass. + + +////////////////////// +/////// Ending-A +SeqClear +SeqSize 1 + +Begin Drum-OpenHighConga + Tone OpenHighConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1 0 96; 2.75 0 99; 3.25 0 96; 3.75 0 107 } +End + +Begin Drum-LowConga + Tone LowConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1.5 0 99; 2.25 0 103 } +End + +Begin Drum-Shaker + Tone Shaker + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1 0 96; 1.25 0 57; 1.5 0 32; 1.75 0 60; 2 0 85; 2.25 0 81; 2.5 0 38; 2.75 0 96; 3 0 23; 3.25 0 96; 3.5 0 71; 3.75 0 92 } +End + +Begin Chord-4 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1 16 96; 1.25 16 84; 1.5 16 99; 1.75 8 86; 2.25 16 110; 2.5 32 91; 2.75 16 76; 3.25 16 127; 3.75 8 94 } +End + +Begin Bass-9 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Octave 4 + Sequence {1 0 7- 115; 1 0 5# 99; 1.21 0 4 110; 1.25 0 4 119; 1.25 0 4 115; 1.5 0 4 111; 1.5 0 4# 64; 1.75 0 7- 111; 1.75 0 4 123; 1.75 0 5# 84; 2 0 7- 111; 2 0 6# 95; 2.25 0 4# 115; 2.25 0 4 107; 2.5 0 4# 69; 2.75 0 7- 115; 2.75 0 4# 115; 2.75 0 4 115; 2.75 0 6# 107; 3.25 0 7- 123; 3.25 0 4 115; 3.25 0 4# 95; 3.5 0 4# 103; 3.75 0 7- 119; 3.75 0 4 119; 3.75 0 6 99; 3.75 0 6# 107 } +End + +Begin Bass-11 + Voice FingeredBass + Rvolume 0 + Rtime 0 + Volume MP + Octave 3 + Sequence {1 8 1 99; 1.5 16 1 91; 1.75 8 3 95; 2.25 8 3 91; 2.75 16 5 95; 3.25 16 5 107; 3.75 8 1 107 } +End + +Begin Chord-12 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1 16 119; 1.25 16 33; 1.5 16 82; 1.75 8 107; 2.25 16 73; 2.5 32 76; 2.75 16 95; 3.25 16 107; 3.75 8 89 } +End + +Begin Chord-15 + Voice BrassSection + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1 16 107; 1.25 16 79; 1.5 16 64; 1.75 8 99; 2.25 16 60; 2.5 16 58; 2.75 16 91; 3.25 16 111; 3.75 16 96 } +End + +Begin Bass-16 + Voice TenorSax + Rvolume 0 + Rtime 0 + Volume MP + Octave 5 + Sequence {1 16 3 107; 1.25 16 5 79; 1.5 16 7- 64; 1.75 8 3 99; 2.25 16 5 60; 2.5 16 7- 58; 2.75 16 3 91; 3.25 16 5 111; 3.75 16 7- 91 } +End + +DefGroove Ending-A Rolling drums and final horns. + + +////////////////////// +/////// Break-AA +SeqClear +SeqSize 2 + +Begin Drum-CowBell + Tone CowBell + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1 0 89; 1.5 0 85; 2 0 78; 2.5 0 57; 2.75 0 61; 3 0 92; 3.5 0 68; 3.75 0 57; 4 0 85; 4.5 0 68; 4.75 0 78 } \ + {1 0 89 } +End + +Begin Drum-HighBongo + Tone HighBongo + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1.5 0 89; 1.75 0 89; 2.25 0 85; 2.75 0 78; 3.5 0 92; 4 0 81; 4.25 0 89 } \ + {1.4 0 110; 1.5 0 93; 1.75 0 64; 2.25 0 64; 3 0 81 } +End + +Begin Drum-LowBongo + Tone LowBongo + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1 0 89; 3 0 89; 4.75 0 96 } \ + {2 0 60; 2.5 0 67; 2.75 0 71; 3.25 0 86; 3.5 0 95; 4 0 102 } +End + +Begin Drum-MuteHighConga + Tone MuteHighConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1.5 0 89; 3.5 0 103 } \ + {4.41 0 104; 4.5 0 105; 4.75 0 108 } +End + +Begin Drum-OpenHighConga + Tone OpenHighConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {2.5 0 89; 2.75 0 92; 4.5 0 81; 4.75 0 103 } \ + {1 0 92 } +End + +Begin Drum-LowConga + Tone LowConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1.75 0 96; 2 0 103 } z +End + +Begin Drum-Maracas + Tone Maracas + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1 0 85; 1.75 0 71; 2 0 75; 2.75 0 75; 3 0 81; 3.75 0 75; 4 0 78; 4.75 0 75 } z +End + +Begin Drum-Claves + Tone Claves + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1 0 78; 1.75 0 78; 2.5 0 85; 3.5 0 78; 4 0 85 } z +End + +Begin Chord-4 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1 8 85; 1.5 16 68; 1.75 16 62; 2.25 16 79; 2.75 16 86; 3.25 32 78; 3.75 0 80; 4.25 32 80; 4.5 8 76 } \ + {1 8 103 } +End + +Begin Bass-9 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Octave 3 + Sequence {1 0 7- 99; 1 0 6# 87; 1.5 0 4# 91; 1.75 0 4# 84; 2 0 6# 87; 2.5 0 4# 73; 2.75 0 4# 82; 3 0 7- 107; 3 0 6# 87; 3.25 0 4# 107; 3.5 0 4# 84; 3.75 0 7- 111; 3.75 0 4# 107; 3.75 0 4# 84; 4 0 6# 91; 4.25 0 4 107; 4.5 0 4 115; 4.5 0 4# 79; 4.75 0 4# 79 } \ + {1 0 7- 107; 1 0 4# 107; 2 0 4# 95; 3 0 4# 103; 4 0 4# 99 } +End + +Begin Bass-11 + Voice FingeredBass + Rvolume 0 + Rtime 0 + Volume MP + Octave 2 + Sequence {1.75 8. 5 113; 2.5 4 1 107; 3.5 4 5 107; 4.5 8 5 107 } z +End + +Begin Chord-12 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1 8 77; 1.5 16 91; 2.25 32 84; 2.75 32 83; 3.25 16 76; 3.75 16 82; 4.25 16 84 } \ + {1 8 106 } +End + +Begin Bass-13 + Voice JazzGuitar + Rvolume 0 + Rtime 0 + Volume MP + Octave 5 + Sequence {1.5 0 3 50; 1.52 32 5 52; 1.54 32 1 52; 1.75 0 3 61; 1.77 32 5 64; 1.79 0 1 46; 2.25 32 3 95; 2.27 32 5 107; 2.29 32 1 82; 3.25 32 3 82; 3.27 32 5 95; 3.75 0 3 63; 3.77 32 5 84; 4 32 3 68; 4.04 32 1 87 } \ + {1 8 3 87; 1.02 8. 5 95; 1.04 8. 1 87 } +End + +DefGroove Break-AA A nice transition section. + + +////////////////////// +/////// Main-B +SeqClear +SeqSize 4 + +Begin Drum-CowBell + Tone CowBell + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1 0 89; 1.5 0 85; 2 0 78; 2.5 0 57; 2.75 0 61; 3 0 92; 3.5 0 68; 3.75 0 57; 4 0 85; 4.5 0 68; 4.75 0 78 } \ + {1 0 89; 1.5 0 85; 2 0 78; 2.5 0 57; 2.75 0 61; 3 0 92; 3.5 0 68; 3.75 0 57; 4 0 85; 4.5 0 68; 4.75 0 78 } \ + {1 0 89; 1.5 0 85; 2 0 78; 2.5 0 57; 2.75 0 61; 3 0 92; 3.5 0 68; 3.75 0 57; 4 0 85; 4.5 0 68; 4.75 0 78 } \ + {1 0 89; 1.5 0 85; 2 0 78; 2.5 0 57; 2.75 0 61; 3 0 92; 3.5 0 68; 3.75 0 57; 4 0 85; 4.5 0 68; 4.75 0 78 } +End + +Begin Drum-HighBongo + Tone HighBongo + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1.5 0 89; 1.75 0 89; 2.25 0 85; 2.75 0 78; 3.5 0 92; 4 0 81; 4.25 0 89; 4.75 0 96 } \ + {1.5 0 89; 1.75 0 89; 2.25 0 85; 2.75 0 78; 3.5 0 92; 4 0 81; 4.25 0 89 } \ + {1.5 0 89; 1.75 0 89; 2.25 0 85; 2.75 0 78; 3.5 0 92; 4 0 81; 4.25 0 89 } \ + {1.5 0 89; 1.75 0 89; 2.25 0 85; 2.75 0 78; 3.5 0 92; 4 0 81; 4.25 0 89 } +End + +Begin Drum-LowBongo + Tone LowBongo + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1 0 89; 3 0 89 } \ + {1 0 89; 3 0 89; 4.75 0 96 } \ + {1 0 89; 3 0 89; 4.75 0 96 } \ + {1 0 89; 3 0 89; 4.75 0 96 } +End + +Begin Drum-MuteHighConga + Tone MuteHighConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1.5 0 89; 3.5 0 103 } \ + {1.5 0 89; 3.5 0 103 } \ + {1.5 0 89; 3.5 0 103 } \ + {1.5 0 89; 3.5 0 103 } +End + +Begin Drum-OpenHighConga + Tone OpenHighConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {2.5 0 89; 2.75 0 92; 4.5 0 81; 4.75 0 103 } \ + {2.5 0 89; 2.75 0 92; 4.5 0 81; 4.75 0 103 } \ + {2.5 0 89; 2.75 0 92; 4.5 0 81; 4.75 0 103 } \ + {2.5 0 89; 2.75 0 92; 4.5 0 81; 4.75 0 103 } +End + +Begin Drum-LowConga + Tone LowConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1.75 0 96; 2 0 103 } \ + {1.75 0 96; 2 0 103 } \ + {1.75 0 96; 2 0 103 } \ + {1.75 0 96; 2 0 103 } +End + +Begin Drum-Cabasa + Tone Cabasa + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1.5 0 103; 1.75 0 96; 2.5 0 89; 2.75 0 96; 3.5 0 85; 3.75 0 89; 4.5 0 96; 4.75 0 89 } \ + {1.5 0 89; 1.75 0 89; 2.5 0 92; 2.75 0 92; 3.5 0 92; 3.75 0 81; 4.5 0 89; 4.75 0 85 } \ + {1.5 0 92; 1.75 0 89; 2.5 0 92; 2.75 0 85; 3.5 0 89; 3.75 0 89; 4.5 0 89; 4.75 0 89 } \ + {1.5 0 89; 1.75 0 85; 2.5 0 96; 2.75 0 78; 3.5 0 96; 3.75 0 92; 4.5 0 103; 4.75 0 85 } +End + +Begin Drum-Maracas + Tone Maracas + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1 0 85; 1.75 0 71; 2 0 75; 2.75 0 75; 3 0 81; 3.75 0 75; 4 0 78; 4.75 0 75 } \ + {1 0 85; 1.75 0 71; 2 0 75; 2.75 0 75; 3 0 81; 3.75 0 75; 4 0 78; 4.75 0 75 } \ + {1 0 85; 1.75 0 71; 2 0 75; 2.75 0 75; 3 0 81; 3.75 0 75; 4 0 78; 4.75 0 75 } \ + {1 0 85; 1.75 0 71; 2 0 75; 2.75 0 75; 3 0 81; 3.75 0 75; 4 0 78; 4.75 0 75 } +End + +Begin Drum-Claves + Tone Claves + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1 0 78; 1.75 0 78; 2.5 0 85; 3.5 0 78; 4 0 85 } \ + {1 0 78; 1.75 0 78; 2.5 0 85; 3.5 0 78; 4 0 85 } \ + {1 0 78; 1.75 0 78; 2.5 0 85; 3.5 0 78; 4 0 85 } \ + {1 0 78; 1.75 0 78; 2.5 0 85; 3.5 0 78; 4 0 85 } +End + +Begin Chord-2 + Voice BrassSection + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {3.25 32 90; 3.75 32 95 } \ + {3 32 100 } \ + {1.75 32 100; 3.25 32 92; 3.75 32 101 } \ + {3.5 32 91; 4.75 32 89 } +End + +Begin Bass-3 + Voice TenorSax + Rvolume 0 + Rtime 0 + Volume MP + Octave 5 + Sequence {3 16 7- 95; 3.25 16 5 77; 4.25 32 5 81; 4.5 16 7- 90 } z {4.25 16 7- 97; 4.25 32 5 72; 4.75 32 5 108 } \ + {1.25 32 5 70; 1.5 16 7- 92 } +End + +Begin Bass-9 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Octave 3 + Sequence {1 0 7- 107; 1 0 4 115; 1 0 6# 87; 1.5 0 4 103; 1.5 0 4# 91; 1.75 0 4# 84; 2 0 7- 107; 2 0 6# 87; 2.25 0 4 107; 2.5 0 4# 73; 2.75 0 4 111; 2.75 0 4# 82; 3 0 7- 115; 3 0 6# 87; 3.25 0 4 107; 3.5 0 4# 84; 3.75 0 4 111; 3.75 0 4# 84; 4 0 7- 115; 4 0 6# 91; 4.25 0 4 99; 4.5 0 4 99; 4.5 0 4# 79; 4.75 0 4# 79 } \ + {1 0 7- 107; 1 0 4 107; 1 0 6# 87; 1.5 0 4# 91; 1.75 0 4 111; 1.75 0 4# 84; 2 0 7- 115; 2 0 6# 87; 2.25 0 4 115; 2.5 0 4# 73; 2.75 0 4# 82; 3 0 7- 107; 3 0 6# 87; 3.25 0 4 115; 3.5 0 4# 84; 3.75 0 4 119; 3.75 0 4# 84; 4 0 7- 107; 4 0 6# 91; 4.5 0 4 107; 4.5 0 4# 79; 4.75 0 4# 79 } \ + {1 0 7- 115; 1 0 4 111; 1 0 6# 87; 1.5 0 4 115; 1.5 0 4# 91; 1.75 0 4# 84; 2 0 7- 115; 2 0 6# 87; 2.25 0 4 111; 2.5 0 4# 73; 2.75 0 4 111; 2.75 0 4# 82; 3 0 7- 111; 3 0 6# 87; 3.5 0 4 115; 3.5 0 4# 84; 3.75 0 4# 84; 4 0 7- 107; 4 0 6# 91; 4.25 0 4 111; 4.5 0 4 115; 4.5 0 4# 79; 4.75 0 4# 79 } \ + {1 0 7- 111; 1 0 4 119; 1 0 6# 87; 1.5 0 4 115; 1.5 0 4# 91; 1.75 0 4# 84; 2 0 7- 107; 2 0 6# 87; 2.25 0 4 115; 2.5 0 4# 73; 2.75 0 4 111; 2.75 0 4# 82; 3 0 7- 107; 3 0 6# 87; 3.25 0 4 107; 3.5 0 4 107; 3.5 0 4# 84; 3.75 0 4# 84; 4 0 7- 107; 4 0 6# 91; 4.25 0 4 111; 4.5 0 4 119; 4.5 0 4# 79; 4.75 0 4# 79 } +End + +Begin Bass-11 + Voice FingeredBass + Rvolume 0 + Rtime 0 + Volume MP + Octave 2 + Sequence {1 8. 1 115; 1.75 8. 5 113; 2.5 4 1 116; 3.75 8. 5 115; 4.5 4 1 111 } \ + {1.75 8. 5 115; 2.5 4 1 116; 3.5 4 5 113; 4.5 4 1 112 } \ + {1.75 8. 5 116; 2.5 4 1 116; 3.75 8. 5 114; 4.5 4 1 119 } \ + {1.75 8. 5 110; 2.5 4 1 110; 3.5 4. 5 114 } +End + +Begin Chord-12 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1.01 8 101; 1.51 16 74; 2.01 32 64; 2.51 8 75; 2.76 16 80; 3.26 16 68; 3.76 16 83; 4.26 8. 78 } \ + {1.01 8 80; 1.51 16 76; 2.26 16 97; 2.76 16 74; 3.26 16 81; 3.76 16 91; 4.26 16 75; 4.51 8 73 } \ + {1.01 32 79; 1.51 16 67; 1.76 16 79; 2.26 16 75; 2.76 16 75; 3.26 16 80; 3.76 32 75; 4.26 32 55; 4.51 16 77 } \ + {1.01 16 73; 1.76 16 81; 2.26 16 72; 2.76 32 62; 3.26 16 80; 3.76 16 70; 4.26 16 74; 4.51 8 91 } +End + +Begin Bass-13 + Voice JazzGuitar + Rvolume 0 + Rtime 0 + Volume MP + Octave 5 + Sequence {1.5 32 5 84; 1.52 32 1 79; 1.54 32 3 79; 1.75 32 5 79; 1.77 32 1 76; 1.79 32 3 76; 2.5 32 5 95; 2.52 32 1 91; 2.54 32 3 91; 3.5 32 5 91; 3.52 32 1 84; 3.54 32 3 84; 3.75 32 5 84; 3.77 32 1 87; 3.79 32 3 87; 4.25 8. 5 95; 4.27 8. 1 91; 4.29 8. 3 91 } \ + {1.5 32 5 91; 1.52 32 1 82; 1.54 32 3 82; 2.5 32 5 84; 2.52 32 1 76; 2.54 32 3 76; 2.75 32 5 67; 2.77 32 1 58; 2.79 32 3 58; 3.5 32 5 63; 3.52 32 1 71; 3.54 32 3 71; 3.77 32 1 67; 3.79 32 3 67; 4.5 32 5 79; 4.52 32 1 76; 4.54 32 3 76 } \ + {1.5 32 5 69; 1.52 32 1 76; 1.54 32 3 76; 1.75 32 5 64; 1.77 32 1 71; 1.79 32 3 76; 2.5 32 5 76; 2.52 32 1 84; 2.54 32 3 79; 3.5 8. 5 76; 3.52 8. 1 76; 3.54 8. 3 82; 4.5 32 5 64; 4.52 32 1 71; 4.54 32 3 69 } \ + {1.5 32 5 71; 1.52 32 1 79; 1.54 32 3 79; 1.75 32 5 64; 1.77 32 1 73; 1.79 32 3 76; 2.25 32 5 76; 2.27 32 1 84; 2.29 32 3 84; 3.5 32 5 79; 3.52 32 1 79; 3.54 32 3 79; 4.5 32 5 73; 4.52 32 1 76; 4.54 32 3 82; 4.75 32 5 66; 4.77 32 1 82; 4.79 32 3 79 } +End + +Begin Chord-15 + Voice BrassSection + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1.27 32 93; 1.75 32 96; 3.75 32 101; 4 32 91; 4.5 32 116 } \ + {3.5 8. 110; 4 8 106; 4.5 16 97 } \ + {3.75 32 110; 4 16 90; 4.5 16 105 } \ + {3 32 112; 3.25 16 100; 3.75 32 122; 4.25 32 112; 4.5 32 102 } +End + +Begin Bass-16 + Voice TenorSax + Rvolume 0 + Rtime 0 + Volume MP + Octave 5 + Sequence {2.5 8 3 87; 3 16 5 87; 3.5 16 3 84; 4 8 5 99; 4.5 8 3 73 } \ + {1 16 1 87; 4.5 8 5 99 } \ + {2.5 8 5 95; 3 16 6 95; 3.5 16 5 79; 4 8 6 95; 4.5 8 5 73 } \ + {1 8 1 95; 3.5 16 3 107 } +End + +DefGroove Main-B Nice variation of main pattern with horn section. + + +////////////////////// +/////// Fill-BA +SeqClear +SeqSize 1 + +Begin Drum-CowBell + Tone CowBell + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1 0 99; 1.5 0 51; 1.75 0 103; 2.25 0 54; 2.5 0 78; 2.75 0 92; 3.25 0 73; 3.75 0 99; 4.25 0 78; 4.5 0 96 } +End + +Begin Drum-RideCymbal2 + Tone RideCymbal2 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {2.75 0 27 } +End + +Begin Drum-HighBongo + Tone HighBongo + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {2 0 57; 2.25 0 96; 2.5 0 73; 2.75 0 78; 4 0 71 } +End + +Begin Drum-LowBongo + Tone LowBongo + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1.5 0 92; 1.75 0 92; 3 0 96; 3.25 0 89; 3.75 0 99 } +End + +Begin Drum-MuteHighConga + Tone MuteHighConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {4.25 0 103; 4.5 0 89 } +End + +Begin Chord-2 + Voice BrassSection + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1 8 109 } +End + +Begin Bass-9 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Octave 4 + Sequence {1 0 7- 103; 1 0 6# 95; 1.75 0 4# 107; 2.5 0 4 111; 3.5 0 4 115; 3.5 0 5 67; 4 0 4# 87; 4 0 4 103; 4 0 5 91 } +End + +Begin Bass-11 + Voice FingeredBass + Rvolume 0 + Rtime 0 + Volume MP + Octave 3 + Sequence {1 8. 1 119 } +End + +Begin Chord-12 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1 8. 87 } +End + +Begin Bass-13 + Voice JazzGuitar + Rvolume 0 + Rtime 0 + Volume MP + Octave 6 + Sequence {1 4 1 82; 1.02 4 5 84 } +End + +Begin Chord-15 + Voice BrassSection + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1 8. 109 } +End + +DefGroove Fill-BA Abrupt horns. Good for ending loop-back. + + +////////////////////// +/////// Fill-BB +SeqClear +SeqSize 1 + +Begin Drum-CowBell + Tone CowBell + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1 0 89; 1.5 0 85; 2 0 78; 2.5 0 57; 2.75 0 61; 3 0 92; 3.5 0 68; 3.75 0 57; 4 0 85; 4.5 0 68; 4.75 0 78 } +End + +Begin Drum-HighBongo + Tone HighBongo + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1.5 0 89; 1.75 0 89; 2.25 0 85; 2.75 0 78; 3.5 0 92; 4 0 81; 4.25 0 89 } +End + +Begin Drum-LowBongo + Tone LowBongo + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1 0 89; 3 0 89; 4.75 0 96 } +End + +Begin Drum-MuteHighConga + Tone MuteHighConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1.5 0 89; 3.5 0 103 } +End + +Begin Drum-OpenHighConga + Tone OpenHighConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {2.5 0 89; 2.75 0 92; 4.5 0 81; 4.75 0 103 } +End + +Begin Drum-LowConga + Tone LowConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1.75 0 96; 2 0 103 } +End + +Begin Drum-Cabasa + Tone Cabasa + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1.5 0 89; 1.75 0 85; 2.5 0 96; 2.75 0 78; 3.5 0 96; 3.75 0 92; 4.5 0 103; 4.75 0 85 } +End + +Begin Drum-Maracas + Tone Maracas + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1 0 85; 1.75 0 71; 2 0 75; 2.75 0 75; 3 0 81; 3.75 0 75; 4 0 78; 4.75 0 75 } +End + +Begin Drum-Claves + Tone Claves + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1 0 78; 1.75 0 78; 2.5 0 85; 3.5 0 78; 4 0 85 } +End + +Begin Chord-2 + Voice BrassSection + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 6 + Sequence {1.5 32 125; 1.75 32 113; 2 32 30; 2.75 32 127; 3.25 32 127 } +End + +Begin Bass-9 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Octave 4 + Sequence {1 0 7- 111; 1 0 4 119; 1 0 6# 87; 1.25 0 4 107; 1.25 0 4# 115; 1.5 0 4 115; 1.5 0 4# 91; 1.75 0 4# 115; 1.75 0 4# 84; 2 0 7- 107; 2 0 6# 87; 2.25 0 4# 123; 2.25 0 4 115; 2.5 0 4# 73; 2.75 0 4 111; 2.75 0 4# 82; 3 0 7- 107; 3 0 6# 87; 3.25 0 4 123; 3.25 0 4 107; 3.5 0 4 107; 3.5 0 4# 84; 3.75 0 4 127; 3.75 0 4# 84; 4 0 7- 107; 4 0 4 107; 4 0 6# 91; 4.25 0 4 127; 4.25 0 4 111; 4.5 0 4 119; 4.5 0 4# 79; 4.75 0 4# 79 } +End + +Begin Bass-11 + Voice FingeredBass + Rvolume 0 + Rtime 0 + Volume MP + Octave 3 + Sequence {1 8. 1 125; 1.75 8. 5 110; 2.5 4 1 110; 3.5 4. 5 114 } +End + +Begin Chord-12 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 6 + Sequence {1 8 89; 1.75 32 92; 3.25 32 97 } +End + +Begin Bass-13 + Voice JazzGuitar + Rvolume 0 + Rtime 0 + Volume MP + Octave 6 + Sequence {1.5 32 1 79; 1.52 32 3 79; 1.75 32 1 73; 1.77 32 3 76; 2.25 32 1 84; 2.27 32 3 84; 3.5 32 1 79; 3.52 32 3 79; 4.5 32 1 76; 4.52 32 3 82; 4.75 32 1 82; 4.77 32 3 79 } +End + +Begin Chord-15 + Voice BrassSection + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 6 + Sequence {1.5 32 125; 1.75 32 113; 2 32 30; 2.75 32 127; 3.25 32 127 } +End + +DefGroove Fill-BB Sharp horns make this a possible intro. + + +////////////////////// +/////// Intro-B +SeqClear +SeqSize 2 + +Begin Drum-CowBell + Tone CowBell + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1 0 96; 1.75 0 85; 2 0 96; 2.75 0 92; 3.25 0 89; 4.25 0 85; 4.75 0 81 } \ + {1.5 0 75; 2.25 0 89; 2.75 0 96; 3.25 0 99; 3.75 0 96; 4 0 96 } +End + +Begin Drum-MuteHighConga + Tone MuteHighConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1.5 0 99; 3.5 0 98 } \ + {1.5 0 102; 2.75 0 102; 3.25 0 108; 4 0 106 } +End + +Begin Drum-OpenHighConga + Tone OpenHighConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1 0 99; 2.25 0 99; 4.5 0 99 } \ + {2.5 0 81 } +End + +Begin Drum-LowConga + Tone LowConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {2.5 0 99; 2.75 0 101 } \ + {1 0 98; 3.75 0 107; 4.5 0 113 } +End + +Begin Drum-Cabasa + Tone Cabasa + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1.5 0 78; 1.75 0 71; 2.5 0 81; 2.75 0 65; 3.5 0 78; 3.75 0 73; 4.5 0 92; 4.75 0 68 } \ + {1.5 0 92; 1.75 0 75; 2.5 0 103; 2.75 0 75 } +End + +Begin Drum-Claves + Tone Claves + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1 0 99; 1.75 0 96; 2.5 0 96; 3.5 0 92; 4 0 99 } \ + {1 0 96; 1.75 0 96; 2.5 0 99 } +End + +Begin Drum-Shaker + Tone Shaker + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1.5 0 61; 1.75 0 57; 2.5 0 71; 3.5 0 75; 3.75 0 68; 4.5 0 81 } \ + {1.5 0 75; 2.25 0 81 } +End + +Begin Bass-9 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Octave 2 + Sequence {1 0 7- 115; 2.25 0 7- 115; 2.75 0 7- 111 } \ + {1 0 7- 99; 3.25 0 7- 111; 3.75 0 7- 107; 4 0 7- 115 } +End + +Begin Bass-11 + Voice FingeredBass + Rvolume 0 + Rtime 0 + Volume MP + Octave 3 + Sequence {1 4 1 115; 2 8. 1# 87; 2.75 4 2 84; 4 32 5 91; 4.5 16 5 87 } \ + {1 8. 5 87; 1.75 4 5 84; 3.25 32 1 111; 3.75 32 1 99; 4 16 1 107 } +End + +Begin Chord-12 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1 8 82; 1.5 16 71; 1.75 16 74; 2.25 16 78; 2.75 8 77; 3.25 8 70; 3.75 16 64; 4 8 75; 4.5 16 60 } \ + {1 16 74; 1.5 32 72; 1.75 16 72; 2.25 16 73; 3.25 16 86; 3.75 32 79; 4 16 86 } +End + +Begin Bass-13 + Voice JazzGuitar + Rvolume 0 + Rtime 0 + Volume MP + Octave 6 + Sequence {1 8 1 79; 1 32 3 73; 1.5 16 3 76; 1.75 16 3 66; 1.75 16 5 82; 2.25 32 3 63; 2.25 16 1 79; 2.75 8. 6 69; 2.75 8. 2 67; 3.75 32 2 62; 3.75 32 4 91; 4 16 6 84; 4 8 2 61; 4.5 32 2 62; 4.5 16 4 79 } \ + {1 8 2 73; 1 8. 5 82; 2 8 7- 91; 2 8 2 79; 3.25 32 1 87; 3.25 32 3 84; 3.25 32 5 95; 3.75 32 1 82; 3.75 32 5 82; 3.75 32 3 79; 4 16 5 91; 4 16 3 87; 4 16 1 84 } +End + +Begin Chord-15 + Voice BrassSection + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence z {3.25 32 99; 3.75 32 90; 4 16 93 } +End + +Begin Bass-16 + Voice TenorSax + Rvolume 0 + Rtime 0 + Volume MP + Octave 5 + Sequence {1 16 1 101; 1.75 16 3 121; 2 16 5 91; 2.25 16 1 82; 2.75 16 6 87; 3.25 16 4 71; 3.75 16 6 87; 4 8 1 84; 4.5 16 6 84 } \ + {1 8 7- 95; 2 16 5 95; 3.25 16 3 87; 3.25 16 1 95; 3.75 32 1 99; 3.75 32 3 87; 4 16 1 87; 4 16 3 87 } +End + +DefGroove Intro-B Decent enough introduction. + + +////////////////////// +/////// Ending-B +SeqClear +SeqSize 1 + +Begin Drum-CowBell + Tone CowBell + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1 0 89; 1.5 0 85; 2 0 78; 2.5 0 57; 2.75 0 61; 3 0 92; 3.5 0 68; 3.75 0 57; 4 0 85; 4.5 0 68 } +End + +Begin Drum-HighBongo + Tone HighBongo + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1.5 0 89; 1.75 0 89; 2.25 0 85; 2.75 0 78; 3.5 0 92; 4 0 81; 4.25 0 89 } +End + +Begin Drum-LowBongo + Tone LowBongo + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1 0 89; 3 0 89 } +End + +Begin Drum-MuteHighConga + Tone MuteHighConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1.5 0 89; 3.5 0 103 } +End + +Begin Drum-OpenHighConga + Tone OpenHighConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {2.5 0 89; 2.75 0 92; 4.5 0 81; 4.75 0 103 } +End + +Begin Drum-LowConga + Tone LowConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1.75 0 96; 2 0 103 } +End + +Begin Drum-Maracas + Tone Maracas + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1 0 85; 1.75 0 71; 2 0 75; 2.75 0 75; 3 0 81; 3.75 0 75; 4 0 78 } +End + +Begin Drum-Claves + Tone Claves + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1 0 78; 1.75 0 78; 2.5 0 85; 3.5 0 78; 4 0 85 } +End + +Begin Bass-9 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Octave 3 + Sequence {1 0 7- 99; 1 0 6# 87; 1.5 0 4# 91; 1.75 0 4# 84; 2 0 6# 87; 2.5 0 4# 73; 2.75 0 4# 82; 3 0 7- 107; 3 0 6# 87; 3.5 0 4# 84; 3.75 0 7- 111; 3.75 0 4# 84; 4 0 6# 91; 4.5 0 5 91; 4.5 0 4# 79; 4.75 0 7- 111; 4.75 0 5 91; 4.75 0 4# 79 } +End + +Begin Bass-11 + Voice FingeredBass + Rvolume 0 + Rtime 0 + Volume MP + Octave 3 + Sequence {1 8. 1 123; 1.75 8. 4 99; 2.5 4 2# 107; 3.5 8. 5 107; 4.5 32 1 111; 4.75 16 1 107 } +End + +Begin Chord-12 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1 16 122; 1.5 32 101; 1.75 8 105; 2.25 16 125; 2.75 16 114; 3.25 16 121; 3.75 8 105; 4.5 32 121; 4.75 16 125 } +End + +Begin Chord-15 + Voice BrassSection + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1.25 16 91; 1.5 16 76; 1.75 16 68; 2 16 73; 2.25 16 76; 2.5 16 79; 2.75 8 99; 3.25 16 62; 3.5 16 73; 3.75 16 95; 4.5 16 104; 4.75 16 104 } +End + +DefGroove Ending-B Pretty busy, but might be okay with a slower tempo. + + +////////////////////// +/////// Break-BB +SeqClear +SeqSize 2 + +Begin Drum-LowTom2 + Tone LowTom2 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence z {1 0 103 } +End + +Begin Drum-CowBell + Tone CowBell + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1 0 89; 1.5 0 85; 2 0 78; 2.5 0 57; 2.75 0 61; 3 0 92; 3.5 0 68; 3.75 0 57; 4 0 85; 4.5 0 68; 4.75 0 78 } \ + {1 0 89 } +End + +Begin Drum-HighBongo + Tone HighBongo + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1.5 0 89; 1.75 0 89; 2.25 0 85; 2.75 0 78; 3.5 0 92; 4 0 81; 4.25 0 89 } \ + {3.6 0 49 } +End + +Begin Drum-LowBongo + Tone LowBongo + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1 0 89; 3 0 89; 4.75 0 96 } z +End + +Begin Drum-MuteHighConga + Tone MuteHighConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1.5 0 89; 3.5 0 103 } \ + {3.25 0 93; 3.72 0 93 } +End + +Begin Drum-OpenHighConga + Tone OpenHighConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {2.5 0 89; 2.75 0 92; 4.5 0 81; 4.75 0 103 } \ + {1 0 92; 3.43 0 59; 3.73 0 75 } +End + +Begin Drum-LowConga + Tone LowConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1.75 0 96; 2 0 103 } \ + {3.09 0 92; 3.6 0 49; 3.9 0 104 } +End + +Begin Drum-HighTimbale + Tone HighTimbale + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence z {2.97 0 97; 3.98 0 79 } +End + +Begin Drum-HighAgogo + Tone HighAgogo + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence z {3.98 0 95 } +End + +Begin Drum-Cabasa + Tone Cabasa + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1.5 0 89; 1.75 0 85; 2.5 0 96; 2.75 0 78; 3.5 0 96; 3.75 0 92; 4.5 0 103; 4.75 0 85 } z +End + +Begin Drum-Maracas + Tone Maracas + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1 0 85; 1.75 0 71; 2 0 75; 2.75 0 75; 3 0 81; 3.75 0 75; 4 0 78; 4.75 0 75 } z +End + +Begin Drum-Claves + Tone Claves + Rvolume 0 + Rtime 0 + Articulate 100 + Volume MP + Sequence {1 0 78; 1.75 0 78; 2.5 0 85; 3.5 0 78; 4 0 85 } z +End + +Begin Bass-9 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Octave 3 + Sequence {1 0 7- 111; 1 0 4 119; 1 0 6# 87; 1.5 0 4 115; 1.5 0 4# 91; 1.75 0 4# 84; 2 0 7- 107; 2 0 6# 87; 2.25 0 4 115; 2.5 0 4# 73; 2.75 0 4 111; 2.75 0 4# 82; 3 0 7- 107; 3 0 6# 87; 3.25 0 4 107; 3.5 0 4 107; 3.5 0 4# 84; 3.75 0 4# 84; 4 0 7- 107; 4 0 6# 91; 4.25 0 4 111; 4.5 0 4 119; 4.5 0 4# 79; 4.75 0 4# 79 } \ + {1 0 7- 107; 1 0 4 107; 1 0 4# 107; 2 0 4# 95; 3 0 4# 103; 4 0 4# 99; 4.5 0 6# 60; 4.85 0 4# 20 } +End + +Begin Bass-11 + Voice FingeredBass + Rvolume 0 + Rtime 0 + Volume MP + Octave 3 + Sequence {1.75 8. 5 110; 2.5 4 1 110; 3.5 4. 5 114 } \ + {1 8. 1 110 } +End + +Begin Chord-12 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1 16 73; 1.75 16 81; 2.25 16 72; 2.75 32 62; 3.25 16 80; 3.75 16 70; 4.25 16 74; 4.5 8 91 } \ + {1 8 93 } +End + +Begin Bass-13 + Voice JazzGuitar + Rvolume 0 + Rtime 0 + Volume MP + Octave 5 + Sequence {1.5 32 3 79; 1.5 32 1 79; 1.5 32 5 71; 1.75 32 3 76; 1.75 32 1 73; 1.75 32 5 64; 2.25 32 5 76; 2.25 32 1 84; 2.25 32 3 84; 3.5 32 3 79; 3.5 32 1 79; 3.5 32 5 79; 4.5 32 5 73; 4.5 32 3 82; 4.5 32 1 76; 4.75 32 3 79; 4.75 32 1 82; 4.75 32 5 66 } \ + {1 8 3 87; 1 8. 5 95; 1 8. 1 87 } +End + +Begin Chord-15 + Voice BrassSection + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {3 32 112; 3.25 16 100; 3.75 32 122; 4.25 32 112; 4.5 32 102 } \ + {1 8 127 } +End + +DefGroove Break-BB Good fill with drums on bar 1 and horns on 2. + + +/// Groove Aliases. You should do something creative here! + + +Groove Main-A +DefGroove Main-C /// Alias definition from Main-A + +Groove Main-A +DefGroove Main-D /// Alias definition from Main-A + +Groove Intro-A +DefGroove Intro-C /// Alias definition from Intro-A + +Groove Ending-A +DefGroove Ending-C /// Alias definition from Ending-A + +Groove Fill-AA +DefGroove Fill-CC /// Alias definition from Fill-AA + +Groove Fill-AA +DefGroove Fill-DD /// Alias definition from Fill-AA + diff --git a/mma/lib/yamaha/quando-g.s280.mma b/mma/lib/yamaha/quando-g.s280.mma new file mode 100644 index 0000000..61135b4 --- /dev/null +++ b/mma/lib/yamaha/quando-g.s280.mma @@ -0,0 +1,2108 @@ +///// Yamaha sty to MMA conversion by ys2mma.py +///// This file is a machine translation of a binary style file and +///// should be usable by MMA. However, it does not use all of the +///// features of MMA ... or those of a Yamaha synth. It should be hand +///// optimized for best results. + +///// Created: Fri Feb 16 11:05:09 2007 + +Begin Doc + Converted from QUANDO-G.S280.sty. A nice, light samba. Use in a tempo + range from 80 to 100 bpm (faster than that it sounds too busy). Library filename: + yamaha/quando-g.s280.mma. +End + +Author Bob van der Poel + +Time 4 +TimeSig 4 4 + + + +////////////////////// +/////// Main-A +SeqClear +SeqSize 8 + +Begin Drum-Tambourine + Tone Tambourine + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 51; 1.25 0 30; 1.5 0 118; 1.75 0 44; 2 0 51; 2.25 0 35; 2.5 0 118; 2.75 0 35; 3 0 51; 3.25 0 33; 3.5 0 118; 3.75 0 33; 4 0 51; 4.25 0 39; 4.5 0 124; 4.75 0 44 } \ + {1 0 76; 1.25 0 46; 1.5 0 124; 1.75 0 49; 2 0 88; 2.25 0 39; 2.5 0 124; 2.75 0 44; 3 0 56; 3.25 0 46; 3.5 0 124; 3.75 0 46; 4 0 61; 4.25 0 49; 4.5 0 124; 4.75 0 22 } \ + {1 0 72; 1.25 0 49; 1.5 0 124; 1.75 0 35; 2 0 72; 2.25 0 44; 2.5 0 112; 2.75 0 46; 3 0 49; 3.25 0 31; 3.5 0 124; 3.75 0 35; 4 0 61; 4.25 0 28; 4.5 0 124; 4.75 0 30 } \ + {1 0 72; 1.25 0 33; 1.5 0 124; 1.75 0 27; 2 0 84; 2.25 0 35; 2.5 0 124; 2.75 0 34; 3 0 84; 3.25 0 44; 3.5 0 124; 3.75 0 46; 4 0 76; 4.25 0 38; 4.5 0 118; 4.75 0 34 } \ + {1 0 51; 1.25 0 30; 1.5 0 118; 1.75 0 44; 2 0 51; 2.25 0 35; 2.5 0 118; 2.75 0 35; 3 0 51; 3.25 0 33; 3.5 0 118; 3.75 0 33; 4 0 51; 4.25 0 39; 4.5 0 124; 4.75 0 44 } \ + {1 0 76; 1.25 0 46; 1.5 0 124; 1.75 0 49; 2 0 88; 2.25 0 39; 2.5 0 124; 2.75 0 44; 3 0 56; 3.25 0 46; 3.5 0 124; 3.75 0 46; 4 0 61; 4.25 0 49; 4.5 0 124; 4.75 0 22 } \ + {1 0 72; 1.25 0 49; 1.5 0 124; 1.75 0 35; 2 0 72; 2.25 0 44; 2.5 0 112; 2.75 0 46; 3 0 49; 3.25 0 31; 3.5 0 124; 3.75 0 35; 4 0 61; 4.25 0 28; 4.5 0 124; 4.75 0 30 } \ + {1 0 72; 1.25 0 33; 1.5 0 124; 1.75 0 27; 2 0 84; 2.25 0 35; 2.5 0 124; 2.75 0 34; 3 0 84; 3.25 0 44; 3.5 0 124; 3.75 0 46; 4 0 76; 4.25 0 38; 4.5 0 118; 4.75 0 34 } +End + +Begin Drum-Shaker + Tone Shaker + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 44; 1.5 0 55; 1.75 0 44; 2 0 39; 2.5 0 58; 2.75 0 28; 3 0 21; 3.5 0 60; 3.75 0 32; 4 0 34; 4.5 0 62; 4.75 0 24 } \ + {1 0 24; 1.5 0 60; 1.75 0 37; 2 0 37; 2.5 0 55; 2.75 0 34; 3 0 26; 3.5 0 56; 3.75 0 26; 4 0 29; 4.5 0 56; 4.75 0 34 } \ + {1 0 39; 1.5 0 64; 1.75 0 29; 2 0 26; 2.5 0 56; 2.75 0 37; 3 0 29; 3.5 0 58; 3.75 0 39; 4 0 37; 4.5 0 62; 4.75 0 25 } \ + {1 0 42; 1.5 0 58; 1.75 0 24; 2 0 32; 2.5 0 60; 2.75 0 32; 3 0 26; 3.5 0 56; 3.75 0 25; 4 0 25; 4.5 0 51; 4.75 0 32 } \ + {1 0 44; 1.5 0 55; 1.75 0 44; 2 0 39; 2.5 0 58; 2.75 0 28; 3 0 21; 3.5 0 60; 3.75 0 32; 4 0 34; 4.5 0 62; 4.75 0 24 } \ + {1 0 24; 1.5 0 60; 1.75 0 37; 2 0 37; 2.5 0 55; 2.75 0 34; 3 0 26; 3.5 0 56; 3.75 0 26; 4 0 29; 4.5 0 56; 4.75 0 34 } \ + {1 0 39; 1.5 0 64; 1.75 0 29; 2 0 26; 2.5 0 56; 2.75 0 37; 3 0 29; 3.5 0 58; 3.75 0 39; 4 0 37; 4.5 0 62; 4.75 0 25 } \ + {1 0 42; 1.5 0 58; 1.75 0 24; 2 0 32; 2.5 0 60; 2.75 0 32; 3 0 26; 3.5 0 56; 3.75 0 25; 4 0 25; 4.5 0 51; 4.75 0 32 } +End + +Begin Chord-9 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume P + Voicing Mode=Optimal + Articulate 100 + Octave 3 + Sequence {1 0 72; 1.5 0 26; 2 0 77; 2.5 0 40; 3 0 81; 3.5 0 40; 4 0 79; 4.5 0 43 } \ + {1 0 89; 1.5 0 40; 2 0 82; 2.5 0 45; 3 0 84; 3.5 0 53; 4 0 77; 4.5 0 48 } \ + {1 0 86; 1.5 0 31; 2 0 83; 2.5 0 50; 3 0 89; 3.5 0 35; 4 0 79; 4.5 0 33 } \ + {1 0 83; 1.5 0 48; 2 0 80; 2.5 0 53; 3 0 82; 3.5 0 40; 4 0 85; 4.5 0 48 } \ + {1 0 75; 1.5 0 26; 2 0 77; 2.5 0 40; 3 0 81; 3.5 0 40; 4 0 79; 4.5 0 43 } \ + {1 0 89; 1.5 0 40; 2 0 82; 2.5 0 45; 3 0 84; 3.5 0 53; 4 0 77; 4.5 0 48 } \ + {1 0 86; 1.5 0 31; 2 0 83; 2.5 0 50; 3 0 89; 3.5 0 35; 4 0 79; 4.5 0 33 } \ + {1 0 83; 1.5 0 48; 2 0 80; 2.5 0 53; 3 0 82; 3.5 0 40; 4 0 85; 4.5 0 48 } +End + +Begin Bass-11 + Voice FingeredBass + Rvolume 0 + Rtime 0 + Volume P + Octave 2 + Sequence {1 8 1 86; 1.75 32 1 78; 2 4 5 96; 3 8 1 93; 3.75 32 1 88; 4 4 5 93 } \ + {1 8 1 93; 1.75 32 1 81; 2 4 5 102; 3 8 1 91; 3.75 32 1 71; 4 4 5 96 } \ + {1 8 1 78; 1.75 32 1 63; 2 4 5 93; 3 8 1 83; 3.75 32 1 68; 4 4 5 96 } \ + {1 8 1 83; 1.75 32 1 76; 2 4 5 104; 3 8 1 93; 3.75 32 1 93; 4 16 5 98; 4.5 8 5 93 } \ + {1 8 1 88; 1.75 32 1 78; 2 4 5 96; 3 8 1 91; 3.75 32 1 73; 4 4 5 101 } \ + {1 8 1 86; 1.75 32 1 71; 2 4 5 99; 3 8 1 88; 3.75 32 1 78; 4 4 5 102 } \ + {1 8 1 88; 1.75 32 1 71; 2 4 5 101; 3 8 1 93; 3.75 32 1 88; 4 4 5 104 } \ + {1 8 1 91; 1.75 32 1 96; 2 4 5 101; 3 8 1 102; 3.75 32 1 86; 4 8 3 105; 4.5 8 5 81 } +End + +Begin Chord-12 + Voice SteelGuitar + Rvolume 0 + Rtime 0 + Volume PP + Voicing Mode=Optimal + Articulate 100 + Octave 4 + Sequence {1 32 76; 1.5 32 80; 2 8. 88; 2.75 32 82; 3.25 32 90; 3.75 32 84; 4 8 89; 4.5 32 81 } \ + {1 32 87; 1.5 32 91; 2 8. 95; 2.75 32 85; 3.25 32 92; 3.75 32 89; 4 8. 89; 4.5 32 79 } \ + {1 32 92; 1.5 32 93; 2 8. 96; 2.75 32 81; 3.25 32 91; 3.75 32 91; 4 8 89; 4.5 32 80 } \ + {1 32 95; 1.5 32 92; 2 8. 97; 2.75 32 81; 3.25 32 94; 3.75 32 93; 4 8 84; 4.5 32 83 } \ + {1 32 94; 1.5 32 91; 2 8. 96; 2.75 32 88; 3.25 32 92; 3.75 32 91; 4 8 92; 4.5 32 85 } \ + {1 32 94; 1.5 32 92; 2 8. 96; 2.75 32 86; 3.25 32 95; 3.75 32 85; 4 8 86; 4.5 32 79 } \ + {1 32 92; 1.5 32 90; 2 8. 94; 2.75 32 82; 3.25 32 92; 3.75 32 91; 4 8 88; 4.5 32 68 } \ + {1 8 97; 1.5 32 82; 1.75 32 86; 2.25 32 90; 2.75 32 96; 3.25 32 94; 3.75 32 92; 4 16 95; 4.5 32 94 } +End + +Begin Chord-15 + Voice Marimba + Rvolume 3 + Rtime 2 + Volume P + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1.5 32 89; 2 32 92; 3 32 88; 3.75 32 91 } \ + {1.5 32 89; 2 32 91; 3 32 90; 3.5 32 88; 3.75 32 88 } \ + {1.5 32 89; 2 32 90; 3 32 90; 3.75 32 91 } \ + {1.5 32 88; 2 32 90; 2.75 32 88; 3.25 32 89; 3.75 32 88; 4 32 88; 4.5 32 89 } \ + {1.5 32 88; 2 32 89; 3 32 90; 3.75 32 88 } \ + {1.5 32 89; 2 32 89; 3 32 88; 3.5 32 88; 3.75 32 89; 4.5 32 90 } \ + {1.5 32 89; 2 32 90; 3 32 89; 3.5 32 88; 3.75 32 89 } \ + {1.5 32 89; 2 32 89; 2.75 32 88; 3.25 32 88; 3.75 32 86; 4 32 90; 4.5 32 89 } +End + +DefGroove Main-A Steady Samba beat. + + +////////////////////// +/////// Fill-AA +SeqClear +SeqSize 1 + +Begin Drum-Tambourine + Tone Tambourine + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 88; 1.25 0 49; 1.5 0 118; 1.75 0 41; 2 0 68; 2.25 0 44; 2.5 0 118; 2.75 0 44; 3 0 124; 3.5 0 124; 4.25 0 112; 4.75 0 46 } +End + +Begin Drum-MuteHighConga + Tone MuteHighConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {4.75 0 44 } +End + +Begin Drum-OpenHighConga + Tone OpenHighConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 82; 1.5 0 70; 2.75 0 16; 3 0 70; 3.5 0 94 } +End + +Begin Drum-LowConga + Tone LowConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {2 0 93; 4.25 0 106 } +End + +Begin Drum-Shaker + Tone Shaker + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 44; 1.5 0 60; 1.75 0 26; 2 0 39; 2.5 0 55; 2.75 0 34; 3 0 42; 3.5 0 66; 4.25 0 51; 4.75 0 24 } +End + +Begin Chord-9 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume P + Voicing Mode=Optimal + Articulate 100 + Octave 3 + Sequence {1 0 86; 1.5 0 40; 2 0 85; 2.5 0 48; 3 0 72; 3.5 0 70; 4.25 0 76; 4.75 0 43 } +End + +Begin Bass-11 + Voice FingeredBass + Rvolume 0 + Rtime 0 + Volume P + Octave 2 + Sequence {1 8 1 86; 1.75 32 1 48; 2 8. 5 93; 3 32 1 93; 3.5 16 1 102; 4.25 32 1 108; 4.75 32 1 127 } +End + +Begin Chord-13 + Voice CleanGuitar + Rvolume 0 + Rtime 0 + Volume P + Voicing Mode=Optimal + Articulate 100 + Octave 4 + Sequence {1 32 71; 1.5 32 59; 2 8. 84; 3 32 82; 3.5 32 91; 4.25 32 80; 4.75 32 102 } +End + +Begin Chord-15 + Voice Marimba + Rvolume 0 + Rtime 0 + Volume P + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1 32 94; 1.5 32 93; 2 32 94; 3 32 95; 3.5 32 94; 4.25 32 97; 4.75 32 95 } +End + +DefGroove Fill-AA Good fill for repeats with Main-A. + + +////////////////////// +/////// Intro-A +SeqClear +SeqSize 1 + +Begin Drum-Tambourine + Tone Tambourine + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 112 } +End + +Begin Drum-MuteHighConga + Tone MuteHighConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 120 } +End + +Begin Drum-Shaker + Tone Shaker + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 56 } +End + +Begin Chord-9 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume P + Voicing Mode=Optimal + Articulate 100 + Octave 3 + Sequence {1 0 96; 3 0 73; 3.75 0 73; 4 0 84; 4.5 0 55; 4.75 0 60 } +End + +Begin Bass-11 + Voice FingeredBass + Rvolume 0 + Rtime 0 + Volume P + Octave 3 + Sequence {1 8. 1 118 } +End + +Begin Chord-12 + Voice SteelGuitar + Rvolume 0 + Rtime 0 + Volume PP + Voicing Mode=Optimal + Articulate 100 + Octave 4 + Sequence {1 8. 99 } +End + +Begin Chord-15 + Voice Marimba + Rvolume 0 + Rtime 0 + Volume P + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1 8 95 } +End + +Begin Chord-16 + Voice BrassSection + Rvolume 0 + Rtime 0 + Volume P + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1 16 122 } +End + +DefGroove Intro-A A one bar intro with a heavy hit on beat 1. + + +////////////////////// +/////// Ending-A +SeqClear +SeqSize 2 + +Begin Drum-Tambourine + Tone Tambourine + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 88; 1.25 0 51; 1.5 0 124; 1.75 0 46; 2 0 72; 2.25 0 34; 2.5 0 112; 2.75 0 46; 3 0 51; 3.25 0 35; 3.5 0 118; 3.75 0 41; 4 0 49; 4.26 0 39; 4.51 0 112; 4.76 0 53 } \ + {1.01 0 124; 1.51 0 124; 2.26 0 108; 2.76 0 53; 3.01 0 102 } +End + +Begin Drum-MuteHighConga + Tone MuteHighConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {4.51 0 87 } z +End + +Begin Drum-OpenHighConga + Tone OpenHighConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 88; 1.5 0 82; 2.75 0 88; 3.25 0 82; 3.75 0 76 } \ + {1.01 0 100; 1.51 0 110; 2.76 0 70 } +End + +Begin Drum-LowConga + Tone LowConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {2 0 106; 4.01 0 67; 4.26 0 64 } \ + {2.26 0 120; 3.01 0 82 } +End + +Begin Drum-Shaker + Tone Shaker + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1.03 0 56; 1.5 0 56; 1.75 0 39; 2 0 44; 2.5 0 55; 2.75 0 26; 3 0 32; 3.5 0 58; 3.75 0 34; 4.01 0 26; 4.26 0 29; 4.51 0 55; 4.76 0 42 } \ + {1.01 0 66; 1.51 0 64; 2.26 0 60; 2.76 0 55; 3.01 0 64; 4.01 0 44 } +End + +Begin Chord-9 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume P + Voicing Mode=Optimal + Articulate 100 + Octave 3 + Sequence {1 0 73; 1.03 0 75; 1.5 0 43; 2 0 76; 2.5 0 53; 3 0 92; 3.01 0 87; 3.51 0 53; 4.01 0 67; 4.51 0 67 } \ + {1.01 0 67; 1.51 0 72; 2.26 0 74; 2.76 0 55; 3.01 0 73; 3.76 0 62; 3.9 0 56; 4.01 0 61 } +End + +Begin Bass-11 + Voice FingeredBass + Rvolume 0 + Rtime 0 + Volume P + Octave 2 + Sequence {1 8 2 105; 1.75 32 2 101; 2 8. 5 113; 3 8 2 112; 3.75 32 2 115; 4 8. 5 118 } \ + {1 32 1 118; 1.5 16 1 118; 2.25 16 1 124; 2.75 32 1 127; 3 16 1 127 } +End + +Begin Chord-12 + Voice SteelGuitar + Rvolume 0 + Rtime 0 + Volume PP + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1 32 95; 1.5 32 96; 2 8 96; 2.75 32 95; 3.25 32 97; 3.75 32 97; 4 32 89; 4.5 32 95 } \ + {1 4. 97 } +End + +Begin Chord-15 + Voice Marimba + Rvolume 0 + Rtime 0 + Volume P + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1 32 91; 1.5 32 89; 2 32 91; 2.75 32 91; 3.25 32 90; 3.75 32 89; 4 32 90; 4.5 32 90 } \ + {1 32 92; 1.5 32 93; 2.25 32 92; 2.75 32 93; 3 32 95 } +End + +Begin Chord-16 + Voice BrassSection + Rvolume 0 + Rtime 0 + Volume P + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1 8. 108; 2 16 109; 2.75 32 102; 3.25 32 94; 3.75 32 105; 4 32 107; 4.5 32 105 } \ + {1 32 112; 1.5 32 111; 2.25 32 108; 2.75 32 113; 3 32 115 } +End + +DefGroove Ending-A Good ending to go with Main-A. + + +////////////////////// +/////// Main-B +SeqClear +SeqSize 8 + +Begin Drum-Tambourine + Tone Tambourine + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 51; 1.25 0 30; 1.5 0 118; 1.75 0 44; 2 0 51; 2.25 0 35; 2.5 0 118; 2.75 0 35; 3 0 51; 3.25 0 33; 3.5 0 118; 3.75 0 33; 4 0 51; 4.25 0 39; 4.5 0 124; 4.75 0 44 } \ + {1 0 76; 1.25 0 46; 1.5 0 124; 1.75 0 49; 2 0 88; 2.25 0 39; 2.5 0 124; 2.75 0 44; 3 0 56; 3.25 0 46; 3.5 0 124; 3.75 0 46; 4 0 61; 4.25 0 49; 4.5 0 124; 4.75 0 22 } \ + {1 0 72; 1.25 0 49; 1.5 0 124; 1.75 0 35; 2 0 72; 2.25 0 44; 2.5 0 112; 2.75 0 46; 3 0 49; 3.25 0 31; 3.5 0 124; 3.75 0 35; 4 0 61; 4.25 0 28; 4.5 0 124; 4.75 0 30 } \ + {1 0 72; 1.25 0 33; 1.5 0 124; 1.75 0 27; 2 0 84; 2.25 0 35; 2.5 0 124; 2.75 0 34; 3 0 84; 3.25 0 44; 3.5 0 124; 3.75 0 46; 4 0 76; 4.25 0 38; 4.5 0 118; 4.75 0 34 } \ + {1 0 51; 1.25 0 30; 1.5 0 118; 1.75 0 44; 2 0 51; 2.25 0 35; 2.5 0 118; 2.75 0 35; 3 0 51; 3.25 0 33; 3.5 0 118; 3.75 0 33; 4 0 51; 4.25 0 39; 4.5 0 124; 4.75 0 44 } \ + {1 0 76; 1.25 0 46; 1.5 0 124; 1.75 0 49; 2 0 88; 2.25 0 39; 2.5 0 124; 2.75 0 44; 3 0 56; 3.25 0 46; 3.5 0 124; 3.75 0 46; 4 0 61; 4.25 0 49; 4.5 0 124; 4.75 0 22 } \ + {1 0 72; 1.25 0 49; 1.5 0 124; 1.75 0 35; 2 0 72; 2.25 0 44; 2.5 0 112; 2.75 0 46; 3 0 49; 3.25 0 31; 3.5 0 124; 3.75 0 35; 4 0 61; 4.25 0 28; 4.5 0 124; 4.75 0 30 } \ + {1 0 72; 1.25 0 33; 1.5 0 124; 1.75 0 27; 2 0 84; 2.25 0 35; 2.5 0 124; 2.75 0 34; 3 0 84; 3.25 0 44; 3.5 0 124; 3.75 0 46; 4 0 76; 4.25 0 38; 4.5 0 118; 4.75 0 34 } +End + +Begin Drum-MuteHighConga + Tone MuteHighConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {4.5 0 79 } \ + {4.5 0 101 } \ + {4.5 0 91 } \ + {2 0 39; 4.5 0 101 } \ + {4.5 0 79 } \ + {4.5 0 101 } \ + {4.5 0 91 } \ + {2 0 39; 4.5 0 101 } +End + +Begin Drum-Shaker + Tone Shaker + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 44; 1.5 0 55; 1.75 0 44; 2 0 39; 2.5 0 58; 2.75 0 28; 3 0 21; 3.5 0 60; 3.75 0 32; 4 0 34; 4.5 0 62; 4.75 0 24 } \ + {1 0 24; 1.5 0 60; 1.75 0 37; 2 0 37; 2.5 0 55; 2.75 0 34; 3 0 26; 3.5 0 56; 3.75 0 26; 4 0 29; 4.5 0 56; 4.75 0 34 } \ + {1 0 39; 1.5 0 64; 1.75 0 29; 2 0 26; 2.5 0 56; 2.75 0 37; 3 0 29; 3.5 0 58; 3.75 0 39; 4 0 37; 4.5 0 62; 4.75 0 25 } \ + {1 0 42; 1.5 0 58; 1.75 0 24; 2 0 32; 2.5 0 60; 2.75 0 32; 3 0 26; 3.5 0 56; 3.75 0 25; 4 0 25; 4.5 0 51; 4.75 0 32 } \ + {1 0 44; 1.5 0 55; 1.75 0 44; 2 0 39; 2.5 0 58; 2.75 0 28; 3 0 21; 3.5 0 60; 3.75 0 32; 4 0 34; 4.5 0 62; 4.75 0 24 } \ + {1 0 24; 1.5 0 60; 1.75 0 37; 2 0 37; 2.5 0 55; 2.75 0 34; 3 0 26; 3.5 0 56; 3.75 0 26; 4 0 29; 4.5 0 56; 4.75 0 34 } \ + {1 0 39; 1.5 0 64; 1.75 0 29; 2 0 26; 2.5 0 56; 2.75 0 37; 3 0 29; 3.5 0 58; 3.75 0 39; 4 0 37; 4.5 0 62; 4.75 0 25 } \ + {1 0 42; 1.5 0 58; 1.75 0 24; 2 0 32; 2.5 0 60; 2.75 0 32; 3 0 26; 3.5 0 56; 3.75 0 25; 4 0 25; 4.5 0 51; 4.75 0 32 } +End + +Begin Chord-9 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume P + Voicing Mode=Optimal + Articulate 100 + Octave 3 + Sequence {1 0 72; 1.5 0 26; 2 0 77; 2.5 0 40; 3 0 81; 3.5 0 40; 4 0 79; 4.5 0 43 } \ + {1 0 89; 1.5 0 40; 2 0 82; 2.5 0 45; 3 0 84; 3.5 0 53; 4 0 77; 4.5 0 48 } \ + {1 0 86; 1.5 0 31; 2 0 83; 2.5 0 50; 3 0 89; 3.5 0 35; 4 0 79; 4.5 0 33 } \ + {1 0 83; 1.5 0 48; 2 0 80; 2.5 0 53; 3 0 82; 3.5 0 40; 4 0 85; 4.5 0 48 } \ + {1 0 75; 1.5 0 26; 2 0 77; 2.5 0 40; 3 0 81; 3.5 0 40; 4 0 79; 4.5 0 43 } \ + {1 0 89; 1.5 0 40; 2 0 82; 2.5 0 45; 3 0 84; 3.5 0 53; 4 0 77; 4.5 0 48 } \ + {1 0 86; 1.5 0 31; 2 0 83; 2.5 0 50; 3 0 89; 3.5 0 35; 4 0 79; 4.5 0 33 } \ + {1 0 83; 1.5 0 48; 2 0 80; 2.5 0 53; 3 0 82; 3.5 0 40; 4 0 85; 4.5 0 48 } +End + +Begin Bass-11 + Voice FingeredBass + Rvolume 0 + Rtime 0 + Volume P + Octave 2 + Sequence {1 8 1 86; 1.75 32 1 78; 2 4 5 96; 3 8 1 93; 3.75 32 1 88; 4 4 5 93 } \ + {1 8 1 93; 1.75 32 1 81; 2 4 5 102; 3 8 1 91; 3.75 32 1 71; 4 4 5 96 } \ + {1 8 1 78; 1.75 32 1 63; 2 4 5 93; 3 8 1 83; 3.75 32 1 68; 4 4 5 96 } \ + {1 8 1 83; 1.75 32 1 76; 2 4 5 104; 3 8 1 93; 3.75 32 1 93; 4 16 5 98; 4.5 8 5 93 } \ + {1 8 1 88; 1.75 32 1 78; 2 4 5 96; 3 8 1 91; 3.75 32 1 73; 4 4 5 101 } \ + {1 8 1 86; 1.75 32 1 71; 2 4 5 99; 3 8 1 88; 3.75 32 1 78; 4 4 5 102 } \ + {1 8 1 88; 1.75 32 1 71; 2 4 5 101; 3 8 1 93; 3.75 32 1 88; 4 4 5 104 } \ + {1 8 1 91; 1.75 32 1 96; 2 4 5 101; 3 8 1 102; 3.75 32 1 86; 4 8 3 105; 4.5 8 5 81 } +End + +Begin Chord-12 + Voice SteelGuitar + Rvolume 0 + Rtime 0 + Volume PP + Voicing Mode=Optimal + Articulate 100 + Octave 4 + Sequence {1 32 76; 1.5 32 80; 2 8. 88; 2.75 32 82; 3.25 32 90; 3.75 32 84; 4 8 89; 4.5 32 81 } \ + {1 32 87; 1.5 32 91; 2 8. 95; 2.75 32 85; 3.25 32 92; 3.75 32 89; 4 8. 89; 4.5 32 79 } \ + {1 32 92; 1.5 32 93; 2 8. 96; 2.75 32 81; 3.25 32 91; 3.75 32 91; 4 8 89; 4.5 32 80 } \ + {1 32 95; 1.5 32 92; 2 8. 97; 2.75 32 81; 3.25 32 94; 3.75 32 93; 4 8 84; 4.5 32 83 } \ + {1 32 94; 1.5 32 91; 2 8. 96; 2.75 32 88; 3.25 32 92; 3.75 32 91; 4 8 92; 4.5 32 85 } \ + {1 32 94; 1.5 32 92; 2 8. 96; 2.75 32 86; 3.25 32 95; 3.75 32 85; 4 8 86; 4.5 32 79 } \ + {1 32 92; 1.5 32 90; 2 8. 94; 2.75 32 82; 3.25 32 92; 3.75 32 91; 4 8 88; 4.5 32 68 } \ + {1 8 97; 1.5 32 82; 1.75 32 86; 2.25 32 90; 2.75 32 96; 3.25 32 94; 3.75 32 92; 4 16 95; 4.5 32 94 } +End + +Begin Chord-15 + Voice Marimba + Rvolume 0 + Rtime 0 + Volume P + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1.5 32 89; 2 32 92; 3 32 88; 3.75 32 91 } \ + {1.5 32 89; 2 32 91; 3 32 90; 3.5 32 88; 3.75 32 88 } \ + {1.5 32 89; 2 32 90; 3 32 90; 3.75 32 91 } \ + {1.5 32 88; 2 32 90; 2.75 32 88; 3.25 32 89; 3.75 32 88; 4 32 88; 4.5 32 89 } \ + {1.5 32 88; 2 32 89; 3 32 90; 3.75 32 88 } \ + {1.5 32 89; 2 32 89; 3 32 88; 3.5 32 88; 3.75 32 89; 4.5 32 90 } \ + {1.5 32 89; 2 32 90; 3 32 89; 3.5 32 88; 3.75 32 89 } \ + {1.5 32 89; 2 32 89; 2.75 32 88; 3.25 32 88; 3.75 32 86; 4 32 90; 4.5 32 89 } +End + +Begin Chord-16 + Voice BrassSection + Rvolume 0 + Rtime 0 + Volume P + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1 1 90 } \ + {1 1 92 } \ + {1 1 90 } \ + {1 1 89 } \ + {1 1 80 } \ + {1 1 81 } \ + {1 1 80 } \ + {1 1 93 } +End + +DefGroove Main-B Adds horn section to Main-A. + + +////////////////////// +/////// Fill-BB +SeqClear +SeqSize 1 + +Begin Drum-Tambourine + Tone Tambourine + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 88; 1.25 0 49; 1.5 0 118; 1.75 0 41; 2 0 68; 2.25 0 44; 2.5 0 118; 2.75 0 44; 3 0 124; 3.5 0 124; 4.25 0 112; 4.75 0 46 } +End + +Begin Drum-MuteHighConga + Tone MuteHighConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {4.75 0 44 } +End + +Begin Drum-OpenHighConga + Tone OpenHighConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 82; 1.5 0 70; 2.75 0 16; 3 0 70; 3.5 0 94 } +End + +Begin Drum-LowConga + Tone LowConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {2 0 93; 4.25 0 106 } +End + +Begin Drum-Shaker + Tone Shaker + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 44; 1.5 0 60; 1.75 0 26; 2 0 39; 2.5 0 55; 2.75 0 34; 3 0 42; 3.5 0 66; 4.25 0 51; 4.75 0 24 } +End + +Begin Chord-9 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume P + Voicing Mode=Optimal + Articulate 100 + Octave 3 + Sequence {1 0 86; 1.5 0 40; 2 0 85; 2.5 0 48; 3 0 72; 3.5 0 70; 4.25 0 76; 4.75 0 43 } +End + +Begin Bass-11 + Voice FingeredBass + Rvolume 0 + Rtime 0 + Volume P + Octave 2 + Sequence {1 8 1 86; 1.75 32 1 48; 2 8. 5 93; 3 32 1 93; 3.5 16 1 102; 4.25 32 1 108; 4.75 32 1 127 } +End + +Begin Chord-13 + Voice CleanGuitar + Rvolume 0 + Rtime 0 + Volume P + Voicing Mode=Optimal + Articulate 100 + Octave 4 + Sequence {1 32 71; 1.5 32 59; 2 8. 84; 3 32 82; 3.5 32 91; 4.25 32 80; 4.75 32 102 } +End + +Begin Chord-15 + Voice Marimba + Rvolume 0 + Rtime 0 + Volume P + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1 32 94; 1.5 32 93; 2 32 94; 3 32 95; 3.5 32 94; 4.25 32 97; 4.75 32 95 } +End + +Begin Chord-16 + Voice BrassSection + Rvolume 0 + Rtime 0 + Volume P + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1 32 102; 1.5 32 96; 2 32 114; 3 32 105; 3.5 32 108; 4.25 32 112; 4.75 32 121 } +End + +DefGroove Fill-BB Fill for Main-B. + + +////////////////////// +/////// Fill-BA +SeqClear +SeqSize 1 + +Begin Drum-Tambourine + Tone Tambourine + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 88; 1.25 0 49; 1.5 0 118; 1.75 0 41; 2 0 68; 2.25 0 44; 2.5 0 118; 2.75 0 44; 3 0 124; 3.5 0 124; 4.25 0 112; 4.75 0 46 } +End + +Begin Drum-MuteHighConga + Tone MuteHighConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {4.75 0 44 } +End + +Begin Drum-OpenHighConga + Tone OpenHighConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 82; 1.5 0 70; 2.75 0 16; 3 0 70; 3.5 0 94 } +End + +Begin Drum-LowConga + Tone LowConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {2 0 93; 4.25 0 106 } +End + +Begin Drum-Shaker + Tone Shaker + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 44; 1.5 0 60; 1.75 0 26; 2 0 39; 2.5 0 55; 2.75 0 34; 3 0 42; 3.5 0 66; 4.25 0 51; 4.75 0 24 } +End + +Begin Chord-9 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume P + Voicing Mode=Optimal + Articulate 100 + Octave 3 + Sequence {1 0 86; 1.5 0 40; 2 0 85; 2.5 0 48; 3 0 72; 3.5 0 70; 4.25 0 76; 4.75 0 43 } +End + +Begin Bass-11 + Voice FingeredBass + Rvolume 0 + Rtime 0 + Volume P + Octave 2 + Sequence {1 8 1 86; 1.75 32 1 48; 2 8. 5 93; 3 32 1 93; 3.5 16 1 102; 4.25 32 1 108; 4.75 32 1 127 } +End + +Begin Chord-13 + Voice CleanGuitar + Rvolume 0 + Rtime 0 + Volume P + Voicing Mode=Optimal + Articulate 100 + Octave 4 + Sequence {1 32 71; 1.5 32 59; 2 8. 84; 3 32 82; 3.5 32 91; 4.25 32 80; 4.75 32 102 } +End + +Begin Chord-15 + Voice Marimba + Rvolume 0 + Rtime 0 + Volume P + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1 32 94; 1.5 32 93; 2 32 94; 3 32 95; 3.5 32 94; 4.25 32 97; 4.75 32 95 } +End + +Begin Chord-16 + Voice BrassSection + Rvolume 0 + Rtime 0 + Volume P + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1 32 102; 1.5 32 96; 2 32 114; 3 32 105; 3.5 32 108; 4.25 32 112; 4.75 32 121 } +End + +DefGroove Fill-BA Simple fill with horns. + + +////////////////////// +/////// Intro-B +SeqClear +SeqSize 8 + +Begin Drum-Tambourine + Tone Tambourine + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 51; 1.25 0 38; 1.5 0 94; 1.75 0 39; 2 0 30; 2.25 0 30; 2.5 0 108; 3 0 41; 3.25 0 34; 3.5 0 112; 3.75 0 31; 4 0 46; 4.25 0 34; 4.5 0 118; 4.75 0 35 } \ + {1 0 46; 1.25 0 44; 1.5 0 118; 1.75 0 30; 2 0 68; 2.25 0 34; 2.5 0 112; 2.75 0 41; 3 0 68; 3.25 0 44; 3.5 0 124; 3.75 0 41; 4 0 80; 4.25 0 49; 4.5 0 124; 4.75 0 68 } \ + {1 0 76; 1.25 0 30; 1.5 0 118; 1.75 0 36; 2 0 61; 2.25 0 51; 2.5 0 124; 2.75 0 34; 3 0 46; 3.25 0 49; 3.5 0 124; 3.75 0 41; 4 0 84; 4.25 0 25; 4.5 0 124; 4.75 0 28 } \ + {1 0 72; 1.25 0 25; 1.5 0 124; 1.75 0 33; 2 0 58; 2.25 0 34; 2.5 0 118; 2.75 0 28; 3 0 56; 3.25 0 33; 3.5 0 118; 3.75 0 33; 4 0 61; 4.25 0 29; 4.5 0 124; 4.75 0 44 } \ + {1 0 68; 1.25 0 29; 1.5 0 118; 1.75 0 34; 2 0 49; 2.25 0 35; 2.5 0 118; 2.75 0 28; 3 0 49; 3.25 0 30; 3.5 0 124; 3.75 0 28; 4 0 53; 4.25 0 18; 4.5 0 124; 4.75 0 44 } \ + {1 0 53; 1.25 0 44; 1.5 0 124; 1.75 0 39; 2 0 61; 2.25 0 44; 2.5 0 124; 2.75 0 29; 3 0 72; 3.25 0 33; 3.5 0 124; 3.75 0 36; 4 0 76; 4.25 0 36; 4.5 0 124; 4.75 0 35 } \ + {1 0 68; 1.25 0 30; 1.5 0 124; 1.75 0 28; 2 0 44; 2.25 0 31; 2.5 0 124; 2.75 0 30; 3 0 112; 3.5 0 112; 4.25 0 124; 4.75 0 56 } \ + {1 0 124 } +End + +Begin Drum-MuteHighConga + Tone MuteHighConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {4.5 0 101 } \ + {4.5 0 96 } \ + {4.5 0 72 } \ + {4.5 0 79 } \ + {4.5 0 84 } \ + {4.5 0 120 } \ + {4.75 0 106 } z +End + +Begin Drum-OpenHighConga + Tone OpenHighConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 64; 1.5 0 64; 2.75 0 76; 3.25 0 76; 3.75 0 64 } \ + {1 0 64; 1.5 0 56; 2.75 0 59; 3.25 0 59; 3.75 0 59 } \ + {1 0 64; 1.5 0 64; 2.75 0 59; 3.25 0 62; 3.75 0 62 } \ + {1 0 64; 1.5 0 62; 2.75 0 64; 3.25 0 64; 3.75 0 40 } \ + {1 0 62; 1.5 0 56; 2.75 0 62; 3.25 0 62; 3.75 0 47 } \ + {1 0 70; 1.5 0 59; 2.75 0 64; 3.25 0 70; 3.75 0 59 } \ + {1 0 70; 1.5 0 88; 3 0 88; 3.5 0 88 } \ + {1 0 94 } +End + +Begin Drum-LowConga + Tone LowConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {2 0 82; 4 0 100 } \ + {2 0 93; 4 0 68 } \ + {2 0 93; 4 0 68; 4.25 0 63 } \ + {2 0 82; 4 0 58; 4.25 0 68 } \ + {2 0 93; 4 0 61; 4.25 0 65 } \ + {2 0 93; 4 0 86 } \ + {2 0 106; 4.25 0 106 } z +End + +Begin Drum-Shaker + Tone Shaker + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 37; 1.5 0 51; 1.75 0 34; 2 0 24; 2.5 0 55; 2.75 0 23; 3 0 25; 3.5 0 58; 3.75 0 21; 4 0 20; 4.5 0 58; 4.75 0 26 } \ + {1 0 26; 1.5 0 55; 1.75 0 18; 2 0 24; 2.5 0 55; 2.75 0 20; 3 0 25; 3.5 0 47; 3.75 0 24; 4 0 20; 4.5 0 58; 4.75 0 23 } \ + {1 0 20; 1.5 0 49; 1.75 0 24; 2 0 18; 2.5 0 49; 2.75 0 20; 3 0 18; 3.5 0 49; 3.75 0 25; 4 0 29; 4.5 0 47; 4.75 0 15 } \ + {1 0 25; 1.5 0 53; 1.75 0 20; 2 0 25; 2.5 0 49; 2.75 0 24; 3 0 15; 3.5 0 49; 3.75 0 21; 4 0 18; 4.25 0 18; 4.5 0 45 } \ + {1 0 28; 1.5 0 51; 1.75 0 32; 2 0 20; 2.5 0 45; 2.75 0 26; 3 0 42; 3.5 0 51; 3.75 0 34; 4 0 26; 4.5 0 58; 4.75 0 23 } \ + {1 0 24; 1.5 0 60; 1.75 0 25; 2 0 28; 2.5 0 51; 2.75 0 26; 3 0 37; 3.5 0 58; 3.75 0 28; 4 0 23; 4.25 0 37; 4.5 0 58 } \ + {1 0 45; 1.5 0 58; 1.75 0 28; 2 0 42; 2.5 0 58; 2.75 0 29; 3 0 44; 3.5 0 60; 4.25 0 51; 4.75 0 32 } \ + {1 0 56 } +End + +Begin Chord-9 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume P + Voicing Mode=Optimal + Articulate 100 + Octave 3 + Sequence {1 0 83; 1.5 0 18; 2 0 74; 2.5 0 15; 3 0 70; 3.5 0 35; 4 0 76; 4.5 0 29 } \ + {1 0 86; 1.5 0 43; 2 0 77; 2.5 0 31; 3 0 75; 3.5 0 43; 4 0 67; 4.5 0 40 } \ + {1 0 87; 1.5 0 48; 2 0 72; 2.5 0 67; 3 0 84; 3.5 0 43; 4 0 75; 4.5 0 30 } \ + {1 0 78; 1.5 0 45; 2 0 76; 2.5 0 48; 3 0 85; 3.5 0 48; 4 0 75; 4.5 0 40 } \ + {1 0 60; 1.5 0 26; 2 0 76; 2.5 0 35; 3 0 78; 3.5 0 40; 4 0 82; 4.5 0 43 } \ + {1 0 82; 1.5 0 45; 2 0 79; 2.5 0 45; 3 0 80; 3.5 0 45; 4 0 77; 4.5 0 53 } \ + {1 0 89; 1.5 0 43; 2 0 68; 2.5 0 50; 3 0 55; 3.5 0 67; 4.25 0 72; 4.75 0 32 } \ + {1 0 82; 3 0 52; 3.5 0 56; 4 0 66; 4.5 0 73; 4.75 0 55 } +End + +Begin Bass-11 + Voice FingeredBass + Rvolume 0 + Rtime 0 + Volume P + Octave 2 + Sequence {1 8. 2 93; 2 8. 5 107; 3 8. 2 102; 4 8. 5 102 } \ + {1 8. 2 102; 2 8. 5 107; 3 8. 2 101; 4 8. 5 105 } \ + {1 8. 1 88; 2 8. 5 99; 3 8. 1 78; 4 8. 5 93 } \ + {1 8. 1 86; 2 8. 5 101; 3 8 1 99; 3.75 32 3 101; 4 8 5 61; 4.5 8 3 105 } \ + {1 8. 2 96; 2 8. 5 96; 3 8. 2 107; 4 8. 5 108 } \ + {1 4 2 99; 2 4 5 104; 3 8. 2 107; 4 4 5 105 } \ + {1 4 1 104; 2 8. 5 108; 3 32 1 108; 3.5 16 1 108; 4.25 32 1 112; 4.75 32 1 115 } \ + {1 16 1 118; 3.75 32 1 96; 4 16 1 118; 4.5 16 1 102 } +End + +Begin Chord-12 + Voice SteelGuitar + Rvolume 0 + Rtime 0 + Volume PP + Voicing Mode=Optimal + Articulate 100 + Octave 4 + Sequence {1 32 95; 1.5 32 88; 2 8 92; 2.75 32 88; 3.25 32 87; 3.75 32 89; 4 16 87; 4.5 32 89 } \ + {1 32 95; 1.5 32 93; 2 8 93; 2.75 32 91; 3.25 32 89; 3.75 32 91; 4 32 85; 4.5 32 91 } \ + {1 32 90; 1.5 32 89; 2 8 96; 2.75 32 81; 3.25 32 89; 3.75 32 88; 4 32 88; 4.5 32 95 } \ + {1 32 91; 1.5 32 89; 2 8 97; 2.75 32 84; 3.25 32 88; 3.75 32 89; 4 32 93; 4.5 32 93 } \ + {1 32 93; 1.5 32 91; 2 8 93; 2.75 32 90; 3.25 32 90; 3.75 32 92; 4 32 82; 4.5 32 91 } \ + {1 32 92; 1.5 32 91; 2 8 90; 2.75 32 81; 3.25 16 87; 3.75 32 90; 4 32 85; 4.5 32 88 } \ + {1 32 92; 1.5 32 89; 2 8 93; 3 32 93; 3.5 16 94; 4.25 16 96; 4.75 32 84 } \ + {1 32 93; 3.75 32 81; 4 32 83; 4.5 32 98 } +End + +Begin Chord-15 + Voice Marimba + Rvolume 0 + Rtime 0 + Volume P + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1 32 93; 1.5 32 90; 2 32 91; 2.5 32 90; 2.75 32 90; 3.25 32 91; 3.75 32 89; 4 32 91; 4.5 32 90 } \ + {1 32 89; 1.5 32 89; 2 32 89; 2.5 32 90; 2.75 32 90; 3.25 32 92; 3.75 32 90; 4 32 90; 4.5 32 90 } \ + {1 32 89; 1.5 32 88; 2 32 92; 2.5 32 88; 2.75 32 88; 3.25 32 91; 3.75 32 91; 4 32 90; 4.5 32 90 } \ + {1 32 91; 1.5 32 88; 2 32 91; 2.5 32 89; 2.75 32 88; 3.25 32 91; 3.75 32 89; 4 32 89; 4.5 32 89 } \ + {1 32 89; 1.5 32 90; 2 32 89; 2.5 32 89; 2.75 32 89; 3.25 32 90; 3.75 32 90; 4 32 89; 4.5 32 89 } \ + {1 32 90; 1.5 32 89; 2 32 91; 2.5 32 87; 2.75 32 89; 3.25 32 91; 3.75 32 90; 4 32 89; 4.5 32 91 } \ + {1 32 90 } \ + {3.75 32 90; 4 32 89; 4.5 32 89 } +End + +Begin Chord-16 + Voice BrassSection + Rvolume 0 + Rtime 0 + Volume P + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1 32 98; 1.5 32 86; 2 8 96; 2.75 32 82; 3.25 32 91; 3.75 32 94; 4 32 91; 4.5 32 90 } \ + {1 32 97; 1.5 32 92; 2 8 89; 2.75 32 85; 3.25 32 92; 3.75 32 89; 4 32 90; 4.5 32 93 } \ + {1 32 97; 1.5 32 88; 2 8 89; 2.75 32 81; 3.25 32 83; 3.75 32 87; 4 32 86; 4.5 32 90 } \ + {1 32 95; 1.5 32 93; 2 8 94; 2.75 32 96; 3.25 32 90; 3.75 32 100; 4 32 81; 4.5 32 93 } \ + {1 32 103; 1.5 32 99; 2 8 92; 2.75 32 89; 3.25 32 99; 3.75 32 98; 4 32 89; 4.5 32 94 } \ + {1 32 99; 1.5 32 95; 2 8 92; 2.75 32 86; 3.25 32 97; 3.75 32 93; 4 32 89; 4.5 32 87 } \ + {1 32 95; 1.5 32 90; 2 8 90; 3 32 100; 3.5 32 100; 4.25 32 99; 4.75 32 103 } \ + {1 32 106; 3.75 32 93; 4 32 95; 4.5 32 112 } +End + +DefGroove Intro-B This is an 8 bar introduction. The first 6 bars are a just \ + a Main-A, but bars 7 and 8 have the anticipated hits. + + +////////////////////// +/////// Ending-B +SeqClear +SeqSize 8 + +Begin Drum-Tambourine + Tone Tambourine + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 76; 1.25 0 58; 1.5 0 112; 1.75 0 46; 2 0 53; 2.25 0 31; 2.5 0 124; 2.75 0 35; 3 0 51; 3.25 0 30; 3.5 0 124; 3.75 0 49; 4 0 49; 4.25 0 27; 4.5 0 124; 4.75 0 33 } \ + {1 0 68; 1.25 0 33; 1.5 0 124; 1.75 0 34; 2 0 72; 2.25 0 34; 2.5 0 124; 2.75 0 31; 3 0 58; 3.25 0 25; 3.5 0 124; 3.75 0 33; 4 0 56; 4.25 0 34; 4.5 0 124; 4.75 0 35 } \ + {1 0 61; 1.25 0 29; 1.5 0 124; 1.75 0 35; 2 0 61; 2.25 0 31; 2.5 0 118; 2.75 0 39; 3 0 51; 3.25 0 39; 3.5 0 118; 3.75 0 39; 4 0 61; 4.25 0 36; 4.5 0 118; 4.75 0 38 } \ + {1 0 68; 1.25 0 33; 1.5 0 124; 1.75 0 30; 2 0 61; 2.25 0 31; 2.5 0 124; 2.75 0 39; 3 0 58; 3.25 0 41; 3.5 0 118; 3.75 0 35; 4 0 61; 4.25 0 39; 4.5 0 124; 4.75 0 34 } \ + {1 0 80; 1.25 0 33; 1.5 0 112; 1.75 0 38; 2 0 98; 2.25 0 28; 2.5 0 124; 2.75 0 46; 3 0 53; 3.25 0 46; 3.5 0 124; 3.75 0 46; 4 0 72; 4.25 0 34; 4.5 0 124; 4.75 0 34 } \ + {1 0 76; 1.25 0 44; 1.5 0 124; 1.75 0 34; 2 0 72; 2.25 0 31; 2.5 0 124; 2.75 0 31; 3 0 76; 3.25 0 39; 3.5 0 124; 3.75 0 38; 4 0 61; 4.25 0 53; 4.5 0 118; 4.75 0 46 } \ + {1 0 88; 1.25 0 51; 1.5 0 124; 1.75 0 46; 2 0 72; 2.25 0 34; 2.5 0 112; 2.75 0 46; 3 0 51; 3.25 0 35; 3.5 0 118; 3.75 0 41; 4 0 49; 4.25 0 39; 4.5 0 112; 4.75 0 53 } \ + {1 0 124; 1.5 0 124; 2.25 0 108; 2.75 0 53; 3 0 102 } +End + +Begin Drum-MuteHighConga + Tone MuteHighConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {4.5 0 54 } \ + {4.5 0 91 } \ + {4.5 0 79 } \ + {4.5 0 91 } \ + {4.5 0 91 } \ + {4.5 0 84 } \ + {4.5 0 87 } z +End + +Begin Drum-OpenHighConga + Tone OpenHighConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 62; 1.5 0 62; 2.75 0 56; 3.25 0 62; 3.75 0 62 } \ + {1 0 56; 1.5 0 62; 2.75 0 44; 3.5 0 62 } \ + {1 0 70; 1.5 0 64; 2.75 0 64; 3.25 0 70; 3.75 0 70 } \ + {1 0 64; 1.5 0 70; 2.75 0 62; 3.25 0 62; 3.75 0 56 } \ + {1 0 64; 1.5 0 59; 2.75 0 62; 3.25 0 70; 3.75 0 59 } \ + {1 0 64; 1.5 0 64; 2.75 0 59; 3.25 0 64; 3.75 0 64 } \ + {1 0 88; 1.5 0 82; 2.75 0 88; 3.25 0 82; 3.75 0 76 } \ + {1 0 100; 1.5 0 110; 2.75 0 70 } +End + +Begin Drum-LowConga + Tone LowConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {2 0 86; 4 0 65; 4.25 0 63 } \ + {2 0 76; 4 0 86 } \ + {2 0 100; 4 0 61; 4.25 0 48 } \ + {2 0 82; 4 0 71 } \ + {2 0 86; 4 0 86 } \ + {2 0 82; 4 0 74; 4.25 0 74 } \ + {2 0 106; 4 0 67; 4.25 0 64 } \ + {2.25 0 120; 3 0 82 } +End + +Begin Drum-HighAgogo + Tone HighAgogo + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 60; 2.5 0 73; 2.75 0 68; 4.5 0 88 } \ + {1 0 88; 2.5 0 90; 2.75 0 68; 4.5 0 80 } \ + {1 0 80; 2.5 0 73; 2.75 0 63; 4.5 0 73 } \ + {1 0 88; 2.5 0 75; 2.75 0 53 } \ + {1 0 80; 2.5 0 65; 2.75 0 43; 4.5 0 68 } \ + {1 0 83; 2.5 0 70; 2.75 0 53; 4.5 0 78 } \ + {1 0 88; 2.5 0 73; 2.75 0 73; 3.25 0 85 } \ + {1 0 103 } +End + +Begin Drum-LowAgogo + Tone LowAgogo + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1.5 0 61; 2 0 81; 3.25 0 74; 3.75 0 79; 4 0 81 } \ + {1.5 0 81; 2 0 104; 3.25 0 79; 3.75 0 86; 4 0 96 } \ + {1.5 0 66; 2 0 76; 3.25 0 64; 3.75 0 76; 4 0 89 } \ + {1.5 0 44; 2 0 66; 3.25 0 64; 3.75 0 79; 4 0 79; 4.5 0 101 } \ + {1.5 0 64; 2 0 81; 3.25 0 76; 3.75 0 69; 4 0 79 } \ + {1.5 0 71; 2 0 76; 3.25 0 66; 3.75 0 66; 4 0 74 } \ + {1.5 0 71; 2 0 81; 3.75 0 91; 4 0 86; 4.5 0 41 } \ + {2.5 0 109; 2.75 0 64; 3 0 86 } +End + +Begin Drum-Shaker + Tone Shaker + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 37; 1.5 0 58; 1.75 0 29; 2 0 28; 2.5 0 56; 2.75 0 28; 3 0 37; 3.5 0 56; 3.75 0 39; 4 0 37; 4.5 0 55; 4.75 0 32 } \ + {1 0 45; 1.5 0 62; 1.75 0 20; 2 0 34; 2.5 0 53; 2.75 0 15; 3 0 29; 3.5 0 53; 3.75 0 25; 4 0 34; 4.5 0 53; 4.75 0 15 } \ + {1 0 39; 1.5 0 60; 1.75 0 28; 2 0 37; 2.5 0 49; 2.75 0 23; 3 0 21; 3.5 0 56; 3.75 0 26; 4 0 34; 4.5 0 56; 4.75 0 25 } \ + {1 0 37; 1.5 0 51; 1.75 0 20; 2 0 24; 2.5 0 53; 2.75 0 42; 3 0 34; 3.5 0 64; 3.75 0 39; 4 0 24; 4.25 0 28; 4.5 0 56; 4.75 0 32 } \ + {1 0 34; 1.5 0 55; 1.75 0 42; 2 0 42; 2.5 0 55; 2.75 0 39; 3 0 37; 3.5 0 56; 3.75 0 26; 4 0 37; 4.5 0 53; 4.75 0 34 } \ + {1 0 34; 1.5 0 58; 1.75 0 37; 2 0 42; 2.5 0 53; 2.75 0 29; 3 0 42; 3.5 0 70; 3.75 0 26; 4 0 42; 4.25 0 42; 4.5 0 56; 4.75 0 29 } \ + {1 0 56; 1.5 0 56; 1.75 0 39; 2 0 44; 2.5 0 55; 2.75 0 26; 3 0 32; 3.5 0 58; 3.75 0 34; 4 0 26; 4.25 0 29; 4.5 0 55; 4.75 0 42 } \ + {1 0 66; 1.5 0 64; 2.25 0 60; 2.75 0 55; 3 0 64; 4 0 44 } +End + +Begin Chord-9 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume P + Voicing Mode=Optimal + Articulate 100 + Octave 3 + Sequence {1 0 70; 1.5 0 25; 2 0 79; 2.5 0 40; 3 0 83; 3.5 0 43; 4 0 75; 4.5 0 40 } \ + {1 0 78; 1.5 0 53; 2 0 82; 2.5 0 45; 3 0 84; 3.5 0 40; 4 0 77; 4.5 0 53 } \ + {1 0 82; 1.5 0 55; 2 0 82; 2.5 0 50; 3 0 87; 3.5 0 43; 4 0 79; 4.5 0 43 } \ + {1 0 87; 1.5 0 45; 2 0 80; 2.5 0 48; 3 0 85; 3.5 0 59; 4 0 79; 4.5 0 80 } \ + {1 0 82; 1.5 0 53; 2 0 74; 2.5 0 50; 3 0 87; 3.5 0 43; 4 0 85; 4.5 0 43 } \ + {1 0 78; 1.5 0 43; 2 0 76; 2.5 0 45; 3 0 89; 3.5 0 53; 4 0 83; 4.5 0 50 } \ + {1 0 74; 1.5 0 43; 2 0 80; 2.5 0 53; 3 0 89; 3.5 0 53; 4 0 77; 4.5 0 67 } \ + {1 0 70; 1.5 0 78; 2.25 0 80; 2.75 0 72; 3 0 81; 3.75 0 62; 3.87 0 56; 4 0 60 } +End + +Begin Bass-11 + Voice FingeredBass + Rvolume 0 + Rtime 0 + Volume P + Octave 2 + Sequence {1 8 2 105; 1.75 32 2 86; 2 4 5 99; 3 8 2 102; 3.75 32 2 99; 4 4 5 104 } \ + {1 8 2 105; 1.75 32 2 96; 2 4 5 102; 3 8 2 96; 3.75 32 2 99; 4 4 5 93 } \ + {1 8 1 105; 1.75 32 1 93; 2 4 5 102; 3 8 1 86; 3.75 32 1 83; 4 4 5 99 } \ + {1 8 1 99; 1.75 32 1 88; 2 4 5 86; 3 8 1 93; 3.75 32 1 73; 4 8 3 105; 4.5 16 5 88 } \ + {1 8 2 86; 1.75 32 2 86; 2 4 5 93; 3 8 2 88; 3.75 32 2 91; 4 4 5 101 } \ + {1 8 2 105; 1.75 32 2 102; 2 4 5 88; 3 8 2 101; 3.75 32 2 93; 4 4 5 99 } \ + {1 8 1 99; 1.75 16 1 93; 2 4 5 99; 3 8 1 105; 3.75 16 1 108; 4 8. 5 93 } \ + {1 16 1 121; 1.5 16 1 113; 2.25 16 1 115; 2.75 32 1 110; 3 16 1 108 } +End + +Begin Chord-12 + Voice SteelGuitar + Rvolume 0 + Rtime 0 + Volume PP + Voicing Mode=Optimal + Articulate 100 + Octave 4 + Sequence {1 32 93; 1.5 32 94; 2 8 95; 2.75 32 91; 3.25 32 97; 3.75 32 95; 4 32 89; 4.5 32 93 } \ + {1 32 96; 1.5 32 94; 2 8 95; 2.75 32 92; 3.25 32 92; 3.75 32 93; 4 32 88; 4.5 32 93 } \ + {1 32 90; 1.5 16 96; 2 8 97; 2.75 32 95; 3.25 32 96; 3.75 32 96; 4 16 96; 4.5 32 95 } \ + {1 16 96; 1.5 16 97; 2 8 97; 2.75 32 96; 3.25 32 97; 3.75 32 96; 4 32 96; 4.5 32 96 } \ + {1 32 96; 1.5 32 92; 2 8 96; 2.75 32 93; 3.25 32 95; 3.75 32 93; 4 32 89; 4.5 32 90 } \ + {1 32 93; 1.5 32 92; 2 8 94; 2.75 32 90; 3.25 32 95; 3.75 32 94; 4 32 88; 4.5 32 92 } \ + {1 32 95; 1.5 32 96; 2 8. 96; 2.75 32 84; 3.25 32 96; 3.75 32 96; 4 32 80; 4.5 32 95 } \ + {1 16 98; 1.5 16 97; 2.25 16 98; 2.75 32 96; 3 32 99 } +End + +Begin Chord-15 + Voice Marimba + Rvolume 0 + Rtime 0 + Volume P + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1 16 91; 1.5 32 89; 2 32 91; 2.5 32 88; 2.75 32 91; 3.25 32 92; 3.75 32 90; 4 32 91; 4.5 32 89 } \ + {1 32 92; 1.5 32 90; 2 32 92; 2.5 32 90; 2.75 32 90; 3.25 32 92; 3.75 32 91; 4 32 89; 4.5 32 90 } \ + {1 32 90; 1.5 32 90; 2 32 92; 2.5 32 91; 2.75 32 89; 3.25 32 91; 3.75 32 90; 4 32 91; 4.5 32 89 } \ + {1 32 89; 1.5 32 90; 2 32 89; 2.5 32 89; 2.75 32 88; 3.25 32 90; 3.75 32 91; 4 32 90; 4.5 32 88 } \ + {1 32 90; 1.5 32 89; 2 32 89; 2.5 32 89; 2.75 32 88; 3.25 32 89; 3.75 32 89; 4 32 89; 4.5 32 89 } \ + {1 32 91; 1.5 32 89; 2 32 90; 2.5 32 89; 2.75 32 90; 3.25 32 91; 3.75 32 90; 4 32 89; 4.5 32 90 } \ + {1 32 89; 1.5 32 88; 2 16 85; 2.5 16 89; 2.75 16 89; 3.25 32 88; 3.75 32 88; 4 32 89; 4.5 32 90 } \ + {1 32 92; 1.5 32 91; 2.25 32 92; 2.75 32 92; 3 32 92 } +End + +Begin Chord-16 + Voice BrassSection + Rvolume 0 + Rtime 0 + Volume P + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1 32 101; 1.5 32 98; 2 8 100; 2.75 32 88; 3.25 32 96; 3.75 32 91; 4 32 88; 4.5 32 93 } \ + {1 32 92; 1.5 32 86; 2 8 89; 2.75 32 87; 3.25 32 92; 3.75 32 93; 4 16 81; 4.5 32 88 } \ + {1 32 93; 1.5 32 88; 2 8 95; 2.75 32 75; 3.25 32 90; 3.75 32 91; 4 32 80; 4.5 32 82 } \ + {1 32 91; 1.5 32 86; 2 8 96; 2.75 32 81; 3.25 32 96; 3.75 32 96; 4 32 82; 4.5 32 91 } \ + {1 32 90; 1.5 32 87; 2 8. 91; 2.75 32 84; 3.25 32 92; 3.75 32 77; 4 16 84; 4.5 16 84 } \ + {1 16 91; 1.5 32 85; 2 8 91; 2.75 32 84; 3.25 32 93; 3.75 32 71; 4 32 86; 4.5 32 87 } \ + {1 32 91; 1.5 32 83; 2 8. 96; 2.75 32 88; 3.25 32 96; 3.75 32 90; 4 32 70; 4.5 32 91 } \ + {1 32 100; 1.5 16 101; 2.25 32 103; 2.75 32 100; 3 16 102 } +End + +DefGroove Ending-B This 8 bar ending duplicates Main-B with a single bar "ending". + + +////////////////////// +/////// Main-C +SeqClear +SeqSize 8 + +Begin Drum-Tambourine + Tone Tambourine + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 51; 1.25 0 30; 1.5 0 118; 1.75 0 44; 2 0 51; 2.25 0 35; 2.5 0 118; 2.75 0 35; 3 0 51; 3.25 0 33; 3.5 0 118; 3.75 0 33; 4 0 51; 4.25 0 39; 4.5 0 124; 4.75 0 44 } \ + {1 0 76; 1.25 0 46; 1.5 0 124; 1.75 0 49; 2 0 88; 2.25 0 39; 2.5 0 124; 2.75 0 44; 3 0 56; 3.25 0 46; 3.5 0 124; 3.75 0 46; 4 0 61; 4.25 0 49; 4.5 0 124; 4.75 0 22 } \ + {1 0 72; 1.25 0 49; 1.5 0 124; 1.75 0 35; 2 0 72; 2.25 0 44; 2.5 0 112; 2.75 0 46; 3 0 49; 3.25 0 31; 3.5 0 124; 3.75 0 35; 4 0 61; 4.25 0 28; 4.5 0 124; 4.75 0 30 } \ + {1 0 72; 1.25 0 33; 1.5 0 124; 1.75 0 27; 2 0 84; 2.25 0 35; 2.5 0 124; 2.75 0 34; 3 0 84; 3.25 0 44; 3.5 0 124; 3.75 0 46; 4 0 76; 4.25 0 38; 4.5 0 118; 4.75 0 34 } \ + {1 0 51; 1.25 0 30; 1.5 0 118; 1.75 0 44; 2 0 51; 2.25 0 35; 2.5 0 118; 2.75 0 35; 3 0 51; 3.25 0 33; 3.5 0 118; 3.75 0 33; 4 0 51; 4.25 0 39; 4.5 0 124; 4.75 0 44 } \ + {1 0 76; 1.25 0 46; 1.5 0 124; 1.75 0 49; 2 0 88; 2.25 0 39; 2.5 0 124; 2.75 0 44; 3 0 56; 3.25 0 46; 3.5 0 124; 3.75 0 46; 4 0 61; 4.25 0 49; 4.5 0 124; 4.75 0 22 } \ + {1 0 72; 1.25 0 49; 1.5 0 124; 1.75 0 35; 2 0 72; 2.25 0 44; 2.5 0 112; 2.75 0 46; 3 0 49; 3.25 0 31; 3.5 0 124; 3.75 0 35; 4 0 61; 4.25 0 28; 4.5 0 124; 4.75 0 30 } \ + {1 0 72; 1.25 0 33; 1.5 0 124; 1.75 0 27; 2 0 84; 2.25 0 35; 2.5 0 124; 2.75 0 34; 3 0 84; 3.25 0 44; 3.5 0 124; 3.75 0 46; 4 0 76; 4.25 0 38; 4.5 0 118; 4.75 0 34 } +End + +Begin Drum-MuteHighConga + Tone MuteHighConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {4.5 0 79 } \ + {4.5 0 101 } \ + {4.5 0 91 } \ + {2 0 39; 4.5 0 101 } \ + {4.5 0 79 } \ + {4.5 0 101 } \ + {4.5 0 91 } \ + {2 0 39; 4.5 0 101 } +End + +Begin Drum-OpenHighConga + Tone OpenHighConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 59; 1.5 0 59; 2.75 0 59; 3.25 0 62; 3.75 0 62 } \ + {1 0 70; 1.5 0 70; 2.75 0 70; 3.25 0 64; 3.75 0 59 } \ + {1 0 64; 1.5 0 76; 2.75 0 62; 3.25 0 64; 3.75 0 64 } \ + {1 0 82; 1.5 0 82; 2.75 0 64; 3.25 0 76; 3.75 0 64 } \ + {1 0 59; 1.5 0 59; 2.75 0 59; 3.25 0 62; 3.75 0 62 } \ + {1 0 70; 1.5 0 70; 2.75 0 70; 3.25 0 64; 3.75 0 59 } \ + {1 0 64; 1.5 0 76; 2.75 0 62; 3.25 0 64; 3.75 0 64 } \ + {1 0 82; 1.5 0 82; 2.75 0 64; 3.25 0 76; 3.75 0 64 } +End + +Begin Drum-LowConga + Tone LowConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {2 0 86; 4 0 68; 4.25 0 65 } \ + {2 0 100; 4 0 68 } \ + {2 0 106; 4 0 71; 4.25 0 71 } \ + {2 0 82; 4 0 82 } \ + {2 0 86; 4 0 68; 4.25 0 65 } \ + {2 0 100; 4 0 68 } \ + {2 0 106; 4 0 71; 4.25 0 71 } \ + {2 0 82; 4 0 82 } +End + +Begin Drum-Shaker + Tone Shaker + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 44; 1.5 0 55; 1.75 0 44; 2 0 39; 2.5 0 58; 2.75 0 28; 3 0 21; 3.5 0 60; 3.75 0 32; 4 0 34; 4.5 0 62; 4.75 0 24 } \ + {1 0 24; 1.5 0 60; 1.75 0 37; 2 0 37; 2.5 0 55; 2.75 0 34; 3 0 26; 3.5 0 56; 3.75 0 26; 4 0 29; 4.5 0 56; 4.75 0 34 } \ + {1 0 39; 1.5 0 64; 1.75 0 29; 2 0 26; 2.5 0 56; 2.75 0 37; 3 0 29; 3.5 0 58; 3.75 0 39; 4 0 37; 4.5 0 62; 4.75 0 25 } \ + {1 0 42; 1.5 0 58; 1.75 0 24; 2 0 32; 2.5 0 60; 2.75 0 32; 3 0 26; 3.5 0 56; 3.75 0 25; 4 0 25; 4.5 0 51; 4.75 0 32 } \ + {1 0 44; 1.5 0 55; 1.75 0 44; 2 0 39; 2.5 0 58; 2.75 0 28; 3 0 21; 3.5 0 60; 3.75 0 32; 4 0 34; 4.5 0 62; 4.75 0 24 } \ + {1 0 24; 1.5 0 60; 1.75 0 37; 2 0 37; 2.5 0 55; 2.75 0 34; 3 0 26; 3.5 0 56; 3.75 0 26; 4 0 29; 4.5 0 56; 4.75 0 34 } \ + {1 0 39; 1.5 0 64; 1.75 0 29; 2 0 26; 2.5 0 56; 2.75 0 37; 3 0 29; 3.5 0 58; 3.75 0 39; 4 0 37; 4.5 0 62; 4.75 0 25 } \ + {1 0 42; 1.5 0 58; 1.75 0 24; 2 0 32; 2.5 0 60; 2.75 0 32; 3 0 26; 3.5 0 56; 3.75 0 25; 4 0 25; 4.5 0 51; 4.75 0 32 } +End + +Begin Chord-9 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume P + Voicing Mode=Optimal + Articulate 100 + Octave 3 + Sequence {1 0 72; 1.5 0 26; 2 0 77; 2.5 0 40; 3 0 81; 3.5 0 40; 4 0 79; 4.5 0 43 } \ + {1 0 89; 1.5 0 40; 2 0 82; 2.5 0 45; 3 0 84; 3.5 0 53; 4 0 77; 4.5 0 48 } \ + {1 0 86; 1.5 0 31; 2 0 83; 2.5 0 50; 3 0 89; 3.5 0 35; 4 0 79; 4.5 0 33 } \ + {1 0 83; 1.5 0 48; 2 0 80; 2.5 0 53; 3 0 82; 3.5 0 40; 4 0 85; 4.5 0 48 } \ + {1 0 75; 1.5 0 26; 2 0 77; 2.5 0 40; 3 0 81; 3.5 0 40; 4 0 79; 4.5 0 43 } \ + {1 0 89; 1.5 0 40; 2 0 82; 2.5 0 45; 3 0 84; 3.5 0 53; 4 0 77; 4.5 0 48 } \ + {1 0 86; 1.5 0 31; 2 0 83; 2.5 0 50; 3 0 89; 3.5 0 35; 4 0 79; 4.5 0 33 } \ + {1 0 83; 1.5 0 48; 2 0 80; 2.5 0 53; 3 0 82; 3.5 0 40; 4 0 85; 4.5 0 48 } +End + +Begin Bass-11 + Voice FingeredBass + Rvolume 0 + Rtime 0 + Volume P + Octave 2 + Sequence {1 8 1 86; 1.75 32 1 78; 2 4 5 96; 3 8 1 93; 3.75 32 1 88; 4 4 5 93 } \ + {1 8 1 93; 1.75 32 1 81; 2 4 5 102; 3 8 1 91; 3.75 32 1 71; 4 4 5 96 } \ + {1 8 1 78; 1.75 32 1 63; 2 4 5 93; 3 8 1 83; 3.75 32 1 68; 4 4 5 96 } \ + {1 8 1 83; 1.75 32 1 76; 2 4 5 104; 3 8 1 93; 3.75 32 1 93; 4 16 5 98; 4.5 8 5 93 } \ + {1 8 1 88; 1.75 32 1 78; 2 4 5 96; 3 8 1 91; 3.75 32 1 73; 4 4 5 101 } \ + {1 8 1 86; 1.75 32 1 71; 2 4 5 99; 3 8 1 88; 3.75 32 1 78; 4 4 5 102 } \ + {1 8 1 88; 1.75 32 1 71; 2 4 5 101; 3 8 1 93; 3.75 32 1 88; 4 4 5 104 } \ + {1 8 1 91; 1.75 32 1 96; 2 4 5 101; 3 8 1 102; 3.75 32 1 86; 4 8 3 105; 4.5 8 5 81 } +End + +Begin Chord-12 + Voice SteelGuitar + Rvolume 0 + Rtime 0 + Volume PP + Voicing Mode=Optimal + Articulate 100 + Octave 4 + Sequence {1 32 76; 1.5 32 80; 2 8. 88; 2.75 32 82; 3.25 32 90; 3.75 32 84; 4 8 89; 4.5 32 81 } \ + {1 32 87; 1.5 32 91; 2 8. 95; 2.75 32 85; 3.25 32 92; 3.75 32 89; 4 8. 89; 4.5 32 79 } \ + {1 32 92; 1.5 32 93; 2 8. 96; 2.75 32 81; 3.25 32 91; 3.75 32 91; 4 8 89; 4.5 32 80 } \ + {1 32 95; 1.5 32 92; 2 8. 97; 2.75 32 81; 3.25 32 94; 3.75 32 93; 4 8 84; 4.5 32 83 } \ + {1 32 94; 1.5 32 91; 2 8. 96; 2.75 32 88; 3.25 32 92; 3.75 32 91; 4 8 92; 4.5 32 85 } \ + {1 32 94; 1.5 32 92; 2 8. 96; 2.75 32 86; 3.25 32 95; 3.75 32 85; 4 8 86; 4.5 32 79 } \ + {1 32 92; 1.5 32 90; 2 8. 94; 2.75 32 82; 3.25 32 92; 3.75 32 91; 4 8 88; 4.5 32 68 } \ + {1 8 97; 1.5 32 82; 1.75 32 86; 2.25 32 90; 2.75 32 96; 3.25 32 94; 3.75 32 92; 4 16 95; 4.5 32 94 } +End + +Begin Chord-15 + Voice Marimba + Rvolume 0 + Rtime 0 + Volume P + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1 32 90; 1.5 32 88; 2 32 89; 3 32 89; 3.5 32 88; 3.75 32 87; 4.25 32 90; 4.5 32 89 } \ + {1.5 32 90; 2 32 90; 3 32 89; 3.5 32 90; 3.75 32 89; 4.25 32 89; 4.5 32 90 } \ + {1.5 32 89; 2 32 90; 3 32 90; 3.5 32 87; 3.75 32 89; 4.25 32 90; 4.5 32 89 } \ + {1.5 32 89; 2 32 90; 2.75 32 90; 3.25 32 92; 3.75 32 91; 4 32 88; 4.5 32 89 } \ + {1 32 91; 1.5 32 89; 2 32 90; 3 32 90; 3.5 32 88; 3.75 32 89; 4.25 32 89; 4.5 32 88 } \ + {1.5 32 89; 2 32 89; 3 32 88; 3.5 32 90; 3.75 32 87; 4.25 32 88; 4.5 32 89 } \ + {1.5 32 89; 2 32 88; 3 32 89; 3.5 32 87; 3.75 32 88; 4.25 32 89; 4.5 32 88 } \ + {1.5 32 90; 2 32 90; 2.5 32 89; 2.75 32 88; 3.25 32 90; 3.75 32 91; 4 32 88; 4.5 32 91 } +End + +Begin Chord-16 + Voice BrassSection + Rvolume 0 + Rtime 0 + Volume P + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1 1 73 } \ + {1 1 92 } \ + {1 1 86 } \ + {1 1 71 } \ + {1 1 88 } \ + {1 1 87 } \ + {1 1 86 } \ + {1 1 78 } +End + +DefGroove Main-C Pretty much like Main-B, but the horns are softer. + + +////////////////////// +/////// Fill-CC +SeqClear +SeqSize 1 + +Begin Drum-Tambourine + Tone Tambourine + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 112 } +End + +Begin Drum-MuteHighConga + Tone MuteHighConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 120 } +End + +Begin Drum-Shaker + Tone Shaker + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 56 } +End + +Begin Chord-9 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume P + Voicing Mode=Optimal + Articulate 100 + Octave 3 + Sequence {1 0 96; 3 0 73; 3.75 0 73; 4 0 84; 4.5 0 55; 4.75 0 60 } +End + +Begin Bass-11 + Voice FingeredBass + Rvolume 0 + Rtime 0 + Volume P + Octave 3 + Sequence {1 8. 1 118 } +End + +Begin Chord-12 + Voice SteelGuitar + Rvolume 0 + Rtime 0 + Volume PP + Voicing Mode=Optimal + Articulate 100 + Octave 4 + Sequence {1 8. 99 } +End + +Begin Chord-15 + Voice Marimba + Rvolume 0 + Rtime 0 + Volume P + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1 8 95 } +End + +DefGroove Fill-CC Abrupt fill with hit on 1. + + +////////////////////// +/////// Intro-C +SeqClear +SeqSize 8 + +Begin Drum-Tambourine + Tone Tambourine + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 51; 1.25 0 38; 1.5 0 94; 1.75 0 39; 2 0 30; 2.25 0 30; 2.5 0 108; 3 0 41; 3.25 0 34; 3.5 0 112; 3.75 0 31; 4 0 46; 4.25 0 34; 4.5 0 118; 4.75 0 35 } \ + {1 0 46; 1.25 0 44; 1.5 0 118; 1.75 0 30; 2 0 68; 2.25 0 34; 2.5 0 112; 2.75 0 41; 3 0 68; 3.25 0 44; 3.5 0 124; 3.75 0 41; 4 0 80; 4.25 0 49; 4.5 0 124; 4.75 0 68 } \ + {1 0 76; 1.25 0 30; 1.5 0 118; 1.75 0 36; 2 0 61; 2.25 0 51; 2.5 0 124; 2.75 0 34; 3 0 46; 3.25 0 49; 3.5 0 124; 3.75 0 41; 4 0 84; 4.25 0 25; 4.5 0 124; 4.75 0 28 } \ + {1 0 72; 1.25 0 25; 1.5 0 124; 1.75 0 33; 2 0 58; 2.25 0 34; 2.5 0 118; 2.75 0 28; 3 0 56; 3.25 0 33; 3.5 0 118; 3.75 0 33; 4 0 61; 4.25 0 29; 4.5 0 124; 4.75 0 44 } \ + {1 0 68; 1.25 0 29; 1.5 0 118; 1.75 0 34; 2 0 49; 2.25 0 35; 2.5 0 118; 2.75 0 28; 3 0 49; 3.25 0 30; 3.5 0 124; 3.75 0 28; 4 0 53; 4.25 0 18; 4.5 0 124; 4.75 0 44 } \ + {1 0 53; 1.25 0 44; 1.5 0 124; 1.75 0 39; 2 0 61; 2.25 0 44; 2.5 0 124; 2.75 0 29; 3 0 72; 3.25 0 33; 3.5 0 124; 3.75 0 36; 4 0 76; 4.25 0 36; 4.5 0 124; 4.75 0 35 } \ + {1 0 68; 1.25 0 30; 1.5 0 124; 1.75 0 28; 2 0 44; 2.25 0 31; 2.5 0 124; 2.75 0 30; 3 0 112; 3.5 0 112; 4.25 0 124; 4.75 0 56 } \ + {1 0 124 } +End + +Begin Drum-MuteHighConga + Tone MuteHighConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {4.5 0 101 } \ + {4.5 0 96 } \ + {4.5 0 72 } \ + {4.5 0 79 } \ + {4.5 0 84 } \ + {4.5 0 120 } \ + {4.75 0 106 } z +End + +Begin Drum-OpenHighConga + Tone OpenHighConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 64; 1.5 0 64; 2.75 0 76; 3.25 0 76; 3.75 0 64 } \ + {1 0 64; 1.5 0 56; 2.75 0 59; 3.25 0 59; 3.75 0 59 } \ + {1 0 64; 1.5 0 64; 2.75 0 59; 3.25 0 62; 3.75 0 62 } \ + {1 0 64; 1.5 0 62; 2.75 0 64; 3.25 0 64; 3.75 0 40 } \ + {1 0 62; 1.5 0 56; 2.75 0 62; 3.25 0 62; 3.75 0 47 } \ + {1 0 70; 1.5 0 59; 2.75 0 64; 3.25 0 70; 3.75 0 59 } \ + {1 0 70; 1.5 0 88; 3 0 88; 3.5 0 88 } \ + {1 0 94 } +End + +Begin Drum-LowConga + Tone LowConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {2 0 82; 4 0 100 } \ + {2 0 93; 4 0 68 } \ + {2 0 93; 4 0 68; 4.25 0 63 } \ + {2 0 82; 4 0 58; 4.25 0 68 } \ + {2 0 93; 4 0 61; 4.25 0 65 } \ + {2 0 93; 4 0 86 } \ + {2 0 106; 4.25 0 106 } z +End + +Begin Drum-Shaker + Tone Shaker + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 37; 1.5 0 51; 1.75 0 34; 2 0 24; 2.5 0 55; 2.75 0 23; 3 0 25; 3.5 0 58; 3.75 0 21; 4 0 20; 4.5 0 58; 4.75 0 26 } \ + {1 0 26; 1.5 0 55; 1.75 0 18; 2 0 24; 2.5 0 55; 2.75 0 20; 3 0 25; 3.5 0 47; 3.75 0 24; 4 0 20; 4.5 0 58; 4.75 0 23 } \ + {1 0 20; 1.5 0 49; 1.75 0 24; 2 0 18; 2.5 0 49; 2.75 0 20; 3 0 18; 3.5 0 49; 3.75 0 25; 4 0 29; 4.5 0 47; 4.75 0 15 } \ + {1 0 25; 1.5 0 53; 1.75 0 20; 2 0 25; 2.5 0 49; 2.75 0 24; 3 0 15; 3.5 0 49; 3.75 0 21; 4 0 18; 4.25 0 18; 4.5 0 45 } \ + {1 0 28; 1.5 0 51; 1.75 0 32; 2 0 20; 2.5 0 45; 2.75 0 26; 3 0 42; 3.5 0 51; 3.75 0 34; 4 0 26; 4.5 0 58; 4.75 0 23 } \ + {1 0 24; 1.5 0 60; 1.75 0 25; 2 0 28; 2.5 0 51; 2.75 0 26; 3 0 37; 3.5 0 58; 3.75 0 28; 4 0 23; 4.25 0 37; 4.5 0 58 } \ + {1 0 45; 1.5 0 58; 1.75 0 28; 2 0 42; 2.5 0 58; 2.75 0 29; 3 0 44; 3.5 0 60; 4.25 0 51; 4.75 0 32 } \ + {1 0 56 } +End + +Begin Chord-9 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume P + Voicing Mode=Optimal + Articulate 100 + Octave 3 + Sequence {1 0 83; 1.5 0 18; 2 0 74; 2.5 0 15; 3 0 70; 3.5 0 35; 4 0 76; 4.5 0 29 } \ + {1 0 86; 1.5 0 43; 2 0 77; 2.5 0 31; 3 0 75; 3.5 0 43; 4 0 67; 4.5 0 40 } \ + {1 0 87; 1.5 0 48; 2 0 72; 2.5 0 67; 3 0 84; 3.5 0 43; 4 0 75; 4.5 0 30 } \ + {1 0 78; 1.5 0 45; 2 0 76; 2.5 0 48; 3 0 85; 3.5 0 48; 4 0 75; 4.5 0 40 } \ + {1 0 60; 1.5 0 26; 2 0 76; 2.5 0 35; 3 0 78; 3.5 0 40; 4 0 82; 4.5 0 43 } \ + {1 0 82; 1.5 0 45; 2 0 79; 2.5 0 45; 3 0 80; 3.5 0 45; 4 0 77; 4.5 0 53 } \ + {1 0 89; 1.5 0 43; 2 0 68; 2.5 0 50; 3 0 55; 3.5 0 67; 4.25 0 72; 4.75 0 32 } \ + {1 0 82; 3 0 52; 3.5 0 56; 4 0 66; 4.5 0 73; 4.75 0 55 } +End + +Begin Bass-11 + Voice FingeredBass + Rvolume 0 + Rtime 0 + Volume P + Octave 2 + Sequence {1 8. 2 93; 2 8. 5 107; 3 8. 2 102; 4 8. 5 102 } \ + {1 8. 2 102; 2 8. 5 107; 3 8. 2 101; 4 8. 5 105 } \ + {1 8. 1 88; 2 8. 5 99; 3 8. 1 78; 4 8. 5 93 } \ + {1 8. 1 86; 2 8. 5 101; 3 8 1 99; 3.75 32 3 101; 4 8 5 61; 4.5 8 3 105 } \ + {1 8. 2 96; 2 8. 5 96; 3 8. 2 107; 4 8. 5 108 } \ + {1 4 2 99; 2 4 5 104; 3 8. 2 107; 4 4 5 105 } \ + {1 4 1 104; 2 8. 5 108; 3 32 1 108; 3.5 16 1 108; 4.25 32 1 112; 4.75 32 1 115 } \ + {1 16 1 118; 3.75 32 1 96; 4 16 1 118; 4.5 16 1 102 } +End + +Begin Chord-12 + Voice SteelGuitar + Rvolume 0 + Rtime 0 + Volume PP + Voicing Mode=Optimal + Articulate 100 + Octave 4 + Sequence {1 32 95; 1.5 32 88; 2 8 92; 2.75 32 88; 3.25 32 87; 3.75 32 89; 4 16 87; 4.5 32 89 } \ + {1 32 95; 1.5 32 93; 2 8 93; 2.75 32 91; 3.25 32 89; 3.75 32 91; 4 32 85; 4.5 32 91 } \ + {1 32 90; 1.5 32 89; 2 8 96; 2.75 32 81; 3.25 32 89; 3.75 32 88; 4 32 88; 4.5 32 95 } \ + {1 32 91; 1.5 32 89; 2 8 97; 2.75 32 84; 3.25 32 88; 3.75 32 89; 4 32 93; 4.5 32 93 } \ + {1 32 93; 1.5 32 91; 2 8 93; 2.75 32 90; 3.25 32 90; 3.75 32 92; 4 32 82; 4.5 32 91 } \ + {1 32 92; 1.5 32 91; 2 8 90; 2.75 32 81; 3.25 16 87; 3.75 32 90; 4 32 85; 4.5 32 88 } \ + {1 32 92; 1.5 32 89; 2 8 93; 3 32 93; 3.5 16 94; 4.25 16 96; 4.75 32 84 } \ + {1 32 93; 3.75 32 81; 4 32 83; 4.5 32 98 } +End + +Begin Chord-15 + Voice Marimba + Rvolume 0 + Rtime 0 + Volume P + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1 32 93; 1.5 32 90; 2 32 91; 2.5 32 90; 2.75 32 90; 3.25 32 91; 3.75 32 89; 4 32 91; 4.5 32 90 } \ + {1 32 89; 1.5 32 89; 2 32 89; 2.5 32 90; 2.75 32 90; 3.25 32 92; 3.75 32 90; 4 32 90; 4.5 32 90 } \ + {1 32 89; 1.5 32 88; 2 32 92; 2.5 32 88; 2.75 32 88; 3.25 32 91; 3.75 32 91; 4 32 90; 4.5 32 90 } \ + {1 32 91; 1.5 32 88; 2 32 91; 2.5 32 89; 2.75 32 88; 3.25 32 91; 3.75 32 89; 4 32 89; 4.5 32 89 } \ + {1 32 89; 1.5 32 90; 2 32 89; 2.5 32 89; 2.75 32 89; 3.25 32 90; 3.75 32 90; 4 32 89; 4.5 32 89 } \ + {1 32 90; 1.5 32 89; 2 32 91; 2.5 32 87; 2.75 32 89; 3.25 32 91; 3.75 32 90; 4 32 89; 4.5 32 91 } \ + {1 32 90 } \ + {3.75 32 90; 4 32 89; 4.5 32 89 } +End + +Begin Chord-16 + Voice BrassSection + Rvolume 0 + Rtime 0 + Volume P + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1 32 98; 1.5 32 86; 2 8 96; 2.75 32 82; 3.25 32 91; 3.75 32 94; 4 32 91; 4.5 32 90 } \ + {1 32 97; 1.5 32 92; 2 8 89; 2.75 32 85; 3.25 32 92; 3.75 32 89; 4 32 90; 4.5 32 93 } \ + {1 32 97; 1.5 32 88; 2 8 89; 2.75 32 81; 3.25 32 83; 3.75 32 87; 4 32 86; 4.5 32 90 } \ + {1 32 95; 1.5 32 93; 2 8 94; 2.75 32 96; 3.25 32 90; 3.75 32 100; 4 32 81; 4.5 32 93 } \ + {1 32 103; 1.5 32 99; 2 8 92; 2.75 32 89; 3.25 32 99; 3.75 32 98; 4 32 89; 4.5 32 94 } \ + {1 32 99; 1.5 32 95; 2 8 92; 2.75 32 86; 3.25 32 97; 3.75 32 93; 4 32 89; 4.5 32 87 } \ + {1 32 95; 1.5 32 90; 2 8 90; 3 32 100; 3.5 32 100; 4.25 32 99; 4.75 32 103 } \ + {1 32 106; 3.75 32 93; 4 32 95; 4.5 32 112 } +End + +DefGroove Intro-C Pretty much like Intro-B. + + +////////////////////// +/////// Ending-C +SeqClear +SeqSize 8 + +Begin Drum-Tambourine + Tone Tambourine + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 76; 1.25 0 58; 1.5 0 112; 1.75 0 46; 2 0 53; 2.25 0 31; 2.5 0 124; 2.75 0 35; 3 0 51; 3.25 0 30; 3.5 0 124; 3.75 0 49; 4 0 49; 4.25 0 27; 4.5 0 124; 4.75 0 33 } \ + {1 0 68; 1.25 0 33; 1.5 0 124; 1.75 0 34; 2 0 72; 2.25 0 34; 2.5 0 124; 2.75 0 31; 3 0 58; 3.25 0 25; 3.5 0 124; 3.75 0 33; 4 0 56; 4.25 0 34; 4.5 0 124; 4.75 0 35 } \ + {1 0 61; 1.25 0 29; 1.5 0 124; 1.75 0 35; 2 0 61; 2.25 0 31; 2.5 0 118; 2.75 0 39; 3 0 51; 3.25 0 39; 3.5 0 118; 3.75 0 39; 4 0 61; 4.25 0 36; 4.5 0 118; 4.75 0 38 } \ + {1 0 68; 1.25 0 33; 1.5 0 124; 1.75 0 30; 2 0 61; 2.25 0 31; 2.5 0 124; 2.75 0 39; 3 0 58; 3.25 0 41; 3.5 0 118; 3.75 0 35; 4 0 61; 4.25 0 39; 4.5 0 124; 4.75 0 34 } \ + {1 0 80; 1.25 0 33; 1.5 0 112; 1.75 0 38; 2 0 98; 2.25 0 28; 2.5 0 124; 2.75 0 46; 3 0 53; 3.25 0 46; 3.5 0 124; 3.75 0 46; 4 0 72; 4.25 0 34; 4.5 0 124; 4.75 0 34 } \ + {1 0 76; 1.25 0 44; 1.5 0 124; 1.75 0 34; 2 0 72; 2.25 0 31; 2.5 0 124; 2.75 0 31; 3 0 76; 3.25 0 39; 3.5 0 124; 3.75 0 38; 4 0 61; 4.25 0 53; 4.5 0 118; 4.75 0 46 } \ + {1 0 88; 1.25 0 51; 1.5 0 124; 1.75 0 46; 2 0 72; 2.25 0 34; 2.5 0 112; 2.75 0 46; 3 0 51; 3.25 0 35; 3.5 0 118; 3.75 0 41; 4 0 49; 4.25 0 39; 4.5 0 112; 4.75 0 53 } \ + {1 0 124; 1.5 0 124; 2.25 0 108; 2.75 0 53; 3 0 102 } +End + +Begin Drum-MuteHighConga + Tone MuteHighConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {4.5 0 54 } \ + {4.5 0 91 } \ + {4.5 0 79 } \ + {4.5 0 91 } \ + {4.5 0 91 } \ + {4.5 0 84 } \ + {4.5 0 87 } z +End + +Begin Drum-OpenHighConga + Tone OpenHighConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 62; 1.5 0 62; 2.75 0 56; 3.25 0 62; 3.75 0 62 } \ + {1 0 56; 1.5 0 62; 2.75 0 44; 3.5 0 62 } \ + {1 0 70; 1.5 0 64; 2.75 0 64; 3.25 0 70; 3.75 0 70 } \ + {1 0 64; 1.5 0 70; 2.75 0 62; 3.25 0 62; 3.75 0 56 } \ + {1 0 64; 1.5 0 59; 2.75 0 62; 3.25 0 70; 3.75 0 59 } \ + {1 0 64; 1.5 0 64; 2.75 0 59; 3.25 0 64; 3.75 0 64 } \ + {1 0 88; 1.5 0 82; 2.75 0 88; 3.25 0 82; 3.75 0 76 } \ + {1 0 100; 1.5 0 110; 2.75 0 70 } +End + +Begin Drum-LowConga + Tone LowConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {2 0 86; 4 0 65; 4.25 0 63 } \ + {2 0 76; 4 0 86 } \ + {2 0 100; 4 0 61; 4.25 0 48 } \ + {2 0 82; 4 0 71 } \ + {2 0 86; 4 0 86 } \ + {2 0 82; 4 0 74; 4.25 0 74 } \ + {2 0 106; 4 0 67; 4.25 0 64 } \ + {2.25 0 120; 3 0 82 } +End + +Begin Drum-HighAgogo + Tone HighAgogo + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 60; 2.5 0 73; 2.75 0 68; 4.5 0 88 } \ + {1 0 88; 2.5 0 90; 2.75 0 68; 4.5 0 80 } \ + {1 0 80; 2.5 0 73; 2.75 0 63; 4.5 0 73 } \ + {1 0 88; 2.5 0 75; 2.75 0 53 } \ + {1 0 80; 2.5 0 65; 2.75 0 43; 4.5 0 68 } \ + {1 0 83; 2.5 0 70; 2.75 0 53; 4.5 0 78 } \ + {1 0 88; 2.5 0 73; 2.75 0 73; 3.25 0 85 } \ + {1 0 103 } +End + +Begin Drum-LowAgogo + Tone LowAgogo + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1.5 0 61; 2 0 81; 3.25 0 74; 3.75 0 79; 4 0 81 } \ + {1.5 0 81; 2 0 104; 3.25 0 79; 3.75 0 86; 4 0 96 } \ + {1.5 0 66; 2 0 76; 3.25 0 64; 3.75 0 76; 4 0 89 } \ + {1.5 0 44; 2 0 66; 3.25 0 64; 3.75 0 79; 4 0 79; 4.5 0 101 } \ + {1.5 0 64; 2 0 81; 3.25 0 76; 3.75 0 69; 4 0 79 } \ + {1.5 0 71; 2 0 76; 3.25 0 66; 3.75 0 66; 4 0 74 } \ + {1.5 0 71; 2 0 81; 3.75 0 91; 4 0 86; 4.5 0 41 } \ + {2.5 0 109; 2.75 0 64; 3 0 86 } +End + +Begin Drum-Shaker + Tone Shaker + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 37; 1.5 0 58; 1.75 0 29; 2 0 28; 2.5 0 56; 2.75 0 28; 3 0 37; 3.5 0 56; 3.75 0 39; 4 0 37; 4.5 0 55; 4.75 0 32 } \ + {1 0 45; 1.5 0 62; 1.75 0 20; 2 0 34; 2.5 0 53; 2.75 0 15; 3 0 29; 3.5 0 53; 3.75 0 25; 4 0 34; 4.5 0 53; 4.75 0 15 } \ + {1 0 39; 1.5 0 60; 1.75 0 28; 2 0 37; 2.5 0 49; 2.75 0 23; 3 0 21; 3.5 0 56; 3.75 0 26; 4 0 34; 4.5 0 56; 4.75 0 25 } \ + {1 0 37; 1.5 0 51; 1.75 0 20; 2 0 24; 2.5 0 53; 2.75 0 42; 3 0 34; 3.5 0 64; 3.75 0 39; 4 0 24; 4.25 0 28; 4.5 0 56; 4.75 0 32 } \ + {1 0 34; 1.5 0 55; 1.75 0 42; 2 0 42; 2.5 0 55; 2.75 0 39; 3 0 37; 3.5 0 56; 3.75 0 26; 4 0 37; 4.5 0 53; 4.75 0 34 } \ + {1 0 34; 1.5 0 58; 1.75 0 37; 2 0 42; 2.5 0 53; 2.75 0 29; 3 0 42; 3.5 0 70; 3.75 0 26; 4 0 42; 4.25 0 42; 4.5 0 56; 4.75 0 29 } \ + {1 0 56; 1.5 0 56; 1.75 0 39; 2 0 44; 2.5 0 55; 2.75 0 26; 3 0 32; 3.5 0 58; 3.75 0 34; 4 0 26; 4.25 0 29; 4.5 0 55; 4.75 0 42 } \ + {1 0 66; 1.5 0 64; 2.25 0 60; 2.75 0 55; 3 0 64; 4 0 44 } +End + +Begin Chord-9 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume P + Voicing Mode=Optimal + Articulate 100 + Octave 3 + Sequence {1 0 70; 1.5 0 25; 2 0 79; 2.5 0 40; 3 0 83; 3.5 0 43; 4 0 75; 4.5 0 40 } \ + {1 0 78; 1.5 0 53; 2 0 82; 2.5 0 45; 3 0 84; 3.5 0 40; 4 0 77; 4.5 0 53 } \ + {1 0 82; 1.5 0 55; 2 0 82; 2.5 0 50; 3 0 87; 3.5 0 43; 4 0 79; 4.5 0 43 } \ + {1 0 87; 1.5 0 45; 2 0 80; 2.5 0 48; 3 0 85; 3.5 0 59; 4 0 79; 4.5 0 80 } \ + {1 0 82; 1.5 0 53; 2 0 74; 2.5 0 50; 3 0 87; 3.5 0 43; 4 0 85; 4.5 0 43 } \ + {1 0 78; 1.5 0 43; 2 0 76; 2.5 0 45; 3 0 89; 3.5 0 53; 4 0 83; 4.5 0 50 } \ + {1 0 74; 1.5 0 43; 2 0 80; 2.5 0 53; 3 0 89; 3.5 0 53; 4 0 77; 4.5 0 67 } \ + {1 0 70; 1.5 0 78; 2.25 0 80; 2.75 0 72; 3 0 81; 3.75 0 62; 3.87 0 56; 4 0 60 } +End + +Begin Bass-11 + Voice FingeredBass + Rvolume 0 + Rtime 0 + Volume P + Octave 2 + Sequence {1 8 2 105; 1.75 32 2 86; 2 4 5 99; 3 8 2 102; 3.75 32 2 99; 4 4 5 104 } \ + {1 8 2 105; 1.75 32 2 96; 2 4 5 102; 3 8 2 96; 3.75 32 2 99; 4 4 5 93 } \ + {1 8 1 105; 1.75 32 1 93; 2 4 5 102; 3 8 1 86; 3.75 32 1 83; 4 4 5 99 } \ + {1 8 1 99; 1.75 32 1 88; 2 4 5 86; 3 8 1 93; 3.75 32 1 73; 4 8 3 105; 4.5 16 5 88 } \ + {1 8 2 86; 1.75 32 2 86; 2 4 5 93; 3 8 2 88; 3.75 32 2 91; 4 4 5 101 } \ + {1 8 2 105; 1.75 32 2 102; 2 4 5 88; 3 8 2 101; 3.75 32 2 93; 4 4 5 99 } \ + {1 8 1 99; 1.75 16 1 93; 2 4 5 99; 3 8 1 105; 3.75 16 1 108; 4 8. 5 93 } \ + {1 16 1 121; 1.5 16 1 113; 2.25 16 1 115; 2.75 32 1 110; 3 16 1 108 } +End + +Begin Chord-12 + Voice SteelGuitar + Rvolume 0 + Rtime 0 + Volume PP + Voicing Mode=Optimal + Articulate 100 + Octave 4 + Sequence {1 32 93; 1.5 32 94; 2 8 95; 2.75 32 91; 3.25 32 97; 3.75 32 95; 4 32 89; 4.5 32 93 } \ + {1 32 96; 1.5 32 94; 2 8 95; 2.75 32 92; 3.25 32 92; 3.75 32 93; 4 32 88; 4.5 32 93 } \ + {1 32 90; 1.5 16 96; 2 8 97; 2.75 32 95; 3.25 32 96; 3.75 32 96; 4 16 96; 4.5 32 95 } \ + {1 16 96; 1.5 16 97; 2 8 97; 2.75 32 96; 3.25 32 97; 3.75 32 96; 4 32 96; 4.5 32 96 } \ + {1 32 96; 1.5 32 92; 2 8 96; 2.75 32 93; 3.25 32 95; 3.75 32 93; 4 32 89; 4.5 32 90 } \ + {1 32 93; 1.5 32 92; 2 8 94; 2.75 32 90; 3.25 32 95; 3.75 32 94; 4 32 88; 4.5 32 92 } \ + {1 32 95; 1.5 32 96; 2 8. 96; 2.75 32 84; 3.25 32 96; 3.75 32 96; 4 32 80; 4.5 32 95 } \ + {1 16 98; 1.5 16 97; 2.25 16 98; 2.75 32 96; 3 32 99 } +End + +Begin Chord-15 + Voice Marimba + Rvolume 0 + Rtime 0 + Volume P + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1 16 91; 1.5 32 89; 2 32 91; 2.5 32 88; 2.75 32 91; 3.25 32 92; 3.75 32 90; 4 32 91; 4.5 32 89 } \ + {1 32 92; 1.5 32 90; 2 32 92; 2.5 32 90; 2.75 32 90; 3.25 32 92; 3.75 32 91; 4 32 89; 4.5 32 90 } \ + {1 32 90; 1.5 32 90; 2 32 92; 2.5 32 91; 2.75 32 89; 3.25 32 91; 3.75 32 90; 4 32 91; 4.5 32 89 } \ + {1 32 89; 1.5 32 90; 2 32 89; 2.5 32 89; 2.75 32 88; 3.25 32 90; 3.75 32 91; 4 32 90; 4.5 32 88 } \ + {1 32 90; 1.5 32 89; 2 32 89; 2.5 32 89; 2.75 32 88; 3.25 32 89; 3.75 32 89; 4 32 89; 4.5 32 89 } \ + {1 32 91; 1.5 32 89; 2 32 90; 2.5 32 89; 2.75 32 90; 3.25 32 91; 3.75 32 90; 4 32 89; 4.5 32 90 } \ + {1 32 89; 1.5 32 88; 2 16 85; 2.5 16 89; 2.75 16 89; 3.25 32 88; 3.75 32 88; 4 32 89; 4.5 32 90 } \ + {1 32 92; 1.5 32 91; 2.25 32 92; 2.75 32 92; 3 32 92 } +End + +Begin Chord-16 + Voice BrassSection + Rvolume 0 + Rtime 0 + Volume P + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1 32 101; 1.5 32 98; 2 8 100; 2.75 32 88; 3.25 32 96; 3.75 32 91; 4 32 88; 4.5 32 93 } \ + {1 32 92; 1.5 32 86; 2 8 89; 2.75 32 87; 3.25 32 92; 3.75 32 93; 4 16 81; 4.5 32 88 } \ + {1 32 93; 1.5 32 88; 2 8 95; 2.75 32 75; 3.25 32 90; 3.75 32 91; 4 32 80; 4.5 32 82 } \ + {1 32 91; 1.5 32 86; 2 8 96; 2.75 32 81; 3.25 32 96; 3.75 32 96; 4 32 82; 4.5 32 91 } \ + {1 32 90; 1.5 32 87; 2 8. 91; 2.75 32 84; 3.25 32 92; 3.75 32 77; 4 16 84; 4.5 16 84 } \ + {1 16 91; 1.5 32 85; 2 8 91; 2.75 32 84; 3.25 32 93; 3.75 32 71; 4 32 86; 4.5 32 87 } \ + {1 32 91; 1.5 32 83; 2 8. 96; 2.75 32 88; 3.25 32 96; 3.75 32 90; 4 32 70; 4.5 32 91 } \ + {1 32 100; 1.5 16 101; 2.25 32 103; 2.75 32 100; 3 16 102 } +End + +DefGroove Ending-C This 8 bar ending duplicates Main-C with an "end" on the last bar. + + +////////////////////// +/////// Main-D +SeqClear +SeqSize 8 + +Begin Drum-HandClap + Tone HandClap + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {2 0 0; 4 0 0 } \ + {2 0 0; 4 0 0 } \ + {2 0 0; 4 0 0 } \ + {2 0 0; 4 0 0 } \ + {2 0 0; 4 0 0 } \ + {2 0 0; 4 0 0 } \ + {2 0 0 } z +End + +Begin Drum-Tambourine + Tone Tambourine + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 51; 1.25 0 30; 1.5 0 118; 1.75 0 44; 2 0 51; 2.25 0 35; 2.5 0 118; 2.75 0 35; 3 0 51; 3.25 0 33; 3.5 0 118; 3.75 0 33; 4 0 51; 4.25 0 39; 4.5 0 124; 4.75 0 44 } \ + {1 0 76; 1.25 0 46; 1.5 0 124; 1.75 0 49; 2 0 88; 2.25 0 39; 2.5 0 124; 2.75 0 44; 3 0 56; 3.25 0 46; 3.5 0 124; 3.75 0 46; 4 0 61; 4.25 0 49; 4.5 0 124; 4.75 0 22 } \ + {1 0 72; 1.25 0 49; 1.5 0 124; 1.75 0 35; 2 0 72; 2.25 0 44; 2.5 0 112; 2.75 0 46; 3 0 49; 3.25 0 31; 3.5 0 124; 3.75 0 35; 4 0 61; 4.25 0 28; 4.5 0 124; 4.75 0 30 } \ + {1 0 72; 1.25 0 33; 1.5 0 124; 1.75 0 27; 2 0 84; 2.25 0 35; 2.5 0 124; 2.75 0 34; 3 0 84; 3.25 0 44; 3.5 0 124; 3.75 0 46; 4 0 76; 4.25 0 38; 4.5 0 118; 4.75 0 34 } \ + {1 0 68; 1.25 0 35; 1.5 0 118; 1.75 0 49; 2 0 68; 2.25 0 44; 2.5 0 118; 2.75 0 30; 3 0 61; 3.25 0 31; 3.5 0 118; 3.75 0 46; 4 0 72; 4.25 0 34; 4.5 0 124; 4.75 0 39 } \ + {1 0 76; 1.25 0 46; 1.5 0 124; 1.75 0 44; 2 0 84; 2.25 0 44; 2.5 0 112; 2.75 0 31; 3 0 76; 3.25 0 46; 3.5 0 124; 3.75 0 41; 4 0 102; 4.25 0 49; 4.5 0 124; 4.75 0 44 } \ + {1 0 88; 1.25 0 49; 1.5 0 118; 1.75 0 41; 2 0 68; 2.25 0 44; 2.5 0 118; 2.75 0 44; 3 0 124; 3.5 0 124; 4.25 0 112; 4.75 0 46 } \ + {1 0 112 } +End + +Begin Drum-MuteHighConga + Tone MuteHighConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {4.5 0 79 } \ + {4.5 0 101 } \ + {4.5 0 91 } \ + {2 0 39; 4.5 0 101 } \ + {4.5 0 91 } \ + {4.5 0 111 } \ + {4.75 0 44 } \ + {1 0 120 } +End + +Begin Drum-OpenHighConga + Tone OpenHighConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 59; 1.5 0 59; 2.75 0 59; 3.25 0 62; 3.75 0 62 } \ + {1 0 70; 1.5 0 70; 2.75 0 70; 3.25 0 64; 3.75 0 59 } \ + {1 0 64; 1.5 0 76; 2.75 0 62; 3.25 0 64; 3.75 0 64 } \ + {1 0 82; 1.5 0 82; 2.75 0 64; 3.25 0 76; 3.75 0 64 } \ + {1 0 64; 1.5 0 62; 2.75 0 64; 3.25 0 64; 3.75 0 64 } \ + {1 0 70; 1.5 0 54; 2.75 0 59; 3.25 0 56; 3.75 0 64 } \ + {1 0 82; 1.5 0 70; 2.75 0 16; 3 0 70; 3.5 0 94 } z +End + +Begin Drum-LowConga + Tone LowConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {2 0 86; 4 0 68; 4.25 0 65 } \ + {2 0 100; 4 0 68 } \ + {2 0 106; 4 0 71; 4.25 0 71 } \ + {2 0 82; 4 0 82 } \ + {2 0 76; 4 0 68; 4.25 0 65 } \ + {2 0 93; 4 0 68 } \ + {2 0 93; 4.25 0 106 } z +End + +Begin Drum-HighAgogo + Tone HighAgogo + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 90; 2.5 0 68; 2.75 0 43; 4.5 0 63 } \ + {1 0 80; 2.5 0 65; 2.75 0 53; 4.5 0 60 } \ + {1 0 68; 2.5 0 65; 2.75 0 55; 4.5 0 53 } \ + {1 0 80; 2.5 0 63; 2.75 0 23; 3.25 0 70; 3.75 0 68; 4 0 65 } \ + {1 0 70; 2.5 0 60; 2.75 0 63; 4.5 0 58 } \ + {1 0 80; 2.5 0 55; 2.75 0 60; 4.5 0 68 } \ + {1 0 73; 2.75 0 95; 4.5 0 88; 4.75 0 40 } \ + {1 0 68 } +End + +Begin Drum-LowAgogo + Tone LowAgogo + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1.5 0 51; 2 0 79; 3.25 0 59; 3.75 0 71; 4 0 81 } \ + {1.5 0 44; 2 0 66; 3.25 0 39; 3.75 0 44; 4 0 64 } \ + {1.5 0 19; 2 0 64; 3.25 0 41; 3.75 0 66; 4 0 39 } \ + {1.5 0 49; 2 0 71; 4.5 0 49 } \ + {1.5 0 36; 2 0 59; 3.25 0 36; 3.75 0 56; 4 0 79 } \ + {1.5 0 26; 2 0 76; 3.25 0 29; 3.75 0 56; 4 0 76 } \ + {1.5 0 56; 2 0 96 } z +End + +Begin Drum-Shaker + Tone Shaker + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 44; 1.5 0 55; 1.75 0 44; 2 0 39; 2.5 0 58; 2.75 0 28; 3 0 21; 3.5 0 60; 3.75 0 32; 4 0 34; 4.5 0 62; 4.75 0 24 } \ + {1 0 24; 1.5 0 60; 1.75 0 37; 2 0 37; 2.5 0 55; 2.75 0 34; 3 0 26; 3.5 0 56; 3.75 0 26; 4 0 29; 4.5 0 56; 4.75 0 34 } \ + {1 0 39; 1.5 0 64; 1.75 0 29; 2 0 26; 2.5 0 56; 2.75 0 37; 3 0 29; 3.5 0 58; 3.75 0 39; 4 0 37; 4.5 0 62; 4.75 0 25 } \ + {1 0 42; 1.5 0 58; 1.75 0 24; 2 0 32; 2.5 0 60; 2.75 0 32; 3 0 26; 3.5 0 56; 3.75 0 25; 4 0 25; 4.5 0 51; 4.75 0 32 } \ + {1 0 32; 1.5 0 51; 1.75 0 24; 2 0 24; 2.5 0 53; 2.75 0 28; 3 0 24; 3.5 0 53; 3.75 0 34; 4 0 42; 4.5 0 53; 4.75 0 37 } \ + {1 0 37; 1.5 0 53; 1.75 0 42; 2 0 29; 2.5 0 58; 2.75 0 34; 3 0 29; 3.5 0 62; 3.75 0 26; 4 0 39; 4.5 0 60; 4.75 0 37 } \ + {1 0 44; 1.5 0 60; 1.75 0 26; 2 0 39; 2.5 0 55; 2.75 0 34; 3 0 42; 3.5 0 66; 4.25 0 51; 4.75 0 24 } \ + {1 0 56 } +End + +Begin Chord-9 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume P + Voicing Mode=Optimal + Articulate 100 + Octave 3 + Sequence {1 0 72; 1.5 0 26; 2 0 77; 2.5 0 40; 3 0 81; 3.5 0 40; 4 0 79; 4.5 0 43 } \ + {1 0 89; 1.5 0 40; 2 0 82; 2.5 0 45; 3 0 84; 3.5 0 53; 4 0 77; 4.5 0 48 } \ + {1 0 86; 1.5 0 31; 2 0 83; 2.5 0 50; 3 0 89; 3.5 0 35; 4 0 79; 4.5 0 33 } \ + {1 0 83; 1.5 0 48; 2 0 80; 2.5 0 53; 3 0 82; 3.5 0 40; 4 0 85; 4.5 0 48 } \ + {1 0 84; 1.5 0 45; 2 0 78; 2.5 0 43; 3 0 78; 3.5 0 33; 4 0 80; 4.5 0 40 } \ + {1 0 82; 1.5 0 33; 2 0 84; 2.5 0 53; 3 0 83; 3.5 0 48; 4 0 86; 4.5 0 40 } \ + {1 0 86; 1.5 0 40; 2 0 85; 2.5 0 48; 3 0 72; 3.5 0 70; 4.25 0 76; 4.75 0 43 } \ + {1 0 96; 3 0 73; 3.75 0 73; 4 0 84; 4.5 0 55; 4.75 0 60 } +End + +Begin Bass-11 + Voice FingeredBass + Rvolume 0 + Rtime 0 + Volume P + Octave 2 + Sequence {1 8 1 56; 1.75 32 1 56; 2 4 5 76; 3 8 1 71; 3.75 32 1 48; 4 4 5 93 } \ + {1 8 1 63; 1.75 32 1 63; 2 4 5 96; 3 8 1 88; 3.75 32 1 63; 4 4 5 96 } \ + {1 8 1 93; 1.75 32 1 88; 2 4 5 91; 3 8 1 86; 3.75 32 1 83; 4 4 5 102 } \ + {1 8 1 91; 1.75 32 1 83; 2 4 5 88; 3 8 1 91; 3.75 32 1 81; 4 8 3 105; 4.5 16 5 66 } \ + {1 8 1 88; 1.75 32 1 63; 2 4 5 99; 3 8 1 71; 3.75 32 1 58; 4 4 5 104 } \ + {1 8 1 63; 1.75 32 1 63; 2 4 5 99; 3 8 1 78; 3.75 32 1 86; 4 4 5 91 } \ + {1 8 1 86; 1.75 32 1 91; 2 8. 5 96; 3 32 1 99; 3.5 16 1 101; 4.5 32 1 99; 4.75 32 1 108 } \ + {1 16 1 108; 3.75 32 1 86; 4 16 1 118; 4.5 16 1 112 } +End + +Begin Chord-12 + Voice SteelGuitar + Rvolume 0 + Rtime 0 + Volume PP + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1 32 89; 1.5 32 87; 2 8. 93; 2.75 32 75; 3.25 32 85; 3.75 32 88; 4 32 85; 4.5 32 78 } \ + {1 32 88; 1.5 32 87; 2 8. 97; 2.75 32 82; 3.25 32 81; 3.75 32 95; 4 32 79; 4.5 32 93 } \ + {1 32 93; 1.5 32 83; 2 8 95; 2.75 32 63; 3.25 32 93; 3.75 32 97; 4 32 74; 4.5 32 89 } \ + {1 32 94; 1.5 32 86; 2 8. 95; 2.75 32 79; 3.25 32 89; 3.75 32 97; 4 32 73; 4.5 32 92 } \ + {1 32 97; 1.5 32 90; 2 8. 97; 2.75 32 88; 3.25 32 85; 3.75 32 95; 4 32 76; 4.5 32 89 } \ + {1 32 94; 1.5 32 91; 2 8. 94; 2.75 32 80; 3.25 32 91; 3.75 32 93; 4 32 77; 4.5 32 89 } \ + {1 32 89; 1.5 32 83; 2 8. 97; 3 32 97; 3.5 32 97; 4.5 32 97; 4.75 32 86 } \ + {1 32 96; 3.75 32 90; 4 32 87; 4.5 16 95 } +End + +Begin Chord-13 + Voice CleanGuitar + Rvolume 0 + Rtime 0 + Volume P + Voicing Mode=Optimal + Articulate 100 + Octave 4 + Sequence {1 32 85; 1.5 32 82; 2 8. 91; 2.75 32 68; 3.25 32 93; 3.75 32 71; 4 8. 82 } \ + {1 32 79; 1.5 32 89; 2 8 89; 2.75 32 75; 3.25 32 90; 3.75 32 89; 4 8. 90 } \ + {1 32 90; 1.5 32 89; 2 8 94; 2.75 32 81; 3.25 32 92; 3.75 32 85; 4 8. 91 } \ + {1 32 85; 1.5 32 88; 2 8 94; 2.75 32 77; 3.25 32 87; 3.75 32 94; 4 8. 91 } \ + {1 32 88; 1.5 32 92; 2 8. 94; 2.75 32 79; 3.25 32 91; 3.75 32 87; 4 8. 88 } \ + {1 32 93; 1.5 32 91; 2 8 96; 2.75 32 76; 3.25 32 94; 3.75 32 87; 4 8. 80 } \ + {1 32 89; 1.5 32 91; 2 8. 95; 3 32 92; 3.5 32 95; 4.5 32 95; 4.75 32 84 } \ + {1 32 81; 3.75 32 74; 4 32 80; 4.5 32 96 } +End + +Begin Chord-15 + Voice Marimba + Rvolume 0 + Rtime 0 + Volume P + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1.5 32 89; 2 32 89; 3 32 89; 3.5 32 88; 3.75 32 88; 4.25 32 88; 4.5 32 89 } \ + {1.5 32 90; 2 32 89; 2.75 32 88; 3.25 32 89; 3.75 32 89; 4 32 89; 4.5 32 89 } \ + {1 32 90; 1.5 32 88; 2 32 89; 3 32 89; 3.5 32 86; 3.75 32 89; 4.25 32 90; 4.5 32 87 } \ + {1.5 32 88; 2 32 91; 2.75 32 88; 3.25 32 90; 3.75 32 90; 4 32 88; 4.5 32 89 } \ + {1.5 32 90; 2 32 89; 3 32 89; 3.5 32 89; 3.75 32 88; 4.25 32 90; 4.5 32 87 } \ + {1.5 32 88; 2 32 89; 2.75 32 88; 3.25 32 89; 3.75 32 89; 4 32 87; 4.5 32 88 } \ + {1.5 32 88; 2 32 89; 3 32 88; 3.5 32 90; 4.5 32 88; 4.75 32 88 } \ + {1 32 90; 3.75 32 89; 4 32 88; 4.5 32 90 } +End + +DefGroove Main-D Much like Main-A, but a bit brighter percussion. + + +////////////////////// +/////// Fill-DD +SeqClear +SeqSize 1 + +Begin Drum-Tambourine + Tone Tambourine + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 112 } +End + +Begin Drum-MuteHighConga + Tone MuteHighConga + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 120 } +End + +Begin Drum-Shaker + Tone Shaker + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 56 } +End + +Begin Chord-9 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume P + Voicing Mode=Optimal + Articulate 100 + Octave 3 + Sequence {1 0 96; 3 0 73; 3.75 0 73; 4 0 84; 4.5 0 55; 4.75 0 60 } +End + +Begin Bass-11 + Voice FingeredBass + Rvolume 0 + Rtime 0 + Volume P + Octave 3 + Sequence {1 8. 1 118 } +End + +Begin Chord-12 + Voice SteelGuitar + Rvolume 0 + Rtime 0 + Volume PP + Voicing Mode=Optimal + Articulate 100 + Octave 4 + Sequence {1 8. 99 } +End + +Begin Chord-15 + Voice Marimba + Rvolume 0 + Rtime 0 + Volume P + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1 8 95 } +End + +Begin Chord-16 + Voice BrassSection + Rvolume 0 + Rtime 0 + Volume P + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1 16 122 } +End + +DefGroove Fill-DD Loud fill with a brass hit on beat 1. + diff --git a/mma/lib/yamaha/w-rock.mma b/mma/lib/yamaha/w-rock.mma new file mode 100644 index 0000000..fbfb803 --- /dev/null +++ b/mma/lib/yamaha/w-rock.mma @@ -0,0 +1,597 @@ +///// Yamaha sty to MMA conversion by ys2mma.py +///// This file is a machine translation of a binary style file and +///// should be usable by MMA. However, it does not use all of the +///// features of MMA ... or those of a Yamaha synth. It should be hand +///// optimized for best results. + +///// Created: Mon Feb 19 16:38:48 2007 + +Begin Doc + A very basic rock style. Original file: w-rock.sty. Library + filename: yamaha/w-rock.mma. +End + +Author Bob van der Poel + +Time 4 +TimeSig 4 4 + + +////////////////////// +/////// Intro-A +SeqClear +SeqSize 1 + +Begin Drum-SnareDrum1 + Tone SnareDrum1 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume M + Sequence {3.59 0 127; 3.79 0 127; 4 0 127; 4.57 0 127; 4.76 0 127 } +End + +Begin Drum-ClosedHiHat + Tone ClosedHiHat + Rvolume 0 + Rtime 0 + Articulate 100 + Volume M + Sequence {1 0 127; 2 0 107 } +End + +DefGroove Intro-A A drum-only intro. Probably not that useful? + + +////////////////////// +/////// Main-A +SeqClear +SeqSize 2 + +Begin Drum-KickDrum1 + Tone KickDrum1 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume M + Sequence {1 0 127; 3 0 127 } \ + {1 0 127; 3 0 127 } +End + +Begin Drum-SnareDrum1 + Tone SnareDrum1 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume M + Sequence {2 0 127; 4 0 127 } \ + {2 0 127; 4 0 127 } +End + +Begin Drum-PedalHiHat + Tone PedalHiHat + Rvolume 0 + Rtime 0 + Articulate 100 + Volume M + Sequence {1 0 127; 2 0 127; 3 0 127; 4 0 127 } \ + {1 0 127; 2 0 127; 3 0 127; 4 0 127 } +End + +Begin Bass-11 + Voice FingeredBass + Rvolume 0 + Rtime 0 + Volume MP + Octave 3 + Sequence {1 16 1 127; 1.67 32 1 127; 2 16 1 127; 2.67 16 1 127; 3 16 1 127; 3.67 32 1 127; 4 16 1 127; 4.67 32 1 127 } \ + {1 16 1 127; 1.67 16 1 127; 2 16 1 127; 2.67 16 1 127; 3 16 1 127; 3.67 32 1 127; 4 16 1 127; 4.67 16 1 127 } +End + +Begin Chord-12 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1.01 16 84; 1.67 32 118; 2 8 7; 2.01 16 65; 2.67 32 117; 2.67 16 116; 3.01 16 121; 3.67 32 117; 3.67 32 116; 4.01 8 84; 4.67 32 118; 4.67 32 119 } \ + {1.01 16 117; 1.67 32 116; 1.67 32 118; 2.01 8 123; 2.67 32 118; 2.67 32 118; 3.01 16 119; 3.67 16 113; 3.67 32 111; 4.01 8 83; 4.67 32 116 } +End + +Begin Chord-13 + Voice OverDriveGuitar + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 4 + Sequence {1.67 8 108; 3.02 4 113 } \ + {1.67 8 117; 3.02 4. 114 } +End + +Begin Bass-14 + Voice MutedGuitar + Rvolume 0 + Rtime 0 + Volume P + Octave 4 + Sequence {1 16 1 120; 1 16 5 127; 1.67 16 1 120; 1.67 32 5 6; 2 8 6 6; 2 16 1 118; 2.67 32 1 113; 2.67 32 5 115; 3 16 1 112; 3.01 16 5 122; 3.67 16 1 122; 3.67 16 5 6; 4 8 6 6; 4 16 1 118; 4.67 16 1 108; 4.67 32 5 117 } \ + {1 16 1 115; 1.01 16 5 122; 1.67 16 1 120; 1.67 32 5 125; 2 8 6 10; 2 16 1 118; 2.67 32 1 108; 2.67 32 5 120; 3 16 1 117; 3.01 16 5 2; 3.67 16 1 120; 3.67 32 5 122; 4 8 6 10; 4 16 1 115; 4.67 32 1 113; 4.67 32 5 115 } +End + +DefGroove Main-A Good rhythm with drums and guitar. + + +////////////////////// +/////// Fill-AB +SeqClear +SeqSize 1 + +Begin Drum-KickDrum1 + Tone KickDrum1 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume M + Sequence {1 0 127; 3 0 127 } +End + +Begin Drum-SnareDrum1 + Tone SnareDrum1 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume M + Sequence {2 0 127; 3.67 0 127; 4 0 127; 4.67 0 127 } +End + +Begin Drum-PedalHiHat + Tone PedalHiHat + Rvolume 0 + Rtime 0 + Articulate 100 + Volume M + Sequence {1 0 127; 2 0 127; 3 0 127 } +End + +Begin Bass-11 + Voice FingeredBass + Rvolume 0 + Rtime 0 + Volume MP + Octave 3 + Sequence {1 16 1 127; 1.67 16 1 127; 2 16 1 127; 2.67 16 1 127; 3 16 1 127; 3.67 16 1 127; 4 16 1 127; 4.67 16 1 127 } +End + +Begin Chord-12 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 6 + Sequence {1.01 16 83; 1.67 16 119; 1.67 32 115; 2.01 16 116; 2.67 8 83; 2.67 16 89; 3.01 32 101; 3.33 32 108; 3.67 32 113; 3.67 32 117; 4 32 126; 4.01 32 8; 4.33 32 66; 4.67 16 6; 4.67 32 3 } +End + +Begin Chord-13 + Voice OverDriveGuitar + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 4 + Sequence {1.67 8 108; 3.02 4 103 } +End + +Begin Bass-14 + Voice MutedGuitar + Rvolume 0 + Rtime 0 + Volume P + Octave 4 + Sequence {1 16 1 120; 1.01 16 5 2; 1.67 16 1 117; 1.67 32 5 117; 2 16 6 6; 2 16 1 118; 2.67 32 5 115; 2.67 32 1 113; 3 16 1 113; 3.01 16 5 122; 3.67 32 1 118; 3.67 16 5 125; 4 8 6 10; 4 16 1 118; 4.67 16 5 120; 4.67 32 1 113 } +End + +DefGroove Fill-AB Fill sounds pretty much like MAIN-A pattern. + + +////////////////////// +/////// Main-B +SeqClear +SeqSize 4 + +Begin Drum-KickDrum1 + Tone KickDrum1 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume M + Sequence {1 0 127; 3 0 127 } \ + {1 0 127; 3 0 127 } \ + {1 0 127; 3 0 127 } \ + {1 0 127; 3 0 127 } +End + +Begin Drum-SnareDrum1 + Tone SnareDrum1 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume M + Sequence {2 0 127; 4 0 127 } \ + {2 0 127; 4 0 127 } \ + {2 0 127; 4 0 127 } \ + {2 0 127; 4 0 127 } +End + +Begin Drum-PedalHiHat + Tone PedalHiHat + Rvolume 0 + Rtime 0 + Articulate 100 + Volume M + Sequence {1 0 127; 2 0 127; 3 0 127; 4 0 127 } \ + {1 0 127; 2 0 127; 3 0 127; 4 0 127 } \ + {1 0 127; 2 0 127; 3 0 127; 4 0 127 } \ + {1 0 127; 2 0 127; 3 0 127; 4 0 127 } +End + +Begin Bass-11 + Voice FingeredBass + Rvolume 0 + Rtime 0 + Volume MP + Octave 3 + Sequence {1 16 1 127; 1.67 16 1 127; 2 8 1 127; 2.67 32 1 127; 3 8 1 127; 3.67 16 1 127; 4 16 1 127; 4.67 32 1 127 } \ + {1 16 1 127; 1.67 16 1 127; 2 16 1 127; 2.67 16 1 127; 3 16 1 127; 3.67 32 1 127; 4 16 1 127; 4.67 16 1 127 } \ + {1 16 1 127; 1.67 16 1 127; 2 16 1 127; 2.67 16 1 127; 3 16 1 127; 3.67 16 1 127; 4 16 1 127; 4.67 32 1 127 } \ + {1 16 1 127; 1.67 16 1 127; 2 16 1 127; 2.67 16 1 127; 3 16 1 127; 3.67 16 1 127; 4 16 1 127; 4.67 16 1 127 } +End + +Begin Chord-12 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1.01 16 4; 1.02 16 122; 1.67 32 119; 1.67 32 113; 2.01 8 86; 2.02 32 118; 2.67 32 116; 3.01 16 119; 3.02 32 115; 3.67 32 115; 4.01 16 122; 4.67 32 113; 4.67 32 117 } \ + {1.01 16 120; 1.67 32 112; 1.67 32 116; 2.01 16 41; 2.67 32 113; 2.67 32 116; 3.01 16 116; 3.02 16 121; 3.67 32 116; 3.67 32 115; 4.01 8 83; 4.67 32 115; 4.67 32 115 } \ + {1.01 16 118; 1.02 16 116; 1.67 32 116; 1.67 32 115; 2.01 16 83; 2.67 32 116; 3.01 16 117; 3.02 16 116; 3.67 32 117; 3.67 32 116; 4.01 8 120; 4.67 32 116; 4.67 32 117 } \ + {1.01 16 117; 1.02 16 116; 1.67 32 112; 1.67 32 113; 2.01 16 122; 2.67 32 114; 3.01 16 118; 3.67 16 111; 3.67 32 106; 4.01 16 117; 4.67 32 110; 4.67 32 111 } +End + +Begin Chord-13 + Voice OverDriveGuitar + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 4 + Sequence {1.67 8 105; 3.02 4 103 } \ + {1.67 8 103; 3.02 4. 103 } \ + {1.67 8 100; 3.02 4 105 } \ + {1.67 8 104; 3.02 4 104 } +End + +Begin Bass-14 + Voice MutedGuitar + Rvolume 0 + Rtime 0 + Volume P + Octave 4 + Sequence {1.01 16 1 117; 1.01 16 5 127; 1.67 32 1 108; 1.67 16 5 117; 2 8 6 23; 2 16 1 115; 2.67 32 1 108; 2.67 32 5 117; 3 16 1 115; 3 16 5 127; 3.67 16 1 111; 3.67 32 5 120; 4 16 1 112; 4 8 6 10; 4.67 32 5 117; 4.67 32 1 105 } \ + {1 16 1 115; 1.01 16 5 127; 1.67 16 1 115; 1.67 32 5 118; 2 8 6 10; 2 16 1 118; 2.67 32 1 110; 2.67 32 5 117; 3 16 1 115; 3 16 5 125; 3.67 32 5 117; 3.67 32 1 113; 4 16 1 115; 4 8 6 10; 4.67 32 1 106; 4.67 32 5 108 } \ + {1 16 5 120; 1.01 16 1 117; 1.67 32 1 111; 1.67 16 5 111; 2 8 6 6; 2 16 1 115; 2.67 32 1 108; 2.67 32 5 110; 3 16 1 112; 3.01 16 5 118; 3.67 32 1 112; 3.67 32 5 117; 4 8 6 10; 4 16 1 113; 4.67 32 5 111; 4.67 32 1 108 } \ + {1 16 1 115; 1 16 5 122; 1.67 16 5 115; 1.67 32 1 117; 2 16 1 117; 2 8 6 16; 2.67 32 1 111; 2.67 32 5 113; 3 16 1 117; 3.01 16 5 120; 3.67 32 1 115; 3.67 32 5 118; 4 8. 6 6; 4 16 1 118; 4.67 16 1 127; 4.67 16 5 120 } +End + +Begin Bass-15 + Voice BrassSection + Rvolume 0 + Rtime 0 + Volume M + Octave 6 + Sequence {1.04 16 1 108; 1.7 32 1 105; 2.03 16 1 105; 2.69 16 1 108; 3.03 4 3 108; 3.98 16 5 112 } z {1.04 16 1 108; 1.7 32 1 105; 2.03 16 1 105; 2.69 16 1 108; 3.03 4 3 108; 3.98 16 5 112 } z +End + +Begin Bass-16 + Voice AltoSax + Rvolume 0 + Rtime 0 + Volume M + Octave 5 + Sequence {1.05 16 1 99; 1.69 32 1 112; 1.99 16 1 112; 2.71 16 1 108; 3.05 4 3 119; 3.97 8 5 124 } z {1.05 16 1 99; 1.69 32 1 112; 1.99 16 1 112; 2.71 16 1 108; 3.05 4 3 119; 3.97 8 5 124 } z +End + +DefGroove Main-B Much like "A" with an added horn section. + + +////////////////////// +/////// Ending-A +SeqClear +SeqSize 1 + +Begin Drum-KickDrum1 + Tone KickDrum1 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume M + Sequence {1 0 127; 3 0 127 } +End + +Begin Drum-SnareDrum1 + Tone SnareDrum1 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume M + Sequence {2 0 127; 4 0 127 } +End + +Begin Drum-PedalHiHat + Tone PedalHiHat + Rvolume 0 + Rtime 0 + Articulate 100 + Volume M + Sequence {1 0 127; 2 0 127; 3 0 127; 4 0 127 } +End + +Begin Chord-13 + Voice OverDriveGuitar + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 4 + Sequence {1.67 8 100; 3.02 4 103 } +End + +Begin Bass-14 + Voice MutedGuitar + Rvolume 0 + Rtime 0 + Volume P + Octave 4 + Sequence {1 0 4 111; 1 16 1 107; 1.01 16 5 2; 1.67 16 1 111; 1.67 16 5 118; 2 16 1 115; 2 8 6 6; 2.67 32 1 118; 2.67 32 5 117; 3 16 1 118; 3.01 16 5 125; 3.67 32 1 115; 3.67 16 5 113; 4 8 6 2; 4 16 1 112; 4.67 32 1 108; 4.67 32 5 111 } +End + +DefGroove Ending-A Single bar ending. Not too final sounding. + + +////////////////////// +/////// Ending-B +SeqClear +SeqSize 1 + +Begin Drum-KickDrum1 + Tone KickDrum1 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume M + Sequence {1 0 127; 3 0 127 } +End + +Begin Drum-SnareDrum1 + Tone SnareDrum1 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume M + Sequence {2 0 127; 4 0 127 } +End + +Begin Drum-PedalHiHat + Tone PedalHiHat + Rvolume 0 + Rtime 0 + Articulate 100 + Volume M + Sequence {1 0 127; 2 0 127; 3 0 127; 4 0 127 } +End + +DefGroove Ending-B A drum-only ending. + + +////////////////////// +/////// Fill-AA +SeqClear +SeqSize 1 + +Begin Drum-KickDrum1 + Tone KickDrum1 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume M + Sequence {1 0 127; 3 0 127 } +End + +Begin Drum-SnareDrum1 + Tone SnareDrum1 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume M + Sequence {1.67 0 127; 2 0 127; 2.67 0 127; 3 0 127; 3.67 0 127; 4 0 127; 4.33 0 127; 4.67 0 127 } +End + +Begin Drum-PedalHiHat + Tone PedalHiHat + Rvolume 0 + Rtime 0 + Articulate 100 + Volume M + Sequence {1 0 127; 2 0 127; 3 0 127 } +End + +Begin Bass-11 + Voice FingeredBass + Rvolume 0 + Rtime 0 + Volume MP + Octave 3 + Sequence {1 16 1 127; 1.67 16 1 127; 2 16 1 127; 2.67 32 1 127; 3 16 1 127; 3.67 16 1 127; 4 16 1 127; 4.67 16 1 127 } +End + +Begin Chord-12 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1.01 32 44; 1.67 32 11; 1.67 32 1; 2.01 16 18; 2.67 32 64; 3.01 32 10; 3.33 32 7; 3.67 32 19; 3.67 32 1; 4 32 25; 4.01 32 11; 4.33 32 15; 4.34 32 8; 4.67 32 15; 4.67 16 8 } +End + +Begin Chord-13 + Voice OverDriveGuitar + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 4 + Sequence {1.67 2. 113 } +End + +Begin Bass-14 + Voice MutedGuitar + Rvolume 0 + Rtime 0 + Volume P + Octave 4 + Sequence {1 16 1 117; 1.01 16 5 127; 1.67 32 2 116; 1.67 32 5 120; 2 16 2 123; 2 16 5 120; 2.67 32 5 112; 2.67 32 2 121; 3.01 8 5 2; 3.01 8 2 2; 3.67 32 5 115; 3.67 32 2 119; 4 16 5 2; 4 16 2 2; 4.67 16 5 120; 4.67 16 2 119 } +End + +DefGroove Fill-AA Okay fill or change bar. + + +////////////////////// +/////// Fill-BA +SeqClear +SeqSize 1 + +Begin Drum-KickDrum1 + Tone KickDrum1 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume M + Sequence {1 0 127; 3 0 127 } +End + +Begin Drum-SnareDrum1 + Tone SnareDrum1 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume M + Sequence {2 0 127; 4 0 127 } +End + +Begin Drum-PedalHiHat + Tone PedalHiHat + Rvolume 0 + Rtime 0 + Articulate 100 + Volume M + Sequence {1 0 127; 2 0 127; 3 0 127; 4 0 127 } +End + +Begin Drum-CrashCymbal1 + Tone CrashCymbal1 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume M + Sequence {1.02 0 127 } +End + +Begin Bass-11 + Voice FingeredBass + Rvolume 0 + Rtime 0 + Volume MP + Octave 3 + Sequence {1 16 1 127; 1.67 16 1 127; 2 16 1 127; 2.67 16 1 127; 3 16 1 127; 3.67 32 1 127; 4 16 1 127; 4.67 32 1 127 } +End + +Begin Chord-12 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1.01 32 44; 1.67 32 11; 1.67 32 1; 2.01 16 18; 2.67 32 64; 3.01 32 10; 3.33 32 7; 3.67 32 19; 3.67 32 1; 4 32 25; 4.01 32 11; 4.33 32 15; 4.34 32 8; 4.67 32 15; 4.67 16 8 } +End + +DefGroove Fill-BA A cymbal crash on beat 1 creates a fill. + + +////////////////////// +/////// Fill-BB +SeqClear +SeqSize 1 + +Begin Bass-11 + Voice FingeredBass + Rvolume 0 + Rtime 0 + Volume MP + Octave 3 + Sequence {1 16 1 127; 1.67 16 1 127; 2 16 1 127; 2.67 16 1 127; 3 16 1 127; 3.67 32 1 127; 4 16 1 127; 4.67 32 1 127 } +End + +Begin Chord-12 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1.01 16 6; 1.67 32 122; 1.67 16 114; 2.01 16 44; 2.67 32 115; 3.01 16 120; 3.67 32 118; 3.67 32 122; 4.01 8 83; 4.67 32 117; 4.67 32 112 } +End + +DefGroove Fill-BB No drums, just bass and piano. + + +/// Groove Aliases. You should do something creative here! + + +Groove Main-A +DefGroove Main-C /// Alias definition from Main-A + +Groove Main-A +DefGroove Main-D /// Alias definition from Main-A + +Groove Intro-A +DefGroove Intro-B /// Alias definition from Intro-A + +Groove Intro-A +DefGroove Intro-C /// Alias definition from Intro-A + +Groove Ending-A +DefGroove Ending-C /// Alias definition from Ending-A + +Groove Fill-AA +DefGroove Fill-CC /// Alias definition from Fill-AA + +Groove Fill-AA +DefGroove Fill-DD /// Alias definition from Fill-AA + diff --git a/mma/lib/yamaha/western.mma b/mma/lib/yamaha/western.mma new file mode 100644 index 0000000..98af438 --- /dev/null +++ b/mma/lib/yamaha/western.mma @@ -0,0 +1,1176 @@ +///// Yamaha sty to MMA conversion by ys2mma.py +///// This file is a machine translation of a binary style file and +///// should be usable by MMA. However, it does not use all of the +///// features of MMA ... or those of a Yamaha synth. It should be hand +///// optimized for best results. + +///// Created: Mon Feb 19 16:52:08 2007 + +Begin Doc + Original file: WESTERN.STY. Try this if you like a classic fiddle or + banjo sound. Library file: yamaha/western.sty. + +End +Author Bob van der Poel + +Time 4 +TimeSig 4 4 + + +////////////////////// +/////// Main-A +SeqClear +SeqSize 2 + +Begin Drum-ScratchPush + Tone ScratchPush + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {2.5 0 122 } \ + {2.5 0 122 } +End + +Begin Drum-KickDrum2 + Tone KickDrum2 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 110; 3 0 108 } \ + {1 0 110; 3 0 110 } +End + +Begin Drum-SnareDrum2 + Tone SnareDrum2 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {2 0 110; 2.08 0 0; 4 0 110; 4.08 0 0 } \ + {2 0 110; 2.08 0 0; 4 0 110; 4.08 0 0; 4.5 0 110 } +End + +Begin Drum-RideBell + Tone RideBell + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 91; 2 0 70; 2.5 0 69; 3 0 90; 4 0 48 } \ + {1 0 88; 2 0 69; 2.5 0 69; 3 0 91; 4 0 47 } +End + +Begin Bass-9 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Octave 3 + Sequence {1 32 4# 91; 2 32 4# 70; 2.5 32 4# 69; 3 32 4# 90; 4 32 4# 48 } \ + {1 32 4# 88; 2 32 4# 69; 2.5 32 4# 69; 3 32 4# 91; 4 32 4# 47 } +End + +Begin Bass-11 + Voice AcousticBass + Rvolume 0 + Rtime 0 + Volume MP + Octave 3 + Sequence {1 4 1 110; 2 4 5 110; 3 4 1 110; 4 4 5 110 } \ + {1 4 1 110; 2 4 5 110; 3 4 1 110; 4 4 5 110 } +End + +Begin Chord-12 + Voice SteelGuitar + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1.5 16 85; 2.5 16 85; 3.5 16 85; 4.5 16 85 } \ + {1.5 16 85; 2.5 16 85; 3.5 16 85; 4.5 16 85 } +End + +Begin Bass-13 + Voice CleanGuitar + Rvolume 0 + Rtime 0 + Volume MP + Octave 4 + Sequence {1 8 7- 80; 2 8 5 80; 3 8 7- 80; 4 8 5 80 } \ + {1 8 7- 80; 2 8 5 80; 3 8 7- 80; 4 8 5 80 } +End + +Begin Bass-14 + Voice Violin + Rvolume 0 + Rtime 0 + Volume MP + Octave 5 + Sequence {1 1 5 71; 1 1 7- 71; 1 1 3 71 } z +End + +Begin Bass-15 + Voice Banjo + Rvolume 0 + Rtime 0 + Volume MP + Octave 5 + Sequence {1 4. 1 75; 1.25 4. 3 70; 1.5 4. 5 70; 1.75 4 1 70; 2 4 3 70; 2.25 8. 1 70; 2.5 8 5 70; 2.75 16 3 70; 3 4. 3 75; 3.5 4. 1 70; 3.75 4 5 70; 4 4 3 70; 4.25 8. 1 70; 4.5 8 5 70 } \ + {1 4. 5 75; 1.5 4. 3 70; 1.75 4 1 70; 2 4 5 70; 2.25 8. 3 70; 2.5 8 1 70; 2.75 16 3 70; 3 4. 3 75; 3.25 4. 5 70; 3.5 4. 1 70; 3.75 4 5 70; 4 4 3 70; 4.25 8. 1 70; 4.5 8 5 70; 4.75 16 1 70 } +End + +DefGroove Main-A A bit like a train taking off. + + +////////////////////// +/////// Fill-AA +SeqClear +SeqSize 1 + +Begin Drum-ScratchPush + Tone ScratchPush + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {2.5 0 122 } +End + +Begin Drum-KickDrum2 + Tone KickDrum2 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 110; 3 0 108; 4 0 111; 4.08 0 0 } +End + +Begin Drum-SnareDrum2 + Tone SnareDrum2 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {2 0 110; 2.08 0 0; 3.5 0 72; 4 0 109; 4.25 0 91; 4.5 0 73; 4.75 0 71 } +End + +Begin Drum-RideBell + Tone RideBell + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 88; 2 0 69; 2.5 0 69 } +End + +Begin Drum-CrashCymbal2 + Tone CrashCymbal2 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {4.97 0 109 } +End + +Begin Bass-9 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Octave 3 + Sequence {1 32 4# 88; 2 32 4# 69; 2.5 32 4# 69; 3 32 4# 91; 4 32 4# 47 } +End + +Begin Bass-11 + Voice AcousticBass + Rvolume 0 + Rtime 0 + Volume MP + Octave 3 + Sequence {1 4 1 110; 2 4 5 110; 3 4 1 110; 4 4 5 110 } +End + +Begin Chord-12 + Voice SteelGuitar + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1.5 16 85; 2.5 16 85; 3.5 16 85; 4.5 16 85 } +End + +Begin Bass-13 + Voice CleanGuitar + Rvolume 0 + Rtime 0 + Volume MP + Octave 4 + Sequence {1 8 7- 80; 2 8 5 80; 3 8 7- 80; 4 8 5 80 } +End + +Begin Bass-14 + Voice Violin + Rvolume 0 + Rtime 0 + Volume MP + Octave 6 + Sequence {1 4. 7- 71; 1 4. 3 71; 3.25 16 7- 71; 3.25 16 5 71; 3.75 16 5 71; 3.75 16 3 71; 4 16 3 71; 4 16 7- 71; 4.5 16 7- 71; 4.5 16 3 71 } +End + +Begin Bass-15 + Voice Banjo + Rvolume 0 + Rtime 0 + Volume MP + Octave 5 + Sequence {1 4. 5 75; 1.5 4. 3 70; 1.75 4 1 70; 2 4 5 70; 2.25 8. 3 70; 2.5 8 1 70; 2.75 16 3 70; 3 4. 3 75; 3.25 4. 5 70; 3.5 4. 1 70; 3.75 4 5 70; 4 4 3 70; 4.25 8. 1 70; 4.5 8 5 70; 4.75 16 1 70 } +End + +DefGroove Fill-AA A fill which sounds better than the main pattern. + + +////////////////////// +/////// Fill-AB +SeqClear +SeqSize 1 + +Begin Drum-KickDrum2 + Tone KickDrum2 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 108; 2 0 111; 2.08 0 0; 3 0 108; 3.08 0 0; 4 0 111; 4.08 0 0 } +End + +Begin Drum-SnareDrum2 + Tone SnareDrum2 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1.5 0 72; 2 0 109; 2.75 0 71; 3 0 109; 3.25 0 90; 3.5 0 72; 3.75 0 71; 4 0 109; 4.25 0 91; 4.5 0 73; 4.75 0 71; 4.83 0 0 } +End + +Begin Drum-CrashCymbal2 + Tone CrashCymbal2 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {2.97 0 109; 3 0 0; 4.97 0 109 } +End + +Begin Bass-9 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Octave 3 + Sequence {1 32 6# 108; 3 32 6# 108; 4 32 6# 111 } +End + +Begin Bass-11 + Voice AcousticBass + Rvolume 0 + Rtime 0 + Volume MP + Octave 3 + Sequence {1 4 1 110; 2 4 5 110; 3 16 1 110; 3.5 8 1 110; 4 8. 5 110 } +End + +Begin Chord-12 + Voice SteelGuitar + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1.5 16 85; 2.5 16 85; 3.5 32 85; 4.5 16 85 } +End + +Begin Bass-13 + Voice CleanGuitar + Rvolume 0 + Rtime 0 + Volume MP + Octave 4 + Sequence {1 8 7- 80; 2 8 5 80; 3 8 7- 80; 4 8 5 80 } +End + +Begin Bass-14 + Voice Violin + Rvolume 0 + Rtime 0 + Volume MP + Octave 5 + Sequence {1 1 5 80; 1 1 7- 80 } +End + +Begin Bass-15 + Voice Banjo + Rvolume 0 + Rtime 0 + Volume MP + Octave 5 + Sequence {1 4. 3 75; 1.25 4. 5 70; 1.5 4. 1 70; 1.75 4 5 70; 2 4 3 70; 2.25 8. 1 70; 2.5 8 5 70; 2.75 16 1 70; 3 4. 5 75; 3.25 4. 3 70; 3.5 4. 1 70; 3.75 4 5 70; 4 4 1 70; 4.25 8. 5 70; 4.5 8 3 70 } +End + +DefGroove Fill-AB Goes well with the train. + + +////////////////////// +/////// Intro-A +SeqClear +SeqSize 1 + +Begin Drum-SquareClick + Tone SquareClick + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 122; 1.12 0 0; 2 0 122; 2.12 0 0; 3 0 122; 3.12 0 0 } +End + +Begin Drum-SnareDrum2 + Tone SnareDrum2 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {4 0 122; 4.12 0 0; 4.5 0 122; 4.62 0 0 } +End + +Begin Drum-CrashCymbal2 + Tone CrashCymbal2 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {4.97 0 110 } +End + +Begin Bass-9 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Octave 3 + Sequence {1 32 5# 122; 2 32 5# 122; 3 32 5# 122; 4 32 5# 122; 4.5 32 5# 122 } +End + +DefGroove Intro-A A pluck on 1,2,3 with added snare. + + +////////////////////// +/////// Ending-A +SeqClear +SeqSize 1 + +Begin Drum-KickDrum2 + Tone KickDrum2 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 109; 1.08 0 0; 2 0 110; 2.08 0 0; 3 0 111; 4 0 111; 4.08 0 0 } +End + +Begin Drum-SnareDrum2 + Tone SnareDrum2 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 34; 1.25 0 111; 1.5 0 67; 2 0 36; 2.25 0 35; 2.5 0 109; 4 0 109 } +End + +Begin Drum-MidTom1 + Tone MidTom1 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {2.75 0 89; 3 0 108; 3.5 0 89 } +End + +Begin Drum-CrashCymbal1 + Tone CrashCymbal1 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {4 0 96 } +End + +Begin Drum-RideBell + Tone RideBell + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 90 } +End + +Begin Drum-CrashCymbal2 + Tone CrashCymbal2 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {4 0 111 } +End + +Begin Bass-9 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Octave 4 + Sequence {1 32 7- 90; 1.5 32 7- 90; 2 32 7- 90; 2.5 32 7- 90; 3 32 7- 90; 3.5 32 7- 90; 4 32 5 96 } +End + +Begin Bass-11 + Voice AcousticBass + Rvolume 0 + Rtime 0 + Volume MP + Octave 2 + Sequence {1 8 1 110; 1.5 8 5 90; 2 8 6 90; 2.5 8 7- 90; 3 8 1 110; 4 8. 1 110 } +End + +Begin Chord-12 + Voice SteelGuitar + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1.5 8 75; 2.5 8 75; 3 8 85; 4 8. 75; 4.04 8. 85; 4.07 8. 85; 4.12 8. 75 } +End + +Begin Bass-13 + Voice CleanGuitar + Rvolume 0 + Rtime 0 + Volume MP + Octave 4 + Sequence {1 8 7- 90; 2 8 5 90; 3 8 5 85; 3 8 3 85; 3 8 3 85; 3 8 7- 85; 4.01 8 7- 85; 4.01 8 3 85; 4.01 8 3 85; 4.01 8 5 85 } +End + +Begin Bass-14 + Voice Violin + Rvolume 0 + Rtime 0 + Volume MP + Octave 5 + Sequence {1 16 5 90; 1.25 16 7- 90; 1.61 16 5 100; 1.86 16 7- 90; 2.25 16 5 90; 2.5 16 6 90; 2.75 16 7- 90; 3 16 2 90; 3.5 16 5 122; 4 8. 7- 122; 4.02 8. 5 122; 4.04 8. 3 122 } +End + +Begin Bass-15 + Voice Banjo + Rvolume 0 + Rtime 0 + Volume MP + Octave 5 + Sequence {1 4. 3 70; 1.5 4. 5 65; 1.75 4 1 65; 2 4 3 65; 2.25 8. 1 65; 2.5 8 5 65; 3 16 1 65; 3 16 3 65; 3 32 4 122; 3 16 5 65; 3.12 32 6 122; 3.25 32 5 122; 3.37 32 1 122; 3.5 32 7- 122; 3.62 32 3 122; 3.75 32 1 122; 3.87 32 2 122; 4 8. 3 122; 4 8. 5 122; 4 8. 1 122 } +End + +Begin Chord-16 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1.5 16 60; 2.5 16 60; 4 16 60 } +End + +DefGroove Ending-A A banjo run with a final chord. + + +////////////////////// +/////// Main-B +SeqClear +SeqSize 4 + +Begin Drum-KickDrum2 + Tone KickDrum2 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 111; 2 0 109; 2.08 0 0; 3 0 110; 3.08 0 0; 4 0 111; 4.08 0 0 } \ + {1 0 110; 1.08 0 0; 2 0 108; 2.08 0 0; 3 0 110; 3.08 0 0; 4 0 111; 4.08 0 0 } \ + {1 0 109; 2 0 108; 2.08 0 0; 3 0 109; 3.08 0 0; 4 0 108; 4.08 0 0 } \ + {1 0 110; 1.08 0 0; 2 0 111; 2.08 0 0; 3 0 110; 3.08 0 0; 4 0 110; 4.08 0 0 } +End + +Begin Drum-SnareDrum2 + Tone SnareDrum2 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1.25 0 35; 1.5 0 110; 1.58 0 0; 1.75 0 34; 2.25 0 35; 2.5 0 109; 2.58 0 0; 2.75 0 35; 3.25 0 36; 3.5 0 108; 3.58 0 0; 3.75 0 35; 4.25 0 34; 4.5 0 108; 4.58 0 0; 4.75 0 35 } \ + {1.25 0 34; 1.5 0 108; 1.58 0 0; 1.75 0 35; 2.25 0 36; 2.5 0 110; 2.58 0 0; 2.75 0 36; 3.25 0 35; 3.5 0 108; 3.58 0 0; 3.75 0 35; 4.25 0 36; 4.5 0 108; 4.58 0 0; 4.75 0 34 } \ + {1.25 0 36; 1.5 0 108; 1.58 0 0; 1.75 0 36; 2.25 0 36; 2.5 0 110; 2.58 0 0; 2.75 0 34; 3.25 0 35; 3.5 0 108; 3.58 0 0; 3.75 0 35; 4.25 0 36; 4.5 0 111; 4.58 0 0; 4.75 0 34 } \ + {1.25 0 35; 1.5 0 110; 1.58 0 0; 1.75 0 35; 2.25 0 35; 2.5 0 111; 2.58 0 0; 2.75 0 72; 3.25 0 35; 3.5 0 109; 3.58 0 0; 3.75 0 36; 4.25 0 36; 4.5 0 109; 4.58 0 0; 4.75 0 34 } +End + +Begin Drum-RideBell + Tone RideBell + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 90; 1.5 0 90; 2 0 90; 2.5 0 90; 3 0 90; 3.5 0 90; 4 0 90; 4.5 0 90 } \ + {1 0 90; 1.5 0 90; 2 0 90; 2.5 0 90; 3 0 90; 3.5 0 90; 4 0 90; 4.5 0 90 } \ + {1 0 90; 1.5 0 90; 2 0 90; 2.5 0 90; 3 0 90; 3.5 0 90; 4 0 90; 4.5 0 90 } \ + {1 0 90; 1.5 0 90; 2 0 90; 2.5 0 90; 3 0 90; 3.5 0 90; 4 0 90; 4.5 0 90 } +End + +Begin Bass-9 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Octave 4 + Sequence {1 32 7- 90; 1.5 32 7- 90; 2 32 7- 90; 2.5 32 7- 90; 3 32 7- 90; 3.5 32 7- 90; 4 32 7- 90; 4.5 32 7- 90 } \ + {1 32 7- 90; 1.5 32 7- 90; 2 32 7- 90; 2.5 32 7- 90; 3 32 7- 90; 3.5 32 7- 90; 4 32 7- 90; 4.5 32 7- 90 } \ + {1 32 7- 90; 1.5 32 7- 90; 2 32 7- 90; 2.5 32 7- 90; 3 32 7- 90; 3.5 32 7- 90; 4 32 7- 90; 4.5 32 7- 90 } \ + {1 32 7- 90; 1.5 32 7- 90; 2 32 7- 90; 2.5 32 7- 90; 3 32 7- 90; 3.5 32 7- 90; 4 32 7- 90; 4.5 32 7- 90 } +End + +Begin Bass-11 + Voice AcousticBass + Rvolume 0 + Rtime 0 + Volume MP + Octave 3 + Sequence {1 8 1 110; 1.5 8 1 90; 2 8 5 110; 2.5 8 6 110; 3 8 1 110; 3.5 8 5 90; 4 8 6 90; 4.5 8 5 90 } \ + {1 8 1 110; 1.5 8 1 90; 2 8 5 110; 2.5 8 6 110; 3 8 1 110; 3.5 8 1 90; 4 8 7- 90; 4.5 8 6 90 } \ + {1 8 1 110; 1.5 8 1 90; 2 8 5 110; 2.5 8 1 90; 3 8 1 110; 3.5 8 4 90; 4 8 5 110; 4.5 8 6 90 } \ + {1 8 1 110; 1.5 8 1 90; 2 8 5 110; 2.5 8 1 90; 3 8 1 110; 3.5 8 1 90; 4 8 5 110; 4.5 8 6 110 } +End + +Begin Chord-12 + Voice SteelGuitar + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 4 + Sequence {1.5 16 75; 2.5 16 75; 3.5 32 75; 4.25 32 70; 4.5 16 75 } \ + {1.5 16 75; 2.5 16 75; 3.5 32 75; 4.5 16 75 } \ + {1.5 16 75; 2.5 16 75; 3.5 32 75; 4.5 16 75 } \ + {1.5 16 75; 2.5 16 75; 3.5 16 75; 4.5 16 75 } +End + +Begin Bass-13 + Voice CleanGuitar + Rvolume 0 + Rtime 0 + Volume MP + Octave 4 + Sequence {1 8 7- 80; 2 8 5 80; 3 8 7- 80; 4 8 5 80 } \ + {1 8 7- 80; 2 8 5 80; 3 8 7- 80; 4 8 5 80 } \ + {1 8 7- 80; 2 8 5 80; 3 8 7- 80; 4 8 5 80 } \ + {1 8 7- 80; 2 8 5 80; 3 8 7- 80; 4 8 5 80 } +End + +Begin Bass-14 + Voice Violin + Rvolume 0 + Rtime 0 + Volume MP + Octave 6 + Sequence {1 1 5 71; 1 1 7- 71 } z {1 1 5 71; 1 1 7- 71 } z +End + +Begin Bass-15 + Voice Banjo + Rvolume 0 + Rtime 0 + Volume MP + Octave 6 + Sequence {1 16 2# 117; 1.25 16 3 117; 1.5 16 1 117; 1.75 16 2# 117; 2 16 3 117; 2.25 16 1 117; 2.5 16 1 117; 2.75 16 2# 117; 3 16 3 117; 3.25 16 1 117; 3.5 16 2# 117; 3.75 16 3 117; 4 16 2# 117; 4.25 16 3 117; 4.5 16 1 117; 4.75 16 5 117 } \ + {1 16 1 117; 1.25 16 2# 117; 1.5 16 3 117; 1.75 16 1 117; 2 16 1 117; 2.25 16 2# 117; 2.5 16 3 117; 2.75 16 1 117; 3 16 3 117; 3.25 16 2 117; 3.5 16 2 117; 3.75 16 2# 117; 4 16 3 117; 4.25 16 5 117; 4.5 16 6 117; 4.75 16 7- 117 } \ + {1 16 6 117; 1.25 16 1 117; 1.5 16 2 117; 1.75 16 3 117; 2 16 5 117; 2.25 16 6 117; 2.5 16 5 117; 2.75 16 2# 117; 3 16 3 117; 3.25 16 2 117; 3.5 16 1 117; 3.75 16 5 117; 4 16 2# 117; 4.25 16 3 117; 4.5 16 2 117; 4.75 16 1 117 } \ + {1 16 2# 117; 1.25 16 3 117; 1.5 16 1 117; 1.75 16 2# 117; 2 16 3 117; 2.25 16 4 117; 2.5 16 5 117; 2.75 16 6 117; 3 16 2# 117; 3.25 16 3 117; 3.5 16 1 117; 3.75 16 5 117; 4 16 2# 117; 4.25 16 3 117; 4.5 16 5 117; 4.75 16 1 117 } +End + +Begin Chord-16 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1.5 16 60; 2.5 16 60; 3.5 32 60; 4.5 16 60 } \ + {1.5 16 60; 2.5 16 60; 3.5 32 60; 4.5 16 60 } \ + {1.5 16 60; 2.5 16 60; 3.5 32 60; 4.5 16 60 } \ + {1.5 16 60; 2.5 16 60; 3.5 16 60; 4.5 16 60 } +End + +DefGroove Main-B Very blue-grassy with picked banjo. + + +////////////////////// +/////// Fill-BA +SeqClear +SeqSize 1 + +Begin Drum-KickDrum2 + Tone KickDrum2 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 110; 2 0 111; 2.08 0 0; 3 0 108; 3.08 0 0; 4.5 0 89 } +End + +Begin Drum-SnareDrum2 + Tone SnareDrum2 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1.25 0 35; 1.5 0 110; 1.58 0 0; 1.75 0 35; 2.25 0 35; 2.5 0 111; 2.58 0 0; 2.75 0 72; 4.5 0 110; 4.58 0 0; 4.75 0 110 } +End + +Begin Drum-HighTom1 + Tone HighTom1 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {4 0 110 } +End + +Begin Drum-RideBell + Tone RideBell + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 90; 1.5 0 90; 2 0 90; 2.5 0 90; 3 0 68; 3.5 0 71 } +End + +Begin Drum-CrashCymbal2 + Tone CrashCymbal2 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {4.97 0 110 } +End + +Begin Bass-9 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Octave 4 + Sequence {1 32 7- 90; 1.5 32 7- 90; 2 32 7- 90; 2.5 32 7- 90; 3 32 7- 68; 3.5 32 7- 71 } +End + +Begin Bass-11 + Voice AcousticBass + Rvolume 0 + Rtime 0 + Volume MP + Octave 3 + Sequence {1 8 1 110; 1.5 8 1 90; 2 8 5 110; 2.5 8 1 90; 3 4. 1 110 } +End + +Begin Chord-12 + Voice SteelGuitar + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 4 + Sequence {1.5 16 75; 2.5 16 75; 3 4. 75; 3.04 4. 75; 3.06 4. 75 } +End + +Begin Bass-13 + Voice CleanGuitar + Rvolume 0 + Rtime 0 + Volume MP + Octave 4 + Sequence {1 8 7- 80; 2 8 5 80; 3 4. 5 83; 3.03 4. 7- 83; 3.04 4. 3 83 } +End + +Begin Bass-14 + Voice Violin + Rvolume 0 + Rtime 0 + Volume MP + Octave 6 + Sequence {1 4. 5 83; 1 4. 7- 83; 3 4. 5 71; 3 4. 7- 71 } +End + +Begin Bass-15 + Voice Banjo + Rvolume 0 + Rtime 0 + Volume MP + Octave 5 + Sequence {1 16 2# 110; 1.25 16 3 90; 1.5 16 1 90; 1.75 16 2# 90; 2 16 3 90; 2.25 16 4 90; 2.5 16 5 110; 2.75 16 6 90; 3.07 16 5 127; 3.25 16 3 127; 3.5 16 1 127; 3.75 16 6 122; 4 8 1 122; 4.25 16 6 122; 4.5 16 5 122; 4.75 16 3 122 } +End + +Begin Chord-16 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1.5 16 60; 2.5 16 60; 3 4. 60 } +End + +DefGroove Fill-BA Somehow the train is running over the banjo. + + +////////////////////// +/////// Fill-BB +SeqClear +SeqSize 1 + +Begin Drum-ScratchPush + Tone ScratchPush + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {4.25 0 127 } +End + +Begin Drum-Sticks + Tone Sticks + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {3 0 110; 4 0 96; 4.09 0 0; 4.5 0 96; 4.59 0 0 } +End + +Begin Drum-KickDrum2 + Tone KickDrum2 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 110; 2 0 111; 2.08 0 0; 3 0 108; 3.08 0 0; 4.5 0 89; 4.58 0 0 } +End + +Begin Drum-SnareDrum2 + Tone SnareDrum2 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1.25 0 35; 1.33 0 0; 1.5 0 110; 1.58 0 0; 1.75 0 35; 2.25 0 35; 2.5 0 111; 2.75 0 72; 3.5 0 35; 3.75 0 111; 4 0 72; 4.25 0 67; 4.75 0 68 } +End + +Begin Drum-RideBell + Tone RideBell + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 90; 1.5 0 90; 2 0 90; 2.5 0 90; 2.58 0 0; 3 0 90; 3.5 0 90; 3.58 0 0; 4 0 90; 4.5 0 90 } +End + +Begin Drum-CrashCymbal2 + Tone CrashCymbal2 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {4.97 0 110 } +End + +Begin Bass-9 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Octave 4 + Sequence {1 32 7- 90; 1.5 32 7- 90; 2 32 7- 90; 2.5 32 7- 90; 3 32 7- 90; 3.5 32 7- 90; 4 32 7- 90; 4.5 32 7- 90 } +End + +Begin Bass-11 + Voice AcousticBass + Rvolume 0 + Rtime 0 + Volume MP + Octave 3 + Sequence {1 8 1 110; 1.5 8 1 90; 2 8 5 110; 2.5 8 6 110; 3 8 1 110; 3.5 8 5 90; 4 8 6 110; 4.5 8 7- 90 } +End + +Begin Chord-12 + Voice SteelGuitar + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 4 + Sequence {1.5 16 75; 2.5 16 75; 3.5 16 75; 4.5 16 75 } +End + +Begin Bass-13 + Voice CleanGuitar + Rvolume 0 + Rtime 0 + Volume MP + Octave 4 + Sequence {1 8 7- 80; 2 8 5 80; 3 8 7- 80; 4 8 5 80 } +End + +Begin Bass-14 + Voice Violin + Rvolume 0 + Rtime 0 + Volume MP + Octave 6 + Sequence {1 4. 5 83; 1 4. 7- 83; 3 4. 5 71; 3 4. 7- 71 } +End + +Begin Bass-15 + Voice Banjo + Rvolume 0 + Rtime 0 + Volume MP + Octave 5 + Sequence {1 4. 1 127; 1.03 4. 3 127; 1.07 4. 5 127; 1.75 16 6 122; 2 8 1 122; 2.25 16 6 122; 2.5 16 5 122; 2.75 16 3 122; 3.5 16 3 60; 3.5 16 5 60; 3.5 16 1 60; 4.5 16 3 60; 4.5 16 5 60; 4.5 16 1 60 } +End + +Begin Chord-16 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1.5 32 60; 2.5 16 60; 3 16 110; 3.25 16 90; 3.5 16 90; 3.75 16 90; 4 16 110; 4.25 16 90; 4.5 16 90; 4.75 16 90 } +End + +DefGroove Fill-BB And I thought the banjo had been run over. + + +////////////////////// +/////// Intro-B +SeqClear +SeqSize 4 + +Begin Drum-KickDrum2 + Tone KickDrum2 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 109; 3 0 108 } \ + {1 0 111; 3 0 110 } \ + {1 0 109; 3 0 111 } \ + {1 0 108; 3 0 108; 4.25 0 90 } +End + +Begin Drum-SnareDrum2 + Tone SnareDrum2 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence z z z {3.75 0 88 } +End + +Begin Drum-MidTom2 + Tone MidTom2 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence z z z {4.75 0 72 } +End + +Begin Drum-MidTom1 + Tone MidTom1 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence z z z {4 0 67; 4.08 0 0; 4.5 0 88 } +End + +Begin Drum-RideBell + Tone RideBell + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {2 0 90; 4 0 91 } \ + {2 0 89; 4 0 89 } \ + {2 0 91; 4 0 90 } \ + {2 0 89; 4 0 90 } +End + +Begin Drum-CrashCymbal2 + Tone CrashCymbal2 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence z z z {4.97 0 109 } +End + +Begin Bass-9 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Octave 4 + Sequence {1 32 7- 90; 2 32 7- 90; 2.5 32 7- 90; 3 32 7- 90; 4 32 7- 90; 4.5 32 7- 90 } \ + {1 32 7- 90; 2 32 7- 90; 2.5 32 7- 90; 3 32 7- 90; 4 32 7- 90; 4.5 32 7- 90 } \ + {1 32 7- 90; 2 32 7- 90; 2.5 32 7- 90; 3 32 7- 90; 4 32 7- 90; 4.5 32 7- 90 } \ + {1 32 7- 90; 2 32 7- 90; 2.5 32 7- 90; 3 32 7- 90; 4 32 7- 90; 4.5 32 7- 90 } +End + +Begin Bass-11 + Voice AcousticBass + Rvolume 0 + Rtime 0 + Volume MP + Octave 3 + Sequence {1 1 1 110 } \ + {1 1 4 110 } \ + {1 1 1 110 } \ + {1 1 5 110 } +End + +Begin Chord-12 + Voice SteelGuitar + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 4 + Sequence {1 1 85 } \ + {1 1 85 } \ + {1 1 85 } \ + {1 1 85 } +End + +Begin Bass-13 + Voice CleanGuitar + Rvolume 0 + Rtime 0 + Volume MP + Octave 4 + Sequence {1 1 1 85; 1 1 5 85; 1 1 1 85 } \ + {1 1 4 85; 1 1 1 85; 1 1 4 85 } \ + {1 1 1 85; 1 1 5 85; 1 1 1 85 } \ + {1 1 5 85; 1 1 2 85; 1 1 5 85 } +End + +Begin Bass-14 + Voice Violin + Rvolume 0 + Rtime 0 + Volume MP + Octave 5 + Sequence {1 4. 5 75; 1.25 4. 3 70; 1.5 4. 1 70; 1.75 4 1 70; 2 4 3 75; 2.25 8. 1 70; 2.5 8 5 70; 2.75 16 1 70; 3 4. 3 75; 3.25 4. 5 70; 3.5 4. 1 70; 3.75 4 3 70; 4 4 1 75; 4.25 8. 1 70; 4.5 8 5 70; 4.75 16 3 70 } \ + {1 4. 6 75; 1.25 4. 1 70; 1.5 4. 4 70; 1.75 4 6 70; 2 4 1 75; 2.25 8. 1 70; 2.5 8 4 70; 2.75 16 6 70; 3 4. 1 75; 3.25 4. 4 70; 3.5 4. 1 70; 3.75 4 1 70; 4 4 6 75; 4.25 8. 4 70; 4.5 8 1 70; 4.75 16 1 70 } \ + {1 4. 3 75; 1.25 4. 1 70; 1.5 4. 1 70; 1.75 4 5 70; 2 4 3 75; 2.25 8. 1 70; 2.5 8 5 70; 2.75 16 3 70; 3 4. 1 75; 3.25 4. 5 70; 3.5 4. 1 70; 3.75 4 1 70; 4 4 5 75; 4.25 8. 1 70; 4.5 8 1 70; 4.75 16 5 70 } \ + {1 4. 7- 75; 1.25 4. 2 70; 1.5 4. 2 70; 1.75 4 5 70; 2 4 7- 75; 2.25 8. 2 70; 2.5 8 5 70; 2.75 16 2 70; 3 4. 7- 75; 3.25 4. 5 70; 3.5 4. 2 70; 3.75 4 2 70; 4 4 7- 75; 4.25 8. 5 70; 4.5 8 2 70; 4.75 16 2 70 } +End + +Begin Bass-15 + Voice Banjo + Rvolume 0 + Rtime 0 + Volume MP + Octave 5 + Sequence {1 4. 5 114; 1.25 4. 3 114; 1.5 4. 1 114; 1.75 4 1 114; 2 4 3 114; 2.25 8. 1 114; 2.5 8 5 114; 2.75 16 1 114; 3 4. 3 114; 3.25 4. 5 114; 3.5 4. 1 114; 3.75 4 3 114; 4 4 1 114; 4.25 8. 1 114; 4.5 8 5 114; 4.75 16 3 114 } \ + {1 4. 6 114; 1.25 4. 1 114; 1.5 4. 4 114; 1.75 4 6 114; 2 4 1 114; 2.25 8. 1 114; 2.5 8 4 114; 2.75 16 6 114; 3 4. 1 114; 3.25 4. 4 114; 3.5 4. 1 114; 3.75 4 1 114; 4 4 6 114; 4.25 8. 4 114; 4.5 8 1 114; 4.75 16 1 114 } \ + {1 4. 3 114; 1.25 4. 1 114; 1.5 4. 1 114; 1.75 4 5 114; 2 4 3 114; 2.25 8. 1 114; 2.5 8 5 114; 2.75 16 3 114; 3 4. 1 114; 3.25 4. 5 114; 3.5 4. 1 114; 3.75 4 1 114; 4 4 5 114; 4.25 8. 1 114; 4.5 8 1 114; 4.75 16 5 114 } \ + {1 4. 7- 114; 1.25 4. 2 114; 1.5 4. 2 114; 1.75 4 5 114; 2 4 7- 114; 2.25 8. 2 114; 2.5 8 5 114; 2.75 16 2 114; 3 4. 7- 114; 3.25 4. 5 114; 3.5 4. 2 114; 3.75 4 2 114; 4 4 7- 114; 4.25 8. 5 114; 4.5 8 2 114; 4.75 16 2 114 } +End + +Begin Chord-16 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 4 + Sequence {1 1 85 } \ + {1 1 85 } \ + {1 1 85 } \ + {1 1 85 } +End + +DefGroove Intro-B A banjo introduction. + + +////////////////////// +/////// Ending-B +SeqClear +SeqSize 1 + +Begin Drum-KickDrum2 + Tone KickDrum2 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 110; 2 0 111; 3 0 111 } +End + +Begin Drum-SnareDrum2 + Tone SnareDrum2 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1 0 36; 1.25 0 35; 1.5 0 109; 3 0 109; 3.08 0 0 } +End + +Begin Drum-MidTom1 + Tone MidTom1 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {1.75 0 89; 2 0 108; 2.08 0 0; 2.5 0 89 } +End + +Begin Drum-CrashCymbal1 + Tone CrashCymbal1 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {3 0 96; 3.09 0 0 } +End + +Begin Drum-CrashCymbal2 + Tone CrashCymbal2 + Rvolume 0 + Rtime 0 + Articulate 100 + Volume P + Sequence {3 0 111 } +End + +Begin Bass-9 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Octave 4 + Sequence {1 32 7- 68; 3 32 7- 68 } +End + +Begin Bass-11 + Voice AcousticBass + Rvolume 0 + Rtime 0 + Volume MP + Octave 2 + Sequence {1 8 1 110; 1.5 8 5 90; 2 8 6 90; 2.5 8 7- 90; 3 8 1 110 } +End + +Begin Chord-12 + Voice SteelGuitar + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1.5 8 75; 2.5 8 75; 3 8 85 } +End + +Begin Bass-13 + Voice CleanGuitar + Rvolume 0 + Rtime 0 + Volume MP + Octave 5 + Sequence {1 8 1 90; 2 8 5 90; 3 8 1 85; 3 8 5 85; 3 8 3 85; 3 8 1 85 } +End + +Begin Bass-14 + Voice Violin + Rvolume 0 + Rtime 0 + Volume MP + Octave 6 + Sequence {1 16 5 90; 1.25 16 1 90; 1.61 16 5 100; 1.86 16 1 90; 2.18 16 5 90; 2.5 16 6 90; 2.75 16 7- 90; 3 16 1 90 } +End + +Begin Bass-15 + Voice Banjo + Rvolume 0 + Rtime 0 + Volume MP + Octave 5 + Sequence {1 4. 3 70; 1.5 4. 5 65; 1.75 4 1 65; 2 4 3 65; 2.25 8. 1 65; 2.5 8 5 65; 3 16 5 65; 3 16 1 65; 3 16 3 65 } +End + +Begin Chord-16 + Voice Piano1 + Rvolume 0 + Rtime 0 + Volume MP + Voicing Mode=Optimal + Articulate 100 + Octave 5 + Sequence {1 4. 70; 1.5 4. 65; 1.75 4 65; 2 4 65; 2.25 8. 65; 2.5 8 65; 3 16 65 } +End + +DefGroove Ending-B Fiddle sounding end. Okay. + + +/// Groove Aliases. You should do something creative here! + + +Groove Main-A +DefGroove Main-C /// Alias definition from Main-A + +Groove Main-A +DefGroove Main-D /// Alias definition from Main-A + +Groove Intro-A +DefGroove Intro-C /// Alias definition from Intro-A + +Groove Ending-A +DefGroove Ending-C /// Alias definition from Ending-A + +Groove Fill-AA +DefGroove Fill-CC /// Alias definition from Fill-AA + +Groove Fill-AA +DefGroove Fill-DD /// Alias definition from Fill-AA + diff --git a/mma/ln-install b/mma/ln-install index 1fd9ee8..37ddfd0 100755 --- a/mma/ln-install +++ b/mma/ln-install @@ -1,8 +1,72 @@ -#!/bin/sh +#!/usr/bin/env python -echo Creating symbolic links for MMA. +import os, sys -ln -s `pwd` /usr/local/share/mma -ln -s `pwd`/mma.py /usr/local/bin/mma +def okay(msg): + print msg + a=raw_input(" Press to continue (anything else will terminate): ") -echo Done. \ No newline at end of file + if a: + sys.exit(1) + + return + + +# Simple python script to install mma from tarball +# This should be fixed to be more versatile. Volunteers? + +# Before we do anything, make sure we have an up-to-date python. + +pyMaj=2 +pyMin=4 + +if sys.version_info[0] < pyMaj or sys.version_info[1] < pyMin: + print + print "You need a more current version of Python to run MMA and this install script." + print "We're looking for something equal or greater than version %s.%s" % \ + (pyMaj,pyMin) + print "Current Python version is ", sys.version + print + sys.exit(0) + + +# Banner. Check to make sure user has root permissions. + +print """ +This script will install mma, the standard library and the +python modules using symbolic links to the current directory. +""" + +try: + u=os.getuid() +except: + u=1 + +if u: + okay("""You do not appear to be running this script as 'root' user. +Continuing will probably cause all kinds of strange errors +and a generally unsatisfactory experience. But, we can try... +""") + +dir = "/usr/local/share/mma" +exe = "/usr/local/bin/mma" + +if os.path.exists(dir): + okay("""The directory %s currently exists. Proceeding will overwrite +with a new link. YOU MAY LOSE DATA.""" % dir) + +if os.path.exists(exe): + okay("""The file %s currently exists. Proceeding will remove this +file with a new link. YOU MAY LOSE DATA.""" % exe) + +okay("""Okay, I'm ready to create the links. I will create 2 links: + - The main distribution and library at %s + - The callable executable at %s +""" % (dir, exe) ) + +os.system("ln -sf `pwd` %s" % dir) +os.system("ln -sf `pwd`/mma.py %s" % exe) + +print "Everything seems to be okay. We suggest you first update the database" +print "with the command mma -G." +print "Have Fun!" \ No newline at end of file diff --git a/mma/mma.py b/mma/mma.py index a2425e4..50092bf 100755 --- a/mma/mma.py +++ b/mma/mma.py @@ -18,7 +18,7 @@ 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 +Bob van der Poel """ diff --git a/mma/text/ANNOUNCE b/mma/text/ANNOUNCE index 9131c73..35403eb 100644 --- a/mma/text/ANNOUNCE +++ b/mma/text/ANNOUNCE @@ -1,20 +1,21 @@ -Version 1.0-RC2 of MMA - Musical MIDI Accompaniment - is now +Version 1.1 of MMA - Musical MIDI Accompaniment - is now available for downloading. Included in this release: - Improved support for windows path names. + Addition of ARIA tracks for auto-generated melodies, - A number of packaging issues resolved. + Fixed solo/harmony volumes, - Inclusion of mklibdoc.py for updating of lib docs from user contributed files. + Chord fixes, - Fractional RANGE settings for arpeggio and scale tracks. + New commands: NEWSET, DOCVAR, GROOVECLEAR, -This is our second version 1 release candidate. Please let me know -if anything is broken before we release the real 1.0! + -0 sync command line switch, + + Many library additions/enhancements, + + Minor bug fixes. -Please note the new web and email addresses. The old ones still work, -but not for long. Update your records. MMA is a accompaniment generator -- it creates midi tracks for a soloist to perform with. User supplied files contain diff --git a/mma/text/CHANGES-1.0 b/mma/text/CHANGES-1.0 new file mode 100644 index 0000000..96f6b71 --- /dev/null +++ b/mma/text/CHANGES-1.0 @@ -0,0 +1,55 @@ + +A new track, ARIA, has been added. This lets mma create melodies (sort of). + +Reorganized the solo extraction routine and harmony. This is now generating the + correct velocities for the harmony notes. + +Changed a number of chords and descriptions to match more standardized usage. Mostly in + 9ths and 11ths. Added some new chords and aliases. The descriptions are more detailed + as to exceptions. Please refer to the document chords.pdf for details. + +I've started to add things like: + + If Ndef ChordVoice + Set ChordVoice Piano2 + Endif + + to style files. This makes it much easier to change the feel of a style from + within a song file. See the softshoe lib file and the song L-O-V-E for a + simple example. + +To help in documenting the above, a new documentation command DOCVAR has been added. + You should have a DOCVAR for each user variable you use in a library file. + +It is sometimes useful to clear out current Groove definitions. So + the command GrooveClear has been added. + +Added NEWSET command. This is just like SET, but ONLY has an effect if the variable currently + does NOT have a value. So: + + NEWSet Foo something + + and + + If NDef Foo + Set Foo Something + Endif + + are identical. + +Added a SYNCRONIZATION command line flag. If you have a "-0" in the command line + MMA will add a very brief on/off event at the start of each midi track it + generates. You might find this helpful when lining up generated tracks in + multi-track editor. + +Added a mini-how-to text file on TIMIDITY. + +Added a split track program: util/timsplit.py. + + + + + + + + diff --git a/mma/text/CHANGES-1.0.rc1 b/mma/text/CHANGES-1.0.rc1 index 4bcb6b1..0a946fe 100644 --- a/mma/text/CHANGES-1.0.rc1 +++ b/mma/text/CHANGES-1.0.rc1 @@ -26,3 +26,5 @@ The install has changed a bit. I've renamed the old install script to cp-install The base distribution now includes the html documentation. + +October 15, 2006 -- released 1.0-RC2 diff --git a/mma/text/CHANGES-1.0.rc2 b/mma/text/CHANGES-1.0.rc2 new file mode 100644 index 0000000..efb3719 --- /dev/null +++ b/mma/text/CHANGES-1.0.rc2 @@ -0,0 +1,24 @@ + +Both ln-install and cp-install have been updated a bit. They now check + for the proper version of Python being installed and attempt to + verify that the user has root permissions. I'm not sure if the + check will always work (ie, on non-Unix systems) so it is wrapped + in try/except ... hopefully this will end one set of "can't install" + emails I get. + +In an effort to get the command line options back to reality, I have deleted + the following: -Ddm, -Dda, -Dim, -Dia, -Dcm, -Dca, -Dn. These options just + did some intermediate doc prep and should not be a part of MMA proper. + The program util/mmatabs.py creates the same data and is part of the + distribution. + +Changed mklibdoc.py to generate entries in alphabetic order. + +Fixed error reporting bug in parser. Constructs like "z*" would crash the + compiler. + +Changed TABs in source code to spaces. Please, if you decide to make + changes the proper-indent-for-python-according-to-bob is 4 spaces. + +November 13, 2006 +Released Version 1.0 --- bring out the funny hats and champagne! \ No newline at end of file diff --git a/mma/text/INSTALL b/mma/text/INSTALL index ca37f35..49d1370 100644 --- a/mma/text/INSTALL +++ b/mma/text/INSTALL @@ -20,15 +20,16 @@ MMA consists of several parts. They should be installed as follows: There are 2 install scripts you can use. -The first and recommended one is a shell script called ln-install. +The first and recommended one is a python script called ln-install. This simply creates the symbolic link /usr/local/share/mma pointing to the current directory where the uncompressed tar file you downloaded exists. I have used the link method for years now and it works fine. The only problem you have with this is that you must not delete or move the files from the tarball. -ln-install just has one line of code, a ln line. You must be root for this -to work: on a Linux system the command: +ln-install has only 2 important lines of code: both create a single +symbolic link. You must be root for this to work: on a Linux system +the command: su -c './ln-install' @@ -82,7 +83,7 @@ installing. Just issue the command './mma someMMAfile'. If you run the install script the existing /usr/local/bin/mma will be overwritten and your existing /usr/local/share/mma directory will be -renamed to /usr/local/share/mma-old. You will received prompts for +renamed to /usr/local/share/mma-old. You will receive prompts for this before action is taken. However, if you already have a backup directory you will need to delete this by hand. This just a bit of safety so I don't get blamed to deleting stuff off your (or my) hard diff --git a/mma/text/README b/mma/text/README index 0b0c3ce..4c6cad5 100644 --- a/mma/text/README +++ b/mma/text/README @@ -15,7 +15,7 @@ shortcomings. However, don't let the term BETA dissuade you from trying the program! It does produce very useful backing tracks! -Comments, etc. appreciated: bvdp@xplornet.com +Comments, etc. appreciated: bob@mellowood.ca Bob van der Poel, Feb/2002 diff --git a/mma/text/TIMIDITY b/mma/text/TIMIDITY new file mode 100644 index 0000000..6a73368 --- /dev/null +++ b/mma/text/TIMIDITY @@ -0,0 +1,98 @@ + +Using MMA files with the Timidity MIDI player. + +The program timidity is pretty neat. It lets people who don't have a +real, external sequencer (or a sequencer built in to a sound card) play +MIDI files though the computer sound system. Most distributions already +have this program installed. This file attempts to show a few tricks +I've learned. It is not a timidity how to or primer. + +Begin by making sure that you have timidity installed. Typing something like + + timidity + +from the command line should bring up a copyright message like: + + TiMidity++ version 2.13.2 -- MIDI to WAVE converter and player + Copyright (C) 1999-2004 Masanao Izumo + Copyright (C) 1995 Tuukka Toivonen + .............. + + +If you get a message with "command not found" ... then you'll have +to find and install timidity first. Check the docs and repositories +for your distribution. + +Now, try it with a real file: + + timidity somefile.mid + +should play the MIDI file specified though your computer sound system. +If it doesn't, stop and figure it out. Read the manual, etc. + +Timidity works by using something called a soundfont. Using this it +converts each MIDI sound instruction into an audio signal. Don't worry +about how it does that ... but, remember that quality of the generated +sound relies on the quality for the soundfont. The default distributions +I've seen have some pretty crappy sounds. + +So, upgrade the sounds by installing a better font. I've installed something +called Airfont 340.sf2 and it sounds good. I'll not give a link here (since +they do move around), but if you Google for "airfont + 340 + sf2" you should +find it. The file is about 80 MEG, so be patient. + +To get timidity to use an sf2 file you have to do 2 things: + + 1. Put the file somewhere that timidity can find it. In most cases + moving the file to /usr/share/timidity should do the trick. + + 2. Update the timidity config file. In my case I had to change 2 files: + + i. In /usr/share/timidity create the file timidity.cfg. It + has a single line: + + soundfont "Airfont 380.sf2" order=0 + + the quotes are there since the file name has a space in it. + + ii. In /etc/timidity create the link: + + cd /etc/timidity; ln -s /usr/share/timidity/timidity.cfg + +Of course, you'll have to do the above as root. + + +You can use timidity to create a wav file directly from a MMA midi. This +file can be used in a program like audacity. Simple: + + timidity -Ow -ooutfile.wav somefile.mid + +It is fun to split the MIDI tracks into separate audio tracks. That +way you can change, for example, the volume for the bass part only +in a program like audacity. Again, timidity is your friend. + +For this to work, you need to have a dummy sequence point in each +MMA MIDI track. When you generate the file, use the -0 option: + + mma -0 somefile.mma + +will generate somefile.mid with a "tick" at the start of all the tracks. +Now, check to see what tracks were created: + + mma -c somefile.mma + +Assuming that you have MIDI data on tracks 10, 15 and 16: + + for a in 10 15 16;do timidity -Ow -Q0 -Q-$a -o$a.wav;done + +A little program, timsplit.py, which does all the above for you +has been included in the the MMA distribution in the util directory. +Read the file README.timsplit for details. + +Have fun, + +Bvdp, March/2007 + + + + diff --git a/mma/text/TODO b/mma/text/TODO index 242d3cc..142827e 100644 --- a/mma/text/TODO +++ b/mma/text/TODO @@ -3,6 +3,3 @@ In anticipation of a real-soon-now 1.0 release more eg files need to be written to test more features. Fix -Dk to show option keywords. - -Move all text file to 'text' for distribution. Ensure no duplicate filenames since MAC is -case-INsensitive. \ No newline at end of file diff --git a/mma/util/README.mmatabs b/mma/util/README.mmatabs new file mode 100644 index 0000000..8cc21af --- /dev/null +++ b/mma/util/README.mmatabs @@ -0,0 +1,11 @@ + +Short usage file for mmatabs.py. + +This program is used to create the tables used in the MMA reference manual. +The program includes constant tables from the main MMA modules and creates +a series of latex files. Each file has a '.AUTO' extension. + +Really only useful in maintaining the docs ... but you're welcome to it. + +bvdp, October 2006. + diff --git a/mma/util/README.timsplit b/mma/util/README.timsplit new file mode 100644 index 0000000..97fcbf6 --- /dev/null +++ b/mma/util/README.timsplit @@ -0,0 +1,16 @@ + +Short usage file for timsplit.py. + +This program is used to create a set of wav tracks from a MMA +input file. You need MMA, the input file and timidity. The command: + + timsplit.py somefile.mma + +will create a MIDI file (the name is hardcoded to outfile.mid) and +then create a wav file for each track using timidity. + +Conversion takes a few minutes, depending on the soundfont you're using +and the size of the MIDI file. Be patient. + +bvdp, March 2007. + diff --git a/mma/util/mklibdoc.py b/mma/util/mklibdoc.py index 3c79e11..a952472 100755 --- a/mma/util/mklibdoc.py +++ b/mma/util/mklibdoc.py @@ -10,21 +10,21 @@ libpath = '' docpath = '' for p in installdir: - a = os.path.join(p, 'lib', '') - if os.path.isdir(a): - libpath=a - docpath = os.path.join(p, 'docs', 'html', 'lib') - break + a = os.path.join(p, 'lib', '') + if os.path.isdir(a): + libpath=a + docpath = os.path.join(p, 'docs', 'html', 'lib') + break if not libpath: - print "Can't find the MMA library!" - print "Please check your installation and/or change the search path in this program." - sys.exit(1) + print "Can't find the MMA library!" + print "Please check your installation and/or change the search path in this program." + sys.exit(1) try: - os.mkdir(docpath) + os.mkdir(docpath) except: - pass + pass index = [] links = [] @@ -32,81 +32,81 @@ links = [] print "Processing library files" def dodir(dir): - """ Process files in directory. """ + """ Process files in directory. """ - global index, links - newdirs = [] + global index, links + newdirs = [] - olib = os.path.join(docpath, dir) - if not os.path.isdir(olib): - try: - os.mkdir(olib) - except: - print "Can't create directory", olib - sys.exit(1) + olib = os.path.join(docpath, dir) + if not os.path.isdir(olib): + try: + os.mkdir(olib) + except: + print "Can't create directory", olib + sys.exit(1) - links.append("
  • %s

  • " % (dir, dir.title())) + links.append("
  • %s

  • " % (dir, dir.title())) - if dir.lower() == "stdlib": - index.append("

    These grooves can be used from a program just by using their name.

    ") + if dir.lower() == "stdlib": + index.append("

    These grooves can be used from a program just by using their name.

    ") - index.append("" % dir) - index.append("

    %s

    " % dir.title() ) + index.append("" % dir) + index.append("

    %s

    " % dir.title() ) - index.append("
      ") + index.append("
        ") - for f in os.listdir(libpath + dir): - this = os.path.join(libpath, dir, f) + for f in sorted(os.listdir(libpath + dir)): + this = os.path.join(libpath, dir, f) - if os.path.isdir(this): - newdirs.append(os.path.join(dir, f)) - continue + if os.path.isdir(this): + newdirs.append(os.path.join(dir, f)) + continue - if this.endswith('.mma'): - htmlfname = os.path.join(dir, f.replace('.mma' , '.html')) - htmldate = 0 - htmlout = os.path.join(docpath, htmlfname) - try: - htmldate = os.path.getmtime(htmlout) - except: - pass + if this.endswith('.mma'): + htmlfname = os.path.join(dir, f.replace('.mma' , '.html')) + htmldate = 0 + htmlout = os.path.join(docpath, htmlfname) + try: + htmldate = os.path.getmtime(htmlout) + except: + pass - libdate = 0 - try: - libdate = os.path.getmtime(this) - except: - print "NO, NO, NO --- let Bob know about this!" - pass # shouldn't ever happen! + libdate = 0 + try: + libdate = os.path.getmtime(this) + except: + print "NO, NO, NO --- let Bob know about this!" + pass # shouldn't ever happen! - if libdate < htmldate: - print "Skipping:", this + if libdate < htmldate: + print "Skipping:", this - else: - if htmldate == 0: - print "Creating:", htmlfname - else: - print "Updating:", htmlfname + else: + if htmldate == 0: + print "Creating:", htmlfname + else: + print "Updating:", htmlfname - err = os.system("mma -Dxh -w -n %s > %s" % (this, htmlout) ) - if err: - print "ERROR Creating %s" % htmlout - print " %s" % err - try: - os.remove(htmlout) - except: - pass - continue + err = os.system("mma -Dxh -w -n %s > %s" % (this, htmlout) ) + if err: + print "ERROR Creating %s" % htmlout + print " %s" % err + try: + os.remove(htmlout) + except: + pass + continue - index.append("
      • %s
      • " % (htmlfname, os.path.join(dir, f))) + index.append("
      • %s
      • " % (htmlfname, os.path.join(dir, f))) - index.append("
      ") + index.append("
    ") - if dir.lower() == "stdlib": - index.append('

    Use the following grooves with a "use" directive.

    ') + if dir.lower() == "stdlib": + index.append('

    Use the following grooves with a "use" directive.

    ') - for d in newdirs: - dodir(d) + for d in newdirs: + dodir(d) ############################## @@ -115,17 +115,17 @@ a = os.listdir(libpath) dirs = [] for b in a: - if os.path.isdir(libpath + b): - dirs.append(b) + if os.path.isdir(libpath + b): + dirs.append(b) dirs.sort() if dirs.count("stdlib"): - dirs.remove("stdlib") - dirs.insert(0, "stdlib") + dirs.remove("stdlib") + dirs.insert(0, "stdlib") for dir in dirs: - dodir(dir) + dodir(dir) out = file(os.path.join(docpath, 'index.html'), "w") @@ -179,15 +179,17 @@ information from the each library file:
  • The file description from the "Doc Note" directive. +
  • Any user variables documented in "DocVar" directives. +
  • Each groove description: This is the optional text following a DefGroove directive. -
      -
    • The sequence size. This is extracted from the current groove +
        +
      • The sequence size. This is extracted from the current groove information and was set with the SeqSize directive. It is displayed in a small box after the groove description. -
      • A "summary" of the voices used in the groove. Note that a +
      • A "summary" of the voices used in the groove. Note that a different voice or MIDI note is possible for each bar in the sequence size; however, this listing only lists the selection for the first bar. @@ -196,8 +198,8 @@ information from the each library file:

      If you find that you don't have some of the grooves listed below in your distribution - you need to run the program mklibdoc.py to update these docs. Not all style files are - distributed in the default MMA distribution. + you need to run the program mklibdoc.py to update these docs. Not all style files are + distributed in the default MMA distribution.


      Index

      @@ -205,10 +207,10 @@ information from the each library file: """) if links: - out.write("
        ") - out.write("\n".join(links)) - out.write("
      ") - out.write("
      ") + out.write("
        ") + out.write("\n".join(links)) + out.write("
      ") + out.write("
      ") out.write( "\n".join(index)) out.write(""" diff --git a/mma/util/mma-renum.py b/mma/util/mma-renum.py new file mode 100755 index 0000000..fbdb18b --- /dev/null +++ b/mma/util/mma-renum.py @@ -0,0 +1,72 @@ +#!/usr/bin/env python + +# Renumber a mma song file. Just take any lines +# which start with a number and do those sequenially. + +import sys, os + + +def usage(): + print "Mma-renum, (c) Bob van der Poel" + print "Re-numbers a mma song file and" + print " cleans up chord tabbing." + print "Overwrites existing file!" + print + sys.exit(1) + +if len(sys.argv[1:]) != 1: + print "mma-rnum: requires 1 filename argument." + usage() + +filename = sys.argv[1] +tempfile = filename + ".temp" + +if filename[0] == '-': + usage() + +if not os.path.exists(filename): + error("Can't access the file '%s'" % filename) + +try: + inpath = open(filename, 'r') +except: + usage() + +try: + outpath = open( tempfile, 'w') +except: + error("Can't open scratchfile '%s', error '%s'" % (tempfile, sys.exc_info()[0]) ) + +linenum = 1 + +for l in inpath: + l=l.rstrip() + s = l.split() + if s: + try: # only modify lines starting with a number + x=int(s[0]) + l='%-5s' % linenum + linenum += 1 + for a in s[1:]: + l += "%-4s " % a + except: + pass + outpath.write(l + "\n") + +inpath.close() +outpath.close() + +try: + os.remove(filename) +except: + error("Cannot delete '%s', new file '%s' remains", (filename, tempfile) ) + +try: + os.rename(tempfile, filename) +except: + error("Cannot rename '%s' to '%s'." (tempfile, filename) ) + + + + + diff --git a/mma/util/mmatabs.py b/mma/util/mmatabs.py new file mode 100755 index 0000000..ef85698 --- /dev/null +++ b/mma/util/mmatabs.py @@ -0,0 +1,82 @@ +#!/usr/bin/env python + +# create tex files of the mma midi constants + +import sys, os, commands + +sys.path.insert(0, "/usr/local/share/mma/MMA/") +from miditables import * +from chordtable import chords + +err, version = commands.getstatusoutput( "mma -v") +if err: + print "Can't get MMA version ... strange error!" + sys.ex + +def dodrums(order): + """ Print LaTex table of drum names. """ + + notenames = ['E\\flat', 'E', 'F', 'G\\flat', 'G', 'A\\flat', + 'A', 'B\\flat', 'B', 'C', 'D\\flat', 'D'] * 5 + + n=zip( drumNames, range(27,len(drumNames)+27), notenames ) + + if order == "a": + for a,v,m in sorted(n): + outfile.write ("\\insline{%s} {%s$^{%s}$}\n" % (a, v, m )) + + else: + for a,v,m in n: + outfile.write ("\\insline{%s} {%s$^{%s}$}\n" % (v, a, m)) + +def docrtls(order): + """ Print LaTex table of MIDI controller names. """ + + n=zip( ctrlNames, range(len(ctrlNames)) ) + + if order == "a": + for a,v in sorted(n): + outfile.write ("\\insline{%s} {%02x}\n" % (a, v)) + + else: + for a,v in n: + outfile.write("\\insline{%02x} {%s}\n" % (v, a)) + +def doinsts(order): + """ Print LaTex table of instrument names. """ + + n=zip( voiceNames, range(len(voiceNames)) ) + if order == "a": + for a,v in sorted(n): + a=a.replace('&', '\&') + outfile.write("\\insline{%s} {%s}\n" % (a, v)) + + else: + for a,v in n: + a=a.replace('&', '\&') + outfile.write( "\\insline{%s} {%s}\n" % (v, a)) + +def dochords(): + """ Print out a list of chord names and docs in LaTex. """ + + for n in sorted(chords.keys()): + nm=n.replace("#", '$\\sharp$') + nm=nm.replace('b', '$\\flat$') + outfile.write( "\\insline{%s}{%s}\n" % (nm, chords[n][2]) ) + + +for a,f,o in ( + ('m', docrtls, 'ctrlmidi.AUTO'), + ('a', docrtls, 'ctrlalpha.AUTO'), + ('m', dodrums, 'drumsmidi.AUTO'), + ('a', dodrums, 'drumsalpha.AUTO'), + ('m', doinsts, 'instmidi.AUTO'), + ('a', doinsts, 'instalpha.AUTO') ): + outfile = file(o, 'w') + f(a) + outfile.close() + +outfile = file("chordnames.AUTO", 'w') +dochords() +outfile.close() + diff --git a/mma/util/mup2mma.py b/mma/util/mup2mma.py new file mode 100755 index 0000000..f98c86b --- /dev/null +++ b/mma/util/mup2mma.py @@ -0,0 +1,256 @@ +#!/usr/bin/env python + +""" mup2mma extracts chords from a MUP music notation file and + creates a MMA file. For this to work the MUP file must use + the macro "C" for chord. In my MUP files I have the following: + + define C bold (11) chord above all: @ + + This script just checks all input lines and assumes that anything + starting with "C" is a chord line. + + Additional "features": + + Lines in the form "// TEMPO: xx" generate a Tempo entry + "time =" lines are parsed for common time signatures + repeats are inserted as comment lines + + 0.3 - added options: + -m add melody lines + -l add lyrics + -o overwrite + + 0.4 - reformatted output + + 0.5 - corrected melody/lyric notation. + + bvdp, Dec/2004 + +""" + +import os +import sys +import commands +import getopt + +# Useful functions + +def error(m=''): + print "Error: %s" % m + sys.exit(1) + +def usage(): + print "mup2mma - (c) Bob van der Poel" + print "Extract MMA data from MUP file." + print "Options:" + print " -o overwrite existing MMA file" + print " -m extract melody data" + print " -l extract lyric data" + print " -v print version" + sys.exit(0) + +# Global variables + +Version = '0.5' + +overwrite = 0 # set if overwrite of old mma file okay +doLyric = 0 # set if we want lyrics output +doMelody = 0 # set if we want melody output + + +# Parse command line, open files + + +try: + opts, args = getopt.gnu_getopt(sys.argv[1:], "omlv") +except getopt.GetoptError: + usage() + +for o,a in opts: + if o == '-o': + overwrite = 1 + elif o == '-l': + doLyric = 1 + elif o == '-m': + doMelody = 1 + elif o == '-v': + print Version + sys.exit(0) + else: + usage() + +if len(args) != 1: + error("Exactly 1 filename is required.") + +infile = args[0] + +outfile = os.path.basename(infile) +if outfile.endswith('.mup'): + outfile=outfile[:-4] +title=outfile.replace("-", ' ').title() +outfile += ".mma" + +try: + bars = file(infile) +except: + error("Can't open input file '%s'." % infile) + +if os.path.exists(outfile) and not overwrite: + error("File '%s' already exists." % outfile) + +try: + out=file(outfile, "w") +except: + error("Can't open output file '%s'." % outfile) + +# Input and output files open, start processing + +out.write( "// %s\n\n" % title) + +bnum = 1 + +donebar = 0 +melody = '' +lyric = '' +chordList=[] + +for b in bars: + b=b.strip() + if b=='': # skip empty lines + continue + + if b.startswith("// TEMPO:"): + out.write("Tempo %s\n\n" % b.split()[2]) + continue + + # Parse out time sig from MUP + + ck = b.split("=") + + if len(ck) and ck[0].strip() == 'time': + ts=ck[1].strip() + if ts in ('common', '4/4'): + beats = 4 + posStep = 1 + + elif ts in ('cut', '2/4', '2/2'): + beats = 2 + posStep = .5 + + elif ts=='3/4': + beats = 3 + posStep = 1 + + elif ts=='6/8': + beats = 6 + posStep = 1 + + elif ts=='12/8': + beats = 12 + posStep = 1 + else: + error("Uknown time sig, %s" % b) + + # Parse line number from MUP + + if b.startswith('// #') or b.startswith('//# '): + bnum = b[4:] + + # Parse out melody, lyric and chords. + # Melody must be a line starting with "M:" + # Lyric must be a line starting with "L:" + # Chord must be a line starting with "C " + + key = b.split()[0] + + + if key == 'M:' and doMelody: + melody = b.split(' ', 1)[1] + + elif key == 'L:' and doLyric: + lyric = b.split(' ', 1)[1] + + elif key == 'C': + ch = b[2:] + ch=ch.replace ('"', ' ') + ch=ch.replace('&', 'b') + ch = ch[:-1] + ch=ch.split(';') + + chordList = [] + pos = 1.0 + + for c in ch: + c = c.split() + off = c[0] + + # Strip out printing offset from chord. Since the position + # has been split off, we just strip out everything after the + # inital '['. If this doesn't work, then the MUP is wrong as well + # eg: 1.5[-5] becomes 1.5 + + if off.count('['): + off=off[:off.index('[')] + + count = float(off) + + while pos < count: + chordList.append('/') + pos += posStep + + chord=c[1] + if chord.upper()=="TACET" or chord.upper()=='N.C': + chord = 'z' + + chord = chord.replace('^', 'M') + chord = chord.replace('o', 'dim') + chord = chord.replace('\\(dim)', 'dim') + + chordList.append(chord ) + pos += posStep + + + elif key in ('bar', 'repeatend', 'endbar', 'dblbar', '(dblbar)', + 'repeatstart', 'repeatboth' ): + + out.write('%-4s' % bnum) + + if not chordList: + chordList = ['/'] + for a in chordList: + out.write((' %6s' % a).rstrip()) + chordList = [] + + if doMelody and melody: + out.write((' { %s }' % melody).rstrip()) + melody = '' + + if doLyric and lyric: + out.write((' [ %s ]' % lyric).rstrip()) + lyric = '' + + out.write('\n') + + + if key == 'repeatend': + out.write( "\n// RepeatEnd\n\n") + if key == 'repeatboth': + out.write( "\n// RepeatEnd\n\n") + out.write( "// Repeat\n\n") + if key == "repeatstart" or key=='(dblbar)': + out.write( "\n// Repeat\n\n") + + rpt = b.split()[1:] + + if len(rpt) and rpt[0] == "ending": + out.write( '\n// RepeatEnding\n\n') + + else: + pass # Just ignore other MUP stuff + +out.write('\n') +out.close() + + + + diff --git a/mma/util/timsplit.py b/mma/util/timsplit.py new file mode 100755 index 0000000..d4ba992 --- /dev/null +++ b/mma/util/timsplit.py @@ -0,0 +1,55 @@ +#!/usr/bin/env python + +# Create a set of wav files from MMA using timidity. + +import sys, os, commands + + +def usage(): + print "timsplit, (c) Bob van der Poel" + print "Create multi-track wav files using" + print " MMA files and timidity." + print + sys.exit(0) + +if len(sys.argv[1:]) != 1: + print "timsplit: requires 1 filename argument." + usage() + +filename = sys.argv[1] + +status, txt = commands.getstatusoutput("mma -c %s" % filename) + +if status: + print "timsplit error", status + print txt + sys.exit(1) + +# Get the track list + +ch=[] +for a in txt.split('\n'): + a=a.strip().split() + try: + ch.append(int(a[0])) + except: + pass + +ch.sort() +print "Found channels:", +for a in ch: + print a, +print + +# Create midi file + +status = os.system("mma -0 %s -foutfile.mid" % filename) + +if status: + sys.exit(1) + +# Create wav tracks with timidity + +for a in ch: + os.system("timidity -Ow -Q0 -Q-%s -o%s.wav outfile.mid" % (a,a) ) +