Csound Csound-dev Csound-tekno Search About

[Csnd] Problems with VBAP

Date2025-06-24 08:32
FromPhilipp Neumann <0000119f78f3a4f9-dmarc-request@LISTSERV.HEANET.IE>
Subject[Csnd] Problems with VBAP
Hello everybody,
I'm on Csound 6.18 and need to stay on this version because of a project involving a Bela board.

I have a few problems with VBAP and a 3-dimensional system. I initialize the VBAP system with 'vbaplsinit' as a 3D system with 16 speakers. Then I use the 'vbap' opcode to spatialize a signal, but VBAP always creates audio arrays of the wrong size.
In this example i get an array of the size 13 but it should be of size 16.

Am I doing something wrong here?

This is a minimal example:



-d -o dac



sr = 48000
ksmps = 16
nchnls = 16
0dbfs = 1.0

vbaplsinit 3, 16, 0,0,1,0,2,0,3,0, 1,0,1,1,1,2,1,3, 2,0,2,1,2,2,2,3, 3,0,3,1,3,2,3,3

instr 1
	aSig noise 0.5, 0.5
	aSigs[] vbap aSig, 0, 0
	print lenarray(aSigs)
endin



i1 0 1



Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2025-06-24 09:19
Fromvlz
SubjectRe: [Csnd] Problems with VBAP
Did you try using the multiple output version?

> On 24 Jun 2025, at 08:32, Philipp Neumann <0000119f78f3a4f9-dmarc-request@LISTSERV.HEANET.IE> wrote:
> 
> Hello everybody,
> I'm on Csound 6.18 and need to stay on this version because of a project involving a Bela board.
> 
> I have a few problems with VBAP and a 3-dimensional system. I initialize the VBAP system with 'vbaplsinit' as a 3D system with 16 speakers. Then I use the 'vbap' opcode to spatialize a signal, but VBAP always creates audio arrays of the wrong size.
> In this example i get an array of the size 13 but it should be of size 16.
> 
> Am I doing something wrong here?
> 
> This is a minimal example:
> 
> 
> 
> -d -o dac
> 
> 
> 
> sr = 48000
> ksmps = 16
> nchnls = 16
> 0dbfs = 1.0
> 
> vbaplsinit 3, 16, 0,0,1,0,2,0,3,0, 1,0,1,1,1,2,1,3, 2,0,2,1,2,2,2,3, 3,0,3,1,3,2,3,3
> 
> instr 1
> aSig noise 0.5, 0.5
> aSigs[] vbap aSig, 0, 0
> print lenarray(aSigs)
> endin
> 
> 
> 
> i1 0 1
> 
> 
> 
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2025-06-24 09:31
FromPhilipp Neumann <0000119f78f3a4f9-dmarc-request@LISTSERV.HEANET.IE>
SubjectRe: [Csnd] Problems with VBAP
suprisingly, the multiple output version works. since i need to do some array arithmetics (array addition for signal summing), this is very inconvenient. is there a workaround for this? 

> Am 24.06.2025 um 10:19 schrieb vlz :
> 
> Did you try using the multiple output version?
> 
>> On 24 Jun 2025, at 08:32, Philipp Neumann <0000119f78f3a4f9-dmarc-request@LISTSERV.HEANET.IE> wrote:
>> 
>> Hello everybody,
>> I'm on Csound 6.18 and need to stay on this version because of a project involving a Bela board.
>> 
>> I have a few problems with VBAP and a 3-dimensional system. I initialize the VBAP system with 'vbaplsinit' as a 3D system with 16 speakers. Then I use the 'vbap' opcode to spatialize a signal, but VBAP always creates audio arrays of the wrong size.
>> In this example i get an array of the size 13 but it should be of size 16.
>> 
>> Am I doing something wrong here?
>> 
>> This is a minimal example:
>> 
>> 
>> 
>> -d -o dac
>> 
>> 
>> 
>> sr = 48000
>> ksmps = 16
>> nchnls = 16
>> 0dbfs = 1.0
>> 
>> vbaplsinit 3, 16, 0,0,1,0,2,0,3,0, 1,0,1,1,1,2,1,3, 2,0,2,1,2,2,2,3, 3,0,3,1,3,2,3,3
>> 
>> instr 1
>> aSig noise 0.5, 0.5
>> aSigs[] vbap aSig, 0, 0
>> print lenarray(aSigs)
>> endin
>> 
>> 
>> 
>> i1 0 1
>> 
>> 
>> 
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>       https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
> 
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
> 

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2025-06-24 10:07
FromVictor Lazzarini <000010b17ddd988e-dmarc-request@LISTSERV.HEANET.IE>
SubjectRe: [Csnd] [EXTERNAL] [Csnd] Problems with VBAP
I had a look at the code, on Csound 7 with your original code I get 22 outputs. The code does not seem to
match the manual well. It appears that in 3 dimensions, 16 directions give more outputs. I don’t really
know the code well to understand where the problem is (documentation or code).

I can’t say much about 6.18 since we are not developing it anymore.


> On 24 Jun 2025, at 09:31, Philipp Neumann <0000119f78f3a4f9-dmarc-request@LISTSERV.HEANET.IE> wrote:
>
> *Warning*
>
> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>
> suprisingly, the multiple output version works. since i need to do some array arithmetics (array addition for signal summing), this is very inconvenient. is there a workaround for this?
>
>> Am 24.06.2025 um 10:19 schrieb vlz :
>>
>> Did you try using the multiple output version?
>>
>>> On 24 Jun 2025, at 08:32, Philipp Neumann <0000119f78f3a4f9-dmarc-request@LISTSERV.HEANET.IE> wrote:
>>>
>>> Hello everybody,
>>> I'm on Csound 6.18 and need to stay on this version because of a project involving a Bela board.
>>>
>>> I have a few problems with VBAP and a 3-dimensional system. I initialize the VBAP system with 'vbaplsinit' as a 3D system with 16 speakers. Then I use the 'vbap' opcode to spatialize a signal, but VBAP always creates audio arrays of the wrong size.
>>> In this example i get an array of the size 13 but it should be of size 16.
>>>
>>> Am I doing something wrong here?
>>>
>>> This is a minimal example:
>>>
>>> 
>>> 
>>> -d -o dac
>>> 
>>> 
>>>
>>> sr = 48000
>>> ksmps = 16
>>> nchnls = 16
>>> 0dbfs = 1.0
>>>
>>> vbaplsinit 3, 16, 0,0,1,0,2,0,3,0, 1,0,1,1,1,2,1,3, 2,0,2,1,2,2,2,3, 3,0,3,1,3,2,3,3
>>>
>>> instr 1
>>> aSig noise 0.5, 0.5
>>> aSigs[] vbap aSig, 0, 0
>>> print lenarray(aSigs)
>>> endin
>>>
>>> 
>>> 
>>> i1 0 1
>>> 
>>> 
>>>
>>> Csound mailing list
>>> Csound@listserv.heanet.ie
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>      https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>>
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>       https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>>
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here


Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here