Skip to content

Commit

Permalink
bugfixes galore
Browse files Browse the repository at this point in the history
  • Loading branch information
pussinboot committed Oct 25, 2015
1 parent 2ee026f commit 515f841
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 15 deletions.
5 changes: 3 additions & 2 deletions mdvj/control_md.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,9 @@ def get_pad_container(self,lr,padno):

def select_pad(self,lr,padno):
pc = self.get_pad_container(lr,padno)
self.mdc.select_preset(pc.preset)
self.gui.queue.put(['pad',[lr, padno]])
if pc:
self.mdc.select_preset(pc.preset)
self.gui.queue.put(['pad',[lr, padno]])

def select_pad_gui(self,lr,padno):
if self.last_pad and self.last_pad != [lr, padno]: # deselect (in gui) last pad
Expand Down
Binary file added mdvj/error_scrot.bmp
Binary file not shown.
24 changes: 17 additions & 7 deletions mdvj/mdvj.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,25 @@ def __init__(self,root,mainprogram=None,path="C:/Program Files (x86)/Winamp/plug

#self.padgroup_l_n = -1
#self.padgroup_r_n = -1
#if starting_len > 1:
self.padgroup_l_n = 0
self.padgroup_r_n = 1
self.padgroup_l = SuperPadGroup(self,0)#,self.db[0])
self.padgroup_r = SuperPadGroup(self,1)#,self.db[1])
if starting_len > 1:
self.padgroup_l_n = 0
self.padgroup_r_n = 1
self.padgroup_l = SuperPadGroup(self,0)#,self.db[0])
self.padgroup_r = SuperPadGroup(self,1)#,self.db[1])
self.padgroups = [self.padgroup_l,self.padgroup_r]

else:
self.padgroup_l_n = 0
self.padgroup_r_n = 0
self.padgroup_l = SuperPadGroup(self,0)#,self.db[0])
self.padgroups = [self.padgroup_l,self.padgroup_l]
#else:
# if starting_len > 0:
# self.padgroup_l_n = 0
# self.padgroup_l = SuperPadGroup(self,0)#,self.db[0])
# else:
# self.padgroup_l = SuperPadGroup(self,0)
# self.padgroup_r = SuperPadGroup(self,1)
self.padgroups = [self.padgroup_l,self.padgroup_r]


self.controlframe = tk.Frame(self.frame)
Expand Down Expand Up @@ -155,6 +161,7 @@ def __init__(self,parent,lr):
self.show_group(self.current_group)

def show_group(self,groupno):
#if groupno < len(self.padgroup_cont):
self.current_group = groupno
cgroup = self.padgroup_cont[groupno]
cgroup.frame.tkraise()
Expand Down Expand Up @@ -201,7 +208,10 @@ def __init__(self,padgroup,preset,lr,padno):
self.padgroup = padgroup
self.preset = preset
self.coords = [lr,padno]
self.img = Image.open(self.preset.img)
try:
self.img = Image.open(self.preset.img)
except:
self.img = Image.open("error_scrot.bmp")
self.img = self.img.resize((150, 150), Image.ANTIALIAS)
self.img = ImageTk.PhotoImage(self.img)
self.label = tk.Label(self.padgroup.frame,image=self.img,text="",compound='top',width=150,bd=5)
Expand Down
3 changes: 3 additions & 0 deletions mdvj/midi_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,9 @@ def __init__(self,parent):
self.output_choice = tk.StringVar()
self.output_choice.set('-')

if self.inputs == []:
self.return_vals()

self.input_select = tk.OptionMenu(self.device_select_frame,self.input_choice,*self.inputs)
self.output_select = tk.OptionMenu(self.device_select_frame,self.output_choice,*self.outputs)

Expand Down
Binary file modified mdvj/saved_state
Binary file not shown.
12 changes: 6 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,14 @@
pywin32_whl = "https://pypi.python.org/packages/cp34/p/pypiwin32/pypiwin32-219-cp34-none-win32.whl"
setup(
name='mdvj',
version='0.5.0',

description='Milkdrop DJ Tool',
version='0.5.1',
description='Milkdrop VJ Tool',
long_description="""
mdvj - milkdrop vj midi controller
for use with novation twitch controller
""",
url='https://github.com/pussinboot/mdvj',

keywords='vj midi novation',
keywords='vj midi',
packages=['mdvj'],

install_requires=[
Expand All @@ -33,7 +31,9 @@
pygame_whl,
pywin32_whl
],

package_data={
'mdvj' : ['error_scrot.bmp']
},
entry_points = {
'console_scripts': [
'mdvj = mdvj.mdvj:main'
Expand Down

0 comments on commit 515f841

Please sign in to comment.