ADTLib

Automated Drum Transcription Library
Log | Files | Refs | README

ADT (1480B)


      1 #!/usr/bin/env python
      2 # -*- coding: utf-8 -*-
      3 """
      4 @author: CarlSouthall 
      5 ADT
      6 
      7 """
      8 from __future__ import absolute_import, division, print_function
      9 import argparse
     10 import ADTLib as ADT
     11 
     12 p = argparse.ArgumentParser(formatter_class=argparse.RawDescriptionHelpFormatter,description='''
     13    Flag	Name	          Description	Default                                         setting
     14    -h	help	          displays help file	                                            n/a
     15    -od	output_dir	      location output files are saved	                            current
     16    -o	output_text	      defines whether the output is stored in a textfile or not	        yes
     17    -ot  output_tab        defines whether a tabulature is created and saved to a pdf        yes
     18    I	input_file_names  single or list of wav file names seperated by spaces	            n/a
     19  
     20   For further usage help see github.com/CarlSouthall/ADTLib/usage.md  
     21     ''')
     22 p = argparse.ArgumentParser(prog='ADT')
     23 p.add_argument('I', nargs='*',help='InputFileNames')
     24 p.add_argument('-od', nargs=1,help='output_dir', default=None)
     25 p.add_argument('-o', nargs=1,help='output_text', choices=['yes','no'], default='yes')
     26 p.add_argument('-ot', nargs=1,help='output_tab', choices=['yes','no'], default='yes')
     27 args=p.parse_args()
     28 TrackNames=args.I
     29 
     30 if args.od!=None:
     31     args.od=args.od[0]
     32 if args.o!='yes':
     33     args.o=args.o[0]
     34 if args.ot!='yes':
     35     args.ot=args.ot[0]
     36     
     37 out=ADT.ADT(TrackNames, text=args.o, tab=args.ot, save_dir=args.od)
     38