Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
This project provides Python interface to ALSA sequencer API.
Pythonic API to most of the ALSA sequencer functionality
Access to ALSA sequencer features not available when using other ('portable') Python MIDI libraries:
Python 3.7 – 3.11 compatibility
Both synchronous (blocking) and asynchronous (asyncio) I/O
Only Python code, no need to compile a binary module. Requires cffi
_, though.
MIDO
_ backend provided
This package requires ALSA library to be installed (libasound.so.2
–
'libasound2' package on Debian-like systems). On a typical Linux system it is
probably already installed for some other audio or MIDI software.
python-alsa-midi package may be installed with pip::
python3 -m pip install alsa-midi
This should normally install a binary wheel compiled on a compatible system or pure-python wheel working without compilation.
If no compatible wheel is found build from source package will be triggered, which will also require ALSA library development files (libasound2-dev).
To force installing from source (and compiling the binary extension) use::
python3 -m pip install --no-binary=alsa-midi alsa-midi
To force installing from source without compiling the extension::
PY_ALSA_MIDI_NO_COMPILE=1 python3 -m pip install --no-binary=alsa-midi alsa-midi
Alternatively one can just add the source directory (as checked out from
https://github.com/Jajcus/python-alsa-midi.git) to $PYTHONPATH
and use the
packages directly, with no compilation.
Detailed documentation is available at https://python-alsa-midi.readthedocs.io/
Simple example::
import time from alsa_midi import SequencerClient, READ_PORT, NoteOnEvent, NoteOffEvent
client = SequencerClient("my client") port = client.create_port("output", caps=READ_PORT) dest_port = client.list_ports(output=True)[0] port.connect_to(dest_port) event1 = NoteOnEvent(note=60, velocity=64, channel=0) client.event_output(event1) client.drain_output() time.sleep(1) event2 = NoteOffEvent(note=60, channel=0) client.event_output(event2) client.drain_output()
python-alsa-midi can be used as a MIDO
_ back-end too::
export MIDO_BACKEND=alsa_midi.MIDO_BACKEND mido/examples/midifiles/play_midi_file.py file.mid
.. _cffi: http://cffi.readthedocs.org/ .. _MIDO: https://mido.readthedocs.io/
FAQs
Python interface for ALSA MIDI sequencer
We found that alsa-midi demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.