2020-06-09 17:52:45

@50
I can't get CI working for 32-bit builds because reasons and that takes hours at the best of times, I'm literally looking at probably a day to fix it, so I've decided not to fix it for now.  However in general you should probably be on the 64-bit one anyway and it will work eventually, it just doesn't work today.

My Blog
Twitter: @ajhicks1992

2020-06-10 04:15:32

how do I download the dll for this and a some sort of function listing with parameters? I wonna rap it into pure basic, then I'll give you the rapper once it's finished to include in the complete package.

2020-06-10 05:12:10

@52
You can get the latest artifacts from the CI page. Click artifacts and download the zip, you want synthizer.dll.

But two things.

First, it's probably premature to make bindings.  We're hitting usable in the sense of could technically use it, but if you give me another month or so we should hit usable in the sense of you'd want to actually make a game with it and won't be converting all your files to .wav.  I'm glad to see a lot of enthusiasm from everyone, but at the same time I don't think I've made a secret of this being relatively early development, even if things have sped up enough that I generally have something new once a week.

Second, I won't be accepting PureBasic wrappers upstream because doing so implies that I'm willing to maintain them myself should you or whoever else is involved walk away.  Even if someone else is maintaining them, being in the official repository means I'm responsible for testing/reviewing/otherwise ensuring quality, reviewing pull requests on it, etc.  Getting a binding into the official repository in general is a pretty high bar, being as I then become responsible for making sure it's always up to date.

PureBasic is incredibly niche, commercial, and I can't even get a working CI setup so basically that means I'm out $80 or whatever it is and instead of just getting an e-mail when I break it I have to remember to manually test it by hand anytime I change anything.  For anything else involved here Appveyor just sends me an e-mail "Hey your build failed" and after I put another hour or so of effort into it I'm literally going to be able to do releases by typing two commands at a terminal and having lunch (and just getting an e-mail "hey your release failed" later).  Even if I decided that PureBasic was the most important language in the history of languages, I could literally do 4 or 5 more mainstream languages with the same amount of effort it would take for me to keep up with it.  For what it's worth,  all of this also applies to BGT, though in BGT's case the real issue is that the tooling needs to have a terminal to work in CI.

I'm not saying don't do it.  I'm not saying it's valueless. I'm just being realistic about your chances of getting me to put it in camlorn/synthizer, i.e. that there are none unless I decide to lower the bar for the project, and trying to offer an explanation as to why I'm telling you no.

My Blog
Twitter: @ajhicks1992

2020-06-10 05:19:59

@52, you can wrap it then put it in your GitHub (same as what I did for voclib).
also the guy who asked that it's cross platform or not, it uses mini audio as it's backend so it is sort of cross platform, but as @camlornn said, he didn't test those.

2020-06-10 05:29:30

I'll make a rapper and host it on my site.
Thanks for the link, I can't wait to try this!
Most of my sounds are wav anyway smile
I also work on tool that allow me convert entire folder sound into wavfile with single click.

2020-06-10 05:34:30

@55
For distribution, if you convert to mp3 you can distribute at literally 10 times less the size. I converted Swamp once as an experiment and it went from around 800MB to around 80MB.

And fortunately MP3 is now patent free so we'll be supporting that this time, probably before ogg because the thing I found for ogg kinda sucks.

My Blog
Twitter: @ajhicks1992

2020-06-10 07:58:40

Hello camlord smile

so, what are the last updates of the project?

Maybebe a good idea update the first post with the last major news about the project, if something interesting was updated in the lasts weeks smile

thanks, sounds... interesting, but well. For the future maybe a interesting project create a small c# engine using this lib smile

things like directly instance and object and in background set the tables and that, aboid pointers and let the engine handle it, and these things smile

Sounds interesting smile

2020-06-10 15:10:36

@57
I'm not interested in C# for my own projects for a whole host of reasons, but once this is mature enough by all means have at it.  There's lots of languages that'd be valuable but I have to pick and choose where I spend my limited time, and so my limited time goes to things I want to use first.

I'm not going to edit the first post right now because there will be proper release notes in a few weeks at most and then everyone can just check those.

My Blog
Twitter: @ajhicks1992

2020-06-10 20:30:50

Wow, the new changes are awesome?
Is Go one of the languages you'd be willing to write bindings for eventually?
Also, could you maybe change the name SoundSource to something a bit less misleeding? It can confuse you into thinking that Sound sources, and not generators make the sound. Thanks!

2020-06-10 20:37:05

@59
I'm not going to change the nomenclature right now because it's modeled after a variety of audio tools that use something similar, though there might (eventually) be an argument to rename sources panners.  In general name bikeshedding is beside the point because people will need a manual anyway and in the process having a manual solves this problem.  But I don't believe it's confusing if you think of sources as where sound comes from--they're the source in the sense of being a speaker in the 3D environment.

I don't know if I'll write Go bindings or not.  I don't like Go at all, but there's reasons to use it even though I don't like it so it's not off the table.  So my answer for you is not soon.

And to everyone asking me to write bindings, the thing about writing bindings is that I have to update every binding to keep it in line with the library. Once I start doing this I won't be able to change/improve things rapidly and I effectively only have 5-8 hours a week to devote to Synthizer.  So if your question is "Will you write a binding for X language" and X isn't Python then the answer is not until you start seeing versions like 1.0 and compatibility guarantees, or at least some degree of maturity.

My Blog
Twitter: @ajhicks1992

2020-06-10 20:46:07

Bleh, and as much as I hate to double post on my own thread, the thing about Synthizer is that unlike Libaudioverse Synthizer can eventually be finished.  Every binding I take on stops that from happening.

I am one of maybe 4 or 5 people on here who can handle writing an audiogame-friendly physics engine, maybe 1 of 10 people on here who can handle solving networking, maybe 1 of 20 or 30 who can solve incremental updates and distribution.  I'm not special, it's just that there's not that many other skilled programmers with an interest in audiogames who are also at the point that their solutions aren't going to be hacky.  I think I'm the only one who's ever even talked about having written a good serialization solution, even though it's project specific and can't be extracted.  All of these things and more are on my project list, and the end goal is either an offline RPG or an MMMO with a lot of solving the lacking audiogames ecosystem along the way, so that even if I never get that far we'll finally have all the pieces where when someone says "What do I do for X" there's a good answer that's not explaining how to invent X from scratch because we can't use Unity or something.

My point being: bindings can be done by people who aren't me.  Synthizer and everything else I listed needs me.  In addition to the above list I am the only person on this site who understands enough math to do Synthizer's audio processing stuff.  I get 8 hours a week at most, very rarely more, usually less.  If it can be done by someone else (as all the bindings can be) I'm not prioritizing it because there's a huge list of audiogames things that only I can do.

My Blog
Twitter: @ajhicks1992

2020-06-11 03:55:31

For clarifying, when I talked about the c# Binding, I am refferring about that I can try to create a c# binding for the project, when it reach a functional state, or at most with the major apis and features declared, so will be possible work implement it.

Probably was a mistake (from me) becausse the languaje barrier; English isn't my primary languaje and well... is very obvious that ̂̂

So, I know that you aren't friend of the .net ecosystem, so you try to aboid it... completely if your life give to you that chance; and of course, I know the difficult of try to handdle a lot of wrappers in the same main project; I was talking about me to try that challenge ̂̂

And well, waiting to more news in the koming days ̂̂

About the skills of the people in this community... Well, you know here more people than me; so I can't give an opinion about that.

Various of these math things i have to deal with that on the university, but no mutch more smile

Again, thanks for the effort :3

2020-06-11 04:16:42

@62
Learning to write an HRTF implementation from scratch took learning to read LaTeX and spending months on reverse engineering basics that sighted people get just from seeing a picture.  Learning to do reverb, etc. took maybe a year or two before I could give us a practical implementation.  Learning to write efficient code took all of Libaudioverse to teach me what the mistakes were and an additional year or so after that to get to the point of being able to avoid them (Libaudioverse could be fixed but needs a couple months of full-time effort to undo mistakes and whatnot).  It's a bunch of specialized knowledge on something like 5 different things.  That said, if you've done DSP in college I'll happily accept patches, but I'm betting you haven't because that's not usually included in CS these days (I wanted to take it; it had prerequisites of a bunch of electrical engineering courses that were going to take two or 3 semesters to meet, so I didn't).

My Blog
Twitter: @ajhicks1992

2020-06-13 22:20:25

@Camlorn
Does Synthizer manually support setting the pan, pitch and volume properties?
This would be useful for example, when I want a sound to play on the far left side of the player and at full volume, like a huge distant explosion.
Also, do you think it's necessary to allow seeking through sounds, getting the current position and length of the sound? Might be nice to have, but most audio games don't need it.
I'm also getting an error when building, I'm using clang-cl as the C and CXX compiler, I downloaded it from LLVM.
cmake -G Ninja ..
...
ninja
...
[12/34] Building CXX object CMakeFiles\synthizer.dir\src\source.cpp.obj
FAILED: CMakeFiles/synthizer.dir/src/source.cpp.obj
C:\LLVM\bin\clang-cl.exe  /nologo -TP -DBUILDING_SYNTHIZER -DWDL_RESAMPLE_TYPE=float -D_ENABLE_EXTENDED_ALIGNED_STORAGE -I..\include -I..\third_party\miniaudio -I..\third_party\dr_libs -I..\third_party\stb -I..\third_party\cpp11-on-multicore\common -I..\third_party\wdl -I..\third_party\plf_colony /DWIN32 /D_WINDOWS /GR /EHsc /Zi /Ob0 /Od /RTC1 -MT   -Xclang -fno-caret-diagnostics -Wno-deprecated-declarations -Wno-logical-op-parentheses -std:c++17 /showIncludes /FoCMakeFiles\synthizer.dir\src\source.cpp.obj /FdCMakeFiles\synthizer.dir\synthizer.pdb -c ..\src\source.cpp
In file included from ..\src\source.cpp:3:
In file included from ..\include\synthizer/sources.hpp:7:
..\include\synthizer/spatialization_math.hpp(63,9): error: no member named 'sqrt' in namespace 'std'; did you mean simply 'sqrt'?
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\corecrt_math.h(485,54): note: 'sqrt' declared here

2020-06-13 22:32:59

@64
Pan (both azimuth and elevation) are exposed through a PannedSource, as is panning scalar, which is what you want for stereo panning.  Stereo panners aren't implemented yet because priorities but are trivial to do, once they are you set the scalar to 0 for all left or 1 for all right.  The scalar works for HRTF too, where it assumes you want panning between -90 and 90.

I'm writing buffers today which are fully decoded in-memory assets. You'll get lengths and seeking from those.  StreamingGenerator will probably also eventually support it, at least where the underlying stream does.

Looks like spatialization_math.hpp doesn't include <math>.  My guess is VS2019 includes <math> somewhere and it's just happening to work, but I'll add this include and merge it in when buffers are done.

My Blog
Twitter: @ajhicks1992

2020-06-13 22:37:32 (edited by keithwipf1 2020-06-13 22:39:31)

I innitially forgot to mension this, but for the Python bindings, Cython generates pickle methods for all the cdef class types, but you can turn it off by putting this at the top of each Cython file, since these classes are probably process-dependent.
#cython: auto_pickle=false
This helps unclutter the output of "dir(synthizer)" and reduces extension size by 50 KB or so.

2020-06-13 23:54:04

Interesting. Didn't realize that. It's worth doing and I'll drop it in, but do note that Synthizer isn't going to remain small because there's a lot of data tables that'll end up getting embedded for efficiency.

My Blog
Twitter: @ajhicks1992

2020-06-16 20:28:30

Could you add a sound source which captures raw sound data from a generator and writes it to disk as a WAV file?
Also, if you add a function which instantly sends the next N seconds or milliseconds of audio through all audio sources attached to the generator without actually playing anything, I could maybe use Synthizer to record a game, maybe if you added a way to get the Synthizer contexts mixer its self as a generator and attach a sound source which writes to disk.
With these changes, I could also change sounds, lower or raise their volume, maybe add other attributes ETC.
Does Miniaudio support actual recording audio from a microphone?

2020-06-16 21:09:01

@68
Most if not all of that is out of scope and a significant effort, but I may at some point add the ability to specifically record the output.  For anything interesting with the microphone you should just use miniaudio directly.  Eventually there will be a way to shove PCM data samples into a generator, but anything I might write for the microphone would just be an incredibly thin miniaudio wrapper, nothing more.

My Blog
Twitter: @ajhicks1992

2020-06-22 17:31:30

@camlorn
Please do consider either ogg or flac in terms of other formats, in particular ogg instead of mp3 (keeping #56 in mind)

Also. What is the current status for giving any sound source the audio data from a byte string instead of disk only?

If you like what I do, Feel free to check me out on GitHub, or follow me on Twitter

2020-06-22 18:26:04

Buffers are in as far as I can see, so creating sounds from in-memory should be possible, and as soon as that is a thing, you can theoretically add support for OGG and/or FLAC yourself, although I guess camlorn will at least add support for OGG "natively".

2020-06-22 18:39:44

@70, he's said ogg and flac are coming.

2020-06-22 18:40:11

Ogg is going to happen but is lower priority because the library I have for it is kind of lame and I may need to fork it.  MP3 and Flac are coming first because the libraries for them were frankly written by someone who has a much better grasp on good API design (and hopefully they won't prove to be buggy), and I can integrate them in such a fashion as to allow all the things people want without reading a few thousand lines of C and potentially forking.  The prioritization here isn't in my hands in the sense that doing it in a different order will cause there to be a long delay until there's something useful, and the main thing is to have *any* lossy format, not a specific one.  My philosophy on that is that this is for games and if you have to convert, you can write a 5 line bash script to run ffmpeg over a directory in parallel in as many minutes.

Yes, buffers are in.  I was going to hold off on talking about that in detail until there's a version on Pypi.  Unfortunately it turns out that writing synthizer properties is 10 times too slow for practical usage and the fix for it needs a custom lockfree MPSC ringbuffer, so that got bumped from last weekend and might be a little bit out.

Decoding from byte strings is easy but not priority because as with many of the other things people are asking for, it's not necessary to have a useful library.

My Blog
Twitter: @ajhicks1992

2020-06-22 19:56:31

let me clarify what I meant with reading from a byte string. I just meant some way to use in-memory (possibly from some form of encrypted pack file) audio data, that doesn't need to be first written unencrypted to the users disk.

If you like what I do, Feel free to check me out on GitHub, or follow me on Twitter

2020-06-22 20:27:44

@74
I'm aware of what you mean.  This is not near the top of my priority list.  Having a library that can be useful is near the top of my priority list.  Having the ability to read from custom byte sources isn't needed for 95% of projects and encryption can always be broken no matter what.  It's something I intend to support and I even have plans to write an archival format that features some obfuscation myself, but there are more important things by far, and I would have expected the community to learn the lesson from BGT that even when it's an entirely closed source platform in C++, people can still get the sounds out with enough effort.

My Blog
Twitter: @ajhicks1992