master_rplayd

master_rplayd

RPLAYD

rplayd is a network audio system that allows sounds to be played to and from local and remote Unix systems. The original source code were located on sourceforge but today it is no longer accessible there. Here we provide access to a patched version that uses portaudio for audio io and therefore supports linux and MacOS systems. Moreover this patch gives access to a number of player implementations for matlab, python and the unix command line. Configuration is done via the cross platform configuration system cmake.

You will need:

  • cmake
  • make

Moreover master_rplayd uses local copies of libsndfile and portaudio both patched to alow configuation with cmake ( originals are libsndfile and portaudio) as well as the STtools), a collection of sound tools developed by the AS team, (on ircam's forge.

To configure the build, create a build directory, cd to it, then run:

    cmake <path to root source directory>

You may need to configure the build. There are several parameters that can be set. The important ones are shown below. These parameters are all optional. Replace the contents of the angled brackets (<>) with the desired options. Do NOT include the angled brackets in the command.

To configure the build with options, run:

    cmake   -DPYTHON:PATH=
            -DMEX:PATH=
            -DCMAKE_OSX_ARCHITECTURES=
            -DCMAKE_INSTALL_PREFIX:PATH=
            -DRPLAY_TARGET=
            <path to root source directory>

For a build folder placed inside the root source directory, the command may look like this (formatted to fit onscreen. You should use spaces instead of newlines):

    cmake   -DPYTHON:PATH=/u/formes/share/packages/macports/bin/python2.7
            -DMEX=/Applications/MATLAB/bin/mex
            -DCMAKE_OSX_ARCHITECTURES=x86_64
            -DCMAKE_INSTALL_PREFIX:PATH=~/Desktop/rplayd_install
            -DRPLAY_TARGET=pa
            ..

If you do not supply the optional parameters, default values will be used instead.

The default values are:

PYTHON                      whichever python is in your PATH
MEX                         whichever mex is in your PATH (if you have a
                            TeX distribution installed, this may default to
                            the TeX mex and not the Matlab mex)
CMAKE_OSX_ARCHITECTURES     x86_64 on 64 bit macs, i386 on 32 bit
CMAKE_INSTALL_PREFIX        /u/formes/share
RPLAY_TARGET                pa

To build, run:

    make

To clean, run:

    make clean

To create the matlab module, run:

    make matlab

A matlab mexfile will be created in the matlab directory of the source tree. You will need to move this mexfile to the correct location for your system.

To install the python module, run one of:

    make install_python_module_locally
    make install_python_module_globally

Or if you'd rather just build the python module (without installing), run:

    make build_python_module

This will generate a .so file in the python subfolder of the build tree. You can move this file wherever you'd like, and import it just like a normal python file.

If you install the python module, or build it and put the .so in a location that's visible to the python executable, you should be able to:

>>>    from AS_sound import sound
>>>    import numpy
>>>    sound (<numpy matrix or array>, <sample rate / Hz>, <remote host>)

NOTE: on Linux, the python module is dynamically linked against the rplay library, so you need to make sure that you run 'make install' before trying to use the python module. If the python module still doesn't load after installing the libraries, you may need to add the library install location (usually /lib/) to your environment, with

export LD_LIBRARY_PATH=/lib/:${LD_LIBRARY_PATH}
or
setenv LD_LIBRARY_PATH /lib/:${LD_LIBRARY_PATH}

Development Team
Admins
Axel Roebel
Frederic Cornu
Happy Crew
Reuben Thomas

Powered by InDefero,
a CĂ©ondo Ltd initiative.