Aug 15, 2019

Let's Build a Keytar - Part II: Keys

For the kays, I bought a used M-Audio Keystation 49e for 20 bucks. It is a pretty simple midi controller with 4 octaves of standard size keys. It also got a modulation and pitch bend wheel as well as octave shift buttons. I might reuse some of these parts too.

Let's jump into an exciting reverse engineering adventure!


Aug 12, 2019

Let's Build a Keytar - Part I: Introduction

As a keyboardist and a big fan of bands from the 80s, I have been dreaming to have a keytar since my childhood. Currently, only Roland is still selling fully-fledged keytars (i,e. with sound synthesis), and Alesis sells some cheaper midi controllers. As none of the devices fits my needs and my budget, I decided to build my own.

The current plan looks something like this:
  • The keys come from a inexpensive 49 key midi controller
  • sound is generated by a NanoSynth sound module (SAM2695), other synthesizers may be added later
  • A Teensy 3.5 works the brain of the instrument
  • User interface via OLED or LCD, buttons, encoders and potentiometers
  • A wooden casing with a shape similar to the AX edge.

Oct 18, 2016

Snakes, Neural Networks and Genetic Algorithms

Surfing around the interwebs I stumbled upon genetic algorthms, which inspired me to create my own little java applications. I won't write a lot today, instead, I made a little video to try to explain what I did. Enjoy!


- Marv

Mar 11, 2016

Splitters Suck - Adventures with Optical Audio, Part III

This is part three of a multi-part series, click here to read part one or here to read part two.

After I upgraded my PC subwoofer to optical audio input, I still had a problem: My sound card has only one Toslink output. But there is remedy! Toslink splitters! Hooray!


Those things have one input and two outputs, and entirely optical (passive). However they have a major flaw: They do not work! The plug conncetions and the prism have really bad optical characteristics and too much light is absorbed. At first, I thought the fibers were to bad, but I tried short (1m) high quality cables and experienced the same problem. Even cleaning the connectors didn't make it better, I figured out that one of the outputs was stronger than the other, it barely worked, the other one didn't work at all. A piece of junk.
You can buy active splitters, but the cheapest I found were around 50 euros, way too much money. I flirted with idea of building my own optical splitter, that would mean another box that needs power and an AC adapter though.
A lot simpler is upgrading the sound card to two optical outputs! I had still some Toslink emitters around, and I didn't really need the optical input of the sound card, so why not switch an emitter for another sender? The modification is quite simple: Just desolder the receiver, hot glue the emitter at the same place upside down (you cannot use the same pins!) and wire it parallel to the existing emitter. Just an aditional 100 nF capacitor and an 8.2 k resistor is needed (according to the datasheet i found).

Quite simple, but effective. Working like a charm.
- Marv

Mar 10, 2016

Adding S/PDIF to Analog Hardware - Adventures with Optical Audio, Part II

This is part two of a multi-part series, click here to read part one.
The solution I presented last time was working pretty well for a few years. Someday, I upgraded my PC with a Radeon 7770 graphics card. Graphics were great, the sound horrible. - The sound? What does that have to do with a new graphics card, you might ask. Well, unfortunately, either due to noise on the power/signal lines on the main board or due to electromagnetic fields, each time the graphics card processes a frame, I heard a horrible ticking on my speakers. The rate and volume changed with the framerate and the complexity of the tasks. The noise however wasn't present on the digital outputs, only the 3.5 mm jack was affected. So why not upgrade the PC speakers to toslink?


Jan 25, 2016

Noisy Converters - Adventures with Optical Audio, Part I

I'm quite positive that everyone who once tried to transmit analog audio over a long distance encountered sound quality issues in some form. When I wanted to hook up a pair of speakers across the room to my computer, I went for a digital solution right away: TOSLINK. A simple standardized audio interface using a fiber optic cable. Its signals are identical to S/PDIF, an elektrical digital audio interface. Both TOSLINK and S/PDIF have gotten pretty common nowadays in all kinds of audio equipment such as TVs, CD players, HiFi systems and even PC sound cards. No interference, crystal clear sound, no path loss. Sounds great so far? (Pun intended)
I bought a cheap sound card for my PC with optical output, a 10 m fiber cable and a digital to analog converter.


However, whenever the converter doesn't receive an optical input, such as when the sender is turned off, it started to output ugly noise. There wasn't really much you could do against it except shutting the converter off when my PC was off. So I made a little device with a monostable circuit triggered by the optical signal that switched to power for the converter on whenever there was an active input and shut it back of when the input was inactive.

Nov 27, 2015

A quick HUB08 LED Matrix Library & Graphics Library

I recently got an LED Matrix using the HUB08 protocol from ebay. Since none of the libraries I found on the internet worked for me, I wrote my one for the Arduino Uno, using hardware SPI. It also supports pwm brightness control and frame rates up to 2000 fps (32kHz line frequency, 16 lines). Yeah, that's fast, so the microcontoller can do other stuff in between (instead of really working with such ridiculous frame rates ;) ). The pins are hard coded into the library to achieve this speed. Please take a look at the example to understand how to connect the matrix and how to use it, it's pretty simple.
Link to github: https://github.com/emgoz/HUB08SPI

I also want to share another library with you, the Buffer Graphics Library. It features many optimized drawing functions (points, lines, rectangles, circles, bitmaps)  and buffer manipulation functions (scrolling, rotating, flipping, ...) and also works with the matrix library above quite nicely.
Link to github: https://github.com/emgoz/BufferGraphics
-Marv