Monthly Archive for December, 2007

Programming for iTunes in Pascal

programming-for-itunes-in-pascal

(For those of you whose eyes glaze over at the mere thought of programming, let alone discussions of it, please skip to the next entry.)

In the years since I bought my first iPod, I’ve struggled with trying to settle for the applications available for podcatching and other iTunes-related stuff. No podcatcher (even the one built into iTunes) has ever satisfied me; all of them have either lacked important features, or been too unstable, or had fatal flaws.

Throughout my computer “career,” my answer to this type of situation has always been “write it yourself.” The problem with this is that I program in Pascal, but nearly everything in the Windows world revolves around C. When iTunes released their Software Developer Kit for Windows, it was all in C. I don’t want to learn C, or C++, or C#, or any of its variants. I’m happy with what I have now.

These facts led me on a multi-year search for help in using iTunes with Pascal (or its “successor” in some people’s eyes, Delphi). The problem is that there’s been almost nothing on the web about programming iTunes in Pascal. I’d longed for people to share source code and tips, but no one has ever done so.

I refuse to be such a cheap bastard. If you’ve found this blog entry through Google, you’ve come to the right place. Until and unless I set up a full-blown iTunes/Pascal page, this is the jumping-off point you need.

1. Getting started with iTunes in Pascal

The first stop is to go over to Apple, and download their SDK. All the source code in it is for C, true, but it’s got documentation, a help file, and other information you will need as well. Plus, you really do need to accept their license agreement before you go developing stuff for iTunes. It’s the law and all that.

Next, download this Pascal unit from me. It’s a Pascal port of the type library built into iTunes.exe, the Pascal equivalent of the .h file you get in the SDK. It’s been verified to work in the three most common Pascal packages out there in the Windows world: Virtual Pascal, Free Pascal, and Delphi. I use Free Pascal myself (thus the .pp extension; change as needed).

2. Branching outward

Since my current interest is in developing a new podcatcher, I threw together a simple unit encompassing what would be the most-often needed functions of iTunes for a podcatcher: adding, converting, and removing files, and synchronizing an iPod. I’ve uploaded this unit to my server, and you may feel free to download and use it. (It would also be helpful for those of you planning more elaborate programming ventures as a teaching tool, so you can see calls to the iTunes library first hand.)

One caveat: I tend to write a LOT of helper units adding procedures, functions, and objects that make my programming life a lot easier. This simple iTunes unit uses one of those: my “FileSpecs” unit. This unit creates a Pascal/Delphi class for easy management of filenames by breaking them automatically into their component parts: path, filename, and extender. These came in very handy in writing my “Convert” routine, where I wanted to tell the program to copy a file from its current location to the location another file is in, using that file’s name instead of the one iTunes gave it, with a different extension. You’ll need my FileSpecs unit to compile my iTunesForPodcasts unit, and you are also welcome to use that unit as you see fit.

The FileSpecs.pp unit can be downloaded here.
The iTunesForPodcasts.pp unit can be downloaded here.

Let me know if they’re helpful, and also if you would like a more detailed “iTunes in Pascal” page as I progress along.

Finally

After literally years of searching, I managed to find a Pascal unit to interface with iTunes.

I just added a file to my iTunes library from Pascal. That’s step one. Only 50,000 more to go.

20 weeks is long enough to wait.

20-weeks-is-long-enough-to-wait

I’ve decided to shop “Rumpled Trenchcoats and Rubber Bullets” around again, while I finish the polish on “Mall Bats.” The publisher I spoke of a ways back has had the manuscript for 20 (going on 21) weeks with no response, even after inquiries on my part at weeks 12 and 20.

They may still be considering me. Or I may have fallen through the cracks. I hope they do like the book and decide to buy it (I really like what I’ve seen of that company) but I can’t just sit and wait any longer. Fortunately, they don’t have any rules against sim-sub, so I’m looking into a few other small presses that seem to be up that book’s alley while they decide.

I know that everyone keeps telling me “Mall Bats” is more marketable, but I still have a soft spot in my head for RTARB, and still think it’s a better piece than my second book. (Especially because one of the things I had in mind with MB was to make it marketable, which kind of colors my opinion of it a bit.)

Wow.

And now my stunt about the Beloit Daily News gets me my second mention in Editor and Publisher!

For newspaper people and cartoonists, a mention in E&P is like having the Pope mention you in his address from the balcony, while he’s wearing his magic hat and everything!

Attention: Fans in Wisconsin!

Can anyone get me a couple of copies of today’s Beloit Daily News? They printed an installment from last week’s “Queen Victoria” storyline bashing them, and I’d like to preserve it as the first time the strip has appeared in print.

More bitching and moaning.

We’re serving home made ice cream tonight. I got up at 6:00 (okay, the cats got me up at 6:00) so I had time to make the custard nice and early, so it could chill and mellow properly. It’s going into the tumbler in about 15 minutes, then into the freezer; the first home made ice cream I remember making since Gerard and I first bought the ice cream maker back in college, in 1990.

I might not get a chance to eat it, though. The pain in my left side has been annoying me all day, and now it’s starting to look like it’s going to take me out of commission early tonight.

It has to be nerve damage. My left leg has a constant, low-level burning sensation, but any contact with the skin on that leg (from sitting, or laying down, or even thick clothing) sends the same sensation as bumping up against a hot oven rack. The pain will also, unpredictably, migrate up so it’s not so much in my leg as in my shoulder or left arm, as if I had overdone it weight lifting and the muscles were screaming in agony. I’m typing pretty much with one hand at this point due to the soreness.

My surgeon, Doctor James Gregory House Fox can’t find anything wrong with me, other than to suspect it’s some residual swelling from when my colon perforated. The MRI’s are clean and there’s no sign of infection. He doesn’t know what it is.

And I’m out of painkillers. Not that the painkillers I was on worked on nerve pain, just the original wounds (which still ache, but nowhere near what they did early on). I don’t want stronger stuff, since I can hardly function now through the haze of the pain.

I’ve been doing my best to stay functional and not let on that anything is wrong, but it’s getting more difficult. Bryan hasn’t had much time to enjoy being with me since we legally tied the knot (what with retail shopping season in full swing) and I don’t want to disappoint him, but there are some mornings I just don’t want to get out of bed, and not due to depression this time!

Just had to get it off my chest.

On a lighter note, I’ve been applying for some program director/operations manager jobs out there. I wonder what Bryan would say about moving to Bath, NY, or Cheyanne, Wyoming. Oh, well, I probably wouldn’t be offered the jobs anyhow.

Concentration

I finally finished Schulz and Peanuts a few minutes ago. This scares me, because it never takes me two months to read a book. Usually, I pound through a book in a week or less (which is why I re-read a lot; even when I have money for books there’s rarely something begging to be read, or I can’t get them fast enough).

It’s become a chronic problem ever since the hospital. I can’t concentrate. Not at all. My attention is pulled in more directions faster than I can handle it.

I don’t attribute it to a side-effect of surgery or medication (although that stint on Dilaudid really did knock my creative energies for a loop). I think it’s more a matter of being hyper-stimulated (by having pain all the time) and depression trying to reassert itself. Honestly, after they knocked me off my antidepressants at the hospital before Bryan had to twist arms to get them to put me back on them, my focus has suffered, so it probably is a major bout of depression trying and failing to assert itself.

This is what’s wrong with me. This is why I can’t write other than short little stuff. This is why I can’t read. This is why I can’t do anything, including eating, for more than four minutes at a time before having to do something else.

I have to focus. Sadly, I don’t think I’m going to be able to for quite some time.

If a cross burns in the forest and no one is there….

if-a-cross-burns-in-the-forest-and-no-one-is-there

For those who may have been wondering what the hubbub in my strip is about this week, my friend and syndicate-fellow Wiley Miller, who writes and draws Non Sequitur, got his strip cancelled by the Beloit (Wisconsin) Daily News late last month because of this strip (thank you, Wiley):

The reception to his cancellation has been mixed, but it’s painfully obvious to me (and should be obvious to anyone with a brain) that the strip in question is making fun of the KKK and racist attitudes. That’s even before you bring in the possibility that the juxtaposition is calling the KKK chicken (which, to be honest, they are. Only cowards hide behind hoods and pseudonyms).

Wiley can’t retaliate because to do so might mean being dropped by more papers. I, however, have no papers to be dropped by. That’s why I had Victoria pitching “Ku Klux Komiks” to the BDN this week, and led to what I had warned you all earlier in the week was my most offensive writing ever:

I’m happy (for my contining “career” as a cartoonist) but disturbed (for the tastes of America) that I’ve had next to no reaction to today’s strip. It was, to be honest, designed to provoke and make people squirm a little. By this point I expected my V-Mail box to be overflowing with hate mail. However, the negative reaction is far less than I expected, and there is a lot more positive response than I would have hoped for.

Part of the job of any artist, in any field of arts (including writing) is to make people think, and often that can only be done by making them uncomfortable. I aimed to make people uncomfortable today, and I think I did. But I wonder if I made enough people uncomfortable.

And please don’t get me started on the two people who thought that the first three panels, by themselves, were funny.

Will my tirade have much effect? I doubt it. It probably won’t get Wiley back in the BDN, and pretty much guarantees that TNAOQV will never be in the BDN (but I don’t think any paper is ever going to pick it up, anyhow, honestly). However, it did make me feel good by getting my anger out of my system.

I swore an oath long ago to rail against stupidity in every form that I see it. I had no choice but to respond. I pointed out some people’s stupidity. Whether it has any quantifiable or visible effect is irrelevant. If I’ve made one person, reader or no, think by what I’ve done, then I’ve succeeded.

The BDN storyline ends tomorrow, and Wolfgang and Otto (for those are the character’s names, thanks Mike and Ronnie) will never again be seen in my strip after today, so people who were concerned that this is a new direction for the strip may breath easy. Sunday we continue the Offensive Bear storyline, and starting Monday Her Maj goes shopping, so the funny is returning, fear not.

However, I just might go ahead with one of my ideas for “Hairball Hollow.” I think I’m going to make one of the neighborhood birds who pokes his head in from time to time a White Hooded Woodpecker. He’s a flight supremecist.

Why I Hate Christmas

why-i-hate-christmas

This time of year, with all the decorations going up, the sweet nip of frost in the air, and the ubiquity of festive holiday music everywhere you turn never fails to pluck at a certain heartstring, and create a certain feeling deep within me.

The feeling of bile rushing up my throat, eating away at my teeth as I force it back down my throat rather than let it spew forth, forgoing its purgative nature for public approbation.

You see, I hate Christmas.

I finally caved this year, setting up the tree in our new house because I know how much Christmas means to my husband (thank you, Jon Corzine) Bryan. This would be ironic in many people’s eyes, that a Jew should be the one who celebrates Christmas in our family, but there is a reason that I included Oscar The Grouch’s rendition of “I Hate Christmas” on my greeting card/cassette 13 years ago, the last time I bothered to do one.

Rather than suffer in silence this year, as I have for the past 37, I think it’s finally time to outline exactly why I hate Christmas.

I should preface this by saying that I am not against other people celebrating Christmas, or Yule or Hannukkah or the Saturnalia or anything else they want to. I don’t want anything at all banned or limited from the public square, as long as everyone is allowed onto that particular playground. However, I prefer not to celebrate and I want to explain to everyone why you should not be offended if I do not wish you a Merry Christmas.

1. It has nothing to do with Christ

You read me correctly there. Christmas has absolutely nothing to do with Christ. If we are to believe the Nativity as reported by Luke, there is no way that shepherds were in the field with their flocks in late December, during one of the longest and coldest nights of the year in Bethlehem. Luke’s report would suggest that Christ was born in the spring or summer. Add to that the best astronomical reports we have from the time period and tracing back with current knowledge would put the phenomenon known as the “Star of Bethlehem” (actually most likely a comet) in the spring of AD 4, which would coincide with the reigns of Herod the Great and Augustus, both of whom play roles in the presence of Joseph in Bethlehem and later in Egypt.

No, the holiday we celebrate today as Christmas comes from the efforts of the early Church to make itself more acceptable to Roman converts, and to “redeem” a pagan holiday. The 25th of December, approximately the time when it’s observable that the solstice has passed and the nights are getting shorter, was celebrated in pagan Rome as the feast of Sol Invictus, the unconquered Sun. Coins and bas reliefs made in this god’s honor show a young man with light radiating out from behind his head. Sound familiar? The early Christian church co-opted this festival as the birth of Christ, instead of the birth of the sun (and longer days). Ironic that this created, over a thousand years before the English language evolved, the pun when the unconquerable sun was replaced with the unconquerable son.

Everything we associate with Christmas is co-opted from other holidays, too. Romans gave gifts during the Saturnalia (right before the winter solstice). The Celts and many Germanic people celebrated the solstice with evergreen trees and boughs, symbolic of the victory of life over death. St. Nicholas, despite being the actual Patron Saint of pawnbrokers – an appropriate connection with our modern Christmas, is actually a corruption of a fairy figure that left candy for good children and carried bad children away as slaves.

Other than the few proper religious displays, and of course Masses and services, there is nothing Christian about Christmas. No wonder the Puritans tried to ban it.

2. It causes very un-Christian behavior.

Look at these “War on Christmas” people, who see this holiday as nothing more than an excuse to do fund raising to hold alleged pagans at bay. Look at people stampeding over each other on their way into toy stores, fighting over the last Wii. Think of all the hypocrisy shown by people who stab each other in the back 364 days a year, who pat each other on the back one day a year because it’s allegedly Christmas. Sound Christian to you? Because it doesn’t to me!

3. Even if it is a Christian holiday, it’s not an important one.

The entire underpinning of Chistianity (as a faith, not a philosophy) is not the birth of Jesus, but his death! For God so loved the world He gave his Only Begotten Son, so that Man should not die but have eternal life. Christ did not need to be born, but he did need to die. The most important feast in Christianity (and any Christian worth their salt will tell you this) is the Feast of the Resurrection (improperly known as Easter, another pagan holiday we co-opted, although we do know the day Christ died – the first night of Passover – and celebrate it around that time).

Bishop Sheen, years ago, blasted “pop” portrayals of Christ like in “Godspell” and “Jesus Christ Superstar” as diminishing the most important (faith-wise) aspect of the Christ story: his death and resurrection. He said (and I’m paraphrasing because my mother lost my collection of Bishop Sheen recordings from when he spoke here in Vineland when I was very little) that what we should be focusing on is not Jesus Christ, Superstar, but Jesus Christ, Super Scar.

We spend about 24 days (more or less) celebrating the oncoming “birth of Christ.” Conversely, we spend 40 days celebrating the coming of his martyrdom and another 53 days after that celebrating his Resurrection and the coming of his Spirit. Which do you think is more important?

4. It’s depressing.

There’s a reason that more suicides happen around Christmas than any other holiday. It’s a lonely time. Even without the effects of Seasonal Affective Disorder to contend with, the whole “loved ones near you” thing can underscore just how alone we usually are. All the saccharine fake jolliness and ho ho ho really weigh down on those with depression. When you’re feeling blue, even a little bit, people shoving “be of good cheer” down your throat is roughly equivalent to having someone walk up and scream “WHAT’S WRONG WITH YOU?” in your ear?

Then pile on the consumer aspects of the holiday. If it weren’t for the fact that I don’t really give many gifts when times are good, I’d be very depressed about not having money for presents this year. Thus, I can sympathize with people who have been touched inappropriately by the economy this year and feel bad that they can’t share the Joy because they think it has to come in a foil wrapped box with a pretty white bow.

There you have it, in a nutshell. Why I hate Christmas. It’s fake, it’s artificial, it’s depressing, and it’s really not that important. Yet everyone seems to think that it’s some kind of glorious thing. It’s not, so stop saying it is.

“The most wonderful time of the year?” Try when you have food in your belly, a roof over your head, health, happiness, people you love near you, and friends that care about you. The day you have that, no matter what day it is and no matter how many days it is, that, buddy, is the most wonderful time of the year!

Happy Humbug.

Just for the record….

Friday’s (12/14/07) Queen Victoria is the absolute most offensive, disturbing, and all around tasteless thing I’ve ever written.

I feel proud.