Progress Log: Java DAW MVC Setup
Project Overview
The Java DAW project aims to create a modular digital audio workstation using the Model-View-Controller (MVC) design pattern. The application will load, process, and manage audio samples while providing user-friendly interaction via a JavaFX interface.
Initial Development
1. Core Goals
- Load and process audio samples with features like playback, volume control, and spatial effects.
- Implement psychoacoustic effects and 3D sound placement.
- Use an MVC architecture for clean separation of concerns.
2. Early Structure
- Model: Handles audio data and project logic.
- View: Provides a graphical user interface using JavaFX.
- Controller: Bridges the model and view, managing user actions and application logic.
Key Classes Developed
- Main Class
- Initializes the MVC components (AudioModel, AudioView, and ProjectController).
- Manages project loading and saving using .ias files.
- AudioModel
- Handles reading audio data from files.
- Processes audio samples and manages data structures for storage.
- AudioView
- Provides file chooser dialogs for loading and saving audio files.
- Displays messages and errors using JavaFX dialogs.
- ProjectController
- Handles saving and loading audio projects.
- Interacts with the model to persist or retrieve project data.
- AudioProject
- Represents a DAW project containing a collection of audio samples.
- Provides methods for adding and managing samples.
Functionality Achieved
- File Handling:
- Users can load audio samples from files into the application.
- Sample metadata (e.g., name and file path) and audio data are stored in the model.
- Users can save projects to .ias files and reload them later.
- Audio Data Processing:
- AudioModel successfully reads and processes sample data.
- Dynamic buffer size adjustments to accommodate long audio files.
- MVC Integration:
- A basic structure was set up with functional interactions between model, view, and controller components.
Challenges Encountered
1. JavaFX Configuration Issues
- The application intended to use JavaFX for the UI but encountered persistent issues with:
- Module system setup.
- Adding JavaFX libraries to the project correctly.
- Compatibility between JavaFX 23 and Java 21.
- Errors like
Module not found
and java.lang.module.FindException
arose repeatedly during runtime.
2. Environment Setup
- Eclipse IDE was used, but difficulties with:
- Properly adding JavaFX SDK to the build path and module path.
- Configuring
module-info.java
to recognize JavaFX modules.
- Ensuring compatibility between the project setup and JavaFX requirements.