Tuesday, October 27, 2015

Casio SA-10 + FPGA = Audio Synthesis

Hello there!

First, yes, I'm alive... You just need to know where to look for (Hint: Flickr or dA).

Second, no, this won't be a long post.

Third, new project!
https://github.com/zebarnabe/music-keyboard-vhdl/

Regarding this last point, I'm building an audio synthesizer from my dead Casio SA-10 (non-destructive modifications, might be able to repair it in the future) and my old Digilent Nexys 2 FPGA board...

So far, so good... It works as a proof of concept, though I need to make it properly since to ensure polyphony I instantiated 32 basic synthesizers instead of properly serialize the processes ... processing everything at the same time is always fun in a FPGA.

Currently taken logic is at 10%, I guess I can make it a lot better by serializing the output mixer alone... or lower the precision... 144kHz sampling with 16bits and 32 channels is a bit overkill, specially when the PWM controller only does 8 bits.

Saturday, November 24, 2012

Playing with Blender Cycles render engine



So, I've played with Blender in the past, but having installed Ubuntu 12.10 and with Blender Cycles render around, I solved to give it a try again and see what could be done.

First the 12.10 repository doesn't have a Blender version with Cycles render, so you will have to manually install it from Blender website, fairly easy if you as me.

Installing CUDA to have GPU acceleration is quite a different matter, I leave that for other time, as Nvidia only supports/provides a version for 11.x Ubuntu...

After installing CUDA I found out that I wasn't entitled to GPU acceleration, my card is too old for that, following this thread you might get the idea:
http://blenderartists.org/forum/showthread.php?238557-Blender-Cycles-GPU-Rendering-Shader-Model-gt-1-3-Required

But that doesn't prevent me from using Cycles, it is just a pain to render, but, the normal Blender Render engine is quite the same.

I started with a simple scene and quickly went to nodes to see what could be done...


... Looks nice doesn't it?

Aside from modeling some stuff, I tried more render features, textures and more stuff with nodes in a simple scene, It all went well till I added some extra stuff to the scene ... and then:





Those white dithering specks are due to the emission planes that are lighting the scene.... I have no idea how to prevent them, removing caustics had no effect :/

Maybe all that white in the background has something to do with it... but the artifact is there when it shouldn't, I noticed that the more sample rays I add the more likely it is to happen in the given scene (though they start to fill up as circles/blobs).

I could set more sample rays to reduce the dithering effect, but with 20 mins of rendering time that would be quite a longer wait.

Well, not that bad, but quite annoying... quite a pleasant surprise that I still knew my way around Blender.

I leave with a model of an Yordle (from League of Legends lore), no textures I'm afraid, I didn't have the time for that:


It is rigged with a simple skeleton, enough to make small animations :]

Friday, September 28, 2012

Laptop issues

So, even though my blog readers are close to none, I'm wondering if someone has an idea why my laptop (a rebadged MSI GX620) is having thermal issues:

Fan is working well
Heatsink is unclogged
Thermal plates/pipes are in place and driving the heat to the heat-sink
CPU is idling
GPU is idling
Currently I've underclocked the entire system to the maximum possible, CPU is running as a at 800Mhz (from 2.4GHz), GPU is running at 125Mhz/200Mhz/312Mhz (for Core, Memory and Shader clocks and from 500Mhz/800Mhz/1250Mhz)
Hardrive has power saving policies applied
Temperature is currently 43ºC for CPU, 41ºC for Hardrive and 54ºC for GPU...

GPU heat pipe passes through the CPU heat plate, then the 2 heat-pipes go into the heat-sink.

In the past I would have an hard time to make it go past 30ºC (basically it would require me to push everything to the max in a hot day of summer) and the top I've reached before was around 40ºC (with the heat-sink clogged and pushing it a bit) ... Recently it started doing this, where the temperature never goes under 40ºC and it reaches 70ºC if I set it to normal clock speeds (and just idle).

The heatsink is really hot and the fan is working properly, the air flow seems right as well, so I'm puzzled why it is doing this as it all seems to work as it should but it not near of what it was in the past, it is running way too hot to be safe, if I push it, graphics card will probably reach the shutdown temperature (105ºC) before CPU reaching the thermal shutdown, I really don't want to try it...

I've tried to use a cooling station base, it has no effect whatsoever, ironically having it on the bed seems to be as effective as having it on the cooling station...

Oh well... soon I'll have no need for a laptop, so it really doesn't matter, though it is puzzling why this is happening...

EDIT:
 To further test my system I ran stress tests on my system, it is holding under 75ºC for CPU and 85ºC for GPU, my guess is that the thermal grease as lost some of its conductivity, if I overclock my GPU to (700Mhz/800Mhz/1600Mhz - crazy improvement, but very stable) it never goes past 85ºC under heavy load.

I'm not that worried as it seems the cooling system is still working fine, just the efficiency got reduced with the age. I won't need a new laptop, nor I'll be selling this one.

PS:
If you're looking for a new laptop the old Asus N53 with a quad core i7 CPU, full HD matte (high brightness, contrast and color reproduction) and another remarkable points is being sold for 700€ (but it is very hard to find on stores), above that, with a faster CPU/RAM/GPU configuration, the latest model, the Asus N56VM is available for 800~850€ (a bit more if you want retro-illuminated keyboard, bluetooth, hybrid hardrive or some extra RAM), add a bit more (+50~100€) and N56VZ has some extra GPU power on it.

Monday, August 13, 2012

FZ200 - The F2.8 bridge camera

Just a quick note, Panasonic Lumix FZ200 is an impressive camera on paper. I wonder how well it will fare in practice.

The f/2.8 lens allow the use of a huge aperture at the end of the telephoto, this is great to blur the background/foreground and to avoid the use of high ISO, thus increasing the delivered quality in the photos.

Usually Lumix cameras are quick in operation, but their sensors could fare somewhat better. FZ150 did an excellent job for what it was.

So, with all this in mind I searched for some samples online, and found a few, sadly most are low resolution or/and pre-production samples, thus making it hard to assert a conclusion over this unique camera.

The best samples I found were in http://www.quesabesde.com/noticias/panasonic-fz200-analisis-fotos-muestras-video,1_8941

They are the best samples simply because they are RAW files, they don't display the performance over the entire ISO range nor zoom range, but they already gave me an idea of what the camera is capable.

The good thing on the camera (aside from the f/2.8 available through the entire zoom range) is that lens sharpness seems to be very good in center, with some variations in the edges and corners. At its worse the sharpness in the corners is tolerable and quite acceptable for such specs. Same thing goes for chromatic aberrations, even though they are a bit on the high side in some situations.

The bad thing is.... Noise and dynamic range, not that much of a surprise, but at ISO 100 it is just plain bad to have that much noise. Dynamic range is bad, but tolerable, shooting in high dynamic range setups would result in blown skies far too easily though.

You can see the converted RAW files here: https://picasaweb.google.com/113342388960491676361/FZ200RAWSamples?authuser=0&feat=directlink

So ... what that leaves me with? A camera that is not that good, but packing some very nice specs. In the end is not the camera that will mark the difference, even though the f/2.8 lens are unique to it. Price will be scary at the release, but will get down to tolerable values in 3~6 months after the release.

Given the compact design of such lens, one can hope that a f/2.8 12x can be made with roughly the same size, while sporting a bigger and better sensor on the back.

And as an end note, LX7 samples that I found were quite impressive (specially when compared with the FZ200 ones)

Oh well, micro four thirds still has a huge distance over the compact realm ... specially with the new G5 and E-M5 cameras... as for me, the old GH1 will fit the bill till it is rotten.

Thursday, June 21, 2012

Chrome Extensions: v2

So .... Google Chrome Extensions will soon require version 2 of manifest files and respective implementation.

I have my fairly complex Chrome Extension that makes use of several experimental/brand new HTML 5 technologies/tools: Drag&Drop, File API, Indexed DB, Canvas, etc...

Usually I keep an eye on the upcoming updates by having Chromium channel installed together with the stable Chrome release. I have this because certain implementations (ex: File API) are based on a draft spec, thus having the time to fix anything that might be modified before hit the stable release.

The last Chromium update caught me by surprise, I was expecting something to be broken as usual, I was not expecting that the manifest and some required implementations would be changed...

I find this gif to accurately express my face when I start reading the change log. I understand why they changed most of the stuff the way they did, but it has that feelling of "You must be joking" when I look at it...

Luckily for me, most of the stuff I did is compatible with the update, requiring just some touches in manifest file to make it work, though, those popup and options pages will suffer quite a few changes that make me shiver at the though of what I have to change and what else can get broken by it...

Even if I have no readers on my blog, if you made a Google Chrome Extension (or use one that might not have the best update support), take note:
http://code.google.com/chrome/extensions/manifestVersion.html
Look closely at that schedule support...

Good luck and happy coding :]

Friday, April 20, 2012

HTML5 stuff

I've been playing with HTML5 APIs for quite some time (not exactly playing, but the blog is neglected as usual). In my Javascript code junkyard folder on the 0nyx server you can play with it and check the source if needed: http://www.zebarnabe.0nyx.com/JS/dragdropfile/file.html

Take in mind that Drag and Drop API is divided into 2 different APIs ... the 'old' one and the 'new' one, my sample tries to support both to a certain extent... oh ... and you can drag and drop files ... the content of them is shown in base64 data url.... quite useful to convert icons and small images to base64, not that good to check that 64MB video file you have there...

Have fun and hope it is useful

Monday, September 26, 2011

How to pick a camera (or try to)

Many people ask me stuff about gadgets, cameras nowadays are seen as gadgets given their presence in mobile phones and integration with printers and other strange stuff, however the purpose of them has not changed even if it's either a digital or analog medium: To record an image.

So, I receive lots of requests asking me if camera X is better than camera Y, if feature A does any good or if price is good for camera Z.

To pick a camera, you have to define answers for these questions:
  • How much are you willing to spend?
  • For what are you going to use it?
  • What quality is enough for you?
There are obvious answers to the second and third question that mean that your budget is not enough, however you can reach a compromise for most of the time.

And talking about compromises, please note that there is no perfect camera for everything, so don't expect perfection.

To understand the third question I'll expose you to where image quality can be evaluated:
  • Sharpness - this depends on several factors:
    • You, if you don't stay steady when taking a shot it will come out blur, this is probably the biggest factor. Also, panning to keep a moving subject steady on the frame is not exactly easy.
    • Lens, if the lens are not good, sharpness, color and contrast can take a hit for the worse
    • Sensor resolution, not as important as it may seem, specially as modern cameras are all above 6MPs
    • In camera noise processing, some cameras over cook the image making it look quite bad, other make a great job!
  • Low light noise - When light is missing recording an image might be troublesome, cameras usually 'pump' the ISO and this will mean more noise or heavier image processing by the camera (making it lack sharpness), if the camera has a good flash you might get away with it by using it, or if you can use a tripod and the scene is static you can take night photos quite well.
  • Optical defects - From color fringing in high contrast scenes, distortion (barrel or pincushion effect), coma, astigmatism, flare, etc.
  • Bokeh - bokeh is the term used to describe the out of focus blur, it is related to the optical proprieties of the lens and can be good or bad, it is often subjective, but most agree that smooth bokeh is better than a 'harsh' one. It is quite useful in macro and portrait photography.
Other useful points in choosing a camera are its speed, both focus and image recording speed, video features, flash, tripod mount, etc. Avoid to pick a camera because it has 34 creative modes, you will most likely not use them. HDR and panorama may seem useful, but if you can control exposure you can stack several exposures on the computer and panoramas can be done, on computer as well, by stitching several photos - most of the time you will have better control over the process if you use the computer to do it.

I solved to divide this guide in camera purpose, and will try to give some suggestions for several price tags.
When I mention "Search for a camera" I meant check for reviews websites with real use samples.

First, read a guide about photography in general, something that explains how a photo is recorded, what aperture, focal length, shutter speed and ISO are.
If you are lazy and don't want to do that I'll make a very resumed explanation here:
  • exposure time/shutter speed – time that the sensor is exposed to light, longer mean blurred movement, shorter will freeze action, this also means that longer exposures will make your hand shaking more apparent;
  • aperture size/value/number – the size that the lens diaphragm (hole) has, f/2 means more light (bigger/brighter aperture) than f/4, out of focus areas will be blurrier with bigger apertures, most lens limit you to smaller apertures as you use bigger focal lengths;
  • sensor/film sensitivity (ISO) – how much light need to be recorded, ISO 100 means twice the light of ISO 200 is needed to record at the same exposure level;
  • Focal length – bluntly it defines how much 'zoom' your camera has, it is often compared to 35mm film equivalent, a 50mm means a 'natural' view (what our eyes perceive), 24mm is a very good wide angle, 100mm is a telephoto focal length and bigger than that past 300mm can be considered super telephoto. For identical apertures, the photo taken with bigger focal length will have the out of focus area blurrier.
Exposure – the photo requires the sensor to be exposed to light for a given time time (shutter speed), the correct exposure is a balance between sensor sensitivity, aperture size and exposure time, if you mess with one, you'll have to mess with other.

Record mementos - for small prints, social networks and email share - the lowest budget possible:
If you want a camera to snap some special moments to remember later and share online, a mobile phone camera might suffice, by that I mean that any camera would do, however, if the quality of the photo matters (because you may print or edit the photos taken) something a bit better than a lousy mobile phone camera is probably required.

There are lots of cheap cameras that already offer more than enough quality, I suggest that you seek one that behaves well in low light as most of the time you don't want to/can't use a flash and the light indoors means that your ISO will have to be at a higher value than the ideal. If you know that you will use the flash, check how well the flash illuminates a given scene.
Search for a camera with an acceptable quality at ISO 800 and you should be okay, but bare in mind that when light is non-existent (night shot) you will need to use either flash or a tripod, usually you would only use a flash in this kind of camera. You won't be needing lots of zoom or other gimmicks, but video is always a good thing to have.

For this kind of use, Canon A800 or Canon A1200 are good cameras for their price, with them you can even print fairly large (A4) and get a nice quality, obviously in low light they will start getting a hit, you can check similar cameras as well and use these as a comparison term. Search for cameras with wide angle lens... this is hard to define but 24mm equivalent is a very good wide angle in a compact - this makes group shots easier to take.

Compact and versatile - take it every where, record everything:
If you think in using the camera to explore photography in general, but you are thinking in spare some change on your wallet it may be a bit tricky to select a camera, you will probably want some zoom capability (10x is pretty nice) on some wide angle lens (at least 28mm in film equivalent terms) with good manual modes (check for P,A,S and M modes on the mode dial) and low light capabilities (Check samples online from ISO 400 to ISO 1600). This is very tricky to find at a low price, be prepared to make some compromise.

Often you have lots of features you may or may not want, be aware of that (will you really use slow motion video features? or GPS?).

If you want it to record video as well, you'll be happy to know that most of he modern cameras allow you to record in HD, however not all are worthy of being selected for just that. Some cameras have really bad video quality, so check samples online. Avoid interpolated video recording and while it is up to personal preference, prefer cameras with 24/25 fps video recording instead of 50/60 fps, this will give a better feel to the video, however higher frame rates allow you to do slow motions at ease.

I'll leave some camera suggestions as terms of comparison, Canon SX220 HS (or SX230 HS - it has GPS as an extra, might not worth the extra price though) and Sony HX9V. For something cheaper you have Olympus SZ-10, for something with even more zoom you can either look at the bridge segment or the peculiar Olympus SZ-30MR, but, in either case, be prepared to some serious downgrade in image quality.

You may as well take your time and look at older models, some are quite good, but the new EXMOR Sony sensors and HS Canon system deliver quite a nice deal. Search for samples is always a good idea.


Do-it-All camera:
So, you kinda want a camera that does everything, a compact super-zoom even though it does it already is not enough? Well, you have bridges, older bridges could not do what a modern compact super zoom does, but you want more ... well, be prepared to get less, when an huge amount of zoom is present some sacrifice as to be done, often lens have less aperture, images will not be as sharp and there might be other issues. However, in terms of versatility you will have everything in a single place.

It is somewhat hard to pick one of those camera... Kodak Easyshare Z990 seems to be the cheapest on worth of attention, where the latest Panasonic Lumix FZ150 (or the cheaper and with less features Panasonic Lumix FZ47 / FZ48) and Sony HX100V are considered the best of the best when comes to quality of the photos taken.

Picking the right one, like I said before, is not easy, they usually have many features that make comparison harder, just stick to what you want/need and choose the best priced one.



At this point I could enter in the ILS (Interchangeable Lens System) where the lens can be swapped, but most of people who take family/holiday shots won't have the need of such system with the modern travel zoom cameras (like the Canon SX220 HS). There are also some premium compacts that offer greater image quality, but for the same reasons, I won't be entering in that segment discussion.

Bare in mind that the camera suggestions I give are not meant to be the best, however I consider them a good starting point to search for a good camera.

Last, but not the least, make sure the camera size and ergonomics are suitable for you, if possible also check the camera menus and interface (many manufacturers have camera manuals online), you may not like some and it can be a decisive factor in picking  the camera.

So what websites do I suggest to check for reviews? Any that has full size samples from the camera, also please consider that a slight noisy photo of a 16MP camera may have more detail than a perfectly sharp 10MP one, compare images at the same size, if this is hard for you, resize all samples to 10MP (or other well defined resolution) and compare them directly, a sharp 10MP can be used to print in A3 sheet sizes without issues (a 6MP will fulfill most of your needs), so take that in mind.
If you read all this till here, congrats! I'll will spare you to search for review websites and dump a few in here (but feel free to search for more):
http://www.dpreview.com/
http://www.photographyblog.com/
http://www.imaging-resource.com/
http://www.cameralabs.com/
http://www.photoradar.com/

If you are at loss of what cameras are available on the market check the in the manufacturers websites, most of review websites make some sort of comparison with other camera models though.

If that was TL;DR

So is camera X better than camera Y?

Google for the camera X and the camera Y, find review, check image samples, what looks better at different conditions? Are the other features useful?
Bare in mind that not all cameras are better than others in everything.

Does feature A does any good?
What is feature A? Google it!

Is price is good for camera Z?
Check for similarly featured camera, what is the price of those? Are they better or worse?


So ... there you have it ... the only person that can really pick a camera is you. Do your research and don't let anyone else do it for you, you might not get what you are looking for.

Oh... Good luck!