Some weeks ago I found a Canon Pixma MP510 on the street. A "Photo All-in-One with economical single inks that prints, copies or scans in colour". Someone had thrown it away regarding it as a piece of junk. I saw a pile of gold.
To save a bit of power (and annoyance), I de-soldered the LEDs on two USB soundcards. I use these soundcards for battery-driven projects (Beaglebone Black) and every milliamp I can save counts.
The LogiLink soundcard had two easily removable LEDs. The red one indicated that the soundcard was connected and had power, and the green one started to blink when the card was in use (driver activated). Both functions I can easily live without.
The blue '3D-sound' card had a very tiny surface-mount led that I removed using two soldering irons.
Here some before and after photos...
Btw, I'd stay away from the LogiLink. It has a problem with audible noise coming from the PWM signal of the green blinking led. If you connect a mic like I'm doing, a beep beep beep kind of sound leaks into the mic. And removing the led doesn't help. Maybe there's something in the software driver to control it, but I doubt it.
For the dance piece Ich(a) by Zufit Simon I constructed a system with four Raspberry Pi mini-computers and buttons to trigger playback of four video streams. As the videos didn't need to run in exact frame-by-frame sync, this was a very cheap way to get four channel high-quality video playback. Total cost was about (RPi 28 * 4) + (SD card 6 * 4) + (5V power 1 * 7) ≈ 141 Euro. I chose the model A of the Raspberry Pi to keep the cost and power consumption down. The four computers share a 5V power supply of 2 amps and are powered over the GPIO pins. Video cables run 50 meters down to the stage and into separate flat-screen monitors. The monitors are built into boxes that can be piled up or rolled around independently.
The videos are stored on the 4 GB SD cards that also holds the Linux operating system. I converted the videos from DVD to MP4 using ffmpeg with the following settings...
ffmpeg -i concat:"/Volumes/MONITOR01_may2012_DVD/VIDEO_TS/VTS_01_1.VOB|/Volumes/MONITOR01_may2012_DVD/VIDEO_TS/VTS_01_2.VOB" -an -vcodec libx264 -profile:v high -preset fast -crf 18 -b-pyramid none -f mp4 MONITOR01_may2012.mp4
That'll take two chapters and convert to a single MP4 and skip the audio track (-an flag).
The Python program running on each computer is here below. It plays a video to the end and waits for a button trigger. If a button is pressed before the video is finished, it'll stop and jump to the next video - all in a cyclic fashion.
#for a Raspberry Pi running Raspbian
#this script will cycle through videos in sequence when a GPIO pin is grounded
#pinSwi (pulled up internally) - GND this pin to switch to the next video
#pinOff (pulled up internally) - GND this to shut down the system
videos= ['/home/pi/ICHA1.mp4', '/home/pi/MONITOR01_may2012.mp4', '/home/pi/BLACK.mp4', '/home/pi/FLESH.mp4', '/home/pi/TESTBILDER.mp4']
delays= [0, 0, 0, 0, 0] #extra start delay time in seconds - one value for each video
from time import sleep
import RPi.GPIO as GPIO
GPIO.setup(pinSwi, GPIO.IN, pull_up_down= GPIO.PUD_UP)
GPIO.setup(pinOff, GPIO.IN, pull_up_down= GPIO.PUD_UP)
os.system("clear && tput civis") #clear and hide cursor
index= 0 #keeps track of which video to play
omx= pexpect.spawn('/usr/bin/omxplayer -rp '+videos[index])
os.system("tput cnorm && sudo halt")
if __name__ == "__main__":
Instructions for installing
(you'll need a model B to prepare an SD card, but then move it over to the model A Raspberry Pi)
prepare the RPi
use Pi Filler to transfer 2013-05-25-wheezy-raspbian.img to the SD card
put the SD card in RPi model B
select 'Expand Filesystem' in and enable SSH under advanced in config menu
select 'Finish' and reboot
log in with pi/raspberry
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install python-pexpect avahi-daemon
copy files from macOS
open a terminal window on the main computer
cd to folder with videos
edit the file f0videoplayer.py and select which videos to use
optionally add delay times if some videos should start later
Being fascinated since long by the sound of serial transmission, I got into trying to make music out of it in some way. By trial-and-error, I figured out that if I connect a small speaker to the TX line of an Arduino, I could upload programs that send serial data and listen to the sound of it.
It is all very basic: if I make the Arduino program send data with delays in between, it plays click rhythms. And programs with faster streams of data play tones. More elaborate combinations of delays and patterns of data produce chords, melodies and a variety of noises. So it works like some sort of one-bit music system that is nice and challenging to play with.
I think the uploading sound changes subtly depending on program length and I also guess it will change with different Arduino bootloaders and whatever baud rate they are using.
And you also have a bit of control over the timbre of the sounds. Certain 8bit numbers are more square-wave like than others e.g. 170 (0b10101010), and 85 (0b01010101) sound more 'clean' and 15 (0b00001111) and 240 (0b11110000) also have a more distinct pitch.
Different baud rates have a huge effect on the sound - mainly working as frequency transposition.
But the real fun starts when one connects five Arduinos to a mixer and start playing with volumes, panning and filters. By having five Arduinos connected to a USB hub while running five copies of the Arduino IDE software, I can write little programs on the fly that will address the different boards and play different sounds on the TX lines. (Listening to the RX line also works but then the upload process fails. It'll require extra circuitry to tap into this data without disrupting the uploading).
The reason I used five Arduinos is that that's all I could connect to my laptop (2x USB) with my 4-port USB hub. That in combination with the limitation of computer screen space. It is hard to have more than five Arduino IDE programs open and visible at the same time.
Anyway, as the voltage of the standard Arduino is 5V and really a bit too much for audio equipment, I bring this down a bit with a simple voltage divider. I'm using a 10K and a 1K resistor.
Here are some pictures of the setup. I'm using the Arduino clone Red board from SparkFun.
The complete setup (without mixer and laptop)...
One issue with the setup is that one can't trust the Arduino IDE to remember which serial port it was connected to. So every time I start the program I need to double-check that the five Arduino IDE programs are set to the right Arduino board. And as I like to know which board is connected to which mixer channel, I also need to check that and possibly reconnect the sound cables.
Live at the live.code.festival in Karlsruhe (Algorave night 20 Apr 2013). Five Arduino boards all with their serial port (TX line) connected to a mixer (with simple protective circuitry in between). So all sounds are generated from what the Arduino boards are programmed to transmit serially. Note that the sound is heavily distorted. Sorry.
Since the category 'visuals' is underrepresented in this blog and I don't like to embed video in my standard [HTML] pages, I thought I'd include this old piece here. This is the shorter abridged version of the full piece. The quality isn't the best - it's pixelated and stuttering. One day I should re-render it in 60 FPS at a higher resolution. It looks a lot better when running in realtime from a computer.
Ström by Mattias Petersson (music) and Fredrik Olofsson (video) is, in its full version, a 45-minute minimalistic piece for five loudspeakers, live-electronics and live-video, based on an open-minded, artistic approach towards electricity. The piece is an attempt to transfer electric currents via sound to the audience. The five speakers in the surround system struggle to take over the sonic stream like electro-magnets. Sine waves and noise rotates with breakneck speeds around the listeners, tries to charge them with static electricity and, as an ultimate goal, even make them levitate. The video part is in direct connection with the sound and is generated out of five discrete lines – one for each channel in the surround system. The lines are treated in different ways, and as the high voltage builds up in the music they look more and more like electric wires, inflicting each other with violent discharges and eruptions. This version was made for a promotional DVD release on Swedish sound art.
It is now finished and released as a quark. This is the initial version and there might still be bugs. I _did see SuperCollider crash once in a strange way after spawning lots of particles, so watch out for memory leaks.
To install it run the following code and recompile SuperCollider...
//and then recompile and open the help file TraerPhysicsOverview
I also wrote a few simple examples to go along with the help files. Here's a screenshot of one...
A tiny circuit I designed and built-in five copies for dancer Raffaella Galdi. With the help of a small magnetic sensor, this circuit makes it possible to start and stop sound coming from an MP3 player. Because the five circuit boards, speakers and MP3 players are mounted inside pointy hats, the electronics had to be light and draw very little current from the battery.
For the sound volume control, I used a vactrol (LDR+led) and the timing and fade in/out logic are encoded in the firmware of a little microcontroller (ATtiny45). To save battery, the ATtiny45 is put to sleep and is only active when the magnetic reed sensor is triggered. I used the great JeeLib.h for controlling the sleep cycles of the microcontroller.
Schematics, firmware and parts list attached below.