Orca は難解なプログラミング言語であり、手続き型シーケンサーを迅速に作成するために設計されたライブ エディターです。アルファベットのすべての文字は演算であり、小文字は*bang*で実行され、大文字は各フレームで実行されます。
これは、ORCΛ 言語とターミナル ライブコーディング環境の C 実装です。電力効率が良いように設計されています。端末が小さくても、大きなファイルを処理できます。
Orca はシンセサイザーではありませんが、MIDI、OSC、UDP を Ableton、Renoise、VCV Rack、SuperCollider などのオーディオ/ビジュアル インターフェイスに送信できる柔軟なライブコーディング環境です。
| メインの git リポジトリ | GitHub ミラー |
|---|---|
| git.sr.ht/~rabbits/orca | github.com/hundredrabbits/Orca-c |
sudo apt-get install git libncurses5-dev libncursesw5-dev libportmidi-dev
git clone https://github.com/hundredrabbits/Orca-c.git
cd Orca-c
make # Compile orca
build/orca # Run orca MIDI 出力デバイスを選択するには、 F1 (またはCtrl+D ) を押してメイン メニューを開き、 MIDI Output...を選択します。
┌ ORCA ───────────────┐┌ PortMidi Device Selection ─────┐
│ New ││ > (*) #0 - Midi Through Port-0 │
│ Open... ││ ( ) #2 - ES1371 │
│ Save │└────────────────────────────────┘
│ Save As... │
│ │
│ Set BPM... │
│ Set Grid Size... │
│ Auto-fit Grid │
│ │
│ OSC Output... │
│ > MIDI Output... │
│ │
│ Clock & Timing... │
│.....................│
コア ライブラリ: C99 コンパイラ (VLA は必要ありません)、さらにmalloc 、 realloc 、 free 、 memcpy 、 memset 、およびmemmoveに十分な libc 。 (また、 #pragma onceがサポートされている必要があります。)
コマンドラインインタープリター: 上記に加えて POSIX、および一般的な文字列操作 ( strlen 、 strcmpなど) に十分な libc
ライブコーディング ターミナル UI: 上記に加えて、ncurses (または互換性のcurses ライブラリ)、および浮動小数点サポート (タイミング用)。オプションで、PortMidi を使用して直接 MIDI 出力を有効にすることができます。
単にtoolと呼ばれるビルド スクリプトは、POSIX shで書かれています。これはgcc ( musl-gccラッパーを含む)、 tcc 、およびclangで動作し、コンパイラーを自動的に検出します。 -cオプションを使用してコンパイラを手動で指定できます。
現在、macOS ( gcc 、 clang 、 tcc ) および Linux ( gcc 、 musl-gcc 、 tcc 、およびclang 、オプションでLLDを使用)、および cygwin または WSL 経由の Windows ( gccまたはclang 、 tcc未テスト) 上でビルドすることが知られています。
ビルド スクリプトの周りには、fire-and-forget makeラッパーがあります。
PortMidi はオプションの依存関係です。これは、 toolビルド スクリプトを実行するときにオプション--portmidi追加することで有効にできます。
--no-mouseオプションを追加すると、マウス認識を無効にできます。
toolビルドスクリプトを使用してビルドする./tool helpを実行して使用法情報を確認します。例:
./tool build -c clang-7 --portmidi orca
# Build the livecoding environment with a compiler
# named clang-7, with optimizations enabled, and
# with PortMidi enabled for MIDI output.
# Binary placed at build/orca
./tool build -d orca
# Debug build of the livecoding environment.
# Binary placed at build/debug/orca
./tool build -d cli
# Debug build of the headless CLI interpreter.
# Binary placed at build/debug/cli
./tool clean
# Same as make clean. Removes build/makeラッパーを使用してビルドするmake release # optimized build, binary placed at build/orca
make debug # debugging build, binary placed at build/debug/orca
make clean # removes build/ makeラッパーはデフォルトで--portmidi有効にします。 toolビルド スクリプトを独自に実行する場合、 --portmidiはデフォルトでは有効になりません。
orcaライブコーディング環境の使用法 Usage: orca [options] [file]
General options:
--undo-limit <number> Set the maximum number of undo steps.
If you plan to work with large files,
set this to a low number.
Default: 100
--initial-size <nxn> When creating a new grid file, use these
starting dimensions.
--bpm <number> Set the tempo (beats per minute).
Default: 120
--seed <number> Set the seed for the random function.
Default: 1
-h or --help Print this message and exit.
OSC/MIDI options:
--strict-timing
Reduce the timing jitter of outgoing MIDI and OSC messages.
Uses more CPU time.
--osc-midi-bidule <path>
Set MIDI to be sent via OSC formatted for Plogue Bidule.
The path argument is the path of the Plogue OSC MIDI device.
Example: /OSC_MIDI_0/MIDI
orcaライブコーディング環境を構築して実行する$ ./tool build --portmidi orca # compile orca using build script
$ build/orca # run orcaorcaライブコーディング環境コントロール ┌ Controls ───────────────────────────────────────────┐
│ Ctrl+Q Quit │
│ Arrow Keys Move Cursor │
│ Ctrl+D or F1 Open Main Menu │
│ 0-9, A-Z, a-z, Insert Character │
│ ! : % / = # * │
│ Spacebar Play/Pause │
│ Ctrl+Z or Ctrl+U Undo │
│ Ctrl+X Cut │
│ Ctrl+C Copy │
│ Ctrl+V Paste │
│ Ctrl+S Save │
│ Ctrl+F Frame Step Forward │
│ Ctrl+R Reset Frame Number │
│ Ctrl+I or Insert Append/Overwrite Mode │
│ ' (quote) Rectangle Selection Mode │
│ Shift+Arrow Keys Adjust Rectangle Selection │
│ Alt+Arrow Keys Slide Selection │
│ ` (grave) or ~ Slide Selection Mode │
│ Escape Return to Normal Mode or Deselect │
│ ( ) _ + [ ] { } Adjust Grid Size and Rulers │
│ < and > Adjust BPM │
│ ? Controls (this message) │
└─────────────────────────────────────────────────────┘
cliコマンドライン インターフェイス インタープリターCLI ( cliバイナリ) は、ファイルから読み取り、1 タイムステップ (デフォルト) または指定された数 ( -tオプション) の orca シミュレーションを実行し、結果のグリッドの状態を stdout に書き込みます。
cli [-t timesteps] infile cli標準入力から読み取るようにすることもできます。
echo -e " ...na34n... " | cli /dev/stdin