Tuesday, 13 May 2014

Using a USB MIDI device as an OSX keyboard

If you have done any amount of programming or system administration, you must surely have come across the frustration of having to press a keyboard chord to produce important glyphs like {, } or ~. To battle RSI, i present how to use a cheap external MIDI controller like the AKAI LPD8 or the Korg Nanopad 2 as a keyboard for those all important programmer keys on a Mac running OS X.
In addition to a USB MIDI controller, you’re going to need the following, rather ancient software and resources:
Plug in your controller. From MIDI monitor, select the appropriate Source and start tapping your controller’s buttons. Choose some appropriate buttons for the glyphs you want to map to.
Using the MIDI note number table, look up the corresponding number. On my AKAI LPD 8, the first button is C1, and its number is 36.

Now here comes the tricky part. In midiStroke, press the plus icon on the left to add a button. Double click the default value (probably 45) and change it into the correct one. Now click the plus icon on the right. If you want a bracket, you’ll need to enter the “unshifted” key and select the relevant modificator keys. Since i’m using a Finnish keyboard layout, i use keystroke 8 with Shift and Alt modificator keys. Your milage may vary.
You can use “special keys” like Enter and Esc by using their names. Press the keystrokes button to plop up the help pane and simply add the name of the key (like ENTER) in the Keystroke field.

Tuesday, 4 February 2014

Remapping Tilde

If you’re a hacker, developer or a sysadmin, and you work with a non-US keyboard layout, you’ve probably been annoyed a time or two that the tilde ~ character is so hard to hit. On a Finnish keyboard, it’s behind Alt + ¨ after which you need to press the space bar unless a the next character with a tilde on it doesn’t exist. So Alt+¨ Space a if you want to type ~a.

If you’re on a Mac, i’ve got help for you.

  • Download the Ukelele keyboard remapping app from Sil.org. Extract and optionally add to your Applications folder.
  • Choose File > New from Current Input Source
  • Click the paragraph § key, because that’s the one we’re going to re-map. Or pick another key you want begone.
  • Give your layout a name: Keyboard > Set Keyboard Name... to distinguish it from the original one.
  • Optional syntactic sugar: Keyboard > Attach Icon File. Re-purpose an icon from the Ukelele example keyboard layout folder.
  • Save the keyboard layout file to ~/Library/Keyboard Layouts/
  • Open System Preferences > Keyboard > Keyboard > Input Sources (OSX 10.8). Locate and tick your newly saved and named Layout.
  • Choose your new layout from the icon close to the clock at the top menu bar.
  • Profit!

There are several nice things about this method. You can share your keyboard layout with your peers. You can go wild and re-map any normal key that you like. And you can always go back to normality in case your re-mapping went a little too wild :)

Wednesday, 29 January 2014

My bed senses me

My bed has -- with varying degrees of success -- kept track of my sleep during the last few months using the Beddit Pro tracker. I got to borrow this from a friend who works for Beddit while waiting for the Indiegogo edition Beddit sensor to arrive. Now it has.

The beddit sensor technology is pretty fascinating. Basically, the sensor band registers tiny variations in pressure and with a lot of clever signal processing, can deduce my breathing, heartbeat and movements from it. What's really fascinating is that the same sensor technology could be put under a leg of a comfy chair and was able to pick up my heartbeat and breathing through the layers of chair and comf. I was impressed. What's really really fascinating is that in a demo, the sensor could pick up the heartbeat from a driver sitting in a van with the engine on. I haven't seen this demo but it's supposedly there on Youtube.

The Beddit Pro is a small embedded computer with one or two "ballistocardic" sensors. You connect one side to your LAN with wired or wireless Ethernet and put the sensors under the sheets of your bed. And then you sleep (or do whatever you do in your bed). I admit that the first night or two, i was very conscious of the sensor but that faded quickly.

The results of the Pro are more or less credible. For my wife, they were pretty much off the charts, as she goes into a bit of a coma when reading in bed -- or at least that's what the Beddit thinks. The most confusing bit is that the system reports i got around one hour of deep sleep, and i really have no idea if that's a good thing or a bad one. The results themselves are viewable on Beddit's web site and you can add comments to your sleep diary if you want.

The web site is a bit clunky to use, but the new Beddit tracker runs uses your mobile device (phone, tablet, Android or IOS thingy...) as proxy to the Beddit mainframe. As the results will be in an app instead than on a web site, my hopes are that this'll be easier to use.

Finally, what i'm really hoping for is proper integration with other trackers out there. My hopes is that i can plug all sorts of biometrics into Human API and spin and mash my data from there. We'll have to see.

Tonight i'll connect the new sleep tracker and in a week from now, i should have something new to report.

PS: This would have been a typical post to my normal blog, but as it's down (see previous post) you'll see it here.

Tuesday, 28 January 2014

Navelfluff is gone (for now)

It’s rather tragic that i didn’t even realise that the funding account for my blog ran out and i didn’t even notice. And that the blog fell off the Internet (due to zero funding) and i didn’t even notice. And was deleted, along with all its settings, and i didn’t even notice.

On the bright side, i had set up automatic backups that were sent to my mail. And now i have a learning opportunity to see what i should be doing with them. Oh dear oh dear.

Considering the lack of time and enthusiasm i’ve had for blogging lately (and that i have an other outlet for my occasional fifteen milliseconds of fame, namely Google+, i’m not sure when i’ll restore Navelfluff.

So rest in bits, Navelfluff, and you shall most definitely resurrect. Eventually.

So i got myself a Chromebook

Out of sheer curiosity, i got myself a Samsung Chromebook, Model 3, eleven inch screen. The form factor was right, the weight seems right, the price point is right. Hopefully, the wife acceptance factor is alright too – she just got her first Android phone so accessing her stuff on a laptop should appeal.

I too have most of my personal and social life in the googleverse, so no wonder i was intrigued by a browser with a keyboard attached to it. Thankfully, you can get both ssh and mosh as windowed applications to it. There’s even a Terminal app, though it seems to be running on a virtual machine at Koding (which in itself is a nice surprise – i haven’t used Koding for a while but this might just inspire me to!)

The form factor of the Samsung is comparable to my mac, the keyboard is a bit stiffer and feels a bit strange despite being quite bearable for a machine at this price point. But despite the similar looks, it surely is no mac (but hey, what do you expect for 15-20% of the price of a Macbook pro :)

The most glaring difference is the display. The resolution is a mere 1366x768 and if there existed a chromebook at a fairly regular price with 1920x1080 HD resolution, i’d pay the difference in a jiffy. Another pretty obvious difference is speed. An Intel i-series processor and 16 GB of memory is no match to this puppy, but then, i wasn’t expecting a match. And it’s plasticky, not aluminium.

But put in another way, you get quite a lot of laptop for three hundred bucks.


Hej dingleli dång!

Detta har jag skrivit med Markdown.

For all other purposes, consider this a test