Skip to content

Commit

Permalink
Preliminary support for multi wavetable windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
MaurizioB committed Apr 30, 2017
1 parent c3e7028 commit 3975acf
Show file tree
Hide file tree
Showing 6 changed files with 288 additions and 34 deletions.
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Features

Features in *italics* are still under development

- Works on Linux and Windows (Windows releases are experimental)
- Works on Linux, OSX and Windows (OSX/Windows releases are experimental)
- Direct sound parameter editing
- Virtual keyboard (with input from the computer keyboard)
- Dumping sounds from Blofeld
Expand Down Expand Up @@ -48,7 +48,7 @@ main directory:

$ ./Bigglesworth

For Windows, just visit the Releases_ page.
For OSX and Windows, just visit the Releases_ page.

Usage
-----
Expand Down
31 changes: 23 additions & 8 deletions bigglesworth/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,23 +272,38 @@ def __init__(self, app, args):
self.wave_import = WaveLoad(self)

#WAVETABLE
self.wave_table = WaveTableEditor(self)
self.librarian.wavetableAction.triggered.connect(lambda: [self.wave_table.show(), self.wave_table.activateWindow()])
self.wave_table.wavetable_send.connect(self.wavetable_send)
self.wavetable_list = []
self.librarian.wavetableAction.triggered.connect(self.wavetable_show)

self.midi_connect()
# self.dump_win.show()

if args.wavetable:
if args.wavetable is True:
self.wave_table.show()
self.wavetable_show()
if args.editor:
self.startup_show_editor(args.editor)

if self.settings.gGeneral.get_ShowUpdates(True):
self.startup_version_check()
# QtGui.QMessageBox.information(self.librarian, 'Test build', 'This is a test build!!! Have fun!')
# self.activate_editor(0, 0)

def wavetable_show(self):
if not self.wavetable_list:
self.new_wavetable()
else:
latest = self.wavetable_list[-1]
latest.show()
latest.activateWindow()

def new_wavetable(self):
wavetable_window = WaveTableEditor(self)
self.wavetable_list.append(wavetable_window)
wavetable_window.wavetable_send.connect(self.wavetable_send)
self.output_conn_state_change.connect(wavetable_window.midi_output_state)
wavetable_window.show()
wavetable_window.activateWindow()
wavetable_window.newWavetableAction.triggered.connect(self.new_wavetable)


def startup_show_editor(self, data):
def show_editor():
Expand Down Expand Up @@ -568,7 +583,7 @@ def midi_connect(self):
else:
blofeld_port.connect(self.input)
continue
elif client.name == 'Blofeld' and len(client.ports) == 1 and client.ports[0].name == 'Blofeld MIDI ':
elif client.name == 'Blofeld' and len(client.ports) == 1 and client.ports[0].name.startswith('Blofeld MIDI 1'):
self.graph.port_id_dict[cid][0].connect(self.seq.client_id, self.input.id)
# self.graph.port_id_dict[self.seq.client_id][self.output.id].connect(cid, 0)
self.output.connect(cid, 0)
Expand Down Expand Up @@ -864,7 +879,7 @@ def device_response(self, sysex, parent):

def closeDetect(self, win=None):
if win:
win_list = set((self.librarian, self.editor, self.wave_table))
win_list = set((self.librarian, self.editor) + tuple(self.wavetable_list))
win_list.discard(win)
if any(win.isVisible() for win in win_list):
return True
Expand Down
6 changes: 2 additions & 4 deletions bigglesworth/dialogs/midi_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ def __init__(self, main, parent):
self.import_btn.clicked.connect(self.import_sounds)

self.dump_btn = QtGui.QPushButton('Dump all')
self.dump_btn.setEnabled(False)
self.dump_btn.setIcon(self.style().standardIcon(QtGui.QStyle.SP_ArrowRight))
self.buttonBox.addButton(self.dump_btn, QtGui.QDialogButtonBox.ActionRole)
self.dump_btn.clicked.connect(self.dump_sounds)
Expand Down Expand Up @@ -143,10 +144,7 @@ def currentChanged(self, index, prev):
self.apply_btn.setEnabled(False)

def midi_output_state(self, conn):
if conn:
state = True
else:
state = False
state = True if conn else False
self.dump_btn.setEnabled(state)
self.single_dump_btn.setEnabled(state)
self.doubleclick_dump_chk.setEnabled(state)
Expand Down
45 changes: 45 additions & 0 deletions bigglesworth/dialogs/wavetable_list.ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Dialog</class>
<widget class="QDialog" name="Dialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>196</width>
<height>247</height>
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="0">
<widget class="QPushButton" name="duplicate_btn">
<property name="text">
<string>Duplicate</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="delete_btn">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Delete</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="2">
<widget class="QTableView" name="wavetable_listview">
<attribute name="verticalHeaderVisible">
<bool>false</bool>
</attribute>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
Loading

0 comments on commit 3975acf

Please sign in to comment.