semvec/pypi-packages huggingface dataset:
aphyt 0.1.24
A library to communicate with Omron NX and NJ PLC and motion controllers
Requires Python: >=3.8

# aphyt
This is a library for communicating with Omron NX and NJ industrial PLC and motion controllers using Ethernet/IP.

## Communicating with Omron Sysmac Controllers Using Ethernet/IP

This software implements the core functionality of reading and writing numeric, Boolean, string, structure and array variables to an Omron NX or NJ controller using symbolic names. The read_variable and write_variable methods allow the programmer to use Python based data types to write to variables, as well as properly format the data received when reading variables. The example code below demonstrates how to establish the explicit Ethernet/IP connection and then read and write variables to a test project in the NJ or NX controller.

## Example Use

### Installation

This package is on PyPI so the user can install using:

    pip install aphyt

### Getting Started

In order to connect to an Omron N-Series controller for data exchange using Ethernet/IP, the programmer should import omron from the aphyt module and instantiate an instance from the NSeries or NSeriesThreadDispatcher object using a context manager or by assignment. If the program supplies the host to the object, it is not necessary to explicitly connect to the IP address of the controller, and register a session. If the object is created without a host, the connection and session registration must be done explicitly.

```python
import time
from aphyt import omron


if __name__ == '__main__':
    with omron.NSeries('192.168.250.9') as eip_conn:
        for i in range(10):
            print(eip_conn.read_variable('TestInt'))
            eip_conn.write_variable('TestInt', 24)
            print(eip_conn.read_variable('TestInt'))
            eip_conn.write_variable('TestInt', 7)
            time.sleep(.5)

```
FoxDotCC 0.1.2
MIDI Control Change Message
Requires Python: ~=3.11

# FoxDotCC - MIDI Control Change Messages

## Instalation

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

## Usage

Import lib

``` python
from FoxDotCC import CC
```

See which MIDI's are available

``` python
CC.list_ports()
```

Create a connection

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

Add a function to see which events are received

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

or use a decorator

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

Alternate between values, useful for the buttons

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

Use Knobs/Fader to control values with Range

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

Map your own functions

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

Close the connection

``` python
cc.close()
```