Page: 0 ... 5 ... 10 12 13 14 15 16 17 18 19 20 ... 25 ... 30 ... 35 ... 40 ... 45 ... 50 ... 55 ... 60 ... 65 ... 70 ... 75 ... 80 ... 85 ... 90
Axefx Foot Controller
Date: 10/5/2011
Tags: axefx guitar
For the last six months or so I've been building a MIDI foot controller for the Fractal Audio System's Axefx guitar processor. The Axefx digitally models the effects and amps that guitarists use, but on a scale that hasn't been seen before. For me the main draw cards were great audio quality, the ability to practice and record quietly (I have kids and neighbors), and very consistent sound quality in a live setting. Something that I couldn't do with my old tube amps.

The design of my controller is based around an AVR microprocessor built into a stamp that I bought many moons ago for an economy gauge that I never got around to building. I did however build something useful and fun with that stamp. There is a long thread about the various stages in the build process. Which resulted in a plywood prototype that I now use when I play guitar in a live situation every week or two. It allows me access to the important parameters of the Axefx via knobs and switches and displays the current state of the settings and parameters on the LCD. All the software running on the microprocessor is written by me and I developed the support circuit from various information available on the 'net.

About a month ago I switched from building this just for my own use to exploring the possibility of building these controllers for others as well. In kit form, or fully assembled. A few people expressed interest on the Axefx forums, so I created a PCB layout and am currently having those printed up (design acceptance and payment happened last friday), I've also ordered enough parts to build 2 controllers up front. The design can be executed in 2 main ways, as a full foot controller, or as an amp controller, with reduced functionality. When I get the boards back from manufacturing next week I'll build at least one for testing the PCB kit out and then I'll be putting the kits and PCB's up for sale on the site. A new hardware section will be created with PayPal links.

The software that runs on the AVR chip is written in C and has a high level foot controller portion, and a low level hardware specific layer/API. The foot controller part controls all the functions specific to the axefx, the setup menu and the display of information on the LCD. The device specific layer is responsible for talking to the hardware, and running the main event loop. The design is deliberately separated like this so that you can also run the foot controller software on the PC and Mac, mainly for testing things out before committing it to hardware. It far easier debugging on a desktop computer that way. Surprisingly this works really well. There are no #ifdef's in the high level code needed to make the 2 systems run, and they behave exactly the same.
(0) Comments | Add Comment

Const Armageddon
Date: 7/4/2011
Tags: code
So after getting about 9000 warnings building Lgi with the latest XCode 3.x I decided that I would do something about it. A lot of the warnings consisted of "casting from const char* to char* is deprecated" because I was passing a string constant into a char* arg. So I fix one of those. Which causes 4 more. And so I fix some more of those, and it snowballs... and snowballs... and then there is an avalanche of API's getting 'const' all through them. Many days latter I'm now back on top of the warnings. However now I've modified a number of base classes with virtual functions that had char* arguments. Of course the compiler doesn't warn you when your child class stops overriding the parent function does it! So the big hunt for mis-matched function definitions begins. No doubt I'll miss some and random stuff will just stop working, because the base class got the call, not the child class. *sigh*

Update: So after finding most of the problems by bumping into them accidentally I realized that I was going to missing something important anyway. So I wrote a python script that calls ctags to extract a bunch of symbol definitions, then it parses through all those and finds all the class methods, and compares their arguments and return type with the parent classes virtual function, and spits out an error if they differ. This was great, it picked up a few methods I'd missed, and gave me confidence that I could release the next build of Scribe without having broken functionality.
(0) Comments | Add Comment

Python Is Awesome
Date: 7/4/2011
Tags: code python
That is all.
(0) Comments | Add Comment

Outlook and that stupid "J"
Date: 1/3/2011
Tags: email outlook
It seems to be common knowledge that people receiving email from Outlook users see a capital J instead of a smiley face if they are not using Outlook themselves. As I've been testing the IMAP behavior of Scribe and Thunderbird lately I noticed that both clients display Outlook's smiley face as a "J" and thought to myself, if I have spent so much effort making Apple's Emoji work that it's only fair that I at least have a look into why Outlook's smileys don't work.

There are a lot of "fixes" out there for the "problem", but I wanted to know the REAL reason why it happens. So here it is; Outlook wraps the smiley in the following HTML:
<span style='font-face:wingdings'> J</span>
There is the famous J character, but technically that markup is correct, if you open up Word, set the font to Wingdings and type 'J' you get a smiley. So what the hell? Initially I thought maybe my glyph substitution code was getting in the way, but after turning that off for wingdings it didn't help. So I looked at the font creation code and remembering something about ANSI vs SYMBOL charsets I hard coded anything with "wingdings" in the face name to use SYMBOL_CHARSET instead of ANSI_CHARSET when calling CreateFont.

Which fixes the problem, Scribe now renders the smiley characters correctly. There you go, now you know.

Now I can snicker quietly when Thunderbird renders them as 'J's ;)
(2) Comments | Add Comment

Scribe / Exchange 2010
Date: 15/2/2011
Tags: outlook email imap
So I spend my life writing this email client to get away from Outlook:
And then they change to Exchange 2010 which Scribe for whatever reason can't authenticate on so I start using Outlook 2010 and for a while I put up with it. Then I after a few weeks I get sick of it and try and get Scribe working and with Exchange and fail. Then a few weeks go by and then I try again, different problems. Then more weeks go by, FML. Then I finally have it out and spend too long frigging with NTLM. I read the M$ docs and they are completely WRONG. So I download various open source libraries, they are too old and broken and also WRONG. So I start reading 10 different descriptions of the protocol on the web, which all conflict, but I start getting the gist of it. Then I download the Thunderbird source code and start reading that. Because it does NTLM authentication. And finally after using that as a guide, all these months later, I authenticate with Exchange's IMAP server. And then notice lots of things are broken, so fix fix fix, and now it's running OK. Then I see the calendar folder and click on it, and up shows a list like this:
So Exchange goes to all the trouble of exporting an IMAP folder called "Calendar" that when you click on has a list of email that contains little notes to the effect that "Oh hai, there was a calendar entry here, but I moved it, and btw you need to use Outlook to view it".



Apparently back in Exchange 2002 or something there use to be email containing vCal attachments in the Calendar folder. But some pointy haired boss at Microsoft put an end to that interoperability quick smart.
(0) Comments | Add Comment

Visual Studio 2010 is as fun as a broken leg
Date: 11/1/2011
Apart from the constant crashes, unbearable slowness and long load times, vs2010 has this bug... where "Go To Definition" results in:

So thinking that maybe a compile switch might fix that I turn on "Enable Browse Information" (/FR) for my project, because that sounds like it might be useful for looking up symbols, or something. I rebuild (just in case) and try to lookup a symbol definition... and...

But do you know what that option is useful for?

Turning off member variable lookup in the debugger.

Yup. Awesome isn't it?

So I turn it off, rebuild, and wow, I can see class member variables in the debugger again.

Top work Microsoft, now get back to ignoring your users.
(0) Comments | Add Comment