コード例 #1
0
ファイル: model.py プロジェクト: shinglyu/MusicPupil
 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
コード例 #2
0
 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
コード例 #3
0
ファイル: model.py プロジェクト: shinglyu/MusicPupil
 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
コード例 #4
0
ファイル: model.py プロジェクト: shinglyu/MusicPupil
 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
コード例 #5
0
 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
コード例 #6
0
 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
コード例 #7
0
ファイル: model.py プロジェクト: shinglyu/MusicPupil
 def getTrainInputFilename(self, args, featName):
    svmFilename = config.sanitizeDirPath(args.outputDir)
    svmFilename += config.getModelFilename(args)
    svmFilename += "." + featName + ".train.input.dat"
    return svmFilename
コード例 #8
0
 def getTrainInputFilename(self, args, featName):
     svmFilename = config.sanitizeDirPath(args.outputDir)
     svmFilename += config.getModelFilename(args)
     svmFilename += "." + featName + ".train.input.dat"
     return svmFilename
コード例 #9
0
ファイル: musicGenerator.py プロジェクト: shinglyu/MusicPupil
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)