Package list soundgrain / 374b380
Include upstream patch for fixing pyo imports Scott Talbert 1 year, 8 months ago
2 changed file(s) with 255 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 From 74209a97209e2b8405360d73ac17eaa785a066c1 Mon Sep 17 00:00:00 2001
1 From: Olivier Belanger <belangeo@gmail.com>
2 Date: Fri, 22 Feb 2019 21:02:59 -0500
3 Subject: [PATCH] Fixed imports for the new structure of pyo.
4
5 ---
6 Resources/CommandFrame.py | 2 +-
7 Resources/ControlPanel.py | 18 +++++++++---------
8 Resources/DrawingSurface.py | 2 +-
9 Resources/FxBall.py | 4 ++--
10 Resources/MainFrame.py | 2 +-
11 Resources/MidiSettings.py | 5 ++---
12 Resources/Modules.py | 2 +-
13 Resources/Trajectory.py | 2 +-
14 Resources/widgets.py | 2 +-
15 TODO.md | 27 ---------------------------
16 10 files changed, 19 insertions(+), 47 deletions(-)
17 delete mode 100644 TODO.md
18
19 diff --git a/Resources/CommandFrame.py b/Resources/CommandFrame.py
20 index 2c754a2..2c30de8 100644
21 --- a/Resources/CommandFrame.py
22 +++ b/Resources/CommandFrame.py
23 @@ -20,7 +20,7 @@
24 import wx, os, markdown, webbrowser
25 import wx.html as html
26 from Resources.constants import DOCUMENTATION_PATH
27 -from pyolib._wxwidgets import BACKGROUND_COLOUR
28 +from pyo.lib._wxwidgets import BACKGROUND_COLOUR
29
30 class MyHtmlWindow(html.HtmlWindow):
31 def __init__(self, parent):
32 diff --git a/Resources/ControlPanel.py b/Resources/ControlPanel.py
33 index b851a42..faf8e77 100644
34 --- a/Resources/ControlPanel.py
35 +++ b/Resources/ControlPanel.py
36 @@ -21,7 +21,7 @@
37 from Resources.constants import *
38 from Resources.audio import soundInfo
39 from Resources.widgets import ControlKnob
40 -from pyolib._wxwidgets import ControlSlider, VuMeter, BACKGROUND_COLOUR
41 +from pyo.lib._wxwidgets import ControlSlider, VuMeter, BACKGROUND_COLOUR
42
43 class ControlPanel(scrolled.ScrolledPanel):
44 def __init__(self, parent, surface):
45 @@ -54,10 +54,11 @@ def __init__(self, parent, surface):
46
47 # TODO: Check the size of this button on Windows and OSX
48 self.closedToggle = wx.ToggleButton(self, -1, 'Closed', size=self.trajType.GetSize())
49 + # If this is no more needed, remove the next three lines...
50 font = self.closedToggle.GetFont()
51 - if PLATFORM.startswith('linux') or PLATFORM == 'win32':
52 + if PLATFORM == 'win32':
53 font = wx.Font(8, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL)
54 - self.closedToggle.SetFont(font)
55 + self.closedToggle.SetFont(font) # ... and all related calls in this method.
56 typeBox.Add(self.closedToggle, wx.CENTER|wx.RIGHT, 5 )
57 box.Add(typeBox, 0, wx.CENTER|wx.ALL, 5)
58
59 @@ -137,7 +138,7 @@ def __init__(self, parent, surface):
60 srBox = wx.BoxSizer(wx.VERTICAL)
61 srText = wx.StaticText(self, -1, "Rate")
62 srBox.Add(srText, 0, wx.CENTER | wx.LEFT | wx.RIGHT, 5)
63 - self.pop_sr = wx.Choice(self, -1, choices = ['44100', '48000', '96000'], size=(80,-1))
64 + self.pop_sr = wx.Choice(self, -1, choices = ['44100', '48000', '96000'], size=(90,-1))
65 self.pop_sr.SetSelection(0)
66 self.pop_sr.Bind(wx.EVT_CHOICE, self.handleSamplingRate)
67 srBox.Add(self.pop_sr, 0, wx.LEFT | wx.RIGHT, 5)
68 @@ -195,7 +196,7 @@ def __init__(self, parent, surface):
69
70 self.tx_output = wx.TextCtrl( self, -1, "snd", size=(120, -1))
71 rec2Box.Add(self.tx_output, 0, wx.LEFT | wx.RIGHT, 10)
72 - self.tog_record = wx.ToggleButton(self, -1, "Start Rec", size=(65,-1))
73 + self.tog_record = wx.ToggleButton(self, -1, "Start", size=(65,-1))
74 self.tog_record.SetFont(font)
75 rec2Box.Add(self.tog_record, 1, wx.ALIGN_CENTER_VERTICAL | wx.EXPAND | wx.RIGHT, 10)
76
77 @@ -290,7 +291,6 @@ def checkEnableWidgets(self):
78 self.drawing.sl_period.Disable()
79 self.drawing.sl_scaling.Disable()
80
81 - # TODO: replace all these handle, get, set, with single event
82 def handleType(self, event):
83 self.processType(event.GetInt())
84
85 @@ -668,7 +668,7 @@ def handleAudio(self, event):
86 self.tog_audio.SetValue(0)
87 self.parent.menu.Check(7, False)
88 self.tog_record.SetValue(0)
89 - self.tog_record.SetLabel('Start Rec')
90 + self.tog_record.SetLabel('Start')
91 self.parent.sg_audio.stop()
92
93 def handleOutput(self, event):
94 @@ -693,9 +693,9 @@ def handleRecord(self, event):
95 else:
96 filename = os.path.join(os.path.expanduser('~'), "Desktop", self.tx_output.GetValue())
97 self.parent.sg_audio.recStart(filename, self.fileformat, self.sampletype)
98 - self.tog_record.SetLabel('Stop Rec')
99 + self.tog_record.SetLabel('Stop')
100 else:
101 - self.tog_record.SetLabel('Start Rec')
102 + self.tog_record.SetLabel('Start')
103 self.parent.sg_audio.recStop()
104
105 def chooseRecFolder(self, evt):
106 diff --git a/Resources/DrawingSurface.py b/Resources/DrawingSurface.py
107 index de5cb2e..90f9565 100644
108 --- a/Resources/DrawingSurface.py
109 +++ b/Resources/DrawingSurface.py
110 @@ -20,7 +20,7 @@
111 from Resources.constants import *
112 from Resources.FxBall import FxBall
113 from Resources.Trajectory import Trajectory
114 -from pyolib._wxwidgets import BACKGROUND_COLOUR
115 +from pyo.lib._wxwidgets import BACKGROUND_COLOUR
116
117 class MyFileDropTarget(wx.FileDropTarget):
118 def __init__(self, window):
119 diff --git a/Resources/FxBall.py b/Resources/FxBall.py
120 index f353a6a..e5c80cd 100644
121 --- a/Resources/FxBall.py
122 +++ b/Resources/FxBall.py
123 @@ -18,7 +18,7 @@
124 """
125 import wx, math
126 from .constants import *
127 -from pyolib._wxwidgets import ControlSlider
128 +from pyo.lib._wxwidgets import ControlSlider
129
130 class FxBallControls(wx.Frame):
131 def __init__(self, parent, fxball, sg_audio, size=(270, 200)):
132 @@ -275,4 +275,4 @@ def openControls(self, pos):
133 self.controls.Show()
134
135 def hideControls(self):
136 - self.controls.Hide()
137 \ No newline at end of file
138 + self.controls.Hide()
139 diff --git a/Resources/MainFrame.py b/Resources/MainFrame.py
140 index 115a017..aac88da 100644
141 --- a/Resources/MainFrame.py
142 +++ b/Resources/MainFrame.py
143 @@ -21,7 +21,7 @@
144 from Resources.constants import *
145 from Resources.audio import *
146 from Resources.Modules import *
147 -from pyolib._wxwidgets import Grapher, BACKGROUND_COLOUR
148 +from pyo.lib._wxwidgets import Grapher, BACKGROUND_COLOUR
149 from Resources.Trajectory import Trajectory
150 from Resources.MidiSettings import MidiSettings
151 from Resources.CommandFrame import CommandFrame
152 diff --git a/Resources/MidiSettings.py b/Resources/MidiSettings.py
153 index 48ced6f..359bc29 100644
154 --- a/Resources/MidiSettings.py
155 +++ b/Resources/MidiSettings.py
156 @@ -19,7 +19,7 @@
157 """
158
159 import wx, sys
160 -from pyolib._wxwidgets import ControlSlider
161 +from pyo.lib._wxwidgets import ControlSlider
162 from .constants import BACKGROUND_COLOUR, ensureNFD
163 from Resources.audio import checkForMidiDrivers
164
165 @@ -100,7 +100,7 @@ def __init__(self, parent, surface, sg_audio, miDriver):
166
167 self.panel.SetSizerAndFit(box)
168
169 - size = self.GetBestSize() #(230, 500)
170 + size = self.GetBestSize()
171 size = (size[0], size[1]+30)
172 self.SetMinSize(size)
173 self.SetMaxSize(size)
174 @@ -125,7 +125,6 @@ def changeInterface(self, evt):
175 self.selectedInterface = self.interfaceIndexes[self.interfaceList.index(selectedInterface)]
176 self.sg_audio.setMidiListener(self.selectedInterface)
177
178 - # TODO: replace handle, set and get method with events
179 def handleMethod(self, evt):
180 self.sg_audio.setMidiMethod(self.popupMethod.GetSelection())
181
182 diff --git a/Resources/Modules.py b/Resources/Modules.py
183 index d06006c..d030840 100644
184 --- a/Resources/Modules.py
185 +++ b/Resources/Modules.py
186 @@ -19,7 +19,7 @@
187
188 import wx
189 from pyo import rescale
190 -from pyolib._wxwidgets import ControlSlider
191 +from pyo.lib._wxwidgets import ControlSlider
192 from .constants import BACKGROUND_COLOUR, PLATFORM
193
194 class SGControlSlider(ControlSlider):
195 diff --git a/Resources/Trajectory.py b/Resources/Trajectory.py
196 index 17d3291..075d204 100644
197 --- a/Resources/Trajectory.py
198 +++ b/Resources/Trajectory.py
199 @@ -131,7 +131,7 @@ def setAttributes(self, dict, xfac=1.0, yfac=1.0):
200 self.filterCut = dict['filterCut']
201 self.setPoints(dict['points'], xfac=xfac, yfac=yfac)
202 self.type = dict['type']
203 - if self.getType() in ['circle', 'oscil']:
204 + if self.getType() in ['circle', 'oscil'] and type(dict['center']) in [list, tuple]:
205 self.center = [dict['center'][0]*xfac, dict['center'][1]*yfac]
206 self.setRadius(self.center[0] - self.getFirstPoint()[0])
207 else:
208 diff --git a/Resources/widgets.py b/Resources/widgets.py
209 index 29dbf02..3380f66 100644
210 --- a/Resources/widgets.py
211 +++ b/Resources/widgets.py
212 @@ -1,6 +1,6 @@
213 import math, wx
214 from wx.lib.embeddedimage import PyEmbeddedImage
215 -from pyolib._wxwidgets import BACKGROUND_COLOUR
216 +from pyo.lib._wxwidgets import BACKGROUND_COLOUR
217 from Resources.constants import *
218
219 KNOB = PyEmbeddedImage(
220 diff --git a/TODO.md b/TODO.md
221 deleted file mode 100644
222 index 93af560..0000000
223 --- a/TODO.md
224 +++ /dev/null
225 @@ -1,27 +0,0 @@
226 -Soundgrain todo
227 -===============
228 -
229 -- Particle2 **done**
230 -
231 -- Remember last save path directories. **done**
232 -
233 -- Granulator Controls -> Y axis -> 3-point range for each row: **done**
234 -
235 - [ ] Bottom: xxx Middle: xxx Top: xxx
236 -
237 -- 2009-2017 in license text. **done**
238 -
239 -- Add global 4 bands EQ and Compressor. **done**
240 -
241 -- Review fx balls. **done**
242 -
243 -- Review MIDI features. **done**
244 -
245 -- slider's midi control. **done**
246 -
247 -- Documentation for the 4 bands EQ and the compressor. **done**
248 -
249 -- FxBall control window to small.
250 - - ok on linux
251 -
252 -- Can't put an FxBall if the audio is off. **done**
253 \ No newline at end of file
0 fix-pyo-imports.patch
01 use-distutils.patch