audio language based on Lua, inspired by ChucK
License
alltom/ckv
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
master
Could not load branches
Nothing to show
Could not load tags
Nothing to show
{{ refName }}
default
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
-
Clone
Use Git or checkout with SVN using the web URL.
Work fast with our official CLI. Learn more.
- Open with GitHub Desktop
- Download ZIP
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
-- -- ckv -- -- an audio language based on Lua, -- inspired by ChucK -- -- http://ckvlang.org/ -- -- Primary Author: -- Tom Lieber tom@alltom.com -- -- -- INSTALL: -- -- detailed installation instructions are in the tutorial: -- http://ckvlang.org/tutorial.html -- -- but for advanced users, this is all you need to know: -- -- Dependencies: -- LUA: download, build, and "make install" -- http://www.lua.org/ -- -- FFMPEG: download, build, and "make install" -- http://ffmpeg.org/ -- -- ckv: -- $ make -- $ ./ckv -h -- $ ./ckv README # this file is an executable example! -- $ ./ckv ex/01.ckv -- $ ./ckv ex/02.ckv -- $ ./ckv ex/03.ckv ex/03a.ckv ex/03b.ckv -- $ ./ckv ex/04.ckv -- EXECUTABLE SUMMARY (run this file) -- create audio generators in ckv! -- OOP in Lua is kind of weird, but simple: -- http://lua-users.org/wiki/ObjectOrientedProgramming function Noise(gain) return { gain = gain or 1.0, tick = function(self) self.last = (math.random() * 2.0 - 1.0) * self.gain; end } end ev = Event:new(); function waiter(name) while yield(ev) do print("take that, " .. name .. string.rep("!", math.random(1, 10))) end end -- fork(function, arg1, arg2, ...) fork(waiter, "user"); -- fork an anonymous function fork(function() while yield(ev) do local ugens = { "Noise()", "SinOsc()" }; local which = ugens[math.random(1, 2)]; -- fork_eval code in a string! fork_eval("local n = " .. which .. ";" .. "connect(n, speaker);" .. "yield(second / 2);" .. "disconnect(n, speaker);"); end end) global.nb = "to share between script files, put stuff in global!"; print(global.nb .. " and try \"ckv -h\" sometime!"); while true do yield(math.random() * second * 4 + 1); ev:broadcast(); end
About
audio language based on Lua, inspired by ChucK
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published