DEF and PRF support?

You name it!

DEF and PRF support?

Postby dahnielson » Thu Apr 24, 2008 4:39 pm

Do LinuxSampler support GigaStudio 3 dynamic expression filter (DEF) and portamento reshaping filter (PRF) that I see being mentioned once in while on forums discussing GS3?
Anders Dahnielson

Ardour2, Qtractor, Linuxsampler, M-AUDIO Delta 1010, Axiom 61, Korg D12, AKAI S2000, E-MU Proteus 2k, Roland R-5, Roland HP 1300e, Zoom RFX-1000, 4GB RAM x86_64 Intel Pentium Dual 1.80GHz Gentoo Linux
User avatar
dahnielson
Moderator
 
Posts: 632
Joined: Wed Jan 23, 2008 11:25 pm
Location: Linköping / Tranås, Sweden

Re: DEF and PRF support?

Postby Andreas » Sat Apr 26, 2008 9:08 am

No, sorry, LS doesn't support the DEF and PRF filters. I've done a quick attempt to figure out the algorithm but I failed. It seems to be a lot more complex than the ordinary GS filter.
Andreas
Developer
 
Posts: 214
Joined: Sun Feb 03, 2008 8:33 am

Re: DEF and PRF support?

Postby dahnielson » Mon Sep 08, 2008 7:30 pm

I did some research myself (well, typed three words into Google)...

* Found the article "Advanced Use of the Dynamic Expression Filter in Gigasudio 3" (WebCite cache). It include example files like a skeleton INI file.

* Discovered that all the documentation for GS3 and GS4 is freely available as PDFs from TASCAM. The GigaEdit 4 manual cover the DEF filter as the setting now can be edited directly in it.

* And the TASCAM GigaViolin (WebCite cache) page has the following description of the filters:

The DEF and PRF filter technologies are new to GigaStudio V3.1 and consist of two new phase corrected, 7th order morphing filters designed to increase the overall expressiveness and realism of sampled instruments, while at the same time increasing performance and sonic integrity.

DEF - Dynamic Expression Filter
The DEF filter provides a continuous, note-specific, morphing filter for adding expressiveness before and after sustaining note-on events. Using a traditional MIDI controller, the user can accurately and continuously morph the frequency response of sustaining samples between velocity dynamics, even after note-on events have occurred.

What this means for GigaViolin users is the ability to perform phase accurate real-time crescendos and decrescendos using a single sustaining note, effectively replacing the need for layered X-fade instruments that increase polyphony and introduce phase inaccuracies. The result is a more lyrical and "live" sounding instrument that gives the user expanded depth of control over musical phrasing and dynamic range.

PRF - Portamento Reshaping Filter (Gliss)

The PRF filter provides a phase corrected, 7th order, morphing filter for shaping formants dynamically as the pitch of a sample is transposed over time. With appropriate custom PRF filter profiles created by the instrument developer, this filter can continuously morph the frequency response of a sample as it is stretched beyond its original pitch for ascending and descending transpositions.

The morphing response can be different for every note and every note interval both ascending and descending from the root note. Custom filter coefficient banks are created for the PRF and built into instruments by the instrument designer using a Mono mode iMIDI rule.

By dynamically de-emphasizing formant shifts resulting from sample transposition, the PRF Filter technology gives GigaViolin users the ability to create tempo independent glissandos between two notes. After assigning a controller to MIDI Portamento Time (CC#5), it is possible to create glissandos ranging from a few seconds to a few milliseconds, depending on the tempo and feel of the music.

GigaViolin instruments that employ the Portamento Reshaping Filter contain the word "Gliss" in their instrument name. For detailed instructions on how to change Portamento time please see the tutorial titled "Varying Portamento time using a MIDI Continuous Controller".


I guess it has some relation to the Z-plane synthesis used by E-MU (like in my dear Proteus 2k), they both bordering to modeling territory.
Anders Dahnielson

Ardour2, Qtractor, Linuxsampler, M-AUDIO Delta 1010, Axiom 61, Korg D12, AKAI S2000, E-MU Proteus 2k, Roland R-5, Roland HP 1300e, Zoom RFX-1000, 4GB RAM x86_64 Intel Pentium Dual 1.80GHz Gentoo Linux
User avatar
dahnielson
Moderator
 
Posts: 632
Joined: Wed Jan 23, 2008 11:25 pm
Location: Linköping / Tranås, Sweden

Re: DEF and PRF support?

Postby dahnielson » Mon Sep 08, 2008 9:07 pm

The filter settings are created and edited in a INI file that then is applied to an instrument (at least in GigaStudio 3). The filter setting in summary:

* Each note has its own individually tuned filter settings.

* There are eight settings per note. One for individual portamento time:

  • Portamento time offset
Five for the PRF (Formant Shift Reshaping Filter) used in legato portamento:

  • PRF Filter: Up short interval
  • PRF Filter: Up long interval
  • PRF Filter: Down short interval
  • PRF Filter: Down long interval
And three for the DEF (Dynamic Expression Filter) used for continuous note expressiveness after note-on:

  • DEF Filter: Forte
  • DEF Filter: Mezzo forte
  • DEF Filter: Pianissimo
* Each of the filter settings for both filters have four 1-byte parameters:

  • Fc0: cutoff frequency (flat is 127)
  • Q0: (flat is 40)
  • Q0H: (flat is 88)
  • V0: gain, 0=-36dB, 64=0dB, 127= +14dB (flat is 64)
From the GigaEditor 4 Manual:

Giga’s morphing filters are composed of four independent parameters that affect the overall shape and volume of the filter: cutoff frequency, Q, Q0H, and V0. Each parameter has a range of 0 to 127. The first three parameters affect the timbre of the filter (frequency and Q) while the fourth parameter (V0) is used for volume compensation.

Cutoff Frequency (Fc) – Determines the initial center frequency for the Q0 Quality factor.

Q – Simultaneously determines gain, Quality (filter width) and a center frequency offset relative to the initial Fc setting.

Q0H – This high frequency quality factor has a fixed center frequency near 7.5 khz and is especially helpful in de-emphasizing the harsh overtones of upwardly transposed samples.

V0 – Initially designed to compensate for any gain attenuation imposed by the filter, V0 can also be used creatively to increase the dynamic range of an instrument, achieving softer pianissimos and bolder fortes.


* The frequency responses are "morphed" into each other by interpolating their coefficients.

Apparently, it's the same filter used both for DEF and PRF as the basic idea is the same. You have a sample that you want to filter so it sound as close to another reference sample. The difference is how the "morphing" is controlled.

E.g. you have a mezzo piano sample that you will filter to sound as the pianissimo reference sample using DEF, you then control the "morphing" interpolation between the mp and pp filters with the modwheel. While you with PRF want a C4 sample to sound as close to a E4 when it is resampled to shift the pitch, to deemphasize the distortion of formants, the interpolation between the note specific filters is controlled by the portamento.
Anders Dahnielson

Ardour2, Qtractor, Linuxsampler, M-AUDIO Delta 1010, Axiom 61, Korg D12, AKAI S2000, E-MU Proteus 2k, Roland R-5, Roland HP 1300e, Zoom RFX-1000, 4GB RAM x86_64 Intel Pentium Dual 1.80GHz Gentoo Linux
User avatar
dahnielson
Moderator
 
Posts: 632
Joined: Wed Jan 23, 2008 11:25 pm
Location: Linköping / Tranås, Sweden

Re: DEF and PRF support?

Postby dahnielson » Mon Sep 08, 2008 11:02 pm

Ok, that's enough research for one evening.

One idea to figure out the rest (the real effect of the parameters) would be to have someone with GS3 or GS4 to run experiments using a spectrum analyzer for known parameter settings and collect data for an approximated implementation.
Anders Dahnielson

Ardour2, Qtractor, Linuxsampler, M-AUDIO Delta 1010, Axiom 61, Korg D12, AKAI S2000, E-MU Proteus 2k, Roland R-5, Roland HP 1300e, Zoom RFX-1000, 4GB RAM x86_64 Intel Pentium Dual 1.80GHz Gentoo Linux
User avatar
dahnielson
Moderator
 
Posts: 632
Joined: Wed Jan 23, 2008 11:25 pm
Location: Linköping / Tranås, Sweden

Re: DEF and PRF support?

Postby dahnielson » Tue Sep 09, 2008 9:00 am

Brute force
To analyze DEF via automated brute force:

  • Generate a 24-bit sample of a frequency sweep.
  • Generate 128^3 instruments with a singe region, note range 0-127, using the sample without pitch tracking.
  • Generate every combination of DEF parameters (4 parameters, value 0-127): 128^4, for a single setting.
  • Add a combination to each note in each instrument (128^3 instruments * 128 notes/instrument)
  • Play back every note in every instrument and analyze the output.
Minimal strategy
Obviously, one would do a test in much smaller scale first to find out if...

  • the filter itself is LTI?
  • the filter is identical for the p/mf/f settings?
  • V0 is independent from the other three settings and do not affect them?
  • Q0 is only dependent on Fc (reducing the number of combinations for it to 128^2)?
  • Q0H is not dependent on any of them (reducing the test for it to 128)?
My belief: Yes, they are LTI (NB: as long as you don't actually do the "morphing"). Yes they are identical. Yes, according to the manual they should be independent/dependent in that way. So the actual testing can be limited to two sets of tests:

  1. Fc and Q0 combinations with V0 and Q0H being flat (128^2 combinations);
  2. Q0H with V0, Fc and Q0 being flat (128 combinations).
Legality
IANAL, but here's the legal bit:

  • AFAIK, the DEF/PRF specifics are trade secrets (just like the recipe for Coca-Cola) why we are free to figure them out as best we can by analyzing the response without risking any legal trouble if we implement them exactly, as long as we don't get someone from Nemesys/TASCAM to reveal the specifics or disassemble Gigastudio. (Ideally, for a true clean room design, the person who analyze the system shouldn't be involved in the implementation of the approximated filters. All that is passed between the analyzer and the implementor should be the written analysis and description.)
  • If they were patented (which I doubt) then it would be possible to read the patent and avoid infringement by implementing them in a different way with a different method. The fact that they have the same approximate effect doesn't matter, it's the way it's done that is patentable.
Anders Dahnielson

Ardour2, Qtractor, Linuxsampler, M-AUDIO Delta 1010, Axiom 61, Korg D12, AKAI S2000, E-MU Proteus 2k, Roland R-5, Roland HP 1300e, Zoom RFX-1000, 4GB RAM x86_64 Intel Pentium Dual 1.80GHz Gentoo Linux
User avatar
dahnielson
Moderator
 
Posts: 632
Joined: Wed Jan 23, 2008 11:25 pm
Location: Linköping / Tranås, Sweden

Re: DEF and PRF support?

Postby Andreas » Tue Sep 09, 2008 6:58 pm

When I made the ordinary filter implementation in LinuxSampler, I did a lot of recordings of GS2 output. I used an impulse instead of a filter sweep as input. After first just looking at the frequency responses and scratching my head, I found out about the "Prony" algorithm: http://cnx.org/content/m12762/latest/, with an implementation here: http://users.ece.gatech.edu/~mhayes/stat_dsp/. This is really math way above my head, but I managed to use the program to find the IIR coefficients for the different recordings. And then it took a lot more thinking and testing and, most importantly, luck, to figure out how the gig parameters could be translated to the IIR coefficients.

Anyway, I did a couple of measurements of the DEF filter a while ago, and ran it through prony. The result looked it was something like a 100 tap FIR filter, which made me give up.

I also saw that GS3, unlike GS2, seemed to add a very high freq low-pass-filter on everything; something that maybe makes it harder to use the prony method.
Andreas
Developer
 
Posts: 214
Joined: Sun Feb 03, 2008 8:33 am

Re: DEF and PRF support?

Postby dahnielson » Tue Sep 09, 2008 7:35 pm

Andreas wrote:I also saw that GS3, unlike GS2, seemed to add a very high freq low-pass-filter on everything; something that maybe makes it harder to use the prony method.


Was it this?

Q0H – This high frequency quality factor has a fixed center frequency near 7.5 khz and is especially helpful in de-emphasizing the harsh overtones of upwardly transposed samples.
Anders Dahnielson

Ardour2, Qtractor, Linuxsampler, M-AUDIO Delta 1010, Axiom 61, Korg D12, AKAI S2000, E-MU Proteus 2k, Roland R-5, Roland HP 1300e, Zoom RFX-1000, 4GB RAM x86_64 Intel Pentium Dual 1.80GHz Gentoo Linux
User avatar
dahnielson
Moderator
 
Posts: 632
Joined: Wed Jan 23, 2008 11:25 pm
Location: Linköping / Tranås, Sweden

Re: DEF and PRF support?

Postby Andreas » Tue Sep 09, 2008 7:50 pm

No, it had nothing to do with the DEF, it was there even if no DEF or ordinary filters were defined in the gig. Probably an anti-aliasing filter (or just some measurement error from my side...)
Andreas
Developer
 
Posts: 214
Joined: Sun Feb 03, 2008 8:33 am

Re: DEF and PRF support?

Postby dahnielson » Tue Sep 09, 2008 8:08 pm

Ok. Well, if it's a static high freq low-pass filter then I guess it would be possible to just stop measuring freq. response before the cutoff? E.g. never have a sweep reach the cutoff freq.
Anders Dahnielson

Ardour2, Qtractor, Linuxsampler, M-AUDIO Delta 1010, Axiom 61, Korg D12, AKAI S2000, E-MU Proteus 2k, Roland R-5, Roland HP 1300e, Zoom RFX-1000, 4GB RAM x86_64 Intel Pentium Dual 1.80GHz Gentoo Linux
User avatar
dahnielson
Moderator
 
Posts: 632
Joined: Wed Jan 23, 2008 11:25 pm
Location: Linköping / Tranås, Sweden

Next

Return to General LinuxSampler Discussion

Who is online

Users browsing this forum: No registered users and 1 guest