Notice: Trying to access array offset on value of type bool in /home1/freesand/public_html/wp-content/plugins/wiki-embed/WikiEmbed.php on line 112

Notice: Trying to access array offset on value of type bool in /home1/freesand/public_html/wp-content/plugins/wiki-embed/WikiEmbed.php on line 112

Notice: Trying to access array offset on value of type bool in /home1/freesand/public_html/wp-content/plugins/wiki-embed/WikiEmbed.php on line 116
FreeSandal | 輕。鬆。學。部落客 | 第 251 頁

勇闖新世界︰ W!o《卡夫卡村》變形祭︰品味科學‧教具教材‧【專題】 PD‧箱子世界‧正交

雖然不知道『聲波』振動與傳播的物理,並不妨礙 Miller Puckette 先生書中文章之應用。然而若能知道那些原理,或許可以深化理解 ,不只是『知其然』,進而能知『所以然』的吧!所以此處先列出一些與之相關文本系列之首篇,方便讀者參考︰

【Sonic π】聲波之傳播原理︰振動篇

【Sonic π】聲波之傳播原理︰原理篇《一》

【Sonic π】聲波之傳播原理︰共振篇《一》

以期在運用科技之時,還能欣賞自然耶!!

比方說 Miller Puckette 在 1.6 節文中,用著簡易的數學來談『訊號疊加』現象,

1.6 Superposing Signals

If a signal x[n] has a peak or RMS amplitude A (in some fixed window), then the scaled signal k · x[n] (where k ≥ 0) has amplitude kA. The mean power of the scaled signal changes by a factor of k 2 . The situation gets more complicated when two different signals are added together; just knowing the amplitudes of the two does not suffice to know the amplitude of the sum. The two amplitude measures do at least obey triangle inequalities; for any two signals x[n] and y[n],

If we fix a window from M to N + M − 1 as usual, we can write out the mean power of the sum of two signals:

where we have introduced the covariance of two signals:

The covariance may be positive, zero, or negative. Over a sufficiently large window, the covariance of two sinusoids with different frequencies is negligible compared to the mean power. Two signals which have no covariance are called uncorrelated (the correlation is the covariance normalized to lie between -1 and 1). In general, for two uncorrelated signals, the power of the sum is the sum of the powers:

Put in terms of amplitude, this becomes:

This is the familiar Pythagorean relation. So uncorrelated signals can be thought of as vectors at right angles to each other; positively correlated ones as having an acute angle between them, and negatively correlated as having an obtuse angle between them.
For example, if two uncorrelated signals both have RMS amplitude a, the sum will have RMS amplitude \sqrt{a}. On the other hand if the two signals happen to be equal—the most correlated possible—the sum will have amplitude 2a, which is the maximum allowed by the triangle inequality.

………

 

引出『不相關』 uncorrelated 訊號間有直角三角形『畢氏關係』。說明了頻率不同之『正弦波』 sinusoids 通常『不相關』 。假使此時補之以《【Sonic π】聲波之傳播原理︰原理篇《四下》》文本所講的『駐波』,這也是許多『樂器』的發聲原理︰

火車

200px-Shock_sink

220px-Eisbach_die_Welle_Surfer

250px-Standingwaves.svg

駐波形成

在一輛長列『左行』的火車上有一個很長的『水槽』,上有一向右的『行進波
u(x, t) = A(x,\ t)\sin (kx - \omega t + \phi)
,假使向左的火車與向右之水波速度相同,那麼一位站在月台的『觀察者』 將如何描述那個『行進波』的呢?

如果觀察水由水龍頭注入水槽的現象,由於水在到達槽底前的流速『較快』,然而到達槽底後水的流速突然的『變慢』,因此會發生『水躍』Hydraulic jump 的現象,此時水之部份動能將轉換為位能,故而在槽底的液面形成『駐波』。這個現象在『河水』的『流速』突然『由快變慢』時也可能發生,因而有人能在『河裡衝浪』,他正站在『駐波』之上!!

那什麼是『駐波』的呢?比方說一個『不動的』stationary 介質中,向左的波 u_l(k x + \omega t) 與向右的波 u_r(k x - \omega t) 疊加後的『合成波u_l +u_r,在『特定』的『邊界條件』下,被『侷限』在一定『空間區域』內無法前進,因此稱為『駐波』。由於駐波不能傳播能量,它的能量將『儲存』在那個空間區域裡。駐波所在區域,『振幅為零』的點稱為『節點』或『波節』Node ,『振幅最大』的點位於兩『節點』之間,通常叫做『腹點』或『波腹』Antinode。

120px-Standing_wave_2

120px-Standing_waves_on_a_string

120px-Drum_vibration_mode01

120px-Drum_vibration_mode21

一根長度 L 震盪的弦上,一個向右的簡諧波 u_r = u_0  \sin(kx - \omega t),由於弦的兩頭固定,那個波在右端點也只能『反射』回來,形成了 u_l = u_0  \sin(kx + \omega t),此時合成波 u = u_l + u_r
u\; = u_0\sin(kx - \omega t) + u_0 \sin(kx + \omega t)
,可用三角恆等式簡化為
u = 2 u_0\cos(\omega t)\sin(kx)
。此時『時間項』與『空間項』分離,形成『駐波』。在 kx = n \pi 時,\sin(kx) = 0,此處 n 是整數,這就是『節點』;當 kx = n \pi + \frac{\pi}{2}\parallel \sin(kx) = 1 \parallel,也就是『腹點』。當然波長 \lambda 就得滿足 \lambda = \frac {L}{n \pi} 的邊界條件。

─── 琴弦擇音而振, 苟非知音焉得共鳴。───

───

 

當更能了解那些滿足 \lambda = \frac {L}{n \pi} 『波長』關係的『頻率』構成了那根『弦』的『泛音』。不同『音色』的『弦』正因此『泛音』頻譜不同而出色。或也將知這也是『正交函數族』 Orthogonal functions 的發展以及『傅立葉級數』之歷史濫觴乎︰

Hilbert space interpretation

In the language of Hilbert spaces, the set of functions {e_n=e^{inx}; nZ} is an orthonormal basis for the space L2([−ππ]) of square-integrable functions of [−ππ]. This space is actually a Hilbert space with an inner product given for any two elements f and g by

\langle f,\, g \rangle \;\stackrel{\mathrm{def}}{=} \; \frac{1}{2\pi}\int_{-\pi}^{\pi} f(x)\overline{g(x)}\,dx.

The basic Fourier series result for Hilbert spaces can be written as

f=\sum_{n=-\infty}^\infty \langle f,e_n \rangle \, e_n.
This corresponds exactly to the complex exponential formulation given above. The version with sines and cosines is also justified with the Hilbert space interpretation. Indeed, the sines and cosines form an orthogonal set:
400px-Fourier_series_integral_identities
Sines and cosines form an orthonormal set, as illustrated above. The integral of sine, cosine and their product is zero (green and red areas are equal, and cancel out) when m, n or the functions are different, and pi only if m and n are equal, and the function used is the same.
\int_{-\pi}^{\pi} \cos(mx)\, \cos(nx)\, dx = \pi \delta_{mn}, \quad m, n \ge 1, \,
\int_{-\pi}^{\pi} \sin(mx)\, \sin(nx)\, dx = \pi \delta_{mn}, \quad m, n \ge 1

(where δmn is the Kronecker delta), and

\int_{-\pi}^{\pi} \cos(mx)\, \sin(nx)\, dx = 0;\,

furthermore, the sines and cosines are orthogonal to the constant function 1. An orthonormal basis for L2([−π,π]) consisting of real functions is formed by the functions 1 and √2 cos(nx),  √2 sin(nx) with n = 1, 2,…  The density of their span is a consequence of the Stone–Weierstrass theorem, but follows also from the properties of classical kernels like the Fejér kernel.

───

 

若非如此,樂器將如何和鳴共奏呢?或終可聞箱子天籟之聲的耶 ??!!

 

 

 

 

 

 

 

 

 

 

 

勇闖新世界︰ W!o《卡夫卡村》變形祭︰品味科學‧教具教材‧【專題】 PD‧箱子世界‧取樣

繚綾》 唐‧白居易

繚綾繚綾何所似,不似羅綃與紈綺。
應似天台山上月明前,四十五尺瀑布泉。
中有文章又奇絕,地鋪白煙花簇雪。
織者何人衣者誰,越溪寒女漢宮姬。
去年中使宣口敕,天上取樣人間織。
織爲雲外秋雁行,染作江南春水色。
廣裁衫袖長制裙,金鬥熨波刀翦紋。
異彩奇文相隱映,轉側看花花不定。
昭陽舞人恩正深,春衣一對直千金。
汗沾粉污不再著,曳土蹋泥無惜心。
繚綾織成費功績,莫比尋常繒與帛。
絲細繰多女手疼,紮紮千聲不盈尺。
昭陽殿里歌舞人。若見織時應也惜。

 

一首《繚綾》之詩,繫念女工之劬勞。如何能夠取樣天上?竟然還可人間織 !完成那織為雲外秋雁行,染作江南春水色。詩人白居易常帶給人讚嘆與哀愁。《說文解字》:  樣 樣,栩實。从木,羕聲 。宛如似樹木的年輪,相似卻又不同一般。引人想起了『類比電腦 』

Analog computer

An analog computer is a form of computer that uses the continuously changeable aspects of physical phenomena such as electrical, mechanical, or hydraulic quantities to model the problem being solved. In contrast, digital computers represent varying quantities symbolically, as their numerical values change. As an analog computer does not use discrete values, but rather continuous values, processes cannot be reliably repeated with exact equivalence, as they can with Turing machines. Analog computers do not suffer from the quantization noise inherent in digital computers, but are limited instead by analog noise.

Analog computers were widely used in scientific and industrial applications where digital computers of the time lacked sufficient performance. Analog computers can have a very wide range of complexity. Slide rules and nomographs are the simplest, while naval gunfire control computers and large hybrid digital/analog computers were among the most complicated.[1] Systems for process control and protective relays used analog computation to perform control and protective functions.

The advent of digital computing and its success made analog computers largely obsolete in 1950s and 1960s, though they remain in use in some specific applications, like the flight computer in aircraft, and for teaching control systems in universities.

 

Bifnordennomenclature

A page from the Bombardier’s Information File (BIF) that describes the components and controls of the Norden bombsight. The Norden bombsight was a highly sophisticated optical/mechanical analog computer used by the United States Army Air Force during World War II, the Korean War, and the Vietnam War to aid the pilot of a bomber aircraft in dropping bombs accurately.

 

的沒落史。這一切可說是『取樣理論』發展的必然結果!『類比』終究會為『數位』所取代。

Sampling (signal processing)

In signal processing, sampling is the reduction of a continuous signal to a discrete signal. A common example is the conversion of a sound wave (a continuous signal) to a sequence of samples (a discrete-time signal).

A sample is a value or set of values at a point in time and/or space.

A sampler is a subsystem or operation that extracts samples from a continuous signal.

A theoretical ideal sampler produces samples equivalent to the instantaneous value of the continuous signal at the desired points.

300px-Signal_Sampling

Signal sampling representation. The continuous signal is represented with a green colored line while the discrete samples are indicated by the blue vertical lines.

Theory

Sampling can be done for functions varying in space, time, or any other dimension, and similar results are obtained in two or more dimensions.

For functions that vary with time, let s(t) be a continuous function (or “signal”) to be sampled, and let sampling be performed by measuring the value of the continuous function every T seconds, which is called the sampling interval.[1]  Then the sampled function is given by the sequence:

s(nT),   for integer values of n.

The sampling frequency or sampling rate, fs, is the average number of samples obtained in one second (samples per second), thus fs = 1/T.

Reconstructing a continuous function from samples is done by interpolation algorithms. The Whittaker–Shannon interpolation formula is mathematically equivalent to an ideal lowpass filter whose input is a sequence of Dirac delta functions that are modulated (multiplied) by the sample values. When the time interval between adjacent samples is a constant (T), the sequence of delta functions is called a Dirac comb. Mathematically, the modulated Dirac comb is equivalent to the product of the comb function with s(t). That purely mathematical abstraction is sometimes referred to as impulse sampling.[2]

Most sampled signals are not simply stored and reconstructed. But the fidelity of a theoretical reconstruction is a customary measure of the effectiveness of sampling. That fidelity is reduced when s(t) contains frequency components whose periodicity is smaller than 2 samples; or equivalently the ratio of cycles to samples exceeds ½ (see Aliasing). The quantity ½ cycles/sample × fs samples/sec = fs/2 cycles/sec (hertz) is known as the Nyquist frequency of the sampler. Therefore, s(t) is usually the output of a lowpass filter, functionally known as an anti-aliasing filter. Without an anti-aliasing filter, frequencies higher than the Nyquist frequency will influence the samples in a way that is misinterpreted by the interpolation process.[3]

───

Whittaker–Shannon interpolation formula

The Whittaker–Shannon interpolation formula or sinc interpolation is a method to construct a continuous-time bandlimited function from a sequence of real numbers. The formula dates back to the works of E. Borel in 1898, and E. T. Whittaker in 1915, and was cited from works of J. M. Whittaker in 1935, and in the formulation of the Nyquist–Shannon sampling theorem by Claude Shannon in 1949. It is also commonly called Shannon’s interpolation formula and Whittaker’s interpolation formula. E. T. Whittaker, who published it in 1915, called it the Cardinal series.

Definition

Given a sequence of real numbers, x[n], the continuous function

x(t) = \sum_{n=-\infty}^{\infty} x[n] \, {\rm sinc}\left(\frac{t - nT}{T}\right)\,

(where “sinc” denotes the normalized sinc function) has a Fourier transform, X(f), whose non-zero values are confined to the region |f| ≤ 1/(2T).  When parameter T has units of seconds, the bandlimit, 1/(2T), has units of cycles/sec (hertz). When the x[n] sequence represents time samples, at interval T, of a continuous function, the quantity fs = 1/T is known as the sample rate, and fs/2 is the corresponding Nyquist frequency. When the sampled function has a bandlimit, B, less than the Nyquist frequency, x(t) is a perfect reconstruction of the original function. (See Sampling theorem.) Otherwise, the frequency components above the Nyquist frequency “fold” into the sub-Nyquist region of X(f), resulting in distortion. (See Aliasing.)

240px-Bandlimited.svg

Fourier transform of a bandlimited function.

───

 

事實上『取樣』原理也是深入 Miller Puckette 先生之書,很重要的『概念』之一。因為這『取樣』正是此一『聲音』之『數據流』的源頭。經過 Pd 『箱子』的 處理後,創新且產生『類比』之『音聲 』。

 

 

 

 

 

 

 

 

 

 

勇闖新世界︰ W!o《卡夫卡村》變形祭︰品味科學‧教具教材‧【專題】 PD‧箱子世界‧入出口

Miller Puckette 先生將『物件命名』區分為有無

波浪號』 ~

Tilde

The tilde (/ˈtɪldə/;[1] ˜ or ~)[2] is a grapheme with several uses. The name of the character came into English from Spanish, which in turn came from the Latin titulus, meaning “title” or “superscription”.[1]

The reason for the name was that it was originally written over a letter as a scribal abbreviation, as a “mark of suspension”, shown as a straight line when used with capitals. Thus the commonly used words Anno Domini were frequently abbreviated to Ao Dñi, an elevated terminal with a suspension mark placed above the “n”. Such a mark could denote the omission of one letter or several letters. This saved on the expense of the scribe’s labour and the cost of vellum and ink. Medieval European charters written in Latin are largely made up of such abbreviated words with suspension marks; only uncommon words were given in full. The tilde has since been applied to a number of other uses as a diacritic mark or a character in its own right. These are encoded in Unicode at U+0303 ◌̃ combining tilde and U+007E ~ tilde (as a spacing character), and there are additional similar characters for different roles. In lexicography, the latter kind of tilde and the swung dash () are used in dictionaries to indicate the omission of the entry word.[3]

……

Diacritical use

In some languages, the tilde is used as a diacritical mark ( ˜ ) placed over a letter to indicate a change in pronunciation, such as nasalization.

Pitch

It was first used in the polytonic orthography of Ancient Greek, as a variant of the circumflex, representing a rise in pitch followed by a return to standard pitch.

………

 

也許並不只是表現『訊號』之『象形』 ~ 而已,實指這是『聲音』處理『功能物件』。所以在為各種『補丁』命名時,最好持守此一『慣例』。方便自己和他人日後之閱讀。如果一開始就瀏覽一下『原始風格指南』

PrimordialStyleGuide

Realms of Style

Dollar arguments, Abstractions, Subpatches, Inlets/Outlets, Trigger, Visual Layout, Patch organization, Filesystem organization, Send/Receive/Value/Table naming conventions, Abstraction/Subpatch naming conventions, interfacing (e.g. APIs? and inter-patch communication), general “Programming Recommendations” (e.g. counters, initialization, negation, and other everyday stuff)

………

 

或將有助於了解範例,以及閱讀他人寫作的 Pd 程式。

假使從『箱子模型』之角度,來看『 inlet 』入口和『 outlet 』出口 ,入出口間流動的『數據』有『訊號』 signal 、『訊息』 message 、『符號』 symbol 與『事件』 event …多種『型態』,這些『型態 』決定了箱子『入出口』可否『連接』,以及『連接』的『意義』 。因此對各種『型態』『數據』的功能描述務須精讀細讀。舉例而言,『 number 』數字與『 symbol 』符號為什麼是種『 GUI 』元件 ?如果認真了解它們的說明

【 gatom 】

gatom-help.pd - -usr-lib-pd-extended-doc-5.reference_Number

 

嘗試編寫所有『入口』數據型態

【編輯模式】

補丁編輯模式

 

執行驗證各種操作方式

【執行模式】

補丁執行模式

 

達於能夠解釋每個操作訊息輸出

【主訊息窗】

Pd-extended_訊息輸出

 

或許方可說我們對某個『箱子』之『功用』略知一二的了!能夠講對此一『箱子 』之初始『狀態』有些了解的耶!!

 

 

 

 

 

 

 

 

 

 

 

勇闖新世界︰ W!o《卡夫卡村》變形祭︰品味科學‧教具教材‧【專題】 PD‧箱子世界‧出入

『箱子』 boxes 是一個『奧秘』的觀點,有如《打開黑箱!!》之所言︰

科學追求真理,為的是打開大自然的黑箱;然而真理明白若昭,就是透明的白箱。我們總在求真的旅途上一知半解,努力灰箱為白箱。如果偵錯就是科學,除錯即求真理,那這一段話用在『偵錯』與『除錯』上來講依然合適。這也說明為什麼人們喜歡用不同的灰度,來表達對『箱內之物』的認識與了解了。

………

千萬不要隨便對

Black box

In science, computing, and engineering, a black box is a device, system or object which can be viewed in terms of its inputs and outputs (or transfer characteristics), without any knowledge of its internal workings. Its implementation is “opaque” (black). Almost anything might be referred to as a black box: a transistor, algorithm, or the human brain.

The opposite of a black box is a system where the inner components or logic are available for inspection, which is most commonly referred to as a white box (sometimes also known as a “clear box” or a “glass box”).

───

□ □ 『性質』與 ○ ○『內涵』隨意假設。最好本著

知之為知之,不知為不知

的精神,『如實』的探索這些『箱子』的『功能』以及其『出入』之連接『方式』,如是或可避免某些『誤解』的吧!無須發生

……

派︰《 λ 運算︰概念導引之《補充》※真假祇是個選擇?? 》文中講︰作者不知義大利羅馬的『真理之口』將會如何來決定『何謂是真 ?』而『什麼又是假』的呢??

又為什麼『』與『』的 λ表達式是

TRUE =_{df} (\lambda x. ( \lambda y. x))
FALSE =_{df} (\lambda x .( \lambda y. y))

的呢?如果我們將『運算』看成『黑箱』,用『實驗』的方法來『研究』輸入輸出的『關係』,這一組有兩個輸入端的黑箱,對於任意的輸入『二元組』pair  (u, v),有︰

(((\lambda x. ( \lambda y. x)) u) v) = u
(((\lambda x. ( \lambda y. y)) u) v) = v

,於是將結論歸結成︰貼『』標籤的箱子的『作用』是『選擇』輸入的『第一項』將之輸出;而貼『』標籤的箱子的『作用』是『選擇』輸入的『第二項』將之輸出。

假使一位『軟體』工程師在函式『除錯』時,可能會採取在那個『函式』內『輸出』看看得到的『輸入』參數值是否正確?

於是將結論歸結成︰』標識符的函式『作用』是『選擇』輸入參數的『第一項』;『』標識符的函式『作用』是『選擇』輸入參數的『第二項』。

那麼對一個已經打開的『白箱』,又知道作用的『函式』,怎麼會概念上『一頭霧水』的呢??如果細思一個邱奇自然數『 0 』, 0 =_{df} (\lambda f. ( \lambda x. x)),這跟『』的 λ表達式有什麼不一樣的呢?那難道我們能說『0』就是『』的嗎?在《布林代數》中的『0』與『1』其實是未定義的『兩態』基元概念── 就像歐式幾何學裡的『』、『』和『』是『基本』概念一樣 ──,因此不管說它是『電壓高低』或者講它是『電流有無』的『數位設計』可以應用布林代數。要是我們將『0』『1』與『』『』概念連繫起來看,『布林邏輯』就是『真假』是什麼的『系統化』之概念內涵開展,它的『整體內容』呈現『兩態邏輯』的『方方面面』,縱使至於『孤虛』NAND 一個邏輯概念就足夠了,對於『 0 與 1 』概念本身還是『三緘其口』。……

『孤虛者』有言︰

物有無者,非真假也。苟日新,日日新,又日新。真假者,物之論也。論也者,當或不當而已矣。故世有孤虛者,言有孤虛論。

可以『中行獨復,以從道也。』,不至『迷復,凶』矣!

試 問彼此井通,『彼』之『出』為『此』之『入』;『此』之『出』為『彼』之『入』。若以『此』觀『出入』者,實乃『彼』之『入出』也。故知所謂『出入』,相 對『己我』所定之『名義』 ,存立論之所也。因而推知『有無』者『天地』之『然或不然』;『真假』者『理則』之『當或不當』。倘將『有無』匹配『真假 』,終有『正反』兩說,『正言正說』── 真有,假無 ── 以及『正言若反』── 真無,假有 ── ,各站其『立場』者耶!!

生 ︰《 網 》網上說︰

Design How-To

Logic 101 – Part 2 – Positive vs Negative Logic

Clive Maxfield
11/21/2006 04:00 AM EST

The terms positive logic and negative logic refer to two conventions that dictate the relationship between logical values and the physical voltages used to represent them. Unfortunately, although the core concepts are relatively simple, fully comprehending all of the implications associated with these conventions requires an exercise in lateral thinking sufficient to make even the strongest amongst us break down and weep!

Before plunging into the fray, it is important to understand that logic 0 and logic 1 are always equivalent to the Boolean logic concepts of False and True, respectively (unless you’re really taking a walk on the wild side, in which case all bets are off). The reason these terms are used interchangeably is that digital functions can be considered to represent either logical or arithmetic operations (Fig 1).


1. Logical versus arithmetic views of a digital function.
Having said this, it is generally preferable to employ a single consistent format to cover both cases, and it is easier to view logical operations in terms of “0s” and “1s” than it is to view arithmetic operations in terms of “Fs” and “Ts”. The key point to remember as we go forward is that logic 0 and logic 1 are logical concepts that have no direct relationship to any physical values.

Physical-to-abstract mapping (NMOS logic)
OK, let’s gird up our loins and meander our way through the morass one step at a time. The process of relating logical values to physical voltages begins by defining the frames of reference to be used. One absolute frame of reference is provided by truth tables, which are always associated with specific functions (Fig 2).


2. Absolute relationships between truth tables and functions.
Another absolute frame of reference is found in the physical world, where specific voltage levels applied to the inputs of a digital function cause corresponding voltage responses on the outputs. These relationships can also be represented in truth table form. Consider a logic gate constructed using only NMOS transistors (Fig 3).


3. The physical mapping of an NMOS logic gate.
With NMOS transistors connected as shown in Fig 3, an input connected to the more negative Vss turns that transistor OFF, and an input connected to the more positive Vdd turns that transistor ON. The final step is to define the mapping between the physical and abstract worlds; either 0v is mapped to False and +ve is mapped to True, or vice versa (Fig 4).


4. The physical to abstract mapping of an NMOS logic gate.
Using the positive logic convention, the more positive potential is considered to represent True and the more negative potential is considered to represent False (hence, positive logic is also known as positive-true). By comparison, using the negative logic convention, the more negative potential is considered to represent True and the more positive potential is considered to represent False (hence, negative logic is also known as negative-true). Thus, this circuit may be considered to be performing either a NAND function in positive logic or a NOR function in negative logic. (Are we having fun yet?)

─── 引自《 M♪o 之學習筆記本《卯》基件︰【䷗】正言若反

 

……

傳說在機械化的黃金時代,流傳著一則故事︰

那時每一根小『螺絲釘』和小『螺絲帽』都是獨特的,不要說從這個工廠到那個工廠,就算在同一個工廠內,它們也都各有各的不同。只有那些沒有螺絲帽可以匹配的螺絲釘或沒有螺絲釘可以匹配的螺絲帽,才會被歸類成不好的。就這樣過了很多年,直到有一天艾索 ISO 出現了,推動『標準化』運動,自此一切都改變了 …。傳聞,最後一根獨特的小螺絲釘說︰『艾索,你這個老狐狸!…』。終究這些風塵往事早已被世人遺忘

無獨有偶 ── 發生過的事,總會再次發生 ──,其後,Douglas McIlroy 先生在寫命令列的外殼程式的時候,提出了管線 pipline 的概念,並用『 | 』符號代表。比如說『甲命令 | 乙命令』,講的是把甲命令的輸出結果當成乙命令的輸入來使用。之後於 1973 年 Ken Thompson 把它擴大為 『管子pipe 的標準,寫進了 Unix 作業系統,影響至今,於是開起了一個標準串流的時代。那什麼是標準串流呢?它就是之前在『除蟲!除錯?終端機。』一文中 IPO 模型抽象化後的相容性輸出入結構,應用於命令列的各個相容的指令的輸出入檔案 ── 當然也可以是裝置檔 ── 可串接性 chainable 的標準化。它定義了『標準輸入』stdin、『標準輸出』stdout、『標準錯誤』stderr,打開了程式間溝通的橋樑。舉例來說,假如 more 代表一頁一頁的讀,cat /boot/config.txt | more 就是一頁一頁的讀取樹莓派的開機組構檔 config.txt。

─── 引自《瑪利歐的水管 Pipe

 

『懸念』的乎?此事就像如何『解讀』 Pd 主視窗輸出的『內容』︰

Pd_主視窗

 

如果此 Pd 的程式是︰

Pd_範例一

 

,假設也知道了『編輯模式』與『執行模式』可用

Alt + Ctrl + E

來作切換

Pd_編輯選單_模式

 

,同時又已經『閱讀』了打開各個『黑箱』之文件

message-help.pd - -usr-lib-pd-extended-doc-5.reference_訊息

………

 

協助的矣??或許人類的『感覺』不止長於『忽略』!那個人類之『大腦』也善於『補足』的耶!!

 

 

 

 

 

 

 

 

 

勇闖新世界︰ W!o《卡夫卡村》變形祭︰品味科學‧教具教材‧【專題】 PD‧三

若說誰最有資格談論『純數據』之設計理念,當然自屬 Pd 的創造者 Miller Puckette 先生本人的了。非但如此,他還寫了一本獨一無二之好書

The Theory and Technique of Electronic Music

DRAFT: December 30, 2006

Miller Puckette

闡述『理論』以及『實務』。首先援引該書的『前言』與『序言』作為 Pd 程式語言介紹串講隨筆之始︰

 

Foreword

The Theory and Technique of Electronic Music is a uniquely complete source of information for the computer synthesis of rich and interesting musical timbres. The theory is clearly presented in a completely general form. But in addition, examples of how to synthesize each theoretical aspect are presented in the Pd language so the reader of the book can immediately use the theory for his musical purposes. I know of no other book which combines theory and technique so usefully.

By far the most popular music and sound synthesis programs in use today are block diagram compilers with graphical interfaces. These allow the composer to design instruments by displaying the “objects” of his instrument on a computer screen and drawing the connecting paths between the objects. The resulting graphical display is very congenial to musicians. A naive user can design a simple instrument instantly. He can rapidly learn to design complex instruments. He
can understand how complex instruments work by looking at their graphical images.

The first graphical compiler program, Max, was written by Miller Puckette in 1988. Max dealt only with control signals for music synthesis because the computers available at the time were not fast enough to deal with sound. As soon as faster computers which could compute soundwave samples in real-time were available, Puckette and David Zicarelli appended MSP to Max (Max/MSP) thus making the computer, usually a laptop computer, into a complete musical instrument capable of live performance.

Development of Max/MSP was done by Puckette and Zicarelli at IRCAM in the period 1993 to 1994 . Both have now moved to California. Zicarelli commercialized and sells Max, MSP, and JITTER (an extension to video synthesis) as products. Puckette, now a professor at UCSD, wrote Pd (Pure Data). It is an open source program which is a close equivalent to Max/MSP.

Max and Pd allow almost anyone to synthesize uninteresting timbres almost instantly. Making interesting timbres is much more difficult and requires much additional knowledge. The Theory and Technique of Electronic Music is that body of knowledge. The theory is important for any synthesis program. The Theory and Technique of Electronic Music gives copious examples of how to apply the theory using Pd. The combination of theory plus Pd examples makes this book uniquely useful. It also contains problem sets for each chapter so it is a fine textbook.

I expect Puckette’s book to become THE essential book in any electronic musician’s library.

Max Mathews

 

Preface

This is a book about using electronic techniques to record, synthesize, process, and analyze musical sounds, a practice which came into its modern form in the years 1948-1952, but whose technological means and artistic uses have undergone several revolutions since then. Nowadays most electronic music is made using computers, and this book will focus exclusively on what used to be called “computer music”, but which should really now be called “electronic music using
a computer”.

Most of the computer music tools available today have antecedents in earlier generations of equipment. The computer, however, is relatively cheap and the results of using one are easy to document and recreate. In these respects at least, the computer makes the ideal electronic music instrument—it is hard to see what future technology could displace it.

The techniques and practices of electronic music can be studied (at least in theory) without making explicit reference to the current state of technology. Still, it’s important to provide working examples. So each chapter starts with theory (avoiding any reference to implementation) and ends with a series of examples realized in a currently available software package.

The ideal reader of this book is anyone who knows and likes electronic music of any genre, has plenty of facility with computers in general, and who wants to learn how to make electronic music from the ground up, starting with the humble oscillator and continuing through sampling, FM, filtering, waveshaping, delays, and so on. This will take plenty of time.

This book doesn’t take the easy route of recommending precooked software to try out these techniques; instead, the emphasis is on learning how to use a general-purpose computer music environment to realize them yourself. Of the several such packages available, we’ll use Pd, but that shouldn’t stop you from using these same techniques in other environments such as Csound or Max/MSP.

To read this book you must understand mathematics through intermediate algebra and trigonometry; starting in Chapter 7, complex numbers also make an appearance, although not complex analyis. (For instance, complex numbers are added, multiplied, and conjugated, but there are no complex exponentials.) A review of mathematics for computer music by F. Richard Moore appears in
[Str85, pp. 1-68].

Although the “level” of mathematics is not high, the mathematics itself is sometimes quite challenging. All sorts of cool mathematics is in the reach of any student of algebra or geometry. In the service of computer music, for instance, we’ll run into Bessel functions, Chebychev polynomials, the Central Limit Theorem, and, of course, Fourier analysis.

You don’t need much background in music as it is taught in the West; in particular, Western written music notation is not needed. Some elementary bits of Western music theory are used, such as the tempered scale, the A-B-C system of naming pitches, and terms like “note” and “chord”. Also you should be familiar with terms of musical acoustics such as sinusoids, amplitude, frequency, and the overtone series.

Each chapter starts with a theoretical discussion of some family of techniques or theoretical issues, followed by a series of examples realized in Pd to illustrate them. The examples are included in the Pd distribution, so you can run them and/or edit them into your own spinoffs. In addition, all the figures were created using Pd patches, which appear in an electronic supplement. These aren’t carefully documented but in principle could be used as an example of Pd’s drawing capabilities for anyone interested in that.

I would like to thank some people who have made it possible for me to write this. Barry Vercoe is almost entirely responsible for my music education. Meanwhile I was taught mathematics by Wayne Holman, Samuel Greitzer, Murray Klamkin, Gian-Carlo Rota, Frank Morgan, Michael Artin, Andrew Gleason, and many others. Phil White taught me English and Rosie Paschall visual composition. Finally, my parents (one deceased) are mighty patient; I’m now 47.

Thank you

 

雖然這本書寫於十年之前,至今依舊魅力不減。作者不過嘗試註解部份 Miller Puckette 篇章,希望能為讀者起個頭而已。由於 Pd 是個『動態』 dynamic 、『即時』 real-time 以及『互動』 interactive 的程式環境,總是得從『實作』中『學習』。假使還沒閱讀過

Johannes Kreidler 之

Chapter 2. Programming with Pd for the first time 》文本

的讀者請先閱讀。最好能補之以 Miller Puckette 書中第一章

Sinusoids, amplitude and frequency

對 Pd 之總論︰

Quick Introduction to Pd

Pd documents are called patches. They correspond roughly to the boxes in the abstract block diagrams shown earlier in this chapter, but in detail they are quite different, because Pd is an implementation environment, not a specification language.

箱子網路

A Pd patch, such as the ones shown in Figure 1.10, consists of a collection of boxes connected in a network. The border of a box tells you how its text is interpreted and how the box functions. In part (a) of the figure we see three types of boxes. From top to bottom they are:

• a message box. Message boxes, with a flag-shaped border, interpret the text as a message to send whenever the box is activated (by an incoming message or with a pointing device). The message in this case consists simply of the number “21”.

Pd_Quick_Introduction

Figure 1.10: (a) three types of boxes in Pd (message, object, and GUI); (b) a simple patch to output a sinusoid.

• an object box. Object boxes have a rectangular border; they interpret the text to create objects when you load a patch. Object boxes may hold hundreds of different classes of objectsincluding oscillators, envelope generators, and other signal processing modules to be introduced later— depending on the text inside. In this example, the box holds an adder. In most Pd patches, the majority of boxes are of type “object”. The first word typed into an object box specifies its class, which in this case is just “+”. Any additional (blank-space-separated) words appearing in the box are called creation arguments, which specify the initial state of the object when it is created.

• a number box. Number boxes are a particular type of GUI box. Others include push buttons and toggle switches; these will come up later in the examples. The number box has a punched-card-shaped border, with a nick out of its top right corner. Whereas the appearance of an object or message box is fixed when a patch is running, a number box’s contents (the text) changes to reflect the current value held by the box. You can also use a number box as a control by clicking and dragging up and down, or by typing values in it.

In Figure 1.10 (part a) the message box, when clicked, sends the message “21” to an object box which adds 13 to it. The lines connecting the boxes carry data from one box to the next; outputs of boxes are on the bottom and inputs on top.

Figure 1.10 (part b) shows a Pd patch which makes a sinusoid with controllable frequency and amplitude. The connecting patch lines are of two types here; the thin ones are for carrying sporadic messages, and the thicker ones (connecting the oscillator, the multiplier, and the output dac~ object) carry digital audio signals. Since Pd is a real-time program, the audio signals flow in a continuous stream. On the other hand, the sporadic messages appear at specific but possibly unpredictable instants in time.

Whether a connection carries messages or signals depends on the box the connection comes from; so, for instance, the + object outputs messages, but the *~ object outputs a signal. The inputs of a given object may or may not accept signals (but they always accept messages, even if only to convert them to signals). As a convention, object boxes with signal inputs or outputs are all named with a trailing tilde (“~”) as in “*~” and “osc~”.

 

How to find and run the examples

To run the patches, you must first download, install, and run Pd. Instructions for doing this appear in Pd’s online HTML documentation, which you can find at

http://crca.ucsd.edu/ ̃msp/software.htm.

This book should appear at

http:/crca/ucsd/edu/ ̃msp/techniques.htm,

possibly in several revisions. Choose the revision that corresponds to the text you’re reading (or perhaps just the latest one) and download the archive containing the associated revision of the examples (you may also download an archive of the HTML version of this book for easier access on your machine). The examples should all stay in a single directory, since some of them depend on other files in that directory and might not load them correctly if you have moved things around.

If you do want to copy one of the examples to another directory so that you can build on it (which you’re welcome to do), you should either include the examples directory in Pd’s search path (see the Pd documentation) or else figure out what other files are needed and copy them too. A good way to find this out is just to run Pd on the relocated file and see what Pd complains it can’t find.

There should be dozens of files in the “examples” folder, including the examples themselves and the support files. The filenames of the examples all begin with a letter (A for chapter 1, B for 2, etc.) and a number, as in “A01.sinewave.pd”.

The example patches are also distributed with Pd, but beware that you may find a different version of the examples which might not correspond to the text you’re reading.

 

,就此展開『箱子世界』之旅的耶!

 

 

 

 

 

 

 

 

 

 

 

輕。鬆。學。部落客