A Python GUI application for real-time plotting and visualization of Pocket Scion sensor data using OSC (Open Sound Control) communication.
- Real-time Data Plotting: Live visualization of Pocket Scion sensor data
- Dark Theme: Modern dark interface for better visibility and reduced eye strain
- Data Selection: Choose which data streams to display (Mean, Deviation)
- Export Capabilities: Save plots as images and export data to JSON
- OSC Integration: Receives data via OSC protocol from Pocket Scion devices
- Auto-scaling: Optional automatic scaling of plot axes
- Python 3.7+
- Tkinter (usually included with Python)
- Required Python packages:
pip install python-osc matplotlib numpy
-
Clone this repository:
git clone https://github.com/HaraldWalker/PocketScionDataPlotter.git cd PocketScionDataPlotter/python -
Install dependencies:
pip install -r requirements.txt
-
Run the application:
python pocket_scion_data_plotter.py
Before running the application, you must:
-
Pocket Scion Hardware: Ensure you have the Pocket Scion hardware device connected to your computer via USB.
-
Pocket Scion Controller application: Install and run the Pocket Scion Controller application on your computer.
-
Prepare Pocket Scion Hardware:
- Ensure the Pocket Scion device is powered and connected
- Press and hold both [Voices] Sensitivity Buttons for 3 seconds to enable Raw Output Mode
- Look for white LED animations to confirm raw data is being transmitted
- Test the device by providing stimulation to verify frequency changes
-
Launch Data Plotter: Run the Python script:
python pocket_scion_data_plotter.py
-
Select Data: Use checkboxes to choose which data streams to display:
- Mean Data: Shows the mean resistance values
- Deviation Data: Shows the deviation from mean
-
Control Display:
- Auto Scale: Toggle automatic Y-axis scaling
- Clear Data: Reset all data buffers
- Save Plot: Export current plot as PNG image
- Export Data: Save all data to CSV file
-
Monitor Status: The status bar shows:
- Current data values
- Sample counts
- OSC signal status
If you see "No Signal" in the status bar:
- Verify Pocket Scion hardware device is powered and connected
- Check that Raw Output Mode is enabled: press and hold both [Voices] Sensitivity Buttons for 3 seconds
- Look for white LED animations to confirm raw data transmission
- Test by providing stimulation to verify the device responds with frequency changes
- GUI Framework: Tkinter with custom dark theme implementation
- Plotting: Matplotlib with real-time updates
- Communication: Python-OSC library for UDP message handling
- Threading: Separate OSC receiver thread to prevent GUI blocking
- Uses collections.deque for efficient data buffering
- 555 timer constants for resistance conversion:
- Capacitance: 4300 pF
- Timer constant: 0.693
- Reference resistance: 100 kOhm
- ClickableLabel: Custom button implementation to avoid macOS focus styling issues
- Dark Theme: Comprehensive color scheme for consistent dark interface
-
No OSC Data Connection
- Verify Pocket Scion hardware device is powered and connected
- Ensure Raw Output Mode is enabled: press and hold both [Voices] Sensitivity Buttons for 3 seconds
- Look for white LED animations to confirm raw data transmission
- Test by providing stimulation to verify frequency changes are detected
- Confirm OSC output settings if configurable on hardware (IP: 127.0.0.1, Port: 11045)
- Ensure firewall allows UDP traffic on port 11045
- Try disabling and re-enabling Raw Output Mode (hold both buttons for 3 seconds)
- Power cycle the Pocket Scion device and restart the plotter if needed
-
Button Styling Issues on macOS
- The application uses custom ClickableLabel components to avoid macOS button focus issues
- If buttons appear unreadable, restart the application
-
Plot Not Updating
- Check OSC signal status in the bottom status bar
- Verify data selection checkboxes are enabled
- Ensure Auto Scale is toggled if data range is very small
If you encounter import errors, try:
pip install --upgrade python-osc matplotlib numpyFor tkinter issues (especially on Linux):
# Ubuntu/Debian
sudo apt-get install python3-tk
# macOS (tkinter usually included with Python)
# If missing, reinstall Python from python.org
# Windows (tkinter usually included with Python)
# If missing, reinstall Python and ensure "tcl/tk and IDLE" is selectedpython/
├── pocket_scion_data_plotter.py # Main application
├── build.py # Build script
├── requirements.txt # Python dependencies
└── README.md # This file
- Follow PEP 8 guidelines
- Use descriptive variable names
- Add comments for complex logic
- Maintain the dark theme consistency
- Requires controller app: This implementation depends on the Pocket Scion Controller application to send OSC data
- OSC only: Uses OSC protocol on 127.0.0.1:11045
- Desktop only: Runs on Windows, macOS, and Linux
- Add direct MIDI sysex reading to eliminate controller app dependency
- Consider modern Python GUI frameworks (PyQt6, Flet, Dear PyGui)
- Add more export formats
This project is licensed under the MIT License - see the LICENSE file for details.
