Example #1
0
    def handleCheck(self, widget):
        if self.nameEntry.get_text() != self.sndname:
            oldName = self.sndname
            self.sndname = self.nameEntry.get_text()
            copy = True
        else:
            copy = False

        ofile = open(Config.SNDS_INFO_DIR + "/" + self.sndname, "w")
        if self.loopedSound:
            tied = str(Config.INST_TIED)
        else:
            tied = str(Config.INST_SIMP)
        register = str(self.register)
        category = "mysounds"
        start = str(self.start)
        end = str(self.end)
        dur = str(self.dur)
        vol = str(self.volume)

        ofile.write("TamTam idf v1\n")
        ofile.write(self.sndname + "\n")
        ofile.write(tied + "\n")
        ofile.write(register + "\n")
        ofile.write(start + "\n")
        ofile.write(end + "\n")
        ofile.write(dur + "\n")
        ofile.write(vol + "\n")
        ofile.write(self.sndname + "\n")
        ofile.write(imagefile(self.sndname + ".png") + "\n")
        ofile.write(category)
        ofile.close()
        if copy:
            OS.system("cp " + Config.DATA_DIR + "/" + oldName + " " + Config.DATA_DIR + "/" + self.sndname)
Example #2
0
    def handleCheck(self, widget):
        if self.nameEntry.get_text() != self.sndname:
            oldName = self.sndname
            self.sndname = self.nameEntry.get_text()
            copy = True
        else:
            copy = False

        ofile = open(Config.SNDS_INFO_DIR + '/' + self.sndname, 'w')
        if self.loopedSound:
            tied = str(Config.INST_TIED)
        else:
            tied = str(Config.INST_SIMP)
        register = str(self.register)
        category = 'mysounds'
        start = str(self.start)
        end = str(self.end)
        dur = str(self.dur)
        vol = str(self.volume)

        ofile.write('TamTam idf v1\n')
        ofile.write(self.sndname + '\n')
        ofile.write(tied + '\n')
        ofile.write(register + '\n')
        ofile.write(start + '\n')
        ofile.write(end + '\n')
        ofile.write(dur + '\n')
        ofile.write(vol + '\n')
        ofile.write(self.sndname + '\n')
        ofile.write(imagefile(self.sndname + '.png') + '\n')
        ofile.write(category)
        ofile.close()
        if copy:
            OS.system('cp ' + Config.DATA_DIR + '/' + oldName + ' ' + \
                          Config.DATA_DIR + '/' + self.sndname)
Example #3
0
 def micRec(self, widget, mic):
 
     self.csnd.inputMessage("i5600 0 4")
     OS.arecord(4, "crop.csd", mic)
     self.micTimeout = gobject.timeout_add(200,
         self.loadMicInstrument, mic)
         
     self.instrumentPanel.set_activeInstrument(mic, True)
     self.setInstrument(mic)
Example #4
0
 def handleSound(self, widget, data=None):
     self.sndname = self.sounds[widget.props.value]
     fullname = Config.DATA_DIR + '/' + self.sndname
     results = OS.system("du -b %s" % fullname)
     if results[0] == 0:
         list = results[1].split()
         soundLength = float(list[0]) / 2 / 16000.
     self.nameEntry.set_text(self.sndname)
     self.set_values(soundLength)
     self.startAdjust.set_all( 0.01, 0, soundLength, .001, .001, 0)
     self.endAdjust.set_all( soundLength-0.01, 0, soundLength, .001, .001, 0)
     self.timeoutLoad = gobject.timeout_add(2000, self.loopSettingsDelay)
Example #5
0
 def micRec(self, widget, mic):
     self.csnd.inputMessage("i5600 0 4")
     OS.arecord(4, "crop.csd", mic)
     self.csnd.load_mic_instrument(mic)
 def micRec(self, widget, mic):
     self.csnd.inputMessage("i5600 0 4")
     OS.arecord(4, "crop.csd", mic)
     self.micTimeout = gobject.timeout_add(200, self.loadMicInstrument, mic)
     self.instrumentPanel.set_activeInstrument(mic, True)
     self.setInstrument(mic)
Example #7
0
 def micRec(self, widget, mic):
     self.csnd.inputMessage("i5600 0 4")
     OS.arecord(4, "crop.csd", mic)
     self.csnd.load_mic_instrument(mic)