introlab / 16SoundsUSB

16 Synchronized Inputs USB (UAC2) Sound Card Based on XMOS xCORE-200
Creative Commons Attribution Share Alike 4.0 International
98 stars 20 forks source link

Getting started - Interface configuration and flashing firmware #7

Closed seanernestmurray closed 4 years ago

seanernestmurray commented 5 years ago

Hello!

Our laboratory recently bought the 16soundsUSB. I'm running into trouble getting the board up and running in the ODAS Studio environment. This may be pretty basic, so please excuse the inexperience.

I've followed the installation (from source) and configuration procedures for ODAS and have added the TCP sockets required for local communication with ODAS Studio (in the sounds16USB.cfg file, zipped below). I've installed ODAS Studio and it starts up without any issue, and added the following paths in ODAS control: /home/sean/odas/bin/odaslive /home/sean/odas/config/odaslive/sounds16USB.cfg

At this point I'm not sure of the next step to take in order to get ODAS Studio running with the board.

In my .cfg file, I've specified a .raw input file named "raw_16mics.raw". Is this the correct interface for the 16soundsUBS or does the choice, eg soundcard, depend on the application? I can't seem to find any info for the interface configuration in the wiki. In what cases do I need to flash firmware? There are instructions given for flashing firmware using OSX, but none for the operating system I'm currently using, Ubuntu 18.04.2 LTS.

sounds16USB.zip

UPDATE: I'm using Audacity to record audio from the board and then saving it as a .raw file to be accessed when running ODAS. Once I launch ODAS Studio the audio is registered on-screen, however I'd like to be able to write/read from a .raw file in real-time. Have you any suggestions of how to do this?

Thanks, Sean

seanernestmurray commented 5 years ago

I believe I figured out most of the issues listed above.

For real-time data, a soundcard interface may be specified in the 'raw' section of the .cfg file. This is outlined below - no firmware needs to be flashed for this.

raw:
{
    fS = 44100;
    hopSize = 512;
    nBits = 32;
    nChannels = 16;

    # Input with raw signal from microphones
    interface: {
        type = "soundcard";
        card = 2;
        device = 0;
    }
}

One small point to note is that in order to run ALSA with the board, the PC must not be registering the input as an active audio source - i.e. audio input from the board should be disabled in general settings before trying to access the audio data in ODAS. (This may be an obvious troubleshoot, but a speedbump nevertheless.)

doumdi commented 5 years ago

@seanernestmurray. Happy you got the system working. You are right, there is no need to flash the sound card firmware. The procedure you found is for flashing the firmware the first time, when people build the PCB themselves. The best way to get started is with sample configurations. Here is one with 16 inputs : https://github.com/introlab/odas/blob/master/config/odaslive/azimut_oma.cfg

For ODAS questions, It would be better to fill issues here : https://github.com/introlab/odas/issues or here : https://github.com/introlab/odas_web

Depending on your Linux configuration and if 16SoundsUSB is your only sound card in the system, it is possible that the sound card was already opened by another process. Thanks for sharing this problem with us.

Regards,

Dominic

seanernestmurray commented 5 years ago

Thanks Dominic!