Synchronous Sampled Tremulant Proposal

Ideas for improving the Hauptwerk software.

Synchronous Sampled Tremulant Proposal

Postby dna on Sat Sep 22, 2007 7:46 pm

In light of renewed interest in sampled theater organ tremulants. I’d like to propose a tremulant approach which I believe would be a practical way to synchronize tremulated samples. For those who know all about this subject, please jump to the “Proposed Solution” section.

Tremulant Background

A couple years ago the pros and cons of sampled vs. synthesized (I’ll be happy to use a different word or phrase if someone has a better suggestion) tremulant was discussed. There was some mention of synchronizing sampled tremulants, as I remember, but it was not considered to be practical.

There are currently two or three ways a sample provider can handle this. The first method which can be done with any version of HW is to provide two sets of samples, one sampled with the tremulant on and another with it off. This is what MidiTizer does. Another way that works with HW2 is to use wind modeling. This is not available at this time in the U.S. and I believe I read that it wouldn’t be appropriate for TO tremulant in any case. The third way is what the two currently available TO sample sets do which is to provide HW2 with tremulant waveforms and voicing parameters which HW uses to add tremulant to non-tremulated samples.

The pros and cons of using tremulated samples (the first approach above) are pretty obvious. On the plus side you are guaranteed to get the authentic sound of a tremulated pipe. The major down side is that the tremulant phase starts when you press the key, not on the timing that applies to the whole rank or group of ranks as would be the case of a real pipe organ. If you play a chord, all the notes from a given rank will usually have their tremulants out of phase (some going up in pitch and amplitude, some going down). Whether or not the resulting sound is acceptable to your ear is subjective but it is certainly not the sound you’d hear from a real pipe organ.

The HW synthesized tremulant solves the synchronization problem. The disadvantages of this approach are perhaps not so obvious, however. To my knowledge, neither TO sample set producer has let any outsider access to tremulant recordings so there is no way for most of us to directly compare the sound of the real tremulant recordings to the HW synthesized tremulant of the same pipe. The best I can do is compare it to what I hear in pipe organ recordings, live theater pipe organ concerts, and my memory of the dozen or so real theater pipe organs I’ve played over the years. My very subjective belief is that for those ranks that have deep tremulants, especially the Tibia, something of the magic of the theater organ tremulant is missing. The HW synthesized tremulant, while quite good overall, still reminds me more of an electronic organ than a real pipe organ tremulant. My guess is that the harmonic and inharmonic variations caused by the tremulant are more complex that can be simulated by simple filtering. However, without any scientific way to compare the two, I would not argue the point.

Thanks to Martin’s off-line discussion of this subject, what can be said about the HW simulated tremulant is it can result in alias and interpolation distortion and in increased CPU overhead. Most of the time this distortion is not audible. However, for pipes which have a lot of wind noise or upper harmonics in conjunction with deep tremulants, the sample set producer has to modify these samples to keep this distortion from becoming noticeable.

Synchronized Tremulant Problem

From my perspective, the ideal TO tremulant approach would be to synchronize tremulated samples to get the best of both of the above approaches without the negatives. It wasn’t immediately obvious to me how this could be done. A complete tremulant cycle is around 150 to 200 ms. You can’t very well delay the start of a sample for 200 ms just so it can be in sync with the rank’s tremulant. You can’t just jump to the right point in the tremulant sample since you’d miss the attack sound. There could be a large number of samples for each pipe starting at various times in the tremulant cycle. If we allow up to 10 ms latency, for a 200 ms tremulant cycle we’d need 20 samples. Besides the large amount of memory needed, this would not be practical for the sample producer. The same problem happens in reverse for the release sample (the waveforms that are pasted at the end when you release the key).

Proposed Solution

I image the following reasonably simple and straight-forward solution to providing a synchronized sampled tremulant has already been thought of but I don’t remember reading this idea anywhere. This is a hybrid approach which uses the current HW2 tremulant, as used in the two TO sample sets for the attack and release samples which use non-tremulated samples and uses tremulated samples for the sustained portion.

The way this would work is that HW would have a tremulant clock for each rank or group of ranks. (I assume it already does.) It would then start the attack sample exactly as it does now. What is new is that it would switch over to the tremulant sample after the attack at the end of a tremulant cycle. The amount of time spent in the attack sample would vary by up to one tremulant period depending on when the key was pressed. The reverse would occur when the key was released.

With this approach there would be no additional latency involved. The beginning and end of each note would be handled exactly as it is now. However, since the attack and release time for dry samples is short, any distortion or difference between real and synthesized tremulant sound during this brief time would, I imagine, be minimal. Where we have time to appreciate the sound of tremulated TO pipes is during sustained portions of the note and that would be using real tremulated samples.

Because this proposed solution uses two existing HW capabilities, it would seem to me that the effort to implement this in HW would be reasonable. (Of course, everything seems reasonable to the person who doesn’t know what he is talking about.) The sample producer would have to provide both the present tremulant information used by the HW tremulant simulation as well as looped tremulant pipe samples so this would be an increase in effort for them. The user would need more computer memory to store both tremulant and non-tremulant samples. However, my guess is that long tremulant samples don’t add much to the realism of a TO pipe organ. Also, the bottom 2 octaves of a 16’ rank aren’t tremulated so they just need one set of samples. In any case, dry TO samples don’t use much memory anyway compared to wet classical organs so I don’t think this is a major issue.

So far I’ve not thought of a fatal flaw to this approach. Can you think of any?
-David-NA
dna
 
Posts: 271
Joined: Sun Aug 10, 2003 4:49 pm
Location: Fremont, CA

Postby John T. on Sat Sep 22, 2007 9:24 pm

What about the difference in time that it takes each key to make contact? Just because you press a number of keys at once doesn't mean that they make contact at exactly the same time.

If there is a way to use real tremmed samples, I'm all for it. When I first started this, I was making my own samples. When I compared tremmed samples to LFO trems, I couldn't believe the difference. Definitely makes them sound more real.

Hoping...
John
John T.
 
Posts: 107
Joined: Thu Oct 12, 2006 8:29 pm
Location: Hackensack, NJ USA

Postby dna on Sat Sep 22, 2007 9:43 pm

John T. wrote:What about the difference in time that it takes each key to make contact? Just because you press a number of keys at once doesn't mean that they make contact at exactly the same time.

That is the whole point about synchronizing the real tremulant sample. Without any method to synchronize these samples, it would have exactly the problem you bring up. The method I am proposing wouldn't have that problem. All the samples from the same tremulant would be synchronized (in phase) no matter when the notes were played.

David
dna
 
Posts: 271
Joined: Sun Aug 10, 2003 4:49 pm
Location: Fremont, CA

Postby John T. on Sat Sep 22, 2007 10:03 pm

Hopefully the powers that be can investigate this and come up with a way to accomplish it. That, and the built-in convolution reverb would be worth an upgrade, to me at least.

John
John T.
 
Posts: 107
Joined: Thu Oct 12, 2006 8:29 pm
Location: Hackensack, NJ USA

Re: Synchronous Sampled Tremulant Proposal

Postby Martin_Dümig on Mon Sep 24, 2007 4:58 am

Hello dna,

dna wrote:The way this would work is that HW would have a tremulant clock for each rank or group of ranks. (I assume it already does.) It would then start the attack sample exactly as it does now. What is new is that it would switch over to the tremulant sample after the attack at the end of a tremulant cycle. The amount of time spent in the attack sample would vary by up to one tremulant period depending on when the key was pressed. The reverse would occur when the key was released.

So far I’ve not thought of a fatal flaw to this approach. Can you think of any?


Yes , i see a very big flaw in this approach.

The tremulant itsself is also generated by some mechanical equipment driven by the wind system. So its frequency is not absolutely stable, but flaws a bit around its nominal frequency, as do the pitches of the pipes. So the pipe samples with trem may have different tremulant frequencies. The big problem now is to keep the tremulant of all the sounding pipes in sync, since one has a trem with 200 ms, another with 201ms and so on.

With some pipes it is very difficult to find the right loop. This now has to be done on the fly by hauptwerk, since it has to add some sample data to keep the pipe in sync with the tremulant clock. You have to do some blend over to the beginning of the loop, and this in a quality so you can't hear it. I expect this to be more disturbing than the synthesized tremulants.

But lets think about, perhaps there is a solution...

Martin Dümig
Statement of an old organbuilder: "Immer, wenns nix worn is, nennt mas' Schwegel"
User avatar
Martin_Dümig
 
Posts: 142
Joined: Wed Dec 10, 2003 11:54 am
Location: Germany, Bayern, Neufahrn bei Freising

Postby dna on Mon Sep 24, 2007 11:31 am

Thanks , Martin. I've very happy to get your input. I think the above method has the problem you described covered. The crossover from the synthesized tremulant to the sampled tremulant isn't an arbitrary point. My assumption is that there is at least one moment in the tremulant cycle that is exactly the same as the non-tremulant sample. If that's not true, then this method doesn't work or would at least be very complicated.

Let's look at that key assumption. I'm assuming that the actual mechanical tremulant at least once every cycle provides exactly the same amount of air pressure to the pipe as the pipe would get with the tremulant off. (Actually, I think it would generally happen twice per cycle as I believe the tremulant at various times provides both more and less pressure to the pipe compared to the non-tremulant wind pressure.) At that time, the pipe, having exactly the same wind pressure as with the tremulant off will have exactly the same sound (same pitch, amplitude, same harmonics -- the same waveform).

I also assume that the HW synthesized tremulant has the same characteristic, that at least once per tremulant cycle the sound is the same as the non-tremulant sound. (I'd be surprised if it wasn't that way now but if it isn't, I would think it could be modified so it was.)

I'm calling the point where the tremulant cycle (either sampled or synthesized) is exactly the same as the non-tremulant cycle and therefore exactly the same as each other the "starting point".

The sample producer makes sure that the beginning of the sampled tremulant is exactly at the starting point. When HW needs to crossover from the synthesized tremulant to the tremulated sample, it doesn't need to do any special calculations. HW just crosses over to the tremulated sample at the point when its simulated tremulant is its starting point.

If my key assumption above is correct, I think there is very little additional HW complexity involved. If you are saying that my assumption is incorrect and there is never a "starting point" to both tremulants that doesn't sound the same, could you explain how that would happen?

-David
dna
 
Posts: 271
Joined: Sun Aug 10, 2003 4:49 pm
Location: Fremont, CA

Postby mdyde on Mon Sep 24, 2007 12:17 pm

Hello David,

Martin Dümig is mainly talking about the fact that real tremulants don't keep a very constant rate (in fact, from me experiments the rate can vary by quite a few percent from one cycle to the next), so if you looped any real tremmed sample and played it back at the same time as any other, even if they were recorded from the same tremulant and started perfectly synchronised (by any mechanism, e.g. the one you suggest), then after a few seconds the tremulants would be a long way out of phase. I think you would have to develop analysis and time-stretching software to resynthesize the samples with a constant tremulant rate. Not impossible, but certainly no small task.

A real tremmed sample is also likely to be harder to loop because not only must all of the harmonics match perfectly in pitch and phase at the loop points, but then so also must the tremulant phase. Again, I would think that could only be done reliably within a specified maximum sample length by analysis and resynthesis.

Best regards,
Martin.
mdyde
 
Posts: 4778
Joined: Fri Mar 14, 2003 2:19 pm
Location: UK

Postby Martin_Dümig on Mon Sep 24, 2007 12:34 pm

Hello David,

i think, your assuptions are correct and there will be no big difficulty to switch from the attack part or a sample without tremulant to the tremulant sample.

But again, the problem i see comes later. You have to sample all pipes two times, one time without tremulant and one time with tremulant. The samples must now be looped. To find a good loop of a sample with tremulant, you have to find a loop point where both the cycle of the pipe frequency and the cycle of the tremulant fits to the beginning of the loop.

You couldn't sample all pipes at once, but must do that pipe by pipe one after another. If the frequency of the tremulant isn't extremly stable (at least synchronized with a crystal), it has some fluctuations. So you get one sample (say the C0) with a trem frequency of 5 Hz and another sample (say from E0) with a trem frequency of 5,002 Hz. The sample of the C0 for example consists of a loop with 205000 measurements, the sample of the D0 of a loop with 205082 measurements.

Even if you are in exact sync at the beginning of the two loops, you will be soon out of sync, since the two trems (the same tremulant, but with slightly different speed at the time the samples where originally taken) do not exactly fit!

You must have one tremulant generating source, not one for every pipe in every sample.

The genial point of Hauptwerk is using long samples to save the livelyness and fluctuations of real pipes with a breathing wind supply. But this leads to samples with different looplength. Using more than one loop even raises this to a higher power, but also complicates the looping of samples with tremulant.

I think, a more success promising attempt might be to find out, what is the reason for the unnatural sounding of the synthetically tremmed pipe samples. If you could find out this, perhaps there is a way to do something against this.

With best regards - Martin Dümig
Statement of an old organbuilder: "Immer, wenns nix worn is, nennt mas' Schwegel"
User avatar
Martin_Dümig
 
Posts: 142
Joined: Wed Dec 10, 2003 11:54 am
Location: Germany, Bayern, Neufahrn bei Freising

Postby dna on Mon Sep 24, 2007 2:09 pm

Martin and Martin,

Ah, I see. Thanks. As you point out, I was incorrectly assuming that the sampled tremulant was consistent over time and therefore from sample to sample. That does appear to be at the very least, a major complication to the above approach. I suppose putting each pipe attached to the same tremulant in its own isolation booth, each with its own microphone and A/D input channel so all the samples could be taken at the same time is not too practical. :)

Without any doubt, long pipe samples without tremulant is an important if sometimes subtle quality of real pipes. I wonder, though, if it is very important to TO tremulated pipes? I'd think that the typically deep tremulant would mask most variations. If short samples could be used, perhaps a bit of time-compression/stretching could get all the samples set to the same period. But now I'm adding inaccuracies and potential distortion which is the very thing I was trying to reduce.

Back to the drawing board.

David
dna
 
Posts: 271
Joined: Sun Aug 10, 2003 4:49 pm
Location: Fremont, CA

Thousands of Attack samples

Postby Don Springer on Sat Aug 30, 2008 12:27 pm

I would point out that the attack model for, let's say, the Tibia pipe would be different if the key is depressed at the moment where the pressure cycle is at it's lowest point, than it would be when the pressure cycle is at it's highest point. So "tremmed sample" would require at least dozens of attack samples so that the attack that corresponds to the orientation of the trem, to the beginning of the note, could be selected. I believe it is true that so far, there are no Theatre Organ tremmed samples that provide accurate attack characteristics. Frankly, I find that the method used in hauptwerk is the best of currently available methods, and provides the most realistic result. I fervently pray that we will see a "tremulant frequency control" introduced soon, but I would be very disappointed to see the dual sample method introduced where there is one sample with trem, and one without. I think it would diminish the quality of the Hauptwerk product as it currently exists.
Don Springer
 
Posts: 61
Joined: Mon Sep 10, 2007 7:38 pm

Postby dna on Sun Aug 31, 2008 7:23 pm

I imagine most people on here agree with you. Each tremulant approach has advantages and disadvantages. There are at least two disadvantages of HW’s method of applying tremulant to non-tremulant samples that all current HW TO samples. One that we’ve discussed at some length is that the harmonic changes that occur during the tremulant waveform are “synthesized” and are at best only an approximation of the original. To my ear the HW synthesized Tibia tremulant does not sound as rich, realistic, and satisfying as a real Tibia on any of the available sample sets.

The other issue of the HW synthesized tremulant is that it introduces alias artifacts which are especially noticeable with deep tremulants (specifically the Tibia). Martin is aware of this and has promised to provide the option of higher order anti-aliasing to reduce or eliminate this problem. However, this will result in significantly higher CPU overhead. The problem can also be reduced just by reducing tremulant depth but at the cost of TO realism.

I wish TO sample producers would provide both tremulant options (synchronous synthesized tremulant and asynchronous tremulant samples) for at least the Tibia. Customers could then use whichever they liked best. If the amount of TO discussion on this forum the past year is any indication of the volume of HW TO sample sales, I’m not going to hold my breath.

-David
dna
 
Posts: 271
Joined: Sun Aug 10, 2003 4:49 pm
Location: Fremont, CA


Return to Suggestions and enhancements

Who is online

Users browsing this forum: No registered users and 1 guest