I discovered the program Audacity on Sourceforge. I didn’t realize there was such a powerful audio editor available for free. I also found it quite intuitive within a few hours of using it. It handles every audio format I use (“ogg vorbis” causes a lot of trouble wherever I go), and it feels a bit like using Photoshop (maybe it’s the infinite-undo).
One of the exciting things I learned about it today was that it knows “nyquist”. Nyquist is a music synthesis language based on Lisp. Oh boy: I really needed to start learning another computer language - although I did actually spend about seven hours learning Lisp nineteen years ago - I should be okay, huh?
With Nyquist you can define any arbitrary network of wave function generating components to mimic an analog synthesizer. But, it also apparently includes MIDI-like instrument description. And naturally, it includes all the capabilities of any serious computer language - think of all the math you would need to do with waveforms and such. That is all the power of a proprietary setup like Garage Band and Virtual Instruments.
I don’t really like using graphic user interfaces sometimes. Of course, I want to see graphics when the information I’m working with is graphical. But a lot of what I do isn’t graphical at all. I wind up using a lot of programs in a GUI environment that have not provided ways to manipulate the data on screen at all. You pull down a menu, make a selection, and then type numbers into a box. The secret is, I won’t know what numbers go in the box because the program doesn’t list numbers as a result - it draws graphics. I suppose it is the hardest part about programming - and quite tedious, I’m sure: Drawing a figure is easy, but enabling a control in that figure takes a bit more work. This entails closing the loop by allowing the figure to supply the numbers.
Posted in programming, music-synthesis, computer-interface | no comments | no trackbacksPosted by Evan Bittner
Mon, 17 Nov 2008 19:57:00 GMT
It never fails: Every time I resolve to blog more I actually wind up blogging less. Maybe I should promise to blog less to begin with. Somehow, I don’t think that would work too well. This pitiful little entry will have to do for now, while I think up more interesting things to say…
My new glasses are ready at HourEyes. Nobody called. Today, I called, and there they were, waiting for me. Bad timing, though: my friend Sam was going to take me out to lunch the next time I was down around K Street, but she’s not working on K Street today.
One of the other things I can do in that neighborhood is go to Penn camera, so I loaded up a USB drive with a few good photos that should be printed. They are also photos with a lot of black that I wouldn’t have printed on an ink-jet printer - they need to be done on real photo paper instead. Maybe I won’t print them all, but it would be nice to return home with a couple prints to help me calibrate my eyes to the screen… That is, be sure I’m not going to get something wildly different on the paper from what I see when I’m editing them at home.
I had a programming idea while I was in the shower. Class inheritance and operator overloading is so easy in Ruby that I though I should be able to add an operation to floating point numbers to calculate the value of two electronic components wired in parallel. Then, as with some fancy circuit analyzer package, I could do my own charts of electronic circuit responses, like monte-carlo variations or frequency response in linear circuits. I didn’t think it all the way through, though: Getting software objects to combine with an arithmetic-like syntax is easy enough, but passing in a frequency parameter to such an expression is not so easy. I’ll need to be able to pass in the expression using internalized symbols along with a value substitution or frequency parameter. It’s got something to do with blocks, maybe, but then I’m going to need a circuit object to read in the expression and “simulate the interconnection” of the components… I lathered up with soap standing in the tub, and then the water cut off.
Probably be back in a few seconds, right?
No. They’re back at it, screwing aroung with the plumbing on the second floor. I waited until after my roommate left for work, which is how it happened that I was taking a shower at 10am, and not 7am. I heard the tell-tale hammering on pipes. I screamed at the top of my lungs and banged first on the wall, then on the tub, apparently no one heard - or they just ignored it. I’m pretty sure they don’t speak English, anyway.
But they did this yesterday afternoon - a Sunday - and when I looked, it was just one little sink in for the whole floor. Clearly, they must have a bathroom, with a sink and a toilet, and the corresponding need to shut off my water, but why couldn’t they install all the valves they needed in one session, then never turn the mains off ever again? I said it out loud: “Some day they’re going to shut that thing off while I’ve got soap in my eyes!”.
The prophesy has been fulfilled.
Posted in ontology, programming | no comments | no trackbacksPosted by Evan Bittner
Mon, 10 Nov 2008 18:25:00 GMT
I was once very happy with Typo, the program that this blog runs on. Now, I’m not so sure. It installed nicely, I loaded a design template I liked from their menu, and daily operations are straightforward… I even teased apart the template and made some modifications.
Typo is written in Ruby on Rails. It’s not plain old Ruby - it’s Ruby with a whole lot of predefined extras. I heard it was supposed to be powerful and easy. I’ll admit that it’s powerful. When I first went to the bookstore to look at Ruby books, they practically all covered Ruby on Rails. And when I looked inside the books, the code samples were complete gibberish. It seemed like a lot of overhead. We’re no longer talking about a little handy scripting.
Imagine rock climbing. Looking for hand holds, working your way up inch by inch. That’s learning for you.
But now, imagine trying to climb a wall of polished marble. Hmmm…. You don’t learn much staring at that glossy surface.
Ahem… now, I have what seems to be a very simple change to make. But, I’m feeling… fettered. My ideas run right into that polished marble.
Sidebar
All of these pages have the tools on the right side. Right now that includes categories, my photo, the book basket, hyperlinks, and the monthly archives. This masks a complicated system of ‘widgets’ that I can choose to include. One of these widgets is a block of static text. That’s a bit strange: I thought for sure that I would be able to arrange multiple chunks of static text - It might be nice to shuffle those chunks into the pre-fab widgets.
My idea is to have the ‘book basket’ tie into a book database. Clearly there is a way to do this. But when I look at the page template - which is very abstract, by the way - there is a single line to render that sidebar:
render_component(:controller => 'sidebars/sidebar', :action => 'display_plugins')
Isn’t that just a thing of beauty? this ‘render component’ function expects to see an associative array with a ‘controller’ and a corresponding ‘action’. This is the part that I understand.
The problem is that it’s basically meaningless. I have no idea where any of these associations are defined. The concept is clear, but the implementation is a complete mystery. It probably associates to another embedded ruby page. With yet another function call. Marvelous. I hunt through the server directories and find very little to go on.
When I look at the Typo web site, I don’t see any documentation for the structure. That’s disconcerting. A manual that I can’t read is marginally better than no manual at all.
Posted in web-craft, programming | no comments | no trackbacksPosted by Evan Bittner
Tue, 21 Oct 2008 00:42:00 GMT
When I talked to my friend (and Olsson’s coworker from long ago) Troy, I told him that my choice of the wood-grain design for the Olsson’s Testimonial page was an attempt to capture a feeling I had about the wooden bookshelves. His reply was “and, it’s like a coffin, too!”.
Yes, well…
Soon we were off on a tangent: Because of that page, and the necessity that someone moderate the comments, I have been doing it. I didn’t see a setting for allowing all comments, and frankly, I wanted control over the nonsensical - like botnet spam or incoherent ravings. To which Troy replied “you mean, like a Sarah Palin speech?”.
Not… exactly.
So that was weird, but in “The Drunkard’s Walk”, Leonard Mlodinow reminds us not to be fooled by patterns we think we see in random events. Sarah Palin is obviously in the news, so for someone to mention her name the same day I was just looking at a Sarah Palin interview parody is not weird at all. Nor is it weird that the very same book about randomness should talk about Markov chains, which are the method that generates those fake Palin speeches.
And Markov chains are the mechanism I couldn’t recall that generated the text in that old program we had on our Mac when I was a teenager (what was that thing called?… I found it fascinating). I started to think about how to reverse-engineer that program recently, and came up with a sketch of associative arrays in Perl, or the essentially identical hash object in Ruby. If you think about it, Markov chains are just the framework - probability for any word showing up after any other - and, that means a couple of things, at least: 1) You have to have one program component learn these probabilities from existing texts, unless you want completely synthetic results (I can’t help thinking about music synthesizers vs. music sampling). And, 2) you might need a lot of memory to store a probability for each ordered pair of two words. This gets worse if you plan to extend the concept to what word will follow a particular combination of words - the so-called ‘memory’ of the chain. This is what suggests associative arrays in the first place - they’re more efficient for large but sparse matrices.
If you take a look at the Wikipedia page on Markov chains, you’ll notice that there are a lot of equations. One of my high school physics teachers was convinced that normal people just ignore the equations in a text. Therefore, good science/math writing has to explain everything well, but I love equations because they save me the trouble of wading through so much descriptive text. It’s the same issue with computer code, like when I wanted to tell those guys on the bus the other night about how the politicians should shut up and show me the code revisions they were proposing.
If you’re not going to look at the equations with me, just remember this: The probabilities in that article are context dependent - Every different Markov chain is like a chart with values for those numbers filled in. The numbers are a kind of ‘signature’ that we experience subjectively as uncanny reproductions of Sarah Palin speeches, or scholarly journal articles. Every different generator (i.e. set of those probabilities) applied to a specific vocabulary falls on a point in a multidimensional phase-space - an inherent product of the vocabulary itself (this is referred to as the ‘state-space’ on the Wiki). Even if you consider a two word ‘vocabulary’ like the Heads and Tails of a coin toss, the Markov chain concept implies a continuous space of different actual Markov chains for that vocabulary. Texts generated from those mechanisms are going to feel subjectively similar if the points in phase space are close - i.e., all the probabilities are close enough. This is fortunate, because an exact point in that space can only be estimated in practice: We estimate it by analyzing the texts we want to imitate.
But rest assured, I’m often exhausted by equations like the ones in that article. I have a threshold for what equations I can comfortably examine while reading, too.
I feel a bit relieved by all this: If I ever want to take a break from blogging, at least I know that I could write a Markov chain generator and train it to the previous posts. How long would it take for people to decide that I wasn’t just writing in a self-conscious imitation of my own style?
Posted in politics, programming, books, writing-craft | no comments | no trackbacksPosted by Evan Bittner
Thu, 02 Oct 2008 13:49:00 GMT
I’m going to bundle some quick reminders for myself here…
I went over to Reiter’s Books today because I’ve been coveting a particular statistics textbook. I was tempted by a couple other books that were new to me, but for the price - and with the thought of the groaning shelves back home - I managed to fend off temptation.
Well, I got a second book anyway: Another book that I had noticed on a previous visit: “Advanced Windows Debugging”. I didn’t pick it up then because it’s very technical, and I wanted to research it first… I’ve been very frustrated with Microsoft Windows. The other day, I saw an article with screenshots of the next version. I don’t know about you - perhaps I’m concerned with different matters - but, I couldn’t care less about the design of the graphic user interface - I thought those could be altered quite easily. I care mainly about system internals. Why do I see so many books that instruct me on how to use an interface that hasn’t changed fundamentally in years? Likewise, I think I remember how to drive a car, but I don’t know much about fixing them.
Presidential Debates
Friday I went out to the bar to watch the presidental debate. Those Octoberfest beers will be gone before you know it, and somehow it feels like an American tradition to talk politics with strangers in a bar. More than that, it’s possibly one of the foundations of democracy. One couple next to me was voiciferous - or at least the woman was. I heard some good, insightful heckling from all corners of the room.
But as the debate wore on - did it have anything to do with the beer? - I started to lose the thread.
Posted in books, programming, politics | no comments | no trackbacksPosted by Evan Bittner
Sat, 27 Sep 2008 23:46:00 GMT
My parents’ electricity went out. Apparently there was a hurricane in Ohio?!?!
Yes, of course, it was Hurricane Ike. I have a new favorite storm tracking site: The University of Dundee’s StormPulse. At one point, I was warning my Texas friend that it would strike Brownsville. I guess we still haven’t quite cracked the problem of weather prediction. And, I guess that’s what makes it so fascinating to me.
Because my parents live in central Ohio, the storm passed to the west of them. They got all wind and no rain. If you look at a good surface chart, you can visualize cogs turning - Here in the Northern Hemisphere it’s Clockwise H and Counterclockwise L. In between a H/L pair, you know which direction wind is blowing. Over the United States, these patterns are all basically moving West to East, so you can usually reckon how the map will look in the next day or two.
I find the hurricane prediction tracks are very helpful in visualizing how the whole chart will evolve over the course of the next few days. The size of a High or a Low is related to the strength, with the bigger, stronger systems pushing the weaker ones out of the way. Warm ocean water produces and sustains the hurricane, giving it size and power to weigh in against neighboring systems. Over land they tend to wind down and get pushed around.
I wonder if there is any provision for training the models to account for their past performance. Neural networks or Genetic programming sound crazy, but the parameters of these software models are just an educated guess to begin with - wouldn’t it be nice to let the models discover their own strengths and adjust their own parameters? This is part of what I wanted to talk about yesterday: The best predictions from a supercomputer probably come form models we can’t rightly explain, where the machine adapts to match the patterns it encounters. We certainly have lots of training data now, with new predictions every few hours and all the actual environmental data collected at that predicted time.
Posted in programming | no comments | no trackbacksPosted by Evan Bittner
Mon, 15 Sep 2008 19:07:00 GMT
Inline Functions - I never learned about these functions for scripting webpages. I didn’t even know how they fit into the syntax. They are a sufficiently advanced form that you won’t learn the technique by cribbing from amateurs, which is something I find myself doing a lot. Or, maybe I should say, when I did see them in unexplained code, there wasn’t enough context for me to learn what was happening.
Posted in programming, web-craft | no comments | no trackbacksPosted by Evan Bittner
Fri, 12 Sep 2008 22:45:00 GMT
There are a lot of ideas that I get very interested in, only to forget about thirty minutes later. But there are also plenty of ideas that seem useful before I have worked out how practical or impractical they will be.
Writing scripts for Photoshop is one of those things…
With so many things I wish I could do without an interface, evaluating and modifying digital images is not one of those things. That’s a sure candidate for graphical user interface. I can’t blindly apply most exposure changes or special effects without looking at the image. So on second thought, scripting doesn’t seem all that useful. And I’ve got to get good at Javascript to do it. (Of course, maybe I should get good with Javascript…)
The problem that I had still needs an effective solution: rotating the photos I take in “portrait” format by tilting the camera on its side. It wasn’t too long before I taught myself to always tilt the same direction…. But, I still have to inspect the photos to see which ones need to be rotated back. (Too bad the camera can’t sense gravity or something… but then what would it do when I took a picture straight down.) And, so I think I will take one step into the land of scripting, to do this thing that Actions should have been able to do.
So, I’m trying to come up with more reasons to write scripts, and the only thing I can think of is “data visualization”: Having a Javascript API to Photoshop is interesting if I’m already writing programs that handle a lot of data, and I wish I could produce a graphic. At first glance, it doesn’t seem very efficient, because automating the workflow in Photoshop would mean writing an exacting description of the things I can accomplish much more quickly within the program - and, I’m monitoring the process for quality assurance purposes, too. But, here’s where it gets interesting. Some of the tools take numerical inputs, typed in boxes. And I might write little programs to output the numbers I want in those boxes. But there’s this clumsy oaf the User (man, I hate that guy…) standing between the two. Now, there’s a case for scripting.
Posted in computer-interface, programming | no comments | no trackbacksPosted by Evan Bittner
Thu, 11 Sep 2008 18:19:00 GMT
I’m not sure why I never investigated it further… There are a lot of abandoned lines of reasoning in my workshop. I heard about scripting for Photoshop, and I looked and found actions. I was, to say the least, disappointed. I sensed that something was wrong - this couldn’t be what they meant. I tried to write actions to do what I wanted, and I swear I got them to act on every file in a selection, but now I can’t get it to work anymore.
Today I searched and brought up some tutorials on scripting for Photoshop. It turns out I’ve got PDFs on my disk explaining it all. That’s great. Do you have any idea why I haven’t read everything on my hard drive? I am suddenly overcome with the visual image of my answer on a single sheet of paper - in a huge pile of papers.
Well that’s not the half of it… My installation has the scripts written in Javascript. The same Javascript I’m supposed to know for designing web pages. Hmmm… Well, I think I know how it works, but think again: It’s the same basic problem I’ve had with every single computer programming language I have ever tried to learn. Maybe this will sound familiar to some of you: The syntax seems simple enough, there might be a few tricks I haven’t learned yet, but there is so much environment, so much namespace and library. That’s the part I don’t usually know. It happens every time I sit down to write a small Windows application, it happens every time I need to manipulate the DOM in a web page, and it happens every time I need to read or write a file with Ruby. I had actually been thinking a lot lately about how the computer languages aren’t languages at all: They’re just grammars without vocabularies. You can bring your own - Actually, you must bring your own, or if you like, you can be forced to use somebody else’s. The grammar is actually pretty simple.
Developers seem to have noticed this problem, and created their own mildly popular vocabularies that have been added to the menu of possibility. With some effort, you can sweeten a lot of languages with some syntactic sugar - I can think of a few good ways to do it in C. Which makes it a little hard to get started - there is not one way to do a thing, there’s dozens. Writing the code might be easier for those who have mastered some specific vocabulary of identifiers, but which vocabulary should I learn? Nobody can really say.
I’ve heard great things about Javascript. Some people would have you believe it’s the only language you will ever need to know. Some people think it is both an excellent teaching tool and a reliable production idiom. After all, it is build into every web browser, and getting your code interpreted doesn’t require you to install new software (you might not have permission). But I’m still upset. I downloaded a copy of JQuery the other day and took a look. I didn’t get it. I’m shaky on the syntax, and I have to learn a whole new vocabulary of identifiers!
Okay, I’m not really complaining. I’ll do it, eventually. Complaining tends to sharpen my mind, that’s all.
Posted in programming | no comments | no trackbacksPosted by Evan Bittner
Tue, 09 Sep 2008 01:08:00 GMT