Skip to main content

An abstract class to interface with a Presonus FaderPort.

Project description

faderport

An abstract class to interface with a Presonus FaderPort device.

The Presonus FaderPort is a USB MIDI controller that features a motorized fader, an endless rotary controller and a bunch of buttons. This class will handle the basic interfacing to the device. You write a concrete subclass to implement your application specific requirements.

This subclass must implement the following methods:

  • on_open — Called when MIDI port has opened,
  • on_button — Called when button is pressed or released,
  • on_fader_touch — Called when fader is touched or released,
  • on_fader — Called when fader is moved,
  • on_rotary — Called when the Pan control is rotated,
  • on_close — Called when MIDI port is about to close.

The fader property allows you to read or set the fader position on a scale of 0 to 1023.

You can turn the button lights on and off individually using light_on and light_off.

You can display hexadecimal characters (0-9, A-F) using char_on. This will use the button LEDs in a dot matrix style. (Extending this to the a full alphanumeric character set is an exercise left to the reader).

There are some methods for 'fancy' display effects, because why not? Check out: countdown, snake, blink and chase

IMPORTANT NOTE - There is a 'feature' in the FaderPort that can cause you some problems. If the 'Off' button is lit the fader will not send value updates when it's moved.

Installation

You'll need Python 3.6 or later.

Then:

pip install faderport

should do the trick.

This will also install the mido package and python-rtmidi backend.

Currently this has only been tested on Windows with a single FaderPort because that's all I have access to.

The adventurous can read the mido docs and try alternative backends.

Testing

Make sure your FaderPort is installed and connected and then:

from faderport import test
test()

This will instantiate a derived 'TestFaderPort' class, which also serves as an example implementation, and then run through some of it's features.

It will display some light patterns and move your fader and then monitor your actions until you hit the "Off" button on the FaderPort.

Try out the Pan knob, the fader and some of the buttons.

Try holding "shift" (on the FaderPort) and tweaking the Pan knob at the same time.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

faderport-1.0.0.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

faderport-1.0.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file faderport-1.0.0.tar.gz.

File metadata

  • Download URL: faderport-1.0.0.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for faderport-1.0.0.tar.gz
Algorithm Hash digest
SHA256 66e38c40f3446b4a8038652e1cf3f5800f1f36cae2362297f8a8983bcb4d249d
MD5 3f04273f3018f1bb1aac3ec0448506a7
BLAKE2b-256 f834206d28df57579f0a74c67864fdd9a37e84e406cd2ec43974ffdadf1b863d

See more details on using hashes here.

File details

Details for the file faderport-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for faderport-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 81ab206f2bf9150ddb248787d167b5ccba3e30cb590890ddd03cd6e3d8e35ab0
MD5 0f1760ee8e63d82f7a359c962d537416
BLAKE2b-256 7f1e5d43f0826bec446744fa72cb48c59e088d12a44822674e5867919002c47d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page