-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add ambisonic subtypes #72
Conversation
Thank you for taking the time to open a pull request. This change looks good to me, I assume the magic values are correct, but I wonder, what is the meaning of these formats, do they have a meaning that needs special treatment? For example, there are also subtypes for A-law and μ-law samples, but if we’d just map those to I found https://www.ambisonic.net/mulchaud.html but it doesn’t mention the specific constants you added. From Wikipedia, it seems the meaning of the samples is different from linear PCM? |
magics can also be found and verified in libsndfile https://github.com/libsndfile/libsndfile/blob/c81375f070f3c6764969a738eacded64f53a076e/src/wav.c#L121-L127 ambisonic file is spherical harmonics. each channel (4) is one of the 4 values in a Bformat sample, w, x, y, z. my understanding is |
Hmm, so what I am slightly worried about is that people will load up a file like that in a program that doesn’t know Ambisonic exists, but it succeeds because the sample format is the same, and then at best they hear garbage but at worst they destroy their speakers. I’m not too worried about it because this format seems quite arcane, and especially if the convention is to have a different extension, I think it could be okay. I would like to handle that better in a future API, at the very least expose a way to check what the sample format is, but right now I don’t see an easy way to do that without invasive or ad-hoc changes, so I’m going to accept it as-is. |
I do have one request — are you able to share such a file that you encountered in the wild (preferably with the audio data truncated to fewer than 32 samples to avoid copyright problems), to add as a test case? |
Hello, thank you for merge. I understand your concern. however, if user loads the file, they will see 4 channels. what they do with that is up to them, like any other use of wav loader. in audacity for example, loading a wav file with this guid set does nothing, it just loads it up like a 4 channel wav file. i can press play and it will play it, and it will sound a little strange (4 channels mux to stereo), but it cannot damage anything. well let us say it cannot damage anything just as much as any other regular wav file could damage something (always lower volume first before playing new source, no matter what). and funny enough if i save this file, it will strip out that guid. it is how i "fixed" files to use with your library before this PR :) i got tired of this manual process, so i sent you this. For files, you can listen and browse to heart content here: https://www.ambisonia.com/ it has many free and free to use samples. if you find a file you like, free of copyright concern, send me link and i will create test case for you, if you instruct me how, thank you. and thank you again for library. might i also suggest in the future a update to later cargo editions (fix all warnings, deprecations, etc.), and a rustfmt run? |
Any file is fine, if the data is truncated they should be very similar anyway. Another reason for truncating aside from sidestepping copyright issues is to keep the repository small and tests fast, the important part is being able to parse the header. How to construct an example ... it depends a bit, is there a tool that generates/exports these files? That would be the best, because then we can test that Hound is compatible with a file that is written by real-world tools. If you don’t have access to such software, then we can take one of the example files that are available on https://www.ambisonia.com/, identify the start of the
Yes, I know ... I’ve been planning to do a more invasive overhaul of the entire crate, because the current design (reading everything up to the start of the data when you construct a reader) is not suitable for some use cases, and I’m not happy with the current state of the |
hello, clicking on random files this is CC, share alike: https://www.ambisonia.com/Members/pwhodges/ambisonicfile.2007-07-20.4196055721/ is it possible to have minor patch release with ambisonic guid? |
No description provided.