summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Glover <j@johnglover.net>2012-01-24 21:16:37 +0000
committerJohn Glover <j@johnglover.net>2012-01-24 21:16:37 +0000
commit45b4c0d9264fac8e464b30b34401a9ee973f9ef0 (patch)
tree5c5545794d6b0e04e73c3ee98cc6d525fb48384e
parentbb4f45a40a41111addcaf7c5952d3f0a4a273d30 (diff)
downloadsimpl-45b4c0d9264fac8e464b30b34401a9ee973f9ef0.tar.gz
simpl-45b4c0d9264fac8e464b30b34401a9ee973f9ef0.tar.bz2
simpl-45b4c0d9264fac8e464b30b34401a9ee973f9ef0.zip
[sndobj] add empty partials if space available
-rw-r--r--simpl/sndobj.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/simpl/sndobj.py b/simpl/sndobj.py
index 6b9ecd9..ef866b4 100644
--- a/simpl/sndobj.py
+++ b/simpl/sndobj.py
@@ -136,6 +136,9 @@ class SndObjPartialTracking(simpl.PartialTracking):
peak.frequency = self._analysis.Output((i*3)+1)
peak.phase = self._analysis.Output((i*3)+2)
partials.append(peak)
+ for i in range(num_partials, self.max_partials):
+ peak = simpl.Peak()
+ partials.append(peak)
return partials