Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev doc #60

Merged
merged 3 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## Contributors

Original code by Nathan Whitehead `[email protected]`.

Contributions:
* Christian Clauss
* Bart Spaans
* Christian Romberg
* Bill Peterson
* Christopher Nguyen
* Matthew D. Scholefield
* Mathieu (matael) Gaborit
* Thomas Oster
* Adam Roberts
* Aditya Shankar
* Dude112113
* Kevin Zakka

You are invited to contribute to this project. Please feel free to open an issue
or create a pull request on GitHub.
73 changes: 34 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,47 @@
# pyFluidSynth

<em>Python bindings for FluidSynth</em>

This module contains python bindings for FluidSynth. FluidSynth is a
software synthesizer for generating music. It works like a MIDI
synthesizer. You load patches, set parameters, then send NOTEON and
NOTEOFF events to play notes. Instruments are defined in SoundFonts,
generally files with the extension SF2. FluidSynth can either be used
to play audio itself, or you can call a function that returns
chunks of audio data and output the data to the soundcard yourself.
_Python bindings for FluidSynth_

This package contains python bindings for FluidSynth. FluidSynth is a software
synthesizer for generating music. It works like a MIDI synthesizer. You load
patches, set parameters, then send NOTEON and NOTEOFF events to play notes.
Instruments are defined in SoundFonts, generally files with the extension SF2.
FluidSynth can either be used to play audio itself, or you can call a function
that returns chunks of audio data and output the data to the soundcard yourself.
FluidSynth works on all major platforms, so pyFluidSynth should also.


## REQUIREMENTS
## Requirements

FluidSynth 2.0.0 (or later version)
(earlier versions are not supported. While they probably work, some features will be unavailble)
http://www.fluidsynth.org/
* Windows/Android Binaries: https://github.com/FluidSynth/fluidsynth/releases
* MacOS/Linux Distributions: https://github.com/FluidSynth/fluidsynth/wiki/Download#distributions
* Building from Source: https://github.com/FluidSynth/fluidsynth/wiki/BuildingWithCMake
[FluidSynth](http://www.fluidsynth.org/) (2.0.0 or later)
* [Windows/Android FluidSynth Releases](https://github.com/FluidSynth/fluidsynth/releases)
* [MacOS/Linux Distributions](https://github.com/FluidSynth/fluidsynth/wiki/Download#distributions)
* [Building from Source](https://github.com/FluidSynth/fluidsynth/wiki/BuildingWithCMake)

NumPy 1.0 or later (for some features)
http://numpy.org/
(optional) [NumPy](http://numpy.org/) 1.0 or later for some features

NOTE: If you don't need all the features of FluidSynth you may be interested in
[tinysoundfont-pybind](https://github.com/nwhitehead/tinysoundfont-pybind) which
is a self-contained Python package that includes
[TinySoundFont](https://github.com/schellingb/TinySoundFont) for SoundFont
playback and is permissively licensed.

## DOWNLOAD
## Installation

Download the latest version from GitHub here:
https://github.com/nwhitehead/pyfluidsynth/archive/master.zip
To use the latest official release:

pip install pyfluidsynth

## INSTALLATION

pyFluidSynth is packaged as Python source using distutils. To install,
run the following command as root:
## Pre-release Versions

```
python setup.py install
```
To use pre-release versions of this package, clone this repository, go to the
repository directory, then do:

For more information and options about using distutils, read:
https://docs.python.org/2/distutils/
pip install .


## EXAMPLE
## Example

Here is a program that plays a chord for a second.

Expand Down Expand Up @@ -97,7 +94,7 @@ noteoff(track, midinum)
```


## MANAGING AUDIO
## Managing Audio

You can also manage audio IO yourself and just use FluidSynth to
calculate the samples for the music. You might do this, for example,
Expand Down Expand Up @@ -169,7 +166,7 @@ print('Starting playback')
strm.write(samps)
```

## USING THE SEQUENCER
## Using the Sequencer

You can create a sequencer as follows:
```python
Expand Down Expand Up @@ -222,23 +219,21 @@ Note that event and seq are low-level objects, not actual python objects.
You can find a complete example (inspired by [this one from the fluidsynth library](http://www.fluidsynth.org/api/index.html#Sequencer)) in the test folder.


## BUGS AND LIMITATIONS
## Bugs and Limitations

Not all functions in FluidSynth are bound.

Not much error checking, FluidSynth will segfault/crash if you call
the functions incorrectly sometimes.


## AUTHORS

Original code by Nathan Whitehead `<[email protected]>`.
Contributions by Bart Spaans `<[email protected]>` and Christian Romberg `<[email protected]>`.
## Authors

This project was originally created by Nathan Whitehead `[email protected]` but is the work of many. See [CONTRIBUTORS](./CONTRIBUTORS.md).

## LICENSE
## License

Released under the LGPL v2.1 or any later
version (this is the same as FluidSynth).

Copyright 2008--2015, Nathan Whitehead
Copyright 2008--2024, Nathan Whitehead and contributors.