[Pythonsound-devel] (no subject)
Status: Beta
Brought to you by:
mupuxeddu
|
From: Paul W. <sli...@ya...> - 2001-10-06 20:32:00
|
I'm still exploring omde/score.py, which seems to be the area that
largely overlaps my pysco ideas. I thought as long as I'm trying
things out to see what they do, I might as well save my test cases and
add a doctest hook to the module. In the process, I found a few things
that I'm pretty sure are bugs and took the liberty of fixing them.
The attached diff is against cvs of today, Oct 6, 19:50 UTC.
Notes on changes:
- General modifications:
* Added many tests to docstrings.
* Added _test() to run doctest on the docstrings.
- Event:
CHANGED: Changed all spellings of "strech" to "stretch".
FIXED BUG: stretch_absolute_backward used 'alfa' should be 'time'
FIXED BUG: stretch_relative_backward used 'alfa', should be 'alpha'
FIXED INCONSISTENCY: stretch_relative_backward was always returning floats;
other methods return ints if given int arguments. Should be consistent.
- F:
BUG FIXED: but maybe it was a feature.... but if F(number=None),
it's free to choose a number that was already specified by the user.
I changed it to keep track of all used numbers and choose the lowest
unused number.
BUG FIXED: F.end() added, to always return F.onset instead of F.duration
(which is actually not duration but table length).
Using F and I polymorphically would not have worked.
- Aggregate:
BUG FIXED: removed first definition of load() ... it was defined twice
and the first looked broken.
ADDED: append() which adds one object to the list.
We have extend(), why not continue the list metaphor?
BUG FIXED: extend() had the wrong order of arguments to isinstance()
CHANGED: saveAs to raise a proper TypeError if wrong argument given
CHANGED: deepcopy() wasn't returning anything.
BUG FIXED: clone() was missing, though some other methods use it.
I assume it's the same as deepcopy. One name should be used throughout.
SUGGESTION: a shorter name for calculate_onset_min_max, et al,
would be get_onset_min_max.
BUG FIXED: calculate_onset_min_max always returned None as minimum.
BUG FIXED: calculate_begin_end always returned None as the start.
BUG FIXED: calculate_onset_min_max, et al. will now work with
classes that derive from both Event and Aggregate.
--
................ paul winkler ................
custom calendars: http://www.calendargalaxy.com
A member of ARMS: http://www.reacharms.com
home page: http://www.slinkp.com
|