2021-02-22 00:10:25

Sorry, I haven't been keeping up to date with all the git history. Do we have support for more lossy formats like ogg vorbis/opus?

----------
An anomaly in the matrix. An error in existence. A being who cannot get inside the goddamn box! A.K.A. Me.
Beyond the Surface EP out now!
http://li.sten.to/h9lOKlu

2021-02-22 00:25:02

No. No ogg. Ogg won't happen for a long time, if ever.  If you need it and aren't willing to convert, use something else.

My Blog
Twitter: @camlorn38

2021-02-23 06:00:15

@camlorn, Can i use this in C++? Do i have to do something for it to work?

Catch me on Discord: Leos#1428
A discord server where we talk about Misty World click here!

Thumbs up

2021-02-23 07:29:10

Synthesizer exposes a C API. I would recommend reading the documentation.

2021-02-23 16:53:08

Yeah, read the manual.  It exposes a C API.  If you don't know how to use C APIs from C++, though, you should probably either come back once you've learned a lot more C++ or use a different language.

But seriously yes, will everyone please start reading the manual before asking something?  I don't mean just one section of it either.  I put a lot of time into it for a reason.

My Blog
Twitter: @camlorn38

2021-03-20 15:06:11

Question. I'm using python and cannot seem to set a generator's gain before adding it to a source. Is this intentional? Am I doing something wrong? When I try and change the property, the generator seems to maintain it's default gain until it's added to a source/starts playing. Then it updates to it's new gain after an extremely small (but kind of noticeable) period where the sound is playing at the default volume. Has this been seen before? Is this avoidable?

Trying to free my mind before the end of the world.

Thumbs up

2021-03-20 16:18:59

If it's been seen before, no one reported it to me.  It is avoidable.  I'll fix it today.

My Blog
Twitter: @camlorn38

2021-03-20 16:56:33

Ok, so actually probably not today.  But I'll make sure this is in the next release.

My Blog
Twitter: @camlorn38

2021-03-20 17:50:00 (edited by bhanuponguru 2021-03-20 17:51:07)

hey camlorn.
so, i wana test if i can build synthizer my self. i cloned latest repo and i am getting an error when i am trying to build

D:\downloads\compressed\synthizer\bindings\python>set BUILDING_SYNTHIZER=1

D:\downloads\compressed\synthizer\bindings\python>python setup.py build_ext --inplace
Building Synthizer from repository. Adding additional directories.
Repository root is D:\downloads\compressed\synthizer
Using build dir D:\downloads\compressed\synthizer\build and library synthizer
running build_ext
building 'synthizer' extension
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -ID:\downloads\compressed\synthizer\include -IC:\Users\bhanu\AppData\Local\Programs\Python\Python37-32\include -IC:\Users\bhanu\AppData\Local\Programs\Python\Python37-32\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" /EHsc /Tpsynthizer/synthizer.cpp /Fobuild\temp.win32-3.7\Release\synthizer/synthizer.obj
synthizer.cpp
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\bin\HostX86\x86\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:D:\downloads\compressed\synthizer\build /LIBPATH:C:\Users\bhanu\AppData\Local\Programs\Python\Python37-32\libs /LIBPATH:C:\Users\bhanu\AppData\Local\Programs\Python\Python37-32\PCbuild\win32 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\lib\x86" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\ucrt\x86" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x86" synthizer.lib /EXPORT:PyInit_synthizer build\temp.win32-3.7\Release\synthizer/synthizer.obj /OUT:build\lib.win32-3.7\synthizer.cp37-win32.pyd /IMPLIB:build\temp.win32-3.7\Release\synthizer\synthizer.cp37-win32.lib
LINK : fatal error LNK1181: cannot open input file 'synthizer.lib'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.28.29910\\bin\\HostX86\\x86\\link.exe' failed with exit status 1181

i don't think it's a compiler problem because it works if i build any c++ module with it.
how do i fix this?

if you like this post, please thum it up!
if you like to see my projects, feel free to check out my github
if you want to contact me, you can do here by skype. or you can follow me on twitter: @bhanuponguru
discord: bhanu#7882

Thumbs up

2021-03-20 18:11:14

If you want to do that rather than letting the Python bindings download it for you, you need to also build the regular library first.  See the readme for those instructions.

My Blog
Twitter: @camlorn38

2021-03-21 08:36:02

@camlorn. thanks. i will checkout. i don't mean to not donwload python bindings on pypi.  i am learning sython so i thought why not compile synthizer my self? so i did that.

if you like this post, please thum it up!
if you like to see my projects, feel free to check out my github
if you want to contact me, you can do here by skype. or you can follow me on twitter: @bhanuponguru
discord: bhanu#7882

Thumbs up

2021-03-21 12:31:44

Well, compiling Synthizer isn't exactly Python-related, and its not one of the projects that is easy to compile either. I'd recommend staying away from that unless you already have experience with C/C++ compiling, or want to gain some knowledge in that business.

Thumbs up

2021-03-21 18:58:15

I mean, as far as C/C++ projects go on Windows it's actually really easy.  You only need CMake, MSVC, and like 3 commands.  There's no dependencies or anything, at least for now, though the days of boost may soon be upon us whether I want them to be or not.  The only problem here is that if you set that environment variable Python is going to look for the C library in a specific place and it's only there if you type those 3 extra commands, which are available in the readme.  On Linux you probably already have the tools to do it too.

But it's not going to teach anything relevant to Cython so why bother?

My Blog
Twitter: @camlorn38

2021-03-22 02:06:22

I give you Synthizer 0.8.17, which is the release with filters (e.g. you can simulate occlusion with lowpasses on your sources, etc).  This also adds support for Ubuntu 18 via a gcc workaround: they turned out to be much worse than I realized at supporting C++17 library features.

@406
This should fix your gain problem, as well as a bunch of other cases like that.  Let me know if it doesn't.

There might still be some other cases where you can get weird results if you set a property before using a generator or whatever else.  If you find some, please open issues against the repo.  I'm trying not to use audiogames.net as the issue tracker.

@philip_bennefall
If you're still monitoring this thread, do you have info on the coordinate systems used by the Cipic people in an accessible format?  Their documentation PDFs are inaccessible.  I might try to run their data through my scripts and see what happens and I can probably work it out on my own with some frustration, but if you already know exactly how those matrix files are laid out it would be useful (if you used the wav database, that's also useful, but it's worth noting that I think the wav database is incomplete and that you have to go to the matlab files for all the data).

My Blog
Twitter: @camlorn38

2021-03-22 07:21:02

Great work mate!

Just tried filters, and they definitely work as advertised.

Is this API likely to change? I'm thinking not, but you mentioned that the filter property may become readable, so I thought I'd ask.

Take care,
Chris Norman
Selling my soul to andertons.co.uk since 2012.

2021-03-22 09:44:03

@camlorn:
I used the Matlab version, but I only extracted the special KEMAR dataset found here:

https://ucdavis.box.com/s/xl1xen67d3kq0 … b21emp9lf3


There are a few readme files in the tarball. Here's a description for the format of the horizontal dataset:


The files large_pinna_final.mat and small_pinna_final.mat contain horizontal-plane
KEMAR HRIR data for the standard large and small pinnae, respectively.


The source was moved in the horizontal plane clockwise around the head.
The vertical-polar azimuth goes from 0 deg in steps of 5 deg to 355 deg, i.e.,
0, 5, 10, ... , 355.
       
The data is stored in a two arrays of size 200 x 72,
"left" for the left ear and "right" for the right ear.


End of description.


Note that these impulses have similar undesirable frequency coloration as the MIT dataset. I came up with an EQ profile that I ran on the data after extracting it. I believe you wrote your own script for this, but if you want my settings I am happy to share them.


Hope this helps!


Kind regards,


Philip Bennefall

2021-03-22 16:36:03

Hy there!
I am trying to install the android ndk on my linux machine, I'm attempting to compile synthizer for android.
Is it supported to do so? Should I attempt to do it? If I manage to do it, can I just submit a pool request with the android target added to the makefile? How would I specify the ndk path to the makefile? I suppose I could request an environment variable be set for the ndk path, if not a sane default could be used, like /opt/android-sdk/ndk-bundle.

Thumbs up

2021-03-22 17:03:55

@415
From your perspective no.  The reason it's not readable is because the C-side struct exposes internal details for the sake of expediency.  As long as people don't poke around inside it their code shouldn't break when this updates.  You're in Python, so you literally can't.

From Python, most remaining API breakages will be minor one line changes here and there.  It's C people and bindings devs who are going to hate on 0.9 (though even there it's not much to hate on, just enough to be annoying).

@416
Yeah, that one is accessible enough.  All the rest aren't.  They say:

To obtain uniform angular increments in these two planes, these data sets
use a different data format than our standard data.  The coordinates and
special data formats are described in the read_me files for each data set.

I may start with that one just for the sake of having a really complete Kemar dataset, but it would be nice to know what the others are laid out as.  I'm going to guess that it's the same but with different resolutions or something.  Probably time to see if I can OCR that PDF, or run it by someone with eyes.

I ported the MIT matlab scripts to Python with modifications.  But I would be curious to see your settings because they'll be informative about the features themselves.  My processing doesn't conveniently say "I am removing an artifact at 10000 hz" or whatever.

When they say the elevation angle goes from 0 to 355, is 0 straight down or straight in front, do you know?  I would imagine straight in front but maybe not.

My Blog
Twitter: @camlorn38

2021-03-22 17:07:43

@417
I wouldn't bother with a PR because I'm going to need to investigate a whole lot about Android before I can competently review it, and I don't have the bandwidth.  It may or may not work.  I honestly have no idea.  I think something I pushed yesterday probably breaks CMake for cross-compilation.  In principle if Miniaudio supports Android and the Android NDK supports the C++17 standard library, nothing else in there should break.

Beyond that I really can't help you with this.  Phones are one of those distant future nice to have features that I'm not planning to do anytime soon and the only thing I know about Android NDK is that I have coworkers who have to deal with it all the time and it always turns into a big thing.

My Blog
Twitter: @camlorn38

2021-03-22 17:42:28

@419: For what it's worth, Miniaudio does claim to support Android, as well as iOS. Audio libraries for phones are... Interesting, though. A lot of people don't even use headphones, as it gets harder to do with good ones anyways with the removal of the headphone jack, but also in certain cases it might take resources certain phones simply don't have to spare.

2021-03-23 01:27:22 (edited by philip_bennefall 2021-03-23 01:28:39)

@camlorn:
Regarding the elevation angle, I'm not sure. I think it's in front, but don't quote me on that.


For my part I really only wanted the Kemar dataset, and I didn't bother with all the other subjects. However, one idea might be to look at the code for the data viewing program that comes with the complete dataset. Perhaps that would give some pointers even if you don't manage to read the PDF.


Here are my settings. They were obtained by listening tests only, and are not 100% correct but close enough to my ears.


I used the Parametric EQ in Sony Sound Forge Pro 11.0.
I ran it four times in cascade. For the first three steps, the output gain was 0 dB, the filter type was "Band Knotch/Boost", and the accuracy was "High (Slow)".
Step 1: Amount 11 dB, center frequency 110 HZ, bandwidth 1.0 octaves.
Step 2: Amount -7 dB, center frequency 3500 HZ, bandwidth 1.2 octaves.
Step 3: Amount 4 dB, center frequency 600 HZ, bandwidth 2.5 octaves.
For the fourth step, the output gain was 0 dB, the filter type was "low frequency shelf", and the accuracy was "High (Slow)".
Step 4: Amount 6 dB, cutoff frequency 100 HZ, bandwidth 1.0 octaves.


Kind regards,


Philip Bennefall

2021-03-23 02:54:50

@420
In practice I expect Synthizer to run on mid-range phones no problem.  I don't have a benchmark proving this is the case, but if it's not the case it will get fixed.  It should be good on e.g. a Pi for example, any modern iPhone.

Remember: we had Papa Sangre 11 years ago, at least according to the database (I thought it was more like 2013-2014).  That's probably before your time, and it's no longer available, but was high quality HRTF on an iPhone.
@421
Thanks.  That's actually a very interesting set of settings.  Gives me food for thought.

My Blog
Twitter: @camlorn38

2021-04-05 09:57:27

@camlorn
I'm experimenting with getting Synthizer bindings working with Dart. So far I've used ffigen to generate the bindings, but now I'm trying to verify them.

Reading through your other code, it seems I have to call syz_initialize, which I can do with no worries. My problem comes when creating a context. I see that the initializer (or whatever C++ calls it) needs a pointer, but none of your code seems to create one beyond doing:

syz_Handle ctx

What do I need to google for to find the Dart FFI equivalent of this please?

Thanks in advance.

Take care,
Chris Norman
Selling my soul to andertons.co.uk since 2012.

2021-04-05 17:49:35

@423
I have no idea whatsoever.  It's a very typical C thing, one of those not named language "features" that's just a combination of what the language always offers.  The closest might be out pointer or out parameter.  You may just need to go find all the documentation on pointers and read it.  I'm not "creating a pointer", I'm taking the address of a variable on the stack, if that's helpful (notice the & in all the calls, that's the address of operator).

Dart definitely does it though.  Even BGT's FFI supports this.

My Blog
Twitter: @camlorn38

2021-04-05 22:14:11

@424
Just for reference, I had to create a pointer with calloc, from the ffi package. This is not the same as the dart:ffi library, somewhat confusingly IMHO.

Anyways, that took an absurdly long time to figure out, but I reckon I can make the whole of Synthizer work some time in the next week or so.

Camlorn, mind if I upload dart_synthizer to the Dart package manager? I plan to use the same version number as Synthizer.

Take care,
Chris Norman
Selling my soul to andertons.co.uk since 2012.