Converting fonts to C source using bmfont2c.py script

I’d like to share a Python script I wrote for converting bitmap fonts generated by BMFont to C source code byte arrays and definitions suitable for rendering on a monochrome matrix LCD. The script outputs a C header and C source file ready to plug into some source code tree. Thanks to BMFont, this process will convert any TrueType font or font acceptable by Windows to C source code. Please be aware of licensing issues when doing this.

The problem I was facing, was how to generate bitmap font definitions for writing text on a graphical matrix LCD. Continue reading

Posted in Articles | Tagged , , , , , | Leave a comment

Midimixfix Feature Overview

The software in Midimixfix has now reached a level of maturity and functionality that makes it a very versatile and usable piece of equipment. Its about time I get to the alphabetic keyboard and describe what the box is capable of!

This post will serve as an introduction and an overview of the features in Midimixfix. I intend to keep the post updated when features are added or changed in the software.
Continue reading

Posted in Articles | Tagged , , | 2 Comments

Global Temperature Piecewise Linear Fit

When people more or less seriously discuss if the global temperature rise has stagnated or even turned to a decline, the year “1998” is often mentioned as the proposed turning point. But why 1998? In this post I let the computer try out many other years as possible turning points, and present how well a resulting piecewise line fit matches. I also attempt to let the minimization algorithm freely decide when the turning point should be for an optimal fit. My piecewise linear function always has two segments though.

Motivation

The analysis is inspired by taminos post: Global Temperature: the Post-1998 Surprise and summary in danish by Poul Henning Kamp: Færdig med 1998 vrøvl in which the claim that 1998 as a year of turning point is shot down. I’m not opposing this, I just thought it would be interesting to try out other years than 1998 as the turning point.

Continue reading

Posted in Articles | Tagged , , | Leave a comment

Linux Mint on Lenovo Thinkpad T420s: Installation and tweeks

This post describes how I installed and tuned Linux Mint 15 32-bit Mate edition to run nicely on a Lenovo T420s with SSD to get a good performing and portable Linux system.

Thinkpad T420s with linux

I did the install and wrote most of the following text in July 2013. In the following six months I have used the system, the experience has been positive, generally. It is a fast, light, reliable laptop with 4 – 5 hours of battery life. There are minor glitches now and then, like the standby feature doesn’t resume correctly every time (the GPU sometimes wakes up in the highest power mode and can’t throttle down resulting in poor battery life). But I just shut down and boot every time, it doesn’t take too long.

Why the TP420s

My requirements were: a light and portable unit with a good trackpoint navigating device, a good keyboard feel and layout (which unfortunately rules out most of the newer Thinkpads…), a high resolution screen, SSD, a medium spec. CPU and GPU, good battery life and a good docking station available.
Continue reading

Posted in Articles | Tagged , , , | 9 Comments

Mounting Midimixfix in a box

I finally decided on a cabinet for my Midimixfix hardware and photo documented the mounting process. I chose the Velleman WCAH2851 box which has more or less the correct dimensions, except that it could have been less high and a slanted top would have been nice to give a less clumsy look and a more accessible interface. But the Velleman cheapskate box was the best match I could find and it did the job. Midimixfix in a box!

Midimixfix box done!

Midimixfix_into_box_036
Continue reading

Posted in Photo posts, Projects | Tagged , , | 1 Comment

Wireless power switches investigated

Read on to see pictures and a simple analysis of some cheap and popular RF remote controllable power switches available in Denmark and probably the rest of the world also. The danish name for this is “Fjernbetjent stikkontakt”.

The white set is branded: “Garbo Overseas A/S modell: 2602″, and was bought about five years ago in a “Netto” store. The black/silver model is named: “Sartano, MODEL 2606, HN 6137″ and was bought in Harald Nyborg recently. Both operate on 433.92 MHz RF.

Power switches front

Power switches back
Continue reading

Posted in Articles | Tagged , , | 6 Comments

Spotify on Linux with VNC remote control

This post describes how I set up Spotify on my Linux TV / Music server such that the Spotify GUI can be accessed using any client on the LAN capable of VNC:

Same Spotify on four VNC clients

Yes, the GUI of the same Spotify instance is accessible through all sorts of clients. And Spotify will keep on playing and retain it’s state even if all the VNC clients are shut down. This is a basic diagram of what’s going on:
Continue reading

Posted in Articles | Tagged , , , | 2 Comments

Gargoyles in Munich

Recently on a visit to Munich, Germany I noticed the wonderful gargoyles on some of the buildings down town. Particularly on the New Town Hall. Some of them look really terrifying.

Here are some pictures I got of the gargoyles and other figurines in Munich:
Continue reading

Posted in Photo posts | Leave a comment

Introducing Midimixfix

Midimixfix prototype, as of January, 2013:

Midimixfix prototype

Midimixfix is (going to be) an open source and open hardware MIDI processing platform powered by an Atmel Atmega644P. It has two MIDI inputs, two analog inputs and one MIDI output. It performs mixing and processing operations on the input streams in real time with minimal latency. The most obvious purpose for Midimixfix is to add flexibility and new possibilities when connecting keyboards to MIDI sound modules, but Midimixfix can be useful to insert between any set of MIDI transmitters and receivers to perform processing.

Examples of Midimixfix usage

  • Mixing two MIDI streams to one. Fully configurable merging and using a buffer to avoid collisions (of course).
  • Filtering of MIDI data. All sorts of filters can be implemented.
  • Mapping between MIDI channels, controllers, after touch messages etc.
  • Interfacing analog foot pedal(s). Midimixfix can read two pedals and assign them to MIDI continuous controllers. This is of course mixed with the other MIDI streams.
  • Applying transformation curves to key velocities, continuous controllers or after touch.
  • Sending predefined MIDI messages.
  • Debugging tool. Monitor decoded MIDI messages on Midimixfix’s display.
  • MIDI transformation effects
  • Save / load of entire configurations in preset slots

Midimixfix hardware

The Rev 1 board of Midimixfix:

Midimixfix rev. 1 mounted PCB
Continue reading

Posted in Projects | Tagged , , , | 5 Comments

Lars Electric Endeavours Mk. II under construction

Don’t expect too much right now. Check out my old website for now.

Posted in News | Leave a comment