Example #1
0
# We import the plugin utilities
from MMA import pluginUtils as pu

import datetime
from MMA.common import error, warning
from MMA.macro import macros
import MMA.gbl as gbl
import MMA.chordtable as chordtable
from MMA.chords import ChordNotes
import re
import random

# MMA required version.
pu.setMinMMAVersion(19, 7)

# A short plugin description.
pu.setDescription("""This plugin
processes a line of input and returns the line with
all chords revoiced.
""")

author = "Johan Vromans"
# A short author line.
pu.setAuthor("Written by {}".format(author))

try:
    pu.setSynopsis("""
    21 @revoice Cm D
    22 @revoice Cm7 Fm7
       @revoice Gm7
Example #2
0
# We import the plugin utilities
from MMA import pluginUtils as pu


# ###################################
# # Documentation and arguments     #
# ###################################

# We add plugin parameters and documentation here.
# The documentation will be printed either calling printUsage() or
# executing "python mma.py -I pluginname". 
# I suggest to see the output for this plugin to understand how code
# of this section will be formatted when printed.

# Minimum MMA required version.
pu.setMinMMAVersion(15, 12)

# A short plugin description.
pu.setDescription("Sets a strum pattern for Plectrum tracks.")

# A short author line.
pu.setAuthor("Written by Ignazio Di Napoli <*****@*****.**>.")

# Since this is a track plugin, we set the track types for which it can
# be used. You can specify more than one. To allow for all track types,
# call setTrackType with no arguments.
# For non-tracks plugin, don't call setTrackType at all.
# Whether the plugin is track or non-track is decided by the entry point,
# but help will use this information.
pu.setTrackType("Plectrum")
Example #3
0
# We import the plugin utilities
from MMA import pluginUtils as pu

import datetime

# Minimum MMA required version.
pu.setMinMMAVersion(16, 0)

# A short plugin description.
pu.setDescription("Adds a copyright notice to the MIDI.")

author = "Johan Vromans"
# A short author line.
pu.setAuthor("Written by {}".format(author))

# We add the arguments for the command, each with name, default value and a
# small description. A default value of None requires specifying the argument.
pu.addArgument("Author", author, "The name of the copyright holder")
pu.addArgument("Year", '{}'.format(datetime.date.today().year),
               "The (first) year the copyright is valid")

# We add a small doc. %NAME% is replaced by plugin name.
pu.setPluginDoc("""
This plugin adds a copyright notice to the MIDI output using MMA command MidiCopyright.

The copyright notice consists of the copyright symbol, followed by the year and author (the copyright holder). Both `year' and `author' are arguments to this plugin. 

As suggested by the MIDI specs, `(C)' is used as copyright symbol.

This plugin has been written by Johan Vromans <*****@*****.**>
Version 1.0.