mailto: blog -at- heyrick -dot- eu

Navi: Previous entry Display calendar Next entry
Switch to desktop version

FYI! Last read at 06:15 on 2024/11/24.

(USB) MIDI

Just a quick insert to say that my USB MIDI module now supports MIDI device insertion, and other stuff. It has also been tested on both the Raspberry Pi and the Beagle xM; with both the Roland E-16 and the Yamaha PSR e-333.
It is still alpha, it has not had much in the way of solid testing, however with the test programs supplied and !Maestro, it does work as expected.
The module does not support multiple MIDI devices at this time (it's a big job to insert that), however otherwise, it should (hopefully) provide the documented API. There are likely to be bugs and minor updates, but this is what I wanted to finish this summer holiday. So here it is. I just hope there are people with an interest in MIDI music who will use it and provide me with feedback!

usbmidi_alpha4.zip

API/documentation PDF (to save reading that OCR'd one from the Acorn era on ChrisWhy's site). The documentation differs, I wrote this one myself, but the API (except for USB extensions) is the same.

usb-midi-0-01-user-guide-preliminary.pdf

 

Things to Do with a Pi in France when you're Bored.

The title about sums it up.

The reality? That's the NOOBS package from the RaspberryPi site.

Frankly, it couldn't have been simpler. The NOOBS file was a 1.1GB archive that I needed to download, then simply decompress on to a fresh (shop-new) SD card of at least 4GB size. It would appear that the Pi is the exact opposite to the Beagle in terms of booting from its media (recall - the Beagle is reported to sulk if the "MLO" file isn't the first thing written to the boot partition). But to say "dump this stuff here and then plug it in", really, I'm surprised people are actually selling these SD cards premade, it can't get simpler than that!

Upon starting up, the Pi enters a sort of windowing environment. Actually, for me it does nothing so I need to press '2' (selects HDMI safe mode, does nothing!) and then '1' (selects preferred HDMI mode, read from EDID). Then something appears on the screen. But fret not, that's an issue with the HDMI to VGA adaptor, not NOOBS itself.

There are several Linuxes (Linuxen? Linixii?) listed, with RISC OS at the bottom. The recommended distro was "Raspbian", so I installed that.

Installation was dead easy. No complicated questions, no piles of questions to answer. It basically unpacked a prebuilt image and dumped it on to the free part of the SD card and screwed around with the partitioning so it all "just worked". Damn, this is how operating systems ought to be installed.

I looked at stuff like this for a while...

Installing Raspbian on the Raspberry Pi
...and then it was done and Raspbian booted.

 

Again, no display. Ho ho. So I rebooted my Pi and held Shift as it started up. That's the secret keypress to drop into the installer instead of the chosen operating system. I saw an option to edit the Config files, so I opened the "config.txt" and pasted in the commands necessary to drive the monitor to 1280×1024. Then I restarted Raspbian again, this time it worked.

I'll be honest here. It was unexciting. I mean, what's the deal with an operating system that appeared to offer two versions of Perl, three web browsers, and nothing that resembled an office productivity suite of any sort? This was not something I felt could be used "out of the box". Perhaps I could get a lot of stuff from the Internet, but my Pi is not connected, and I wasn't sure what I could do with Raspbian.

I did have some fun playing around with Scratch. This simple "programming language" which would be great for introducing children to what programming is and how it works. Programs are created by simply dragging elements and 'clipping' them to what is already there.
I liken this to a 21st century version of the LOGO Turtle.

Psychadelic etch-a-sketch

 

Given that there didn't seem to be much else to do with Raspbian, I rebooted the Pi with Shift held down, and picked something else.

It is worth pointing out that the NOOBS package is intended for 'testing' the various options available. Installing one of those options will destroy anything that was previously there. If you create files in the various operating systems offered, these files would be best copied to a USB device so they aren't lost if you decide to try something new. Your settings and such, unfortunately, won't persist.

 

That something else was RaspBMC. As before, I needed to reboot and poke the config.txt file for the correct monitor size, then the adaptor was happy.
RaspBMC loaded up with a red themed style designed for the Pi. It might have been good if it wasn't so horribly low-resolution and pixelated that it looked like my 17" monitor had turned into an old fashioned TV.
There was another 'skin' to pick, one called "Confluence", that was sort of blue bubbles and it looked a hundred times better.

My first test was a simple one. That snippet of "Kara no Kyōkai" that so utterly failed to play under RISC OS on the exact same hardware. This wasn't much of a test really, but certainly demonstrates the difference between trying to decode video in ARM code, and slinging it at the GPU instead. There's no way a 700MHz ARM (actually, RaspBMC upclocks the Pi to 800MKz) is going to decode XviD in realtime. The Beagle xM (1GHz) can't do it fluidly. This is one of the lamentable things about these SoCs and RISC OS - there are no cool video drivers. RISC OS ought to be capable, the hardware is certainly capable, but the manufacturers are sufficiently paranoid about their GPUs and such that the video drivers are a binary blob, not source. So the only way to get that working with RISC OS is likely something that can load Linux kernel modules and 'fake' a Linux-like environment so RISC OS applications can call Linux code. Go back and read that sentence again and you'll understand why nobody has done it yet.

Test two was "Red Data Girl" in 720p HD. With an overlay too, to demonstrate the Pi holding steady at 48-52°C. No, really:

RaspBMC displaying an overlay on real time video and not even breaking into a sweat
The reason for the mocking attitude was that my eeePC, clocking 1.6GHz as standard (and 1.8GHz in mega-whoo mode) sometimes struggles with HD content. But, here, note the GPU temperature rose about two degrees (as opposed to 15-20 for the PC) and the CPU usage is barely even registering... while displaying an overlay over top of video that is playing.

I then thought I'd try a 1080p FullHD video. I saw mostly a black screen, with this every so often. Sound played okay.

My HDMI to VGA adaptor didn't like FullHD

I believe the problem to be the HDMI to VGA adaptor not liking whatever settings are in use for the FullHD playback. I needed to reboot to get out of this mess. I also believe, going by the flawless sound, that 1080p FullHD playback is possible on the Pi.
Which is really quite incredible.

So I stepped back to a 720p version of the same file. No problems whatsoever. Completely fluid.

Promotional video for 'Kick Ass 2', 720p, played effortlessly and fluidly in RaspBMC

And another 720p file, this time displaying an srt formatted subtitle file that I created:

720p HD version of 'Gangnam Style', with subtitle overlay, completely fluid with RaspBMC

Again, completely fluid. I should add that there is no obvious way to 'attach' a subtitle file to a video. It will, however, pick up and auto-display subtitles if the video and subtitle have the same leafname (in other words, meh.mp4 and meh.srt).
I tried a number of different files, and that all seemed to work fine. In fact, the only two types I think do not work is MPEG2 and VC1 which require a licence from Broadcom to unlock the functionality in the GPU. It's such a ridiculously low price that you wonder why they bother - and who uses MPEG2 these days when you can easily transcode to XviD or H.264 at a fraction of the filesize for similar quality. I suppose it might be an issue to you if you rip DVDs to VOB files, but if you rip to something more modern, no problems.

The RaspBMC interface is simple, clear, and has been dumbed down sufficiently that there's not a lot you can do other than play videos and music. In this respect, it does its job admirably. While I am running this off the NOOBS package, I don't really have much inclination to try any of the other options. The Pi has suddenly become like a hundred times more useful.

 

By way of comparison, I saw this in a supermarket the other day:

A commercial product that does the same thing and costs twice as much.
The recommended retail price on iomega's site is €129.

Let's see what it offers (copied from product info page), and compare:

So. A hundred euros for a fancy box that does it all? Or less than half that to roll your own and have a useable computer as well (the Pi runs several flavours of Linux as well as RISC OS). Take your pick!

 

Now, seriously... If you have a Pi and wish to play media files - you can't go wrong with RaspBMC. Hell, it's almost good enough to justify buying a Pi and taping it to the back of your TV!

 

Your comments:

Zerosquare, 17th August 2013, 12:53
"the only way to get that working with RISC OS is likely something that can load Linux kernel modules and 'fake' a Linux-like environment so RISC OS applications can call Linux code. Go back and read that sentence again and you'll understand why nobody has done it yet." -> this isn't as far-fetched as it sounds; for example : http://en.wikipedia.org/wiki/NDISwrapper

Add a comment (v0.11) [help?]
Your name:

 
Your email (optional):

 
Validation:
Please type 04985 backwards.

 
Your comment:

 

Navi: Previous entry Display calendar Next entry
Switch to desktop version

Search:

See the rest of HeyRick :-)