On Sun, Sep 23, 2012 at 10:00 PM, Jonas Stamm wrote:
> Hi
>
> I’m new in this area and work on a project at the school, but I have a 
> problem.
>
> The following environment:
> - mac
> 10.6
> - python 2.7
>
> Over an audio interface (M-Audio fast track pro, USB connected to the mac) I 
> would work in python
> with my guitar signal. The output I would get out of python is the frequency 
> of the guitar I play. These frequencies I
> would like to visualize with some program (whether I have to write it or may 
> by an existing one (anytop? Or which
> software?)) on the mac.

Hi Jonas,
In this case I doubt that pyusb is the right tool. You probably
already have drivers for your USB audio card on your computer. You
will have to work with the right APIs of the operating system to suck
out the PCM stream from your sound card. But this will be independent
of the USB connection, and to a large degree independent of the sound
card if you use the operating system interface. To get the main
frequencies from the sound stream you could use some FFT software. I
am sure there are already existing programs on Mac that gives you
real-time frequency plot (like on the old "equalizers") from any sound
input. Of course that should not keep you from writing your own if
you'd like to! But you can learn from existing programs before
starting something from scratch.

I think for Mac OS X, http://en.wikipedia.org/wiki/Core_Audio is the
API most people use.

>
> I tried to install pyusb to detect my USB signals, but there was failure 
> while installing (no
> backend available). I think we need libusb 1.0, but we have installed it and 
> it did not work.

The missing backend may be a pyusb issue or installation issue. In any
case, the operating system drivers most likely claim the USB audio
device and take full control of it, so you can not talk to the device
with libusb or pyusb unless you deactivate the system drivers.

Best regards,
Tormod


>
> Do you have any hint? Do
> I miss something or what is wrong?
>
> Many thanks for any input!
>
> Jonas Stamm
>

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users

Reply via email to