Ambisonics Request

View: New views
13 Messages — Rating Filter:   Alert me  

Ambisonics Request

by Art Hunkins :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Perhaps this is the right time to make the following request of developers:

Could a stereo version of one or the other bformenc/bformdecs be adapted for
the OLPC?

I'd really like to use them for projects I'm currently working on, where the
perception of sounds moving in space is especially important. (The pan
opcode is OK, but I'd like better options.)

Art Hunkins


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Csound-devel mailing list
Csound-devel@...
https://lists.sourceforge.net/lists/listinfo/csound-devel

Re: Ambisonics Request

by Fons Adriaensen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sun, Jul 20, 2008 at 07:31:14PM -0400, Art Hunkins wrote:

> Could a stereo version of one or the other bformenc/bformdecs be adapted for
> the OLPC?

What do you mean by 'stereo version of one or the other
bformenc/bformdecs' ? Maybe I'mmissing the obvious, but
to me it seems you want a square circle...

Ciao,

--
FA

Laboratorio di Acustica ed Elettroacustica
Parma, Italia

O tu, che porte, correndo si ?
E guerra e morte !




-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Csound-devel mailing list
Csound-devel@...
https://lists.sourceforge.net/lists/listinfo/csound-devel

Re: Ambisonics Request

by Art Hunkins :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Fons, John and Victor,

I'd like further feedback from you on my request. (I may be way off base in
my proposal.)

Stereo ambisonic decoding in Csound never worked correctly, though I was
quite happy with the results of Victor's "kludge": to add four outputs each
of bformenc into the inputs of a stereo decode. The sonic result of this *to
me* was superior to a simple pan. Perhaps, Fons, you are saying that this is
not true?

I'm assuming that more than stereo (quad, eight channels, etc.) would be
useless on the OLPC computer. Correct? (If not, let's just have the standard
ambisonics as part of the OLPC distribution.)

For me, I guess the basic question is: will "stereo ambisonics" be more
realistic spatially than basic pan?

Precise stereo placement, and precise movement of individual sounds in space
is important to me.

Thanks for your expert opinions -

Art Hunkins

----- Original Message -----
From: "Fons Adriaensen" <fons@...>
To: <csound-devel@...>
Sent: Monday, July 21, 2008 2:28 AM
Subject: Re: [Cs-dev] Ambisonics Request


> On Sun, Jul 20, 2008 at 07:31:14PM -0400, Art Hunkins wrote:
>
>> Could a stereo version of one or the other bformenc/bformdecs be adapted
>> for
>> the OLPC?
>
> What do you mean by 'stereo version of one or the other
> bformenc/bformdecs' ? Maybe I'mmissing the obvious, but
> to me it seems you want a square circle...
>
> Ciao,
>
> --
> FA
>
> Laboratorio di Acustica ed Elettroacustica
> Parma, Italia
>
> O tu, che porte, correndo si ?
> E guerra e morte !
>
>
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the
> world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@...
> https://lists.sourceforge.net/lists/listinfo/csound-devel 


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Csound-devel mailing list
Csound-devel@...
https://lists.sourceforge.net/lists/listinfo/csound-devel

Re: Ambisonics Request

by Fons Adriaensen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Jul 21, 2008 at 11:39:14AM -0400, Art Hunkins wrote:

> Stereo ambisonic decoding in Csound never worked correctly, though I was
> quite happy with the results of Victor's "kludge": to add four outputs each
> of bformenc into the inputs of a stereo decode.

If your source material is Ambisonic, i.e. the output of
bformenc or any other software that generates B-format,
or from an Ambisonic microphone, then the normal way to
reproduce it in stereo is to send the summed B-format
signals to a stereo decoder. That's not a 'kludge'.
It's not normally called a 'decoder' but a virtual
stereo microphone in that case, and you should have
the options to set the direction the mics point at,
their angle, and their polar pattern. There's no
need to write an opcode for this, it's easy enough
to code right into an instrument. Both L and R are
just linear combinations of the B-format signals.
So it's indeed just the same as panning, and if your
only intent is to produce a normal stereo signal
their is no reason to make the detour via Ambisonics.

OTOH, if you only want to reproduce via headphones
only there is a completely different way to handle
things, and in that case it makes sense to go via
Ambisonics. You can render Ambisonics on headphones
by converting it to binaural, which means by calculating
the signals that would be generated at the listeners
ears if he/she were listening to an Ambisonic surround
system.

This is not so simple, it involves decoding the AMB
signal and then using the HRIR 'head related impulse
responses' by convolution.

Apart from that there are techniques to make any
synthetic sound more 'natural'. They can be used
in Ambisonics, but are not 'Ambisonic' per se.

Ciao,

--
FA

Laboratorio di Acustica ed Elettroacustica
Parma, Italia

O tu, che porte, correndo si ?
E guerra e morte !




-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Csound-devel mailing list
Csound-devel@...
https://lists.sourceforge.net/lists/listinfo/csound-devel

Re: Ambisonics Request

by Victor Lazzarini :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

For ambi-to-binaural, check out Brian Carty's
UDO using his new opcode.

Victor
----- Original Message -----
From: "Fons Adriaensen" <fons@...>
To: <csound-devel@...>
Sent: Monday, July 21, 2008 4:59 PM
Subject: Re: [Cs-dev] Ambisonics Request


> On Mon, Jul 21, 2008 at 11:39:14AM -0400, Art Hunkins wrote:
>
>> Stereo ambisonic decoding in Csound never worked correctly, though I was
>> quite happy with the results of Victor's "kludge": to add four outputs
>> each
>> of bformenc into the inputs of a stereo decode.
>
> If your source material is Ambisonic, i.e. the output of
> bformenc or any other software that generates B-format,
> or from an Ambisonic microphone, then the normal way to
> reproduce it in stereo is to send the summed B-format
> signals to a stereo decoder. That's not a 'kludge'.
> It's not normally called a 'decoder' but a virtual
> stereo microphone in that case, and you should have
> the options to set the direction the mics point at,
> their angle, and their polar pattern. There's no
> need to write an opcode for this, it's easy enough
> to code right into an instrument. Both L and R are
> just linear combinations of the B-format signals.
> So it's indeed just the same as panning, and if your
> only intent is to produce a normal stereo signal
> their is no reason to make the detour via Ambisonics.
>
> OTOH, if you only want to reproduce via headphones
> only there is a completely different way to handle
> things, and in that case it makes sense to go via
> Ambisonics. You can render Ambisonics on headphones
> by converting it to binaural, which means by calculating
> the signals that would be generated at the listeners
> ears if he/she were listening to an Ambisonic surround
> system.
>
> This is not so simple, it involves decoding the AMB
> signal and then using the HRIR 'head related impulse
> responses' by convolution.
>
> Apart from that there are techniques to make any
> synthetic sound more 'natural'. They can be used
> in Ambisonics, but are not 'Ambisonic' per se.
>
> Ciao,
>
> --
> FA
>
> Laboratorio di Acustica ed Elettroacustica
> Parma, Italia
>
> O tu, che porte, correndo si ?
> E guerra e morte !
>
>
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the
> world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@...
> https://lists.sourceforge.net/lists/listinfo/csound-devel 


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Csound-devel mailing list
Csound-devel@...
https://lists.sourceforge.net/lists/listinfo/csound-devel

Re: Ambisonics Request

by Art Hunkins :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Following this discussion of "stereo ambisonics" and comparison with stereo
pan, I decided to make a simple side-by-side comparison. My .csd is below.

It consists of a 20" L-R-L-R pan, followed shortly by (as close as possible
to) the same thing in stereo ambisonics. The latter configuration is the one
Victor recommended, and is the one I use in several compositions. The panned
version uses the normal 1/4 stored cosine (8193-point table).

The sonic results are very similar. I do at least imagine that the ambisonic
example is a bit fuller and more spatial. By contrast, the stereo pan sounds
flat. What do others think?

I like the bit of added richness and openness of the ambisonic example and
would like it to be available on the XO (soon to be XOXO?) platform. Has
anyone an idea of whether anything beyond stereo would be feasible on XO?

<CsoundSynthesizer>
<CsOptions>

-odac0 -m0d  -b128 -B2048

</CsOptions>
<CsInstruments>

sr      = 44100
ksmps   = 10
nchnls  = 2

 instr 1 ; pan

aout    vco2  4615, 440, 12
kpan    linseg 0, 2, 0, 4, 1, 2, 1, 4, 0, 2, 0, 4, 1, 2, 1
a1,a2,a3,a4 pan aout, kpan, 1, 1, 1
 outs a1, a2

 endin

 instr 2 ; ambisonics (stereo, after Lazzarini)

aout    vco2  1000, 440, 12
kpan    linseg 180, 2, 180, 4, 0, 2, 0, 4, 180, 2, 180, 4, 0, 2, 0
aW,aX,aY,aZ bformenc aout, kpan, 0, 1, 1
a1,a2,a3,a4,a5,a6,a7,a8  bformdec  4, aW, aX, aY, aZ
 outs a3+a4+a5+a6, a2+a1+a8+a7

 endin

</CsInstruments>

<CsScore>

f1 0 8193 9 .25 1 0
i1 0 20
i2 22 20

e

</CsScore>
</CsoundSynthesizer>

Art Hunkins

----- Original Message -----
From: "Fons Adriaensen" <fons@...>
To: <csound-devel@...>
Sent: Monday, July 21, 2008 11:59 AM
Subject: Re: [Cs-dev] Ambisonics Request


> On Mon, Jul 21, 2008 at 11:39:14AM -0400, Art Hunkins wrote:
>
>> Stereo ambisonic decoding in Csound never worked correctly, though I was
>> quite happy with the results of Victor's "kludge": to add four outputs
>> each
>> of bformenc into the inputs of a stereo decode.
>
> If your source material is Ambisonic, i.e. the output of
> bformenc or any other software that generates B-format,
> or from an Ambisonic microphone, then the normal way to
> reproduce it in stereo is to send the summed B-format
> signals to a stereo decoder. That's not a 'kludge'.
> It's not normally called a 'decoder' but a virtual
> stereo microphone in that case, and you should have
> the options to set the direction the mics point at,
> their angle, and their polar pattern. There's no
> need to write an opcode for this, it's easy enough
> to code right into an instrument. Both L and R are
> just linear combinations of the B-format signals.
> So it's indeed just the same as panning, and if your
> only intent is to produce a normal stereo signal
> their is no reason to make the detour via Ambisonics.
>
> OTOH, if you only want to reproduce via headphones
> only there is a completely different way to handle
> things, and in that case it makes sense to go via
> Ambisonics. You can render Ambisonics on headphones
> by converting it to binaural, which means by calculating
> the signals that would be generated at the listeners
> ears if he/she were listening to an Ambisonic surround
> system.
>
> This is not so simple, it involves decoding the AMB
> signal and then using the HRIR 'head related impulse
> responses' by convolution.
>
> Apart from that there are techniques to make any
> synthetic sound more 'natural'. They can be used
> in Ambisonics, but are not 'Ambisonic' per se.
>
> Ciao,
>
> --
> FA
>
> Laboratorio di Acustica ed Elettroacustica
> Parma, Italia
>
> O tu, che porte, correndo si ?
> E guerra e morte !
>
>
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the
> world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@...
> https://lists.sourceforge.net/lists/listinfo/csound-devel 


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Csound-devel mailing list
Csound-devel@...
https://lists.sourceforge.net/lists/listinfo/csound-devel

Re: Ambisonics Request

by Fons Adriaensen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Jul 22, 2008 at 02:21:13PM -0400, Art Hunkins wrote:

> The sonic results are very similar. I do at least imagine that the ambisonic
> example is a bit fuller and more spatial. By contrast, the stereo pan sounds
> flat. What do others think?

Both ways just output your vco signal with some gains
to L and R depending on the pan position, and nothing
else.

The only difference is that the ambisonic one produces
antiphase signals at the extremes.

I don't know if this list permits attachments, if it
does you can see the result.

You can have exactly the same effect using just stereo
panning:  instead of just outputting aL, aR, use
aL - 0.2 * aR, aR - 0.2 * aR.

Some remarks:

- Trying to evaluate any panning system using
  continuous signals is somewhat questionable,
  to put it mildly.

- If you are listening using headphones, this
  test is completely invalid. You need to at
  least introduce frequency-dependent crosstalk,
  as the signals you generate do no correspond
  to the sound that would be present at the
  listener's ears for any real sound.

Ciao,

--
FA

Laboratorio di Acustica ed Elettroacustica
Parma, Italia

O tu, che porte, correndo si ?
E guerra e morte !




-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Csound-devel mailing list
Csound-devel@...
https://lists.sourceforge.net/lists/listinfo/csound-devel

Re: Ambisonics Request

by Fons Adriaensen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Jul 22, 2008 at 10:27:43PM +0200, Fons Adriaensen wrote:

> aL - 0.2 * aR, aR - 0.2 * aR.

Correction:

aL - 0.2 * aR, aR - 0.2 * aL.

--
FA

Laboratorio di Acustica ed Elettroacustica
Parma, Italia

O tu, che porte, correndo si ?
E guerra e morte !




-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Csound-devel mailing list
Csound-devel@...
https://lists.sourceforge.net/lists/listinfo/csound-devel

Re: Ambisonics Request

by Art Hunkins :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Fons,

If this is intended for me, I'm lacking something, as I don't have any code
from you. (Maybe something is still to come.)

If not, please disregard this (though I'm a bit interested!)

Art Hunkins

----- Original Message -----
From: "Fons Adriaensen" <fons@...>
To: <csound-devel@...>
Sent: Tuesday, July 22, 2008 4:36 PM
Subject: Re: [Cs-dev] Ambisonics Request


> On Tue, Jul 22, 2008 at 10:27:43PM +0200, Fons Adriaensen wrote:
>
>> aL - 0.2 * aR, aR - 0.2 * aR.
>
> Correction:
>
> aL - 0.2 * aR, aR - 0.2 * aL.
>
> --
> FA
>
> Laboratorio di Acustica ed Elettroacustica
> Parma, Italia
>
> O tu, che porte, correndo si ?
> E guerra e morte !
>
>
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the
> world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@...
> https://lists.sourceforge.net/lists/listinfo/csound-devel 


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Csound-devel mailing list
Csound-devel@...
https://lists.sourceforge.net/lists/listinfo/csound-devel

Re: Ambisonics Request

by Fons Adriaensen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Jul 22, 2008 at 07:41:33PM -0400, Art Hunkins wrote:

> If this is intended for me, I'm lacking something, as I don't have any code
> from you. (Maybe something is still to come.)

Yes, it's a correction to a message posted just five minutes
before and commenting on your stereo/ambi panning experiment.

It appeared on the list, so you should have it.

Ciao,

--
FA

Laboratorio di Acustica ed Elettroacustica
Parma, Italia

O tu, che porte, correndo si ?
E guerra e morte !




-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Csound-devel mailing list
Csound-devel@...
https://lists.sourceforge.net/lists/listinfo/csound-devel

Re: Ambisonics Request

by Fons Adriaensen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Jul 23, 2008 at 03:13:37PM -0400, Art Hunkins wrote:

> Thanks for this info, Fons. I'll use your formula for stereo pan, and stop
> thinking about ambisonics for stereo.
>
> One further question: would your same formula work, at least approximately,
> if I wanted to open the stereo field a bit more, i.e., to go from L/R pan
> values -.1 to 1.1, instead of 0 to 1? (This works well with the pan opcode,
> as well as ambisonics [198 to -18]).

That is exactly what it is doing.

--
FA

Laboratorio di Acustica ed Elettroacustica
Parma, Italia

O tu, che porte, correndo si ?
E guerra e morte !




-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Csound-devel mailing list
Csound-devel@...
https://lists.sourceforge.net/lists/listinfo/csound-devel

Re: Ambisonics Request

by Art Hunkins :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks for this info, Fons. I'll use your formula for stereo pan, and stop
thinking about ambisonics for stereo.

One further question: would your same formula work, at least approximately,
if I wanted to open the stereo field a bit more, i.e., to go from L/R pan
values -.1 to 1.1, instead of 0 to 1? (This works well with the pan opcode,
as well as ambisonics [198 to -18]).

Art Hunkins

----- Original Message -----
From: "Fons Adriaensen" <fons@...>
To: "Art Hunkins" <abhunkin@...>; "Developer discussions"
<csound-devel@...>
Sent: Wednesday, July 23, 2008 3:07 AM
Subject: Re: [Cs-dev] Ambisonics Request


> On Tue, Jul 22, 2008 at 07:41:33PM -0400, Art Hunkins wrote:
>
>> If this is intended for me, I'm lacking something, as I don't have any
>> code
>> from you. (Maybe something is still to come.)
>
> Yes, it's a correction to a message posted just five minutes
> before and commenting on your stereo/ambi panning experiment.
>
> It appeared on the list, so you should have it.
>
> Ciao,
>
> --
> FA
>
> Laboratorio di Acustica ed Elettroacustica
> Parma, Italia
>
> O tu, che porte, correndo si ?
> E guerra e morte !
>
>
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the
> world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@...
> https://lists.sourceforge.net/lists/listinfo/csound-devel 


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Csound-devel mailing list
Csound-devel@...
https://lists.sourceforge.net/lists/listinfo/csound-devel

Re: Ambisonics Request

by briancarty :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Available in new edition of Csound Journal!

http://www.csounds.com/journal/issue9/newHRTFOpcodes.html

Victor Lazzarini wrote:
For ambi-to-binaural, check out Brian Carty's
UDO using his new opcode.

Victor
LightInTheBox - Buy quality products at wholesale price