der

Wine and place: a terroir reader / Tim Patterson and John Buechsenstein

Hayden Library - SB387.7.P385 2018




der

A theory of global biodiversity / Boris Worm and Derek P. Tittensor

Barker Library - QH541.15.B56 W67 2018




der

Landscape patterns in a range of spatio-temporal scales Alexander V. Khoroshev, Kirill N. Dyakonov, editors

Online Resource





der

A heavy intruder in a locally-shaken granular solid

Soft Matter, 2020, 16,3921-3928
DOI: 10.1039/C9SM02498K, Paper
Diego Berzi, Stefano Buzzaccaro
We experimentally investigate the gravitational-driven motion of a heavy object inside a vertical 2D assembly of identical, plastic cylinders arranged in a regular, triangular lattice.
The content of this RSS Feed (c) The Royal Society of Chemistry




der

Rotation of a submerged finite cylinder moving down a soft incline

Soft Matter, 2020, 16,4000-4007
DOI: 10.1039/C9SM02344E, Paper
Baudouin Saintyves, Bhargav Rallabandi, Theo Jules, Jesse Ault, Thomas Salez, Clarissa Schönecker, Howard A. Stone, L. Mahadevan
A fluid-immersed solid cylinder moves along a soft incline and rotates at a rate that depends on its aspect ratio and the stiffness of the incline.
The content of this RSS Feed (c) The Royal Society of Chemistry




der

Normal and shear forces between boundary sphingomyelin layers under aqueous conditions

Soft Matter, 2020, 16,3973-3980
DOI: 10.1039/D0SM00215A, Paper
Yifeng Cao, Nir Kampf, Weifeng Lin, Jacob Klein
Sphingomyelin boundary layers can maintain extremely low friction under high pressures both in water and at high salt concentration.
The content of this RSS Feed (c) The Royal Society of Chemistry




der

Structural universality in disordered packings with size and shape polydispersity

Soft Matter, 2020, Advance Article
DOI: 10.1039/D0SM00110D, Paper
Ye Yuan, Wei Deng, Shuixiang Li
Normalized free volume collapses on normalized particle size in polydisperse-sized packings for a given non-spherical particle.
To cite this article before page numbers are assigned, use the DOI form of citation above.
The content of this RSS Feed (c) The Royal Society of Chemistry




der

A Novel degradation mechanism of the elastic modulus of wet polymer substrates under nanoindentation

Soft Matter, 2020, Accepted Manuscript
DOI: 10.1039/D0SM00645A, Paper
Ruling Chen, Zhe Wang, Shaoxian Li, Hongwei Du
We demonstrated that the formation and solidification of the continuous confined water film played a very important role in changing the elastic modulus of the wet polymer substrate during nanoindentation...
The content of this RSS Feed (c) The Royal Society of Chemistry




der

Self-assembly of isomeric naphthalene appended glucono derivatives: nanofibers and nanotwists with circularly polarized luminescence emission

Soft Matter, 2020, 16,4115-4120
DOI: 10.1039/C9SM02542A, Paper
Zongwen Liu, Yuqian Jiang, Jian Jiang, Donghua Zhai, Decai Wang, Minghua Liu
Two isomers of naphthalene derivatives are self-assembled into nanofibers and nanotwists with CPL emission, respectively.
The content of this RSS Feed (c) The Royal Society of Chemistry




der

Geometry underlies the mechanical stiffening and softening of an indented floating film

Soft Matter, 2020, 16,4121-4130
DOI: 10.1039/D0SM00250J, Paper
Open Access
Monica M. Ripp, Vincent Démery, Teng Zhang, Joseph D. Paulsen
Using experiments, simulations, and theory, we map out the remarkably rich mechanical response of a floating polymer film to indentation.
The content of this RSS Feed (c) The Royal Society of Chemistry




der

Ordering of binary colloidal crystals by random potentials

Soft Matter, 2020, 16,4267-4273
DOI: 10.1039/D0SM00208A, Paper
André S. Nunes, Sabareesh K. P. Velu, Iryna Kasianiuk, Denis Kasyanyuk, Agnese Callegari, Giorgio Volpe, Margarida M. Telo da Gama, Giovanni Volpe, Nuno A. M. Araújo
A random potential can control the number of defects in a binary colloidal crystal.
The content of this RSS Feed (c) The Royal Society of Chemistry




der

Sustainable sorbitol-derived compounds for gelation of the full range of ethanol–water mixtures

Soft Matter, 2020, Advance Article
DOI: 10.1039/D0SM00343C, Paper
Glenieliz C. Dizon, George Atkinson, Stephen P. Argent, Lea T. Santu, David B. Amabilino
A combination of gelators prepared from sustainable sources combine in a synergic way to widen the scope for the compounds to immobilise liquids, as shown by imaging, diffraction and rheology measurements.
To cite this article before page numbers are assigned, use the DOI form of citation above.
The content of this RSS Feed (c) The Royal Society of Chemistry




der

Understanding and increasing digital readiness


The Cisco Digital Readiness Index was developed to holistically measure a countryâ€TMs level of digital readiness.
More RSS Feed for Cisco: newsroom.cisco.com/rss-feeds ...




der

T.N. to order 10 lakh more RT-PCR testing kits

Tamil Nadu is ordering 10 lakh more RT-PCR (reverse transcription-polymerase chain reaction) testing kits to ramp up testing across the State.Accordin




der

Madras High Court orders closure of all Tasmac liquor shops in Tamil Nadu

The Madras High Court on Friday directed the State government to close all 3,850 liquor shops run by the Tamil Nadu State Marketing Corporation (Tasma




der

[ASAP] Describing Meta-Atoms Using the Exact Higher-Order Polarizability Tensors

ACS Photonics
DOI: 10.1021/acsphotonics.9b01776




der

[ASAP] Plasmon-Mediated Coherent Superposition of Discrete Excitons under Strong Exciton–Plasmon Coupling in Few-Layer MoS<sub>2</sub> at Room Temperature

ACS Photonics
DOI: 10.1021/acsphotonics.0c00233




der

[ASAP] Update to Our Reader, Reviewer, and Author Communities—April 2020

ACS Photonics
DOI: 10.1021/acsphotonics.0c00628




der

Building a Dictaphone Using Media Recorder and getUserMedia

Chris Mills brushes up his shorthand and shows how the MediaStream Recording API in modern browsers can be used to capture audio directly from the user’s device. Inching ever closer to the capabilities of native software, it truly is an exciting time to be a web developer.


The MediaStream Recording API makes it easy to record audio and/or video streams. When used with MediaDevices.getUserMedia(), it provides an easy way to record media from the user’s input devices and instantly use the result in web apps. This article shows how to use these technologies to create a fun dictaphone app.

A sample application: Web Dictaphone

To demonstrate basic usage of the MediaRecorder API, we have built a web-based dictaphone. It allows you to record snippets of audio and then play them back. It even gives you a visualisation of your device’s sound input, using the Web Audio API. We’ll just concentrate on the recording and playback functionality in this article, for brevity’s sake.

You can see this demo running live, or grab the source code on GitHub. This has pretty good support on modern desktop browsers, but pretty patchy support on mobile browsers currently.

Basic app setup

To grab the media stream we want to capture, we use getUserMedia(). We then use the MediaRecorder API to record the stream, and output each recorded snippet into the source of a generated <audio> element so it can be played back.

We’ll first declare some variables for the record and stop buttons, and the <article> that will contain the generated audio players:

const record = document.querySelector('.record');
const stop = document.querySelector('.stop');
const soundClips = document.querySelector('.sound-clips');

Next, we set up the basic getUserMedia structure:

if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
   console.log('getUserMedia supported.');
   navigator.mediaDevices.getUserMedia (
      // constraints - only audio needed for this app
      {
         audio: true
      })

      // Success callback
      .then(function(stream) {

      })

      // Error callback
      .catch(function(err) {
         console.log('The following `getUserMedia` error occured: ' + err);
      }
   );
} else {
   console.log('getUserMedia not supported on your browser!');
}

The whole thing is wrapped in a test that checks whether getUserMedia is supported before running anything else. Next, we call getUserMedia() and inside it define:

  • The constraints: Only audio is to be captured for our dictaphone.
  • The success callback: This code is run once the getUserMedia call has been completed successfully.
  • The error/failure callback: The code is run if the getUserMedia call fails for whatever reason.

Note: All of the code below is found inside the getUserMedia success callback in the finished version.

Capturing the media stream

Once getUserMedia has created a media stream successfully, you create a new Media Recorder instance with the MediaRecorder() constructor and pass it the stream directly. This is your entry point into using the MediaRecorder API — the stream is now ready to be captured into a <Blob>, in the default encoding format of your browser.

const mediaRecorder = new MediaRecorder(stream);

There are a series of methods available in the MediaRecorder interface that allow you to control recording of the media stream; in Web Dictaphone we just make use of two, and listen to some events. First of all, MediaRecorder.start() is used to start recording the stream once the record button is pressed:

record.onclick = function() {
  mediaRecorder.start();
  console.log(mediaRecorder.state);
  console.log("recorder started");
  record.style.background = "red";
  record.style.color = "black";
}

When the MediaRecorder is recording, the MediaRecorder.state property will return a value of “recording”.

As recording progresses, we need to collect the audio data. We register an event handler to do this using mediaRecorder.ondataavailable:

let chunks = [];

mediaRecorder.ondataavailable = function(e) {
  chunks.push(e.data);
}

Last, we use the MediaRecorder.stop() method to stop the recording when the stop button is pressed, and finalize the Blob ready for use somewhere else in our application.

stop.onclick = function() {
  mediaRecorder.stop();
  console.log(mediaRecorder.state);
  console.log("recorder stopped");
  record.style.background = "";
  record.style.color = "";
}

Note that the recording may also stop naturally if the media stream ends (e.g. if you were grabbing a song track and the track ended, or the user stopped sharing their microphone).

Grabbing and using the blob

When recording has stopped, the state property returns a value of “inactive”, and a stop event is fired. We register an event handler for this using mediaRecorder.onstop, and construct our blob there from all the chunks we have received:

mediaRecorder.onstop = function(e) {
  console.log("recorder stopped");

  const clipName = prompt('Enter a name for your sound clip');

  const clipContainer = document.createElement('article');
  const clipLabel = document.createElement('p');
  const audio = document.createElement('audio');
  const deleteButton = document.createElement('button');

  clipContainer.classList.add('clip');
  audio.setAttribute('controls', '');
  deleteButton.innerHTML = "Delete";
  clipLabel.innerHTML = clipName;

  clipContainer.appendChild(audio);
  clipContainer.appendChild(clipLabel);
  clipContainer.appendChild(deleteButton);
  soundClips.appendChild(clipContainer);

  const blob = new Blob(chunks, { 'type' : 'audio/ogg; codecs=opus' });
  chunks = [];
  const audioURL = window.URL.createObjectURL(blob);
  audio.src = audioURL;

  deleteButton.onclick = function(e) {
    let evtTgt = e.target;
    evtTgt.parentNode.parentNode.removeChild(evtTgt.parentNode);
  }
}

Let’s go through the above code and look at what’s happening.

First, we display a prompt asking the user to name their clip.

Next, we create an HTML structure like the following, inserting it into our clip container, which is an <article> element.

<article class="clip">
  <audio controls></audio>
  <p>_your clip name_</p>
  <button>Delete</button>
</article>

After that, we create a combined Blob out of the recorded audio chunks, and create an object URL pointing to it, using window.URL.createObjectURL(blob). We then set the value of the <audio> element’s src attribute to the object URL, so that when the play button is pressed on the audio player, it will play the Blob.

Finally, we set an onclick handler on the delete button to be a function that deletes the whole clip HTML structure.

So that’s basically it — we have a rough and ready dictaphone. Have fun recording those Christmas jingles! As a reminder, you can find the source code, and see it running live, on the MDN GitHub.


This article is based on Using the MediaStream Recording API by Mozilla Contributors, and is licensed under CC-BY-SA 2.5.


About the author

Chris Mills manages the MDN web docs writers’ team at Mozilla, which involves spreadsheets, meetings, writing docs and demos about open web technologies, and occasional tech talks at conferences and universities. He used to work for Opera and W3C, and enjoys playing heavy metal drums and drinking good beer.

More articles by Chris




der

A Modern Typographic Scale

Rob Weychert reaches for the top notes to sing us a song of typographic scale. A little attention to scale and to the mathematics will help you to hit a high note with your designs this Christmas and beyond.


I’ve been studying music theory this year. While some of its core concepts were already familiar to me, much of their specifics were not. Or so I thought. A funny thing happened when I was learning the major scales.

While playing through a song I had written some years before, I started picking it apart to see how it correlated with the theory I was learning. I had composed the melody without any thought to what the specific notes were, but as I started to transcribe them, a pattern quickly emerged: all the B’s and E’s were flat and the rest of the notes were natural. Lo and behold, long before my music theory studies began, I had written a song in B♭ major. My ears already knew how the major scales worked even if my brain didn’t. (If you know how “do re mi fa so la ti do” is supposed to sound tonally, then your ears know, too.)

When music is composed to a scale, it sounds “right” to us. And just as our ears appreciate harmony and melody with a rational basis, our eyes can appreciate the same concepts applied to spatial relationships.

Have you ever struggled with sizing type in a design project, especially when you need more than just one or two sizes? Have you ever despaired at the number of ad-hoc type sizes on your site spiraling out of control over time? It could be that you’ve been composing the typographic equivalent of a cacophonous symphony. And the first thing any composer will tell you to do is to get that thing on a scale.

Meet the typographic scale

You don’t need to know music theory to work with a typographic scale. You only need to know that a scale is a range of values with an established mathematic relationship. For a typographic scale, that relationship is frequently a steady interval between type sizes. Depending on what you need your type to do, the interval might be fixed (e.g. each size is two pixels bigger than the size before it) or it might be proportional (e.g. each size is twice as big as the size before it). I personally rarely find fixed intervals useful, so I’ll be focusing on proportional intervals.

The most important thing to understand about proportional intervals is thankfully not complicated: The bigger the intervals are, the more drastic the size differences will be in your scale. If your layout calls for contrast, a bigger interval might be the way to go. If you’re aiming for something more nuanced, go smaller. But keep these things in mind:

  • There is such a thing as too much nuance: if a size on your scale is virtually indistinguishable from the sizes adjacent to it, it defeats the purpose of using a scale.
  • On the flip side, too much contrast renders the sizes’ proportional relationship moot. At a certain point, massive display type is arguably more graphic than textual.
  • More is less. The more sizes you use, the less they’ll mean.
A small interval (left, 1.1) offers a smoother range of sizes; a large interval (right, 1.8) offers more contrast.

Setting up the scale variables

The quickest way to get a scale up and running when working on the web is to drop its values into some CSS variables. The naming convention I typically use begins with --scale0, which is the body text size. The size below it is --scale-1 (as in “scale minus one”), the size above it is --scale1, and so on. Keeping the names relative to each other like this helps me move around the scale intuitively as I use it. If, say, --scale4 isn’t big enough for my h1, I can move up to --scale5 or --scale6, and I always know exactly how many steps away from the body text I am. Here’s a first pass at a simple set of scale variables using an interval of 1.5:

:root {
  --scale-2: 7.1px;  /* 10.7 ÷ 1.5 */
  --scale-1: 10.7px; /* 16 ÷ 1.5   */
  --scale0: 16px;    /* body text  */
  --scale1: 24px;    /* 16 × 1.5   */
  --scale2: 36px;    /* 24 × 1.5   */
}

I can use these variables with any CSS property that accepts a numeric value, like so:

p { font-size: var(--scale0); }

Rooting around in rems

I’m off to a good start. However, those px values are a little too absolute for my liking. If I convert them to rems, it’ll give my scale more flexibility. rem stands for “root em.” 1rem is equivalent to the html element’s text size, which in most browsers defaults to 16px. Crucially, though, users can adjust that size in their browser settings, and using rems in my CSS will respect those preferences.

:root {
  --scale-2: 0.4rem;  /* 0.7rem ÷ 1.5 */
  --scale-1: 0.7rem;  /* 1rem ÷ 1.5   */
  --scale0: 1rem;     /* body text    */
  --scale1: 1.5rem;   /* 1rem × 1.5   */
  --scale2: 2.25rem;  /* 1.5rem × 1.5 */
}

Another benefit of the relative nature of rems: I tend to use larger text sizes on large viewports and smaller text sizes on small viewports. Rather than adjusting dozens or hundreds of typographic CSS declarations per breakpoint, I can shift the whole scale up or down merely by adjusting the font-size on the html element:

html { font-size: 100%; }     /* 1rem = 16px */

@media screen and (min-width: 25em) {
  html { font-size: 112.5%; } /* 1rem = 18px */
}

Calculating with calc()

My scale is coming along. Its variables’ intuitive names make it easy for me to use, and its rem values respect the user’s browser preferences and allow me to easily shift the size of the entire scale at different viewport sizes. But my setup still isn’t optimized for one very important adjustment: the interval, which is currently 1.5. If 1.5 isn’t quite working for me and I want to see how an increase or decrease will affect the scale, I need to do the math all over again for every step in the scale every time I adjust the interval. The bigger the scale, the more time that will take. It’s time to put down the abacus and get calc() involved.

:root {
  --int: 1.5;
  --scale0: 1rem;
  --scale-1: calc(var(--scale0) / var(--int));
  --scale-2: calc(var(--scale-1) / var(--int));
  --scale1: calc(var(--scale0) * var(--int));
  --scale2: calc(var(--scale1) * var(--int));
}

My interval now has its very own variable, called --int. calc() determines each scale size by multiplying the preceding size by --int. Now that every size is ultimately dependent on --scale0’s value, --scale0 must appear first in the list. Since the sizes smaller than --scale0 are going down rather than up, their values require division rather than multiplication.

Scaling the scale

I can now quickly and easily tweak my scale’s interval by adjusting --int until the proportions are just right, but if I want to add more sizes to the scale, I need to add more variables and calc() values. This isn’t too big of a deal, but if I want to double or triple the number of sizes, it’s kind of a headache. Luckily, this is the sort of thing Sass is really good at. In the following code, adjusting the first four Sass variables at the top of :root will quickly spin up a set of CSS variables like the scale above, with any interval (proportional or fixed) and any number of scale sizes:

:root {
  $interval: 1.5;    // Unitless for proportional, unit for fixed
  $body-text: 1rem;  // Must have a unit
  $scale-min: -2;    // Unitless negative integer
  $scale-max: 2;     // Unitless positive integer

  --int: #{$interval};
  --scale0: #{$body-text};

  @if $scale-min < 0 {
  // Generate scale variables smaller than the base text size
    @for $i from -1 through $scale-min {
      @if type-of($interval) == number {
        @if unitless($interval) {
          --scale#{$i}: calc(var(--scale#{$i + 1}) / var(--int));
        } @else {
          --scale#{$i}: calc(var(--scale#{$i + 1}) - var(--int));
        }
      }
    }
  }
  @if $scale-max > 0 {
    // Generate scale variables larger than the base text size
    @for $i from 1 through $scale-max {
      @if type-of($interval) == number {
        @if unitless($interval) {
          --scale#{$i}: calc(var(--scale#{$i - 1}) * var(--int));
        } @else {
          --scale#{$i}: calc(var(--scale#{$i - 1}) + var(--int));
        }
      }
    }
  }
}

Go forth and scale

Typographic scales have been an indispensable part of my work for many years, and CSS variables and calc() make setup, adjustments, and experimentation easier than ever. I hope you find these techniques as useful as I do!


About the author

Rob Weychert is a Brooklyn-based designer. He helps shape the reading experience at ProPublica and has previously helped make books at A Book Apart, games at Harmonix, and websites at Happy Cog. In his free time, he obsesses over music and film. Despite all this, he is probably best known as a competitive air guitarist.

More articles by Rob




der

Cigarette taxes and teen marijuana use [electronic resource] / D. Mark Anderson, Kyutaro Matsuzawa, Joseph J. Sabia

Cambridge, Mass. : National Bureau of Economic Research, 2020




der

FOOD MARKETING INSTITUTE v. ARGUS LEADER MEDIA. Decided 06/24/2019




der

Leadership decapitation: strategic targeting of terrorist organizations / Jenna Jordan

Dewey Library - HV6431.J674 2019




der

The modern Republican Party in Florida / Peter Dunbar and Mike Haridopolos

Dewey Library - JK2358.F5 D86 2019




der

Primary elections in the United States / Shigeo Hirano, Columbia University ; James M. Snyder, Jr., Harvard University

Dewey Library - JK2071.H57 2019




der

No visible bruises: what we don't know about domestic violence can kill us / Rachel Louise Snyder

Dewey Library - HV6626.2.S59 2019




der

Monsters to destroy: understanding the "War on Terror" / Navin A. Bapat

Dewey Library - HV6432.B364 2019




der

The suspect: an Olympic bombing, the FBI, the media, and Richard Jewell, the man caught in the middle / Kent Alexander & Kevin Salwen

Dewey Library - HV8079.B62 A44 2019




der

Managing interdependencies in federal systems: intergovernmental councils and the making of public policy / Johanna Schnabel

Online Resource




der

Militarization: a reader / Roberto J. González, Hugh Gusterson, Gustaaf Houtman, editors ; in collaboration with Catherine Besteman, Andrew Bickford, Catherine Lutz, Katherine T. McCaffrey, Austin Miller, David H. Price, David Vine

Dewey Library - U21.2.M558 2019




der

The Oxford handbook of modern British political history, 1800-2000 / edited by David Brown, Gordon Pentland, and Robert Crowcroft

Online Resource




der

Handbook of military sciences edited by Anders Sookermany

Online Resource




der

The commander's dilemma: violence and restraint in wartime / Amelia Hoover Green

Dewey Library - JC328.6.H67 2018




der

Murder, Inc.: the CIA under John F. Kennedy / James H. Johnston

Dewey Library - JK468.I6 J628 2019




der

The American lab: an insider's history of the Lawrence Livermore National Laboratory / C. Bruce Tarter

Hayden Library - U394.L58 T37 2018




der

Genealogies of terrorism: revolution, state violence, empire / Verena Erlenbusch-Anderson

Dewey Library - HV6431.E744 2018




der

Leadership studies and the desire for shared agreement: a narrative inquiry / Stan Amaladas

Dewey Library - JF1525.L4 A63 2019




der

The gang paradox: inequalities and miracles on the U.S.-Mexico border / Robert J. Durán

Hayden Library - HV6439.M58 D87 2018




der

Developing public sector leadership: new rationale, best practices and tools / Petri Virtanen, Marika Tammeaid

Online Resource




der

Intelligence and state surveillance in modern societies: an international perspective / by Frederic Lemieux

Dewey Library - JF1525.I6 L46 2019




der

Imperial nation: ruling citizens and subjects in the British, French, Spanish, and American empires / Joseph M. Fredera ; translated by Ruth MacKay

Dewey Library - JC359.F6313 2018




der

Security and terror: American culture and the long history of colonial modernity / Eli Jelly-Schapiro

Dewey Library - HV6432.J445 2018




der

Identities, trust, and cohesion in federal systems: public perspectives / edited by Jack Jedwab and John Kincaid

Dewey Library - JC355.I34 2018




der

Sexual and gender-based violence: a complete clinical guide / Veronica Ades, editor

Online Resource




der

Federalism and national diversity in the 21st Century / Arjun Tremblay, Alain-G Gagnon

Online Resource




der

Gender equality in politics: implementing party quotas in Germany and Austria / Petra Ahrens, Katja Chmilewski, Sabine Lang, Birgit Sauer

Online Resource




der

The sexual politics of gendered violence and women's citizenship / Suzanne Franzway, Nicole Moulding, Sarah Wendt, Carole Zufferey, Donna Chung

Dewey Library - HV6626.F73 2019




der

Presidential Rhetoric on Terrorism under Bush, Obama and Trump: Inflating and Calibrating the Threat After 9/11 / Gabriel Rubin

Online Resource




der

The national question and electoral politics in Quebec and Scotland / Éric Bélanger, Richard Nadeau, Ailsa Henderson, Eve Hepburn

Dewey Library - JC311.B45 2018