Showing posts with label sethares. Show all posts
Showing posts with label sethares. Show all posts

Wednesday, December 3, 2008

Pianoteq: Virtual Instrument with Many Uses

Philippe Guillaume
P   iano voicing consists in giving the piano a ‘nice’ sound. What ‘nice’ means depends of course on the pianist or the listener. This task is done by the piano technician who acts on the hammers by filing (shaping), softening or hardening them, in order to obtain a mellow sound when playing softly, and a bright sound when playing strongly. The technician also acts on the piano action, adjusting it in order to obtain even touch and sound from one note to another. Finally, the technician acts on the piano tuning itself, because the way each [three-string] unison is tuned has a great influence on how the sound develops and decays—that is, on how the piano ‘sings’.”
  —  Philippe Guillaume, INSA-Toulouse.
I   n general, Pianoteq sounds more like you are sitting in front of a real piano soundboard than any sample library does. There is that ‘It’ factor that is missing in many waveform sample libraries that helps create dynamic, believable piano sounds. And I would be lying if I didn’t say I was impressed at just how closely MODARTT has gotten to the pianos I grew up loving to play.”
  —  Brent Randall, ProRec, JUN-2008.
I   started learning the piano at school when I was eleven years old. I remember how fascinated I was the first time I heard somebody playing the Etudes of Chopin—and of course I wanted to play them too. After years of practice, there are some that I could play, but not the one I always wanted to play: Etude No. 23 in A minor. But, anyway, I loved the piano so much that I wanted to work with pianos, and that’s why I became a piano tuner. As a piano tuner, I worked for numerous piano shops in Toulouse and then I had my own repair workshop where I restored many old pianos. I have also worked for numerous concerts and music festivals in Toulouse and the surrounding region, preparing concert grands for great artists. I was always a bit frustrated not having full control of the sound to satisfy their requests. For example, when voicing a real acoustic grand, you have some control of the timbre, but cannot decide to simply increase the 6th overtone by 6 dB. ‘How could I accomplish this?’ I asked myself. I started dreaming of a device that could allow such manipulations of the sound... But it was too early to develop such a device as there were no computers available with the required processing power and speed. Twenty years later, Pianoteq was created with the aim of providing full control over the piano sound.”
  —  Philippe Guillaume, interview with IMSTA, 2007.
Virtual instruments (VIs) and soundfonts keep getting dramatically better each year. After reading several favorable reviews of MODARTT’s Pianoteq virtual piano earlier this year, I picked up a copy of Pianoteq. This CMT post aims (a) to express my very positive feelings about the product, (b) to provide a suggestion about some valuable uses for Pianoteq that are not covered in the product manual or in the reviews that have been published to-date, and (c) to offer advice on the minimum system configuration that will enable Pianoteq to deliver satisfying results.

Have a listen to a couple of MP3 clips of the Prelude No. 1 from Well-tempered Clavier Book 1 that illustrate what you can do:
Bach, WTC Book 1, Prelude No. 1 in C major, BWV 846, mm. 1 to 5

    [50-sec clip, J.S. Bach, ‘Prelude No. 1 in C major’, Pianoteq2, Equal temperament, 1.2MB MP3]

    [50-sec clip, J.S. Bach, ‘Prelude No. 1 in C major’, Pianoteq2, Kellner Baroque temperament, 1.2MB MP3]

    [50-sec clip, J.S. Bach, ‘Prelude No. 1 in C major’, Pianoteq2, Werckmeister III 12-of-19 TET temperament, 1.2MB MP3]

    [50-sec clip, J.S. Bach, ‘Prelude No. 1 in C major’, Pianoteq2, Shang Dynasty bells FXP settings, 11-TET scale, 1.2MB MP3]

    [50-sec clip, J.S. Bach, ‘Prelude No. 1 in C major’, Pianoteq2, Shruti 22-TET temperament, 1.2MB MP3]

Each of these was created by driving the same .MID file, with the velocity and pedaling and other commands.

In the case of the 11-TET Chinese bells, I created a .FXP effects-profile file that has properties mimicking the spectral analysis of the actual 433 B.C.E. bells that were found in the tomb of Marquis Yi of Zeng some 30 years ago. Using Scala software, I created a .SCL scale file with 110 cents per equal-tempered step in an 11-step-per-octave scale resembling the Chinese bell array. If you like, you can download those files here and here and upload them into your copy of Pianoteq.

The overall GUI user-interface design of Pianoteq is straightforward and uncluttered. The layout is sensible, and the controls are intuitive, entailing at most one level of drop-down/cascading menu selections. On the right-hand side there is a ‘Design’ panel that allows you to adjust the acoustical physics parameters of the soundboard (including the impedance of it, altering its sitka spruce or other materials, its thickness, its tapering at the edges, the sharpness or ‘Q’ of its resonance, and cut-off frequency) and the strings. The sympathetic resonance among the undamped strings is adjustable (à la ‘microcosmos’ by Béla Bartók)—the mathematical model accurately allows you to quantitatively vary the amount of acoustical coupling between the strings, not only with respect to their different pitches but also their physical distance from each other within the physical piano that is modeled. The dimensions of the virtual piano can be changed from less than 2 meters to as much as 10 meters, which enables you to precisely mimic actual keyboard instruments, plus instruments that are far larger or smaller than any that presently exist. The ‘Quadratic Effect’ control permits you to tweak the nonlinear strike-velocity part of the string response, generating frequencies with twice the values of the normal ones with hard strikes. Cranking this up can give you realistic higher overtones of fortississimo playing without having to physically beat your piano to death.

Incidentally, some of these settings may enable handicapped persons to achieve effects that they were once able to do on a conventional piano but are no longer able to do on account of an acquired disability. To my knowledge, none of the Pianoteq reviews or product literature has mentioned the use of Pianoteq as an ‘assistive’ technology before—i.e., the tremendous value that the Pianoteq VI would have for pianists who are disabled to a degree that impairs or prevents performance, but who are nonetheless able enough to operate a MIDI keyboard and sequencer and click on the controls of the Pianoteq GUI. It is absolutely wonderful for this, better than any other VI that I know of.

Design
The upper-middle portion of the Pianoteq GUI is ‘Voicing’, where you adjust the hardness of the hammers across the different loudness/dynamics levels and use the little vertical EQ-slider controls to change the frequency spectrum for the fundamentals and harmonics/overtones 2 through 8 for all of the strings. The ‘Character’ slider lets you control the statistical variance of the overtones’ intensities—so that the irregularity varies randomly within either narrow or wider bounds as you prefer, mimicking the gradations of color in a real piano through the various registers. You also get to adjust the amount of hammer noise and pedal noise that you want Pianoteq to add. The ‘Soft pedal’ slider controls the amount of smoothing that is activated by depressing the una corda pedal.

Voicing
The upper left-hand section lets you choose from several dozen ‘presets’ with all of the modeled parameters for Steinway concert grands and Fazioli and other instruments built-in. You can set the frequency of A4 to be something other than A440 if you wish, and the mathematics automatically takes care of modeling the implications that that has on other of the acoustical physics governed by the other settings. From a drop-down menu you can choose from a range of historic temperaments.

Temperament controls
Click on the Greek letter ‘mu’ symbol, and you are able to select a variety of built-in microtonal scales and temperaments—or, alternatively, you can load custom microtonal scales and tunings that you have built yourself as .SCL files, using Scala or a similar app.

Microtonal controls
You can also import .KBM keyboard-mapping files, to remap your keyboard’s keys to different pitches if you wish.

Microtonal controls
I particularly enjoy exploring the coloristic/textural effects of longitudinal vibrational modes in very long strings—say in a surreal piano that is 3 times as long as the longest concert grand—way bigger than anyone could afford, way bigger than anyone has a hall big enough to hold, way bigger than any manufacturer would ever make. Maybe such a piano would have to be on a concrete floor because it would be so heavy. Maybe such a piano would have to have robotic electro-hydraulically actuated hammers because the string caliber would be so much bigger than normal and the distances to where the hammers would need to hit the strings… Maybe you will have as much fun as I have been having, doing your own ‘What if?’ explorations at the margin of what is possible in the real world.

Microtonal controls
The ‘quadratic effect’ to alter the harmonic overtones spectrum as a function of key velocity is very cool, perhaps most dramatically so when you have loaded some microtonal scale and tuning scheme that has lots of unusual dissonances and sympathetic resonances…

Microtonal controls
W hat’s more, you get to adjust the amount of damper noise, the amount of pedal noise, the amount of noise generated by your key-releases, and so on. You can’t do that on any other VI that I know of. The amount of realism (or over-the-top dramatic effects) that’s achievable is mind-blowing. Yes, you have to have the patience to actually try out all of these controls. This console has many, many things you can tweak. But, unlike sampled libraries where you are forced to index into a combinatoric explosion of discrete selections, here you are moving analog sliders to change the coefficients’ values that drive Pianoteq’s models’ equations.

Microtonal controls
The full set of pedals—plus the possibility for doing fractional-pedal MIDI commands—is wonderful. You can do half-pedaling, quarter-pedaling, ‘10%-pedalling’ or even more detail if you wish. You can do re-pedaling. If you edit your MIDI file, you can create pedaling that your feet can’t physically do, if there is some really exotic pedaling effect that you’re after.

Pedals controls
You can click on the ‘Vel’ velocity display and click-and-drag the spline knots-nodes (or add more of them) to adjust the action of the piano—the relation of the dynamics of the sound produced to the velocity of the key strokes. Play a passage or load a MIDI file and see the vertical red lines show the velocity information for each note that is played. Drag the knots to change how steep or shallow the middle part of the curve is. Of course, there is nothing to prevent you from doing something other than ‘left-right-monotonic-increasing’ curves. For some paradoxical interpretations, try making it high at the left and downward-sloping to the right. Pianissimo becomes fortissimo and vice versa. Okay, don’t do that. But the point is, there is tremendous flexibility here. In fact, two of the major uses that I perceive for a professional traditional acoustic pianist to have a copy of Pianoteq are (a) to better communicate with piano technicians, both when you are at home and when you are a guest performer far away, and (b) to be able to quantitatively discover the parameters of the real-world instrument you are after, and show those (or email the .FXP settings) to the agents who are trying to find your next instrument for you. The Pianoteq FXP settings become an objective ‘specification’ for what you want—the strings, the action, the soundboard’s timbre and resonances, everything.

Velocity
For those of us who are obsessed and delighted with all things microtonal, or with early music historical temperaments, the Pianoteq VI is perfect for quickly and cheaply trying different temperaments out. Before you request that your piano technician spend hours retuning an instrument to some temperament that you have never tried before, try it out on Pianoteq.

If you have ordered a piano technician to tune an instrument to Rameau’s 1725 meantone tuning, then when he/she is done you can check the job by putting your laptop next to the instrument, putting on your headphones, launch Pianoteq set to Rameau and confirm whether the real-world instrument is as it should be or not.

For that matter, if you are a piano technician who responds to esoteric requests like this, then having Pianoteq on your laptop when you do the job will make the work tremendously faster and less tedious.

Again, these ‘composer’ and ‘musician-services’ use-cases are not described in any of the Pianoteq product materials or reviews, but they are among the most valuable things that I would imagine doing with it. In other words, performance and recording using Pianoteq may be the flashy and ‘obvious’ use-cases. But the composer-helper and pianist-instrument-hunting and disabled-pianist and pianist-pianotuner-specifier-quality-assurance use-cases are, in my opinion, likely to have far greater impact overall.

The Pianoteq dynamic mechanical and acoustics mathematical models use data issued from several recorded music sources and from a Steinway D, recorded at Studio Le Graal, 31600 Muret, France. Fazioli and Bosendorfer and other instruments have also been modeled. And a good number of harpsichords and other keyboards are available as free .FXP downloads from Pianoteq’s website.

Pianoteq’s design is by Philippe Guillaume and Julien Pommier, who are on the faculty in the Dept. of Mathematics at INSA Toulouse (links below).

You can run Pianoteq under VST or Sonar or Cubase hosts or standalone. The resonance between notes is better than any impulse response generated with any of the piano libraries I own, like Garritan and Native Instruments and Vienna Symphonic. Unlike the dynamics transitions you get with libraries, the transitions with Pianoteq are smooth, with no ‘stepping’ between layers. There should be no surprise at this, since the Pianoteq’s waveforms are governed by linear and nonlinear differential equations. You can go from pianississimo to fortississimo without any ‘edge’ of a velocity layer (velocity dynamics represented with 7-bit 127-levels quantization, far finer resolution than the ear can hear).

To edit a MIDI you record with Pianoteq, you open it in your favorite sequencer. Next, Pianoteq lets you export your piece as a .WAV audio file, which you can easily convert to .MP3 (as I did for the examples above) or other formats.

Octave-stretching. It is normal to ‘stretch’ octaves a few cents beyond 1200—especially in the upper registers in a piano, but how much should they be stretched? You decide! Pianoteq lets you tweak an octave-stretching parameter. The setting is physically modeled after real pianos, though, so the strongest effect of octave-stretching will be observed in the upper treble range. If you want to do wider octave-stretching, just get out Scala and make yourself some custom .SCLs with however many cents-per-octave you want, and that octave-stretching or octave-compression will be pan-register ‘global’ in its effect, not just in the upper registers.

Unison-tuning of three-string and two-string notes. The three strings of each piano ‘unison’ (the strings hit by a particular hammer) are not tuned to precisely the same frequency. For prober timbre and color, a piano technician introduces small tuning differences between the three strings. You can discover interesting effects by adjusting the unison width, the difference between the lowest and the highest frequency produced by the three strings of a single note. Moving the slider to the left tunes the strings closer to perfect unison. Moving the slider to the right increases the degree to which the strings are slightly out of tune. Far to the right = ‘honky tonk’.

Pianoteq’s diversity of mathematical model-generated timbres is wonderful. If you are not satisfied with what you are getting with the out-of-the-box presets, then just be patient and make some adjustments. Save your preferred tweaks as your own .FXP file. If you’re especially finicky, then capture some samples from a real-world piano that you admire—play a few passages in a location that you admire acoustically and record them with good equipment; or rip some representative patches off an SACD that has the sound you are looking for—and do spectrum analysis on it. Use that as a ‘gold standard’ to guide your Pianoteq tweaking. I swear that the few people who have posted “Oh, Pianoteq is not quite there yet” comments have either (a) simply not bothered to exert themselves to adequately tailor the Pianoteq settings to match their own preferences, (b) do not have a digital audio system in their laptop/workstation that is able to do justice to the Pianoteq output, or (c) are poseurs who play deceptive games of one-upsmanship.

In short, Pianoteq has easily become my favorite VI, on the basis of its acoustic realism, feature-function flexibility, and ease-of-use. Based on my own experience so far, (on Dell Latitude D830 and Dell Precision M6400C) I strongly recommend not trying to run on a machine that is less than 2.0 GHz. Preferably, you will want a machine that is 2.5 GHz or higher, with 2GB (or more if 64-bit) of main memory not already consumed by other apps.

If you get ‘computer overload’ messages, then set the polyphony down. ‘Polyphony’ is the number of individual sounds that Pianoteq renders simultaneously in its equation-synthesized output. The lower the clock-rate of your CPU, the lower you should set the polyphony. Or you can choose ‘Automatic’ (either ‘Auto-pessimistic’ or ‘Auto-optimistic’) to let Pianoteq automatically adjust the polyphony setting based on the CPU bandwidth that it finds available on your machine. Polyphony lower than about 24 may disappoint you acoustically, which is the reason for the suggestion above for a substantially-unused 2.5 GHz or more. If you’ve got a 3.0 GHz Intel Core 2 Duo Extreme chipset that TaskManager shows to be under 20% average CPU utilization before you start playing on Pianoteq, you’ll be fine.

Fast passages generate large amounts of polyphony, which causes CPU consumption to go way up. So does holding the sustain pedal down, obviously. Global resonance and sympathetic resonance are also CPU consuming. If you slide the global resonance and sympathetic resonance sliders all the way to the left, the resonance computations are by-passed, and the CPU load is far smaller. But you really don’t want to do that. You want to put Pianoteq on a fast machine that will give you the realism that Pianoteq’s internals are capable of delivering. [Multi-core processor resources are supported (feature is accessible in the Options pull-down menu) for high-performance acoustic rendering in Pianoteq 2.3. Dual-core and quad-core CPUs (like Intel Core 2 Duo and Extreme, AMD Phenom, etc.) are fine, although massively multiprocessor parallel systems (such as NVIDIA Tesla and similar) are currently not supported.]

One especially good thing is that, with Pianoteq, you will not need to worry about needing dozens and dozens of gigabytes of fast SATA disk to store piano sampling libraries, nor will you need to meticulously slave over carefully selecting effects from those libraries bar-by-bar, note-by-note in order to achieve realistic sound and phrasing.

MODARTT’s Pianoteq: possibly a good holiday ‘gift’ for yourself—or put it under your Tannenbaum/Weihnachtsbaum for the techie-pianist family member in your house.


Philippe Guillaume book


Sunday, April 6, 2008

Liquid Chamber Music: Inter-Voice Rhythm Slip and Non-Newtonian Shear-Dependent ‘Viscosity’ in BWV 1052

 Bach Concerto in D minor, Adagio, mm. 19 – 21, rhythmic slippage between harpsichord r.h. and other parts
W  here a rhythm is heard as anacrustic, moving from upbeat to downbeat, the downbeat exerts a kind of gravitational force, attracting notes of the upbeat to it. Since human beings experience gravity as a downward pull, [the rhythm] is readily felt as a downward fall or slide to the bottom of something. Downward slides are not constant in speed; they accelerate. And since any physical medium contains some friction, the rate of acceleration will not be constant, either; it will increase until the effect of friction is largely overcome.”
  —  William Rothstein.
Basically, polyphonic music is an emulsion. It is an ‘emulsion’ of the parts or voices that comprise it. And its physics closely resembles the physics of complex fluids in general. It has viscosity: the rhythmic rate at which the parts unfold and the rate at which rhythmic change can occur are not infinite. As a ‘liquid’, music has internal friction. And that friction or viscosity is not constant. It varies with tempo, with rhythmic velocity in individual parts, and with the biophysical possibilities and limitations of the interactions between the human flesh and the real-world instrument/voice.

 Rheologic regimes
 Viscosity (eta)
Individual musical parts embody shear contours and rhythmic isopleths in the composition—in the larger shear field that is comprised of the union of all of the parts. Layers in that sonic emulsion have different viscosities and velocities and shear rates, and the layers “slip” against each other, just as disparate layers in a physical liquid would slip.

 Epstein book
Yes, music is a liquid—it flows like blood. (The pulsatility of attractive compositions and performers’ interpretations is also subconsciously informed by the pulsatility of our hearts, our circulation?) A fancy word for the study of this sort of flow is ‘non-Newtonian rheology’. I realize that others have thought some of these thoughts before: William Rothstein comes to mind. But I think that no physicist or chemical engineer who specializes in rheology of complex liquids has ever done so—or, at least, has never done so and written about it. Why are there musician-mathematicians and musician-EEs but no musician-ChemEs?

 non-Newtonian rheology
There is shear-thinning or thixotropy in BWV 1052. (I suppose the converse, shear-thickening [‘rheopexy’], is also possible in music—although it must be rare, just as rheopexy is rare in physical liquids.)

Sometimes music is less like blood and more like paint—with lots of reverb (or, equally well, with lots of minimalist composers’ written short-timescale recapitulations of motifs), it flows and creeps after the performer (the ‘paint brush’) has passed that motif, onward to the next measure. The ‘relaxation time’ for viscoelastic effects in musical fluids can be similar to a nice latex paint.

 Rheology of paint
Sometimes music is like whipped cream—its viscosity is high enough to hold a “peak”? Maybe I am generalizing this idea of musical rheology further than I ought to do. But it seems empirically to be valid within some bounds. For example, the idea of accelerating through an anacrustic motive is a prevalent interpretation of much baroque and nineteenth-century music, if and only if the motive itself is frictionless. Rothstein said something that amounted to this, in one of his papers some years ago.

And our psychological response to ritardandos and fermatas—the rubato of the harpsichord in BWV 1052, for example, juxtaposed as it is with the rhythmic consistency of the other parts—is empirically an apprehension of vortices and rhythmic slippage.

 Flow Separation Vortices, BWV 1052 Adagio
Thixotropic liquids exhibit a time-dependent response to the shear strain rate over a longer period than that associated with the actual changes that occur in the shear strain rate. They may liquefy on being shaken and then solidify when the shaking has stopped. The analogous thing happens in music—at least in tonal music of the 20th Century and earlier. The shaking stops at the fermatas between the movements in BWV 1052. Liquefaction upon commencing the next movement amounts to a kind of psychic relief—resolution of a dramatic tension.

Linear and nearly-linear polymer liquids are predictable in the relationship of their viscosity to their structure and the polymer molecules’ conformation. In dilute solutions this relationship depends on the microscopic volume ‘swept out’ by the molecules as they tumble in the solution (their ‘hydrodynamic volume’). At low concentrations where there is minimal interaction between molecules, the viscosity may be about the same as water.

 Morrison book
Starches and other biopolymers are like this. Although attaching short sugar oligomers as branch-points to linear polysaccharides does increase their rigidity as the molecules are extended, this increases the molecular weight a lot. The effect of the molecular weight on the viscosity is dramatic as the hydrodynamic volumes of compact molecules increase approximately as the cube root of the molecular weight while the hydrodynamic volumes of branched/extended molecules increase about linearly with molecular weight.

The relationship between the intrinsic viscosity η and the relative molecular mass (Mw) is given by η = K ∙ Mw ∙ a , the Mark-Houwink equation where K and a are constants. Amylose and carboxymethylcellulose, for example, have exponents (a) of about 0.7. Knowledge of these constants allows the viscosity-averaged molecular weight to be calculated from viscosity data. A similar metric, it seems to me, could be calculated for music, such as this Bach Concerto in D minor.

Viscosity increases with solute concentration [multi-voice sixteenth-note pattern concentration transversely across parts and longitudinally, on a per-bar basis] until the shape of the volume occupied by the molecules [the rhythmic patterns] becomes elongated under stress causing some overlap between molecules [patterns] and a consequent reduction in the overall molecular volume with the consequent effect of reducing the amount that viscosity increases with further increases concentration (under non-zero stress across the bulk solution [across the polyphonal score] ). At higher concentrations (above some critical concentration C*) all the polymer molecules in the solution effectively overlap and interpenetrate (that is, their total hydrodynamic volume appears greater than the volume of the bulk liquid) even when the liquid is not under shear. When this happens, the solution behavior changes from predominantly-viscous to predominantly-elastic with the viscosity (η0 at zero stress) now governed by the small-scale rotational and vibrational mobility of the polymer molecules. This is the source of the individuality that is implied by the harpsichord ornamentations in BWV 1052: small-scale mobility in the larger ensemble-gel matrix.

C* is itself not a constant: it depends on the shear strain rate. At high shear strain rates, the rotational tumbling of the molecules sweeps out less volume. At higher concentrations the viscosity increases as about the fifth power of the concentration and this can cause synergistic behavior of mixtures, especially if there are phase separations with the attending concentration increases in some phases. Compare the highly motoric, high strain rate passages of the third movement of BWV 1052 with those in the Adagio second movement.

 Viscosity: elastic and sliding components
At high shear strain rates, molecules tend to become more ordered (oriented with respect to the direction of stress and flow, and oriented with respect to each other) and they tend also to become more elastic. Shear flow causes the molecules [the rhythmic patterns in each voice in a polyphonic composition] to become stretched and compressed (at right angles to the stretch) ... and what started out as an isotropic solution becomes anisotropic—physical properties are now strongly direction-dependent. After release from such conditions, the molecules ‘relax’ back to their unstressed configurations with a characteristic time-constant or relaxation time. Coordination within ensemble, especially in passages where there are rapid rhythms in most of the parts or all of the parts.

At low concentrations below the critical value (C*), the shear modulus of hydrocolloid solutions is mainly determined by the loss modulus at low frequencies (that is, G'' is relatively high for viscous materials). As G'' depends on the frequency but G' depends on the square of the frequency, G' becomes more important at higher frequencies. At higher concentrations in viscous solutions G' is generally greater than G'' throughout a wide frequency range. This difference is very large for strong gels when the frequency has almost negligible effect (in other words, G' is high for elastic materials). The continuo and some of the sectional writing in BWV 1052 amounts to a gel, in which the r.h. of the harpsichord part is embedded and from which it separates in various passages.

It’s convenient to express the relationship between the shear stress, the elastic stress, and the viscous stress (resulting from changing stress) in terms of a complex number ( (-1)1/2 = i) where the viscous stress is ‘in-phase’ and the elastic stress is out-of-phase and oppositely-directed:

  • shear stress = viscous stress - i ∙ elastic stress
  • complex viscosity = viscosity - i ∙ elasticity
  • tan(φ) = elasticity / viscosity
 Stress-Strain phase relationship
The shear modulus (resulting from changing strain in the liquid) is the ratio of the shear stress to the shear strain. It follows from the complex relationship similar to the above that:

  G* = G' + i G''

where G* is the complex shear modulus, G' is the in-phase ‘storage’ modulus and G'' is the out-of-phase ‘loss’ modulus; G* = Φ(G'2 + G''2). The frequency where these parameters cross over corresponds to a relaxation time (t) specific for the material [specific for the musical composition].

 Storage and Loss moduli, relation to shear
It follows that,

  tan(δ) = G'' / G'

where tan(δ) quantifies the balance between energy loss and storage in the liquid.

 Complex Shear Modulus
As tan(45°) = 1, a value for tan(δ) greater than unity indicates more ‘liquid’ properties, whereas one lower than unity means more ‘solid’ properties, regardless of the viscosity. In the motoric first movement of BWV 1052, δ ~ 0.7. And, in the Adagio δ ~ 1.3. Look at the slippage of those 64th notes. Look at the slippage between on-beat rhythms mutating to anacrustic rhythms. Turns and mordents and appogiaturas as eddies.

 Bach Concerto in D minor, Adagio, mm. 72 – 74, non-Newtonian shear-thinning between harpsichord r.h. and other parts
Here is a spreadsheet that illustrates some of the complex nonlinear functions that characterize the interrelation of viscosity and shear in a biofluid, human blood. It would be interesting to develop a quantitative theory of ‘viscosity’ in music. I myself do not have the time to do so, but maybe some music theoretician or PhD student will take it up as a dissertation topic. ( Music theory, it seems to me, needs more cross-pollination with other analytical/mathematical disciplines. Bill Sethares is one icon. ) Some links that may be helpful are provided below . . .

Spreadsheet to Calculate Blood Viscosity
 Witten book

 Comsol fluid dynamics software, false-color display of flow velocities in channel cross-section