Re: A simple-to-use sound file writer

2010-01-25 Thread Albert van der Horst
In article , Mel wrote: >Alf P. Steinbach wrote: >> * Steve Holden: > >>> It's not clear to me that you can approximate any waveform with a >>> suitable combination of square waves, >> >> Oh. It's simple to prove. At least conceptually! :-) >> >> Consider first that you need an infinite number of

Re: A simple-to-use sound file writer

2010-01-17 Thread TimmyGee
On Jan 15, 3:43 pm, Steve Holden wrote: > Alf P. Steinbach wrote: > > [...]> Perhaps you'd also admit to being wrong, and retract your innuoendo > etc.? > > Disregarding any matters of right or wrong (for this post, at least), I > herebe retract anything I have said about you that you consider >

Re: A simple-to-use sound file writer

2010-01-17 Thread Alf P. Steinbach
* Alf P. Steinbach: Just as a contribution, ... The original code I posted was only written for Python 3.1.1 (because the code was for my writings which assumes 3.x). In the simple_sound module this caused a deprecation warning with 2.x. And the example program didn't work with 2.x. I've no

Re: A simple-to-use sound file writer

2010-01-17 Thread Alf P. Steinbach
* Alf P. Steinbach: * Steve Holden: Alf P. Steinbach wrote: * Steve Holden: Alf P. Steinbach wrote: * Grant Edwards: On 2010-01-15, Steve Holden wrote: I will, however, observe that your definition of a square wave is what I would have to call a "'square' wave" (and would prefer to call a

Re: A simple-to-use sound file writer

2010-01-16 Thread Alf P. Steinbach
* Steve Holden: Alf P. Steinbach wrote: * Steve Holden: Alf P. Steinbach wrote: * Grant Edwards: On 2010-01-15, Steve Holden wrote: I will, however, observe that your definition of a square wave is what I would have to call a "'square' wave" (and would prefer to call a "pulse train"), as I

Re: A simple-to-use sound file writer

2010-01-16 Thread Steve Holden
Alf P. Steinbach wrote: > * Steve Holden: >> Alf P. Steinbach wrote: >>> * Grant Edwards: On 2010-01-15, Steve Holden wrote: > I will, however, observe that your definition of a square wave is > what I > would have to call a "'square' wave" (and would prefer to call a > "

Re: A simple-to-use sound file writer

2010-01-16 Thread Alf P. Steinbach
* Alf P. Steinbach: * Steve Holden: Though for what it's worth I wasn't impressed by the results of running the posted program, since it yielded an AIFF file of mostly zeroes that produced no audible sound. $ od -bc sinewave.aiff 000 106 117 122 115 000 002 261 076 101 111 106 106 103 117

Re: A simple-to-use sound file writer

2010-01-16 Thread Alf P. Steinbach
* Steve Holden: Alf P. Steinbach wrote: * Grant Edwards: On 2010-01-15, Steve Holden wrote: I will, however, observe that your definition of a square wave is what I would have to call a "'square' wave" (and would prefer to call a "pulse train"), as I envisage a square wave as a waveform havi

Re: A simple-to-use sound file writer

2010-01-16 Thread Steve Holden
Alf P. Steinbach wrote: > * Grant Edwards: >> On 2010-01-15, Steve Holden wrote: >> >>> I will, however, observe that your definition of a square wave is what I >>> would have to call a "'square' wave" (and would prefer to call a "pulse >>> train"), as I envisage a square wave as a waveform having

Re: A simple-to-use sound file writer

2010-01-15 Thread Alf P. Steinbach
* Grant Edwards: On 2010-01-15, Steve Holden wrote: I will, however, observe that your definition of a square wave is what I would have to call a "'square' wave" (and would prefer to call a "pulse train"), as I envisage a square wave as a waveform having a 50% duty cycle, as in ___ ___ |

Re: A simple-to-use sound file writer

2010-01-15 Thread Alf P. Steinbach
* Steve Holden: For the record, yes, summing any waveforms that can be represented as Fourier Series will necessarily result in another Fourier series, since any linear combination of Fourier series must itself, be a Fourier series, and therefore the representation of the sum of the summed wavef

Re: A simple-to-use sound file writer

2010-01-15 Thread r0g
Steve Holden wrote: > r0g wrote: >> I think those guys owe you an apology really, but I wouldn't hold your >> breath! >> > Well as you can now see at least one of "those guys" doesn't mind > admitting (and apologizing) when he is wrong. > > regards > Steve I stand corrected, fair play sir :)

Re: A simple-to-use sound file writer

2010-01-15 Thread Ben Finney
"Alf P. Steinbach" writes: > You did lie, that's established. In addition as I recall in the same > post you went on about my motivations for doing the Terrible Deed that > you invented. None of that matches my (largely disinterested) observations. This is pure fantasy, as best I can tell. I've

Re: A simple-to-use sound file writer

2010-01-15 Thread Grant Edwards
On 2010-01-15, Steve Holden wrote: > I will, however, observe that your definition of a square wave is what I > would have to call a "'square' wave" (and would prefer to call a "pulse > train"), as I envisage a square wave as a waveform having a 50% duty > cycle, as in > > ___ ___ > | |

Re: A simple-to-use sound file writer

2010-01-15 Thread Steve Holden
r0g wrote: > Alf P. Steinbach wrote: >> But maybe you're simply not able to understand the algorithm, trivial as >> it is. >> >> So, a Python implementation (note, this program takes some time to run!): >> >> >> >> # Generating a sine wave as a sum of square waves of various amplitudes > > > Pwn

Re: A simple-to-use sound file writer

2010-01-15 Thread Steve Holden
Alf P. Steinbach wrote: > * Steve Holden: >> Alf P. Steinbach wrote: >>> * Ben Finney: "Alf P. Steinbach" writes: > You did lie, that's established. In addition as I recall in the same > post you went on about my motivations for doing the Terrible Deed that > you invented. >>

Re: A simple-to-use sound file writer

2010-01-15 Thread r0g
Alf P. Steinbach wrote: > But maybe you're simply not able to understand the algorithm, trivial as > it is. > > So, a Python implementation (note, this program takes some time to run!): > > > > # Generating a sine wave as a sum of square waves of various amplitudes Pwned! Good one Alf :) I t

Re: A simple-to-use sound file writer

2010-01-15 Thread Alf P. Steinbach
* Steve Holden: Alf P. Steinbach wrote: * Ben Finney: "Alf P. Steinbach" writes: You did lie, that's established. In addition as I recall in the same post you went on about my motivations for doing the Terrible Deed that you invented. None of that matches my (largely disinterested) observat

Re: A simple-to-use sound file writer

2010-01-15 Thread Steve Holden
Alf P. Steinbach wrote: > * Ben Finney: >> "Alf P. Steinbach" writes: >> >>> You did lie, that's established. In addition as I recall in the same >>> post you went on about my motivations for doing the Terrible Deed that >>> you invented. >> >> None of that matches my (largely disinterested) obser

Re: A simple-to-use sound file writer

2010-01-15 Thread Alf P. Steinbach
* Ben Finney: "Alf P. Steinbach" writes: You did lie, that's established. In addition as I recall in the same post you went on about my motivations for doing the Terrible Deed that you invented. None of that matches my (largely disinterested) observations. This is pure fantasy, as best I can

Re: A simple-to-use sound file writer

2010-01-15 Thread Alf P. Steinbach
* Steven D'Aprano: On Fri, 15 Jan 2010 05:23:48 +0100, Alf P. Steinbach wrote: You're again into innuendo, misleading statements and so forth. [...] [Steve Holden] prefers to spout innuendu, personal attacks and misleading statements. Your constant and repeated accusations that any question

Re: A simple-to-use sound file writer

2010-01-15 Thread Steven D'Aprano
On Fri, 15 Jan 2010 05:23:48 +0100, Alf P. Steinbach wrote: > You're again into innuendo, misleading statements and so forth. [...] > [Steve Holden] prefers to spout innuendu, personal attacks and > misleading statements. Your constant and repeated accusations that any questioning of you is deli

Re: A simple-to-use sound file writer

2010-01-14 Thread Alf P. Steinbach
* Steve Holden: Alf P. Steinbach wrote: [...] Perhaps you'd also admit to being wrong, and retract your innuoendo etc.? Disregarding any matters of right or wrong (for this post, at least), I herebe retract anything I have said about you that you consider innuendo. OK. Feel free to remind

Re: A simple-to-use sound file writer

2010-01-14 Thread Steve Holden
Alf P. Steinbach wrote: [...] > Perhaps you'd also admit to being wrong, and retract your innuoendo etc.? > Disregarding any matters of right or wrong (for this post, at least), I herebe retract anything I have said about you that you consider innuendo. Feel free to remind me what that was. regar

Re: A simple-to-use sound file writer

2010-01-14 Thread Steve Holden
Alf P. Steinbach wrote: > * Steve Holden: >> Alf P. Steinbach wrote: >>> * Lie Ryan: On 01/15/10 05:42, Alf P. Steinbach wrote: > I'm beginning to believe that you maybe didn't grok that simple > procedure. > > It's very very very trivial, so maybe you were looking for somethin

Re: A simple-to-use sound file writer

2010-01-14 Thread Alf P. Steinbach
* Steve Holden: Alf P. Steinbach wrote: * Lie Ryan: On 01/15/10 05:42, Alf P. Steinbach wrote: I'm beginning to believe that you maybe didn't grok that simple procedure. It's very very very trivial, so maybe you were looking for something more intricate -- they used to say, in the old days,

Re: A simple-to-use sound file writer

2010-01-14 Thread Steve Holden
Alf P. Steinbach wrote: > * Lie Ryan: >> On 01/15/10 05:42, Alf P. Steinbach wrote: >>> I'm beginning to believe that you maybe didn't grok that simple >>> procedure. >>> >>> It's very very very trivial, so maybe you were looking for something >>> more intricate -- they used to say, in the old da

Re: A simple-to-use sound file writer

2010-01-14 Thread Alf P. Steinbach
* Lie Ryan: On 01/15/10 05:42, Alf P. Steinbach wrote: I'm beginning to believe that you maybe didn't grok that simple procedure. It's very very very trivial, so maybe you were looking for something more intricate -- they used to say, in the old days, "hold on, this proof goes by so fast you

Re: A simple-to-use sound file writer

2010-01-14 Thread Alf P. Steinbach
* Lie Ryan: On 01/15/10 05:42, Alf P. Steinbach wrote: I'm beginning to believe that you maybe didn't grok that simple procedure. It's very very very trivial, so maybe you were looking for something more intricate -- they used to say, in the old days, "hold on, this proof goes by so fast you

Re: A simple-to-use sound file writer

2010-01-14 Thread Lie Ryan
On 01/15/10 05:42, Alf P. Steinbach wrote: > I'm beginning to believe that you maybe didn't grok that simple procedure. > > It's very very very trivial, so maybe you were looking for something > more intricate -- they used to say, in the old days, "hold on, this > proof goes by so fast you may n

Re: A simple-to-use sound file writer

2010-01-14 Thread Alf P. Steinbach
* Steve Holden: Alf P. Steinbach wrote: * Steve Holden: Grant Edwards wrote: On 2010-01-14, Alf P. Steinbach wrote: [bogus hand-waving] After all, it's the basis of digital representation of sound! Huh? I've only studied basic DSP, but I've never heard/seen that as the basis of digital re

Re: A simple-to-use sound file writer

2010-01-14 Thread Steve Holden
Alf P. Steinbach wrote: > * Steve Holden: >> Grant Edwards wrote: >>> On 2010-01-14, Alf P. Steinbach wrote: >> [bogus hand-waving] After all, it's the basis of digital representation of sound! >>> Huh? I've only studied basic DSP, but I've never heard/seen >>> that as the basis of digital r

Re: A simple-to-use sound file writer

2010-01-14 Thread Alf P. Steinbach
* Steve Holden: Grant Edwards wrote: On 2010-01-14, Alf P. Steinbach wrote: [bogus hand-waving] After all, it's the basis of digital representation of sound! Huh? I've only studied basic DSP, but I've never heard/seen that as the basis of digital represention of sound. I've also never seen

Re: A simple-to-use sound file writer

2010-01-14 Thread Steve Holden
Grant Edwards wrote: > On 2010-01-14, Alf P. Steinbach wrote: [bogus hand-waving] >> After all, it's the basis of digital representation of sound! > > Huh? I've only studied basic DSP, but I've never heard/seen > that as the basis of digital represention of sound. I've also > never seen that re

Re: A simple-to-use sound file writer

2010-01-14 Thread Alf P. Steinbach
* Grant Edwards: On 2010-01-14, Alf P. Steinbach wrote: It's not clear to me that you can approximate any waveform with a suitable combination of square waves, Oh. It's simple to prove. At least conceptually! :-) [...] With the goal of just a rough approximation you can go about it like t

Re: A simple-to-use sound file writer

2010-01-14 Thread Grant Edwards
On 2010-01-14, Alf P. Steinbach wrote: >> It's not clear to me that you can approximate any waveform >> with a suitable combination of square waves, > > Oh. It's simple to prove. At least conceptually! :-) [...] > With the goal of just a rough approximation you can go about > it like this: > >

Re: A simple-to-use sound file writer

2010-01-14 Thread Alf P. Steinbach
* Peter Otten: Alf P. Steinbach wrote: Just as a contribution, since someone hinted that I haven't really contributed much to the Python community. The [simple_sound] code will probably go into my ch 3 at http://tinyurl.com/programmingbookP3>, but sans sine wave generation since I haven't yet

Re: A simple-to-use sound file writer

2010-01-14 Thread Alf P. Steinbach
* Steve Holden: Alf P. Steinbach wrote: * Steve Holden: [...] With the goal of just a rough approximation you can go about it like this: 1. Divide a full cycle of the sine wave into n intervals. With sine wave frequency f this corresponds to n*f sample rate for digital representat

Re: A simple-to-use sound file writer

2010-01-14 Thread Alf P. Steinbach
* Mel: Alf P. Steinbach wrote: * Steve Holden: It's not clear to me that you can approximate any waveform with a suitable combination of square waves, Oh. It's simple to prove. At least conceptually! :-) Consider first that you need an infinite number of sine waves to create a perfect squar

Re: A simple-to-use sound file writer

2010-01-14 Thread Mel
Alf P. Steinbach wrote: > * Steve Holden: >> It's not clear to me that you can approximate any waveform with a >> suitable combination of square waves, > > Oh. It's simple to prove. At least conceptually! :-) > > Consider first that you need an infinite number of sine waves to create a > perfect

Re: A simple-to-use sound file writer

2010-01-14 Thread Steve Holden
Alf P. Steinbach wrote: > * Steve Holden: [...] > With the goal of just a rough approximation you can go about it like this: > > 1. Divide a full cycle of the sine wave into n intervals. With > sine wave frequency f this corresponds to n*f sample rate for digital > representation. > >

Re: A simple-to-use sound file writer

2010-01-14 Thread Peter Otten
Alf P. Steinbach wrote: > Just as a contribution, since someone hinted that I haven't really > contributed much to the Python community. > > The [simple_sound] code will probably go into my ch 3 at http://tinyurl.com/programmingbookP3>, but sans sine wave generation since > I haven't yet discuss

Re: A simple-to-use sound file writer

2010-01-14 Thread Alf P. Steinbach
* Steve Holden: Alf P. Steinbach wrote: * Steve Holden: Alf P. Steinbach wrote: Just as a contribution, since someone hinted that I haven't really contributed much to the Python community. The [simple_sound] code will probably go into my ch 3 at http://tinyurl.com/programmingbookP3>, but sans

Re: A simple-to-use sound file writer

2010-01-14 Thread Steve Holden
Alf P. Steinbach wrote: > * Steve Holden: >> Alf P. Steinbach wrote: >>> Just as a contribution, since someone hinted that I haven't really >>> contributed much to the Python community. >>> >>> The [simple_sound] code will probably go into my ch 3 at >> http://tinyurl.com/programmingbookP3>, but sa

Re: A simple-to-use sound file writer

2010-01-14 Thread Alf P. Steinbach
* Steve Holden: Alf P. Steinbach wrote: Just as a contribution, since someone hinted that I haven't really contributed much to the Python community. The [simple_sound] code will probably go into my ch 3 at http://tinyurl.com/programmingbookP3>, but sans sine wave generation since I haven't yet

Re: A simple-to-use sound file writer

2010-01-14 Thread Steve Holden
Alf P. Steinbach wrote: > Just as a contribution, since someone hinted that I haven't really > contributed much to the Python community. > > The [simple_sound] code will probably go into my ch 3 at http://tinyurl.com/programmingbookP3>, but sans sine wave generation > since I haven't yet discusse

A simple-to-use sound file writer

2010-01-13 Thread Alf P. Steinbach
Just as a contribution, since someone hinted that I haven't really contributed much to the Python community. The [simple_sound] code will probably go into my ch 3 at http://tinyurl.com/programmingbookP3>, but sans sine wave generation since I haven't yet discussed trig functions, and maybe /wit