Discussion:
3Dj: new Quark for Live Sound Spatialization
Andrés Pérez
2014-10-17 13:47:02 UTC
Permalink
Hello,

I'm happy to announce the release of the library 3Dj for Live Sound
Spatialization. It's already available through the Quarks.

It's a library intended to facilitate the creation of interactive works
using the sound spatial dimension. Some of its features are:
- Spatialization techniques: Ambisonics (up to 3rd order), VBAP, Binaural
- Diverse sound source shapes
- Uses the SpatDIF specification (http://spatdif.org)
- Log and playback OSC-SpatDIF files
- Complete Scene Simulator with physical model and predefined motions

In the GitHub repository
(https://github.com/andresperezlopez/rt-spatialization) you will find some
extra useful tools: python code for Ambisonics Encoding visualization, and
source code of an Android app that interacts directly with the 3Dj library.

This library is one of the research outcomes from my Master Thesis
"Real-Time 3D Audio Spatialization Tools for Interactive Performance",
developed in the Music Technology Group in collaboration with Fundació
Barcelona Media. For those intereted, the report can be found at
http://www.andresperezlopez.com/sites/default/files/Andres_Perez_Master_Thesis.pdf

It might contain still some small bugs. Please report them, I will be happy
to fix them.

As an extra, I just also released the quark "astronomy", intended for
astronomical data sonification. The examples can be used directly with the
3Dj library.

I hope these quarks will be useful for the community

Sincerely,

Andrés Pérez
www.andresperezlopez.com <http://www.andresperezlopez.com>



--
View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/3Dj-new-Quark-for-Live-Sound-Spatialization-tp7614042.html
Sent from the SuperCollider Users New (Use this!!!!) mailing list archive at Nabble.com.

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Edward Nixon
2014-10-17 15:11:37 UTC
Permalink
Hi. Thanks for this. However, there don’t appear to be any help files, of any sort, with this package. Where does one go to find, say, an example or a summary of the functionality?

Thanks again. …edN
Post by Andrés Pérez
Hello,
I'm happy to announce the release of the library 3Dj for Live Sound
Spatialization. It's already available through the Quarks.
It's a library intended to facilitate the creation of interactive works
- Spatialization techniques: Ambisonics (up to 3rd order), VBAP, Binaural
- Diverse sound source shapes
- Uses the SpatDIF specification (http://spatdif.org)
- Log and playback OSC-SpatDIF files
- Complete Scene Simulator with physical model and predefined motions
In the GitHub repository
(https://github.com/andresperezlopez/rt-spatialization) you will find some
extra useful tools: python code for Ambisonics Encoding visualization, and
source code of an Android app that interacts directly with the 3Dj library.
This library is one of the research outcomes from my Master Thesis
"Real-Time 3D Audio Spatialization Tools for Interactive Performance",
developed in the Music Technology Group in collaboration with Fundació
Barcelona Media. For those intereted, the report can be found at
http://www.andresperezlopez.com/sites/default/files/Andres_Perez_Master_Thesis.pdf
It might contain still some small bugs. Please report them, I will be happy
to fix them.
As an extra, I just also released the quark "astronomy", intended for
astronomical data sonification. The examples can be used directly with the
3Dj library.
I hope these quarks will be useful for the community
Sincerely,
Andrés Pérez
www.andresperezlopez.com <http://www.andresperezlopez.com>
--
View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/3Dj-new-Quark-for-Live-Sound-Spatialization-tp7614042.html
Sent from the SuperCollider Users New (Use this!!!!) mailing list archive at Nabble.com.
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Andrés Pérez
2014-10-17 15:47:01 UTC
Permalink
Hi Edward,

among the quark files, there is a guide called "Introducing 3Dj" that gives
a library overview.

Furthermore, the helpfiles for SpatialRender, SSWorld and Motion should give
enough examples to make it work.

You are true in the sense that the GitHub repository does not contain the
help files. I will add them as soon as possible.

I hope that's what you mean.

Greetings,

Andrés



--
View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/3Dj-new-Quark-for-Live-Sound-Spatialization-tp7614042p7614046.html
Sent from the SuperCollider Users New (Use this!!!!) mailing list archive at Nabble.com.

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Edward Nixon
2014-10-17 16:22:46 UTC
Permalink
Thank you, Andrés.

I did a search in the SC help window on “3Dj” and “astronomy” and came up empty, then I did a very perfunctory scan of some of the folders at GitHub and didn’t see any HelpSource folders so I concluded, perhaps wrongly, that there wasn’t any help.

I look forward to loading at the introducing file as well as your thesis. This code seems to be doing something I’m currently investigating so it comes at a good time for me.

…edN
Post by Andrés Pérez
Hi Edward,
among the quark files, there is a guide called "Introducing 3Dj" that gives
a library overview.
Furthermore, the helpfiles for SpatialRender, SSWorld and Motion should give
enough examples to make it work.
You are true in the sense that the GitHub repository does not contain the
help files. I will add them as soon as possible.
I hope that's what you mean.
Greetings,
Andrés
--
View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/3Dj-new-Quark-for-Live-Sound-Spatialization-tp7614042p7614046.html
Sent from the SuperCollider Users New (Use this!!!!) mailing list archive at Nabble.com.
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
christophe lengelé
2014-10-17 18:26:07 UTC
Permalink
Hi,

Thanks a lot for this Quark.

But it seems I get an issue with the SpatialRender on OSX 10.6 :
I installed, all dependancies, including Ambdec : I installed the binary from : .ambdec-0.5.1, tetraproc-0.8.2, AMB-plugins-0.8.1 for Mac OS X | matthiaskronlachner.com

I launched Jack since it seems compulsory for running Ambdec.
But I get the following error below by running : r=SpatialRender.new(s);

and by trying to evaluate : AmbDec.new("/Applications/AmbDec/presets/icosahedron-3h3v.ambdec")
I get : RESULT = 127

Have you got an idea about these errors and how to test it on OSX ?

Thanks a lot,
Christophe

booting 57110
ERROR: Primitive '_FileWrite' failed.
Failed.
RECEIVER:
Instance of File { (0x129f1a118, gc=30, fmt=00, flg=00, set=02)
instance variables [1]
fileptr : nil
}
CALL STACK:
MethodError:reportError 0x121b33658
arg this = <instance of PrimitiveFailedError>
Nil:handleError 0x12193edd8
arg this = nil
arg error = <instance of PrimitiveFailedError>
Thread:handleError 0x121c42388
arg this = <instance of Thread>
arg error = <instance of PrimitiveFailedError>
Object:throw 0x121b3c0e8
arg this = <instance of PrimitiveFailedError>
Object:primitiveFailed 0x121b02b48
arg this = <instance of File>
SpatDifLogger:writeMetaVersion 0x121b79448
arg this = <instance of SpatDifLogger>
arg version = 0.3
SpatDifLogger:init 0x120736258
arg this = <instance of SpatDifLogger>
arg fn = "TimeFileLog_141017_201039.txt"
arg path = "/Users/Xon77/Library/Applica..."
arg extensions = [*2]
arg author = nil
arg host = "SCLiss:SpatialRender"
arg date = "2014-10-17"
arg session = nil
arg location = nil
arg annotation = nil
SpatialRender:initSpatDifLogger 0x1206f0c78
arg this = <instance of SpatialRender>
arg mySpatDifLoggerPath = nil
var fileName = "TimeFileLog_141017_201039.txt"
var extensions = [*2]
var author = nil
var host = "SCLiss:SpatialRender"
var date = "2014-10-17"
var session = nil
var location = nil
var annotation = nil
SpatialRender:init 0x118f60a58
arg this = <instance of SpatialRender>
arg myServer = <instance of Server>
arg mySpatDifLoggerPath = nil
< closed FunctionDef > (no arguments or variables)
Interpreter:interpretPrintCmdLine 0x121d12b68
arg this = <instance of Interpreter>
var res = nil
var func = <instance of Function>
var code = "r=SpatialRender.new(s);"
var doc = nil
var ideClass = <instance of Meta_ScIDE>
Process:interpretPrintCmdLine 0x122fdc658
arg this = <instance of Main>
^^ The preceding error dump is for ERROR: Primitive '_FileWrite' failed.
Failed.
RECEIVER: a File
Found 0 LADSPA plugins
StartNotification name = default
Number of Devices: 9
0 : "Built-in Microphone"
1 : "Built-in Input"
2 : "Built-in Output"
3 : "Digi CoreAudio Device"
4 : "JackRouter"
5 : "Soundflower (2ch)"
6 : "Soundflower (16ch)"
7 : "Pro Tools Aggregate I/O"
8 : "Fireface 800 (263)"

"JackRouter" Input Device
Streams: 16
0 channels 1
1 channels 1
2 channels 1
3 channels 1
4 channels 1
5 channels 1
6 channels 1
7 channels 1
8 channels 1
9 channels 1
10 channels 1
11 channels 1
12 channels 1
13 channels 1
14 channels 1
15 channels 1

"JackRouter" Output Device
Streams: 16
0 channels 1
1 channels 1
2 channels 1
3 channels 1
4 channels 1
5 channels 1
6 channels 1
7 channels 1
8 channels 1
9 channels 1
10 channels 1
11 channels 1
12 channels 1
13 channels 1
14 channels 1
15 channels 1

SC_AudioDriver: sample rate = 44100.000000, driver's block size = 512
SuperCollider 3 server ready.
Receiving notification messages from server localhost
Resetting recChannels to 24
Shared memory server interface initialized
*********
binaural decoder: FoaDecoderKernel(cipic, 3, 2, 65, nil)
binaural subject ID:65
*********
binaural decoder: FoaDecoderKernel(cipic, 3, 2, 65, nil)
binaural subject ID:65
ERROR: Primitive '_FileWrite' failed.
Failed.
RECEIVER:
Instance of File { (0x129f1a118, gc=9C, fmt=00, flg=00, set=02)
instance variables [1]
fileptr : nil
}
CALL STACK:
MethodError:reportError 0x12149f148
arg this = <instance of PrimitiveFailedError>
Nil:handleError 0x1214a8bc8
arg this = nil
arg error = <instance of PrimitiveFailedError>
Thread:handleError 0x1214aaab8
arg this = <instance of Thread>
arg error = <instance of PrimitiveFailedError>
Object:throw 0x12146cf58
arg this = <instance of PrimitiveFailedError>
Object:primitiveFailed 0x12293f158
arg this = <instance of File>
SpatDifLogger:writeLine 0x12149c078
arg this = <instance of SpatDifLogger>
arg msg = [*3]
arg time = 85.74796786
< FunctionDef in Method Collection:collectAs > 0x121d85778
arg elem = <instance of Function>
arg i = 2
ArrayedCollection:do 0x121d8dbc8
arg this = [*3]
arg function = <instance of Function>
var i = 2
Collection:collectAs 0x12114e3f8
arg this = [*3]
arg function = <instance of Function>
arg class = <instance of Meta_Array>
var res = [*2]
FunctionList:value 0x122a2fa48
arg this = <instance of FunctionList>
arg args = [*4]
var res = nil
Main:recvOSCmessage 0x12114e828
arg this = <instance of Main>
arg time = 85.74796786
arg replyAddr = <instance of NetAddr>
arg recvPort = 57120
arg msg = [*3]
^^ The preceding error dump is for ERROR: Primitive '_FileWrite' failed.
Failed.
RECEIVER: a File
Kernel HRIR_W.wav, channel 0 loaded.
Kernel HRIR_W.wav, channel 1 loaded.
Kernel HRIR_X.wav, channel 0 loaded.
Kernel HRIR_X.wav, channel 1 loaded.
Kernel HRIR_Y.wav, channel 0 loaded.
Kernel HRIR_Y.wav, channel 1 loaded.
Kernel HRIR_Z.wav, channel 0 loaded.
Kernel HRIR_Z.wav, channel 1 loaded.
Kernel HRIR_W.wav, channel 0 loaded.
Kernel HRIR_W.wav, channel 1 loaded.
Kernel HRIR_X.wav, channel 0 loaded.
Kernel HRIR_X.wav, channel 1 loaded.
Kernel HRIR_Y.wav, channel 0 loaded.
Kernel HRIR_Y.wav, channel 1 loaded.
Kernel HRIR_Z.wav, channel 0 loaded.
Kernel HRIR_Z.wav, channel 1 loaded.





Le Vendredi 17 octobre 2014 18h23, Edward Nixon <ed.nixon-QtWjzqDmo1/***@public.gmane.org> a écrit :



Thank you, Andrés.

I did a search in the SC help window on “3Dj” and “astronomy” and came up empty, then I did a very perfunctory scan of some
of the folders at GitHub and didn’t see any HelpSource folders so I concluded, perhaps wrongly, that there wasn’t any help.

I look forward to loading at the introducing file as well as your thesis. This code seems to be doing something I’m currently investigating so it comes at a good time for me.


edN
Post by Andrés Pérez
Hi Edward,
among the quark files,
there is a guide called "Introducing 3Dj" that gives
Post by Andrés Pérez
a library overview.
Furthermore, the helpfiles for SpatialRender, SSWorld and Motion should give
enough examples to make it work.
You are true in the sense that the GitHub repository does not contain the
help files. I will add them as soon as possible.
I hope that's what you mean.
Greetings,
Andrés
--
View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/3Dj-new-Quark-for-Live-Sound-Spatialization-tp7614042p7614046.html
Sent from the SuperCollider Users New (Use this!!!!) mailing list archive at Nabble.com.
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Andrés Pérez
2014-10-17 20:07:10 UTC
Permalink
Hi Xon,

thanks to you for trying it.

First, Jack is not only compulsory for AmbDec, but also for getting any kind
of sound inside the spatialization system.
I would reccomend you to use it always you do something *serious* (:

About the error you get: I don't have myself here any OSX machine, but from
what you post I would say that the error is not with AmbDec, but with the
SpatDifLogger.
As a first impression I would say that you don't have permission to write in
that file (the one automatically created in
"/Users/Xon77/Library/Applica..."), but you should.
Anyway I will try to try it soon. Apologies for that.

Last thing: I would appreciate that all issues would be posted in the issues
place (https://github.com/andresperezlopez/rt-spatialization/issues).
That will make clearer this post and centralize the information.
Thanks (:

Andrés




--
View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/3Dj-new-Quark-for-Live-Sound-Spatialization-tp7614042p7614056.html
Sent from the SuperCollider Users New (Use this!!!!) mailing list archive at Nabble.com.

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
christophe lengelé
2014-10-19 17:16:40 UTC
Permalink
Hi Andrés,

Thanks for looking into this. I will be happy to test on OSX.

Concerning the write permission issue, it's strange since I've got write permission authorization in
"/Users/Xon77/Library/Application Support/SuperCollider/" (apparently the folder where it should write SpatDif data).

Anyway, by specifying the path, it's ok :
r = SpatialRender.new(s, "/Users/Xon77/Desktop/SpatDifPath/");


The binaural version seems to work on OSX, but I've got issues with ambisonics (configuration problems) and VBAP (server crash). I will report on your Github.

By the way, when typing in Terminal :
ambdec -c "/Applications/AmbDec/presets/octagon-3h0v.ambdec"

I've got :
Warning: memory lock failed.

Is that ok or do I have to change something in Jack options ?

Last Thing : Generally, Is it better to use Jack even on OSX ? Why ?

Many thanks for all your effort,
Christophe


Le Vendredi 17 octobre 2014 22h07, Andrés Pérez <anpelo6-***@public.gmane.org> a écrit :



Hi Xon,

thanks to you for trying it.

First, Jack is not only compulsory for AmbDec, but also for getting any kind
of sound inside the spatialization system.
I would reccomend you to use it always you do something *serious* (:

About the error you get: I don't have myself here any OSX machine, but from
what you post I would say that the error is not with AmbDec, but with the
SpatDifLogger.
As a first impression I would say that you don't have permission to write in
that file (the one automatically created in
"/Users/Xon77/Library/Applica..."), but you should.
Anyway I will try to try it soon. Apologies for that.

Last thing: I would appreciate that all issues would be posted in the issues
place (https://github.com/andresperezlopez/rt-spatialization/issues).
That will make clearer this post and centralize the information.
Thanks (:

Andrés




--
View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/3Dj-new-Quark-for-Live-Sound-Spatialization-tp7614042p7614056.html

Sent from the SuperCollider Users New (Use this!!!!) mailing list archive at Nabble.com.

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
Andrés Pérez
2014-10-20 21:35:42 UTC
Permalink
Hi Cristophe,

I just got an OSX 10.6 machine and tested what you reported.
Post by christophe lengelé
Concerning the write permission issue, it's strange since I've got write
permission authorization in
"/Users/Xon77/Library/Application Support/SuperCollider/" (apparently the
folder where it should write SpatDif data).
r = SpatialRender.new(s, "/Users/Xon77/Desktop/SpatDifPath/");
Yes, the mkdir command gives an error when you try to create a folder inside
SuperCollider folder. I don't know why, since it is not the system
configuration. I will add a note in the helpfile for that. Thanks.

With vbap I did not get any error. Maybe it's an issue with pluigns
implementation.

With ambDec, I did not get it to work in the machine. Anyway, what you
reported corresponds more with a specific problem of AmbDec / Jack with your
operating system.
Take into account that, in ambisonics mode, audio going out from sc is only
encoded, so you could try to use your favourite ambisonics decoder
implementation.
In the near future, with ATK supporting HOA, AmbDec will not be needed
anymore.

Finally, I must claim that one of the project aims was to provide a full
spatialization system *framework* compatible with gnu/linux, since none of
the existing fullfilled this characteristic. Osx compatibility is of course
a plus, and by using sc it is practically solved. But I cannot ensure full
compatibility with the external software that 3Dj needs, nor spend my time
developing for osx. Sorry. I would rather suggest to use gnu/linux (:

Thanks a lot for reporting and trying the library.

Sincerely,

Andrés Pérez






--
View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/3Dj-new-Quark-for-Live-Sound-Spatialization-tp7614042p7614169.html
Sent from the SuperCollider Users New (Use this!!!!) mailing list archive at Nabble.com.

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
christophe lengelé
2014-10-21 15:40:18 UTC
Permalink
Thanks Andrés for checking on OSX so quickly.
I should definitely turn to linux in order to take also advantage completely of your library and some others like supernova...
and I also look forward to seeing HOA ATK to be no longer dependent on external decoders.

Concerning Ambdec, what I reported on the terminal does not seem to be a problem.
Matthias kronlachner, who compiled the decoder for OSX, says it's normal.

If anyone, on the "dark" OSX side, knows how to deal with this decoder or any other, let me know...

Christophe


Le Lundi 20 octobre 2014 23h36, Andrés Pérez <anpelo6-***@public.gmane.org> a écrit :



Hi Cristophe,

I just got an OSX 10.6 machine and tested what you reported.
Post by christophe lengelé
Concerning the write permission issue, it's strange since I've got write
permission authorization in
"/Users/Xon77/Library/Application Support/SuperCollider/" (apparently the
folder where it should write SpatDif data).
r = SpatialRender.new(s, "/Users/Xon77/Desktop/SpatDifPath/");
Yes, the mkdir command gives an error when you try to create a folder inside
SuperCollider folder. I don't know why, since it is not the system
configuration. I will add a note in the helpfile for that. Thanks.

With vbap I did not get any error. Maybe it's an issue with pluigns
implementation.

With ambDec, I did not get it to work in the machine. Anyway, what you
reported corresponds more with a specific problem of AmbDec / Jack with your
operating system.
Take into account that, in ambisonics mode, audio going out from sc is only
encoded, so you could try to use your favourite ambisonics decoder
implementation.
In the near future, with ATK supporting HOA, AmbDec will not be needed
anymore.

Finally, I must claim that one of the project aims was to provide a full
spatialization system *framework* compatible with gnu/linux, since none of
the existing fullfilled this characteristic. Osx compatibility is of course
a plus, and by using sc it is practically solved. But I cannot ensure full
compatibility with the external software that 3Dj needs, nor spend my time
developing for osx. Sorry. I would rather suggest to use gnu/linux (:

Thanks a lot for reporting and trying the library.

Sincerely,

Andrés Pérez






--
View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/3Dj-new-Quark-for-Live-Sound-Spatialization-tp7614042p7614169.html

Sent from the SuperCollider Users New (Use this!!!!) mailing list archive at Nabble.com.

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/

Loading...