Skip to content

A programming/performance environment for seamless online and offline audiovisual rendering.

Notifications You must be signed in to change notification settings

overtinkering/cybin

 
 

Repository files navigation

Cybin

v (thumbnail links to intro video) v

Cybin: An Introduction

Cybin is a dependency-light, LuaJIT-based audio programming environment suitable for realtime performance and offline rendering. Unlike many popular multimedia programming environments, it strives to do everything in one place all at once, and its strength and weakness lies in completely reinventing the wheel in order to offer the user sample-accurate timing and complete control.

The best way to understand Cybin is to understand what it does, and by extension, what it does not do.

What it does is provide the user with:

  • a Lua interpreter that calls a yet-to-be-defined function called __process that recieves an arbitrary number of audio samples (one per channel) and outputs an arbitrary number of audio samples (one per channel) every 1/cybin.samplerate seconds
  • a global table called cybin that provides some basic audio/music utilties that would be difficult or impossible to provide adequately using a Lua interpreter alone (audio system info, MIDI I/O, audio file handling, etc...)
  • a set of command line arguments that may be used to configure your Cybin environment
  • multiple optional libraries that contain opinionated sets of tools for creating music and manipulating audio in Lua
  • a seamless way to transition from realtime performance and production to offline rendering

What it does not do is:

  • tell the user how to make music
  • tell the user what is or is not music
  • tell the user it should be used to make music
  • tell the user it should or should not be used for any particular purpose
  • anything else

Installation:

  • Make sure you've got a C++ compiler
  • Install LuaJIT, JACK, and libsndfile (MacOS dependencies are available through brew)
  • Install git
  • Run cd && git clone https://github.com/efairbanks/cybin.git && cd cybin
  • Run ./LINUX_BUILD.SH or MACOS_BUILD.SH depending on your platform (Windows support hopefully coming soon)
  • Put export PATH=$PATH:~/cybin in your .bash_profile or other shell startup file (or symlink to the cybin executable, whatever floats your boat)

Optional

  • Install Emacs
  • Place the following into your Emacs init file (~/.emacs, ~/.emacs.el, or ~/.emacs.d/init.el)
(add-to-list 'load-path "~/cybin")
(autoload 'cybin-mode "cybin-mode" "Cybin editing mode." t)
(add-to-list 'auto-mode-alist '("\\.cybin$" . cybin-mode))
(add-to-list 'interpreter-mode-alist '("cybin" . cybin-mode))

Emacs Hotkeys

  • C-c C-c -> execute line
  • C-c C-b -> execute file
  • C-c C-e -> execute block/paragraph

caveats: The way emacs traditionally sends blocks of code to subprocesses has something like a 1kB character limit, so large blocks should be broken up or imported using dofile() or require().

Goals:

  • Few dependencies (relatively speaking) (done)
  • Real-time, from-scratch audio synthesis in LUA (done)
  • Real-time, from-scratch video & image synthesis with LUA and OpenGL (tbd) (this coming eventually as a separate-but-related utility)
  • Seamless transition from live performance to high-quality offline rendering (done)
  • A robust standard library of real-time-capable audio manipulation and synthesis utilities all written in Lua (done)

Dependencies

About

A programming/performance environment for seamless online and offline audiovisual rendering.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Emacs Lisp 74.6%
  • C++ 24.9%
  • Shell 0.5%