Wednesday, June 24, 2009

Long overdue

It seems that an update is long overdue.  First off, moudi from the ChucK forum has joined the project, and has already implemented a file browser window.  Woot!  It's nice to have someone else working on this project - with the two of us, we can come up with more ideas and implement features quicker.

As for myself, after spending a decent amount of time optimizing the editor control for the  performance boost needed to have syntax highlighting, I've decided to abandon the RichTextBox control in favor of the TextEditor control from the open source SharpDevelop project.  It has a lot of cool features, and I've been spending my time replacing the RichTextBox with the new TextEditor. 

Thursday, June 11, 2009

I am the optimator

I made a couple of updates, like removing the standard Ugen functions(chan, gain, last...) from non-Ugen autocomplete items(Std, Machine, Math...). Most importantly, though, I started optimizing the code. I wrote a new class called PerfTimer which does timer operations with more precision than GetTickCount(). I've been using that to benchmark performance. I also came across this class, which benchmarks a method by calling it many times over and timing it. I'll have to look into it later.

I got rid of all of the nasty try-catch statements (can be performance hogs), and I replaced 90% of the foreach loops in the TextEditor class with for loops. There was a nasty slowdown in the function for updating the line numbers, and that was due to me using a string(immutable) instead of a StringBuilder(ding!). Also, updating line numbers now only happens when the number of lines have changed since the last time the text changed. It seems that I will need to optimize as much of the code as I can before I can start implementing syntax highlighting, because highlighting has been a hog so far.

A little off topic, but last night I went to a place called the Biergarten, where I imbibed a delicious dark beer, the Spaten Optimator. The taste is malty and rich, and it stays in your mouth even after you have consumed said beverage. Highly recommend it.

Monday, June 8, 2009

Latest updates

Got a couple of more updates in. Some of the important ones include catching syntax error output and fixing yet another crashing bug. Kassen from the electro-music forum clued me in to a command that makes it possible to detect shreds that hang the VM, so that's included in this version as well. The other thing that I'm excited about is that the "run at startup" and the "run before each shred" code is now functional.

I played around with syntax highlighting a bit, but the performance was horrible. I'll have to think of a more efficient syntax highlighting routine. On another note, I posted up some links that I came across a couple of weeks ago. MakingThings is a site that's centered around the Make Controller, a cool little controller board that can be programmed using several different languages and communicates via OSC. It would be perfect for making a custom OSC or MIDI controller. The Arduino seems to be a similar device and much cheaper as well. I must set some time aside to play with one of these guys.

Friday, June 5, 2009

First post

I've been working on ckEdit, an IDE for the ChucK audio programming language, since March, and figured it's stable enough to release, without running the risk of being ridiculed publicly for my code (which is horrible at times).  Boy was I wrong.  As soon as I posted it up on a forum, I instantly found a crashing bug.  After fixing that and reposting, I found another.  So I figured, I'd just start this blog and update it once in a while with progress.  

There are several features that I want to add to the editor, mainly for my own uses, really.  Earlier today, I was sequencing a drum pattern, and I didn't find editing the contents of an array very intuitive.  At some point (the sooner the better), I'll probably implement a visual step sequencer; at least for programming in patterns.  But I'll need to prioritize, and work on the important stuff first, like auto-completion support for user-created classes.