Exemplo n.º 1
0
 def onEntry(self, value):
     if type(value) != list:
         value = self.convertToList(value)
     if CeciliaLib.getVar("currentModule") is not None and self.rate == "k":
         getattr(CeciliaLib.getVar("currentModule"), self.name)(value)
     if self.popup is not None:
         self.popup[0].setValue(self.popup[1], True)
Exemplo n.º 2
0
    def onSavePreset(self):
        dlg = wx.TextEntryDialog(self, 'Enter preset name:', 'Saving Preset', self.currentPreset)

        if dlg.ShowModal() == wx.ID_OK:
            newPreset = CeciliaLib.ensureNFD(dlg.GetValue())
        else:
            newPreset = ''
        dlg.Destroy()

        if newPreset == '':
            CeciliaLib.showErrorDialog('Failed saving preset', 'You must give a name to your preset!')
            return
        if newPreset == 'init':
            CeciliaLib.showErrorDialog('Failed saving preset', '"init" is reserved. You must give another name to your preset!')
            return
        ok = True
        if newPreset in CeciliaLib.getVar("presets").keys():
            dlg2 = wx.MessageDialog(self, 'The preset you entered already exists. Are you sure you want to overwrite it?',
                                    'Existing preset!', wx.YES_NO | wx.NO_DEFAULT | wx.ICON_INFORMATION)
            if dlg2.ShowModal() == wx.ID_NO:
                ok = False
            dlg2.Destroy()

        if ok:
            self.currentPreset = newPreset
            CeciliaLib.savePresetToDict(self.currentPreset)
            self.presetChoice.setChoice(self.orderingPresetNames(), False)
            self.presetChoice.setStringSelection(self.currentPreset)
            CeciliaLib.saveCeciliaFile(self, showDialog=False)
Exemplo n.º 3
0
 def __init__(self,
              parent,
              label,
              init,
              rate,
              name,
              colour,
              tooltip,
              stack=False,
              output=True):
     self.type = "toggle"
     self.name = name
     self.rate = rate
     self.output = output
     if label != '':
         if stack:
             self.label = Label(parent,
                                label,
                                colour=colour[0],
                                size=(210, 20))
         else:
             self.label = Label(parent,
                                label,
                                colour=colour[0],
                                size=(100, 20))
         CeciliaLib.setToolTip(self.label, TT_TOGGLE)
     self.toggle = Toggle(parent,
                          init,
                          outFunction=self.onToggle,
                          colour=colour[1])
Exemplo n.º 4
0
 def openSpectrumWindow(self):
     if CeciliaLib.getVar('spectrumFrame') is None:
         f = SpectrumFrame(CeciliaLib.getVar("interface"))
         f.setAnalyzer(CeciliaLib.getVar("audioServer").spectrum)
         f.Center()
         f.Show()
         CeciliaLib.setVar('spectrumFrame', f)
Exemplo n.º 5
0
    def __init__(self, parent, choiceFunc, order):
        Plugin.__init__(self, parent, choiceFunc, order)
        self.pluginName = 'None'
        self.sizer = wx.FlexGridSizer(1, 4, 0, 0)
        revMenuBox = wx.BoxSizer(wx.VERTICAL)

        self.knob1 = PluginKnob(self, 0, 1, 0, size=(43, 70), label='None')
        self.knob1.setEnable(False)
        self.sizer.Add(self.knob1)

        self.knob2 = PluginKnob(self, 0, 1, 0, size=(43, 70), label='None')
        self.knob2.setEnable(False)
        self.sizer.Add(self.knob2)

        self.knob3 = PluginKnob(self, 0, 1, 0, size=(43, 70), label='None')
        self.knob3.setEnable(False)
        self.sizer.Add(self.knob3)

        self.createHeadBox()
        revMenuBox.Add(self.headBox, 0, wx.TOP, 0)
        self.choice = CustomMenu(self, choice=PLUGINS_CHOICE, init='None', size=(93, 18), colour=PLUGINPOPUP_BACK_COLOUR, outFunction=self.replacePlugin)
        CeciliaLib.setToolTip(self.choice, TT_POST_ITEMS)
        revMenuBox.Add(self.choice, 0, wx.TOP, 2)

        plugChoicePreset = wx.StaticText(self, -1, 'Type:')
        plugChoicePreset.SetFont(wx.Font(CONTROLSLIDER_FONT, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL))
        plugChoicePreset.SetForegroundColour(TEXT_LABELFORWIDGET_COLOUR)
        revMenuBox.Add(plugChoicePreset, 0, wx.TOP, 6)
        self.preset = CustomMenu(self, choice=['None'], init='None', size=(93, 18), colour=CONTROLLABEL_BACK_COLOUR)
        self.preset.setEnable(False)
        revMenuBox.Add(self.preset, 0, wx.TOP, 2)

        self.sizer.Add(revMenuBox, 0, wx.LEFT, 5)
        self.SetSizer(self.sizer)
Exemplo n.º 6
0
 def __init__(self, parent, label, name, values, init, colour, tooltip):
     self.name = name
     self.up = 1
     popupLabel = label.capitalize() + ' Voices'
     self.popup = CECPopup(parent,
                           popupLabel,
                           values,
                           init,
                           "i",
                           self.name + 'num',
                           colour,
                           tooltip=False,
                           output=False)
     chordLabel = label.capitalize() + ' Chords'
     self.chord = CECPopup(parent,
                           chordLabel,
                           sorted(POLY_CHORDS.keys()),
                           '00 - None',
                           "i",
                           self.name,
                           colour,
                           tooltip=False,
                           output=False)
     CeciliaLib.setToolTip(self.popup.label, TT_POLY_LABEL)
     CeciliaLib.setToolTip(self.chord.label, TT_POLY_CHORD)
Exemplo n.º 7
0
 def __init__(self, parent, label, name, colour, tooltip):
     self.type = "button"
     self.name = name
     self.label = Label(parent, label, colour=colour[0])
     self.button = Button(parent,
                          outFunction=self.onButton,
                          colour=(colour[1], colour[0]))
     CeciliaLib.setToolTip(self.label, TT_BUTTON)
Exemplo n.º 8
0
 def createSlidersPanel(self):
     panel = wx.Panel(self, -1, style=wx.BORDER_SIMPLE)
     panel.SetBackgroundColour(BACKGROUND_COLOUR)
     widgets = CeciliaLib.getVar("interfaceWidgets")
     box, sl = buildHorizontalSlidersBox(panel, widgets)
     CeciliaLib.setVar("userSliders", sl)
     panel.SetSizerAndFit(box)
     size = panel.GetSize()
     return panel, size
Exemplo n.º 9
0
 def createTogglePopupPanel(self):
     panel = wx.Panel(self, -1, style=wx.BORDER_SIMPLE)
     panel.SetBackgroundColour(BACKGROUND_COLOUR)
     widgets = CeciliaLib.getVar("interfaceWidgets")
     box, objs = buildTogglePopupBox(panel, widgets)
     panel.SetSizerAndFit(box)
     CeciliaLib.setVar("userTogglePopups", objs)
     size = panel.GetSize()
     return panel, objs, size
Exemplo n.º 10
0
 def openRecent(self, event):
     menu = self.GetMenuBar()
     id = event.GetId()
     file = menu.FindItemById(id).GetLabel().replace("\n", "").strip()
     if os.path.isfile(file):
         CeciliaLib.openCeciliaFile(self, file)
     else:
         CeciliaLib.showErrorDialog("Error while trying to open a file!", "No such file : %s" % file[:-1])
         self.newRecent(file, remove=True)
Exemplo n.º 11
0
 def onClose(self, event):
     CeciliaLib.setVar("interfaceSize", self.GetSize())
     CeciliaLib.setVar("interfacePosition", self.GetPosition())
     CeciliaLib.resetWidgetVariables()
     try:
         self.Destroy()
     except:
         pass
     CeciliaLib.getVar("mainFrame").SetFocus()
     CeciliaLib.getVar("mainFrame").Hide()
Exemplo n.º 12
0
 def marioSwitch(self, evt):
     if evt.GetInt() == 1:
         self.FindItemById(ID_MARIO).Check(1)
         for slider in CeciliaLib.getVar("userSliders"):
             slider.slider.useMario = True
             slider.slider.Refresh()
     else:
         self.FindItemById(ID_MARIO).Check(0)
         for slider in CeciliaLib.getVar("userSliders"):
             slider.slider.useMario = False
             slider.slider.Refresh()
Exemplo n.º 13
0
 def setPlay(self, x):
     if x:
         self.mode = 2
         data = CeciliaLib.getVar("grapher").plotter.data
         for line in data:
             if line.getName() == self.name:
                 line.setShow(1)
                 CeciliaLib.getVar("grapher").plotter.draw()
     else:
         self.mode = 0
     self.Refresh()
Exemplo n.º 14
0
 def onOpenBuiltin(self, event):
     menu = self.GetMenuBar()
     id = event.GetId()
     file = menu.FindItemById(id)
     filename = file.GetLabel()
     filedict = self.GetMenuBar().files
     for key in filedict.keys():
         if filename in filedict[key]:
             dirname = key
             break
     name = os.path.join(CeciliaLib.ensureNFD(MODULES_PATH), dirname, filename)
     CeciliaLib.openCeciliaFile(self, name, True)
Exemplo n.º 15
0
 def __init__(self, parent, label, init, rate, name, popup, colour,
              tooltip):
     self.type = "gen"
     self.name = name
     self.rate = rate
     self.popup = popup
     self.label = Label(parent, label, colour=colour[0])
     self.entry = ListEntry(parent,
                            ", ".join([str(x) for x in init]),
                            colour=colour[1],
                            outFunction=self.onEntry)
     CeciliaLib.setToolTip(self.label, TT_GEN)
Exemplo n.º 16
0
 def onOpenPrefModule(self, event):
     menu = self.GetMenuBar()
     id = event.GetId()
     file = menu.FindItemById(id)
     filename = file.GetLabel()
     filedir = file.GetMenu().GetTitle()
     prefPath = CeciliaLib.getVar("prefferedPath")
     prefPaths = prefPath.split(';')
     prefBaseNames = [os.path.basename(path) for path in prefPaths]
     dirname = prefPaths[prefBaseNames.index(filedir)]
     if dirname:
         name = os.path.join(dirname, filename)
         CeciliaLib.openCeciliaFile(self, name)
Exemplo n.º 17
0
 def onPresetSelect(self, idxPreset, newPreset):
     if newPreset in CeciliaLib.getVar("presets"):
         CeciliaLib.loadPresetFromDict(newPreset)
         for preset in CeciliaLib.getVar("presets"):
             if preset != newPreset:
                 CeciliaLib.getVar("presets")[preset]['active'] = False
         CeciliaLib.getVar("presets")[newPreset]['active'] = True
         self.currentPreset = newPreset
     elif newPreset == 'init':
         CeciliaLib.loadPresetFromDict("init")
         for preset in CeciliaLib.getVar("presets"):
             CeciliaLib.getVar("presets")[preset]['active'] = False
         self.currentPreset = "init"
Exemplo n.º 18
0
 def onRememberInputSound(self, event):
     if event.GetInt() == 1:
         CeciliaLib.getVar("interface").menubar.editMenu.FindItemById(ID_REMEMBER).Check(True)
         CeciliaLib.setVar("rememberedSound", True)
     else:
         CeciliaLib.getVar("interface").menubar.editMenu.FindItemById(ID_REMEMBER).Check(False)
         CeciliaLib.setVar("rememberedSound", False)
Exemplo n.º 19
0
    def createFileExportPanel(self, panel):
        fileExportPanel = wx.Panel(panel)
        fileExportPanel.SetBackgroundColour(BACKGROUND_COLOUR)

        box = wx.BoxSizer(wx.VERTICAL)

        # File Format
        textFileFormat = wx.StaticText(fileExportPanel, 0, 'File Format :')
        textFileFormat.SetForegroundColour(PREFS_FOREGROUND)
        textFileFormat.SetFont(self.font)
        self.choiceFileFormat = CustomMenu(
            fileExportPanel,
            choice=sorted(AUDIO_FILE_FORMATS.keys()),
            init=CeciliaLib.getVar("audioFileType"),
            size=(150, 20),
            outFunction=self.changeFileType)

        # Bit depth
        textBD = wx.StaticText(fileExportPanel, 0, 'Bit Depth :')
        textBD.SetForegroundColour(PREFS_FOREGROUND)
        textBD.SetFont(self.font)
        self.choiceBD = CustomMenu(fileExportPanel,
                                   choice=sorted(BIT_DEPTHS.keys()),
                                   size=(150, 20),
                                   outFunction=self.changeSampSize)
        for item in BIT_DEPTHS.items():
            if item[1] == CeciliaLib.getVar("sampSize"):
                self.choiceBD.setStringSelection(item[0])

        formatbox = wx.BoxSizer(wx.HORIZONTAL)
        formatbox.Add(textFileFormat, 0, wx.LEFT | wx.ALIGN_CENTER_VERTICAL, 5)
        formatbox.AddStretchSpacer(1)
        formatbox.Add(self.choiceFileFormat, 0,
                      wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, PADDING)

        depthbox = wx.BoxSizer(wx.HORIZONTAL)
        depthbox.Add(textBD, 0, wx.LEFT | wx.ALIGN_CENTER_VERTICAL, 5)
        depthbox.AddStretchSpacer(1)
        depthbox.Add(self.choiceBD, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT,
                     PADDING)

        box.Add(
            Separator(fileExportPanel, size=(350, 1),
                      colour=BACKGROUND_COLOUR))
        box.Add(formatbox, 0, wx.EXPAND | wx.BOTTOM, 7)
        box.Add(depthbox, 0, wx.EXPAND | wx.BOTTOM, 7)

        fileExportPanel.SetSizerAndFit(box)

        return fileExportPanel
Exemplo n.º 20
0
 def MouseRightDown(self, evt):
     if self._enable:
         rec = wx.Rect(5, 13, 45, 45)
         pos = evt.GetPosition()
         if rec.Contains(pos):
             if evt.ShiftDown():
                 self.setMidiCtl(None)
             else:
                 if CeciliaLib.getVar("useMidi"):
                     CeciliaLib.getVar("audioServer").midiLearn(self)
                     self.inMidiLearnMode()
                 else:
                     CeciliaLib.showErrorDialog("Midi not initialized!",
                         "There is no Midi interface connected!")
     evt.Skip()
Exemplo n.º 21
0
    def onDeletePreset(self):
        if self.currentPreset in CeciliaLib.getVar("presets"):
            dlg = wx.MessageDialog(self,
                                    'Preset %s will be deleted. Are you sure?' % self.currentPreset,
                                    'Warning!', wx.YES_NO | wx.NO_DEFAULT | wx.ICON_INFORMATION)
            if dlg.ShowModal() == wx.ID_NO:
                ok = False
            else:
                ok = True
            dlg.Destroy()

            if ok:
                CeciliaLib.deletePreset(self.currentPreset)
                self.presetChoice.setChoice(self.orderingPresetNames(), False)
                self.presetChoice.setStringSelection("")
                CeciliaLib.saveCeciliaFile(self, showDialog=False)
Exemplo n.º 22
0
def onStart():
    ceciliaMainFrame = CeciliaMainFrame.CeciliaMainFrame(None, -1)
    CeciliaLib.setVar("mainFrame", ceciliaMainFrame)

    file = ""
    if len(sys.argv) > 1:
        file = sys.argv[1]

    if os.path.isfile(file):
        ceciliaMainFrame.onOpen(file)
    else:
        categories = [folder for folder in os.listdir(MODULES_PATH) if not folder.startswith(".")]
        category = random.choice(categories)
        files = [f for f in os.listdir(os.path.join(MODULES_PATH, category)) if f.endswith(FILE_EXTENSION)]
        file = random.choice(files)
        ceciliaMainFrame.onOpen(os.path.join(MODULES_PATH, category, file), True)
Exemplo n.º 23
0
    def setAutomationData(self, data):
        # convert values on scaling
        temp = []
        log = self.getLog()
        minval = self.getMinValue()
        maxval = self.getMaxValue()
        automationlength = self.getAutomationLength()
        frac = automationlength / CeciliaLib.getVar("totalTime")
        virtuallength = len(data) / frac
        data.extend([data[-1]] * int(((1 - frac) * virtuallength)))
        totallength = float(len(data))
        oldpos = 0
        oldval = data[0]
        if log:
            maxOnMin = maxval / minval
            torec = math.log10(oldval / minval) / math.log10(maxOnMin)
        else:
            maxMinusMin = maxval - minval
            torec = (oldval - minval) / maxMinusMin
        temp.append([0.0, torec])

        for i, val in enumerate(data):
            length = (i - oldpos) / totallength
            pos = oldpos / totallength + length
            if log:
                torec = math.log10(val / minval) / math.log10(maxOnMin)
            else:
                torec = (val - minval) / maxMinusMin
            temp.append([pos, torec])
            oldval = val
            oldpos = i

        self.automationData = temp
    def __init__(self, parent, y_pos):
        wx.Frame.__init__(self, parent, -1, "", pos=(-1, y_pos),
                          style = wx.FRAME_SHAPED | wx.SIMPLE_BORDER | \
                                  wx.FRAME_NO_TASKBAR | wx.STAY_ON_TOP
                         )

        self.Bind(wx.EVT_PAINT, self.OnPaint)
        
        self.bmp = wx.Bitmap(os.path.join(RESOURCES_PATH, "Cecilia_splash.png"),
                             wx.BITMAP_TYPE_PNG)
        w, h = self.bmp.GetWidth(), self.bmp.GetHeight()
        self.SetClientSize((w, h))

        if wx.Platform == "__WXGTK__":
            self.Bind(wx.EVT_WINDOW_CREATE, self.SetWindowShape)
        else:
            self.SetWindowShape()

        dc = wx.ClientDC(self)
        dc.DrawBitmap(self.bmp, 0,0,True)

        self.fc = wx.FutureCall(3000, self.OnClose)

        self.Center(wx.HORIZONTAL)
        if CeciliaLib.getPlatform() == 'win32':
            self.Center(wx.VERTICAL)
            
        self.Show(True)
Exemplo n.º 25
0
    def newRecent(self, file, remove=False):
        if ".cecilia5" in file:
            return

        file = CeciliaLib.ensureNFD(file)
        filename = os.path.join(TMP_PATH, '.recent.txt')
        try:
            f = open(filename, "r")
            lines = [CeciliaLib.ensureNFD(line[:-1]) for line in f.readlines()]
            f.close()
        except:
            lines = []

        update = False
        if not remove:
            if file not in lines and 'Resources/modules/' not in file:
                lines.insert(0, file)
                update = True
        else:
            if file in lines:
                lines.remove(file)
                update = True

        if update:
            f = open(filename, "w")
            if len(lines) > 10:
                lines = lines[0:10]
            for line in lines:
                f.write(line + '\n')
            f.close()

        subId2 = ID_OPEN_RECENT
        recentFiles = []
        f = open(filename, "r")
        for line in f.readlines():
            recentFiles.append(line)
        f.close()
        if recentFiles:
            for item in self.menubar.openRecentMenu.GetMenuItems():
                self.menubar.openRecentMenu.Delete(item)
            for file in recentFiles:
                try:
                    self.menubar.openRecentMenu.Append(subId2, file)
                    subId2 += 1
                except:
                    pass
Exemplo n.º 26
0
 def createGrapher(self, evt=None):
     buildGrapher(self.grapher)
     for slider in CeciliaLib.getVar("userSliders"):
         slider.refresh()
     if CeciliaLib.getVar("presetToLoad") is not None:
         CeciliaLib.loadPresetFromDict(CeciliaLib.getVar("presetToLoad"))
         CeciliaLib.setVar("presetToLoad", None)
Exemplo n.º 27
0
    def getPage(self, word):
        if word == self.oldPage:
            self.fromToolbar = False
            return
        page_count = self.GetPageCount()
        for i in range(page_count):
            text = self.GetPageText(i)
            if text == word:
                self.oldPage = word
                if not self.fromToolbar:
                    self.sequence = self.sequence[0:self.seq_index + 1]
                    self.sequence.append(i)
                    self.seq_index = len(self.sequence) - 1
                    self.history_check()
                self.parent.setTitle(text)
                self.SetSelection(i)
                panel = self.GetPage(self.GetSelection())
                if not panel.isLoad:
                    panel.isLoad = True
                    panel.win = stc.StyledTextCtrl(panel, -1, size=panel.GetSize(), style=wx.BORDER_SUNKEN)
                    panel.win.SetUseHorizontalScrollBar(False)
                    panel.win.LoadFile(os.path.join(CeciliaLib.ensureNFD(DOC_PATH), word))
                    panel.win.SetMarginWidth(1, 0)
                    if self.searchKey is not None:
                        words = complete_words_from_str(panel.win.GetText(), self.searchKey)
                        _ed_set_style(panel.win, words)
                    else:
                        _ed_set_style(panel.win)
                    panel.win.SetSelectionEnd(0)

                    def OnPanelSize(evt, win=panel.win):
                        win.SetPosition((0, 0))
                        win.SetSize(evt.GetSize())

                    panel.Bind(wx.EVT_SIZE, OnPanelSize)
                self.fromToolbar = False
                return
        try:
            win = self.makePanel(CeciliaLib.getVar("currentCeciliaFile"))
            self.AddPage(win, word)
            self.getPage(word)
        except:
            pass
Exemplo n.º 28
0
 def positionToClientArea(self, pos, size):
     position = None
     screen = 0
     if pos is not None:
         for i in range(CeciliaLib.getVar("numDisplays")):
             off = CeciliaLib.getVar("displayOffset")[i]
             dispsize = CeciliaLib.getVar("displaySize")[i]
             Xbounds = [off[0], dispsize[0] + off[0]]
             Ybounds = [off[1], dispsize[1] + off[1]]
             if pos[0] >= Xbounds[0] and pos[0] <= Xbounds[1] and \
                pos[1] >= Ybounds[0] and pos[1] <= Ybounds[1]:
                 position = pos
                 screen = i
                 break
     dispsize = CeciliaLib.getVar("displaySize")[screen]
     if size[0] <= dispsize[0] and size[1] <= dispsize[1]:
         newsize = size
     else:
         newsize = (dispsize[0] - 50, dispsize[1] - 50)
     return position, newsize
Exemplo n.º 29
0
    def addPrefPath(self):
        currentPath = CeciliaLib.getVar("prefferedPath")

        path = ''
        dlg = wx.DirDialog(self,
                           message="Choose a folder...",
                           defaultPath=CeciliaLib.ensureNFD(
                               os.path.expanduser('~')))

        if dlg.ShowModal() == wx.ID_OK:
            path = dlg.GetPath()
        dlg.Destroy()

        if path and currentPath != '':
            path = currentPath + ';' + path
        elif not path:
            return

        CeciliaLib.setVar("prefferedPath", path)
        self.textPrefPath.SetValue(path)
Exemplo n.º 30
0
    def __init__(self, parent, choiceFunc, order):
        Plugin.__init__(self, parent, choiceFunc, order)
        self.pluginName = '3 Bands EQ'
        self.knobNameTemplates = ['plugin_%d_eq3b_low', 'plugin_%d_eq3b_mid', 'plugin_%d_eq3b_high']
        self.sizer = wx.FlexGridSizer(1, 4, 0, 0)
        revMenuBox = wx.BoxSizer(wx.VERTICAL)

        self.knob1 = PluginKnob(self, -60, 18, 0, size=(43, 70), log=False, outFunction=self.onChangeKnob1, label='Low')
        self.knob1.setName(self.knobNameTemplates[0] % self.order)
        self.knob1.setFloatPrecision(2)
        self.sizer.Add(self.knob1)

        self.knob2 = PluginKnob(self, -60, 18, 0, size=(43, 70), log=False, outFunction=self.onChangeKnob2, label='Mid')
        self.knob2.setName(self.knobNameTemplates[1] % self.order)
        self.knob2.setFloatPrecision(2)
        self.sizer.Add(self.knob2)

        self.knob3 = PluginKnob(self, -60, 18, 0, size=(43, 70), log=False, outFunction=self.onChangeKnob3, label='High')
        self.knob3.setName(self.knobNameTemplates[2] % self.order)
        self.knob3.setFloatPrecision(2)
        self.sizer.Add(self.knob3)

        self.setKnobLabels()

        self.createHeadBox()
        revMenuBox.Add(self.headBox, 0, wx.TOP, 0)
        self.choice = CustomMenu(self, choice=PLUGINS_CHOICE, init='3 Bands EQ', size=(93, 18), colour=PLUGINPOPUP_BACK_COLOUR, outFunction=self.replacePlugin)
        CeciliaLib.setToolTip(self.choice, TT_POST_ITEMS)
        revMenuBox.Add(self.choice, 0, wx.TOP, 2)

        plugChoicePreset = wx.StaticText(self, -1, 'Type:')
        plugChoicePreset.SetFont(wx.Font(CONTROLSLIDER_FONT, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL))
        plugChoicePreset.SetForegroundColour(TEXT_LABELFORWIDGET_COLOUR)
        revMenuBox.Add(plugChoicePreset, 0, wx.TOP, 6)
        self.preset = CustomMenu(self, choice=['Bypass', 'Active'], init='Active', size=(93, 18),
                                colour=CONTROLLABEL_BACK_COLOUR, outFunction=self.onChangePreset)
        self.presetName = 'plugin_%d_eq3b_preset' % self.order
        revMenuBox.Add(self.preset, 0, wx.TOP, 2)

        self.sizer.Add(revMenuBox, 0, wx.LEFT, 5)
        self.SetSizer(self.sizer)
Exemplo n.º 31
0
 def MacReopenApp(self):
     try:
         CeciliaLib.getVar("mainFrame").Raise()
     except:
         pass
Exemplo n.º 32
0
        ceciliaMainFrame.onOpen(os.path.join(MODULES_PATH, category, file), True)

if __name__ == '__main__':
    reload(sys)
    sys.setdefaultencoding('utf-8')

    if not os.path.isdir(TMP_PATH):
        os.mkdir(TMP_PATH)
    if not os.path.isfile(os.path.join(TMP_PATH,'.recent.txt')):
        f = open(os.path.join(TMP_PATH,'.recent.txt'), "w")
        f.close()
    if not os.path.isdir(AUTOMATION_SAVE_PATH):
        os.mkdir(AUTOMATION_SAVE_PATH)

    audioServer = audio.AudioServer()
    CeciliaLib.setVar("audioServer", audioServer)

    try:
        CeciliaLib.queryAudioMidiDrivers()
    except:
        pass

    app = CeciliaApp(redirect=False)
    wx.Log.SetLogLevel(0)
    wx.SetDefaultPyEncoding('utf-8')

    try:
        display = wx.Display()
        numDisp = display.GetCount()
        if CeciliaLib.getVar("DEBUG"):
            print 'Numbers of displays:', numDisp
Exemplo n.º 33
0
 def MacOpenFiles(self, filenames):
     if type(filenames) == ListType:
         filenames = filenames[0]
     if CeciliaLib.getVar("mainFrame") is not None:
         CeciliaLib.getVar("mainFrame").onOpen(filenames)