This repository contains an audio module for Python that is included in VetoLC; it is based on wavebender and relies heavily on such constructs as itertools, generators and lambdas, all in all it is based on the "functional parts" of Python. Note that it is in development and not really usable up until now although you can create really neat sounds if you work hard enough.
All you need is a working Python installation. It works on all versions from 2.5 to 3.4, as far as we know. Travis says so, at least.
We as maintainers only use 2.7, 3.3 and 3.4 at the moment, so we're am always interessted in feedback regarding version support.
Installation is quite simple. First, you'll have to navigate into the dir and install the
library via python setup.py install
as usual. To test your installation(you really might want
to do that), run nosetests
. This might take a moment - it takes about 15 seconds on my 4GB RAM
Macbook.
AudioPython is also available as a autogenerated shared library in C(yay, Cython). Just run
make cython && make all && make install
and it is available for you. We have basically never
used it yet and cannot say anything about its behaviour nor whether it really works as expected.
To be honest, that is not really a priority right now.
To use the library, first do your usual
import AudioPython
If you are already familiar with wavebender, the transition should be mostly smooth. The thing that might confuse at first is that there are several submodules to AudioPython that were not present in wavebender. A short list to what is there and how to use it:
dsp:
This submodule contains the basic waveform: sine, square, sawtooth, triangle, damped, white noise and a leaky integrator.
effects:
This submodule contains a few basic effects, such as lowpass and highpass and a biquadfilter; also delay, flanger and chorus are in there.
instruments:
This submodule contains more "high level" interfaces, such as make_melody(which creates a melody from frequencies), concat_melodies, a hammond organ, a leslie flanger, a regular one, a delay, a chorus, a random progression function if you want to get freaky, and a make_instrument function which creates an instrument from a directory of samples. You can get those samples with the function get_sample afterwards.
util:
This submodule contains mostly internal functions.
We included a examples directory where some of the most useful features are shown. You can tweak them and experiment with them, they should be a little introduction.
This work is potentially never-ending. DSPs, Sound Effects, Instruments, all of them can be produced in AudioPython and a few of them will be.
We are engaged in a reverb and a ringbuffer, but we find new things we want to add every few days, so we are not really likely to stick to my schedule.
Also, some of the functions(especially the ones involving real samples) are basically untested and need to be tested. Sadly, we are not very creative at the moment, which means we cannot come up with enough ways to break my code. You can do that for me, if you want to. Even better if you can fix it afterwards, but if you cannot or do not want to, just drop me a few lines so we know the problem exists.