GSoC 2026: Join the Processing Foundation as a Summer of Code Contributor!

I had some questions about building out video and sound libraries for L5 sound (one of the ideas from the Project Ideas List).

The questions were about how the L5sound and L5video libraries might be structured since we are so far trying to build with minimal dependencies. At this point, I do not know the exact structure as research is needed, but I will describe what I think is possible.

L5 is the core library with its own repository. L5sound and L5video would each be their own separate libraries, just like how p5.sound is an addon separate, extra, optional library to be added along with p5.js. Figuring out the L5sound and L5video libraries’ structure would be developed during the GSoC period. Here’s some brainstorming of potential structure:

For L5sound, the Luafft library (if we use that) would likely lead to a structure something like:

L5sound/
  ├── L5sound.lua
  ├── vendor/
  │   └── luafft/
  ├── examples/
  └── README.md

But perhaps ideally we could inline luafft so that the end result is a single drop-in file, and so a user would only need to do:

require("L5")
require("L5sound")

For L5video, we have binary dependencies likely, like webcam.so or webcam.dll, so the best we may be able to do is structure it:

L5video/
  ├── L5video.lua (single Lua file)
  └── lib/
      ├── webcam.so
      ├── webcam.dll
      └── webcam.dylib 

and then provide a L5video.zip with everything bundled.

As an FYI FFI is built into Love2d, our underlying framework, and allows calling C functions from .so/.dll or .dylib for example since we’ll need a webcam library as compiled C, then we use FFI to call it from our Lua code.

Inside L5video.lua we could detect platform and load the appropriate library:

-- L5video.lua
local ffi = require("ffi")

-- Detect platform and load appropriate library
local platform = love.system.getOS()
local webcam_lib

if platform == "Windows" then
  webcam_lib = ffi.load("lib/webcam.dll")
elseif platform == "Linux" then
  webcam_lib = ffi.load("lib/webcam.so")
elseif platform == "OS X" then
  webcam_lib = ffi.load("lib/webcam.dylib")
end

A L5 coder wanting to use the L5video library may then import with something like:

require("L5")
require("L5video")

This all may change, or information may turn out to be incorrect later, but I wanted to respond to questions with as clear info as I can at this point. Thanks.

3 Likes