volbaltool: Cambiar el volumen o el balance de Windows desde la consola

Os presento volbaltool.exe. Una pequeña herramienta que permite modificar el volumen global de Windows (y lo que es más importante, el balance izquierda/derecha) desde la consola.

volbaltool se ha desarrollado pensando en utilizarlo desde perl, para dotar al control remoto de vlc de control de balance, ya que carece de él.

Su manejo es sencillo:

Usage: volbaltool [OPTIONS]
  -smv <vol>             Set master volume (range 0.0 to 1.0)
  -sb <percent>          Set balance
    where percent: 0       ch0 vol max       , ch1 vol min (panned L)
                   0-50    ch0 vol max       , ch1 vol ascending
                  50       ch0 vol max       , ch1 vol max
                  50-100   ch0 vol descending, ch1 vol max
                 100       ch0 vol min       , ch1 vol max (panned R)
  --help                 Show this help

volbaltool -smv 1 pone el volumen al máximo
volbaltool -smv 0.5 -sb 50 pone el volumen a la mitad y el balance centrado
volbaltool -sb 0 pone el balance hacia la izquierda

volbaltool funciona en Windows Vista, 7, 8 y 10.

Puedes descargar la versión 1.0 de volbaltool aquí (proyecto de Visual Studio 2015 que incluye el ejecutable).

Conversión 12V -> 5V de una pantalla TFT de 3.5 pulgadas

Durante unos cuantos días he estado buscando una pantalla barata para los proyectos con la Raspberry Pi. Al final me he decantado por la “famosa pantalla china TFT de 3.5 pulgadas”, más concretamente la Afunta T07 de amazon.es. Es una pantalla de 320×240 pixels, alimentada con 12V y que se conecta a la Raspberry Pi a través del conector de video compuesto.


Siguiendo el ejemplo de este foro de Raspberry Pi hemos realizado la conversión de la alimentación de 12V a 5V, de manera que se pudiese alimentar desde la propia Raspberry Pi.

El proceso a realizar es, básicamente, el mismo:

  1. abrir la pantalla (esta no trae tornillos si no unas pequeñas lengüetas)
  2. localizar el convertidor 12V -> 5V y retirarlo de la placa
  3. Desoldar el cable de alimentación de su ubicación original
  4. Soldar el cable de alimentación en la patilla de salida del convertidor


El convertidor utilizado (marcado como IF8AJ, U8 en la placa) aparece documentado en este enlace. La patilla de salida es la 6, que en la fotografía corresponde a la esquina inferior izquierda.

Tras retirarlo con la ayuda del soldador y de unos pequeños alicates de pinzas, se ha realizado la soldadura del cable de alimentación (rojo) sobre el terminal de salida. Como en este caso aparece conectado con la patilla más próxima del diodo D4, se ha optado por realizar la soldadura en la misma, como muestra la imagen.



Para alimentar la pantalla es necesario contar con una fuente de alimentación de 5V estabilizada.

Cuando conecté por primera vez la pantalla con la fuente variable del laboratorio, no terminaba de arrancar. Daba “pantallazos” y volvía a apagarse. Esto se debe a que el proceso de encendido de la pantalla provoca una carga repentina sobre el voltaje de entrada, que la fuente no era capaz de compensar lo suficientemente rápido, provocando un reseteo de la controladora.

Al cambiar a la fuente de alimentación de la Raspberry Pi, sin embargo, funciona perfectamente. Actualmente la pantalla se alimenta desde la propia placa, entre las patillas 2 (+5V) y 6 (GND) del conector GPIO, y es posible alimentar tanto la Raspberry como la pantalla desde un puerto USB.


Who Dares Wins

Who needs a slow serial line when you can have the blazingly fast speed of NE2000?

I’m about to finish the NE2000 emulation in jslinux (based on Bellard’s own qemu NE2000 implementation).

So far, NE2000 detection works, the interface is up and running in linux but as soon as you start to transmit, a kernel panic occurs.

So after talking with Mr. Bellard (boy this man has a patience) I’ve found out that I need to implement a (so far) unsupported opcode in jslinux: REP I/O (REP OUTS DX specifically).

So, time to leave those networking upgrades for a bit and dust off Randall Hyde’s masterwork.


Adding networking support to jslinux

I’ve just finished a proof-of-concept implementation of a networking setup for JSlinux using SLIP/XMLHttpRequest/a perl proxy/Linux TunTap.

It’s a kind of mix of polling and events, but it works.

At this time, It’s possible to ping to/from the linux host and make TCP connections, but packets losses are not trivial 🙂

Pianalogic DLV – 555 Contest entry

This is the home of the Pianalogic DLV analog synthesizer, a minimalistic, extensible, easy to use modular synthesizer based on the
popular 555 timer IC, which aims to take the artistic and minimalistic prizes at the 555 Timer Design Contest.


The Pianalogic DLV analog synthesizer features:

  • Two independent pseudo-square-wave oscillators
  • 3 octave, 12 Key, pressure sensitive, fully tunable keyboard
  • 3 octave slide tuner
  • RIMIAC Ring-modulator-in-a-chip
  • Patch panel
  • DeepBass bass extender
  • Hand-picked, matched components
  • Top-of-the-line case design
  • A volume pot (that goes to 11)

NOTE: There is a hot spare 555 at the top center of the board. It is properly energized but doesn’t have any inputs nor outputs,
but makes the board feel more balanced, which has an appeal.


Carrying on the legacy of the 555 tuner-inspired designs, the Pianalogic DLV analog synthesizer is built on the KISS principle.
There are only two active components on the fully-assembled test unit (apart from the optional optocoupler), and both of them are
555 timers
(of the finest quality, I may add).

Both 555 timers work in astable (oscillator mode). The frequency is given by the RC network in each of the oscillators:

  • OSC1 has a chain of adjustable 1K resistors and switches (the 12 key keyboard) as R
  • OSC2 has just an adjustable 1K resistor and switches (the 12 key keyboard) as R

Both oscillators share a pool of (3) available capacitors banks as C:

  • CAPBANK1: 4 matched 1uF low ESR capacitors, switchable between 1uF-4uF total
  • CAPBANK2: 1 matched 1uF low ESR capacitor
  • CAPBANK3: 1 DeepBass 22uF capacitor

You can select which of the available capacitor banks you want via the 16 DIL patch panel on the console.

Das keyboard

At the bottom left of the console, you can find a 1 octave 12 key keyboard, with round red switches (round red switches are the new craze on keyboards). This keyboard controls OSC1 pitch.

The layout is similar to that of a piano keyboard: seven keys at the bottom (notes C to B) and 5 accidentals on top (from C# to Bb). They are pressure sensitive in that if you don’t press them, they do nothing (I call it “straightforward design”). Also, as the voltage difference going through the contacts is so low, you have to press firmly to get a good contact, or the pitch will fluctuate (and that IS a feature ;)).

One particular feature of the keyboard is that each key pitch is independently adjustable. Needed for getting a good tuning, but also reconfigurable for particular reasons (for example, you can tune it backwards for left-handed people or replicate some notes for getting through difficult passages).

The Slider

OSC2 pitch is controlled by a sliding disc at the top right corner of the console. The slider has a range of about one and a half octaves, when using just one capacitor. When using CAPBANK1, the range gets extended to about three and a half octaves.

The slider makes you able to do true glissandi, vibrato and tremolo. But this freedom comes at a price: mastering the slider technique is quite difficult. It helps that I’m a slide trombone player, but just.

The slider disc base comes from an Ubuntu CD (http://www.ubuntu.org), which is a really nice GNU/Linux Operating System. I think it’s quite appropriate, as they’re some of the easiest CD to “scratch” 🙂

CAPBANK1: 3 octave range

CAPBANK1 capacity can be configured while playing with two switches at the rear left of the console:

  • 1uF is available with both switches OFF (default pitch)
  • 2uF are available with SW1 (the top one) ON (1 octave lower)
  • 3uF are available with SW1 (the top one) OFF and SW2 ON (1 octave and a fifth lower)
  • 4uF are available with SW1 (the top one) ON and SW2 ON (2 octaves lower)

This way, you can select which of the 3 octaves available you want with your index and middle fingers on your left hand, while using your left thumb to move the volume slider and have your right hand free to play.

The octave/fifth notation may seem quite confusing for some people. Let’s say an octave is a difference between the same note on adjacent “registers”. Take for example A4 = 440Hz. The A on the upper octave (higher pitch) A5 will have double the frequency
(880Hz). A3, on the lower octave, will have half the frequency (220Hz).

There is a good description (if too comprehensive) at http://en.wikipedia.org/wiki/Pitch_(music).

RIMIAC or How I Learned to Stop Worring and Love the Beat

RIMIAC, the RIng Modulator In A Chip is an optional add-on to the basic Pianalogic DLV consisting of a single K3020P Phototriac which can be installed in the expansion socket in the board. With the RIMIAC module installed, you can mix OSC1 and OSC2 together to form complex waveforms.

RIMIAC is a revisited implementation of a ring modulator using optocoupler(s) instead of transformers and doing away with the diode ring, given the nature of the inputs (equal-amplitude square waves). Nonetheless, it performs beautifully.

Other kind of optocouplers may work, but I found that using an optotriac gives a warmer sound, damper sound. A bit moist at times. Also, it was the first optocoupler I found lying around.

The patch panel

The patch panel (a 16DIL socket) is my solution to the configurability problem. It lays at the top center of the console. As a quick way to reconfigure the synthesizer, you can place “patch cables” across the 16DIL pins to reconfigure (at the present time):

  • The capacitor bank for OSC1
  • The capacitor bank for OSC2

It also offers a quick way to insert processing elements in the chain, like extra capacitors, coils, screws, various body parts, etc…


You can download the Pianalogic DLV schematics clicking on the image at the right. I tried to stay accurate to the prototype. If you don’t seem able to replicate the design, don’t hesitate to contact me at my email address.

Lessons learned

Put a big fat capacitor between the power source terminals. Will make your life much less miserable when dealing with the mighty 555.
I lost almost two days fighting signal coupling between the two oscillators before realizing the problem lied somewhere else.

You can pick really good matches for the capacitor banks (giving really good tuning for the different octaves) from a small set of capacitors.
I tried 12, calculated the capacity of each one using a KORG tuner (working backwards from the astable formula), and settled on the closest 5 of them. Yes, the system also qualifies for the utility category as a “capacitance meter”, but that is bending the rules too much.

So how does it sound, then?

Test session #1

Test session #2