Feeds:
Posts
Comments

This slideshow requires JavaScript.

This slideshow requires JavaScript.

The idea behind this little experiment (and another one that I have in mind) is to include the physical world into the guitar effects chain: usually these effects simply act to an explicit interaction, the foot movement on a pedal, but why not include the guitar movements? This first experiment, in particular, uses an accelerometer to variate the output of a Wah pedal, depending on the inclination of the neck of the guitar itself.

Collect the informations

The first part of the circuit is all about getting data from the accelerometer and sending them to drive the effect. The accelerometer (a triple-axis model) is connected to a Telosb platform through a small prototipying board; the internal software (TinyOS, of course) samples the three ADCs (one for each axis) by mediating 10 consequent samples, packs the three 2-byte values into a packet and sends them through the radio. This operation is performed about 20 times per second. No radio power management is done here (I don’t really care about batteries to last only a few hours or days).

A second Telosb receives the radio packets. Now, the natural follow-up would be for the Telosb itself to drive a digital pot (through I2C, for example), but from this point of view the MSP430, the Telosb microcontroller, sucks A LOT: it has two multi-purpose hardware ports (called USART), each of them has a UART and a SPI interface, and one of them has also a I2C interface. One SPI is not connected in the board, while the other SPI and the I2C are already used by the radio, in the same port that has one UART (the other UART goes to a FTDI chip that sends data through the USB port). This means that driving the hardware port and communicating with the radio means having to share the resources and manage them so that only one is active at a time. I have to say that I was quite scared by this, first of all because TinyOS is not easy to be used to develop applications, and secondly because I am sending so many packets through the radio that I don’t know if timing was enough to start and stop each interface every time.

Thus, I decided to use an Arduino with an USB Host shield: in this way, the Telosb simply takes the radio packets and routes them to the usual USB serial port; the Arduino receives the data, unpackets the three accelerometer values, uses them in a moving average (to avoid too sudden movements) and puts the current value to a digital pot. In the end, I am using only one of the three axes (the X axis), and discarding the other two.

Colorsound Wah

Schematic view

Schematic view

I decided to use a wah pedal as the best effect to be driven by these movements, and I decided to use this schematic, with a couple of modifications; the interesting thing about this circuit is that an inductor, usually the essential part of a wah, is not needed: it just needs a transistor and several resistors and capacitors. The modifications are the two resistors R4 and R10, and the electrolytic capacitor and the diode on the power line on top (C1 and D1).

There are two different power supplies: 9V are provided by a battery, while the Arduino is powered separately and provides the 5V needed by the digital pot; this is done to avoid introducing noise to the effect, because the Arduino is also powering the Telosb radio.

Tests

The first tests have been made with a sketch on Processing showing a 3D box moving according to the accelerometer values; I have published several videos showing all these tests, with Arduino first and with the Telosb later. The final circuit is shown here (for some reasons the video is quite accelerated, I have no idea why but I think it involves the fact that all these videos are without an audio track, and Youtube does something wrong when loading them…), and I have added a brief video showing the result down here. The audio quality is quite low, I have recorded it with a microphone and not with an acquisition device, but for now it will suffice.

Final thoughts

I am not completely satisfied with the final result: trying a guitar effect on a breadboard is quite hard, because any movement of the wires introduces some noise, and it probably also lowers the effect of having capacitors in the circuit. I would try to move the circuit at least on a prototipying board, then lower the sampling timing again, from 50 ms to maybe 25-30 ms and see if the rest of the circuit is able to cope with it; also removing the Arduino and allowing the sink to directly drive the pot would lower the latency, but again the MSP430 makes it quite difficult (and I don’t have radio devices for the Arduinos, like for example the XBee shields). Bluetooth could be a solution to use a single platform (I already have a bluetooth shield for Arduino, and the USB Host supports some dongles). Also the moving average window could be reduced, to allow the effect to act quicker.

I think I will try also using a membrane like these instead of the accelerometer, to link the wah gain to the position of the left hand on the guitar neck (the membrane would be in the back of the neck), thus to the pitch of the music (higher pitch in general means the hand is nearer to the body of the guitar, lower pitch means the hand is farther away)… will see.

Così il suo cuore di bambino pianse e poi il suo cuore di bambino morì un poco. Perché è anche così che va il mondo.

Erlang SPI

Just a little wrapper around the SPIdev userspace kernel module; it works brilliantly on the Raspberry Pi, but before trying it you need to load the SPI module and chown the devices as follows:

sudo modprobe spi_bcm2708
sudo chown `id -u`.`id -g` /dev/spidev0.*

You can find the code here.

Anton Vanligt

Perdersi con lo sguardo fra le stelle, è come cominciare a camminare nella propria anima.

This slideshow requires JavaScript.

Al secondo tentativo sono riuscito a saldare correttamente l’effetto tremolo preso su Musikding, ed a testarlo assieme al fuzz preso tempo fa; in foto alcuni momenti del montaggio e del test prima di inscatolarlo (ho tagliato in due un cavo mono e ne ho sistemato le estremità senza jack per poterle collegare ad una breadboard), il file audio è un insieme piuttosto casuale di accordi con il tremolo attivo ed il fuzz inizialmente attivo e poi spento.

Devo ancora testare a fondo le diverse impostazioni del primo, che comunque pare funzionare bene, mentre il secondo ha un leggero ronzio di fondo poco piacevole, per il resto è abbastanza divertente.

Herbert Hoover

Gran professione quella dell’ingegnere!
Con l’aiuto della scienza ha il fascino di trasformare un pensiero in linee di un progetto per realizzarlo poi in pietra o metallo o energia. Quindi creare lavoro e case per gli uomini elevando il tenore di vita e aggiungendone conforto.
Questo è il grande privilegio dell’ingegnere e anche il grande rischio perché le sue opere, a confronto di quelle di altri uomini e professionisti, sono all’aperto, sotto lo sguardo di tutti.
I suoi atti – passo, passo – sono di dura materia.
L’ingegnere non può seppellire i suoi errori nella tomba come i medici; né può trasformarli in aria sottile o darne colpa ai giudici come gli avvocati. Egli non può coprire i suoi insuccessi con alberi o rampicanti come gli architetti, né, come i politici, riversare gli errori sugli oppositori sperando che la gente dimentichi. L’ingegnere, semplicemente, non può negare quello che ha fatto e viene condannato se l’opera non regge.
D’altra parte, in contrasto con quella dei medici, la sua non è vita in mezzo ai deboli, né la distruzione è il suo scopo, come per i militari, e le contese non sono il suo pane quotidiano come per l’avvocato.
All’ingegnere compete rivestire di vita, conforto e speranza lo scheletro della scienza.
Con il passare degli anni senza dubbio la gente, se mai lo ha saputo, dimentica l’ingegnere che ha costruito. Qualche politico avrà posto il suo nome o quella sarà stata attribuita a qualche promotore che ha fatto uso del denaro altrui.
L’ingegnere, con una soddisfazione che poche professioni conoscono, gode dei benefici senza fine che scaturiscono dai suoi successi: il verdetto dei suoi colleghi è il solo titolo d’onore che egli desidera.

Politometro

Politometro

Bè, direi che mi colloco esattamente dove mi aspettavo di essere…

Per sfidare Dio l’uomo gonfia il proprio vuoto.

Chuck Lorre

Lord, make me the man my dog thinks I am.