We’re pleased to announce a new release of LuaAV – grab it from here!
API changes:
There have been some important changes in how some of the modules are used. For users of the previous release, here’s a quick summary:
- audio.def module is renamed audio.Def, and usage has changed (see this post for a tutorial) as summarized in this code snippet:
-- was: require "audio.def"
local Def = require "audio.Def"
-- was: audio.def.globalize()
Def.globalize()
local mydef = Def{
freq = 440,
-- was: Mix{ "out", SinOsc{ V"freq" } }
SinOsc{ P"freq" }
}Other usage remains the same.
- Lattice is now called Array (see this post for more). Usage looks like this:
local Array = require("Array")
local arr = Array{
components = 4, -- The number of components (samples per-cell)
type = array.Float32, -- The data type
dim = {512, 512}, -- The dimensions
align = 4, -- Optional byte-alignment
}
print("components: "..arr.components)
print("type: "..types[arr.type])
print("dim: "..table.concat(arr.dim, " "))
-- set data in cells:
arr:setcell(128, 128, { math.random(), math.random() })
-- integer lookup
print(unpack(arr:getcell(128, 128) ))
-- interpolated floating point lookup
print(unpack(arr:read(128.5, 128.5) ))All existing objects that used matrix or lattice now use array, e.g. Image:array().
- All module names that are actually object constructors have now been capitalized. This includes both Lua modules and C modules in the following list:
- image -> Image
- all of the gui sub-modules
- array -> Array
- audio.def -> audio.Def
Changes:
- Entirely rewritten audio.Def module.
- Many changes have been made to improve the JIT compilation time (with no impact on the performance of the generated machine code). Around a 10x speedup was noted during testing.
- New generators: Buzz, Saw & Square oscillators, biquad (low-pass, high-pass, band-pass, band-reject, all-pass), noise (white, pink, brown) and other utility generators.
- Better handling of multi-channel streams in the generators (including new Channels, Mono & Stereo generators)
- Stability improvements in the audio engine, and some optimizations to reduce construction overhead.
- Lua interpreter updated to LuaJIT 2.0 beta5 (OSX).
- Clang module now supports C++ and embedded in libluaav
- Image module on OSX uses CoreGraphics native image I/O framework
- opengl module has been completely re-written and now includes sub-modules for textures, shaders, slabs, and utility drawing functions
- font module now uses both FreeType and native Cocoa NSFont class for font rendering
- New opencl module for parallel data processing on both the CPU and GPU
- The LuaAV console now highlights errors for easy scanning of console output
- Lots of other docfixes and bugfixes (thanks to the students of UCSB MAT 594P especially for pointing many out!)

Pingback: LuaAV3: OSX Binary Release | worldmaking