Skip to content

AGBV/DigiSiv

Repository files navigation

MIT License Python Streamlit


🎛️ DigiSiV

Digitale Signalverarbeitung (Digital Signal Processing)

Interactive exercises and solutions for Digital Signal Processing concepts
Interaktive Übungen und Lösungen für Konzepte der digitalen Signalverarbeitung

Get Started / Erste Schritte »

View Exercises · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Exercises
  4. Usage
  5. Development
  6. Contributing
  7. License
  8. Acknowledgments

About The Project

This repository contains interactive solutions and exercises for the German course "Digitale Signalverarbeitung" (Digital Signal Processing). All solutions are implemented in Python and made interactive using Streamlit, allowing you to explore signal processing concepts directly in your browser.

🇩🇪 Deutsch: Dieses Repository enthält interaktive Lösungen und Übungen für den Kurs "Digitale Signalverarbeitung". Alle Lösungen sind in Python implementiert und mit Streamlit interaktiv gestaltet, sodass Sie die Konzepte der Signalverarbeitung direkt im Browser erkunden können.

Built With

Python NumPy Streamlit Plotly Numba

Getting Started

To get the interactive exercises running locally, follow these simple steps.

Prerequisites

  • Python 3.11 or higher
  • uv (recommended) or pip package manager

Installation

We provide multiple installation methods. uv is recommended for faster and more reliable dependency management, but traditional pip methods are also supported.

Option 1: Using uv (Recommended) ⚡

uv is a fast Python package installer and resolver. If you don't have it installed:

# Install uv (if not already installed)
curl -LsSf https://astral.sh/uv/install.sh | sh
# or
pip install uv

Then install the project:

# Clone the repository
git clone https://github.com/AGBV/DigiSiV.git
cd DigiSiV

# Install all dependencies
uv install

# Run exercises directly with uv
uv run streamlit run exercise00/app.py
uv run streamlit run exercise01/m1.py

Option 2: Using pip with Virtual Environment 🐍

# Clone the repository
git clone https://github.com/AGBV/DigiSiV.git
cd DigiSiV

# Create and activate virtual environment
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Install from pyproject.toml (recommended)
pip install -e .

# OR install from requirements.txt
pip install -r requirements.txt

# Run exercises
streamlit run exercise00/app.py
streamlit run exercise01/m1.py

Option 3: Global pip Installation (Not Recommended)

# Clone the repository
git clone https://github.com/AGBV/DigiSiV.git
cd DigiSiV

# Install globally from requirements.txt
pip install -r requirements.txt

# Run exercises
streamlit run exercise00/app.py
streamlit run exercise01/m1.py

Quick Start

Once installed, choose your exercise and run it:

For complex number visualization:

# With uv (recommended)
uv run streamlit run exercise00/app.py

# With pip (in activated venv)
streamlit run exercise00/app.py

For audio signal processing:

# With uv (recommended) 
uv run streamlit run exercise01/m1.py

# With pip (in activated venv)
streamlit run exercise01/m1.py

The application will open in your default web browser at http://localhost:8501 🚀

Development Mode

For development with automatic reloading when files change:

# With uv
uv run streamlit run --server.runOnSave true exercise00/app.py

# With pip
streamlit run --server.runOnSave true exercise00/app.py

💡 Tip: Use the sidebar controls in each application to adjust parameters and explore different scenarios!

Exercises

📊 Repository Structure

DigiSiV/
├── exercise00/          # 🎨 Introduction: Complex number visualization
│   └── app.py          #    Interactive Mandelbrot Set explorer
├── exercise01/          # 🎵 Audio Signal Processing
│   ├── m1.py           #    Interactive audio analysis app
│   ├── M1.ipynb        #    Jupyter notebook with detailed analysis
│   └── audio01.wav     #    Sample audio file
├── MA2/                # ⚙️  Parameter effects on discretization
│   ├── app.py          #    Main Streamlit application
│   ├── functions.py    #    Signal processing helper functions
│   └── requirements.txt#    Exercise-specific dependencies
├── pyproject.toml      # 📦 Project configuration and dependencies
├── LICENSE             # 📄 MIT License
└── README.md           # 📖 This file

🎨 Exercise 0: Introduction to Complex Numbers

  • File: exercise00/app.py
  • Topic: Complex number visualization through fractals
  • Concepts: Iterative algorithms, complex plane, mathematical visualization
  • Features:
    • Interactive Mandelbrot Set exploration with customizable parameters
    • Real-time parameter adjustment (max iterations, pixel resolution)
    • High-performance computation with Numba JIT compilation
    • Beautiful fractal visualization using Plotly heatmaps
    • Smooth color gradients and zoom capabilities
  • Run: streamlit run exercise00/app.py

🎵 Exercise 1: Audio Signal Processing

  • Files: exercise01/m1.py (Streamlit app), exercise01/M1.ipynb (Jupyter notebook)
  • Topic: Time and frequency domain analysis of audio signals
  • Concepts: Digital audio processing, FFT, frequency spectrum analysis, sampling
  • Features:
    • Interactive audio file upload or use default sample
    • Time-domain signal visualization with adjustable time windows
    • Frequency spectrum analysis using Fast Fourier Transform (FFT)
    • Half/full spectrum display options
    • Real-time parameter adjustment for signal analysis
  • Sample Audio: Includes audio01.wav for testing
  • Run: streamlit run exercise01/m1.py

Usage

Running Exercises

# With uv (recommended)
uv run streamlit run exercise00/app.py  # Complex number visualization
uv run streamlit run exercise01/m1.py   # Audio signal processing

# With pip (in activated virtual environment)  
streamlit run exercise00/app.py  # Complex number visualization
streamlit run exercise01/m1.py   # Audio signal processing

Development Mode

For automatic reloading when files change:

# With uv
uv run streamlit run --server.runOnSave true exercise00/app.py

# With pip  
streamlit run --server.runOnSave true exercise00/app.py

💡 Tip: Use the sidebar controls in each application to adjust parameters and explore different scenarios!

(back to top)

Development

Adding New Exercises

  1. Create exercise directory

    mkdir exercise02
    cd exercise02
  2. Create Streamlit app

    # exercise02/app.py
    import streamlit as st
    import numpy as np
    
    st.title("Your Exercise Title")
    # Your exercise implementation
  3. Test your new exercise

    # With uv
    uv run streamlit run exercise02/app.py
    
    # With pip (in venv)
    streamlit run exercise02/app.py
  4. Update this README with exercise description

Project Setup with devenv (Optional)

This project supports devenv for reproducible development environments:

# Enter the development environment
direnv allow

Package Management

Dependencies:

  • NumPy: Numerical computations and array operations
  • Plotly: Interactive plotting and visualization
  • Streamlit: Web application framework for Python
  • Numba: Just-in-time compilation for performance optimization
  • SciPy: Scientific computing functions

Configuration files:

  • pyproject.toml: Modern Python project configuration (preferred)
  • requirements.txt: Traditional pip requirements (auto-generated from uv)
  • uv.lock: Exact dependency versions for reproducible installs

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingExercise)
  3. Commit your Changes (git commit -m 'Add some AmazingExercise')
  4. Push to the Branch (git push origin feature/AmazingExercise)
  5. Open a Pull Request

Ideas for contributions:

  • 📚 Add new signal processing exercises
  • 🐛 Fix bugs or improve existing implementations
  • 📖 Enhance documentation or add German translations
  • 🎨 Improve visualizations and user interface
  • ⚡ Performance optimizations

License

Distributed under the MIT License. See LICENSE for more information.

Acknowledgments

Resources and inspiration that made this project possible:

  • 📚 Course: Digitale Signalverarbeitung (Digital Signal Processing)
  • 🐍 Python - The foundation of our implementations
  • 🚀 Streamlit - Making Python apps beautiful and interactive
  • 📊 Plotly - Powerful interactive visualizations
  • 🔢 NumPy - Fundamental package for scientific computing
  • Numba - High-performance Python compiler
  • 🎨 Shields.io - Beautiful README badges
  • 📖 Best README Template - Inspiration for this README

About

Zusatzmaterial zum Fach Digitale Signalverarbeitung am BV

Topics

Resources

License

Stars

Watchers

Forks