Python script for TCP Sonification with Max/MSP and Ableton Live
This repository contains a Python script for scraping TCP packets using Scapy and sending relevant information to Max/MSP for sonification. The sonified data can be further integrated into Ableton Live for a unique audiovisual experience.
Before you begin, ensure you have the following installed:
- Python 3.x
- Scapy
- python-osc
- Max/MSP
- Ableton Live
-
Clone this repository to your local machine:
git clone https://github.com/your-username/tcp-sonification.git
-
Install the requirements.
-
Run the
packets_scraper.py
script and enter values for the following variables:Host_IP
: Set this to the IP address where Max/MSP is running. (127.0.0.1)iFace
: Choose the network interface to capture TCP packets.
-
Customize the
filter_str
variable based on your specific needs. The provided example filters packets for host140.82.121.4
on port443
. This will give you all TCP packeges from one resourse (for example web-site hosted on140.82.121.4
). -
Or just use
a = sniff(prn=analyze_packet, iface=iFace, filter='tcp')
to receive all TCP packages which you receive in the moment from all opened resourses.
-
Run the Python script:
python packets_scraper.py
This will start capturing and analyzing TCP packets, sending relevant information to Max/MSP.
-
In Ableton Live open the Max/MSP device provided (
SONIFICATOR.amxd
). -
Configure the Max device to receive data from Max/MSP and map the incoming data to sound parameters. You can make 5 MIDI tracks with same device to receive UDP messages on the specified ports (
1120
to1125
). -
Play around with the parameters in Ableton Live to create unique sonifications based on the captured TCP packet information.