Re: [ANN] pyknon: Simple Python library to generate music in a hacker friendly way.

2012-07-31 Thread Peter Billam
o available in call-compatible Lua version: http://www.pjb.com.au/comp/lua/MIDI.html and is closely related to the Perl CPAN module. You could consider posting Pyknon to comp.music.midi ; it's very low traffic, but some real gurus lurk there. All the best with your music, Peter -- Pet

Re: Generating sin/square waves sound

2012-01-02 Thread Peter Billam
see "man soxformat". It also has a "synth" effect which can generate simple waveforms easily. Sox is useful. Regards, Peter -- Peter Billamwww.pjb.com.auwww.pjb.com.au/comp/contact.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Outputting raw MIDI in realtime on Linux

2011-12-13 Thread Peter Billam
into Lua and Perl: http://www.pjb.com.au/comp/lua/midialsa.html http://search.cpan.org/perldoc?MIDI::ALSA although by now my translations have developed slightly more features and fewer quirks than the original... Hope this helps, Peter -- Peter Billamwww.pjb.com.auwww.pjb.com.au/comp

Re: writing \feff at the begining of a file

2010-08-15 Thread Peter Billam
* ISO-8859-5, windows-1251 (Bulgarian) * windows-1252 (English) * ISO-8859-7, windows-1253 (Greek) * ISO-8859-8, windows-1255 (Visual and Logical Hebrew) * TIS-620 (Thai) This library is a port of the auto-detection code in Mozilla. Homepage: http://chardet.feedparser.org/

PyGame migrating to JavaScript

2010-04-02 Thread Peter Billam
e precise, will be announced - very soon. Perhaps even in 364 days time? Don't be left behind ! Peter -- Peter Billam www.pjb.com.auwww.pjb.com.au/comp/contact.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Working group for Python CPAN-equivalence?

2010-03-03 Thread Peter Billam
It would also be nice to be able to get module download stats. A very important thing about CPAN modules is the consistent basic install method: perl Makefile.PL ; make ; make install I'm not sure if the Perl code that runs CPAN is free software... (?) Regards, (CPAN author) Peter -- Peter Billam www.pjb.com.auwww.pjb.com.au/comp/contact.html -- http://mail.python.org/mailman/listinfo/python-list

Computer Music Toolkit (CMT) ?

2010-01-10 Thread Peter Billam
, Peter -- Peter Billam www.pjb.com.auwww.pjb.com.au/comp/contact.html -- http://mail.python.org/mailman/listinfo/python-list

Re: The rap against "while True:" loops

2009-10-12 Thread Peter Billam
On 2009-10-11, Bearophile wrote: > Peter Billam: >> I remember in the structured-programming revolution the >>    loop { ... if whatever {break;} ... } >> idiom was The Recommended looping structure, because the code is >> more maintainable. > > I think &qu

Re: The rap against "while True:" loops

2009-10-10 Thread Peter Billam
y noticed in development, just like stack-crashes are in stack-based languages. They can occur in other loop-idioms too, like if you append to your list, or adjust the looping index. JMHO, Regards, Peter -- Peter Billam www.pjb.com.auwww.pjb.com.au/comp/contact.html -- http://mail.python.org/mailman/listinfo/python-list

Re: python3.1 shell and Arrow Keys ?

2009-10-08 Thread Peter Billam
On 2009-10-08, casevh wrote: > On Oct 8, 2:47 pm, Peter Billam wrote: >> Greetings.  I've upgraded 3.0->3.1 and now my arrow-keys don't >> work at the shell command-line, I just get: >>   >>> ^[[A >> etc. Is there some environment-variable or op

python3.1 shell and Arrow Keys ?

2009-10-08 Thread Peter Billam
ust with sh configure, make, make install ... Regards, Peter -- Peter Billam www.pjb.com.auwww.pjb.com.au/comp/contact.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Idioms and Anti-Idioms Question

2009-06-22 Thread Peter Billam
ot;The preferred place to break around a binary operator is *after* the operator" ? Perhaps it's just the "continutation marker" rationale? Regards, Peter -- Peter Billam www.pjb.com.auwww.pjb.com.au/comp/contact.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Measuring Fractal Dimension ?

2009-06-14 Thread Peter Billam
>> In message , Peter Billam wrote: >>> Are there any modules, packages, whatever, that will >>> measure the fractal dimensions of a dataset, e.g. a time-series ? > Lawrence D'Oliveiro wrote: >> I don't think any countable set, even a countably-infinite

Measuring Fractal Dimension ?

2009-06-12 Thread Peter Billam
Greetings. Are there any modules, packages, whatever, that will measure the fractal dimensions of a dataset, e.g. a time-series ? Like the Correlation Dimension, the Information Dimension, etc... Peter -- Peter Billam www.pjb.com.auwww.pjb.com.au/comp/contact.html -- http

Re: tkinter: loading file before entering mainloop

2009-03-16 Thread Peter Billam
Peter Billam wrote: >> They're multiplied up from >> canvas_height = self.canvas.winfo_height() >> so I guess mainloop already think it's idle, while grid is still >> taking 10ms to work out what goes where. On 2009-03-15, John McMonagle wrote: > You

Re: tkinter: loading file before entering mainloop

2009-03-15 Thread Peter Billam
ft of the canvas there is a frame (called trackbar) which has the same height, and self.trackbar.winfo_height() gives the same effects. Your suggestion would also defend me against small screens, or midi- -files with large numbers of tracks (I'll impose a max_retries)... Thanks, Regards,

Re: tkinter: loading file before entering mainloop

2009-03-14 Thread Peter Billam
> Peter Billam wrote: > window = MainWindow(application) > if (len(sys.argv) > 1) and os.path.exists(sys.argv[1]): > window.loadFile(sys.argv[1]) > application.mainloop() > File "./midimix", line 465, in loadFile > space0.grid(row=grid_row, >

tkinter: loading file before entering mainloop

2009-03-13 Thread Peter Billam
dow doesn't have dimensions before mainloop is entered. Can I force the window to be laid out before entering mainloop? Or can I invoke loadFile() after mainloop has started ? Help gratefully received... Regards, Peter -- Peter Billam www.pjb.com.auwww.pjb.com.au/comp/contact.html -- http://mail.python.org/mailman/listinfo/python-list

Re: qt, gtk, wx for py3 ?

2009-03-06 Thread Peter Billam
On 2009-03-03, Mike Driscoll wrote: > It should be noted that the port for 3.0 hasn't started yet for > wxPython and I'm not seeing anything about a port for PyQt either > on their website. On 2009-03-05, Peter Billam wrote: > I mailed riverbankcomputing about PyQt

Re: qt, gtk, wx for py3 ?

2009-03-05 Thread Peter Billam
> On 4 Mar, 00:40, Peter Billam wrote: >>  http://wiki.wxwidgets.org/WxWidgets_Compared_To_Other_Toolkits >> seemed surprisingly even-handed. On 2009-03-04, Paul Boddie wrote: > I don't have a horse in this race, but apart from needing to > update that page based

Re: qt, gtk, wx for py3 ?

2009-03-03 Thread Peter Billam
>> Peter Billam wrote: >> > I've been trying (newbie warning still on) tkinter with python3.0, >> > and I'm getting to that stage where I'm beginning to think there >> > must be a better a way to do this...  But I'm unsure if the >>

qt, gtk, wx for py3 ?

2009-03-03 Thread Peter Billam
:action=browse&c=533&show=all doesn't seem to show any... What's the gossip on these toolkits for Py3 ? Regards, Peter -- Peter Billam www.pjb.com.auwww.pjb.com.au/comp/contact.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Delete all items in the list

2009-02-26 Thread Peter Billam
On 2009-02-27, Chris Rebert wrote: > On Thu, Feb 26, 2009 at 4:08 PM, Peter Billam wrote: >> On 2009-02-26, Clarendon wrote: >>> How do you delete all 'a's? >> >> L2 = list(set(L)) >> works for me... > > A. That doesn't by itself remove

Re: Delete all items in the list

2009-02-26 Thread Peter Billam
elete all 'a's from the list. > But if L.remove('a') > only deletes the first 'a'. How do you delete all 'a's? L2 = list(set(L)) works for me... Regards, Peter -- Peter Billam www.pjb.com.auwww.pjb.com.au/comp/contact.html -- http://mail.python.org/mailman/listinfo/python-list

tkinter icons as bytestrings, not files?

2009-02-23 Thread Peter Billam
mand) command ? (I did try help('tkinter.PhotoImage') but didn't spot a magic key (unless it's "data=something, format=something")) ... Regards, Peter -- Peter Billam www.pjb.com.auwww.pjb.com.au/comp/contact.html -- http://mail.python.org/mailman/listinfo/python-list

Re: printing bytes to stdout in Py3

2009-02-17 Thread Peter Billam
On 2009-02-17, Christian Heimes wrote: > Peter Billam schrieb: >> Greetings. (Newbie warning as usual) In Python3, sys.stdout is a >> io.TextIOWrapper object; but I want to output bytes >> (e.g. muscript -midi t > t.mid ) >> and they're coming out stringifi

Re: Module to read/write MIDI ?

2009-02-16 Thread Peter Billam
ally import MidiOutFile successfully from Python3.0.1 yet, but that must be a Py2 v. Py3 issue. Might have to investigate 2to3... Thanks, Peter -- Peter Billam www.pjb.com.auwww.pjb.com.au/comp/contact.html -- http://mail.python.org/mailman/listinfo/python-list

printing bytes to stdout in Py3

2009-02-16 Thread Peter Billam
#x27; mode, or dup(fd) it first, or whatever the right thing to do is ? Regards, Peter -- Peter Billam www.pjb.com.auwww.pjb.com.au/comp/contact.html -- http://mail.python.org/mailman/listinfo/python-list

Module to read/write MIDI ?

2009-02-15 Thread Peter Billam
python.org/pypi yesterday and didn't see anything. Is there a MIDI-module for Python ? If not, I'll email Sean to ask if he'd mind me translating his module into Python3... Regards, Peter -- Peter Billam www.pjb.com.auwww.pjb.com.au/comp/contact.html -- http://mail.python.org/mailman/listinfo/python-list