Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Clone this wiki locally
Install Friture on Linux
Notes on files and programs needed to run Friture version 0.1
These notes are contributed by Lee McKusick. They are based on installing Friture on two Ubuntu systems.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Create a subdirectory for friture and copy the friture tar.gz file into it.
mkdir frit cd frit tar -xzf friture-0.1.tar.gz
Check your python version. Most Linuxes have some version around 2.6
You can try running Friture. Typically friture will try and load a library that your computer does not have. Most of getting friture running consists of getting those library files.
cd friture ; # directory was created when you unpacked tar file ls ; # see a file friture.py ./friture.py ; # Runs the file.
See INSTALL.txt now
Friture uses a programming language Cython to make certain sections of code run very fast. Here is how to download Cython from the command line if you run Ubuntu or Debian Linux. Red Hat or Fedora or Centos Linux systems have a slightly different syntax for fetching programs and library files from their repository.
sudo apt-get install cython
Getting Python library files called for by Friture
Friture uses a number of Python library files. Most of these library files are available as packages.
Editorial: To find the names of all the library files used by friture,
go to the friture subdirectory. Inside each file ending in .py is a line
that says something like
from PyQt4 import QtCore. You can find all those
lines with this command:
grep -i from *.py
Here are the commands to get the library packages you may need:
sudo apt-get install python-psutil python-scipy python-qwt5-qt4 sudo apt-get install python-qt4-gl python-qt4 sudo apt-get install python-pyaudio
I haven't done any compiling so I installed gcc. I am not sure, I think gcc is required to compile Cython code into executable code used by Friture.
sudo apt-get install gcc
Packages I installed and I am not sure if they are needed:
sudo apt-get install pyqt4-dev-tools
PyAudio additional note
I did not find the python-pyaudio package on my first search. If your Linux distribution doesn't provide the package, get it from the author's website. Accept “use package installer” and the package will be installed on your computer.
If you get the following error message:
bt_audio_service_open connect() failed: Connection refused(111)
According to Ubuntu forums, this error is caused by the package bluez-alsa
You can stop the error message by removing the bluez-alsa package.
sudo apt-get remove bluez-alsa
Notes on getting microphone inputs to work on an old Linux computer
I have found getting a high quality microphone working with a Linux computer an aggravating activity. The aggravation is it is really hard to set up the sound pathway and it is really hard to test parts of the pathway.
Here are some notes about things that are working for me.
I am running Friture on an older laptop that was abused in it's previous life. The physical microphone plug is worn out and the manufacturer only supports one audio channel (monophonic sound).
To work around the hardware problems, I bought a $15.95 (2011) USB Sound device called “USB 2.0 Audio 7.1 Channel No driver needed”. I add a 12” non-electronic USB extension wire because the USB sockets on the laptop are in the back and too fragile for use in the field.
I have done a variety of microphone setups and here is what I have found:
First, your microphone should have a 3.5 mm diameter stereo microphone plug. A stereo plug has two active parts at the tip. Microphones I have wired up using a 3.5 mm diameter mono microphone plug do not work because the longer metal shank of a mono plug causes an electrical short between the body of the plug and the connector for the second active part of a stereo plug.
Here are the results I am seeing: I am using a yard sale computer microphone. I keep having noise problems where the Friture sound display goes nuts every time I move the microphone or pull on the audio signal cable.
Editorial: Understand I am working with junk and your mileage may vary. I have got the best results from a conventional 2 wire electret element computer microphone when I connect the electret element audio output (white wire) to both tip connections of the 3.5 mm diameter stereo microphone plug. The black or braided wire is conventionally a ground that connects to the ground terminal of the mike plug.
There is a sound menu in Friture. My experience is Microphone audio only arrives on the default setting, "0: (Alsa) default (L)".
For the Linux Sound Preferences, on a late model WindPC with the microphone plugged into the front panel, for Sound Preferences I have: Select the tab marked “Input”, Input volume slider: move it to the maximum, for the Connector: dialog choose “Microphone 2” For the Device dialog choose “Internal Audio Analog Stereo”
On my two Linux computers, when you change the setting for the Connector dialog (As between Microphone 1 or Microphone 2, the signal reaching Friture changes immediately.
Here is what I see, very crude measurements: Signal generator and speaker, generating 300 to 440 Hz audio tone, with about 80 dB A sound pressure at the computer microphone. Oscilloscope observing the microphone voltage as 3.2 volts DC with ~3.5 mV peak to peak audio signal superimposed. Linux sound preferences set to maximum gain and Friture showing a signal of -40 PSD(dbA).