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),加上足夠的 libc 用於malloc 、 realloc 、 free 、 memcpy 、 memset和memmove 。 (此外,必須支援#pragma once 。)
命令列解釋器:以上,加上 POSIX,以及足夠的 libc 用於常見字串操作( strlen 、 strcmp等)
Livecoding 終端 UI:以上,加上 ncurses(或相容的 curses 函式庫)和浮點支援(用於計時)。
建置腳本,簡稱為tool ,是用 POSIX sh編寫的。它應該與gcc (包括musl-gcc包裝器)、 tcc和clang一起使用,並且會自動檢測您的編譯器。您可以使用-c選項手動指定編譯器。
目前已知可在 macOS( gcc 、 clang 、 tcc )和 Linux( gcc 、 musl-gcc 、 tcc和clang ,可選地使用LLD )以及 Windows 上構建通過 cygwin 或 WSL ( gcc或clang , tcc未經測試) 。
建置腳本有一個即發即忘的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 Livecoding 環境使用 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 livecoding 環境$ ./tool build --portmidi orca # compile orca using build script
$ build/orca # run orcaorca Livecoding 環境控制 ┌ 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二進位)從檔案讀取並執行 orca 模擬 1 個時間步長(預設)或指定的數字( -t選項),並將網格的結果狀態寫入標準輸出。
cli [-t timesteps] infile您也可以讓cli從 stdin 讀取:
echo -e " ...na34n... " | cli /dev/stdin