1
Welcome to this quick guide for those of you who want to write their
2
own pyo objects. These few steps explain how to add custom objects,
3
written in C, to the pyo library.
5
In this folder, there is three self-documented files that can be used
6
as a template to build an effect processor (I intend to write examples
7
for more object's types in the future). These files can be used as is
8
to compile a "Gain" object, which is modifying the volume of a signal
9
according to a value, static or audio, given in decibel.
12
- externalmodule-template.c : C part of the object. Here is defined
13
all the DSP and the python object structure using the Python-C API.
14
It creates an object called "Gain_base".
16
- externalmodule-template.h : This file indicates to the "_pyo"
17
module which objects to compile.
19
- external-template.py : Python part of the object. Here is defined
20
the user interface of the object. An audio processor is a class that
21
inherits from the PyoObject. In this example, the object is simply
22
called "Gain" and uses "Gain_base" as the real processing part and
23
for multi-channel expansion purpose.
25
=== Steps to compile the "Gain" objects ===
27
1. All three files must be copied and renamed respectively:
32
2. Compile pyo with the flag --compile-externals
34
That's it! The setup.py will add these files to the compilation chain
35
and create a "Gain" object in the pyo library.
37
To add other processing objects, all you have to do is to copy everthing
38
about the "Gain" object and then change the name, attributes, methods
39
and the processing part according to your new functionnality.
42
Only these three files are added to the compilation, so, for the time
43
being, all objects MUST be written in those files. Perhaps one day,
44
it will be possible to write new objects in separated files but actually,
47
For questions and comments, please write to the pyo-discuss mailing list:
48
pyo-discuss(at)googlegroups(dot)com