Skip to content
sepenPublic

About

Mellotron is a simple piano synthesizer application built using SDL2 and SDL_mixer

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

Repository files navigation

Mellotron

Table of Contents

Project Overview

Mellotron is a simple piano synthesizer application built using SDL2 and SDL_mixer. It allows users to play notes using their keyboard, providing an interactive experience for music creation. The project aims to deliver a lightweight and easy-to-use interface for both beginners and experienced musicians.

Features

  • Keyboard Input: Play notes using the keyboard.
  • Octave Control: Change octaves to access a wider range of notes.
  • Sustain Functionality: Hold notes using the sustain feature.
  • Dynamic Sound Resampling: Adjust the pitch of notes in real-time.
  • Visual Representation: Display piano keys that respond to user input.

How it Works

Mellotron uses SDL2 for rendering graphics and handling input, while SDL_mixer is utilized for audio playback. The application maps keyboard keys to piano notes, allowing users to play sounds by pressing corresponding keys. The sound is dynamically resampled to adjust the pitch based on the selected octave. The visual representation of the piano keys changes color when pressed, providing immediate feedback to the user.

Installation

To install Mellotron, follow these steps:

  1. Install dependencies: Ensure you have SDL2, SDL2_mixer, and SDL2_ttf installed. You can install them via your package manager.

    For example, on Ubuntu:

    sudo apt-get install libsdl2-dev libsdl2-mixer-dev libsdl2-ttf-dev

    On macOS:

    brew install sdl2 sdl2_mixer sdl2_ttf
  2. Build the project:

    ./autogen.sh
    ./configure
    make
  3. Run the application:

    ./mellotron

Usage

  • Use the following keys to play notes:
    • White keys: a, s, d, f, g, h, j
    • Black keys: w, e, t, y, u
  • Press z to decrease the octave and x to increase it.
  • Press Tab to toggle sustain on and off.

Contributing

Contributions are welcome! If you would like to contribute to Mellotron, please follow these steps:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/YourFeature).
  3. Make your changes and commit them (git commit -m 'Add some feature').
  4. Push to the branch (git push origin feature/YourFeature).
  5. Open a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

About

Mellotron is a simple piano synthesizer application built using SDL2 and SDL_mixer

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages