顯示具有 mandriva 標籤的文章。 顯示所有文章
顯示具有 mandriva 標籤的文章。 顯示所有文章

Play Sound using Virtual MIDI Piano Keyboard

其實主要步驟只要照著 Compdigitec Labs 的這篇 Virtual MIDI Keyboard In Ubuntu 作即可.

不過實際上在我的系統上有些微的不同. 因為對整個 Sound System 不熟悉, 沒有辦法理解是怎麼回事, 姑且記下來當作 "這樣設定也可以" 看吧.

先記一下安裝的部份, 共需要 ( Package Name 以 Mandriva 2010.1 上的為準 ) :

1. qjackctl ( JACK Audio Connection Kit )
2. zynaddsubfx ( ZynAddSubFx )
3. vmpk ( Virtual MIDI Piano Keyboard )

其中 vmpk 是要作為虛擬 MIDI 鍵盤的主介面. 雖然後來發現 ZynAddSubFx 也有虛擬鍵盤介面, 但是變更 Keyboard Map 設定跟其他各種設定上, 感覺 vmpk 比 ZynAddSubFx 來的方便.

而 qjackctl 是 Connection 控制器, 負責把 vmpk 作為前端介面, 輸出的 MIDI 資料導引到 ZynAddSubFx, 再到實體的音效硬體/音效卡作播出. 因為 vmpk 本身其實就是單純的虛擬鍵盤子系統, 因此到實際播出前需要 Synthesizer 幫忙處理合成. ZynAddSubFx 在這裡就當作 Synthesizer 使用.

接著作 limits.conf 設定,

sudo su -c 'echo @audio - rtprio 99 >> /etc/security/limits.conf'
sudo su -c 'echo @audio - memlock 250000 >> /etc/security/limits.conf'
sudo su -c 'echo @audio - nice -10 >> /etc/security/limits.conf'

把系統 reboot 後重新開啟 qjackctl, 並利用 "Start" 按鈕開啟 JACK server ( jackd ). 這時候如果遇到開啟失敗的訊息, 請利用 Messages 按鈕看錯誤訊息. 如果是 server 啟動失敗, 請把 ALSA 重新啟動試試看. ( alsa command 的位置可能根據系統有所不同 )

sudo su -c '/etc/init.d/alsa force-reload'

啟動沒問題的話, 開啟 ZynaddSubFx 以及 vmpk, 然後利用 Connect 按鈕設定上面說的, 從 vmpk 到 ZynaddSubFx 再到音效裝置的 Connections.

照 Compdigitec Labs 的文章中之示範, 音效卡代號應該會出現在 ALSA 分頁中, 但是我的沒有 ^^b, 所以先只有把 vmpk 的 Output 接到 ZynaddSubFx. 接上的方法很簡單, 用滑鼠把 vmpk Output 拉到 ZynaddSubFx 上放開即可.


而 ZynaddSubFx 到音效裝置間的連結, 則是改在 Audio 頁面中搞定. 其中 playback 1 是左聲道, playback2 是右聲道, 其他的在我系統中無作用.


這樣設定完就 OK 了~, 把視窗 Focus 移到 vmpk 上面, 對應的鍵盤按下去就可以看到琴鍵變化, 以及發出 MIDI 音效. 在 ZynaddSubFx 視窗中也會有對應的變化.


其實當焦點移到 ZynaddSubFx 上也是可以有同樣的反應. 不過如上所述 vmpk 較占優勢的理由, 本篇還是以 vmpk 作為 Front-End 為主.

To Have More "Replaceable" Distro. is Good

剛剛才看到 Mageia 的消息, 忽然驚覺自己的想法也有些轉變.

在幾年以前, 雖然覺得難度很高, 但是基本上我算是 "統一 Linux 版本" 的隱性支持者. 姑且不論要用什麼方式統一, 例如有單一組織發行標準版, 或是針對 Distro. 架構訂出標準等等. 希望就此解決使用者會感覺混亂, 沒有單一品牌, 不易推廣等等問題.

但是上個月初, 因為一些誤會, 導致剛安裝好的 Mandriva 2010.1 RC 被我砍掉重裝了. 因為還有工作要完成, 沒有辦法等我慢慢釐清問題, 很不安地先備份資料後選擇重裝 Mandriva 2010.1 Stable. 因為我以前使用的習慣不是很好, 導致每次更新或重新安裝新版本, 在回復過去的工作環境上都需要六個小時或以上的時間.

但是這次因為距離上次更換為 Mandriva 2010.1 RC 的時間尚短 (不到幾個月), 大部分資料都只存在 /home 裡面, 額外的 Library 也幾乎都是用 Package Manager 安裝的. 因此在重新安裝之後, 再次透過 Package Manager 勾選所有我需要的 Package, 安裝後會動取用 /home 裡面的 Configurations & Profiles, 在一個小時內我就完成了整個安裝 + 幾乎整個環境回復.

這次的經驗是很好的, 因為我花了很少的時間得到了更新而穩定的系統, 同時我的資料以及各種 Configurations & Profiles 都沒有失去.

這個完全從使用者角度來看的經驗, 或許反映出是否有統一的版本或架構其實並非重點...

生物多樣性 -- 版本多樣性很重要, 但是對於使用者來說, 前提是不會因為版本多樣性而造成額外的負擔, 即便是版本多樣性可以帶來任何 Distro. Makers 所宣稱的好處.

所以什麼 "Domain-Specific", "More Stable", "The Plan of Company"... 一堆理由或許都敵不過 "Replaceable" 的重要性.

滿足 "Replaceable" 使用者就可以自由地轉換 Distro., 哪怕你的團隊就只發行一個版本的 Distro. , 只要他對於轉換提供某種程度以上的保證, 使用者就可以放心的使用, 不用挑什麼 "穩定長久地發展" 等等...

人都是不可靠的, Distro. 發展團隊也是. Mageia 也不能保證 Mandriva 的使用者改用他們的 Distro. 就不會在兩三年後被迫改回用 Mandriva 或是其他的 Distro. 以得到比較新版的整合. 相對來說, 如果 Mageia 可以跟我保證, 在某個時間點, 我可以知道轉移其他 Distro. 的 "Replaceability" 有多少, 會是更有意義的保證.

Picasa 3 Web Connection Failed (Login Failed) on Linux

因為重新安裝了新版的 Mandriva, 自然 Picasa 也要重裝 ... 時間過得很快, 沒想到已經有 Picasa 3 beta 了, 鑑於個人對於 Picasa 2 for Linux 的諸多不滿, 自然想試試看 Picasa 3 ...

結果還是一樣, 到底為什麼 Picasa 要設計成一啟動就不受控制地 Scan 我的所有大大小小資料夾呢 ? 而且介面對於 zh-TW 的支援還是很有問題阿...

正向上傳去澎湖的一些照片的時候, 又遇到 Web Connection Failed 的問題, 訊息大致是像這樣:


Login failed
HttpOpenRequest failed (12157) -
https://www.google.com/accounts/ClientAuth [13]
.........

找了一下 Google, 補上 openssl-devel 的安裝即可解決. 在 Mandriva 2010.1 下的話, 相對就是 libopenssl-devel package

不過感到奇怪的是, 因為原本 openssl 已經有安裝了, 為什麼 Picasa 還是需要 devel package 呢 ? 如果只是需要 libssl.so 的話, 在 openssl/libopenssl package 裡面應該就已經有了.

難不成在進行 Web Connection 時, Picasa 會作某些 Compilation 動作 ?

不過如果仔細去看 /home/user/.google/picasa/3.0/ , 會發現有以下的錯誤訊息:

fixme:wininet:InternetSetOptionW Option INTERNET_OPTION_CONNECT_TIMEOUT (10000): STUB
fixme:wininet:InternetSetOptionW INTERNET_OPTION_SEND/RECEIVE_TIMEOUT 10000
fixme:wininet:InternetSetOptionW INTERNET_OPTION_SEND/RECEIVE_TIMEOUT 10000
err:wininet:NETCON_init trying to use a SSL connection, but couldn't load libssl.so. Expect trouble.


從最後一個訊息看起來是因為找不到 libssl.so , 因此再回頭去看 Mandriva 2010.1 在 libopenssl 以及 libopenssl-devel 裡面的檔案安裝配置, 會發現 :

libopenssl 安裝完只有 /usr/lib/libssl.so.1.0.0


而 libopenssl-devel 安裝完會建立 /usr/lib/libssl.so -> /usr/lib/libssl.so.1.0.0
( Konsole 配色 XD )


這樣 Picasa 才能夠找到 /usr/lib/libssl.so 而成功進行 Web Connection.


所以... 應該是可以不用安裝 openssl-devel package, 只要自己在 /usr/lib 裡面建立 softlink 到正確的 libssl.so 檔案位置就好... 不過這只是個人猜測, 懶得移除再嘗試一次了 :p

Boot and No Screens Found [Solved ... ?]

Unfortunately... after a weekend power blackout, my Philips 200WB monitor could not display anymore in X system.

The booting message on the monitor displays fine, it just got into "SLEEP" mode when the X starts to running, and nothing shows up thereafter.

Changed the runlevel to 3, and logined in command line to check the log, the kdm.log only says: No Screens Found.

The log message may be correct, but it seems odd to me since I could see all the booting messages before the X starts to run...

If you google the message "No Screens Found" plus the keywords linux, mandriva, startx, or whatever, you might found many speculations and possible solutions, such as the corrupted xorg.conf, inconsistent package upgrading, driver problems...

I had no idea what's going on, but I did make some X system upgrades before the blackout, so I guessed maybe one of the speculations is my problem. Therefore I tried these solutions as people suggested on the web:

1. depmod -a & startx to see if it works

2. XFdrake --experts to re-configure the xorg.conf ( actually this works the same as drakconf on Display configuration )

3. Remove the original xorg.conf, use xorgconfig to generate new xorg.conf

4. Set the device and the monitor to generic options

5. Re-install the X system

6. Re-install the Mandriva ... ( Yes I did that !!! Fortunately I made the system and data partitions a clear cut, so the re-installation is quite easy )

And all of these solutions did not work, my monitor still SLEEPED ZZZzzzzzzz after the X starts to run.

Somehow I started to think : Will it be the problem of the monitor itself ?

So I changed the monitor with another Mozo LCD with D-Sub connection. Hell, my desktop is back ~!!

After a cross check, I finally figured out that the problem is on the DVI+ connection of my original Philips monitor. The connection is a DVI-D single link. The end of the link in the monitor side is not locked, and being a little loose.

I check some DVI information on the web, but I really can not figure out how it works and how this would happen. I guess there might be two causes: (1) because of the loose link, the video adapter can not acquire the correct monitor EDID, or (2) because of the loose link, some video signal (TMDS) can not transmit correctly.

Anyway, after I re-connected the DVI-D link and locked it well, the monitor functions correctly as usual :)

So, if anybody has the same problem as me, maybe you can consider check the DVI link before try any complicated solution :p

Knotify4 Crashes Mandriva Sound System

又是 Mandriva 2010.1 RC 上的問題. 在我的系統一段時間沒操作之後, Knotify4 會開始不斷地運作, 大約佔據 6% 的 CPU, 每隔兩秒出現提醒音效, 然後完全阻斷整個音效系統, 連帶 Audacious 或是 AmaroK 會當掉. 即便重新開啟 Audacious, 也是會在播放時, 每隔一秒強迫重放該首 (應該是因為 Sound System 被佔據, 更準確地說是使用 ALSA 系統會這樣)

查了一些討論, 似乎 MDV 2009 版本開始就有類似的問題, 有回報修好, 但是在後續的 KDE 4 版本還是有人遇到同樣的問題.

找到唯一明顯有效的解法是放棄系統提醒音效...

作法是 (在繁體中文版) 桌面設定 -> 外觀與感覺 -> 通知 -> 系統通知 -> 播放器設定, 請改為 "沒有音效輸出"

不過這樣的解決方案有點討厭就是了, 需要系統通知的使用者就要犧牲了 = =

Firefox 3.6 很慢的問題...

剛換了 Mandriva 2010.1 RC 不久, KDE 4 雖然很漂亮 (之前是 MDK 2008, KDE 3.5), 但比較討厭的是 Kwin 在我現在的機器上效能表現不佳, 不知道是否與顯示卡有關, 還沒有時間深究. 另外一點是內建的 Firefox 3.6.3 在開啟頁面以及切換頁面時, 超 級 慢 ~~

今天早上終於受不了, Google 了幾個頁面, 沒想到一下子就找到解決方案啦 :)

問題點在於 Firefox 的 network.dns.disableIPv6 這個設定, 根據 mozillaZine 上的說明, 這個設定在 MacOS X 上是 default True, 而在其他的系統上是 default False. 換句話說, 在我的系統上是預設會去作 IPv6 的 DNS Lookup.

但是這行為在台灣是無意義的, 因為目前台灣的 ISP 大多未更新到 IPv6 的系統 (或是讓 IPv6 與 IPv4 相容), 因此把這個選項設為 False 只會讓效能變慢而已.

在 Firefox 的網址列輸入
about:config 後, 找到 network.dns.disableIPv6 把它改為 True, 開啟頁面以及切換頁面就正常了 :)


Designed by Posicionamiento Web | Modified by seLain | Bloggerized by GosuBlogger | Blue Business Blogger