Author |
Message |
Tim Kleinert
Joined: Mar 12, 2004 Posts: 1148 Location: Zürich, Switzerland
Audio files: 7
G2 patch files: 236
|
Posted: Wed Feb 11, 2015 5:01 am Post subject:
48/96 upsampling FIR coefficients? |
|
|
I'm currently working on a groundbreaking new patch where I have a complex signal clocking at 48k which I'd like to upsample to 96k. In a normal situation the distortion images aren't too audible , but I'm doing fierce nonlinear processes on top of those, so things get a bit nasty. I'm doing them at a fixed sample count, so at least the foldbacks are harmonic -but I'd like to avoid it if possible.
Since I'll have to use two audiorate shift registers in tandem anyway to pull this off (that is, if I can fit it into the patch to begin with ), that gives me 16 FIR taps for which I would need the coefficients.
I thought I had found a little online tool many eons ago that spits this kind of stuff out, but I can't find it anymore and perhaps I was dreaming anyway.
Anyone here into this kind of stuff?
EDIT: Ha, found it!
http://t-filter.appspot.com/fir/index.html
Now, how to implement those scary micro-fractionals in the G2? Well, we'll see. |
|
Back to top
|
|
|
seraph
Editor
Joined: Jun 21, 2003 Posts: 12398 Location: Firenze, Italy
Audio files: 33
G2 patch files: 2
|
Posted: Wed Feb 11, 2015 9:27 am Post subject:
Re: 48/96 upsampling FIR coefficients? |
|
|
Tim Kleinert wrote: |
Anyone here into this kind of stuff? |
I wish I knew what you are talking about _________________ homepage - blog - forum - youtube
Quote: | Don't die with your music still in you - Wayne Dyer |
|
|
Back to top
|
|
|
alcofribas
Joined: Oct 03, 2008 Posts: 22 Location: Eastern France
|
Posted: Fri Feb 13, 2015 4:51 am Post subject:
|
|
|
Just a few remarks for Tim,
-- an upsampling filter is just a lowpass filter that removes the quantizing crud of the lower sample frequency. The corner frequency doesn't have to be exactly 24 khz, but in the case of an FIR implementation for a 2-times (or 4-times etc) upsampler the coefficients fall nicely if the corner frequency is precisely there.
-- it doesn't have to be FIR. In my experience an IIR filter is much cheaper to implement for upsampling. Sure you get some overshoot and phase distortion, but is it really important in your application? I've had very very good results in Reaktor with a six-pole Chebyshev with moderate ripple at something like 18khz corner. You have more G2-fu than I do, so you can see if that's a feasible approach.
-- When I want calculations for IIR filters my site of choice is
http://www-users.cs.york.ac.uk/~fisher/mkfilter/
There are also FIR calculations there but the process the guy uses and results he gets are quite mysterious.
-- There is a simple method to design FIR filters. You start with a "perfect" sin x/x pulse response, which would require an infinite length shift register, and you shorten it with the windowing function of your choice. Wikipedia has a whole page of them.
-- Since the G2 has rather limited precision, an implementation of an IIR should be done by using 2-pole sections in series. It's very easy to derive from the list of poles given in the aforementioned site.
-- If you want more about this you can PM me.
Hoping this is useful. I can't wait to see what you're going to come up with.
The hidden powers of the G2!
Alcofribas |
|
Back to top
|
|
|
BobTheDog
Joined: Feb 28, 2005 Posts: 4044 Location: England
Audio files: 32
G2 patch files: 15
|
Posted: Fri Feb 13, 2015 6:07 am Post subject:
Re: 48/96 upsampling FIR coefficients? |
|
|
Tim Kleinert wrote: | I'm currently working on a groundbreaking new patch |
As I would classify most your stuff as groundbreaking I wait with trepidation to see what your definition is! |
|
Back to top
|
|
|
Tim Kleinert
Joined: Mar 12, 2004 Posts: 1148 Location: Zürich, Switzerland
Audio files: 7
G2 patch files: 236
|
Posted: Fri Feb 13, 2015 7:58 am Post subject:
|
|
|
@Alcofribas
Many many thanks for your detailed explanations and help -much appreciated. I definitely still have a lot to learn here, and it's exhilarating. I have been staring at the sinc graph for many years in disbelief. Two days ago the penny finally dropped and it all makes sense.
My design absolutely requires a linear phase response, as I am converting wavetable data from 24k to 96k.
Since I'm upsampling x2, I can get an 8-bit 15-tap polyphase FIR from the 8-tap shift register module, a switch and a few mixers -which is the absolute maximum I can afford in this patch anyway (I'm constantly bumping 100% DSP). I tested it and it does the trick well enough for my purpose.
I'm about to put together the final parts of the patch, and hope that it will fly. It absolutely totally maxes out the G2 at 100% and one extra required module might ruin everything. I've been racking my brains out on the concept for weeks.
Anyway, thanks to everyone for their flattering remarks. Now the pressure is really on me. |
|
Back to top
|
|
|
blue hell
Site Admin
Joined: Apr 03, 2004 Posts: 24079 Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320
|
Posted: Fri Feb 13, 2015 4:00 pm Post subject:
|
|
|
For my softsynth thingie I wanted to convert from the variable internal sampling rate of the Talkie (speech) module (0 to SystemRate / 2) to SystemRate (selectable at either 44k1, 48k, 88k2 or 96k) .. the results I got with linear interpolation were not bad at all .. but then again it is a LOFI thing to begin with ... you probably tried that though? _________________ Jan
also .. could someone please turn down the thermostat a bit.
|
|
Back to top
|
|
|
Tim Kleinert
Joined: Mar 12, 2004 Posts: 1148 Location: Zürich, Switzerland
Audio files: 7
G2 patch files: 236
|
Posted: Fri Feb 13, 2015 4:20 pm Post subject:
|
|
|
Yes I tried that. The problem, same with zero-hold, is that it creates distortion in the passband. (At least it sounded like it.)
Zero-stuffing by itself wouldn't be a problem, because the thus generated spectral images are out of the hearing range in this specific case (48k to 96k).
However, I will apply some fierce nonlinear processing to the audio, which readily bounces all that (otherwise inaudible) junk back into the audio-range.
An interesting observation: In my original experimentation with IIR filters, I noticed that the stock G2 filters do nothing in the most upper frequency range settings. I mean, they simply stop working altogether, regardless of slope setting. Oh well. |
|
Back to top
|
|
|
blue hell
Site Admin
Joined: Apr 03, 2004 Posts: 24079 Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320
|
Posted: Fri Feb 13, 2015 4:35 pm Post subject:
|
|
|
Interesting indeed .. stop working .. meaning pass it all? _________________ Jan
also .. could someone please turn down the thermostat a bit.
|
|
Back to top
|
|
|
Tim Kleinert
Joined: Mar 12, 2004 Posts: 1148 Location: Zürich, Switzerland
Audio files: 7
G2 patch files: 236
|
Posted: Sat Feb 14, 2015 8:49 am Post subject:
|
|
|
Blue Hell wrote: | Interesting indeed .. stop working .. meaning pass it all? |
Seems to be. I just tested it again. I'm talking about the non-resonant LP modules though. LP-filtering eg. white noise at the 16.7k setting or above and turning it into HP by subtraction from the original signal produces silence, regardless of slope setting. The non-resonant HP modules however do seem to change up there, as I've just found out.
The resonant nord/multi/classic LP filters are different. The subtraction test doesn't work due to their phase response, but cranking the resonance at those high frequencies and twiddling the cutoff knob clearly makes the meters change and also produces audible differences (most of them birdies). |
|
Back to top
|
|
|
blue hell
Site Admin
Joined: Apr 03, 2004 Posts: 24079 Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320
|
Posted: Sat Feb 14, 2015 10:21 am Post subject:
|
|
|
There is a thing I seem to be missing here .. you do some low sample rate stuff that introduces aliasing that you then hope to remove with upsampling? _________________ Jan
also .. could someone please turn down the thermostat a bit.
|
|
Back to top
|
|
|
Tim Kleinert
Joined: Mar 12, 2004 Posts: 1148 Location: Zürich, Switzerland
Audio files: 7
G2 patch files: 236
|
Posted: Sat Feb 14, 2015 10:46 am Post subject:
|
|
|
Blue Hell wrote: | There is a thing I seem to be missing here .. you do some low sample rate stuff that introduces aliasing that you then hope to remove with upsampling? |
My 48k-signals are additively generated single-cycle waveforms stored in circulating (=feedbacked) "clocked-delay" modules triggered by 48k-spikes, with their highest harmonic at 12k. No aliasing here, neither harmonic nor inharmonic. The upsampling is simply to keep the signal clean at 96k, especially since some of the following processing stages are highly nonlinear (but also sufficiently band-limited). |
|
Back to top
|
|
|
blue hell
Site Admin
Joined: Apr 03, 2004 Posts: 24079 Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320
|
Posted: Sat Feb 14, 2015 11:06 am Post subject:
|
|
|
Ah ok, I get it now, thanks. _________________ Jan
also .. could someone please turn down the thermostat a bit.
|
|
Back to top
|
|
|
BobTheDog
Joined: Feb 28, 2005 Posts: 4044 Location: England
Audio files: 32
G2 patch files: 15
|
Posted: Wed Mar 18, 2015 5:14 am Post subject:
|
|
|
Tim, has this patch seen the light of day yet? |
|
Back to top
|
|
|
Tim Kleinert
Joined: Mar 12, 2004 Posts: 1148 Location: Zürich, Switzerland
Audio files: 7
G2 patch files: 236
|
Posted: Wed Mar 18, 2015 6:00 am Post subject:
|
|
|
BobTheDog wrote: | Tim, has this patch seen the light of day yet? |
Still at it. Had to completely redesign it since the original concept was based on assumptions of how the delay-module sample interpolation works -which it doesn't. Which is OK, because the new approach is more elegant and also doesn't require an FIR filter anymore. It's in the final debugging and calibration stage -which I have been putting off for over a week because it's absolutely irritating and frustrating work.
So thanks for inquiring, this will help me get off the ground. |
|
Back to top
|
|
|
BobTheDog
Joined: Feb 28, 2005 Posts: 4044 Location: England
Audio files: 32
G2 patch files: 15
|
Posted: Mon Mar 23, 2015 2:17 pm Post subject:
|
|
|
Thanks for the update, looking forward to seeing it.... |
|
Back to top
|
|
|
Tim Kleinert
Joined: Mar 12, 2004 Posts: 1148 Location: Zürich, Switzerland
Audio files: 7
G2 patch files: 236
|
Posted: Mon Mar 23, 2015 5:16 pm Post subject:
|
|
|
BobTheDog wrote: | Thanks for the update, looking forward to seeing it.... |
It's finished. At last, it works ...for f*cks sake, this thing was driving me nuts for weeks! Cooking up some variations and will publish shortly. |
|
Back to top
|
|
|
grimley
Joined: Jul 07, 2004 Posts: 168 Location: Seattle
G2 patch files: 9
|
Posted: Tue Mar 24, 2015 8:12 am Post subject:
|
|
|
No clue what you're up to but as with all your work, I'm excited to hear the results. Thanks for continually adding new life to the old girl. _________________ Sleep Distillery
Apeirophobe |
|
Back to top
|
|
|
drapdap
Joined: Oct 11, 2004 Posts: 204 Location: London
Audio files: 1
G2 patch files: 1
|
Posted: Tue Mar 24, 2015 9:07 am Post subject:
|
|
|
I'm so excited about your new move Tim, i keep checking back here every day, wondering what is it. Thanks for sharing your work! |
|
Back to top
|
|
|
Moody33
Joined: Apr 28, 2009 Posts: 111 Location: France
G2 patch files: 16
|
Posted: Tue Mar 24, 2015 9:47 am Post subject:
|
|
|
drapdap wrote: | I'm so excited about your new move Tim, i keep checking back here every day, wondering what is it. Thanks for sharing your work! |
Juste the same here. |
|
Back to top
|
|
|
varice
Joined: Dec 29, 2004 Posts: 961 Location: Northeastern shore of Toledo Bend
Audio files: 29
G2 patch files: 54
|
Posted: Tue Mar 24, 2015 6:01 pm Post subject:
|
|
|
Tim Kleinert wrote: | Blue Hell wrote: | Interesting indeed .. stop working .. meaning pass it all? |
Seems to be. I just tested it again. I'm talking about the non-resonant LP modules though. LP-filtering eg. white noise at the 16.7k setting or above and turning it into HP by subtraction from the original signal produces silence, regardless of slope setting... |
Well, good grief That would explain why I have gotten some unexpected results while using this low pass filter module at high cutoff settings.
When I read your post last month, I thought that maybe there might be some other reason why your subtractive test would appear to show that module not working. Maybe some high frequency band limiting of the noise oscillator, mixer, and/or the G2 VU meters? Then I realized that I could use a 48 kHz square wave (generated by the inverter gate trick) as an exclusively ultrasonic signal for a non-subtractive test. This different test method confirms what you claimed. The FltLP module appears to have no attenuation of high frequencies above the cutoff frequency when the filter cutoff is set to 16.7 kHz or higher, regardless of the slope setting.
This looks like a bug, IMHO. I realize that many people can’t hear high frequencies above 16 kHz, but is that a legitimate reason for this LPF module to not work up there _________________ varice |
|
Back to top
|
|
|
Tim Kleinert
Joined: Mar 12, 2004 Posts: 1148 Location: Zürich, Switzerland
Audio files: 7
G2 patch files: 236
|
Posted: Tue Mar 24, 2015 6:31 pm Post subject:
|
|
|
varice wrote: |
This looks like a bug, IMHO. I realize that many people can’t hear high frequencies above 16 kHz, but is that a legitimate reason for this LPF module to not work up there |
Man, I could write a lengthy article about all the undocumented little bugs in the G2 OS which I stumbled upon lately. This is just one of them. Most of it goes unnoticed -that is, until you start to use modules for sample-accurate low-level applications: unexpected module sample delays, weird scalings, the delay modules (ah, could write an article about those alone ), patch compiler idiosyncrasies, control-rate vs. audio-rate interactions... enough to drive you nuts. As if the patching itself wasn't challenging enough.
varice wrote: | Maybe some high frequency band limiting of the noise oscillator |
I think a noise generator is one of the few things where band-limiting isn't an issue. Foldbacks of chaos=chaos.
BTW, the non-resonant HPFs do track up to the top (21k). Use those (via subtraction) if you need a LPF up there. |
|
Back to top
|
|
|
varice
Joined: Dec 29, 2004 Posts: 961 Location: Northeastern shore of Toledo Bend
Audio files: 29
G2 patch files: 54
|
Posted: Tue Mar 24, 2015 7:36 pm Post subject:
|
|
|
Tim Kleinert wrote: | varice wrote: |
This looks like a bug, IMHO. I realize that many people can’t hear high frequencies above 16 kHz, but is that a legitimate reason for this LPF module to not work up there |
Man, I could write a lengthy article about all the undocumented little bugs in the G2 OS which I stumbled upon lately. This is just one of them. Most of it goes unnoticed -that is, until you start to use modules for sample-accurate low-level applications: unexpected module sample delays, weird scalings, the delay modules (ah, could write an article about those alone ), patch compiler idiosyncrasies, control-rate vs. audio-rate interactions... enough to drive you nuts. As if the patching itself wasn't challenging enough. ... |
Yep, and there in rests the real shame that further development of the G2 system was halted so quickly almost ten years ago, including just simple OS bug fixes… The G2 system is so complex that there are bugs coming to surface even years later…
Tim Kleinert wrote: | varice wrote: | Maybe some high frequency band limiting of the noise oscillator |
I think a noise generator is one of the few things where band-limiting isn't an issue. ... |
Obviously, band limiting the noise oscillator would have no audible advantage, but by the same token, a LPF module that does not attenuate frequencies above high cutoff settings would be just as fucking silly… therefore the need for an alternative test method to eliminate any other reason for your subtractive test result. _________________ varice |
|
Back to top
|
|
|
Tim Kleinert
Joined: Mar 12, 2004 Posts: 1148 Location: Zürich, Switzerland
Audio files: 7
G2 patch files: 236
|
Posted: Wed Mar 25, 2015 3:38 am Post subject:
|
|
|
varice wrote: | Obviously, band limiting the noise oscillator would have no audible advantage, but by the same token, a LPF module that does not attenuate frequencies above high cutoff settings would be just as fucking silly… therefore the need for an alternative test method to eliminate any other reason for your subtractive test result. |
Ah, now I get it.
But pertaining bugs, they pretty much all seem trivial little mistakes which could have been ironed out quickly once reported -if anyone had cared to do so. This might be a rumor, but I heard that the G2 was so ambitious (and thus expensive) to develop that it almost tanked the company, and some folks there don't want to hear anything about it anymore -or about a successor. |
|
Back to top
|
|
|
Electromagnetic Wave
Joined: Apr 28, 2013 Posts: 302 Location: Kebek
G2 patch files: 38
|
Posted: Wed Mar 25, 2015 4:39 am Post subject:
|
|
|
Quote: | i keep checking back here every day, wondering what is it. |
The visitors statistics from E-M forum increase a lot everytime Tim post something new !
Quote: | But pertaining bugs, they pretty much all seem trivial little mistakes which could have been ironed out quickly once reported -if anyone had cared to do so. Rolling Eyes |
I'm sure they can !
Quote: |
I heard that the G2 was so ambitious (and thus expensive) to develop that it almost tanked the company, and some folks there don't want to hear anything about it anymore -or about a successor. |
I hear that too before this article was writen but that's true
Quote: |
We were draining the company on the R&D department, for a very small market. So we almost killed ourselves. After that we said no more modular systems...
I want to improve it but if I even whisper about improving it my software engineers and my partner go crazy…” |
http://www.musicradar.com/news/tech/in-pictures-inside-nords-stockholm-factory-613549/3 |
|
Back to top
|
|
|
Tim Kleinert
Joined: Mar 12, 2004 Posts: 1148 Location: Zürich, Switzerland
Audio files: 7
G2 patch files: 236
|
Posted: Wed Mar 25, 2015 4:57 am Post subject:
|
|
|
Electromagnetic Wave wrote: |
I hear that too before this article was writen but that's true
Quote: |
We were draining the company on the R&D department, for a very small market. So we almost killed ourselves. After that we said no more modular systems...
I want to improve it but if I even whisper about improving it my software engineers and my partner go crazy…” |
http://www.musicradar.com/news/tech/in-pictures-inside-nords-stockholm-factory-613549/3
|
Ah yes -that's where I read it, but wasn't sure if I had remembered correctly. So it isn't just a rumor (anymore).
But with the modular craze in full swing, I think they should reconsider things. Imagine a G3 with their new floating-point DSP filter models (the A1 sounds absolutely fantastic IMHO) and simple switches to take out the DC decoupling on the outputs (so they can also be used as CV outs for interfacing with analog modular equipment), could be an absolute winner... ...man, I would do the complete algorithm design, voicing and documentation for free to see that happen! Are you reading this, Magnus? ...probably not . Ah, I can dream.
BTW, patch and variations done. Now if I only had the facility to do a demo mp3 too (my DAW is still in boxes). Or anyone here willing to help me out? |
|
Back to top
|
|
|
|