Giter VIP home page Giter VIP logo

tlecomte / friture Goto Github PK

View Code? Open in Web Editor NEW
857.0 38.0 155.0 18.86 MB

Real-time audio visualizations (spectrum, spectrogram, etc.)

Home Page: http://friture.org

License: GNU General Public License v3.0

Python 94.11% C 0.61% Batchfile 0.01% PowerShell 0.34% Shell 0.03% Rich Text Format 2.48% Cython 0.55% QML 1.83% JavaScript 0.04%
audio-analysis audio python spectrum spectrum-analyzer spectrogram

friture's Introduction

Friture

image

Friture is an application to visualize and analyze live audio data in real-time.

Friture displays audio data in several widgets, such as a scope, a spectrum analyzer, or a rolling 2D spectrogram.

This program can be useful to analyze and equalize the audio response of a hall, or for educational purposes, etc.

The name Friture is a french word for frying, also used for noise in a sound.

See the project homepage for screenshots and more information.

friture's People

Contributors

asceenl avatar bobotig avatar clo-yunhee avatar imyxh avatar jdtimmerman avatar m0rf30 avatar salavin avatar scondas avatar tlecomte avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

friture's Issues

SVG icons on Windows

SVG icons seem to be broken on Windows for all computers apart from mine !
I shall investigate whether a dll is missing or something like that.

PyOpenGL

Histogram-like plots are slow when there is a lot of boxes to display, even when caching pixmaps. That's because numpy arrays and histograms are not well integrated in PyQwt, so that we have to explicitely loop over array elements and call something like drawPixmap or fillRect for each one.

I investigated using Cython to integrate Qt and numpy arrays on those operations, but the gain is marginal since Python operations keep being involved. (source = http://groups.google.com/group/cython-users/browse_thread/thread/458ac77fcb5396b5/94bf579351a54933?lnk=gst&q=qt#94bf579351a54933)

Instead, PyOpenGL is well integrated with numpy arrays, and allows to use fast OpenGL calls. Early test show a huge performance gain with that approach, which needs to be completed.

Crash on Startup

Windows 7
Using the latest public build.

This is what I notice in the error log.

Traceback (most recent call last):
File "friture.py", line 7, in
File "friture\analyzer.pyc", line 28, in
File "friture\audiobuffer.pyc", line 20, in
File "friture\ringbuffer.pyc", line 24, in
File "numpy__init__.pyc", line 153, in
File "numpy\add_newdocs.pyc", line 13, in
File "numpy\lib__init__.pyc", line 18, in
File "numpy\lib\polynomial.pyc", line 19, in
File "numpy\linalg__init__.pyc", line 50, in
File "numpy\linalg\linalg.pyc", line 29, in
File "numpy\linalg\lapack_lite.pyc", line 12, in
File "numpy\linalg\lapack_lite.pyc", line 10, in load
ImportError: DLL load failed: The specified module could not be found.
Traceback (most recent call last):
File "friture.py", line 7, in
File "friture\analyzer.pyc", line 28, in
File "friture\audiobuffer.pyc", line 20, in
File "friture\ringbuffer.pyc", line 24, in
File "numpy__init
.pyc", line 153, in
File "numpy\add_newdocs.pyc", line 13, in
File "numpy\lib__init__.pyc", line 18, in
File "numpy\lib\polynomial.pyc", line 19, in
File "numpy\linalg__init__.pyc", line 50, in
File "numpy\linalg\linalg.pyc", line 29, in
File "numpy\linalg\lapack_lite.pyc", line 12, in
File "numpy\linalg\lapack_lite.pyc", line 10, in __load
ImportError: DLL load failed: The specified module could not be found.

Log scale only has even divisions

(From private mail)

Friture 0.18 (and previous versions, based on your website screen shots) only has the 'even' division lines showing in “Logarithmic” Frequency scale for the FFT Spectrum. For example, the frequency division lines for 3000, 5000, 7000 and 9000 Hz are not shown on the Frequency scale when it’s set to “Logarithmic” mode. However, all of the graph’s division lines are present when set to “Linear” mode.

It’s not a big problem, but it can be a bit misleading. I have never noticed it, until today. I was looking at an area in spectrum and thinking it was around 3 kHz (the 2nd line over from 1 kHz), then I noticed that the cross-hair cursors actually read something closer to 4 kHz. I moved the cursor to other locations and that’s when I realized that the all of the ‘odd’ division lines were missing from the Logarithmic graph.

Acoustic quality quantifiers

It would be interesting to have STI (Speech Transmission Index) estimation integrated in Friture (among other speech quality estimators).

Filter implementation with cascade of biquads

Currently, high-order IIR filters are used for decimation and fractional octave filters, and they are implemented as brute-force filtering, whereas it is advised to use series of biquads to achieve more stability (the use of floats instead of integers mitigates the issue).

Adaptive timer

The display timer period is currently fixed to 25 ms. It should probably be made adaptative to handle various CPU loads and power.

Crashes when changing FFT spectrum range or weighting

Windows 7, friture-0.18-20150824 (friture-0.18-20150909 does not work at all) If I try to adjust the FFT spectrum range or ear weighting, it crashes. How do I get the Python traceback to display when this happens? There is a friture.exe.log but it's empty.

PortAudioError: Error getting stream time

Hello.
During the launch I got this error:

2016-11-20, 19:42:00
--------------------------------------------------------------------------------
<class 'sounddevice.PortAudioError'>: 
Error getting stream time
--------------------------------------------------------------------------------
  File "./friture/plotting/canvasWidget.py", line 67, in paintEvent
    self.drawData(painter)
  File "./friture/plotting/canvasWidget.py", line 98, in drawData
    item.draw(painter, self.horizontalScaleTransform, self.verticalScaleTransform, self.rect())
  File "./friture/imageplot.py", line 120, in draw
    time = self.audiobackend.get_stream_time()
  File "./friture/audiobackend.py", line 391, in get_stream_time
    return self.stream.time
  File "/home/alex/environments/sonic/lib/python3.5/site-packages/sounddevice.py", line 1069, in time
    raise PortAudioError('Error getting stream time')

--------------------------------------------------------------------------------
Friture 0.20.0.0

System information:

$ uname -a
Linux bender 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u1 (2016-09-03) x86_64 GNU/Linux
$ pip list
cffi (1.9.1)
Cython (0.25.1)
docutils (0.12)
numpy (1.11.2)
pip (9.0.1)
psutil (5.0.0)
pycparser (2.17)
PyOpenGL (3.1.0)
PyOpenGL-accelerate (3.1.0)
PyQt5 (5.7)
scipy (0.18.1)
setuptools (28.8.0)
sip (4.18.1)
sounddevice (0.3.5)
wheel (0.30.0a0)
$python --version
Python 3.5.2

Pyinstaller instead of py2exe

PyInstaller should be used instead of py2exe. It has the following advantages:

  • automatic msvcrt packaging on Windows (will simplify NSIS installer, and avoid installing one more package on users' machines !)
  • improved support for pyopengl (will be almost mandatory for the next version since opengl will be necessary)
  • cross-platform => MacOS app coming !

It has the following drawbacks:

  • does not support python 3 yet

Crashes on opening in MacOSX

MacOSX El Capitan

Used the mac osx installer obtained from the site. On double clicking the icon under Application, got

screenshot 2015-11-30 12 46 59

Have tried clicking ignore and reopen.
Nothing solves the problem.

Need a non-blocking binding to PortAudio

To implement a "stricly-correct" spectrogram with correct STFT sampling/resampling, I need precise timing information: the time associated with the buffer obtained from stream.read, and the current time (the GUI time). The first one is not available in the blocking mode of PortAudio, but only in the callback mode (see PaStreamCallbackTimeInfo). Unfortunately PyAudio only binds the blocking mode of PortAudio. Fastaudio is a binding for the non-blocking mode, but uses the V18 API which does not provides PaStreamCallbackTimeInfo.

https://github.com/bastibe/PyAudio seems to provide what I need !

ENC: Port to Android?

Hi. An rta in python is what I want, and you did it! Thank you for this tool. I really like the extensibility to add dock features.

I see you've gotten the later releases to run on Windows. A commendable feat. Is there any interest is running on mobile phones? I could use these tools in a portable way. Thanks.

Plot goes blank, label is corrupted

Reported by @endolith in #41:

friture-setup-0.17-20150411 does not crash no matter what I do. The plots do sometimes go blank, though:

6b04eae0-8a58-11e5-9a65-650a3b2aad0e

but if I switch to another type of plot and then back again, it works. The label stays corrupted though:

71f0188e-8a58-11e5-8de2-6192bd20370f

Make psutil optional

psutil is currently a hard dependency, which is mostly fine, but is an issue when running Friture for Windows under Linux with Wine, so the import could be nested in try ... except ... so that it is optional.

Xorg CPU usage on Linux

Performance: on Linux (at least), there is an unsatisfying large CPU usage coming from python and Xorg to be investigated.

Conver frequency to notes

From Tammy:

Hi, Friture is amazing application, thakns for build!
I am just missing some converter to note, like 220Hz means A3 and so on.
Would be very usefull, thank you :)

Quadrature mirror filter

In the current code, the octave and fractional-octave filters are implemented with a cascade of decimations and a set of bandpass filters for each octave, but only the low-pass signal is decimated. According to the nyquist theorem, the high frequency parts can also be high-pass filtered and decimated before the octave filters are applied. Quadrature mirror filters allow to do both the low-pass and high-pass decimation with one filter only. So the expected performance should be twice as high as the current implementation.

Marketing

Publish announcements for audio related communities (PyQwt: done).

Critical error at startup

This can be either ignored or aborted. Ignoring causes popup to reappear every time.

contents of friture.log file:

2016-10-16, 22:00:15

<class 'OSError'>:

[Errno Stream closed] -9988

File "/usr/lib/python3/dist-packages/friture/plotting/canvasWidget.py", line 67, in paintEvent
self.drawData(painter)
File "/usr/lib/python3/dist-packages/friture/plotting/canvasWidget.py", line 98, in drawData
item.draw(painter, self.horizontalScaleTransform, self.verticalScaleTransform, self.rect())
File "/usr/lib/python3/dist-packages/friture/imageplot.py", line 120, in draw
time = self.audiobackend.get_stream_time()
File "/usr/lib/python3/dist-packages/friture/audiobackend.py", line 384, in get_stream_time
return self.stream.get_time()
File "/usr/lib/python3/dist-packages/pyaudio.py", line 489, in get_time
return pa.get_stream_time(self._stream)


Friture 0.19.0.0

OS: Linux Mint 18 Sarah
Version: 0.19.0.8-1~getdeb1

Version info in the about page

Users have currently no way to know what version they are running. I need to provide a widget somewhere in the about page with the version number and the version date.

Crashes under Mac OS X when adding widgets, resizing window, changing settings

Reported by @acousticolor in #42:

As promised, after some testing these days, some feedback on the new OSX version 18.0.16.

Indeed it did install, and created a executeable Friture.

I suppose it is the work of QT, but there are some quirks with Friture when:

  • adding a measuring-item crashes one or two/more others graphically [as if the connection is lost from friturecore to graphics, osx doesnot see a “not rsponding” proces];
  • resizing the Friture window can cause graphical crashes within one or more windows opened within Friture;
  • choosing another weighting can cause graphical crashes...

Any advice or guidence for me to help you out with the correct debug information?

Sincerely,

Marcel Wardenier ing.

Long-run level widget

To measure the resonance decay time in a room, we need a graph showing levels on a long time scale.

Closed : Crashes on start

Hello, after a couple of smaller issues I was successful to install and run friture on my OpenSuse 13.2 system right now. Unfortunately on starting I got an error message and just could abort the program.
I'm using Qt5 right now, and hope everything is well installed.

After I installed everything I had a "setup build" and "setup install" running as sudo. Then I started the friture script from /usr/bin as normal user from the console. In the background I see the friture main window. This disappears when I press the Abort button, what is the only chance to close the error dialog. Starting as sudo did not solve the problem, but gives an other failire "QXcbConnection : Could not connect to display".

Unfortunately I'm not to familiar with python and qt programming to find out more, and it seems there's also nothing on the web searching for some of the keywords.

If there's information I can forward please let me know.
Thanks a lot for your help!

//hufnala

Here's the failure log:

2016-07-08, 19:18:12

<class 'OSError'>:

[Errno -9988] Stream closed

File "/usr/lib64/python3.4/site-packages/friture-0.19-py3.4-linux-x86_64.egg/friture/plotting/canvasWidget.py", line 67, in paintEvent
self.drawData(painter)
File "/usr/lib64/python3.4/site-packages/friture-0.19-py3.4-linux-x86_64.egg/friture/plotting/canvasWidget.py", line 98, in drawData
item.draw(painter, self.horizontalScaleTransform, self.verticalScaleTransform, self.rect())
File "/usr/lib64/python3.4/site-packages/friture-0.19-py3.4-linux-x86_64.egg/friture/imageplot.py", line 120, in draw
time = self.audiobackend.get_stream_time()
File "/usr/lib64/python3.4/site-packages/friture-0.19-py3.4-linux-x86_64.egg/friture/audiobackend.py", line 384, in get_stream_time
return self.stream.get_time()
File "/usr/lib64/python3.4/site-packages/pyaudio.py", line 488, in get_time
return pa.get_stream_time(self._stream)


Friture 0.19.0.0

Maximize/Minimize restarts 2D Spectrogram

Title says it all.
Everytime I change the size of the main window, the 2D spectrogram will black out and restart, thereby not displaying data from the previous x seconds.

Overlap-add FFT filtering

Currently the octave spectrum uses IIR filters with decimation to go from one octave to the next. It would be smarter to use FIR instead of IIR filters, since they are more stable to numeric issues, and these FIR filters could be implemented with an overlap-add FFT algorithm for efficiency (keeping the decimation or not, depends on complexity - to be examined).

norm_square

I am trying to install Friture on Raspbian 3.18, and I keep getting problems with the norm_square file when I try to run the program. At first, it couldn't find norm_square, so I moved it down a directory. It still couldn't find it, so I changed the extension from .pyx to .py (I'm sure this was a stupid idea, but at least it found the file).

Now it keeps finding syntax errors. I commented out the errors, and it just found more. Here are a few that it's having trouble with:

cimport numpy as np
ctypedef np.float_64_t dtype_t
def pyx_norm_square(np.ndarray[np.complex128_t, ndim=1] fft not None, np.float64_t factor):

Any idea what the problem might be?

MacOS

We need to investigate the way to distribute Friture on MacOS, especially as far as dependencies are concerned (involves py2app). On Windows, this has been achieved using py2exe and NSIS to provide an installer.

How to use it once it is installed?

Hi,

I'm on Mac OSX yosemite. I just finished installing all the dependencies and friture as outlined on your mac guidelines page! I really want to be able to use friture, but I have no idea of what are the possible commands and things I can do with it. I've tried looking up the project page and the github page. Could you please direct me to the documentation, and IF possible, some examples? It would surely be very helpful :)

Use python logging facility

Friture has a home-made logging facility, that works nicely but could be more powerful if implemented using the python logging facility (timestamps, etc.)

Polyphase fractional octave filters

The fractional octave filters output is squared and heavily low-passed (from 25 ms to 1s response time, sampled at 25 ms), so the decimation factor is of the order of 1000.

Consequently, we can use a polyphase filter for the low-pass part, but by propagating the decimation, we can also do use a polyphase fractional octave filte. This will bring a huge performance enhancement (several times a factor of 1000), and is compatible with any kind of fractional octave filter shape !

Colormap selection for spectrogram

Rainbow colormap is generally not recommended due to being misleading. A choice of colormaps that monotonically increase in brightness would be better, like grayscale, thermal, YlGnBu_r, etc.

square wave spectrogram

A choice of colormaps that monotonically increase in brightness would be better, like grayscale, thermal, YlGnBu_r, etc.

Min audio latency from PortAudio

The device info from portaudio reports a low input latency (max 46 ms), but after opening the stream, it is reported to be 139 ms. Why ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.