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

雖然我們已經介紹過了 Johannes Kreidler  之『公開書』

Programming Electronic Music in Pd

。但猶恐許多讀者尚且未讀過其

Chapter 2. Programming with Pd for the first time

的整篇文本那一章就是對 Pd 整體圖形界面環境之詳細的圖說。

事物的理解,宛如認識一個陌生的環境。當初步熟悉後,或應內外上下將之貫串起來,加深整體的了解。此時若對這個環境多點鳥瞰全觀,或能循名責實,得其一斑乎!既然 Pd 是一種『圖象』之程式語言,如把它和一般『文本』的程式語言比較,『異同』如何呢?由於『關注點』的改變,再次『重讀』一篇文章時,常會發現先前所『忽略 』之處!!也可能產生新的『疑惑』??或許俗話講的『有理』︰熟讀唐詩三百首,不會作詩也會吟。要是能夠輔之以『主動』之不同『對比』下的分析綜合,是否可以︰唐詩不但會吟 ,也能作的呢??!!

所以說文章並沒有『該讀』幾遍的問題,事實上卻常在有不同的『體驗』及『閱歷』之後『重讀』,總會發現『新意』。因此才講︰學而時習之,不亦說乎。要有人能『深入淺出』的為己『解說』『錯綜複雜』的『概念』之『來龍去脈』,大概是已『讀通』了的吧!!??

舉例而言,

【一個箱子有『訊息』與『訊號』兩個領域】

The previous example covers most of the elements in Pd. Let’s take a closer look at them – we used three different kinds of boxes: Object, Message, and Number.

Object boxes are rectangular, message boxes have an indentation on the right side, and number boxes have a flat upper right corner.

All of these boxes have inlets and outlets. The inlets are always on top, the outlets on bottom. You can always connect an outlet to an inlet (in this order). There is an edit mode and an execute mode. Edit mode is for programming and execute mode is for running the program. You can tell which mode you’re in by looking at the cursor:

Let’s take a closer look: There are two kinds of “cables“, thick and thin. A thin cable connects the number box to the “osc~” object and a thick cable runs out of the “osc~” object. Thick cables transmit signals, while thin cables transmit only control data. With “compute audio” in the Pd main window, we determine whether the signals should be sent by marking or removing the checkmark. Moreover, all objects that produce signals or that work with signals as an input (input = that which goes into an inlet; output = that which comes out of an outlet), have a tilde (“~”) after their name; other objects don’t have this! These two levels are called the “control level” (where only control data flows, also called the “message domain“) and the “signal level” (where signals flow, also called the “signal domain“).

The first object you created was “osc~ 440”, which is an “oscillator”, and you heard a sine tone at 440 Hertz (the meaning of “Hertz” will be explained later). Then you made a number box and entered new values there, which caused the frequency of the tone you heard to change. That is the basic structure in Pd: an object has a name (if it produces signals, a tilde follows the name), then there is a space, and then one or several arguments follow (in this case, the initial ‘argument’ was “440”). With most objects, the arguments can be replaced with new values that are connected to the inputs (unlike with the “osc~” object here, the changed value usually goes into the far right inlet).

If new values are entered this way, the argument written in the object box is ignored (in this example, 300 instead of 440).

………

 

【 bang 名義由來】

2.2.2 Different types of data

2.2.2.1 Theory

A “bang“, like a mouse click, stands for the letter combination b-a-n-g. Letter combinations as symbols are the second form of data (besides numbers) that Pd uses. Some objects recognize certain words and work with their input. Many objects react to the symbol “bang”. Since it occurs so frequently, there is a special graphic representation for “bang”, a circle that flashes when active (Put Bang). This is called a “GUI” object (GUI = graphical user interface, i.e., a graphic representation of something and/or a graphic that can be changed to produce and send new values).

………

 

如下的這一些『內建箱子』是否足以構成一台『圖靈機』??如果用來表達一般『演算法』,方不方便的耶!!

【黏合物件】 GLUE

intro-help.pd-GLUE

 

【時序物件】 TIME

intro-help.pd-TIME

 

【數學物件】 MATH

intro-help.pd-MATH

 

【 MIDI 物件】 MIDI

【表格物件】 TABLES

intro-help.pd-MIDIandTABLES

 

【其它物件】 MISC

intro-help.pd-MISC

 

【音訊數學】 AUDIO MATH

intro-help.pd-AudioMath

 

【音訊黏合】 AUDIO GLUE

intro-help.pd-AudioGlue

 

【音訊振盪器與表格】 AUDIO OSCILLATORS AND TABLES

intro-help.pd-AudioOSCandTables

 

【音訊濾波器】 AUDIO FILTERS

intro-help.pd-AudioFilters

 

【音訊遲延線】 AUDIO DELAY

【子補丁】 SUBWINDOWS

intro-help.pd-AudioDelay-Subwindows

 

【資料樣板】 DATA TEMPLATES

【資料存取】 ACCESSING DATA

intro-help.pd-DATA

 

【過時物件】 OBSOLETE

intro-help.pd-OBSOLETE