分類彙整: 樹莓派

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

雖然說目前樹莓派 Jessie 發行版上有原生的『純數據』 Pure Data 『香草』 vanilla ︰

【香草版本訊息】

pi@raspberrypi ~ apt-cache show puredata Package: puredata Version: 0.46.2-1 Installed-Size: 44 Maintainer: Paul Brossier <piem@debian.org> Architecture: all Depends: puredata-core, puredata-gui, puredata-doc, puredata-extra, puredata-utils, puredata-dev Recommends: gem Suggests: pd-csound, pd-pdp, pd-zexy, pd-aubio Size: 16692 SHA256: a46f29019f9ddb9635b96b09b495cde62fd027a8703b11039c41edd2bfd8ad1c SHA1: 27858ab1e8d7065040c2b77b83b4e4acb62de398 MD5sum: 87779cc0b8db73584203ee04bd678047 Description: realtime computer music and graphics system  Pure Data (also known as Pd) is a real-time graphical programming environment  for audio and graphics processing. Pd's audio functions are built-in;  graphical computations require separate packages such as gem (Graphics  Environment for Multimedia) or pd-pdp (Pd Packet). Description-md5: d1160529ab48daec417df3cddfb56e46 Homepage: http://puredata.info Tag: devel::editor, devel::ide, devel::ui-builder, field::arts,  implemented-in::c, implemented-in::tcl, interface::x11, role::program,  scope::application, sound::midi, sound::mixer, sound::player,  sound::recorder, uitoolkit::tk, use::editing, works-with::audio,  works-with::image, works-with::image:raster, x11::application Section: sound Priority: optional Filename: pool/main/p/puredata/puredata_0.46.2-1_all.deb </pre>    <a href="http://www.freesandal.org/wp-content/uploads/PD_patch.png"><img class="alignnone size-full wp-image-43676" src="http://www.freesandal.org/wp-content/uploads/PD_patch.png" alt="PD_patch" width="452" height="370" /></a>     <span style="color: #808000;">畢竟選單是英文的,不像『咔嗎衛星』是中文的。更何況大多數人可能認為『香草』口味平淡無奇,因此喜歡變換胃口,所以一般人使用的是『純數據擴張』 pd-extended 。</span>  <span style="color: #808000;">『純數據』網頁上有一篇介紹『樹莓派』的<a style="color: #808000;" href="https://puredata.info/docs/raspberry-pi">文章</a>,使得我們可以用如下的方法,安裝 pd-extended ︰</span>    <pre class="lang:sh decode:true "># 修改 source.list ,增加新的 repo pi@raspberrypi ~ more /etc/apt/sources.list
deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi

deb http://vontaene.de/raspbian-updates/ . main

# deb http://www.deb-multimedia.org jessie main non-free

# 注意︰是 wheezy, 不是 jessie
deb http://apt.puredata.info/releases wheezy main

pi@raspberrypi ~ sudo apt-get update  # 要是遇到錯誤,請用下面辦法,加入正確的公共『鑰匙』 gpg --recv-keys 9F0FE587374BBE81 gpg -a --export 9F0FE587374BBE81 | sudo apt-key add -  # 直到無誤為止 sudo apt-get update  # 安裝 pi@raspberrypi ~ sudo apt-get install pd-extended

 

【純數據擴張版本訊息】

pi@raspberrypi ~ apt-cache show pd-extended Package: pd-extended Version: 0.43.4~extended1-1~raspbian Architecture: armhf Maintainer: Hans-Christoph Steiner <hans@eds.org> Installed-Size: 75276 Depends: libasound2 (>= 1.0.16), libc6 (>= 2.13-28), libfftw3-3, libflite1, libftgl2 (>= 2.1.3~rc5), libgcc1 (>= 1:4.4.0), libgl1-mesa-glx | libgl1, libglib2.0-0 (>= 2.24.0), libglu1-mesa | libglu1, libgsl0ldbl (>= 1.9), libice6 (>= 1:1.0.0), libjack-jackd2-0 (>= 1.9.5~dfsg-14) | libjack-0.116, liblua5.1-0, libmp3lame0, libogg0 (>= 1.0rc3), libpng12-0 (>= 1.2.13-4), libquicktime2 (>= 2:1.2.2), libsdl1.2debian (>= 1.2.11), libsm6, libspeex1 (>= 1.2~beta3-1), libstdc++6 (>= 4.6), libvorbis0a (>= 1.1.2), libvorbisenc2 (>= 1.1.2), libvorbisfile3 (>= 1.1.2), libx11-6, libxext6, libxv1, libxxf86vm1, tcl8.5 (>= 8.5.0), zlib1g (>= 1:1.1.4), tk8.5, ttf-dejavu, pulseaudio-utils Recommends: xdg-utils, xterm | x-terminal-emulator, x-ttcidfont-conf, libtk-img, tcllib, tkdnd, puredata-dev, puredata-utils Conflicts: cyclist, pdextended, puredata (<< 0.43) Replaces: cyclist, pdextended Provides: pd Filename: dists/wheezy/main/binary-armhf/pd-extended_0.43.4~extended1-1~raspbian_armhf.deb Size: 32409418 MD5sum: b39489cc91a4f94ac2f20a64d2fa7fdc Section: sound Priority: optional Homepage: http://puredata.info Description: Pure Data with patches and a large collection of externals  Pd (aka Pure Data) is a real-time graphical programming environment for  audio, video, and graphical processing. It is the third major branch of the  family of patcher programming languages known as Max (Max/FTS, ISPW Max,  Max/MSP, jMax, etc.) originally developed by Miller Puckette and company at  IRCAM. The core of Pd is written and maintained by Miller Puckette and  includes the work of many developers, making the whole package very much a  community effort.  .  Pd was created to explore ideas of how to further refine the Max paradigm  with the core ideas of allowing data to be treated in a more open-ended way  and opening it up to applications outside of audio and MIDI, such as graphics  and video.  .  This distribution of Pd includes a wide array of libraries that allow  you to work with HIDs, video, OpenGL 3D graphics, and more. Description-md5: 66919037ffe8f211f3443f3091b6da37  pi@raspberrypi ~ 

 

【選單編修】

請使用主選單編輯器,修改預設內容為︰

PD-extended_啟動

 

【啟動 jack 】

用 QjackCtl 啟動 jack ,按下『 Start 』。

JACK Audio Connection Kit [(default)] Started

 

【啟動 pd-extended 】

Pd-extended_主畫面

 

【選擇媒體‧設定 jack 】

音效設定_028

 

【測試安裝】

可用《黑傑克的咔嗎!!明暗之交》文本一樣的方法作安裝測試。

 

 

 

 

 

 

 

 

 

 

 

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

雖曾與『黑傑克』成功 hi-jack 了『咔嗎衛星』,由於當時尚且不能讀寫『純數據』 pure data 語言︰

Pd-extended_main

testtone.pd

wind0.pd - -home-ccrma-pd-examples-DesigningSoundBookExamples-WIND_0

sketch_jun30a Arduino 1.0.1(in satellite)

果如維基解密上的『Test Run』所言,在登入的個人電腦上,用命令列的『 pd & 』指令,雲端咔嗎將 X 視窗安全的轉送過來;此處的『 & 』表示它之前所冠的執行的命令,比如這裡的 pd ,在背景中執行運作不佔著終端機的輸出入,這樣就可以方便的只用一個終端機,同時做著多件事情。

要想『聽到』聲音,還真像是『益智遊戲』過『』一樣,首先打開 DSP;其次選擇【媒體】選單裡的【聲音和 MIDI 測試】,剛進去的時候,輸出音量是『 OFF 』,需要自作選擇;這樣你就聽到了咔嗎的『第一聲』。如果你不巧卻不行,請用 raspi-config 將樹莓派的『聲音輸出』強制為『 Force 3.5mm (‘headphone’) jack 』,再試一試?!

pdPure Data 一個視覺化程式語言,提供音樂家視覺藝術家演奏者研究者開發者一套『不用寫一行程式』就能創造的工具。遺憾作者知之太晚,並不通熟,用著七試八驗的辦法與東讀西讀的方式,只能『知其然』── 能玩的 ──;不能知『其所以然』──  不能玩的 ──,只好加緊『練功』,以待『來日』!

─── 引自《黑傑克的咔嗎!!明暗之交

 

終究難以一窺堂奧。有鑑於國外多所大學都用這個語言,又因不想遺憾,於是找了本 Tony Hillerson 寫的書一探究竟︰

Programming Sound with Pure Data
Make Your Apps Come Alive with Dynamic Audio

,當真是有趣得很。這也使得維基百科詞條的說明鮮活起來︰

Pure Data

Pure Data (Pd) is a visual programming language developed by Miller Puckette in the 1990s for creating interactive computer music and multimedia works. While Puckette is the main author of the program, Pd is an open source project with a large developer base working on new extensions. It is released under a license similar to the BSD license. It runs on GNU/Linux, Mac OS X, iOS, Android and Windows. Older ports exist for FreeBSD and IRIX.

Pd is very similar in scope and design to Puckette’s original Max program, developed while he was at IRCAM, and is to some degree interoperable with Max/MSP, the commercial successor to the Max language. They may be collectively discussed as members of the Patcher[2] family of languages.

With the addition of the Graphics Environment for Multimedia (GEM) external, and externals designed to work with it (like Pure Data Packet / PiDiP for Linux, Mac OS X), framestein for Windows, GridFlow (as n-dimensional matrix processing, for Linux, Mac OS X, Windows), it is possible to create and manipulate video, OpenGL graphics, images, etc., in realtime with extensive possibilities for interactivity with audio, external sensors, etc.

Pd is natively designed to enable live collaboration across networks or the Internet, allowing musicians connected via LAN or even in disparate parts of the globe to create music together in real time. Pd uses FUDI as a networking protocol.

1280px-Pure_Data_with_many_patches_open_(showing_netpd_project)

 

Language features

Like Max, Pd is a data flow programming language. As with most DSP software, there are two primary rates at which data is passed: sample (audio) rate, usually at 44,100 samples per second, and control rate, at 1 block per 64 samples. Control messages and audio signals generally flow from the top of the screen to the bottom between “objects” connected via inlets and outlets.

Pd supports 4 basic types of text entities: messages, objects, atoms, and comments. Atoms are the most basic unit of data in Pd, and they consist of either a float, a symbol, or a pointer to a data structure (in Pd, all numbers are stored as 32-bit floats). Messages are composed of one or more atoms and provide instructions to objects. A special type of message with null content called a bang is used to initiate events and push data into flow, much like pushing a button.

Pd’s native objects range from the basic mathematical, logical, and bitwise operators found in every programming language to general and specialized audio-rate DSP functions (designated by a tilde (~) symbol), such as wavetable oscillators, the Fast Fourier transform (fft~), and a range of standard filters. Data can be loaded from file, read in from an audio board, MIDI, via Open Sound Control (OSC) through a Firewire, USB, or network connection, or generated on the fly, and stored in tables, which can then be read back and used as audio signals or control data.

220px-Pdobjects.svg

Pure Data objects. The text strings to the right of the boxes are comments.

Data structures

One of the key innovations in Pd over its predecessors has been the introduction of graphical data structures, which can be used in a large variety of ways, from composing musical scores, sequencing events, to creating visuals to accompany Pd patches or even extending Pd’s GUI.

Living up to Pd’s name, data structures enable Pd users to create arbitrarily complex static as well as dynamic or animated graphical representations of musical data. Much like C structs, Pd’s structs are composed of any combination of floats, symbols, and array data, which can be used as parameters to describe the visual appearance of the data structure or, conversely, to control messages and audio signals in a Pd patch. In Puckette’s words:

Pd is designed to offer an extremely unstructured environment for describing data structures and their graphical appearance. The underlying idea is to allow the user to display any kind of data he or she wants to, associating it in any way with the display. To accomplish this Pd introduces a graphical data structure, somewhat like a data structure out of the C programming language, but with a facility for attaching shapes and colors to the data, so that the user can visualize and/or edit it. The data itself can be edited from scratch or can be imported from files, generated algorithmically, or derived from analyses of incoming sounds or other data streams.

600px-Solitude

Score for Hans-Christoph Steiner’s Solitude, created using Pd’s data structures.

Language limitations

Though Pd is a powerful language it has certain limitations in its implementation of Object Oriented concepts.[4] For example it is very difficult to create massively parallel processes because instantiating and manipulating large lists of objects (spawning..etc..) is impossible due to a lack of a constructor function. Further, Pd arrays and other entities are susceptible to name space collisions because passing the patch instance ID is an extra step and is sometimes difficult to accomplish.

 

心想『咔嗎衛星』將之與『 JACK 環境』結合起來,果然是有創見的耶!所以特寫此一專題,作點『純數據』語言入門的介紹。希望能夠開拓讀者的視野,可以為『現象認知』學習環境增色。

 

【節拍體驗】

Connections - JACK Audio Connection Kit_PD連線

 

PD_add-signal

 

sco bridge-6875_PD波形

 

Jack-Alsa Audio Analyser-0.8.4 [jaaa]_PD頻域

 

 

 

 

 

 

 

 

 

 

 

勇闖新世界︰ W!o《卡夫卡村》變形祭︰品味科學‧教具教材‧聲音知覺分析儀

過去當人們走過街角之書店,偶然地發現一本吸引人的書,也許會駐足翻閱一番,再決定是否要沉浸於書中的奇異世界。而今人們在網際網路的汪洋裡打撈,篩選過濾無所不在的廣告。曾幾何時世界變成了喧囂的市場?或許因此知覺也早就超載的了!模糊的記憶,想不出如何邂逅上

japa

The JACK & ALSA Audio Perceptual Analyser, is a ‘perceptual’ or ‘psychoacoustic’ audio spectrum analyser.

In contrast to JAAA, this is more an acoustical or musical tool than a purely technical one. Possible uses include spectrum monitoring while mixing or mastering, evaluation of ambient noise, and (using pink noise), equalisation of PA systems.

 

,一個所謂的『聲音』『知覺』分析儀。依稀記得當初為了弄明白它的『名目』,在大海裡撈針。很高興發現了一篇『通告』︰

 

JAPA Jack/Alsa Perceptual Analyser initial release

From: fons adriaensen <fons.adriaensen-AT-skynet.be>
To: Linix Audio Developers <linux-audio-dev-AT-music.columbia.edu>, Linux Audio Announce <linux-audio-announce-AT-music.columbia.edu>, JACK Developers <jackit-devel-AT-lists.sourceforge.net>
Subject: [linux-audio-announce] [ANN] JAPA Jack/Alsa Perceptual Analyser
Date: Sat, 6 Aug 2005 17:24:17 +0200

The first (alpha) release of JAPA is now available at

<http://users.skynet.be/solaris/linuxaudio>>

>From the README:

JAPA is a ‘perceptual’ or ‘psychoacoustic’ audio spectrum
analyser. This means that the filters that are used to
analyse the spectrum have bandwidths that are neither
constant (as in JAAA), nor proportional to the center
frequency (as in a 1/3 octave band analyser), but tuned
to human perception. With the default settings, JAPA uses
a filter set that closely follows the Bark scale.

In contrast to JAAA, this is more an acoustical or musical
tool than a purely technical one. Possible uses include
spectrum monitoring while mixing or mastering, evaluation
of ambient noise, and (using pink noise), equalisation
of PA systems.

JAPA allows you to measure two inputs at the same time,
compare them, store them to memory and compare them to
stored traces. It offers a number of resolutions, speeds,
and various display options. The dual inputs and memories
will find their way into future JAAA versions as well.
This is a source release. You will also need libclalsadrv,
libclthreads (from the same place), and libfftw3f.
Enjoy !


FA

 

,卻失笑於那個『讀我』 README 之文。畢竟難得天真如愛麗絲,看到『吃我』就『吃』,『喝我』就『喝』的吧!終究那個

Bark scale

The Bark scale is a psychoacoustical scale proposed by Eberhard Zwicker in 1961. It is named after Heinrich Barkhausen who proposed the first subjective measurements of loudness.[1]One definition of the term is “…a frequency scale on which equal distances correspond with perceptually equal distances. Above about 500 Hz this scale is more or less equal to a logarithmic frequency axis. Below 500 Hz the Bark scale becomes more and more linear.”[2]

The scale ranges from 1 to 24 and corresponds to the first 24 critical bands of hearing. [3]

It is related to, but somewhat less popular than[citation needed], the mel scale, a perceptual scale of pitches judged by listeners to be equal in distance from one another.

Bark scale critical bands

Number Center Frequency (Hz) Cut-off Frequency (Hz) Bandwidth (Hz)
20
1 60 100 80
2 150 200 100
3 250 300 100
4 350 400 100
5 450 510 110
6 570 630 120
7 700 770 140
8 840 920 150
9 1000 1080 160
10 1170 1270 190
11 1370 1480 210
12 1600 1720 240
13 1850 2000 280
14 2150 2320 320
15 2500 2700 380
16 2900 3150 450
17 3400 3700 550
18 4000 4400 700
19 4800 5300 900
20 5800 6400 1100
21 7000 7700 1300
22 8500 9500 1800
23 10500 12000 2500
24 13500 15500 3500

Since the direct measurements of the critical bands are subject to error, the values in this table have been generously rounded.[1]

In his letter “Subdivision of the Audible Frequency Range into Critical Bands”, Zwicker states:

“These bands have been directly measured in experiments on the threshold for complex sounds, on masking, on the perception of phase, and most often on the loudness of complex sounds. In all these phenomena, the critical band seems to play an important role. It must be pointed out that the measurements taken so far indicate that the critical bands have a certain width, but that their position on the frequency scale is not fixed; rather, the position can be changed continuously, perhaps by the ear itself.”

Thus the important attribute of the Bark scale is the width of the critical band at any given frequency, not the exact values of the edges or centers of any band.

 

,使我知道了這個軟體的設計由來,引領我思考『主觀』『知覺』的現象。驚訝於『濾波』與『忽略』無所不在之『聽覺』?竟可能是『音樂』和『語言』得以『存在』的基礎??如果人類具有沒有極限之『聲音分辨力』,也許只能像是個超級『頻譜分析儀』,徒有『超量之數據』又該如何談『相似』以及『分類』的呢??!!

或許一小段維基百科的詞條文本︰

心理聲學

心理聲學(Psychoacoustics)是研究人對聲音感知的學科,即研究人對聲音(包括言語音樂)的生理和心理反應的科學,是心理物理學的分支學科。

背景

聽覺不完全是波的力學現象。聲音是一種機械波,通過空氣傳播到人,在人耳中轉變為神經動作電位,神經脈衝到達大腦,人感知到聲音。因此,在很多聲學問題中,比如音頻信號處理,需要考慮聽覺體驗中人的耳朵和大腦的作用。比如,內耳在把聲音波形轉化為神經刺激的過程中起著重要作用,有些波形的差別可能無法被感知到。[1] 這一知識可以應用到數據壓縮技術,比如MP3[2] 人耳對不同強度的聲音的響應是非線性的,這種非線性的響應叫做響度電話網絡和音頻降噪系統利用這一事實,先對數據樣本進行非線性壓縮,然後再傳遞數據,然後在接收端解壓縮,播放聲音。[3]

 

Psychoacoustics

Psychoacoustics is the scientific study of sound perception. More specifically, it is the branch of science studying the psychological and physiological responses associated with sound (including speech and music). It can be further categorized as a branch of psychophysics.

Background

Hearing is not a purely mechanical phenomenon of wave propagation, but is also a sensory and perceptual event; in other words, when a person hears something, that something arrives at the ear as a mechanical sound wave traveling through the air, but within the ear it is transformed into neural action potentials. These nerve pulses then travel to the brain where they are perceived. Hence, in many problems in acoustics, such as for audio processing, it is advantageous to take into account not just the mechanics of the environment, but also the fact that both the ear and the brain are involved in a person’s listening experience.

The inner ear, for example, does significant signal processing in converting sound waveforms into neural stimuli, so certain differences between waveforms may be imperceptible.[1] Data compression techniques, such as MP3, make use of this fact.[2] In addition, the ear has a nonlinear response to sounds of different intensity levels; this nonlinear response is called loudness. Telephone networks and audio noise reduction systems make use of this fact by nonlinearly compressing data samples before transmission, and then expanding them for playback.[3] Another effect of the ear’s nonlinear response is that sounds that are close in frequency produce phantom beat notes, or intermodulation distortion products.[4]

The term “psychoacoustics” also arises in discussions about cognitive psychology and the effects that personal expectations, prejudices, and predispositions may have on listeners’ relative evaluations and comparisons of sonic aesthetics and acuity and on listeners’ varying determinations about the relative qualities of various musical instruments and performers. The expression that one “hears what one wants (or expects) to hear” may pertain in such discussions.

 

,有助於我們了解這門科學的旨趣。實際上的『體驗』,或將啟發我們探索『聽覺』之奧秘耶!!??

 

【 AlsaPlayer ︰ JACK mp3 播放器】

AlsaPlayer

 

【將之連接兩種頻譜分析儀】

Connections - JACK Audio Connection Kit

 

【觀察】

心理聲學

 

 

 

 

 

 

 

 

 

 

 

勇闖新世界︰ W!o《卡夫卡村》變形祭︰品味科學‧教具教材‧ Hi-Jack‧Sonic π 之節拍體驗

在《【Sonic π】聲波之傳播原理︰共振篇《四下》》文本裡,我們談到了一根『半波長』之『估量的尺』,意在表明『欣賞自然』與『理解科學』的『靜觀自得』之境。此境將周遭萬象與人『關聯』起來,於是我們可以更深入的認識『自然』與『人造』物的世界︰

波的傳播除了『頻率』之外,『波長』也是重要的因素,尤其在考慮波的『輻射』與『散射』現象的時候。常溫下聲波速度約為 343.2 米/秒,從一個『邊長』是 d 的共振腔共振時『半波長』的『整數倍』來看,它是否可以用來度量『聲源』的『尺寸』大小的呢?假使以『音律』中『十二平均律』的鋼琴『中央 C』261.6 赫茲來作計算,聲波波長大約是 1.312 米。『紅嘴相思鳥』鳴叫聲,以基本音調為主,頻率範圍大約為 2.50 ~ 3.80 千赫,主峰在 1.82 千赫,波長是 18.86 公分。當一隻鳥在發現略食者在周遭時,會發出警告同伴的鳴叫聲,它的頻率大約是 7000 Hz,波長約為 4.90 公分。『蟋蟀』的蟲鳴聲頻率範圍很廣 3 ~ 50 千赫,通常是相當純的律音,主峰在四、五千赫,次峰在十四千赫。以主峰 4.5 千赫計算大約 7.63 公分。 『人類』的發聲頻率範圍約為 85 ~ 1100 赫茲,假使說以低音 85 赫茲來講,波長為 4.04 米;『』的發聲頻率範圍是 452~ 1800 赫茲,波長是 75.93 公分;『』的發聲頻率範圍是 760 ~ 1500 赫茲,波長是 45.15 公分。如此看來『半波長』果然可以看成一根『估量的尺』,假使一個物體沒有明顯的『長寬高』,比方說像一個『』,它的共振波長 \lambda_H \propto \sqrt[3] V 正比於『體積立方根』也就是『想當然耳』的了!!

Tweeter

Midrange-speaker

Loudspeaker-bass

250px-Subwoofer

大聲公

蟲鳴鳥叫

然而人的『聽覺範圍』是從 20  到 20k Hz,一個二十赫茲的聲音波長有 十七點一六米那麼長,這樣一個『音響喇叭』又要多大才能夠『共振』的呢?因為即使對『中央 C』來講,半波長也有 65.6 公分那麼長。所以一般動力『揚聲器』Loudspeaker 是用『聲波輻射』原理來設計的。

聲學裡一個『脈動球』 Pulsataing  Sphere 『聲源

脈動球

是一個『半徑』在 r_0 附近 dr << r_0 以『頻率f 作『簡諧振動』的球,假使球的半徑遠小於聲波『波長\lambda >> r_0,多個波長距離之外的遠處『聲場強度I \propto I_0^2 \cdot \frac {f^2}{{r_0}^4},此處 I_0 是聲源振幅。其實假使 r_0 \rightarrow 0 它可以看成『點聲源』,比方講這就可以計算典型『揚聲器』的圓形『振動膜』所產生的『聲場』。因此也就可以了解為了追求『高傳真』 HiFi 的『聲音品質』,揚聲器分開了『高音』、『中音』以及『低音』喇叭設計的原故。以及現今為了加強『影音』的『震撼力』與『臨場感』採用杜比  AC3 5.1 規格,它有五個『喇叭』加上一個『超重低音』音箱的因由。

當人們在戶外,有時『拗著手』作『大聲公』狀來『叫人』,它是可以用『共振』和『輻射』來作解釋的嗎?每當夜深人靜時,『蟲鳴鳥叫』聲又為什麼會『擾人清夢』的呢??

也許越『理解』大自然,人們就越可能『欣賞』大自然的『』吧!又或許果真是『處處靜觀皆自得』的啊!!

───

 

若是人們知道『十二平均律』發現的歷史︰

十二平均律

十二平均律,又稱十二等程律,是一種音樂的定律方法,將一個八度平均分成十二等份,每等分稱為半音,是最主要的調音法

歷史

公元 400 年左右,中國南朝數學家何承天提出世界歷史上最早有記載的十二平均律數列 900 849 802 758 715 677 638 601 570 536 509.5 479 450(原文:……黃鐘長九寸,太簇長八寸二厘,林鐘長六寸一厘,應鐘長四寸七分九厘強)[1] .

義大利的物理學家伽利略·伽利萊的父親伽利略·文森佐曾試圖解決十二平均率問題,但他用的倍率是 18:17 而不是\sqrt [12] {2},因此自乘12次後只得 1.98556,不是2,八度走了音,他的系統只可算近似十二音階平均律[2]

1605年荷蘭數學家西蒙·斯特芬在一篇未完成的手稿「Van de Spiegheling der singconst」[3]提出用\sqrt [12] {1/2} 計算十二平均律,但因計算精度不夠,他算出的弦長數字,有些偏離正確數字一至二單位之多[4]

西蒙·斯特芬的弦長表[5]

弦 10000 比率 正確的弦長
半音 9438 1.0595465 9438.7
全音 8909 1.0593781
1.5 音 8404 1.0600904 8409
2 倍全音 7936 1.0594758 7937
2.5 音 7491 1.0594046 7491.5
3 音 7071 1.0593975 7071.1
3.5 音 6674 1.0594845 6674.2
4 音 6298 1.0597014 6299
4.5 音 5944 1.0595558 5946
5 音 5611 1.0593477 5612.3
5.5 音 5296 1.0594788 5297.2
八度 1.0592000

西蒙·斯特芬的頻率比,每音一率,且各不相同,這是不正確的[6]

朱載堉發明十二平均律

中國明代音樂家朱載堉於萬曆十二年(1584年)首次提出「新法密率」(見《律呂精義》、《樂律全書》),推算出以比率 \sqrt [12] {2} 將八度音等分為十二等分的算法,並製造出十二平均律律管及律準,是世界上最早的十二平均律樂器。他用九九八十一位算盤計算出來準確到25位數字新法密率為:

律名 比率
正黃鐘 1.000000000000000000000000
倍應鍾 1.059463094359295264561825
倍無射 1.122462048309372981433533
倍南呂 1.189207115002721066717500
倍夷則 1.259921049894873164767211
倍林鍾 1.334839854170034364830832
倍蕤賓 1.414213562373095048801689
倍仲呂 1.498307076876681498799281
倍姑洗 1.587401051968199474751706
倍夾鍾 1.681792830507429086062251
倍太蔟 1.781797436280678609480452
倍大呂 1.887748625363386993283826
倍黃鐘 2.000000000000000000000000

───

 

自將更能了解『 MIDI 碼』之制定與『十二平均律』的關係︰

MIDI 碼 = 69 + 12 \cdot log_2 ( \frac{f}{440} )

220px-NoteNamesFrequenciesAndMidiNumbers.svgMIDI音樂鍵盤

鋼琴部份鍵

 

進而明白『鋼琴』琴鍵安排的規律。這一切的種種都離不開人類的『聽覺』,自然也沒有古今東西之人性差異。憑藉『感官知覺』之天賦,人們區分了『聲』與『樂』,『光』和『色』,居處於聲光樂色如斯美好的宇宙。這也許也說明了『感覺』終究是『物理』以及『心理 』之『統覺』的吧!那根『豆芽』之理竟如是難啃的耶?所以我們需要『聽得見』又『看得到』的『學習環境』來『體驗』那既『具體』又『抽象』之『感覺』實在的乎!?

也許一個『拍頻』 beat note 『現象』之問題,足以表達那難言之隱的吧!!假使回答以

差頻(英文:beat note)一詞來源於聲學上兩個頻率相近但不同的聲波干涉,所得到的干涉信號的頻率是原先兩個聲波的頻率之差 ,因此叫做差頻。

───

 

,怕是難明究理。即使再補之以

Beat (acoustics)

In acoustics, a beat is an interference between two sounds of slightly different frequencies, perceived as periodic variations in volume whose rate is the difference between the two frequencies.

With tuning instruments that can produce sustained tones, beats can readily be recognized. Tuning two tones to a unison will present a peculiar effect: when the two tones are close in pitch but not identical, the difference in frequency generates the beating. The volume varies like in a tremolo as the sounds alternately interfere constructively and destructively. As the two tones gradually approach unison, the beating slows down and may become so slow as to be imperceptible.

214px-Beating_Frequency.svg    Diagram of beat frequency

Mathematics and physics of beat tones

This phenomenon manifests acoustically. If a graph is drawn to show the function corresponding to the total sound of two strings, it can be seen that maxima and minima are no longer constant as when a pure note is played, but change over time: when the two waves are nearly 180 degrees out of phase the maxima of each cancel the minima of the other, whereas when they are nearly in phase their maxima sum up, raising the perceived volume.

It can be proven (see List of trigonometric identities) that the successive values of maxima and minima form a wave whose frequency equals the difference between the frequencies of the two starting waves. Let’s demonstrate the simplest case, between two sine waves of unit amplitude:

{ \cos(2\pi f_1t)+\cos(2\pi f_2t) } = { 2\cos\left(2\pi\frac{f_1+f_2}{2}t\right)\cos\left(2\pi\frac{f_1-f_2}{2}t\right) }[1]

If the two starting frequencies are quite close (for example, a difference of approximately twelve hertz[2]), the frequency of the cosine of the right side of the expression above, that is (f1f2)/2, is often too slow(low) to be perceived as a pitch. Instead, it is perceived as a periodic variation of the first in the expression above (it can be said that the lower frequency cosine term, i.e. the second one, is an envelope for the faster wave, i.e. the first cosine term), whose frequency is (f1 + f2)/2, that is, the average of the two frequencies. However, because the human ear is not sensitive to the phase, only the amplitude or intensity of the sound, only the absolute value of the envelope is heard. Therefore, subjectively, the frequency of the envelope seems to have twice the frequency of the cosine, which means the audible beat frequency is:

f_{beat}=f_1-f_2\,

This can be seen on the diagram on the right.

220px-WaveInterference

The sum (blue) of two sine waves (red, green) is shown as one of the waves increases in frequency. The two waves are initially identical, then the frequency of the green wave is gradually increased by 25%. Constructive and destructive interference can be seen.

 

A physical interpretation is that when \cos\left(2\pi\frac{f_1-f_2}{2}t\right) equals one, the two waves are in phase and they interfere constructively. When it is zero, they are out of phase and interfere destructively. Beats occur also in more complex sounds, or in sounds of different volumes, though calculating them mathematically is not so easy.

Beating can also be heard between notes that are near to, but not exactly, a harmonic interval, due to some harmonic of the first note beating with a harmonic of the second note. For example, in the case of perfect fifth, the third harmonic (i.e. second overtone) of the bass note beats with the second harmonic (first overtone) of the other note. As well as with out-of tune notes, this can also happen with some correctly tuned equal temperament intervals, because of the differences between them and the corresponding just intonation intervals: see Harmonic series (music)#Harmonics and tuning.

220px-Beat

A 110 Hz A sine wave (magenta; first 2 seconds), a 104 Hz G# sine wave (cyan; following 2 seconds), their sum (blue; final 2 seconds) and the corresponding envelope (red)

───

 

恐仍莫名其妙,或將知『學習環境』之重要的耶??

就讓我們試著用 Sonic π 建造一個『節拍體驗』情境,看看能否自學『樂理』的哩?!

現代『聽覺』的研究表明,雖然不同的人『音感』不同,然而卻都有下圖的聽覺『共性現象』:用一參考音高 F1 、另一變化音高 F2 ,讓 F2 遠比 F1 小而漸增加,聽覺逐漸從『平穩』變成『不平穩』── 『臨界頻帶』,在頻率差小於 15 Hz 時轉成了『拍音區域』、一般人當頻率差小於 12.5 Hz 時會產生『拍音』之感覺,最後 F2 = F1 時感覺是同音高;同樣的如果 F2 由比 F1 大而減小,情況相同。

音頻感覺

 

所以我們可以借

【 MIDI 碼‧音高頻率表】

MIDI頻率表

 

及一點點『 Sonic π 』之編程,在 JACK 的環境中,

 

節拍現象

 

探究、體驗、玩索『節拍』現象的真實矣!!

 

 

 

 

 

 

 

 

 

 

 

勇闖新世界︰ W!o《卡夫卡村》變形祭︰品味科學‧教具教材‧ Hi-Jack‧應用隨筆

事實上『 JACK 』相關的『 Applications 』應用軟體族類眾多︰

‧ Audio File Editors
‧ Control Applications
‧ DJ Software
‧ Effects Processors
‧ Graphics Applications
‧ Live Loopers
‧ Media Players
‧ Metering and Analysis
‧ Mixers
‧ Multi-track sequencers and HDR systems
‧ Music Notation Editors
‧ Programming Libraries
‧ Radio
‧ Simple Recorders
‧ Sound Generators
‧ Streamers
‧ Tuners
‧ Utilities
‧ Video Applications
‧ VOIP
‧ VST

因為文本系列之目的,我們選擇了其中的一小部份。建議讀者自行瀏覽網頁,或許可以找到很多極好的『音樂』軟件。此處我們僅僅介紹兩個已經用過的軟體,導引讀者進入『插頭』的世界而已。

假使你順著『插頭』應用軟件的鏈結走,想要了解那個軟體的用法 ,也許你會訝異所找到的內容。舉例來說︰

【 jaaa 】

Welcome to FA’s LinuxAudio page

Jaaa

Jaaa (JACK and ALSA Audio Analyser, is an audio signal generator and spectrum analyser designed to make accurate measurements.

───

 

【 meterbridge 】

JACK Meterbridge

This is the webpage for a software meterbridge for the UNIX based JACK audio system.

It supports a number of different types of meter, rendered using the SDL library and user-editable pixmaps.

───

 

這裡所擷取的內容,就是那兩個軟體主要的說明了。就像

概念拼圖︰Linux 手冊!》文本所言︰

The Linux Document Project 這個文件計畫始於 1992 年,二十二年過去了,到了今天也有了 WiKi ,雖然已經有了相當多的文件和資料 ,但是對大多數人來說,想要用的資料卻總是『找不到』。也許對許多軟體工程師來講,寫『使用手冊』是非常令人討厭的事,尤其針對快速發展,經常改版的軟體;當然也有很多開源軟體文件寫得很好,例如說功能強大的自由辦公室套件 Libre Office,它的文件就像真的書本一樣。那麼對一些已有『手冊』manual 的命令呢?很多使用過 man 來讀命令手冊的人 ── 比如打 man dmesg ︰dmesg 的 命令手冊 ──,都覺得十分難讀為什麼呢?試著再打一下『 man man 』,你就了解了。然而,為什麼不是呢?最早的『程式設計師』手冊,寫於 1971 年,已經四十多年前了,主撰者包括 了Dennis Ritchie 先生,今天知名的『 C 語言』的創始者。只是那個時代最好的的電腦,功能都比不上今天的一個小微處裡器, 更不會用『叫什麼 troff  』的文書處理程式下指令來寫文件??世界上,或許不只空間會有距離時間也會產生隔閡;也許今天更需要『閱讀過去的辦法了!以前愛因斯坦特別推重『想像力』,他說他想著『騎在光上』而發現了相對論。那麼如果能想像的『設身處地 』,是否能了解不同的『時代』── 無論是『過去』或『未來』──打開時空之門

……

 

此時最好的機會,也許就是『手冊』的了︰

【 man jaaa 】

JAAA(1)                                                                                    General Commands Manual                                                                                    JAAA(1)

NAME
       jaaa — JACK and ALSA Audio Analyser

SYNOPSIS
       jaaa [-h]  [-C nchan]  [-J]  [-A   [-ddevice]    [-rrate]    [-pperiod]    [-nnfraqs] ]

DESCRIPTION
       jaaa is an audio signal generator and spectrum analyser designed to make accurate measurements.

OPTIONS
       -h        Show summary of options.

       -C        Number of channels (1..8) [4

       -J        Use JACK

       -A        Use ALSA (with following options)

       -d device Alsa device [hw:0.0]

       -r rate   Sample frequency [48000]

       -p period Period size [1024]

       -n nfrag  Number of fragments [2]

       Either -J or -A must be given.

INTERACTIVE CONTROL
   Input :
       Select on of the four inputs.

   Frequency and Amplitude :
       These  two  sets  of  buttons  set  the  display view.  One of these six buttons, or 'Bandw', 'Peak', or 'Noise' discussed below, has an orange LED at its left side.  The LED indicates the 'currenty
       selected parameter' that usually can be modified in three ways :

          ·  by typing a new value into the text widget, followed by ENTER

          ·  by using the '<' or '>' buttons to decrement or increment,

          ·  by mouse gestures

   Frequency :
       Buttons 'Min' and 'Max' set the min and max displayed frequencies.  If either of these is selected then

          ·  a horizontal Drag Left changes 'Min'

          ·  a horizontal Drag Right changes 'Max'

       Button 'Cent' is the frequency at the middle of the x-axis.  Button 'Span' is 'Max' - 'Min', changing this value preserves 'Cent'.  If either of these is selected then

          ·  a horizontal Drag Left changes 'Cent'

          ·  a horizontal Drag Right changes 'Span'

       Button 'Cent' can also be set by Clicking in the frequency axis scale.

   Amplitude :
       Button 'Max' is the maximum value on the y-axis.  Button 'Range' is the range of the y-axis.  If either of these is selected then

          ·  a vertical Drag Left changes 'Max'

          ·  a vertical Drag Right changes 'Range'

       So for the last four mouse gestures, a Drag Left will scroll the display, while a Drag Right will zoom in or out.  Maybe I will add and automatic selection of the axis based on the direction of  the
       mouse gesture.

   Analyser :
       The  analyser  is  based on a windowed FFT.  Actually the windowing is performed by convolution after the FFT, and combined with interpolation.  The windowing and interpolation ensure that displayed
       peaks will be accurate to 0.25 dB even if the peak falls between the FFT bins.  More accurate measurements can be made using the markers (see below).

       Button 'Bandw' sets the FFT length, and hence the bandwidth of the analyser.

       Depending on this value, the size of the display and the frequency range, you may sometimes see two traces.

       This happens when the resolution of the analyser is better than the display, so that one pixel contains more than one analyser value.

       In that case, the blue trace is the peak value over the frequency range represented by each pixel, and the gray one is the average value.

       The first one is correct for discrete frequencies, and the latter should be used to read noise densities.

       There is no mouse gesture to change the bandwidth.

       Button 'VidAv' or video average, when switched on, averages the measured energy over time.  This is mainly used to measure noise.  The averaging length increases over time,  to  a  maxumum  of  1000
       iterations.  Changing the input or bandwidth resets and restarts the averaging.

       Button 'Freeze' freezes the analyser, but not the display, so you can still scroll and zoom or use the markers discussed below.

   Markers :
       Markers are used in order to accurately read off values in the display.  There can be up to two markers, set by clicking at the desired frequency inside the display.  When there are two markers, the
       second one will move with each click, while the first remains fixed.  Measured values for the two markers, and their difference in frequency and level are displayed in the upper left corner  of  the
       display.

       Button 'Clear' clears the markers.

       When 'Peak' is selected, clicking inside the display will set a marker at the nearest peak.

       The  exact  frequency  and  level of the peak are found by interpolation, so the frequency can be much more accurate than the FFT step, and the level corresponds to the true peak value regardless of
       display or analyser resolution.

       When 'Noise' is selected, clicking inside the display will set a noise marker.

       The noise density (energy per Hz) is calculated and displayed.

SEE ALSO
       jackd (1)

WWW
       http://www.kokkinizita.net/linuxaudio/

AUTHOR
       This manual page was written by Philippe Coval rzr@gna.org for the Debian system (but may be used by others).  Permission is granted to copy, distribute and/or modify this document under  the  terms
       of the GNU General Public License, Version 2 any later version published by the Free Software Foundation.

       On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.

 

【 man meterbridge 】

METERBRIDGE(1)                                                                             General Commands Manual                                                                             METERBRIDGE(1)

NAME
       meterbridge - meterbridge for Jack Audio Connection Kit

SYNOPSIS
       meterbridge [options] portname [portname] ...

DESCRIPTION
       This manual page documents briefly the meterbridge program.

       This manual page was written for the Debian distribution because the original program does not have a manual page.

       meterbridge  shows the signal values of the audio signals that flow through JACK ports. The possible representations include the classical VU meter, as well as PPM meter, Digital Peak meter and oth‐
       ers.  See the OPTIONS section for more information.

OPTIONS
       A summary of options is included below.

       -r rev-level
              Use rev-level as the reverence level for 0db on the meter.

       -c columns
              number of columns that are used for displaying several meters.

       -n jackname
              Use jackname as identifier with the JACK system.

       -t type
              Use the one of the following meter types:
                   'vu'  - classic moving needle VU meter
                   'ppm' - PPM meter
                   'dpm' - Digital peak meter
                   'jf'  - 'Jellyfish' phase meter
                   'sco' - Oscilloscope meter

EXAMPLES
             test with
                meterbridge -t vu alsa_pcm:capture_1 alsa_pcm:capture_2

             if you want to see what your JACK system is outputting you can use:
                meterbridge -t ppm alsa_pcm:playback_1 alsa_pcm:playback_2

             if you want to start a bridge with unconnected 4 meters:
                meterbridge -t ppm x x x x
             (or any other invalid port names)

SEE ALSO
       jackd(1).

AUTHOR
       This manual page was written by Guenter Geiger <geiger@debian.org>, for the Debian project (but may be used by others).

                                                                                                April 11, 2012

 

『手冊』之結構與『閱讀』的方法,讀者可以參考《概念拼圖︰Linux 手冊!》的介紹。

萬一連『手冊』都沒有,怎麼辦呢?嘗試『錯誤』,發揮『想像』 ,『動手』將之『玩出來』耶!?

……

柯靈烏於《歷史的理念》一書中講︰

基於自然的『人性』,人的『同理心』和『同感心』是否能夠用著『想像力』的翅膀重回『歷史的現場』,再次在心中『重演』那些『歷史事件』,『體驗』事件中人物的『思想』以及『情感』,因此『解讀』歷史事件中的『人性抉擇』之理性『必然性』。

《說文解字》講:游,旌旗之流也戲,三軍之偏也。一曰兵也

600px-Two_baby_game

德國詩人和劇作家席勒提出『遊戲』之理論。席勒說:『只有當人充分是人的時候,他才遊戲;只有當人遊戲的時候,他才完全是人。』。或許人類在生活中勢必受到『精神』與『物質』的雙重『束縛』,因而喪失了『理想』和『自由』。於是人們假借剩下的精力打造一個『自在』的國度,這就是『遊戲』。此種『創造性』活動,源自人類的『本能』。

這些年來,有學者指出『數位遊戲式學習』 Digital game based learning 的好處。經由『遊戲』進行『學習』,達到『寓教於樂』的目的。就像一九九六年,美國喬治亞大學 Hogle J. G. 在《 Considering Games as Cognitive Tools:  In Search of Effective “Edutainment” 》論文中談及遊戲對於學習的諸多優點:

一、提高學習的樂趣,引發內在的動機。

二、故事般情節,能夠強化記憶。

三、可以重複操作,產生回饋。經由多次練習,促進目標的達成。

四、符應人類認知結構之場景,提供高層次的思考機會。

─── 引自《玩遊戲有何不好??λ