Harmony Forge is a music generation platform that combines the power of a Flask server for backend processing, a Flutter app for the Android client interface, and allows users to generate music seamlessly.
The Flask server acts as the backend for the Harmony Forge project. It handles music generation requests, manages user authentication and accounts, provides an admin panel for model management, and ensures a secure environment. Additionally, Harmony Forge leverages LSTM networks for MIDI generation, enabling users to create diverse musical compositions.
-
Music Generation with LSTM: Utilizes LSTM (Long Short-Term Memory) networks trained on MIDI datasets to generate music based on user preferences and inputs. The LSTM model can capture complex musical patterns and nuances, resulting in diverse and expressive MIDI outputs.
-
Multiple Instrument Support: Harmony Forge supports multiple instruments for MIDI generation, allowing users to specify instrument tracks and arrangements to create rich and varied musical compositions.
-
Custom Model Creation: Users have the flexibility to create custom LSTM models tailored to their musical style and preferences. By training the LSTM network on specific MIDI datasets, users can fine-tune the model to generate music that aligns with their artistic vision.
- Python with Flask framework for server-side logic.
- TensorFlow for creating and training the LSTM model for MIDI generation.
- SQLAlchemy for database management.
- Flask JWT Extended for user authentication and JWT handling.
- Flask Mail for sending verification emails and notifications.
- Flask RESTful API for smooth communication with the Flutter app.
-
Clone the repository:
git clone https://github.com/jztchl/Harmony-Forge.git
-
Navigate to the Flask server directory:
cd Harmony-Forge/server
-
Install dependencies:
pip install -r needs.txt
-
Set up Configuration variables: Configure the following in the config.py after adding it:
import os
from datetime import timedelta
class Config:
SECRET_KEY = 'your_secret_key_here'
SQLALCHEMY_DATABASE_URI = 'sqlite:///users.db'
JWT_ACCESS_TOKEN_EXPIRES = timedelta(hours=3)
JWT_REFRESH_TOKEN_EXPIRES = timedelta(days=30)
MAIL_SERVER = 'smtp.example.com'
MAIL_PORT = 587
MAIL_USE_TLS = True
MAIL_DEFAULT_SENDER = your_email@example.com
MAIL_USERNAME = your_email@example.com
MAIL_PASSWORD = your_email_password
-
Run the Flask server:
python flask_app.py
-
The Flask server will run on
http://localhost:5000
. -
Or you could run the project in the command line:
python control.py
By integrating LSTM networks for MIDI generation, Harmony Forge offers users the ability to create sophisticated and personalized musical pieces with rich instrumentation and customized model training.
The Harmony Forge project includes an Android Flutter app that serves as the client-side interface for users. Here are some key points about the Flutter app:
- Technology: Developed using the Flutter framework, which allows for building natively compiled applications for mobile, web, and desktop from a single codebase.
- Platform: Specifically designed for Android devices, providing a smooth and native-like user experience.
- User Interface: Features a user-friendly interface designed to interact seamlessly with the Flask server backend.
- Functionality:
- Music Generation: Allows users to generate music by interacting with the Flask server endpoints.
- User Authentication: Enables user registration, login, and password management functionalities.
- UI/UX Design: Incorporates modern design principles for an engaging and intuitive user experience.
- Integration with Flask Server: Communicates with the Flask server backend through HTTP requests to perform various actions such as music generation, user management, and feedback submission.
- Security Measures: Implements secure communication protocols and authentication mechanisms to ensure data privacy and user authentication integrity.
-
Install Flutter SDK and set up your development environment: Flutter Installation Guide
-
Clone the repository:
git clone https://github.com/jztchl/Harmony-Forge.git
-
Navigate to the Flutter app directory:
cd Harmony-Forge/flutter_app
-
Install dependencies:
flutter pub get
-
Configure the urls in api lib/api_endpoints.dart:
const String BASE_URL = 'server url';
note:be in same network running locally
-
Run the Flutter app:
flutter run
-
The Flutter app will build and run on your connected Android device or emulator.
- Download Multiple Instrument Sample 1
- Download Multiple Instrument Sample 2
- Download Multiple Instrument Sample 3
- Download Multiple Instrument Sample 4
- Download Single Instrument Sample 1
- Download Single Instrument Sample 2
- Download Single Instrument Sample 3
- Download Single Instrument Sample 4
- Download Single Instrument Sample 5
Feel free to explore the full potential of Harmony Forge by setting up both the Flask server and Flutter app and experimenting with music generation and user interactions!