1
0
Fork
You've already forked orca-lang
0
Fork of ORCΛ for the browser with collaborative editing and a pluggable trigger system for custom audio synthesis https://orca.flok.cc
  • JavaScript 98.7%
  • HTML 0.7%
  • CSS 0.6%
Damián Silvani 7dd55e2255
All checks were successful
Build and Deploy / deploy (push) Successful in 41s
docs: Update READMEs
2025年12月13日 09:28:39 -03:00
.forgejo/workflows chore: Create CD deployment workflow ( #2 ) 2025年10月31日 23:11:52 +01:00
packages docs: Update READMEs 2025年12月13日 09:28:39 -03:00
.gitignore Initial commit - vite 2025年10月23日 16:58:11 -03:00
index.html feat: Change favicon 2025年10月25日 18:10:50 -03:00
lerna.json feat: Split into modular packages with Lerna: core, renderer, yjs-core 2025年10月26日 13:56:35 -03:00
LICENSE-ORCA.txt docs: Add README 2025年10月23日 20:52:13 -03:00
LICENSE.txt docs: Add README 2025年10月23日 20:52:13 -03:00
package.json fix: Update package.json files 2025年11月01日 10:35:36 -03:00
pnpm-lock.yaml fix: Add missing y-indexeddb dep on standalone 2025年10月26日 17:56:40 -03:00
pnpm-workspace.yaml feat: Split into modular packages with Lerna: core, renderer, yjs-core 2025年10月26日 13:56:35 -03:00
README.md docs: Update READMEs 2025年12月13日 09:28:39 -03:00
TRIGGERS.md fix: Pass client to createLibrary; change trigger arguments spec to match Pilot + extra args 2025年11月01日 10:27:58 -03:00
vite.config.js chore: Use default port 2025年10月25日 12:00:28 -03:00

orca-lang

Fork of ORCΛ for the browser with collaborative editing (via Yjs) and a pluggable trigger system for custom audio synthesis.

Development

# Install all dependencies
pnpm install
# Build all packages
pnpm build
# Run standalone app
pnpm dev
# Build specific package
pnpm --filter @orca-lang/core build
# Clean all builds
pnpm clean

Packages

NOTE: Packages have not been published to npm yet as this is very much a work in progress!

@orca-lang/core

Core Orca engine - headless, framework-agnostic sequencer runtime.

import { Orca, createLibrary, IO, Clock, Scheduler } from '@orca-lang/core'

@orca-lang/renderer

Canvas-based renderer for Orca.

import { OrcaRenderer, Cursor, Theme } from '@orca-lang/renderer'

@orca-lang/yjs-orca

Yjs collaboration bindings.

import { SharedState, RemoteCursors } from '@orca-lang/yjs-orca'

@orca-lang/standalone

Full-featured standalone web application with built-in WebRTC collaboration.

cd packages/standalone
pnpm signaling
pnpm dev # http://localhost:5173

Usage

Standalone Application

The easiest way to use Orca is via the standalone app:

cd packages/standalone
pnpm dev

Open http://localhost:5173 in your browser.

As Embeddable Library

import { Orca, createLibrary, IO, Clock, Scheduler } from '@orca-lang/core'
import { OrcaRenderer } from '@orca-lang/renderer'
// Create engine
const orca = new Orca(createLibrary(), { w: 256, h: 256 })
const scheduler = new Scheduler(new AudioContext())
const io = new IO(orca, scheduler)
const clock = new Clock(orca, io)
// Create renderer
const canvas = document.getElementById('orca')
const renderer = new OrcaRenderer(canvas, orca)
// Start
await io.start()
clock.start()
// Render loop
setInterval(() => {
 orca.run()
 renderer.render()
}, 250)

With Collaboration

import { SharedState, RemoteCursors } from '@orca-lang/yjs-orca'
import { WebrtcProvider } from 'y-webrtc'
import * as Y from 'yjs'
const ydoc = new Y.Doc()
const sharedState = new SharedState(orca, ydoc, {
 onUpdate: () => renderer.render()
})
const provider = new WebrtcProvider('my-room', ydoc, {
 signaling: ['wss://my-server.example']
})
const remoteCursors = new RemoteCursors(provider.awareness, () => {
 renderer.render()
})

Features

Trigger System

This fork replaces the ; operator (used for sending UDP messages) for triggering events in Javascript:

;[index][octave][note][velocity][length][arg1][arg2][arg3]

You can register a handler to receive these events:

client.setTriggerHandler((noteData) => {
 console.log('Note:', noteData.note + noteData.octave)
 console.log('Velocity:', noteData.velocityInt) // 0-35
 console.log('Length:', noteData.lengthInt) // 0-35
 console.log('Args:', noteData.arg1Int, noteData.arg2Int, noteData.arg3Int)
 // Add your synthesis code here (Tone.js, Web Audio, Superdough, etc.)
})

See TRIGGERS.md for detailed examples.

Contributing

Bug reports and pull requests are welcome on Codeberg at the issues page. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

This project is based on ORCA (MIT License). Original copyright (c) 2017 by Hundredrabbits. Refer to LICENSE-ORCA.txt

Modifications and additions licensed under the GNU AGPLv3. Refer to LICENSE.txt