I need a volunteer who can check out the sources for DspFilters from Google code SVN and build it for Mac. There’s no XCode project file or anything, just raw sources.
In theory, it should work without changes. Private message me or reply here! Thanks.
I downloaded the source code and made a project.
There are errors with: #include <type_traits>
I quickly googled it and it seems to be Windows only.
I am not very familiar with advanced template and have no time to found the solution for the moment. I will have more time next week (I hope).
z is declared as a PoleZeros type, which has members poles and zeros. The code calls ‘pole[0]’ though. GCC won’t pass it, although the code being in the .h made it hard to dig out. Not sure how windows liked it? What’s the intent? Should z be a PoleZero, not a PoleZeros?
[code] complex_t& pole (int index)
{
assert (index >= 0 && index < m_numPoles);
return poleArray[index];
}
complex_t& zero (int index)
{
assert (index >= 0 && index < m_numPoles);
return zeroArray[index];
}
[/code]
be this:
[code] complex_t& pole (int index)
{
assert (index >= 0 && index < m_numPoles);
return m_poleArray[index];
}
complex_t& zero (int index)
{
assert (index >= 0 && index < m_numPoles);
return m_zeroArray[index];
}
[/code]
Again, how does Windows pass it? There’s more stuff that seems related to visibility - not found in this scope stuff, and it’s in classes that inherit and are templated. Still looking.
Ok, something clicked in Xcode, it’s being more helpful.
DspFilter.h, envelopefollower class this was ‘i’:
Value operator[] (int channel) const
{
return m_env[channel];
}
And in the same class, what should ‘s’ be?
[code] void Process (size_t samples, const Value** src)
{
for( int i=0; i<Channels; i++ )
{
const Ty* cur = src[i];
CalcT e = m_env[i];
for (int n = samples; n; n--)
{
double v = ::fabs(*s++);
if (v > e)
e = m_a * (e - v) + v;
else
e = m_r * (e - v) + v;
}
m_env[i]=e;
}
}[/code]
‘Ty*’ also gets flagged and I can’t find the definition of it.
Also coming up, tr1:is_pod isn’t found.
Sorry this is so piecemeal - it seems that since the code is in includes, the definition fails and subsequent code is borked, maybe?
Visual C++ doesn’t actually check the validity of template functions until they are invoked. GCC on the other hand, does a full syntax / symbol checking (well, to the extent that it is possible without knowing the template arguments).
Let me work on it a little bit and look at those examples you gave me.
Okay I installed Qt creator and I am building using GCC and getting the same errors. Don’t mess with DspFilters any more until I have fixed all of these errors - I will post a message.
Lots of warnings about classes with virtual methods but no virtual destructor… but pretty good compared… whammo! The juce_amalgamted file stops us. This may be that we need the objective C++ wrapper. Yup, we had both, when I dropped all the files into jucer. Pulled that, building again.
Here’s something real - In the PoleZeroForm (Biquad) constructor:
[code]/Users/brucewheaton/Documents/Code Examples Snippets SDKs/DspFilters/trunk/Builds/MacOSX/…/…/source/Biquad.cpp:19:0 /Users/brucewheaton/Documents/Code Examples Snippets SDKs/DspFilters/trunk/Builds/MacOSX/…/…/source/Biquad.cpp:19: error: call of overloaded ‘isnan(Dsp::complex_t&)’ is ambiguous
OK, you got it. So, I have a jucer file and xcode project. The jucer file is unusual in that you added the juce amalgamated, so it is set to ‘don’t link to juce’ which could be confusing. You may want to consider moving to a jucer generated project - it’s pretty nifty, and covers the other platforms for free. Mostly would just need to change a few include statements.
Also, to be Mac friendly (for the demo) you should consider native windows and Mac toolbar.
Good deal! I’m in Starbucks, so I can’t listen much, but it looks awesome.
I don’t understand what you mean by a Jucer-generated project. I don’t use Jucer, at all. What’s wrong with just having the xcode file? And why shouldn’t I just include the amalgamation in the demo?
I want to have this source code set up so all someone has to do is download it, open the appropriate file for their build environment (visual studio project file, xcode project file, Linux Makefile) build without error, and run. I checked in a qmake .pro file, will that be sufficient for Linux ?
Well, the jucer file will let you build reasonable build setups for most platforms for your project. Right now, you get iOS, MacOSX, MSVC6, VS2005, 2008, 2010, and I guess soon Android.
I use Linux for our video playback product, so I do a fair amount of Linux, but qmake and .pro doesn’t mean much to me, so I’ll guess no, that wouldn’t be ‘simple’ on Linux. The situation on Linux is that there’s 4-5 build systems, and then there’s 4-5 different ‘package’ systems that install libraries, sometimes using source code. The default though is a make file. Most of the other systems end up generating a make file.
Hey, it looks like jucer doesn’t make a Linux build? What gives?
But yes, you could just add an Xcode project. Main difference would be that when you add or remove files or settings, you can regen the xcode project at the same time.
Hey - I only have the RBJ filter active though - the others are greyed out.
Yeah they are still in development. Got a girl coming in through sunday so I won’t be able to get back to it until then but I’m thinking by the end of next week everything should be working. I will have something new checked in Monday night at the latest for sure, probably earlier.
Redesigning the templates to be more user friendly and flexible, while still retaining performance, has proven to be quite a challenge but I got the Butterworth working with the new class design and I think that the results will be very appealing once I tidy everything up.
The current checkin uses the “SmoothedFilter” implementation by default, which modulates interpolates parameters over time to give good subjective characteristics. You can hammer the filter knobs and it shouldn’t sound bad.
Also, there’s a pitch slider that uses the juce::ResamplingAudioSource to achieve time stretching with the ratio adjusted dynamically and the result is pretty awesome. I implemented my own simple per-sample linear interpolation of the resampling ratio, and you can tweak the block size up from 1 sample by changing it in AudioOutput.cpp.
So overall I’m pretty happy with this demo so far, almost done with the most difficult part which is refactoring all the classes and then after that its just porting over the existing filter formulas which I consider gravy. Although in the process I’m hoping to fix some flaws with the original filter designs, such as the singularity with the Chebyshev I shelves when the shelf gain is less than the ripple dB.
Yes, the experimental jucer makes projects - that’s about all it does right now. I moved to using it to get separate iOS and Mac projects, but it acts as an awesome ‘wizard’ to make projects.
You can either just kick things off, or try to keep it in sync and add files through it. Since it’s the new wave, Jules is keen on making sure it can be your ‘one stop shop’ for starting a project. There’s even code editing, though not really up to platform tools yet.
Hi,
I just checkout the new sources.
Everything is compiling ok.
But there is some assert when I close the app.
In ThreadQueue destructor (I think you forgot to call audioDeviceStopped because it is the only place where you close the queue).
Tell me if you want the Xcode project.