 |
Latest musicdsp comments
Added to : Fast rounding functions in pascal Date : 23/04/08 By : didid[ AT ]noskynetspam[ DOT ]be Comment : the fround doesn't make much sense in Pascal, as in Pascal (well, Delphi & I'm pretty sure FreePascal too), the default rounding is already a fast rounding. The default being FPU rounding to nearest mode, the compiler doesn't change it back & forth. & since it's inlined (well, compiler magic), it's very fast.
Added to : antialiased square generator Date : 13/04/08 By : ccccfffaaakakakak[ AT ]hotmail[ DOT ]com Comment : Complete waste of bandwidth thank you.
Added to : Stereo Width Control (Obtained Via Transfromation Matrix) Date : 07/04/08 By : - Comment : Scanner, no problem and yes I've seen the "Stereo Enhancer" entry, though (even though it seems to try to achieve the same as this here) it is (as far as I can see) broken.
Added to : Stereo Width Control (Obtained Via Transfromation Matrix) Date : 06/04/08 By : scanner598[ AT ]yahoo[ DOT ]co[ DOT ]uk Comment : Hi Michael,
Thanks for the correction, I have build your solution in PureData and it is better than my suggestion was. B.t.w. there was already a posting on stereo enhancement on this site, you can find it under the effects section.
Added to : Stereo Width Control (Obtained Via Transfromation Matrix) Date : 06/04/08 By : - Comment : Scanner, no I wouldn't add that. First off it is unnecessary calculation you can rescale the MS matrix to your liking already! Plus your methode will cause a boost by 6dBs when you set the width to 0 = mono. So mono signals get boosted by 6dB which I'm sure isn't what you intented.
Note: My original code is correct that is, when you'd look at an audio signal on a goniometer it would scale the audio signal at the S-axis and leaving everything else unaffected.
But as I don't want people that add the additional calculation that scanner requested (sorry not trying to mock you), an volume adjusted version.
[code]
// calc coefs
tmp = 1/max(1 + width,2);
coef_M = 1 * tmp;
coef_S = width * tmp;
// then do this per sample
m = (in_left + in_right)*coef_M;
s = (in_right - in_left )*coef_S;
out_left = m - s;
out_right = m + s;
[/code]
Added to : Stereo Width Control (Obtained Via Transfromation Matrix) Date : 06/04/08 By : scanner598[ AT ]yahoo[ DOT ]co[ DOT ]uk Comment : Nice peace of code. I would add the following code at the end of the source to compensate for the loss/gain of amplitude:
out_left /= 0.5 + coef_S;
out_right /= 0.5 + coef_S;
Added to : Polyphase Filters Date : 06/04/08 By : bla Comment : you also need to delete the pointers inside the array
CAllPassFilterCascade::~CAllPassFilterCascade()
{
for (int i=0;i<numfilters;i++)
{
delete allpassfilter[i];
}
delete[] allpassfilter;
};
Added to : Simple Compressor class (C++) Date : 12/03/08 By : ben[ AT ]benvesco[ DOT ]com Comment : MIRROR: http://www.benvesco.com/dump/simpleSource.zip
This code has been missing for some time at the posted locations. I found someone with a copy and am now mirroring these files for download on my server. I believe the software license allows this mirroring. The code is unchanged and belongs to the original owner.
Added to : LP and HP filter Date : 11/03/08 By : foxes[ AT ]bk[ DOT ]ru Comment : Optimization for Hipass:
c = tan(pi * f / sample_rate);
c = ( c + r ) * c;
a1 = 1.0 / ( 1.0 + c );
b1 = ( 1.0 - c );
out(n) = ( a1 * out(n-1) + in - in(n-1) ) * b1;
Added to : Formant filter Date : 25/02/08 By : Thiyana[ DOT ]Maitriya[ AT ]honeywell[ DOT ]com Comment : Could you tell us how you calculated the coefficients?
Added to : Waveform generator using MinBLEPS Date : 11/02/08 By : kernel[ AT }audiospillage[ DOT ]com Comment : The sawtooth is a nice oscillator but I can't seem to get the square wave to work properly. Anyone else had any luck with this? Also, it's worth noting that the code assumes it is running on a little endian architecture.
Added to : Quick & Dirty Sine Date : 09/02/08 By : juuso[ DOT ]alasuutari[ AT ]gmail[ DOT ]com Comment : Hi,
Can I use this code in a GPL2 or GPL3 licensed program (a soft synth project called Snarl)? In other words, will you grant permission for me to re-license your code? And what name should I write down as copyright holder in the headers?
Thanks,
Juuso Alasuutari
Added to : Butterworth Optimized C++ Class Date : 25/01/08 By : musicdsp[ AT ]dsparsons[ DOT ]co[ DOT ]uk[ DOT ]nowhere Comment : thing is with 4X oversampling on this is that you'll be reducing precision on omega (wp here), and so should probably shift to double rather than float to help accuracy.
Added to : Polynominal Waveshaper Date : 22/01/08 By : physicstrick[ AT ]optonline[ DOT ]net Comment : I played with this idea for a while yesterday to no avail before discovering this post tonight. I thought I could excite any harmonic I wanted using select Chebyshev Polynomials. But you are totally right - it doesn't work that way. Any complex waveform that can be broken down into a Fourier series is a linear sum of terms. Squaring or cubing the waveform, and therefor this sum, leads to multiple cross terms which introduce additional frequencies. It does only work with normalized single sinusoids . . .which is too bad.
Right now, the only way I can see to do this sort of thing where you excite select harmonics at will is to run an FFT and then work from there in the frequency domain.
But my question is, if we are looking to simulate tube saturation, is the Chebyshev method good enough. What, after all, do tubes do? Does a tube amp actually add discrete harmonics or is it introducing all of those cross term frequencies as well?
Added to : Butterworth Optimized C++ Class Date : 21/01/08 By : bob[ AT ]yahoo[ DOT ]com Comment : It just seems to. If you 4X over-sample, then it gives it a 4X chance to recover from each sweep change, presuming you're not changing the filter cut-off at 4X also.
Added to : Butterworth Optimized C++ Class Date : 12/01/08 By : musicdsp[ DOT ]org[ AT ]mindcontrol[ DOT ]org Comment : Why would oversampling solve the problem? If you over-sample, the poles have to reach even further into the relative frequencies, and stability would become more of a problem AFAICT.
Added to : Nonblocking multiprocessor/multithread algorithms in C++ Date : 10/01/08 By : eigamx[ AT ]xhanmailx[ DOT ]net Comment : This code has a problem with operation exceeding 4G times. If you do more then 4G of Put and Get with the MPQueue, "AtomicUInt & Index(int i) { return data[i & (len-1)];} will cause BUG.
Modular operation with length of 2^n is OK, but not for other numbers.
My email does not have any "x" letters.
Added to : Plot Filter (Analyze filter characteristics) Date : 01/01/08 By : niels m[ DOT ] Comment : You need to change the log() to log10() to get the correct answer in dB's.
You can also replace the if(sIn >0) .. -= sOut; by:
tIn += sIn*sIn;
tOut += sOut*sOut;
this will measure signal power instead of amplitude. If you do this, you also need to change 20*log10() to 10*log10().
Nice and useful tool for exploring filters. Thanks!
Added to : Float to integer conversion Date : 29/12/07 By : jrocnuck[ AT ]hotmail[ DOT ]com Comment : I've seen a lot of talk about using the function lrintf() when converting from float to int, regarding bypassing some 'slow' opcodes in what standard compilers put in for something like:
int myint = (int) myfloat;
in otherwords the following code would be faster:
int myint = lrintf(myfloat);
this lrintf function is available on GNU C/C++
Added to : LPC analysis (autocorrelation + Levinson-Durbin recursion) Date : 21/12/07 By : jamie[ AT ]postlude[ DOT ]co[ DOT ]uk Comment : Hi,
This loop:
for (k=0;k<=P;k++){
A[0]=0;
Am1[0]=0; }
Looks like it shouldn't be there?
|
|
 |
|