An external library which allows you to use openFrameworks and Lua within Pure Data to create cross-platform multimedia applications.
Clone or download
Latest commit 60810d9 Nov 18, 2018
Permalink
Failed to load latest commit information.
Linux64External v2.0.2 update Nov 14, 2018
LinuxArmv6External v2.0.2 update Nov 14, 2018
WindowsExternal v2.0.2 update Nov 14, 2018
doc v2.0.2 update Nov 18, 2018
libs v2.0.2 update Nov 11, 2018
macOSExternal v2.0.2 update Nov 14, 2018
ofelia v2.0.2 update Nov 18, 2018
scripts v2.0.2 update Nov 11, 2018
.gitattributes Initial commit Feb 10, 2018
.gitignore v1.0.5 update Feb 26, 2018
CHANGES.txt v2.0.2 update Nov 18, 2018
LICENSE.txt v2.0.2 update Nov 11, 2018
README.md Update README.md Nov 18, 2018

README.md

ofelia

alt text alt text

Description

ofelia is an external library which allows you to use openFrameworks and Lua within Pure Data to create cross-platform multimedia applications.

openFrameworks(aka OF) is an open source C++ toolkit for creative coding.
Lua is a powerful, efficient, lightweight, embeddable scripting language.
Pure Data(aka Pd) is a real-time visual programming language for multimedia.

Thanks to the Lua scripting feature, you can do text coding directly on a Pd patch or through a text editor which makes it easier to solve problems that are complicated to express in visual programming languages like Pd. And unlike compiled languages like C/C++, you can see the result immediately as you change code which enables faster workflow.

Using ofelia, you can flexibly choose between patching and coding style depending on the situation.
For patching style, ofelia currently provides over 300 abstactions which cover the following features of openFrameworks.

  • ofAppRunner: contains functions for getting and setting the properties of the window.
  • ofBaseApp: contains callback functions such as setup, update, draw and keyPressed.
  • ofGraphics: has several functions to change the state of the graphics pipeline and allows to quickly draw 2d shapes.
  • ofImage: allows to load, save and draw images and do basic transformations on them.
  • ofTrueTypeFont: can load true type fonts in different formats and draw text using the loaded font.
  • of3dGraphics: contains some functions to quickly draw the most used 3d shapes like spheres, cones and boxes.
  • of3dUtils: allows to draw 3d utililty objects such as arrows, axis and grid.
  • ofMath: contains functions for various mathematical operations like calculating the distance between two points.
  • ofUtils: contains different functions for varied purposes, from string manipulation to time functions.
  • ofSystemUtils: contains functions for creating message and file opening and saving dialogs.

The abstractions use the same function names, arguments and return types as the original openFrameworks API so users can easily learn about them and transfer from one to another when needed.

There is only one slight difference in function and class names. For exmaple,

  • ofDrawCircle in openFrameworks becomes of.drawCircle in ofelia.
  • ofImage in openFrameworks becomes of.Image in ofelia.

The help files for the abstractions currently don't exist but you can learn about them from one of the openFrameworks documentation pages above or you can simply google the name of the function to find the page.
(e.g. google ofDrawCircle to learn about of.drawCircle abstraction in ofelia)

Although more abstractions will be added later, you can already use all openFrameworks features using [ofelia] object which allows you to code Lua and OF API bindings on a Pd patch or create such abstractions yourself. See the object help file to learn how to use it.

The library is available to be used under macOS, Windows, Linux and Raspberry Pi. (64bit only on macOS and Linux)

Installation

  • Make sure you have Pure Data installed on your desktop.
  • Start Pd and go to Help -> Find externals, then search for ofelia
  • Select the proper version of ofelia for your system to download and install.
  • Try opening patches inside the downloaded ofelia/examples directory.
  • (Windows) If the library fails to load, open vc_redist executable file inside ofelia directory to install Microsoft Visual C++ Redistributable packages.
  • (Linux, Raspberry Pi) If the library fails to load, open the Terminal and run the following command to install dependencies.
    cd ofelia/scripts/distro_name
    sudo ./install_dependencies.sh

Contributing to ofelia

You can contribute to ofelia by reporting bugs, creating the missing of abstractions or by sharing your own custom abstractions. Please open an issue or contact the author if you have any questions or suggestions.

ofxOfelia

alt text

Description

ofxOfelia is ofelia packaged as an openFrameworks addon which enables you to create a standalone application for macOS, Windows, Linux, Raspberry Pi, iOS and Android that can run Pd patches made with ofelia and Pd vanilla objects.

You can share the application with a wide range of audiences including non-Pd users and mobile device users.

Build Requirements

In order to use ofxOfelia, you first need to download and install openFrameworks. Please follow the setup guides to download and install openFrameworks. The following tools are used to build ofxOfelia project.

Setup guide

The setup guide and examples for creating standalone project will be ready soon.

Developing ofxOfelia

You can help developing ofxOfelia on GitHub: https://github.com/cuinjune/ofxOfelia
Create an account, clone or fork the repo, then request a push/merge.
Feel free to contact the author if you have any questions or suggestions.


Projects that used ofelia/ofxOfelia

Acknowledgments

I would like to thank Miller Puckette and the Pd community for developing and maintaining Pd, Dan Wilcox for developing ofxLua, ofxPd and ofxMidi which ofelia/ofxOfelia uses, IOhannes M Zmölnig for developing GEM which has greatly influenced ofelia, Arturo Castro, Theodore Watson and the OF community for developing and maintaining openFrameworks and answering so many questions, Henri Menke for consulting on Lua design matters, and many others who contributed to the development of ofelia.

Author

Copyright (c) 2018 Zack Lee: cuinjune@gmail.com
GNU General Public License v3.0
For information on usage and redistribution, and for a DISCLAIMER OF ALL WARRANTIES, see the file, "LICENSE.txt," in this distribution.