Skip to content

Instantly share code, notes, and snippets.

@yoggy
Last active April 20, 2019 12:26
Show Gist options
  • Select an option

  • Save yoggy/1f144f6d50d3ff707a4787447e168906 to your computer and use it in GitHub Desktop.

Select an option

Save yoggy/1f144f6d50d3ff707a4787447e168906 to your computer and use it in GitHub Desktop.
Tidal Cyclesの手動インストールメモ 2019.4 (Windows編)

Tidal Cyclesの手動インストールメモ 2019.4 (Windows編)

きっかけ

演奏するプログラミング、ライブコーディングの思想と実践 ―Show Us Your Screensでは、Windows環境にTidal Cyclesをインストールする方法としてChocolateyを使った手順が紹介されている。 しかし、2019/4/7現在、ChocolateyでHaskellのパッケージインストールに使用されるCabal環境では、networkパッケージのインストールに失敗するため、書籍で紹介されている手順ではTidalCyclesのインストールができない。

そこで、Haskellのパッケージインストールにstackを使用したTidal Cyclesのインストール手順を紹介する。

手順

SuperCollider

SuperColliderのサイトから最新版のインストーラをダウンロード&インストール

sc3-plugin

SuperColliderのプラグイン集。Tidal Cyclesのサンプルの実行で必要みたい。

SuperColliderを起動して、エディタウインドウに次のコードを入力して、ctrl+enterを押すと、SuperColliderのプラグインディレクトリが表示される。

Platform.userExtensionDir

Post Windowに変数に設定されているパスが表示される。ここがSuperColliderのプラグインディレクトリ。

-> C:\Users\ユーザ名\AppData\Local\SuperCollider\Extensions

sc3-pluginsのサイトにはソースからコンパイルする方法が掲載されているが、git+Visual Studio+cmakeを用意する必要があるので、コンパイル済みプラグインを以下URLからダウンロードする。

zipを解凍すると、中にSC3pluginsというディレクトリがあるので、このディレクトリをまるごと C:\Users\ユーザ名\AppData\Local\SuperCollider\Extensions ディレクトリへコピーする。

SuperDirt

SuperColliderを起動して、エディタウインドウに次のコードを入力して、ctrl+enterを押す。

Quarks.checkForUpdates(); Quarks.install("SuperDirt", "v1.0")

Post Windowに次のコマンドが表示されたら、インストール完了。

SuperDirt installed
-> Quark: SuperDirt[v1.0]
SCDoc: Indexed 1343 documents in 70.41 seconds

ちなみに、QuarksはSuperColliderのパッケージマネージャ。Quark.guiを実行するとインストール可能なパッケージ一覧が表示されるので、ここからSuperDirtをインストールしてもOK。

パッケージDart-SamplesにTidal Cyclesで使える音色が含まれている。 Local pathのボタンを押すと、音色が格納されているディレクトリが開く。

  • tidalcycles-00.png

Tidal Cyclesのインストール

まず、Haskellのパッケージマネージャstackをダウンロード&インストールする。

次に、コマンドプロンプトを起動し、次のコマンドを入力する

> stack install tidal

stack pathコマンドを実行すると、各パッケージがどこにインストールされているか表示される。

AtomとTidalCycles用機能拡張のインストール

Atomをインストール&起動する。

メニューのFile->Settingsを開き、Installからtidalcyclesをインストールする。

  • tidalcycles-01.png

stackでTidal Cyclesをインストールした場合は、tidalcyclesの設定画面を開き、Ghci Pathの項目に、"stack exec ghci"を設定しておく。

  • tidalcycles-02.png

動作確認

SuperColliderを起動し、編集ウインドウで次の2行を実行してSuperDirtを起動する。

include("SuperDirt")
SuperDirt.start

Atomを起動して*.tidal拡張子のファイルを開く。

  • File → New Fileで新規作成してから、*.tidalでファイルを一度保存する
  • もしくは、*.tidalファイルをFile → Open Fileから開くのどちらかで。

この状態で、メニューのPackages→Tidal Cycles→Boot Tidal Cyclesを選択し、Tidal Cyclesを起動する

  • tidalcycles-03.png

次に、*.tidalファイルに以下の1行を記述しこの行でctrl+enterを押す。

d1 $ s "bd cp"

バスドラムとクラップが交互に鳴れば、Tidal Cyclesのインストールは成功している。

音を止めるときは、

d1 silece

または、

hush

を実行すると音が止まる。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment