Package jazzparser :: Package formalisms :: Package music_halfspan :: Module songtools :: Class RecogniseSongTool
[hide private]
[frames] | no frames]

Class RecogniseSongTool

source code

      object --+    
               |    
shell.tools.Tool --+
                   |
                  RecogniseSongTool

Instance Methods [hide private]
 
run(self, args, state)
Main operation of tool, taking arguments in args and reading and potentially manipulating the shell state.
source code

Inherited from shell.tools.Tool: process_option_list

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  name = 'Recognise song'
hash(x)
  commands = ['findsong', 'song']
  usage = ('findsong [<result-num>]', 'find the closest matching...
  help = 'Compares a parse result (the top probability one by de...
  tool_options = Tool.tool_options+ [ModuleOption('average', fil...
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

run(self, args, state)

source code 

Main operation of tool, taking arguments in args and reading and potentially manipulating the shell state.

By the time this is called, the options dict is available in self.options.

Overrides: shell.tools.Tool.run
(inherited documentation)

Class Variable Details [hide private]

usage

Value:
('findsong [<result-num>]',
 'find the closest matching song in the loaded songset')

help

Value:
'''Compares a parse result (the top probability one by default) to all\
 the songs 
in the loaded songset and finds the closest matches by tonal space pat\
h 
similarity. Outputs a list of the closest matches.
'''

tool_options

Value:
Tool.tool_options+ [ModuleOption('average', filter= int, usage= "avera\
ge=N, where B is an integer", help_text= "Average the distance measure\
 over that given " "by the top N results (starting at the result given\
 " "in the first argument, if given)"), ModuleOption('metric', usage= \
"metric=M, where M is the name of an available metric", help_text= "Se\
lect a metric to make the comparison with. " "Call with metric=help to\
 get a list of metrics"), ModuleOption('mopts', usage= "mopts=OPT=VAL:\
OPT=VAL:...", help_text= "Options to pass to the metric. Use mopts=hel\
...