Re: Re: [bitpim-cvs-checkins] bitpim midifile.py,NONE,1.1 fileinfo.py,1.11,1.12

"Roger Binns" <[email protected]>
Newsgroups gmane.comp.mobile.bitpim.devel
Message-ID <001d01c4fc5a$3e20ce10$3501a8c0@rogersqyvr14d3>
>   btw, can you double check the ID3 format?

It definitely was correct.  I used winamp to make the various combinations of 
ID3v1 and ID3v2 and they are still correct :-)

> Since you have the check in place, I just left it there; who knows what else 
> might be screwed up out there.

Ok. I'll remove the check since it was only there due to my bad code.  

> I guess that's the mentality carried over from my C++ days, in which all 
> instance variables are supposed to be private and exposed only via accessors.  
> The property feature of Python allows me to do that very nicely and conveniently.

In the very first Python code I wrote however many years ago, I tried to do
something similar but auto-making the functions.  It was something hideous
like:

   def __init__(self):
      for prop in ("length", "duration", "oranges", "apples"):
         ... make getProp function ...
         ... make setProp function ...

(That would be a mangling of the JavaBean accessors with Python.  I got very
confused due to Python's scoping when declaring classes and what namespace
is present.)

>>I presume a variant of the code could also be used to do clipping of
>>midi files, although that isn't very high up on the priority list.
> 
> Yes, I was waiting for your conversion dialog to figure out how best 
> to allow users to do that.

I would recommend just doing a seperate dialog using the ranged slider.
Things are made all the more complicated due to the lack of any standard
way of playing midi files.  There are many many different projects named
pymidi, all supporting different platforms and having wacky licenses.

Roger




-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.