10 posts tagged Mac OS X
先日 Core Video ブログで「QT Kit の単純さも捨てがたいので,ひとまず QT Kit の簡単な使い方から始めていくことにしたいと思います」と書いてしまったのだが,Mac OS X Technology Overview に以下のような記述があるのを見落としていた.
AV Foundation is the recommended API for all new development involving time-based audiovisual media. AV Foundation is also recommended for transitioning existing applications that were based on QuickTime or QTKit. (Note: The AV Foundation frameworks for Mac OS X and iOS are almost identical.)
というわけで,本ブログや Core Video ブログの記述に訂正を加える.
えらいすんませんでした.
以下,関連エントリーと訂正を受ける記事.
Buy Yamaha’s UX16.
Download the latest driver of UX16 for your Mac.
Install the driver.
Verify the driver correctly installed (see a manual at the web site).
Restart the Mac.
Connect UX16 to the Mac.
Open the System Preference and (just) see the control panel for UX16 is installed.
Download sample sketch from SparkFun’s Arduino Midi page.
Plug Midi shield to the Arduino Uno.
Turn the slide switch on the Midi shield to PROG.
Connect the Arduino Uno to the Mac by using USB cable.
Upload the sample sketch.
Turn the slide switch to RUN.
Connect UX16 to the Midi shield.
Start GarageBand on your Mac.
Hit a button on the Midi shield. (This will send Note On command to Channel 1.)
Remember which note was on.
Turn the slide switch to PROG.
Copy the sample sketch folder to your working directory.
Add Midi Note Off command after the push switches turned off.
Upload the modified sample sketch.
Turn the slide switch to RUN.
Make sure that GarageBand is now closed.
Start Quartz Composer.
Put Midi Notes Receiver in the editor window.
Make Middle C to C3.
Solder two wires to outer (edge-side) pins of a tact switch of the Midi shield.
Insert a relay or a photo coupler (use a tester to check the direction of current, inserting 1,500 ohm register worked fine for me).
Add a circuit to drive relay or photo coupler by the sensor. (You may want to insert an open-collector Schmitt trigger circuit.)
Enjoy.
ヤマハUX16を購入する.
UX16の最新版のドライバをダウンロードしインストールする.
マニュアルに沿って,ドライバが正しくインストールされたことを確認する.
Macを再起動する.
UX16をMacにつなぐ.
システム環境設定でUX16のパネルを確認する.
Arduino MIDI シールドをArduino UNOに挿す.
スライドスイッチをPROG側に動かす.
Sparkfunのページからサンプルスケッチをダウンロードする.
Macと Arduino UNO をUSBケーブルでつなぐ.
サンプルスケッチを Arduino UNO へアップロードする.
スライドスイッチをRUN側に動かす.
UX16とMIDIシールドをつなぐ.(UX16のINをMIDIシールドのOUTにつなぐ.)
GarageBandを立ち上げる.
MIDIシールドのタクトスイッチを押す.
どの音程が鳴ったか覚えておく.
MIDIシールドのスライドスイッチをPROG側に動かす.
サンプルスケッチをフォルダごとコピーして別名をつける.
スイッチOFF時にMIDIノートOFFを送信するようにプログラムを書き換える.
書き換えたサンプルスケッチを Arduino UNO へアップロードする.
MIDIシールドのスライドスイッチをRUN側に動かす.
GarageBandを終了する.
Quartz Composer を起動する.
MIDI Notes Receiver を編集画面で追加する.
中心C音程をC3にする.
タクトスイッチで動作確認.
タクトスイッチの外側ピン(2本)にそれぞれ導線をはんだづけする.
この導線がショートすればスイッチONなので,リレーかフォトカプラを挿入する.
(僕はたまたまフォトカプラと直列に1,500オームの抵抗を入れていたが問題なく動いた.)
センサからリレーないしフォトカプラを駆動する回路を入れる(オープンコレクタのシュミットトリガ回路が一番いいと思う).
これでいいのだ.
As you may know, Steve Jobs, a co-founder of Apple, was once fired from Apple. Right after his leaving from Apple, he went to the next step.
In Apple Steve gave their Macintosh an outstanding GUI design, which has been living for more than 20 years. Steve must have wanted to re-design the GUI when he started his new computer product, and he finally reached to the NeXT step’s interface (photo).
The menu bar was not horizontal but vertical and stayed at the left top corner. App launcher and app indicator were separated (unlike OS X) and occupied the right edge and the bottom edge respectively. (Note that the Mac did not have the same concepts when the NeXT step was out.)
The current GUI design of OS X is a mixture of the classic Mac OS and the NeXT step, it inherits the horizontal menu bar from classic Mac OS, and also inherits app launcher and indicator from NeXT step.
ご存じの通りスティーブ・ジョブズはアップルを一度解雇されている.その直後にNeXTコンピュータというコンピュータ会社を立ち上げるわけだが,自分自身でデザインしたMacのGUIを超えるGUIを確かに作りたかったのだと思う.そのようにして設計されたのが写真のNeXTstepのGUIだ.メニューバーは垂直になり画面の左上にいる.画面右端はアプリケーションローンチャ,画面下端はアプリケーションインジケータが来る.現在のOS Xは結局,もともとのMac OSとNeXTのハイブリッドになった.つまり,メニューは水平で画面の上端,ローンチャとインジケータはドックに統合されて画面の下端だ.
If you want to start up your shell script automatically on your Mac, you may want to write a shell script file (let’s call it autoexec.sh) and drag it to Log-in items of System Preference.
Well, this just works, until you want to automatically shut down your Mac. The shell script will run on Terminal.app, and the Terminal.app hosting a shell script will intercept the shut down process of the Mac.
All that you need to do is this: use Automator instead of shell script. Run Automator, select App, choose run shell script from the library, copy & paste your shell script, save, and drag it to Log-in items. And here, DO NOT FORGET TO ADD AUTOMATOR ITSELF TO LOG-IN ITEMS.
By doing this, your Mac can automatically start (by timer) and exec the script, and the script won’t disturb the shut down process of the Mac.
コンピュータの黎明期には,ソフトウェア開発において,プログラミングの自由度は決定的に重要な要素だった.OSのソースコードはオープンであるべきだったし,コンパイラも,エディタもオープンであるべきだった.実行環境と開発環境は出来れば同じほうが便利だったし,実行環境も出来るだけオープンな設計が好まれた*.自由が無ければ,大多数のハッカーたち(悪い意味ではない)が作りたいと思うものを作ることは出来なかった.
Mac OS X の完成度の高さは,一部のハッカーたちに,ベンダーが作るクローズドなOSも悪くないと思わせるに十分だった.アップルが注意深くオープンにすべきところとクローズドにすべきところを選んだおかげで,ハッカーは優れたアプリケーションを,アップルの裏をかくことなく作ることが出来た.それどころか,遅まきながらGUIのすばらしさに気づいたハッカーはCocoaアプリケーションを書き始める.Cocoaがビューとモデルを綺麗に分離してくれるので,もはやGUIプログラムとCUIプログラムの間にまたがる精神的な壁はない.
そして,Cocoaアプリケーションを作る限り,iPadの開発環境の完成度の高さは Mac OS X のそれを上回る.そのためなら,アップルへのお布施も,非開示契約も,クローズドな環境も,すべて受け入れたくなる.
足枷が心地よいのは,我が国の様式美のごとくなのだろうか.
*残念ながら完全にオープンかつ実用的なハードウェアというのは見果てぬ夢だったようだ.例えば今時のCPUはソフトウェアによって書かれているが,CPUのソースコードが公開されている例はまずない.ここで言うオープンとは,マザーボードの回路図が公開されているという程度の意味だ.
Loading posts...