Skip to main content

MIDI Control Change Message

Project description

FoxDotCC - MIDI Control Change Messages

Instalation

pip install FoxDotCC
# or
pip install git+https://codeberg.org/FoxDotExtensions/FoxDotCC

Usage

Import lib

from FoxDot.lib.Extensions import CC

See which MIDI's are available

CC.list_ports()

Create a connection

cc = CC.connect(0)                                # index
cc = CC.connect('MIDI Mix:MIDI Mix MIDI 1 28:0')  # literal string

Add a function to see which events are received

cc(lambda msg: print(msg.control_number))

or use a decorator

@cc
def _(msg: cc.Msg):
	print(msg.control_number)

Alternate between values, useful for the buttons

d1 >> play('x.', amp=cc(1).switch(1,0))

Use Knobs/Fader to control values with Range

d2 >> bass('s...', lpf=cc(18).range(500, 5000))

Map your own functions

@cc(1)
def _(msg):
	d1.amp = not d1.amp
	d2.amp = not d2.amp
	if d2.amp:
		d3 >> play('x-')

Close the connection

cc.close()

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

foxdotcc-0.1.0.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

foxdotcc-0.1.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file foxdotcc-0.1.0.tar.gz.

File metadata

  • Download URL: foxdotcc-0.1.0.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.13.7 Linux/6.17.9-arch1-1

File hashes

Hashes for foxdotcc-0.1.0.tar.gz
Algorithm Hash digest
SHA256 dcb1bb476d2b701d685a9d23da965289ef20f327a52aca72ac52da6e3c49048c
MD5 683a6dc29a0c158ca1520c0b42a91a42
BLAKE2b-256 61bca9aa7a8d61699a2f353b1e2cfa1546fdfee2bb582086312d990872401a5f

See more details on using hashes here.

File details

Details for the file foxdotcc-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: foxdotcc-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.13.7 Linux/6.17.9-arch1-1

File hashes

Hashes for foxdotcc-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 14a34fe46b7229b66a688128fc748bce96740e608c98c5962187c41431a35ce5
MD5 c6e2e9db820a060637a33e31dc3b9400
BLAKE2b-256 c300ba34cc1ce7dfc8b11b96ac3086c13cb60af9273b42327927634f522c6c68

See more details on using hashes here.

Supported by

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