[issue4913] wave.py: add writesamples() and readsamples()

2014-05-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I hope all mentioned bugs were already fixed in the wave module. As for new writesamples() and readsamples() methods, perhaps it would be better to add utility functions in the audioop module for packing/unpacking integers. In any case a user can use array.a

[issue4913] wave.py: add writesamples() and readsamples()

2014-04-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: A patch against default, including a test, would be helpful. -- ___ Python tracker ___ ___ Python-bug

[issue4913] wave.py: add writesamples() and readsamples()

2014-04-22 Thread Joe Button
Joe Button added the comment: On quickly looking at this, the immediate issue seems to me to be that there is no patch, as I understand the term. If it would be helpful I can look at turning the code in the attached files into a patch against default and ensure the tests pass (but not right no

[issue4913] wave.py: add writesamples() and readsamples()

2014-04-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: Serhiy, is this something you can review? -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Pytho

[issue4913] wave.py: add writesamples() and readsamples()

2014-04-22 Thread R. David Murray
R. David Murray added the comment: Someone has to find the time to do a commit review on the patch. As Guilherme said, there's no specific maintainer for wave, so I'm afraid it just got forgotten about. On the other hand, as a new feature it would now go in 3.5, and we're at the start of the

[issue4913] wave.py: add writesamples() and readsamples()

2014-04-22 Thread Joe Button
Joe Button added the comment: Forgive my unfamiliarity with python's development process, but, what is happening with this? Is there any chance of this enhancement making it into the python libs? What would need to happen? Thanks. -- nosy: +Joeboy

[issue4913] wave.py: add writesamples() and readsamples()

2010-08-09 Thread Alex Robinson
Alex Robinson added the comment: OK, here's the other. -- Added file: http://bugs.python.org/file18452/test_wave.py ___ Python tracker ___ ___

[issue4913] wave.py: add writesamples() and readsamples()

2010-08-09 Thread Alex Robinson
Alex Robinson added the comment: Here go, Terry. Copies of the two files in the latest ZIP file. Hmmm. Well. Maybe just one of 'em. Looks like the only way to upload files is to add a msg, so I'll upload the other file in another msg. -- Added file: http://bugs.python.org/file18451/wa

[issue4913] wave.py: add writesamples() and readsamples()

2010-08-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: Please upload plain-text files with unique names for each file uploaded. -- nosy: +terry.reedy stage: -> unit test needed versions: +Python 3.2 -Python 2.7, Python 3.1 ___ Python tracker

[issue4913] wave.py: add writesamples() and readsamples()

2009-02-08 Thread Alex Robinson
Alex Robinson added the comment: I'll upload the latest monkey-patch file, wave_futz.py, and test_wave.py, which has a gob of tests added to it. I found a 64-bit bug in the wave.py formats for 32-bit sample wave files. The pcm files read in to CoolEdit ok, including the 32-bit sample files. A

[issue4913] wave.py: add writesamples() and readsamples()

2009-01-12 Thread Guilherme Polo
Guilherme Polo added the comment: > "DC (0 hz) assumption"? > wave.py makes the assumption that what the user wants is whatever > happens to be in the file, however arbitrary. (That 8 bit samples are > unsigned bytes is probably an artifact of early ADC logic. Typically you > got an absolute, n-

[issue4913] wave.py: add writesamples() and readsamples()

2009-01-12 Thread Alex Robinson
Alex Robinson added the comment: "DC (0 hz) assumption"? wave.py makes the assumption that what the user wants is whatever happens to be in the file, however arbitrary. (That 8 bit samples are unsigned bytes is probably an artifact of early ADC logic. Typically you got an absolute, n-bit value f

[issue4913] wave.py: add writesamples() and readsamples()

2009-01-12 Thread Guilherme Polo
Guilherme Polo added the comment: I was going to reply about your "code layout" answer but forgot. Well, each one has their preferences so I'm not going to question yours. The only problem is that there is no maintainer for wave.py, so, the more you follow the rules for Python code (or at least

[issue4913] wave.py: add writesamples() and readsamples()

2009-01-12 Thread Guilherme Polo
Guilherme Polo added the comment: 1) wave.py doesn't do assumptions about what the user wants, so I don't think it is the place to put the DC (0 hz) assumption. 3) writesamples would raise an exception in the case of the current number of channels set being wrong. 4) Well, lets fix a format th

[issue4913] wave.py: add writesamples() and readsamples()

2009-01-12 Thread Alex Robinson
Alex Robinson added the comment: "8 bit samples stored as unsigned bytes"? 8 bit samples are 0..255 in the file. But to work with them, you'll want them -128..127. The code assumes DC==0 sample values for simplicity. "if len(wavs) not in [ 1, 2, 4 ]" ? That way if you're working with mono, you

[issue4913] wave.py: add writesamples() and readsamples()

2009-01-12 Thread Guilherme Polo
Guilherme Polo added the comment: Aren't 8 bit samples stored as unsigned bytes ? If yes, they don't range between -128 and 127 (first disagreement). So this line: wav = [ s - 128 for s in wav ] and the respective one (that adds +128 in writesamples) should go. Why is this check: "if len(wavs)

[issue4913] wave.py: add writesamples() and readsamples()

2009-01-12 Thread Alex Robinson
Alex Robinson added the comment: Polo: "I could do it, but I'm in disagreement with big part of your patch." Why surely you can't mean the bug. :) (The test program has it fixed.) What is the disagreement? Apparently this bug system allows file attachments, so I will upload a test program and

[issue4913] wave.py: add writesamples() and readsamples()

2009-01-12 Thread Guilherme Polo
Guilherme Polo added the comment: I could do it, but I'm in disagreement with big part of your patch. Can you add some kind of test you used for it ? Raw data, sample file, or something like this. ___ Python tracker __

[issue4913] wave.py: add writesamples() and readsamples()

2009-01-12 Thread Alex Robinson
Alex Robinson added the comment: I might be able to do doc/test/patch in a month or two, but know zero.zero about the process so would expect it to take far more than a few hours when I do have time. ___ Python tracker

[issue4913] wave.py: add writesamples() and readsamples()

2009-01-12 Thread Guilherme Polo
Changes by Guilherme Polo : -- versions: -Python 2.6, Python 3.0 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue4913] wave.py: add writesamples() and readsamples()

2009-01-12 Thread Guilherme Polo
Guilherme Polo added the comment: Documentation, tests and patch against trunk are needed to get this into Python, but to me the request is fine. -- title: wave.py writes 16 bit sample files of half the correct duration -> wave.py: add writesamples() and readsamples() versions: -Pytho