|
From: Kolja K. <ko...@fr...> - 2021-11-08 19:15:01
|
Hello all, while working on the next release of gigcreator (which, as a sidenote, will support all available dimensions) , I just learned that libgig already supports 32 bit samples. I'm able to create gig-files with those kind of samples (Ivy-Piano) alright, but linuxsampler won't load them. So my question is: Are there any plans to make linuxsampler support 32 bit samples? Cheers, Kolja |
|
From: Christian S. <sch...@li...> - 2021-11-08 20:24:11
|
On Montag, 8. November 2021 20:16:13 CET Kolja Koch wrote: > Hello all, Hi, > while working on the next release of gigcreator (which, as a sidenote, > will support all available dimensions) , I just learned that libgig > already supports 32 bit samples. I'm able to create gig-files with > those kind of samples (Ivy-Piano) alright, but linuxsampler won't load > them. Actually libgig only supports samples up to 24 bit: http://svn.linuxsampler.org/cgi-bin/viewvc.cgi/libgig/trunk/src/gig.cpp?revision=3979&view=markup#l467 The disk streaming Read() method is currently quite ignorant and only knows about 16 bit or 24 bit: http://svn.linuxsampler.org/cgi-bin/viewvc.cgi/libgig/trunk/src/gig.cpp?revision=3979&view=markup#l1118 > So my question is: Are there any plans to make linuxsampler support 32 > bit samples? It is actually the other way around: the sampler already uses 32 bit internally for many years. So it is more the file format loading libs like libgig for .gig files or libsndfile for SFZ that would need to be extended. CU Christian |
|
From: Kolja K. <ko...@fr...> - 2021-11-08 21:44:43
|
> Actually libgig only supports samples up to 24 bit: > http://svn.linuxsampler.org/cgi-bin/viewvc.cgi/libgig/trunk/src/gig.cpp?revision=3979&view=markup#l467 > > The disk streaming Read() method is currently quite ignorant and only > knows > about 16 bit or 24 bit: > http://svn.linuxsampler.org/cgi-bin/viewvc.cgi/libgig/trunk/src/gig.cpp?revision=3979&view=markup#l1118 > Ah, ok, thanks for the clarification! I'm really amazed, how quick you respond and give the corresponding links! You seem to know your code well! :) Funny enough, I didn't notice any problems when saving the gig-file's samples with 32 bit using the gig_sample->write method. But since I have no way of testing the gig-file, I couldn't examine the result... > It is actually the other way around: the sampler already uses 32 bit > internally for many years. So it is more the file format loading libs > like > libgig for .gig files or libsndfile for SFZ that would need to be > extended. If I understand you correctly, libsndfile cuts 32 bit to 24 bit.? So since the wav-files I used come from an SFZ-container, there would currently be no difference between the gig and the SFZ anyway, I guess. I currently don't feel up to looking into those codes deeply to see if I can help extending them. Maybe later. Thanks again! Cheers, Kolja |
|
From: Christian S. <sch...@li...> - 2021-11-08 22:58:16
|
On Montag, 8. November 2021 22:45:57 CET Kolja Koch wrote: > > Actually libgig only supports samples up to 24 bit: > > http://svn.linuxsampler.org/cgi-bin/viewvc.cgi/libgig/trunk/src/gig.cpp?re > > vision=3979&view=markup#l467 > > > > The disk streaming Read() method is currently quite ignorant and only > > knows > > about 16 bit or 24 bit: > > http://svn.linuxsampler.org/cgi-bin/viewvc.cgi/libgig/trunk/src/gig.cpp?re > > vision=3979&view=markup#l1118 > Ah, ok, thanks for the clarification! > I'm really amazed, how quick you respond and give the corresponding > links! You seem to know your code well! :) It is not a talent to remember your own code. ;-) > Funny enough, I didn't notice any problems when saving the gig-file's > samples with 32 bit using the gig_sample->write method. > But since I have no way of testing the gig-file, I couldn't examine the > result... Yeah, you only wrote part of the sample data, because the Write() method is ignorant as well. It simply assumes 16 bit in this case without complaining: http://svn.linuxsampler.org/cgi-bin/viewvc.cgi/libgig/trunk/src/gig.cpp?revision=3979&view=markup#l1329 > > It is actually the other way around: the sampler already uses 32 bit > > internally for many years. So it is more the file format loading libs > > like > > libgig for .gig files or libsndfile for SFZ that would need to be > > extended. > > If I understand you correctly, libsndfile cuts 32 bit to 24 bit.? > So since the wav-files I used come from an SFZ-container, there would > currently be no difference between the gig and the SFZ anyway, I guess. No I did not mean that, and actually apparently I was wrong in the first place here, because I realized libsndfile does support 32 bit for a bunch of formats: https://github.com/libsndfile/libsndfile/blob/f1495b4bcc4f7f0fedb10119e6b5b5b2f1946d4b/include/sndfile.h.in#L81 For .wav you won't have much trouble here, it supports 32 bit signed, and if you want you could even use 64 bit floating point with .wav files: https://github.com/libsndfile/libsndfile/blob/f1495b4bcc4f7f0fedb10119e6b5b5b2f1946d4b/src/wav.c#L794 But that can naturally only be said on a per subformat basis, for instance for flac libsndfile only supports up to 24 bit signed, because the flac codec does not support 32 bit signed: https://github.com/libsndfile/libsndfile/blob/f1495b4bcc4f7f0fedb10119e6b5b5b2f1946d4b/src/flac.c#L791 There is one clear difference between the gig engine and sfz engine in LS: the gig engine is much more efficient. I have seen a report on the ML by somebody who wrote he easily got CPU saturation with the sfz engine, unlike with gig and same patches. However he was not motivated enough to deliver useful profiling data so I could identify the issue. In the end I am just maintaining the sfz engine, but I am personally not using it. So if people don't care enough there, then I don't either. > I currently don't feel up to looking into those codes deeply to see if > I can help extending them. Maybe later. No problem, no hurry. > Thanks again! > Cheers, > Kolja CU Christian |
|
From: Kolja K. <ko...@fr...> - 2021-11-09 13:28:11
|
> It is not a talent to remember your own code. ;-) I do have to object here: Remembering where to find a specific fragment in thousands lines of code may indeed look like a talent to someone, who can't even remember where his car key is, until he finds it in his left hand... ;) > Yeah, you only wrote part of the sample data, because the Write() > method is > ignorant as well. It simply assumes 16 bit in this case without > complaining: > > http://svn.linuxsampler.org/cgi-bin/viewvc.cgi/libgig/trunk/src/gig.cpp?revision=3979&view=markup#l1329 Ah, I see. > There is one clear difference between the gig engine and sfz engine > in LS: the > gig engine is much more efficient. I have seen a report on the ML by > somebody > who wrote he easily got CPU saturation with the sfz engine, unlike > with gig > and same patches. However he was not motivated enough to deliver > useful > profiling data so I could identify the issue. > > In the end I am just maintaining the sfz engine, but I am personally > not using > it. So if people don't care enough there, then I don't either. Fair enough! I have no clue, how those sampler engines really compare regarding playback-performance but always felt like using Gigasampler would be the better choice. That's why I started programming my tool in a way that it might be expanded to convert e.g. sfz to gig. That's something I have on my list after my next release, since I want it to make myself a 'true' replica of the Ivy-Piano sfz and some of its articulations are not represented in the individual filenames. > No problem, no hurry. :) This sounds like an alternative version of 'No woman, no cry'... ;) Cheers, Kolja |