04 March 2016
The March 2016 issue of The MagPi is out now, featuring my project Clef Hero. The game uses the Piano Hat, a tiny music keyboard that fits on the top of the Raspberry Pi, to teach you to read sheet music. I made it for myself first of all, but it provides a good example of how the Piano Hat works and will hopefully help others to learn too. I don't read music fluently, especially around the leger lines, and many years ago I learned chord fingering using a program I wrote for the Amstrad CPC (pictured, right), playing my keyboard while watching the computer screen.
In the Clef Hero game, you are shown the treble stave and notes appear on it, which you then have to hit on the keyboard. The keyboard only has one octave on it, so the same key is reused for the same note in different octaves. The game starts easy with a small selection of notes, but gradually adds more notes and introduces sharps and flats until you're working with the full stave.
For its musical notes, the project uses Sonic Pi, so my tutorial also explains how you can use Sonic Pi to generate a scale and then use Audacity to turn it into separate note files that Clef Hero can play. You can find a guide to note numbers in Sonic Pi here.
The game is written in Python, using Pygame Zero.
Here are the links you need:
- Download The MagPi here - it's free as a PDF, but you can support the Raspberry Pi Foundation's educational mission by buying it in print or through the Apple App Store and Google Play Store.
- Download the Clef Hero Python code. - It downloads as a text file. Rename it to clef.py.
- Download the Sonic Pi code. - It also downloads as a text file. Rename it to listing1 or copy and paste it into Sonic Pi.
For more information on Sonic Pi and Python, take a look at the book I co-wrote with Mike Cook, Raspberry Pi For Dummies.
With thanks to Gerd Altmann who created the background design I'm using here.
10 February 2016
Writing a book can be a solitary business, especially for self-published novelists. I had a policy of not discussing my novel while writing it, because I wanted people to be excited by the book when it came out and not bored of hearing me talk about it. But that meant I overlooked an important step in the book's lifecycle: that of testing the cover and title with its audience before proceeding to publication.
My novel is a techno-thriller set in the music industry, and involves a conspiracy where a record label sells computer generated music to fans, without telling them the bands are fake.
It originally came out under the title University of Death, named after the "real" band that gets mixed up in the action. The cover design was a stark black and yellow silhouette of fans with their raised arms at a concert. The cover and title were distinctive, but they didn't reflect the book's content well, and some people were put off by what they thought was a zombie story. Given that most of my non-fiction books are about programming and website design, it was a real kick-self moment when I realised I'd failed to test the end product with its audience before releasing it.
When I came to publish the book on Kindle recently, I decided to get some more brains on the case. I started by running a brainstorm on Facebook to invite people to suggest a new name for the book. I had really struggled to come up with a good name, but there were lots of brilliant suggestions from my friends. I filtered out the titles already claimed for erotic fiction novels (my, those authors are prolific!) and those encumbered by trademarks or other business activities (I was particularly sorry to see Spytunes and Autotuned struck off the list). Finally, I chose the title 'Earworm', suggested by my friend Andy Lawn.
For the cover, I ran a design competition through 99designs.co.uk. You provide a brief, and the site's talented community of designers submit designs to meet it. After some rounds of feedback and shortlisting, you pay £189 for your chosen design.
Almost immediately, a design came in that I thought was a contender to be the final winner. It looked professional and it had dramatic typography that wouldn't look out of place in an airport bookshop. Even as some great other designs came in, it remained a favourite. When I had a few designs in, I put together a shortlist and ran a poll among my Facebook friends. Guess what? My favourite cover ranked fourth. Out of six. It looked like a war novel, somebody said, and they were right.
This was when I had to trust the crowd. It might be my book, but it needs to appeal primarily to my readers, and my friends represented those readers in all their diversity much better than any one person could. They identified a cover with much broader appeal, that better reflected the themes of the book, and which I'm pleased to say I've grown to love.
I've learned that whether it's for a brainstorm, or market research, one of the best assets an author can have is a network of friends who can provide a fresh perspective on the big decisions. Thank you to everyone who helped me. It made a huge difference.
Find out more about Earworm and see the final cover here. Earworm is out now on Kindle and in print on Amazon.
Photo shows Display Stand with Brains by Katharina Fritsch
21 January 2016
Somebody once said they would start jogging the first time they saw a jogger smile. That's a view I used to subscribe to too, but over the last year or so I've taken up running using the Couch 2 5K programme, and I'm writing this blog to recommend it to anyone who's interested in starting running. The programme has taken me from no running experience (and no real history of exercise) to completing a 10K run in the Olympic Park.
Couch 2 5K (or Couch to 5K) provides a structure for starting gently, and working your way up. In week one, you do several short bursts of running, with walking between them. Gradually, over the following weeks, you run more and walk less. By week 10, you're able to run 5K (or for 30 minutes) without stopping. There are many ways you can use the Couch 2 5K framework. The NHS provides a series of podcasts that you can listen to while you run, with cues for starting and stopping your run. I found this a great way to do the programme, because it saves you having to worry about timings, and they've chosen some uplifting music to carry you through the run. There's also an element of surprise if you don't read ahead: Laura will tell you at the start of the run what's coming up. One week I remember feeling like there was a significant step up, but the course prepares you, so it doesn't ask you to do something you haven't trained for, and I was hugely uplifted to achieve that week's goal. If I had read ahead I might not have felt ready to take it on.
The programme works on the assumption you can run every other day, but I can manage twice a week at the most, and had my programme broken by our trip to China, so it took me longer to complete. Many people are put off running or even injure themselves by trying to go too far or too fast too soon, so it's better to go at a pace that works for you and fit the programme into your life comfortably.
I started off with my normal trainers and got some proper running trainers when it was clear I was going to stick with it. Go to a running shop and let them do the treadmill analysis on you: with the right shoes, they can correct your gait to make your run smoother and safer.
After completing the podcast, I started putting together my own running playlists. Initially, I would put together a 30 minute playlist of running music, with a warm up and warm down track. By knowing the final song, I was able to use the playlist as my cue to stop running. Knowing the number of songs also helped me track my progress. I put the longer songs first as a psychological trick so I completed the songs more quickly at the end when I was more tired. After a while, I moved to using a playlist of running music and setting it on shuffle. I update that playlist with new music from time to time, and take out tracks that turn out not to be much fun to run to. My playlist includes a lot of 80s 12" remixes, and I get a real boost from some of the Depeche Mode remixes in particular. Sometimes I'll be feeling really drained, and then a track comes on that gives me a real surge of energy.
The problem with running for a set amount of time is that when you have a hard run you don't know why. There are good and bad runs, and you don't know what you'll get until you go. But there's a difference between a run that feels hard because you're having an off day, and a run that feels hard because you went faster, further or steeper than before. Getting a Garmin Forerunner GPS Watch really helped me to understand my running activity. On a day when it felt tough, it often showed me that was because I'd worked harder, rather than because I was having a rubbish day. It's helped me to measure performance and coach myself after the Couch25K ended, and many runners consider a GPS watch (or tracking app on a phone) to be an essential investment. At the Olympic Park run before the race, there was a constant chirrup of runners starting their watches. One runner had a shirt on that said: "If I collapse, pause my Garmin!"
So if you're curious about running, or just looking for some exercise you can do anywhere, any time, with minimal equipment, I hope you'll check out the Couch 2 5K. I won't pretend I find running easy and I have no great ambition to push myself to go ever further or faster. But I get out when I can and find it invigorating. Once in a while, you might see me in the flow, running steadily and enjoying my music. Maybe even, sometimes, with a smile on my face.
11 December 2015
My novel Earworm, a technothriller about the music business, features the band University of Death. Led by the charismatic and eccentric Dove, the band is struggling to survive as its fame and audience are in decline. I had a lot of fun writing about the UoD concert, where my goal was to capture the electricity of a live performance and give readers a hint of the band's sound that they could flesh out with their own imagination. One of the nice things about the book is that everyone will have a different idea of what the band sounds like.
I have, however, made a short track to help promote the book in which you can hear "University of Death" soundchecking at their Berlin concert, which is mentioned in the book. I put it together using some sample-based music software when the book was first published a few years ago, and thought I'd share it again now. It originally appeared on Dove's MySpace page, back when MySpace was the next big thing for bands. Now, I've uploaded it to my SoundCloud page. I've enabled it for download too, so you can add it to your iPod and playlists, and I've embedded it below so you can play it without leaving this page.
Earworm is available to order now in print and on Kindle from Amazon worldwide. It makes a great gift for a musician or music fan, so if you're looking for something a bit different to give this Christmas, I hope you'll take a look at it. You can read a sample of the book on the Amazon website, and read the rave reviews from music magazines here.
26 October 2015
Earworm, my novel about the music industry, is out today in print and on Kindle. The book was previously published under the title University of Death and received some great magazine reviews, but has never been available on Amazon until now.
The book is a techno-thriller that explores how fans relate to their favourite bands, how businesses can use technology to manipulate consumers, and what would happen if the music business disappeared overnight. The cast of characters includes the band University of Death, fighting to survive as a heritage act in an industry that's falling apart; and Goblin, a band formed by Simon and Fred who are desperately trying to claw their way in to the music business for the first time. They all become embroiled in a conspiracy that could make or break the music industry.
There were a couple of reasons for wanting to get it on Amazon. Firstly, I decided the book deserved every chance to find its readers, and Amazon is where most people buy books, for themselves or as gifts. It's frictionless because almost everyone has an account there. Secondly, putting it on Kindle enables me to make it available much more cheaply than I can in print. The book originally predates the Kindle, but novels clearly need a presence on Kindle if they are to reach many readers today. Amazon estimates the book provides 7 hours and 23 minutes of entertainment, and it took two years to create, and has had fantastic press reviews, so it's a snip at £2 or $3. If you're not sure, please read the first few chapters on the Amazon Kindle page to see if it's for you, and if you can't buy it now, consider adding it to your Amazon wishlist.
Earworm is enrolled in Amazon Matchbook so if you buy the print edition you can get the Kindle edition for free (check Amazon for details, only available in the US).
The book has been remastered (in music biz speak) for this edition, with minor updates and edits, a cleaner design and a new title (with thanks to Andy Lawn for suggesting it).
If you know someone else who might be interested, please let them know, or consider sharing the book's page on your social networks. It's really hard to promote novels, so all help is appreciated.
21 October 2015
This week sees the end of a project that has taken a couple of years: the captioning, tagging and publication of my travel photos. My travel photography gallery now has over 700 photos spread across 29 folders, each representing a different geography. The project officially began in April 2014, but I was working on it for some time before that, so it's been a big undertaking, although that is in part because I've been writing books and recording music at the same time and the gallery has only had my focus for short bursts between bigger projects. I've been uploading galleries every few months, with a blog post here every now and again to announce the latest additions.
The gallery was completed with the addition of Dubrovnik, Singapore, Antwerp (a surprise late entry - I only went there in August), and Wales. I also added some new photos in the London and England galleries. Below you can see some of the new additions.
I've also updated my Travel Photography Map, which lets you navigate to the galleries using a Google Map with photo pins dropped on it; and the Random Photo feature in my sidebar, which is included on most of the pages of this site. I have a few ideas for other 'discovery' features I can add to provide new ways of finding and enjoying the photos, but don't know yet whether or when I'll implement them.
I trimmed back some of the features on the photo pages, but each photo still has a map showing its location and a sliding puzzle game you can play for a mental workout. I warn you, though: some of the puzzles are tough!
One of the reasons I put these photos online is to see if it creates interesting opportunities for them, so let me know if you're interested in talking about how you'd like to make use of them, or if you're looking for similar photos or photos from the same locations. I have many thousands of photos that I haven't published online.
I've just got a first look at my new book, Super Skills: How to Code, which is out now. The book aims to teach young readers some of the fundamental concepts of programming, using Scratch to demonstrate them, and introduces basic HTML and CSS for building web pages. It features colourful illustrations and has a spiral binding that means it stays flat on the desk when you're copying the code or using it as a reference. It has a cover that wraps around the spiral binding to protect it. Following the book, you can build a number of games and demos, and your first web page.
It's published by QED Publishing, with different editions in the UK and the US, and a separate edition available with library binding. You can find links for ordering the book in my shop here.
One of my favourite projects in the book is a platform game, which readers can easily customise with their own designs. There's an extended version of the game with multiple levels below. To play it you will need a Flash-compatible device.
To get the very best out of Scratch, and work within the confines of a short (but powerful!) book, I've focused on Scratch 2.0. That means some of the examples won't work on the Raspberry Pi or on computers that still use the old version of Scratch. Since Scratch 2.0 is available online for free, I hope that this won't spoil anybody's enjoyment.
For more information on the book, including sample pages, the example code, and some further reading, check out my page for Super Skills: How to Code. I put a couple of Easter eggs on that page too.
For titles for even younger readers, check out Max Wainewright's How to Code series, for which I was the technical consultant. For those who want to dig deeper into the topics and languages introduced in this title, check out my books Scratch Programming in Easy Steps, Web Design in Easy Steps and Raspberry Pi For Dummies.