Archive

Archive for the ‘Digital Audio’ Category

Arduino Sensor Sucess

September 18th, 2010 No comments

Do-it-yourself culture is moving from the area of home renovations and bike repairs to making your own computer controlled gadget.

Makerspaces and Hackspaces are proliferating around the world as more individuals realize they can create a small machine to do the exact tasks that they want.

One of the most popular small brains that are used to control these gadgets are Arduino Boards, The brain on the board is not as smart as your phone but, there are a lot of things it can do.  A good place to start finding out what other ingenious inventors are up to is the Make Magazine on-line. Yes, some of the projects are awesome and complete instructions can usually be found to duplicate the results.

Inspired by the cool projects other people were making, I decided to use the Arduino board to make a sensor that would control my computer when I am using it for music or video performance.  There are several places that Arduino boards are available on-line, and the SmartProjects company that makes them has a listing of distributors and retail outlets.

I was planning to go to an educational workshop in Troy, New York where I would have an opportunity to work on using this technology. I did not know if anyone else would be trying out Arduino boards, but I was confident that I could get it to work.

I live in Vancouver, Canada and I could buy a lot of Arduino products from Lee’s Electronics on Main St. but, I was worried about taking the boards through US customs. Since the homeland security staff are checking Canadians very closely, I decided to order the boards in New York and have them shipped to the university where the workshop was held. I could imagine trying to explain to a suspicious customs agent that I was using these computer parts for a multi-media project. Why bother to risk missing my plane, when Adafruit is one of the largest dealers of do-it-yourself Arduino goodies in the USA and they have a lot of helpful information on their site. They are located in NYC, so I ordered from them.

I had investigated Arduino boards by attending an evening at the local Vancouver Hackspace. The denizens of the place were mostly drawn from a pool of programmers who wanted to do something more fun with their skills than making sure the heating system in your office building works. They were very used to working with this type of code and they moved very fast. However, I was convinced that I could do this if I had the time to research. Trial and lots of error usually works in the end.

I went off to the workshop and the boards were delivered as planned.

I had done quite a bit of research and I knew there were different types of Arduino boards. I ordered two: the Duemilanove (pictured above) and a Boarduino clone kit. The Duemilanove is the basic Arduino, so I thought the most information would be available and It would be the default for the program to upload the code. I bought the Boardino because I liked the idea of the breadboard being a part of the unit and I thought it would help me understand the system if I actually built one. Unfortunately, the kit did not cme with a breadboard, so I have not tried to make it yet.

Adafruit Boarduino clone

Adafruit Boarduino clone

With the boards, I also purchased two types of power supplies, one that plugs in the wall and one that uses batteries. This was because I didn’t know how I was going to be using the unit and I thought it might be good to have the battery power available. I also bought a selection of sensors: Infra-red distance sensor, motion sensor and some small sensors that measure tilt and heat. I also bought a few LED lights and some connector wires (male and female). The total bill was $150 USD – my budget for this project.

When I go to Lee’s and buy the breadboard I will do a post on making the Boarduino.

It might have been more economical to buy the starter pack, but I did not need another USB cable – the wires did seem important, so I bought male and female connectors. Read more…

Share

M-Audio Delta44 Cards finally working in Ubuntu 9.04

October 11th, 2009 No comments

As a devoted Ubuntu user, I always tell the skeptics that in Windows or Mac OS, I have to pay money for my operating system and applications, then I have to do their beta testing for them. In Ubuntu, if you can fix it — it is yours with no need to pull out the credit card.

I was challenged when I upgraded from Ubuntu Gutsy 8.10 to Jaunty 9.04 in May 2009,  because my trusty M_Audio Delta 44 sound cards refused to make any sound except in the Audacity application.  I went into “Tech Mode” and started checking out the Ubuntu Forum. I found some confirmation that I was not alone in this post HOWTO: PulseAudio Fixes & System-Wide Equalizer Support. I also found a lot of information on ALSA here.

There was no quick fix for me so I submitted a launchpad bug report 425435. Read more…

Share

Time Investment

January 12th, 2009 No comments

A new year and I have been thinking about one of the great topics of my life — time.

These ideas may be totally obvious to everyone else, but I like to analyze and explain my perceptions. This is off topic for this blog, but indulge me this once, please.

Perception of Time Passage

It seems to me that time is going faster the older I get and I have spoken to other people my age who feel the same kind of speeding up effect. My theory about this is that a given amount of time is experienced in comparison with the amount of time you have previously been aware of. For example; to a child aged 2, one additional year is one third of their life span but to an adult aged 29, one year is only a thirtieth of their life span and an older adult of 59 perceives a year as one sixtieth. For me to experience another year is approximately one fiftieth of my lifespan, so the effect of time is compressed compared to the perception of the length of childhood days.  Please comment on this theory.

Photography and Time

Recently, I have started to raise the quality of my photography. In order to accomplish this goal, I studied photographs and also compared the result that I achieved with the result I expected. I have come to some conclusions that may be surprising.

As a competent audio engineer I am used to capturing audio from source and achieving excellent results, because I am familiar with the behaviour of sound waves. Sound waves are quite slow moving and long, especially at lower frequencies (perceived as pitch). Both audio and visual capture are actually the process of recording the past because of the latency between the event and the capture device. The event of striking a string or hitting a key initiates a vibration that travels into the air and is picked up by some type of microphone and because sound waves are so slow, the audio engineer can initiate the recording process when the musician starts to move and still capture the entire sound wave.

It is well known that many people have traveled faster than sound in airplanes, but light is another story. Light moves so quickly that the photographer must actually move to take the photo before the moment that is captured occurs. No one can move faster than light and most photos are not taken from a great distance so the light reaches the camera almost instantaneously. A great photographer must plan to take a picture of the immediate future when the capture is initiated because if the moment has been seen, then it has already passed and can no longer be captured.

This has led me to take note of the amount of planning and forethought required to create interesting photos. My new idea is to recognize that a moment is about to occur (or plan a moment) and be ready to initiate the capture process to freeze the next moment in time. I have been trying to take a photo of what I am seeing, but that is impossible — I can only take a photo of what is about to happen.

In audio sampling, I have had to develop an accurate idea of very short time frames. I own the very first EMU SP-12 in Canada, the first drum computer to have built-in sampling. Due to the 5 second memory limitation, I had to learn to truncate (cut parts off) samples to make them take as little memory as possible. So I learned what .008 seconds sounds like.  Now I will try to translate that awareness into visual technology. I must develop the rhythm of shooting photos so that I will know how long it will take to initiate the process. This idea is interesting and I hope my photos will improve.

Share

Ubuntu Hardy + Free Firewire Drivers + Jackd

September 21st, 2008 1 comment

Since I came back from Seattle the Saffire audio device has been firmly installed at Waterlou Studios where it works very well with the G4 OSX 10.3.9 and G5 quad-core OSX 10.4. It has been challenging to get all the applications working on this newly installed platform and I have not had much time to putter away on my home system. Paul, our friend Barry and I also spent time going to a demo of the WAVES Logic plug-ins with Eddie Kramer as the keynote speaker, which was fun. I couldn’t resist making a few comments to the Apple reps about the new Logic Studio. It is an inspiring tool for Paul and I to have in our musical hands, but I still want to pursue my own mobile recording set-up.

Supported by ffado

Remember the WordPress motto when reading this: “Code is poetry.”

The last steps I took on activating the music recording capabilities of my ASUS notebook included installing the ffado drivers and (with help from Robin B. in Seattle) making sure the “raw1394” kernel module is loaded on boot. This can be checked in terminal (sudo modprobe raw1394) and I did find that the Ubuntu Studio control that I installed was not a reliable indicator that the raw kernel module was in fact loaded. Even after checking the box in the GUI loaded from System>Administration>Ubuntu Studio, I still was asked for my password to activate the raw kernel in terminal.

There is a post on the ffado site that describes how to check if jackd is reading the ffado driver from terminal here. Unfortunately, I get the reading:

[email protected]:~$ jackd -R -d firewire -v4
jackd: unknown driver ‘firewire’

I think my problem might be with jackd rather than with the ffado driver itself. I was following the install instructions on the ffado trac site — Pieter writes encouragingly at the top “It’s very easy”, but forgets to add “…if you are a Linux programmer”. I have the latest RT (realtime) kernel installed and all of the dependencies except the python-qt.

[email protected]:~$ sudo apt-get install scons libiec61883-0 libiec61883-dev libavc1394-0 libavc1394-dev libxml++2.6c2a libxml++2.6-dev liblo0 liblo0-dev docbook-utils libexpat-dev libdbus-1-dev pyqt-tools python-dbus python-qt
Reading package lists… Done
Building dependency tree
Reading state information… Done
scons is already the newest version.
libiec61883-0 is already the newest version.
libiec61883-dev is already the newest version.
libavc1394-0 is already the newest version.
libavc1394-dev is already the newest version.
libxml++2.6c2a is already the newest version.
libxml++2.6-dev is already the newest version.
liblo0 is already the newest version.
liblo0-dev is already the newest version.
docbook-utils is already the newest version.
Note, selecting libexpat1-dev instead of libexpat-dev
libexpat1-dev is already the newest version.
libdbus-1-dev is already the newest version.
pyqt-tools is already the newest version.
python-dbus is already the newest version.
E: Couldn’t find package python-qt

Robin fixed this later and I have no idea what he did. I had already checked that I had python-qt3 installed and somehow he made Ubuntu see it. Next I downloaded the ffado sources and placed them in the directory and tried to compile using Scons. I had never tried to compile anything before so I did not realize that scons had to be run from inside the folder of the program that you wish to compile.

[email protected]:~$ scons DEBUG=yes

scons: *** No SConstruct file found.
File “/usr/lib/scons/SCons/Script/Main.py”, line 825, in _main
[email protected]:~$ scons install

Scons cannot find the SConstruct file unless it is run in the directory folder that the text file lives in. I figured this out and I was pleased to see a string of code scroll down the terminal screen.  I was less happy when the install terminated with the error message:

xdg-icon-resource install –size 64 –context apps support/xdg/hi64-apps-ffado.png
scons: *** DirNodeInfo instance has no attribute ‘csig’
scons: building terminated because of errors.

I tried to continue and received some help from the guide posted here. I decided not to try to hack the code in the SConstruct file as they suggest and looked for another method. There is now some new information posted by Pieter here, but at that time, after a bit of searching, I gave up and decided to continue with the install instructions. Later Robin came to my rescue and said something that contained the words “usr home folder”. I did not understand what he said and he types quickly into the terminal, but the result was positive and the driver is installed.

[email protected]:/usr/share/applications$ cd /usr/local
[email protected]:/usr/local$ ls
bin  etc  games  include  lib  man  sbin  share  src
[email protected]:/usr/local$ cd bin
[email protected]:/usr/local/bin$ ls
ffado-bridgeco-downloader  ffado-fireworks-downloader
ffado-dbus-server          ffadomixer
[email protected]:/usr/local/bin$ ffado
ffado-bridgeco-downloader   ffado-fireworks-downloader
ffado-dbus-server           ffadomixer
[email protected]:/usr/local/bin$ ffadomixer

——————————————————-

Another frustrating bit of business with the command:

$ sudo apt-get install subversion libtool automake

I could not get it to run, but I installed jack from the trunk in a separate folder and I think that is the source of my present problems. Jack installed very well, but now I think I am running two versions of Jacd and that is confusing to my OS. I do not have Robin B. to help me now, so I just tried running the above cmnd again. Surprised and pleased, I watched the install proceed:

[email protected]:~$ sudo apt-get install subversion libtool automake
[sudo] password for victoria:
Reading package lists… Done
Building dependency tree
Reading state information… Done
subversion is already the newest version.
libtool is already the newest version.
The following NEW packages will be installed:
automake
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 519kB of archives.
After this operation, 1712kB of additional disk space will be used.
Get:1 http://ca.archive.ubuntu.com hardy/main automake 1:1.10.1-2 [519kB]
Fetched 519kB in 2s (182kB/s)
Selecting previously deselected package automake.
(Reading database … 245531 files and directories currently installed.)
Unpacking automake (from …/automake_1%3a1.10.1-2_all.deb) …
Setting up automake (1:1.10.1-2) …

Now I have the automake application installed jackd may work better or I might have to remove it from the system and reinstall. I plan to use this post to ask for help with my lack of success, but I feel I am making some progress because my terminal reads:

[email protected]:~$ cd libffado
[email protected]:~/libffado$ tests/test-ffado Discover
verbose level = 0
Using ffado library version: libffado 2.0.900-1319

06565751473: Debug (devicemanager.cpp)[ 555] discover: Discovery finished…
06565751641: Debug (devicemanager.cpp)[1045] showDeviceInfo: ===== Device Manager =====
06565751717: Debug (Element.cpp)[ 109] show: Element DeviceManager
06565751769: Debug (devicemanager.cpp)[1053] showDeviceInfo: — IEEE1394 Service  0 —
Iso handler info:
Dumping IsoHandlerManager Stream handler information…
State: 2
no message buffer overruns

————————————————————-

Thanks Robin B. for your hospitality and your help! Here are some flowers for you.

A bouquet of flowers for Robin

Share