User:Sannab/msgstr example 1

What makes Nyquist distinct from Lisp is that it is designed to work with sound, and has lots of built-in primitives and functions that synthesize, analyze, and manipulate sounds. Within Audacity, this makes it relatively easy to build complicated effects out of Nyquist's palette of built-in functions. \n \n In Nyquist, a variable can hold a sound just as easily as it can hold a number or a string. There are a lot of functions provided that allow you to stretch, distort, and combine sounds very efficiently. It is even possible to \"rip apart\" a sound and access its individual samples, but that's beyond the scope of this tutorial. \n \n To try out a Nyquist expression in Audacity, you can use \"Nyquist Prompt\" in the Effect menu. Whatever audio you have selected will be in the variable, and the selection will be replaced with the result of the Nyquist expression you enter. In Part 3, you will learn how to create a plug-in effect using Nyquist. \n \n Synthesizing \n \n The following functions all create new sounds. You can use them to create \"generate\" plug-in effects, or you can combine these synthesized sounds with selected audio to produce interesting effects. \n \n \n \n \n Envelopes\n \n \n Nyquist has support for envelopes. By applying an envelope to a sound, you can control the overall shape of its amplitude. One of the easiest ways to construct an envelope is with the  function, which takes 7 parameters that are commonly used for shaping synthesized musical notes: attack time, decay time, release time, attack level, decay level, sustain level, and overall duration. See the figure below: \n \n  \n \n To apply an envelope to a sound, just use the  function. So if  is a sound, then this is the sound with a simple envelope applied to it: \n \n \n (mult s (env 0.1 0.1 0.2 1.0 0.5 0.3 1.0))\n \n \n One of the most general type of envelope is a piece-wise linear function, which can be constructed with the  function. The pwl function takes a list of parameters which denote (time, value) pairs. There is an implicit initial (time, value) pair of (0, 0), and an implicit final value of 0. There should always be an odd number of parameters, since the final time is not implicit. For example: \n \n \n ; symmetric rise to 0.7 (at time 1) and fall back to 0 (at time 2):\n (pwl 1.0 0.7 2.0)\n \n \n Combining sounds \n \n Besides multiplying two sounds with the  function, you can add two sounds (or envelopes) with the   function. \n \n Filters \n \n Nyquist comes with a number of common filters built-in. Here are some of the more common ones: \n \n \n \n Transforming and combining sounds \n \n It is beyond the scope of this introductory tutorial to explain all of the ways that a sound can be transformed in Nyquist. These functions do not modify sounds directly, but instead modify the Nyquist environment. In order for these changes to affect sounds, you must use the  function. \n \n \n \n Next: Creating Nyquist Plug-Ins