def getGenOutputFilename(self, args, featName): svmFilename = config.sanitizeDirPath(args.outputDir) svmFilename += config.getGenSampleName(args.input) + "." svmFilename += config.modelFuncName[0] + "." svmFilename += featName + "." svmFilename += "gen.output.dat" return svmFilename
def getSingleModelFilename(self, args, featName): if hasattr(args, "modelFilename"): # for gen case singleModelFilename = args.modelFilename else: # for train case singleModelFilename = config.sanitizeDirPath(args.outputDir) singleModelFilename += config.getModelFilename(args) singleModelFilename += "." + featName + ".model.bin" return singleModelFilename
def getQuantizeFilename(self, args, featName): if hasattr(args, "modelFilename"): # for gen case quantFilename = args.modelFilename else: # for train case quantFilename = config.sanitizeDirPath(args.outputDir) quantFilename += config.getModelFilename(args) quantFilename += "." + featName + ".quant" return quantFilename
def getTrainInputFilename(self, args, featName): svmFilename = config.sanitizeDirPath(args.outputDir) svmFilename += config.getModelFilename(args) svmFilename += "." + featName + ".train.input.dat" return svmFilename
def outputMidi(outSamp, args): outputFilename = config.sanitizeDirPath(args.outputDir) outputFilename += config.getGenSampleName(args.input) + '.expr.mid' #logging.printDebug(outputFilename) outScore = outSamp['score'] outScore.write('midi', outputFilename)