Coding Compendium
A free 100-page ebook collecting my projects and tutorials for Raspberry Pi, micro:bit, Scratch and Python. Simply join my newsletter to download it.
Piano Chords Tutor was a type-in listing I wrote that was published in Amstrad Computer User (ACU) January 1992. Try the program in the built-in emulator below, and scroll down for the original listing. Click on the emulator to activate your computer keyboard with it.
This program appeared in the 10-Liners section of Amstrad Computer User, which inspired my 10-block Scratch demos more recently.
When I wrote Chords Tutor, I was learning to play keyboards and thought it would be useful to have a simple program that tested me on my chords. It's like a flashcard program: it shows you the chord name, and then, after a short pause, shows you the keys in that chord. You can play it by actually putting your fingers on the keys of your piano or keyboard, or you can use it for mental practice.
The keyboard shown only has one octave in it, so some of the chords are inverted. A better approach might have been to show two octaves to ensure that each chord could start on its root note, but that would have required a more complex program that might not have fit into the 10-line limit.
There are just enough inks in Amstrad BASIC to be able to light up each key in the octave separately using colour swapping. I could have hidden the keyboard while it is drawn, but thought it would be more interesting for Amstrad users to see I was using colour swapping for this.
This version of the program has been extended with instructions at the start. This program is among the games and utilities on the Sean McManus Amstrad CPC Software Collection, which you can download for free to use with your favourite emulator.
You can hear my synth music, including my album Artificial, here.
You can download my Amstrad CPC games and utilities disc to use these programs in your favourite emulator. |
© Sean McManus. All rights reserved.
Visit www.sean.co.uk for free chapters from Sean's coding books (including Mission Python, Scratch Programming in Easy Steps and Coder Academy) and more!
A free 100-page ebook collecting my projects and tutorials for Raspberry Pi, micro:bit, Scratch and Python. Simply join my newsletter to download it.
Web Design in Easy Steps, now in its 7th Edition, shows you how to make effective websites that work on any device.
Power up your Microsoft Excel skills with this powerful pocket-sized book of tips that will save you time and help you learn more from your spreadsheets.
This book, now fully updated for Scratch 3, will take you from the basics of the Scratch language into the depths of its more advanced features. A great way to start programming.
Code a space adventure game in this Python programming book published by No Starch Press.
Discover how to make 3D games, create mazes, build a drum machine, make a game with cartoon animals and more!