Monday, August 27, 2012

Saturday, August 25, 2012

Rise up and Roar!

A new original compo to test my new string library :3

Wednesday, August 22, 2012

Kalman Filter, finally

After pouring over lots of kalman filter articles and examples, I finally got around to building a 1D kalman filter. After some tweaking, I also coded a low pass filter, and I was stunned to see how close they are in performance. I thought it was my code that was having some issues, but after reading some blogs, it seems that for the kalman filter is really meant for sensor fusion, and requires at least two sensors working in complementary fashions to each other to really utilize the kalman filter.

Also, I read another link about how a 1D kalman filter basically converges its kalman gain into a steady state gain, basically becoming a low pass filter. If I can find the link again, I'll post it up. Here we go.

In light of these "discoveries", I'm going to just play around with the 1d kalman filter abit, see if I can get a bit more out of it. For the breath controller project, I will look into using an analog low pass filter as a antialiasing filter for the ADC. I believe using the analog filter will remove any unwanted frequencies above the nyquist rate I'm sampling at (I'm thinking at least 4x oversampling), and then use a digital low pass filter internally to smooth things out.

Other news, London's weather is really nice now, but it was really very hot over the weekend, a sudden change. Not taking it well, I'm kinda having a feverish spell the last few days, it's one of those feeling ill but not ill enough to take a sick day things. Gah.

Saturday, August 18, 2012

Odd pricing of the Nintendo E-shop

The Nintendo E-shop recently released a few new titles, one of which, the "New Art Academy" seems like a fun drawing program, but it costs £29.90, nearly £10 more compared to the retail package on amazon.

One reason we can guess is to limit competition between the e-shop and retail outlets - else who would want to walk into a game shop? But £10 more? Arguably, for certain games, well Art Academy is more like a drawing tool  than a game, and I'd much prefer to have it on my internal memory, not as a cartridge. But to pay nearly £10 more is a bit excessive - especially when the costs of distribution, and physical retail packages are not needed.

Also, I think the 3ds is doing a number to my eyes, I've been very tired lately, and I am quite certain it is from squinting into that tiny little screen. I've never felt this way till I got the 3ds, and I spend ALOT of time in front of screens, at home at at work, and have never felt this tired. This wolf think it is time to get rid of gaming (but but but) to save my eyes.

Friday, August 17, 2012

Kalman Filtering

Found this really nifty site by googling "Kalman Filter for Dummies" (NOTE: The site linked above is missing the usage of Q in the example). Nice :P Been trying to figure out Kalman filtering for the fun of it; most of the stuff I'm doing and planning to do do not involve sensor fusion but you know, you feel left out when you're only playing with one sensor, and the big guys are playing with self guided robots equipped with like a dozen sensors :P

Anyways, I usually just vomit blood and concuss after attempting to read papers and websites on kalman filters; linear systems are just not my thing, but the site linked above has an extremely good example done on just one input - exactly what I need. Following along with the calculated examples shows how straight forward it is, only requiring the tuning of one variable, R.  with R and Q to tune.

Don't think I have time this weekend, but I'd love to do a prototype in python or C, then the next stage would be to expand it to further tests with my beautiful ADXL335 with live graphing to processing - given that the Kalman filter only requires data from the previous state, it should give a much better result than what I've been using, e.g. averaging filters.

New game, game demo musings

A few new demo games on the 3ds I'd like to write about.

Mario & Sonic at the London 2012 Olympic Games: A very fun series of mini games. Not my thing, but the demo is surprisingly very enjoyable! I'm not sure about the multiplayer features, would make for a really fun group game; as much fun as mario kart is, not everyone enjoys racing games, and this set of mini games runs a wide gamut of genres.

Heroes of Ruin: Now, I was expecting to really enjoy this, however, after I finished the demo my thoughts were: boring diablo clone. I think this game would fare better in a multiplayer situation. One plus point is that you can choose to play an anthro lion as one of the classes: Lion-O, anyone?

Kingdom Hearts: Dream Drop Distance. WHOA! This one goes on list of games to play. Controls are fantastic, and the fighting sequences top notch, graphics are polished.

So, yesterday I got a new game, Dillon's Rolling Western, from the Nintendo E-shop. Pretty much a hassle free experience, and the game downloaded pretty rapidly. The base genre is tower defence mixed in with action. A surprising mix, but quite enjoyable.

The main character, is a cowboy styled armadillo, who, wait for it, does a Sonic style Spin Dash for his main sttack (as well as general getting around), which can be chained into various combos and multi-hit grinding attacks. Controls are very responsive, and the additional of some auto-targeting is very welcome in the heat of battle.

Game play is split into two segments; day and night. Day has you harvesting plants of sorts which, when you hand it over to the towns you are protecting, increases their "livestocks" - better known via its generic term as hit points. Livestock hits zero, GAME OVER! Other tasks include actually deciding what kind of towers go where, and harvesting minerals (without an SCV) in order to fortify the entrances to the town.

Night time brings out the bad guys, who's sole aim is to get into town and chew down on some delicious livestock. The bad guys, are... walking rocks with an attitude. I mean, so far the coolest I've fought are biker rocks. I mean, rocks on flintstone styled motorcycles. Woo!

It's also a pretty tough game, the 4 stage threw me for a loop, randomly throwing in a super enemy that I couldn't reach in time, and destroyed all my towers in seconds. Game over on that run.

The formula is pretty straightforward, fun, and challenging, but it becomes quite repetitive - you spend 3 days in the town, so doing the harvesting stint 3 times (it gets shorter every day), followed by town defence for 3 nights. Meh. I'm at stage 5 right now, and actually can't get in because I need 12 or 14 sheriff stars and I lack 2, so I need to re-play some stages.... uh, no. I'll put this aside for now. Got a busy weekend ahead.

Thursday, August 16, 2012

Game pricing at Game

Went to pick up Theatrhythm Final Fantasy (the name still puzzles me) from Game today, prices online was £24.99, but when I arrived at the shop it was £29.99! Uh, no. Checking out the used games section also had me frowning, e.g. animal crossing, used, was £20.99.... surely it did not cost that much for such an old game? Checking online against CEX, it was... £10 used. Two streets later, I was at CEX, and there it was on the shelf, animal crossing ww for £10. Pricing is odd.

No games for me today.

EDIT: Amazon has it for £20.39! Mindboggling.

Wednesday, August 15, 2012

Theatrhythm Final Fantasy

I don't think I've ever been a fan of music games; dance dance revolution probably comes to mind as one of the earliest I've seen but never really got into it. Theatrhythm final fantasy though, even thought it has nothing with people jumping on touchpads, is brilliant! I've only got the demo, its got the exact same paradigm as any other music game; perform some action according to the beat of the music as indicated by the icons onscreen. With the 3ds, it means doing various strokes on the touchscreen with your stylus.

Holding the stylus down, moving it about, tapping, as well as various strokes seem really simple, but in the game when moving at a rapid pace, it is not only giggle inducing, but also reflects the "battle" between your 4 adventurers and the monster they are fighting.

The demo only has 2 stages, 3 difficulties each, if you are winning, it seems that you get a chance to call upon a summon or cast a spell, but missing notes means you lose hp, and like most FF games, when it reaches zero, it's game over!

Only two tunes were in the demo, only the "Man with a machine gun" is familiar to me, the other tune was from XIII, never played that. Still, it's awfully nice to hear a remix of a tune from your youth. Guess this baby is on my to-buy list.

Monday, August 13, 2012

MIDI Controller: Phase 3

Now that I've got a working prototype, the next stage will be to simplify the design, as well as put in some of the features I've been thinking about.

First, there is the question of using MIDI Out + power supply, or just using a USB-Midi device.

The first one would have the advantage of plugging into any midi device following the standard. USB Midi on the other hand would boast the most convenience for desktop warriors like myself.

USB Midi is more difficult as one would need a way to make the device appear as a midi device on your pc/mac, and there are some very nice hacks that involve modifying cheap usb midi inputs for that purpose.

Now I've not been following the Arduino scene, and thought I'd check it up. Evidently they've been busy, and came up with a new bit of hardware, the Arduino Leonardo.

According to forums and such, it is possible to setup the Leonardo so that it appears as a midi device to desktop machines, pretty nifty! What's more, after a bit of reading, there exists another option, the Teensy, that looks like the perfect solution for my needs: compact, affordable, usb powered, and can be setup to be seen as a midi device by desktop machines.

And with the microp compatible breath sensor I hope to get next month, this will be a very compact device.

Things that I wish to implement in phase 3 include using the Teensy with the new breath controller, using a variable control so that we can using either alot or little breath to hit the full range of the sensor, as well as another control to change the linearity of the response. Oh, I will probably want to look into filtering the data... not so keen on it though as I had a stint at work where we were up to our necks filtering volumetric data, so... the thought of FILTERING MORE DATA AT HOME is not entirely enticing.

Other thoughts include using a dip switch to allow selection of which channel to send the midi data to, not only to 2, though the thought of wiring up a dip switch makes me somewhat ill. Like, eww. Dip switches are so not sexy. Especially compared to those sexy ADXL335s. Baby.

Also, mouthpiece design. There has to be something I can re-purpose for that.

And, given that the Teensy has lots of inputs both digital and analog, additional stuff can be connected like a bite pressure sensor, that could be routed to another CC for use in the daw, and stuff like connecting accelerometers, thermometers, barometers etc. Maybe for the final instrument itself, this is just for the breath controller.

Oh well, enough musings, can't wait for payday.

Sunday, August 12, 2012

MIDI Breath Controller: Phase 2 completion thoughts.

As mentioned, a video of the breath controller in action, as well as a description of what the various parts of the controller are for.

There are some aspects about this that I don't like yet, that I hope to rectify next.

First, the actual blowing aspect. Because I'm now just blowing down a tube, if I actually put too much lip pressure on the tube, it collapses and needs more pressure to get the high values. I think some sort of mouthpiece needs to be constructed for it. Maybe like a used saxophone mouthpiece, or something in the shape of a recorder's mouthpiece.

I still haven't considered how to make it hands-free, as I need that capability in the future. More tweaking of the physical layout of the tubes is also probably required to try to maximize the dynamic range of the sensor. Right now I'm only using about 2/3 of the range.

Next, I'd like to test out various sensitivity curves on the data. Right now, it is just directly remapping 0-1023 to 0-127. I'd like to see the results with a power function applied, so if you are playing a soft piece, a value of 2 will give most of the range to the softer side of things, and if you need loud fast, applying something like 0.4 will give you that.

Maybe I can have a footswitch of sorts that would allow us to dynamically switch between pre-defined curve types, so if I'm in a loud staccato passage, I can use 0.4, then back to 1 for normal passages, and 2 when I need more dynamics on the softer side of things. Mmmmm. I like cheese.

Hardware wise, I'd like to move on to using the MPX5010GSX, so I can bypass all the external circuitry for power and signal amplification. Curiously, I wonder if this sensor will provide similar performance to the one I'm using now.

I also want to miniaturize the arduino side of things. There are many "minimal arduino" setups around, only needing a few discrete components to work. There are two versions I'd like to build, one designed to work at my daw, and one that is portable for performance.

Given that I only need ONE input, and that the requirements seem to be so minimal (I mean, 4 lines of code?), instead of using a full blown AtMega chip, I could look into using one of the slower, more compact microcontrollers (e.g. tinyAVR).

Oh, here's the full arduino code:

11th August 2012
Breath controller code by Alvin Yap

Use at your own risk!


int serialDebug = 0;
int breathInput = 0;

void setup() {
  // put your setup code here, to run once:
  if (serialDebug)

void loop() {  
  breathInput = map(analogRead(0),0,1023,0,127);
  if (serialDebug)
    if(breathInput >0)

  delay(41); // sleep for 41 milliseconds; 
  // so assuming there is actually some values detected, we only send about 24 messages a second. 

As you can see, if I were to strip out the debug code, the essence of it can be run with about 4 lines:

breathInput = map(analogRead(0),0,1023,0,127); // read and remap
if(breathInput >0) 
 MIDI.sendControlChange(2,breathInput,1); // send cc if it is more than 0

 That said, to reach these 4 lines took me like 1 hour+ to figure out how to send CC data to the daw, testing said commands, then finally integrating the hardware and software (*cough* one wire *cough*), as well as completing some side quests in Solatorobo and Ocarina of Time. I think the side quests took most of that time.

Also, sampling. There is no filtering right now. Sending the midi data at about 24 times a seconds seems to work much better than my original tests at 100 times a second. In fact, a lower value may even work better, but I'll have to test it.

Finally, I am also pondering about how to connect the device to the pc on its own. Using the midi route is fine, but what about midi over usb? Stuff like that would probably be more tedious to implement, but if the software works well, I think porting it over for midi over usb won't be too difficult. Maybe. Hopefully :P The key advantage would be using usb directly for power, as with the arduino, instead of having to have batteries or some power hookup.

What's next?
Given that I started this project about a year ago and only spent like maybe 8 hours on it in the last 2 weeks, I'm the penultimate king of slackers (*rawr*) I'm going to put this aside for a bit and figure out how to do watercolours, I'll be back.... someday. Heck, I still have a ribbon mic to build.

Saturday, August 11, 2012

MIDI Breath Controller: IT WORKS!

Woo! Only a few lines of code, thanks to the Arduino Midi library! Will post a video tomorrow, bloody happy right now. I think some form of filtering is definitely required as the values tend to be quite jumpy - more tomorrow!

Note to self: MPX5010GSX - 5V breath controller, with output at Vfs 5V! This looks like the ideal breath sensor to match with the Arduino... only needs 3 connections, Vcc, GND and Vout. Aiee.... wish I'd knew about this earlier :( Would have saved me alot of time and £££ figuring out about the instrumentation amps and power supplies. On the flip side, I did learn a fair bit there, so :)

MP3V5010 is another option, but it is smt, ick.

Midi Controller: Hardware working :)

Woo! I have got the hardware side working! Finally :3

I started with the pressure sensor. and that went off without a hitch. Initially I was getting the same values, of about ~5mV when blowing full tilt. Reminds me of playing my real flute, as I was getting dizzy :P

Looking carefully at how I was sending the air down the tubes, I realized two things, that the Y joint was pointing the wrong way, so when I blow down the tube, the air actually has to bend around the Y connector before hitting the sensor. Switching the Y connector so that the air pressure smoothly hits the sensor helped alot.

Next, as I totally didn't get a valve, I used a zip tie to decrease the diameter of the outlet pipe. In doing so, I could get values in the range of ~10mV! Further tightening of the gap allowed me to get voltages in excess of 15mV, but to reach 15mV, I had to apply *alot* of breath pressure, and it felt really uncomfortable.

I re-adjusted so that the sensor would allow ~10mV at a pressure that didn't feel too uncomfortable, and proceeded to hook up the rest of the parts.

Next up, was the voltage converter to power the instrumentation amplifier. The amplifier requires +/- voltage to allow amplification of negative signals, e.g. audio, though in our case, I only need positive voltages. But oh well.

I'm not sure why, but the Si7661 refused to give me a negative voltage, only giving me 0V from the output terminal with a 5V input. Checking the spec sheet, the minimum input is 4.5V, and the arduino was providing voltages above that, so I have no idea what was up. On the verge of giving up, I connected the 10V out (for powering the MPX2010GSX) into the Si7661 and hey, presto! I got +/- 10VDC. Sweet :3

I wanted only +/-5V for maximum swing of the amplifier downstream; +/-10V is ok I think, given that I'm setting the gain to hit about 5V max anyways.

(Note to self: See ICL7660 for lower voltage voltage converter)

After a short break (read: gaming), I plonked down the INA114AP Instrument Amplifier and set it up so that the gain G = 500 with a 100 ohm resistor. I can't believe how simple it was to get that working. The two 0.1uF caps (the orange things) are amusingly larger than the IA itself.

Connected the outputs of the breath sensor to the inputs of the instrument amplifier, and connected the outputs of the amplifier to the multimeter, then gingerly connected power....

And WOOT! It works! I was getting about 5V at peak blowing pressure - which is perfect for the Arduino's analog inputs. However, at rest, the readout from the multimeter gave me a value of -0.06V. So, about 60mV, negative. I'm not sure why this is so, but I need to get some offset voltages going.

I think this can be done by doing two stage amplification; the first stage as unity gain plus offset control, then the 2nd stage for the usual amplification with V- tied to ground.

According to the data sheet though, Vref can be used with another op amp and several other components to compensate for offset. That's another option. Probably easier too.

In the meantime however, I think this _should_ be good enough to write the software on the arduino that allows me to control CC2 on my daw :3

On the software side, I'm wondering if there is a need to filter the input data off the analog input. Part of me says yes, filter the damned thing with at least a small moving window filter given as we have time between sending midi messages. Another part of me says, that's not natural, we should just send what's there, noise and all over to the daw.

Meanwhile, as the struggle for filter vs non filtering goes on, it's time to hit publish, shut off the browser and go save the world. In a game world of course ;-)

DISCLAIMER: What you read above is me sharing what I've experienced; if it doesn't work for you and damages stuff, don't come looking for me...

Friday, August 10, 2012

Ocarina of Time 3D

It has been a long while since I played a Zelda game; the last Nintendo console I had was the SNES, and I never could afford the N64 and newer consoles, till I finally played Phantom Hourglass on the NDS. After Solatorobo having caught my eye (yay ghibli styled world!), I just had to catch up with Link and Zelda.

-= Warning: Spoilers =-

The original Ocarina of Time was released way back in 1998, and it is quite easy to see why this game has had such outstanding ratings back in the past. A good, enjoyable storyline, bloody challenging dungeons and a big, big, BIG world for all those hard core gamers aiming to collect 100% of the items.

The 3DS version has uber upgraded graphics, upgraded UI design and makes creative use of the gyro when in first person view. Of course, as it is a 3DS game, it uses the 3D screen for some mindbending visuals.

The Game
This game is long. FF7 took me 17,19 hours, tops. Ocarina of Time (OOT), clocks in at 28 hours according to the 3DS's activity log, and that's more or less a straight run through. I think the only side quest I really bothered to do was to get Biggoron's sword, only collected 30 odd skulltulas, and as much heart containers as I could find. I was still lacking 5 full hearts, which means there are at least 20 heart pieces somewhere out there to collect! And tons more side quests... like... I haven't even explored hyrule fully; only popped into the stores once or twice and never really played all the mini-games.

The Controls
One word: fantastic. The range of controls for Link is simply stunning; various kind of hops, backflips and rolls to avoid attacks; shield using techniques, several sword attacks, and if I dare say so, a stab "combo".

The movement of Link is very tight; moving the analog stick a bit into its range tells Link to tread carefully, least he falls into a pit whilst suspended over a tightrope. A full push of the stick breaks Link into a run, just what you need when some big dragon's breathing down your neck.

While OOT is played mainly in the 3rd person perspective view, there is an option to switch to a first person view; this view is particularly important to scope out the area, as well figure out the traps and tricks in each room.

Several weapons, like the hookshot, bow, catapult etc also brings up the first person view, and you can aim, not only with the analog stick, but also by just moving the 3DS physically! I was quite blown away when I first got the hang of it, by quickly hitting a button to bring up the hookshot, tilt the 3ds to aim, and let rip, much faster then using the analog stick.

The Ocarina
Given the name of the gave, I have to at least speak about Ocarinas for a bit. The Ocarina is introduced very early in the game, as a good bye present to Link from his good friend, Saria. Various melodies are learnt on it, and are used in-game simply to open areas up (play the ocarina on an icon on the ground, for example), as well as tasks like warping around the world, summoning rain, or even calling upon the sun.

In real life (cough cough) I'm actually quite tempted to get an ocarina to mess around with. I haven't - yet - because I'm surrounded by several wind instruments, some of which I don't spend nearly enough time on :P I am very tempted by some modern ocarina designs that allow one to wear an ocarina around your neck - talk about a super portable musical instrument that doubles as jewellery of sorts!

This is a somewhat difficult game, not because the game is difficult, but rather how the designers have designed the world so that they use all the mechanics of the world to screw around with your puzzle solving skills. I have died countless times falling off cliffs, ko'd by bosses and just, you know, blown up and chopped to bitis. The usual.

Bosses don't just die by button mashing; weak points need to be learned, special weapons brought to bear, timing of attacks is critical, as well as mastery of Link's various controls.

Dare I say, not a kids game.

The dungeons, of which there are many are particularly really, really well designed, and there have been many that required me a trip to an in-game hint machine to figure out how to complete a particular room. And there were many of these occasions.

Oddly enough, the very last dungeon, as well as Ganondorf and Ganon were remarkably simple to win once their weakpoints were figured out. When fighting Gannondorf I'd run out magic, and could not fire any light arrows to stun him. Died there. But once figured out the need for the light arrows, I was quite surprised that a few heavy slashes toppled the evil dictator (Biggoron's sword rules!!!!)

The final boss is even more amusing, suffering from what I term Locust VS Battlemaster syndrome*. This uber ultimate last boss who stands nearly double my height and dual wielding two blades easily taller than him, gets outwitted when I roll between his legs... and stabity-stab his tail. I think I used one fairy and Naryu's love once before I figured this out (by pure luck, at that!). Very lucky, as I'd run out of magic for my light arrows, and the hookshot was, shall I say, bitchy about locking on. Or should I blame that on Navi?

The 3DS's 3D Screen
For the first few hours, that has to be the best thing since sliced pineapple. But given the need to actually have your head in a specific position and distance away is not very possible given the nature of button pressing moving the console about.

A slight off axis view and the entire screen goes out of focus. Switching off the 3D made for a much more enjoyable, if flat, gaming experience. The 3DS actually has a stand included, but it's never left my package, given that I want to play it on my bed. Flopped on my back.

That said, I think the 3D is best used during cut scenes, when you usually only have one button to press for the scrolling text. The 3D worked *really* well during the end game sequence, when the world of Hyrule is viewed through stunning stereoscopic 3D. The flybys were magnificent, and some shots with depth, like the young deku sprout, I swear the particles were flying into my face.

What would be nice in future games, would be an option to have the main game be played in 2D, and automatically switch over to the stereoscopic view during cutscenes.

I also wonder if the 3D could be sort of a transition effect, or, you know, like when poison is swallowed in game, we could have the 3D go insane, might be quite trippy.

In summary, I think this was a wonderful game experience. Wonderful music, fun characters, and a big, beautiful and highly detailed world to explore. My hope is for Nintendo to release the other Zelda games for the 3DS as well, games like Twilight Princess, Majora's Mask etc.

Re-done this way, I'm sure many gamers will want to relieve their gaming memories. To run with Epona. To trawl the depths of Death Mountain. To fly with Kaepora Gaebora, dive under the seas with the Zora. Such a magnificent world needs to be explored by a younger generation of gamers, to bring a different Link, a Link from the past, into the future.

*Locust VS Battlemaster syndrome: In Mechwarrior 1 for the PC, the BattleMaster is the most powerful (supposedly) Assault mech in the game. However, it is very easy to defeat a battlemaster by simple using a Locust, the smallest, weakest, but *fastest* of all the mechs, and running up the battlemaster and just blowing away his knee (tab tab tab tab, fire all weapons) - a battlemaster appears to be nearly triple the height of a locust and can't depress its weapons low enough to hit. Plus, it's slow, and can't really keep distance with a locust. Personally, I prefer riding a Marauder. Twin PPCs FTW!

Friday, August 03, 2012

Midi Controller: Components redux

Ok so I'm re-thinking the whole chain again.

The breath sensor is going to be the  MPX2010GSX, non-smt, and has two mounting holes.

For the amplification side of things, the power supply will still be from the arduino's 5V - using two 9V batteries to provide a dual rail supply would work but I'm being bullheaded - and to get the dual rail I've opted to use the Si7661, a voltage converter. Basically, put in ground and Vcc, and you get Vcc, and -Vcc. Cool! Didn't know such things existed. I've not factored in voltage regulation, so a note to myself, I may need to get LM7805 and LM7905 to regulate the voltages.

For amplification, I'm going with the INA114AP, a proper instrumentation amplifier. It can go down to plus/minus 2.25V minimum, so if I provide +/- 5V to it, should work fine. The arduino's range is 0 to 5 volts anyways. Interestingly, all it needs is one resistor to set the gain.

In my tests today, I was getting between 0 and about 4.5mV at max pressure. Note that because my setup has a bleed vent, there would be no way I can get the full 15mv. This may not be a good thing, because I now need to amplify 0-4.5mv instead of 15mV to 5V, much more noise, and much higher accuracy needed.

What I could do is use one of those aquarium valves to provide a variable bleed valve instead. A bleed valve is necessary as I do not want moisture to directly hit the sensor - most of the air moves out through the bleed - hence the pressure is lower.

The alternative is to amplify 4.5mV up to 5V, which has G > 1000! Not a good thing, I think.

Anyways, enough of this. Parts have been ordered, we'll see what happens next week.

Midi Controller: ARGH!

Continued work on the midi controller has been somewhat fruitful today... the MPXM2010GS actually delivers the output with *seemingly* no issues, and my el-cheapo multimeter is actually capable of reading the voltages down the the milivolt range, so woo! No need to lust for higher-end instruments.

On the downside, whilst things did work, I lost both the breath sensors. I have one more but I'll not touch it. They're kinda expensive >.> One of them (the left) died in a soldering accident. The 2nd one on the right was working very well, till I was fiddling with the differential amp and broke off two of the pins >.> SMT components are really not meant to be handled this way.


Checking the freescale product sheet, there is actually a sensor that comes in a larger packaging and seems to be (generally) working to the same specs (MPX2010 series). I guess I'll have to go for that.

I also could not get the differential amp to work, so I'm probably going to get an on-chip instrumentation amplifier instead.

If not, I thought this prototyping phase is quite successful, once the voltage can be amplified to max out the arduino's analog input levels, it will be a simple matter to read in the values and convert them into midi cc values.

In theory ;-)

Thursday, August 02, 2012

Sony's Xperia Ray

I've had the original iphone for about 5 years now, and after all this time, through many, many drops, trials and tribulations, still hums on without a hitch. Well mostly.

After 5 years of service, this baby's battery life has dropped significantly from almost a week between charges to less than 2 days :( I thought this was a good excuse to change to one of those nifty android devices.

My needs are quite simple, it needs to be able to
a) Make/receive phone calls
b) Send/receive sms texts
c) Alarms
d) Calendar
e) map application of sorts; I only use this (occasionally) overseas on tours.

One thing I looked forward to a new phone is proper 3G access; I've never actually used 3G before. Talk about out of date. It was a tough choice between two phones, the Nokia Lumia 800 (tried it, loved it) and one of the smaller sized android phones, and picked the sony for a few reasons: it used a regular sized sim card, and is much smaller and lighter than the iphone. In my pocket, I kept wondering if I left my phone at home as it was so tiny! I also got it off the amazon warehouse for a much better deal than retail (~£130), so it was a no brainer.

From what I've been playing around today, a few things stand out.
First, the iphone's screen, old as it is, still seems more vibrant. In addition, I felt the menus and menu transitions were far more polished. And we're talking about the very first iphone here, that's never had it's OS updated! My iphone has *never* ever been connected to iTunes.

I think what works for IOS is simplicity. Some call it a dumb OS, but the fact remains that I actually had to read the instructions as well as do some googling to figure out how to use some of the functions on the xperia ray. Iphone? Everything is onscreen, with only one home button. Took me a while to register the need to use the "settings" button on the bottom right of the ray to pull up menus and stuff.

That said, I think the Android OS is really neat for creating your own custom screens! I really enjoy setting up some of the very cool widgets - love the gallery widget - though I have concerns about battery life.

As mentioned above, with my usage pattern, I used to charge my iphone roughly once a week. Nearly all my friends tell me the longest they go without charging their android handset is 2 days, and it is more common to recharge the handset *every* day.

That's somewhat... inconceivable for me, with all this advancement in tech (quad core cpus in a handphone?! I don't need that for a calendar!), surely the battery life should have improved, and if not, at least matched what older phones are capable off.

So far, the phone (full charged in the afternoon) is down to about 55% of its battery life (insert big, very sad smiley face).

To be fair, I've been spending ALOT of time on it, poking around the various programs and setting up that delightful home screen as mentioned.

I hope once things settle down, the battery life can at least last 4-5 days. If not, there is a "power save" mode that shuts off all non-essential transmissions, so hopefully that will help.

Wednesday, August 01, 2012

Solatorobo: Red The Hunter

Horrors! I decided to buy a game to play! And as expected, I have zero self control, and have already completed the game *twice*.  What can I say, I can get quite driven ;-)

Anyways, it was a stroke of luck I came across the music for this game, and thought I'd check out the actual game. This isn't a review, more of what I liked and disliked about the game.

First, the difficulty. On the first run through the game, it was *extremely* easy. I didn't die a single time throughout the game - and it's actually quite difficult to die since you take so little damage, and save points (exactly before a boss!) fully restore health. In addition, there are heal items to be found along the game, and they usually bring you up to nearly full health. (hmm... I actually haven't actually seen a game over screen yet... I have to just.... purposely die or something).

The most difficult part of the game is probably the flight portions of the game, where your robot docks with an airframe and goes racing. The controls are actually pretty good, it's just that it's totally different from the usual controls so it does take a little getting used to. The first few flights I was getting last all the time >.>

I think the ease of play is actually good for me, for one I'm not into grinding; more interested to see where the story leads. I finished the main game in about 17hrs, which seems to be the norm. The 2nd play through does increase the difficulty a fair bit; enough so that I have to be careful where I tread else my health gets low; the first run through was like.... hit me! I can't die!

The Story
I think it was very well done, and the flow of the events worked quite well. Upon completing the game I was pulling out the various elements that made up Solatorobo: the main character was the results of an experiment and had his memory wiped (familiar?), parts of the story involved traveling inside giant robots to destroy their core (familiar?), some of the bad guys were actually good (familiar?).

The area where the final boss resides is quite loltastic as well, a giant spherical thing (familiar?) and you need to go through a passage (trench? :P) to get to the final boss. What can I say, it's the usual bad guys want to destroy the world, and the lone savior and his comrades come save the day.

The World
This is where the game shines, IMHO. If you are a fan of Miyazaki/Ghibli style designs, this will be right up your alley. Even though it's a DS game and the resolution is a far cry from what modern desktop games are capable of, it's still very evident the amount of love and detail put into the design. Every single location has depth, and some towns feature really nice camera work as you walk through it. Each town has a motif, played up to the max. Good stuff designers!

The designs of the mechs and robots are quite delightful as well. One of the bosses is a mechanical fish, reminds me of the painful times playing Darius. Some of the robots are very Zoid-like, and as a big fan of zoids, that's a big thumbs up. At the very end of the game, the main character's robot fuses with two of his siblings' robots (WOO!) to form a bad ass dragon robot.

As with any RPG, we have to do *things* to complete the story. Some of it is the usual boring go here, get this for me. Thankfully, the developers have tried their best to avoid this, and while we still need to go on quests to push the game forward, alot of it is quite uniquely designed and fits into the story quite well. Even for certain similar quests, a new element was put in so that there would be _some_ change.

Give that I'm only on my 2nd play-through, from what I've read the 3rd play-through will be tougher, but it is compensated by having a really kick ass mech upgrade down the road. Apart from the difficulty, the difference between the first and 2nd playthrough is more items to purchase. Already the stats of my robot's attack are maxed out, it's quite amusing to see how much damage a thrown wood carton can inflict on an enemy mech :P

What I'm trying to say is, apart from some cool new toys to pick up, the story appears to be the same.

Ok 'nough gaming. I got to go back to regular life.