videolabs / libspatialaudio

Ambisonic encoding / decoding and binauralization library in C++
Other
192 stars 37 forks source link

Encoding Multiple Sound Sources #16

Open mhuzai opened 4 years ago

mhuzai commented 4 years ago

AmbisonicEncoder's process() function only encodes a mono-signal. If we wanted to encode several different sound sources, how would we go about doing that?

Thanks!

jbkempf commented 4 years ago

You mean multiple channels or multiple sources with multiple channels?

mhuzai commented 4 years ago

Both, actually. And also just multiple single-channel sources. For the last one, I presume we just encode them one by one and sum the fields?

magwyz commented 4 years ago

For the last one, I presume we just encode them one by one and sum the fields?

Yes, I think this is the way to go.

Regarding sources with multiple channels, I would split them and process each channel as a single mono input.

mhuzai commented 4 years ago

I see. But once the channels have been split apart, what position would we use for each of them? I'm assuming they would all have the same position?

Another question: If I wanted to convert a song, say from YouTube, into HOA, rotate the soundfield, and then play it back, could I do it using the above process -- get song, split stereo channels, encode separately, rotate, binauralize?