When linking to these pages, please use the URL:
www.iki.fi/sol/ - it's permanent.
While waiting for some tests to run at work I felt I'd like to play around with some musical instrument at the office. Anything would do. Even a toy piano. So I went through the local second-hand stores and toy stores. The best I could find were some 15 Eur child's toys, which would have been sufficient except that they either had way too small keys (some toy pianos have decent "mini" keys) and/or they had two-voice polyphony.
I also noticed that a lot of the child's toys have identical internals, just the plastic is different. Same buttons (in different arrangements), same set of instruments, same demo songs.
Having exhausted the local options I figured I could buy some Casio keyboard or something. Nothing interesting in a sane price range on eBay (or the Finnish equivalent, huuto.net), which is understandable because shipping an electric piano isn't exactly cheap for individuals. And everybody expects to get close to original price for theirs, for some reason. Or alternatively would only sell as "pick up only", and I'm not about to travel a whole day just to pick up a toy keyboard..
So I started looking at the cheap piano-like things in online stores. My budget had to be expanded a bit because there simply isn't anything sensible out there apart from Teenage Engineering pocket operators, and I didn't feel like going that route. And even the cheapest "real synths" - Korg Volca line - start from around 150e without a power adaptor or shipping.
I also looked for synth modules without keys; I have one midi controller I'm not using at the moment, so I could have just hooked that up. Didn't find anything cheap. There might be a market for cheap synth modules, maybe a bunch of VSTs running on a raspberry pi?
In the end I ordered a Thomann Startone MK-300. Including a stand, a sustain pedal and shipping it came to around 150 euros, which is admittedly quite a bit for a toy piano, but there you go.
(The note stand is optional. I didn't bother installing it).
There were cheaper options - those Casios I mentioned - but those also generally don't even come with a power adapter, and including shipping the total would have risen to around 100 Eur anyway.
So what do you get with 150 Eur? 61 velocity sensitive keys, some 390 "voices", or instruments, many of which are simply small variations of each other, so I'd guess there's around a hundred or so unique instruments. Those can also be layered (playing two "voices" at the same time) or split (one instrument on left hand, another on right hand).
Some of the instruments sound better than others. The primary instrument seems to be the grand piano, which sounds nice at least to my ears, but then there are instruments like "orchestral harp" which has absolutely nothing to do with a harp. A lot of the sounds are quite "general midi".
It also comes with a ... I guess you could call it an automated backing band. With 100 "styles". Select style, hit play, hit a chord and the "band" fills the background, following the chord you set, while you play the lead. The band can also do a couple "fills" and there's a "intro/ending" feature, plus a fade in / fade out. To my ears it all sounds quite corny, but it's a fun feature nevertheless.
There's also a recording function, but that's pretty useless as you can't save the song in any way (apart from analog recording, but what's the point in recording the notes in RAM..?). You can live play on top of your recording, so it can be used as a kind of play looping, except that the song doesn't loop, so it's usefullness is rather limited.
There's also USB connectivity to a PC, and it can apparently be used as both a midi controller as well as a midi instrument. I haven't tried this though. Power-wise it can use either the bundled power adaptor or four AA batteries. No idea if it's USB powered, probably not.
There's three settings for the velocity sensitivity, but even the least sensitive settomg felt a bit too a bit too sensitive to my taste. But I guess if it has to err in one direction, this is better than requiring heavy operation (like a real piano). The keyboard can also be set in a button-operation mode where all key presses are considered to be in max volume.
Talking of options, there's a bunch of chorus and reverb options, but that's as far as any kind of "synthesizer" stuff goes. Those options are also behind rather awkward button presses, but at least they're there. For example, if you want to adjust chorus, you first tap "option" until the display says "chorus type", then press + or - until desired value is there, then tap "option" again until you get "chorus value" and press + and - to adjust the strength (which defaults to 0, or off). So testing different chorus options is "tad bit" awkward.
Finally, there's a bunch of demo songs and some kind of learning mode where you try to play some of the songs in there. I haven't looked at those too much, though.
I naturally took it apart to see what's inside. (What do you take me for? A musician?) There are three primary chips:
First one is a mx29gl128fht2i-90g: a 128 megabit flash chip which no doubt works as the ROM containing the samples, songs, firmware and whatnot. I pondered why not a ROM chip, but then, flash is probably cheap enough and you probably won't end up with a warehouse full of obsolete ROM chips.
Second one is Medeli A25, for which I didn't find any information, but it did lead me to the origins of the device. The chip is most likely a SoC / synthesizer.
The third chip is an anonymous blob. Wouldn't be surprised if it contains op amps.
So what's the Medeli chip? Medeli is apparently a Hong Kong based synth manufacturer I had not head of before (even though the name could be a pretty good pun in Finnish). Looking at their catalogue, the Medeli M17 is identical (apart from the model name and brand prints) to the Startone MK-300. And as it happens, Medeli M15 is identical to the Startone MK-200.
I tried to find a price quote for the Medeli M17, but the only one I found was a New Zealand store which sold it for approximately 200 Eur, so Thomann is not at least price gauging or anything.
The good side of finding the original is that it's possible to find more demo videos on Youtube for the instrument, which is much better than my playing..
As for build quality.. it's a bit plastic-y, but generally I don't have anything to complain about, especially considering it's price.
Anyway, it's funny how things have progressed. To me, this is a toy which with to play with while waiting for scripts to run, but looking back a few decades, this does a lot of stuff even the most high end professional gear couldn't dream of doing. But then again, the $5 raspberry pi beats the supercomputers of a few decades ago too.
I've made programs.
I've made apps.
I've made websites.
I've worked on proprietary software.
I've worked on open source.
I've done contract work.
I've coded for fun.
I've worked solo.
I've been a team member.
I've been a team lead.
I've been a software architect.
I've been a lecturer.
I've been a teacher.
I've been a mentor.
There's been times I've had trouble finding work.
I often have a feeling I'm not doing enough.
And sometimes I suffer from impostor syndrome.
I seem to be attracted to a certain genre of media that I decided to call "monster of the week" stories. This is a term that some people used for the x-files episodes that didn't drive the central story, but instead had the agents investigate a strange incident. As a term I think it fits the "genre" well enough.
The oldest incarnation that I know of is the German John Sinclair pulp fiction, which has been around since the 70's.
X-Files is said to have been inspired by Kolchak: the night stalker, an early 70's TV-series. I haven't seen any of that, but timeline-wise it would be around the same time as the John Sinclair publications. Both of those naturally draw inspiration from the old horror books like Dracula or Frankenstein, and back to Bible or even earlier folk stories.
For one reason or another there's never been an English incarnation of the John Sinclair stories, but it was published in Finnish as yöjuttu in my childhood for a while (I acquired most of the issues through an online auction a few years back for... research purposes).
John Sinclair is a senior officer in the Scotland yard, and ends up dealing with supernatural cases either through his job or through the people he knows. He's a normal mortal human, but has some allies and supernatural weapons (like a silver cross and silver bullets in his gun), but there's fairly little power creep in the series.
As writing quality goes, it is definitely pulp fiction, and the issues can be read in random order, even though they tend to connect in some ways - sometimes with strange results, such as the hero suffering from injuries that should take weeks or months to heal, only to end up in another fight the following day. But hey, it's fiction.
The stories always end up in situations where the hero (or whoever the hero is protecting) is in grave peril, like after being gravely wounded end up trapped in a coffin inside a morgue. Which is naturally on fire. The rescue happens without fail at the last possible moment. I read somewhere that some patients find the John Sinclair stories to be uplifting because he always wins, regardless of the odds.
X-files is another member of the genre. It's entirely possible this will be read by someone who doesn't know what that is, so here's the gist; X-Files is a TV series about a couple FBI agents that dig through paranormal cases. Agent Mulder is a believer, and Agent Scully is a sceptic. Whenever something weird happens, Mulder is all over it, and sees all the evidence, while Scully manages to miss the strange things. When the series goes on this dynamic changes somewhat, but as an example, in some X-Files book I read a friggin Aztec pyramid turns out to be a spaceship and flies away, and Scully is conveniently inside a tent while this happens..
The agents are completely normal humans, even though both end up in some paranormal experiments like being abducted or whatnot. There's almost no power creep at all. The agents do gain (and lose) some allies along the way, but those are more recurring characters than actual assets.
The series is built of "story episodes" and "monster of the week" episodes. The story episodes more or less move the story forward (the story, however, is so convoluted and obscure that it hardly matters - I do not believe they had designed it beforehand and always just moved in random directions). The monster of the week episodes are so detached from each other that you could pretty much watch them in random order. There are some monsters that come back, so watching those in correct order makes sense, though.
While watching the series I found it funny that most of the time, when a "monster of the week" episode came up, I could tell what the monster was from the first 10 seconds of the episode, largely because they appeared in the AD&D Monstrous_Compendium.
I did not watch the series to the end, but I don't think I missed much. And I guess they've reviving it again. X-Files has also inspired a bunch of other TV series later on, but I haven't really followed TV.
A Penny Arcade strip pointed me at Dresden Files, a book series about a wizard detective. That series definitely also fits the genre.
Harry is a wizard.. who is also a private eye. That's how things start, anyway. The series has serious issues with power creep, with every book having to throw more crap at Harry for some reason. I haven't read all the books, but Harry gains allies, toys and powers all the time, and at the same time the universe seems to throw more and more baddies at him. If in the first book he has to fight a single frog demon in his apartment, in some latter book he is the sole defender of reality against forces of evil with the dead rising from the grave to aid the vampire menace while the wizard council is having an open civil war, etc. You get the idea.
Now, Harry is not a normal human to begin with, but a friggin wizard, but still I find the power creep rather annoying. The series would have been interesting even without the power creep. Like with the other examples, there's plenty of grave peril with someone (Harry often enough) finding just enough strength in themselves to save the day, or close enough.
While in a hospital some time back I found The Shambling Guides by Mur Lafferty. I did not finish the book while in hospital, so I had to buy the book, and also bought the sequel. The publisher was not happy with the sales, so there's no third book, unfortunately.
Zoe is a travel guide book editor in between jobs, and ends up working for a strange publishing company that turns out to be run by a vampire, with a staff of demons, zombies, vampires, sprites and goddesses. Big cities being what they are, it's easy for a humanoid monster to blend in, and why not a travel guide for monsters?
Not everybody is happy about a human working with monsters, of course, and Zoe ends up in (surprise!) grave peril in almost every turn. And of course there's still the book to write.
There's a serious power creep problem with the books, at least in the second one; I don't know if the author could have kept it up. Hard to explain without spoiling things, but let's just say that the person at the end of the second book is very, very different from the heartbroken, jobless mortal human from the start of the first one.
It's a pity there wasn't a third book. But if those movie/TV-series plans work out, maybe there will be demand for more.
In games, there's of course the Sierra Gabriel Knight adventure game series.
Gabriel Knight is a rare book store owner who is aspiring to be a book author. He finds out that he's the last surviving heir of a family of "Schattenjägers", or "shadow hunters" and ends up tangled in a supernatural mystery.
There's no power creep in the games that I can think of. Gabriel and his sidekick Grace are pretty much a normal mortal humans, with a few toys and allies, but these hardly change from one game to the next. There's the perilous situations and different monsters in each game, thick with various historical (or pseudo-historical) lore.
The Gabriel Knight games are, however, rather old and uneven, each made with completely different technology (first, and the best, is a 2d adventure, second uses live action video(!), and the third used 3d graphics)
A much better game series that I feel fit the genre is the Wadjet Eye Games Blackwell series.
The gimmick in the Blackwell games is that your character is a mortal human who is assisted by a ghost, and your task is to find ghosts and help them to the afterlife. This requires you to investigate the background of those ghosts, and there are plenty of interesting things going on in the five games of the series.
There's also no power creep (after the initial what-the-heck-is-going-on), but I still recommend playing the series in order.
A more "AAA" take on the same idea can be found in Murdered: Soul Suspect, but honestly, play the Blackwell games.
A couple more "indie" adventures that have not (as far as I know) become a series yet include Cognition: an Erica Reed Thriller (more of a serial killer police drama, but could turn out interesting if they continue the story) and Kathy Rain" (closer to Gabriel Knight games, and I heartily recommend playing it). The Cognition game was rumoured to have a second season planned (it was released in four parts), but there's no news of this and the game is also now sold just as "Cognition" with the whole Erica Reed thing dropped from the title. Kathy Rain's developer is working on a completely different game, and Kathy Rain took four years to make, so I'm not holding my breath regarding a sequel there either.
I guess the vampire:masquerade games could also fit the bill, but the games are either so bad or so buggy that I wouldn't recommend them unless you're really hardcore into it. (Playing as a Malkovian was crazy fun, though).
So what's the common thread? Modern day, (more or less) normal mortals entangled (often in grave peril) with paranormal and/or monsters that the normal people do not, for one reason or another, see.
If I've missed some gems in this genre of sorts, I'd love to hear about them.
I recently purchased Acer Aspire VX15 laptop, and wanted to dual-boot it between Windows 10 (that it came with) and Ubuntu. For reasons.
Since basically all the guides on the net that I followed failed me, here's approximate steps how I got it working:
1. Boot up, go through Windows first time run, declining most things.
2. Remove crapware. This took forever. Probably left some in there. Also removed pre-installed Firefox and installed a fresh copy just in case.
3. In the partition manager (just tap windows key and type partition to get there) I shrunk the Windows partition down as much as it went (right-click on the biggest partition and choose the shrink option).
The partition went down to about half the disk space. This left decent amount of space for Windows and overkill amount for Ubuntu. If I need, I can ditch the Ubuntu partitions later on and just grow the Windows partition again.
At this point you should have Windows boot manager partition, Windows partition, unallocated partition and recovery partition.
4. Put Ubuntu ISO on a memory stick using a tool called rufus. Don't even try to consider using a DVD. I first tried booting off a DVD (using USB DVD drive) and the boot-up went on for several hours before I gave up; from a memory stick it was just a few seconds.
5. Go to BIOS settings (well, UEFI settings to be precise, but, well, you know), by tapping F2 like crazy when booting up. If the screen lights up without the Acer logo, you've succeeded, and the BIOS will pop up shortly. If you see the Windows 10 bootup circle, you've failed; try again.
6. In the BIOS settings find the option to enable the F12 boot menu.
7. Plug in the Ubuntu install stick, save and exit from BIOS settings, tap F12 like crazy to get to the boot menu.
8. Select the memory stick from the boot menu. If it doesn't show up, reboot and try again. Sometimes it appeared, sometimes not. If that doesn't help, go back to BIOS and try to see if there's some setting that blocks booting from USB devices.
9. Install Ubuntu alongside Windows. No "do something else" trickery, the defaults worked fine. (If you want to dual-boot to several versions of Linux, or something crazy like that, well, you're probably not reading this, now, are you?)
10. Boot back to BIOS settings. In security tab set the administrator password. Setting the password enables like half of the settings you can touch. After setting the password you'll need it every time you boot to the BIOS settings, so better set it to something memorable like "1234". Or something secure if you're paranoid.
11. In Secureboot settings, select the option to add stuff to Secureboot.
12. Browse down to /EFI/ubuntu/shimx64.efi and add that.
13. Save and exit, and tap f12 like crazy to get to the boot menu.
14. Select Ubuntu to boot to it.
See? No need to disable Secureboot, no need to boot in legacy mode, no need to reinstall Windows. I went through installing Ubuntu a few times, switching between Ubuntu versions, trying to play with efibootmgr just to find that the bios overwrites my settings every time on bootup, tried boot-repair, nothing worked, but just simply adding the Ubuntu to the Secureboot from the BIOS settings did the trick.
Oh, and follow these instructions on your own risk, naturally. Just, like, a word of warning. Backups and stuff. You know the drill.
So what was the "toaster" game that I had in my mind? Well, it would have been something like..
Walking around in space stations and on land-able locations, like you do in Space Rogue.
Hyperspace navigation in 3D, like in Space Rogue. This is not something I'd do now, I think it would have been a bad idea, when everything else in the game is 2D.
Ship engine room / device management like in Lightspeed or Hyperspeed. There's just something about seeing those thingamabobs in their slots. Relatively simple thing but I still love it.
Dialogue with aliens (and other NPCs) like in Star Control 2.
Planet surveys like in Star Control 2 or Lightspeed / Hyperspeed or even Starflight. I'm not so sure about the landing bit, except for the land-able locations. So most planets would be just scanning for some things, maybe sending a probe or something, and some places would have actual Star Trek-esque "away missions".
And of course, space battles like in Star Control 2. With more than two ships at once (which is what some other later games have done).
Navigation in the galaxy would have been done in some other way, possibly by picking dots on a rotating galaxy map or something. Something that looked cool, anyway. I was (and am) a demo coder after all.
There's one genre of games that I've loved to bits, and am a bit sad that there are relatively few of these games around. I've decided to call the genre "Space Fantasy Games"; I considered including "Adventure" in there but that didn't result in a nice acronym, soooo..
What defines this genre includes:
Since there are so few of these, I'm willing to bend the rules a bit, as you'll find. I'm listing a few games in publication order.
Starflight came out way back in 1986, and it's one I have never played. I've watched some videos on youtube, though, and I'm pretty sure I might have enjoyed it back when it came out (if I had been old enough to enjoy it). Since I don't have the required nostalgia factor for it, it doesn't seem appealing to me to try it now.
You explore the galaxy to find a new home for humanity, discuss with various aliens to get hints on what to do, there are space battles (albeit rather simple ones), you can scan and land on planets to find stuff. There's trading, ship modification, etc.
But it's old, and that unfortunately shows.
Space Rogue came out in 1989, and it's a game I've actually played. I never solved it, even though (I've later found) the storyline is rather short. It has full 3d space battles which are mainly frustrating, but were impressive at the time.
You explore the galaxy one quadrant at the time, can dock at various places to walk around in ultima IV-esque kinda isometric view, talk with NPCs, change your ships systems, buy and sell stuff, etc.
Lightspeed, and its expanded version Hyperspeed came out in 1990 and 1991. Hyperspeed includes everything Lightspeed has, plus more content.
I'm actually surprised this game came out so early; I think I found out about it way after I had played Star Control 2.
You fly around in fully 3d environment (again), having space battles, collect resources, talk to aliens, trade with aliens, outfit your ship (with a gorgeous engine room view). I'm pretty sure there was some kind of plot too, but nothing as strong as in..
The game that made me totally fall in love with the genre, Star Control 2, came out in 1992. This game has been open sourced and can be found with the name "Ur-Quan Masters" for free, and I do recommend trying it out if you haven't. The open source version doesn't carry the "Star Control" name due to licensing issues. (Star Control 3 was made by Legend Entertainment when they had turned from a high quality adventure house to a 3rd party outsourcing house, and it's not as good).
A new Star Control game is in the works, and I'm just hoping they don't screw it up. High hopes, but not holding my breath.
You talk to aliens, land on planets to find resources and items, have 2D space battles, explore the galaxy, and update your ship, whilst trying to figure out the plot and avoid the end of the world.
Solar Winds (parts 1 and 2) came out in 1993 from a small indie game studio Epic Games which modern audiences may know for their Unreal engine.
I remember playing the part 1 back when it came out and finding it to be Star Control 2 inspired, but much smaller game. You explore the galaxy, have space battles in 2D, talk to aliens. And there's a plot. Not sure if you can fix up your ship, but I find that very likely.
The closest modern game I can think of is Mass Effect (2008). You explore the galaxy, trade, talk to aliens; there's no space battles (outside cutscenes, anyway) but FPS/tactical battles instead. You don't fix up your ship, but instead you upgrade your gear, which makes more sense because the battles are in FPS. And there's plot. Lots of plot. And lots of talking. You can also land on planets and drive around, looking for stuff.
There are a bunch of games that come close but don't exactly fit the genre I'm defining here. Here's a few examples:
Ring Runner: Flight of the Sages (2013). Has 2D space battles, outfitting your ship, exploring the galaxy.. kind of. And I think there's plot, but couldn't make myself play it long enough to get really into it. There's no dialogue, just cutscenes, and all the places you go to are scenarios (with end of scenario screens), so it feels a bit too "gamey", instead of feeling like being there.
Rebel Galaxy (2015). You don't really explore anything, the game is very linear, and there's a handful of people to talk with but they're not really engaging. You do get to buy new ships and outfit them. You do get to fly REALLY BIG ships in this weird 2D game that looks like 3D, and I'd rather call it "space truckers", to be honest.
Someone suggested Elite Dangerous (2015) as it has aliens now, but as far as I can tell, you let your guns do the talking. FTL (2012) isn't really free exploration. Neither of these really have a plot. Knights of the Old Republic (2003) doesn't have you explore the galaxy.
It's been ages since I played Freelancer (2003), but as far as I recall there's no real dialogue and the game's story is very linear. Same can be said for Darkstar One (2006). Both concentrate on 3d space battles and trading.
One potentially fitting game in the genre is The Long Journey Home which should be released in 2017. I'm a bit worried about the randomly generated world though.
Other games on Steam from a quick search which I haven't tried that might fit include: Endless Sky (2015), ARM Planetary Prospectors Asteroid Resource Mining (2015) and Space Rangers HD: A War Apart (2013). Some of the X-series of games may also fit, but I haven't studied them enough to say.
Old games that may fit that I haven't studied include SunDog: Frozen Legacy (1984) and Protostar (1993).
I'd love to hear of others - there's bound to be a bunch out there, as I'm sure I'm not the only one looking for another one!
Back in 1993 I was in high school, and spent most of my free time doing various programming projects, most of which didn't go anywhere. One of these was a game called "toaster" - the name didn't refer to toasted bread, but was a reference to the epic backstory I never actually ended up writing down anywhere.
The main character was some ex-space navy grunt who had got the nickname after frying a bunch of aliens, or something. You know. Epic.
The game itself was (rather obviously) heavily inspired by Star Control.
During breaks we played some games in the computer class. Some people liked playing Toaster. Some people skipped class to play Toaster. Here's a short video of Toaster.
WARNING: Has loud noises.
In hindsight I was way over my head with the project. The idea was to mix Star Control and Space Rogue, with a strong storyline. You could walk around in top-down view of locations like space stations or cities on planets, travel through space via some kind of galaxy map (possibly with actual first person 3d navigation through the hyperspace), and space battles were done in Star Control way.
The storyline orbitted around the idea that Earth is actually a machine that runs civilizations, and when some timer runs out, the civilization gets wiped out and the process starts all over again. As a dead man's switch, if humans didn't get the flu often enough we'd die - that meant that new strains of the flu virus had to be transported to everybody in the star-faring human civilization. Once the timer runs out, no new flu virus appears. The goal is to figure out what's going on, who's running the things and how to solve the problem.
All of the ships in the version above are identical except for the sprite sheet. I was planning various power levels and hitpoints and AI enemies using a scripting language that I'd need to invent, etc.
There's a second prototype, a complete rewrite that didn't even get as far as the version above, but with nicer graphics.
I guess if I started doing that project today, I could pull all of it off, but it would still be a lot of work. Oh, and I was already hitting the limitations of real-mode Turbo Pascal with that project. The primary problem doing that projec today is that art asset requirements have completely exploded (unless you go "retro aesthetic", I guess).
Some technical details - the game runs in VGA 13h mode, so 320x200 and 256 colors out of palette of 64*64*64=256k colors, and all the fades etc. are based on just adjusting the palette, without touching the actual pixels. The ship explosion effect (which is probably the most advanced thing in it) is a marching ant fractal.
And oh boy, was I ever paranoid. The game (and its source code) is littered with warnings not to distribute, as it's closed beta or whatever. In the video above I skip the intro and outro texts about all that. I doubt the game would have gotten wide distribution even if I had forced it on people. But who knows? The second version actually requires you to type in a password in order to play.
Since last time, the Pi has gained a header (with the "Connect These And The Pi Fries" pins blocked with blu-tack).
And the piano itself has lost the blob board, and gained a bunch of wires (with rather shoddy solder job, but I hope it holds until I get everything inside the box). The image above also shows just how tiny the keys are compared to "normal" piano keys.
I connected the wires to the Pi and started working on a GPIO analysis tool.
The tool more or less works, but the signals I got out of the piano were strange. I found a few reasons for this.
First, since I had not labeled the wires, I had no idea what order they were in. Second, the Pi's pull up/pull down resistors were configured in more or less random order, so signals got pulled every way. Setting them all to pull up resulted in weird results; a couple pins did not want to be 0 by default. After suspecting some kernel daemon messing things up etc, I found a note on some forum thread noting that the pins 2 and 3 have fixed pull-down resistors. So I set everything to pull-down for now. If that doesn't work out, I'll just have to use some other GPIO pins.
Third, the piano keys themselves pretty much require the box to be screwed shut, or otherwise the long circuit board just flexes which is not a good thing. So I need some way to get the wires out of the box while having it closed. Which means making a hole in the box.
Of course, when I started labeling the wires, I found that at least one of the wires was loose. (See "shoddy solder job", above).
At that point I figured it's time to take a break, and put the project on a shelf for a couple weeks.
When I picked the project up again, I tied all the wires together to create a common hard point which is hopefully better for the solder points - the wires should bend from the common point rather than from the solder point. In theory, at least. The negative side of this is that knot is a bit big and may cause problems when I squeeze the box closed.
I also opted to put the pi inside the case. My first idea was to use screws to connect the board to the bottom and then dremel the excess screws off the bottom, but turns out that the plastic is fraction of a millimeter thick and thus screws wouldn't hold. So I made four holes and tied the pi in there.
I also dremeled a rough hole to the back of the case to get the USB cables out.
And this time I wanted to make sure I know which wire is which, so I labeled them all.
So I wired the cables so that I used the first 11 GPIO slots, 0-10, and then carefully closed the box. Experimenting with the signals I found that pins 2 and 3 were linked; either there's something going on with the pi, or I managed to short circuit something when soldering. So I opened the box again to move the wires.. and so many wires got loose that I got frustrated and moved the box on a shelf again for a few days.
After I picked it up again and moved the cables pins 2 and 3 to 11 and 12, got the box closed again, and got to testing again.
To reiterate: I was using pins 0,1,4,5,6,7,8,9,10,11 and 12. When I tried different keys with different pins in read and write position, I found that I got reactions from pins 15 and 25. What the? Either the pinout.xyz is not accurate for the pi zero, or there's something going on I have no idea about, or there's some really, really weird soldering problems going on.
I rewrote my GPIO analysis program, ditching the interactive state display and made it to scan all GPIO configurations to see if there's any life when I press the piano keys. What I expected to find, if everything worked right, is that when a key is pressed, multiple GPIO pins go to 0. This didn't happen, though. Additionally, the only pins that had any kind of effect were 0,1,4,5,8,10,15 and 25, so only 8 wires did anything out of 11. Possible reasons for this include bad connections to the pi (easy enough when I had to squeeze the box closed), bad soldering, or even broken circuit boards. Crap.
On positive note, the signals that I did get seemed logical - one pin being responsible for a bunch of adjacent keys.
As the next step I took the pi outside the box and pulled the wires out of the hole that I had dremeled, planning to plug them in outside the box. That should at least say whether it was the case of bad connections to the pi. The wires are tad bit short though so connecting them to the pi was so frustrating I put the project on a shelf again.
And that's where I'm at, primarily waiting for inspiration to tinker with it again.
I'm still waiting for the usb audio device to come in the mail. When that arrives I can play a bit more in the software side. At the moment I'm not all that certain if that toy piano will work out at all. One idea would be to plug an USB midi keyboard to the pi and using PortMidi to get the keys.. in which case I'd be using the pi just like a regular computer though. We'll see.
So happy 2017, let's hope it's better than 2016 was. Bound to be, for some people at least.
Anyway, here's the demo:
I also wrote breakdown of last year's demo even though nobody asked for it.