Jump to main navigation

Posts Tagged ‘programming’

Whole-Play update

Still working on Milestone 2. The more I work on Whole-Play, the more I see the need to 'redesign': stop and re-plan the whole thing, and improve the code a lot. Because it keeps growing and growing, and in a rather disorganized fashion, which in turn causes lots of bugs to pop up all over the place.

But sometimes I'm Mr.Stubborn: I have to finish this milestone, and I will! Today I've continued to work on the Harmonizer - the name sounds cool! :) Now W-P can harmonize melodies using different harmonies (e.g. diatonic, pentatonic, whole-tone...). At this stage the harmonizations are rather simple, but I believe they establish a good basis for more sophisticated ones in the future.

Anyway, I'm definitely realizing that either I find much more time to work on W-P or I relax a lot about my expectations to get it ready soon. Or both!

Whole-Play bugs

I'm still working on milestone 2, and it's taking much longer than I thought, because I'm finding quite a few bugs, which often are not easy to fix. The problem is that the code is getting longer and longer, and even though I'm trying to keep things well organized it's still getting complex and parts of it are a bit messy. Logic errors are quite tricky, because they manifest in very abstract ways, like an unexpected chord happening. Then tracking the errors down to the bit of code that's triggering them is a long (but somehow exciting!) process.

So at this stage, what I need to continue developing is: i) Patience, ii) Focus, iii) Enjoy! Just keep going, I'll get there. :)

Whole-Play update

I seem to be a bit stuck on the harmony analysis task, it's been a long time since I started it, and there's still a lot to do. Well, I didn't expect teaching Chuck some harmony would be particularly easy... Read the full text...

Whole-Play update

I haven't updated for a while, partly because I've been too busy with web work. That doesn't mean Whole-Play development has stopped. It's been a bit slower than I would have wanted, but regular nevertheless.

I keep on working on the Harmony Analyser, which is looking better every week. I think I've been trying too hard to be too precise with it - two too's are too many ;) - and I'm not sure that's a good strategy. It might not be possible, and even if it is, I'd better get something practical going, and leave refinement (or re-designing) for further stages of the project. So today I went to have a cappuccino and a lemon & coconut muffin at the Surf Beach cafe (sounds relaxing for a Sunday morning, doesn't it?), and did some brainstorming, trying to get more specific on what I'm trying to achieve in terms of harmony. I think I've got a better direction now, and I'm ready to start trying out its posssibilities. My aim is to meet the deadline for Milestone 2, which is May 13th.

Also I managed to find a very annoying bug I had introduced a few weeks ago that was driving me crazy, so I'm happy. :)

DynamicToolbar plugin for FCKEditor

DynamicToolbar is a plugin for FCKEditor that allows you to create custom toolbars on-the-fly, without the need to use configuration files. This won't be necessary once FCKEditor reaches v3.0, but for the moment, here's a quick and easy solution. Read the full text...

How to display code fragments in web pages

Since in this blog I'll be writing about JavaScript, XHTML, CSS and other languages, I was wondering which would be the best way to display code fragments in a web page. Obviously each fragment will go inside a CODE element, but there's other things I'd like to implement:

  1. When the page is displayed without CSS, I'd like the code fragment to have a decent formatting.
  2. I'd like to add a sort of caption to each code block, to add things like "add this to your .css file" (see the code fragments below as an example).

And of course, I'd like to do it with the cleanest possible XHTML. Let's go! Read the full text...

FixIE v0.5 released

This is a bug fix release that solves the problems when there were empty instances of the elements used as containers for the addFirstChild method. Head over to the FixIE page to donwload the new version.

Whole-Play update

I've been a bit slack lately with Whole-Play, but that's going to be an exception, W-P can't wait!

Today I've closed drumGenerator2, and left it as a test program. Now I'm moving on to something much more exciting and challenging: teaching Chuck some harmony! The new test program I'm working on is called harmonyDetector, and I'm not sure how good it will be, but I'm hoping VERY good. This is forcing me to do two things: find ways to process note/chord data to infer harmony properties, but also think about what harmony is. It's easy to collect the data, but what's a key? What's a root? What's a scale? Believe me, when you put that into a programming language, it's quite tricky!

I'm also going to be working on the first milestone, wich is scheduled for Feb 27th, and will be a more interesting version of drumGenerator2. Did I talk about milestones? Well, because the development of Whole-Play is a long term project, I've set up a few milestones along the way, so I can both keep track of the progress made and enjoy the project. This means that whatever the state of the project, at certain points I'll write a commited program trying to make the most of the current possibilities. I ask myself something in the lines of "If I stopped the Whole-Play development now, what would be the best I coud do with it?". I'll post the results of these milestones here, so it's not all words.


FixIE is a little script that I've created to overcome a few of the CSS selector limitations in IE6. What it does is adding a few helper classes to certain elements/states, which then can be used in your .css files to reference those elements/states. In particular:

  • It adds the"first-child" class to the first child of certain containers (by default UL and OL).
  • It adds/removes the class "hover" to LI elements inside certain containers (by default an element with id="nav"), to provide support for CSS drop-down menus.
  • It adds a class to all INPUT elements, matching their type. That is, all inputs of type "text" will also have the class "text", and so on.

It is possible to configure the first two features, choosing any number of containers. For example, you could add first-child functionality to all divs, or apply the hover functionality to several navigation menus (see the JS source). Read the full text...

Whole-Play update

Not a very good week this time. I got stuck on some stupid configuration issues (I won't detail them because they are stupid). So not much progress in the end. The drumGenerator2 has improved a bit anyway, that's what counts.

Additional content and navigation


Main navigation menu