Doubts on SSR audio handling by APF/Jack

4 views
Skip to first unread message

Ivan Zucchi dos Santos

unread,
Jun 1, 2017, 9:39:01 AM6/1/17
to SoundScap...@googlegroups.com
I've been reading about SSR for some weeks and loving the possibilities of usage of its API. I'm trying to understand a bit more of the interface with APF/Jack and how the sound processing itself is done. Is Jack easily changeable for another sound server? Do you have some reading recommendation for the matter?  

Thanks and regards,

Ivan Zucchi dos Santos, undergraduate bachelor student in Computer Engineering.

Jens Ahrens

unread,
Jun 1, 2017, 11:02:09 AM6/1/17
to SoundScape Renderer
Hi Ivan,

Can you please be more specific? I'm not sure if I understand your question. (If you want to know the basics about how applications communicate with Jack, then I recommend the example clients. For example this one: https://github.com/jackaudio/jack2/blob/master/example-clients/simple_client.c )

What are you referring to with the title for your post "Doubts on SSR audio handling"?

Greets,
Jens

Matthias Geier

unread,
Jun 2, 2017, 6:10:55 AM6/2/17
to Ivan Zucchi dos Santos, SoundScape Renderer
On Thu, Jun 1, 2017 at 3:39 PM, Ivan Zucchi dos Santos wrote:
> I've been reading about SSR for some weeks and loving the possibilities of
> usage of its API. I'm trying to understand a bit more of the interface with
> APF/Jack and how the sound processing itself is done. Is Jack easily
> changeable for another sound server? Do you have some reading recommendation
> for the matter?

The SSR stand-alone application is tightly coupled with JACK. The file
playback is connected via JACK and the timing of the playback is
coordinated with the JACK transport mechanism.
It would be a lot of work to replace JACK with something else, and I
think it wouldn't be worth it.
It would most likely be less work to create a new application that
uses the SSR renderers as a library and implements from scratch
whatever audio backend is needed.

And I think this is actually what you mean by "SSR API", right?
The individual renderers of the SSR (i.e. binaural renderer, WFS
renderer, ...) can be used as a library in any C++ application.
Note that this only includes the audio processing of the renderer
itself, it does not include the GUI, network interface, loading/saving
of scenes, playing files, support for head trackers, ...

Two examples for using the SSR as a C++ library are available as part
of the SSR source code: A MEX file for Octave/Matlab and an External
for Puredata:

https://github.com/SoundScapeRenderer/ssr/tree/master/mex
https://github.com/SoundScapeRenderer/ssr/tree/master/flext

The Puredata External is written using the flext library
(https://grrrr.org/research/software/flext/). Therefore, it would be
theoretically possible to compile the SSR renderers also for Max/MSP,
but I've not yet managed to do that.

The individual SSR renderers are available as separate source files,
e.g. the binaural renderer is located in
https://github.com/SoundScapeRenderer/ssr/blob/master/src/binauralrenderer.h.

In order to understand how the API of those renderers work and how
different audio backends can be used, it's probably best to look a the
APF examples:

https://github.com/SoundScapeRenderer/ssr/tree/master/apf/examples

You should have a look at simpleprocessor.h, which defines an
apf::MimoProcessor subclass similar to the SSR renderers (but hugely
simpler, it just adds up all input channel and provides the result at
all output channels).

Then there are the files *_simpleprocessor.cpp, which are applications
that use this simple "renderer" with different audio backends.

Theoretically, you should be able to replace the SimpleProcessor class
with one of the SSR renderers, and it should still work.

The SSR renderers have some additional member functions you will need
to create and manipulate sources (e.g. add_source(), get_source()). To
learn about those, have a look at the renderer base class at
https://github.com/SoundScapeRenderer/ssr/blob/master/src/rendererbase.h.

For the usage of those member functions, you can again have a look at
the Puredata example:
https://github.com/SoundScapeRenderer/ssr/blob/master/flext/ssr_flext.h
Just look for the "_engine" variable, which holds the actual renderer object.

For example, to change the position of a source, something like this is used:

auto* source = _engine.get_source(src_id);
source->position = Position(x, y);

Finally, you should also have a look at this blog post, which explains
some of the concepts of APF and SSR:
http://people.bath.ac.uk/djf32/ssr.html

I hope this gives you some "entry points" into the SSR code base.
If you have further questions, don't hesitate to ask!

cheers,
Matthias

Ivan Zucchi dos Santos

unread,
Jun 2, 2017, 9:35:56 AM6/2/17
to SoundScape Renderer, zucc...@gmail.com
You got exactly my point, even though my question was very confusing... 

Thank you so much for your response, it clarified me some doubts I had. 

I'll go through the recommended readings.

Regards,

Ivan Z. 

Ivan Zucchi dos Santos

unread,
Jun 2, 2017, 9:43:15 AM6/2/17
to SoundScape Renderer
Yeah, I couldn't explain myself and got a bit confused, the question I did was very vague... 

I'll try to implement another audio backend to use SSR binaural renderer but I'm a bit lost in audio processing. 

Matthias gave me some tips that I'll be following up.

Thanks for your response!

Regards,
Ivan Z.
Reply all
Reply to author
Forward
0 new messages