예제 #1
0
 def recStart(self, filename="", fileformat=0, sampletype=0):
     self.server.recordOptions(fileformat=fileformat, sampletype=sampletype)
     if not filename:
         filename = os.path.basename(QLiveLib.getVar("currentProject"))
     filename, ext = os.path.splitext(filename)
     filename = os.path.join(QLiveLib.getVar("projectFolder"), "bounce", filename)
     if fileformat >= 0 and fileformat < 8:
         ext = RECORD_EXTENSIONS[fileformat]
     else: 
         ext = ".wav"
     date = time.strftime('_%d_%b_%Y_%Hh%M')
     complete_filename = QLiveLib.toSysEncoding(filename+date+ext)
     self.server.recstart(complete_filename)
예제 #2
0
 def recStart(self, filename="", fileformat=0, sampletype=0):
     self.server.recordOptions(fileformat=fileformat, sampletype=sampletype)
     if not filename:
         filename = os.path.basename(QLiveLib.getVar("currentProject"))
     filename, ext = os.path.splitext(filename)
     filename = os.path.join(QLiveLib.getVar("projectFolder"),
                             "bounce", filename)
     if fileformat >= 0 and fileformat < 8:
         ext = RECORD_EXTENSIONS[fileformat]
     else:
         ext = ".wav"
     date = time.strftime('_%d_%b_%Y_%Hh%M')
     complete_filename = QLiveLib.toSysEncoding(filename+date+ext)
     self.server.recstart(complete_filename)
예제 #3
0
 def newRecent(self, file):
     filename = QLiveLib.ensureNFD(OPEN_RECENT_PATH)
     lines = QLiveLib.getRecentFiles()
     if not file in lines:
         f = codecs.open(filename, "w", encoding="utf-8")
         lines.insert(0, file)
         if len(lines) > 20:
             lines = lines[0:20]
         for line in lines:
             f.write(line + '\n')
         f.close()
     subId = 2000
     if lines != []:
         for item in self.submenu1.GetMenuItems():
             self.submenu1.DeleteItem(item)
         for file in lines:
             self.submenu1.Append(subId, QLiveLib.toSysEncoding(file))
             subId += 1
예제 #4
0
 def newRecent(self, file):
     filename = QLiveLib.ensureNFD(OPEN_RECENT_PATH)
     try:
         f = codecs.open(filename, "r", encoding="utf-8")
         lines = [line.replace("\n", "") for line in f.readlines()]
         f.close()
     except:
         lines = []
     if not file in lines:
         f = codecs.open(filename, "w", encoding="utf-8")
         lines.insert(0, file)
         if len(lines) > 20:
             lines = lines[0:20]
         for line in lines:
             f.write(line + '\n')
         f.close()
     subId = 2000
     if lines != []:
         for item in self.submenu1.GetMenuItems():
             self.submenu1.DeleteItem(item)
         for file in lines:
             self.submenu1.Append(subId, QLiveLib.toSysEncoding(file))
             subId += 1