https://github.com/atiriko/Music Skip to content Navigation Menu Toggle navigation Sign in * Product + GitHub Copilot Write better code with AI + Security Find and fix vulnerabilities + Actions Automate any workflow + Codespaces Instant dev environments + Issues Plan and track work + Code Review Manage code changes + Discussions Collaborate outside of code + Code Search Find more, search less Explore + All features + Documentation + GitHub Skills + Blog * Solutions By company size + Enterprises + Small and medium teams + Startups By use case + DevSecOps + DevOps + CI/CD + View all use cases By industry + Healthcare + Financial services + Manufacturing + Government + View all industries View all solutions * Resources Topics + AI + DevOps + Security + Software Development + View all Explore + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Enterprise + Enterprise platform AI-powered developer platform Available add-ons + Advanced Security Enterprise-grade security features + GitHub Copilot Enterprise-grade AI features + Premium Support Enterprise-grade 24/7 support * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up Reseting focus You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} atiriko / Music Public * Notifications You must be signed in to change notification settings * Fork 5 * Star 97 97 stars 5 forks Branches Tags Activity Star Notifications You must be signed in to change notification settings * Code * Issues 0 * Pull requests 1 * Actions * Projects 0 * Security * Insights Additional navigation options * Code * Issues * Pull requests * Actions * Projects * Security * Insights atiriko/Music main BranchesTags Go to file Code Folders and files Name Name Last commit Last commit message date Latest commit History 13 Commits Assets Assets recordings recordings .gitignore .gitignore Button.py Button.py Colors.py Colors.py Event.py Event.py Freeplay.py Freeplay.py Notes.py Notes.py Pianokey.py Pianokey.py Readme.md Readme.md Scheduler.py Scheduler.py Song.py Song.py Tempo.py Tempo.py UI.py UI.py UIGPT.py UIGPT.py automate.py automate.py chords.py chords.py main.py main.py output.mid output.mid record.py record.py requirements.txt requirements.txt View all files Repository files navigation * README Music Composer The Music Composer project is a Python-based application designed to assist users in creating and manipulating musical compositions. The project leverages the Pygame library for its graphical interface and integrates MIDI functionalities to handle musical notes and sequences. Example output videos These are somewhat old videos. If you can manage to run it you will see a different UI with non working buttons. output2024-10-14_20-51-15.mp4 output2024-10-14_20-49-18.mp4 output2024-10-14_20-48-06.mp4 output2024-10-14_20-47-22.mp4 output2024-10-14_20-46-52.mp4 output2024-10-14_20-45-22.mp4 output2024-10-14_20-40-19.mp4 output2024-10-14_20-39-59.mp4 output2024-10-14_20-39-37.mp4 output2024-10-14_20-38-49.mp4 output2024-10-14_18-57-02.mp4 output2024-10-14_18-53-02.mp4 output2024-10-14_18-44-36.mp4 output2024-10-14_18-41-03.mp4 output2024-10-14_17-11-29.mp4 Key Features * Melody Generation: Automatically generate melodies based on musical progressions, keys, and scales. * Event Scheduling: Schedule musical events such as notes and rhythms to create complex compositions. * MIDI Integration: Export compositions as MIDI files for further use in digital audio workstations (DAWs). Core Functionality Melody Generation The [generateMelody]function is a core component of the project. It generates a melody based on a given chord progression, key, and scale. The function works as follows: 1. Initialization: Sets up the melody channel and initializes lists to store melody notes and lengths. 2. Melody Creation: Iterates over 64 bars to create a melody. For every 4th bar, it uses the chord progression to determine the note. For other bars, it randomly selects notes from the scale. 3. Note Lengths: For each bar, it assigns random note lengths (whole, half, quarter, eighth) to the melody notes. Event Scheduling The project includes an event scheduler to manage the timing and sequencing of musical events. This allows for precise control over when notes are played, ensuring that the generated melodies and rhythms are synchronized correctly. Usage 1. Run the Main Script: Execute the main script to launch the application. python main.py 2. Generate Melodies: Use the [generateMelody] function to create melodies based on your desired musical parameters. 3. Export MIDI: Save your compositions as MIDI files for use in other music production software. Features * Piano Roll Interface: Visual interface for composing music. * Recording: Record your compositions. * MIDI File Export: Save your compositions as MIDI files. * Freeplay Mode: Play and record music freely. Installation 1. Clone the repository: git clone https://github.com/yourusername/music-composer.git cd music-composer 2. Install the required dependencies: pip install -r requirements.txt 3. Ensure you have the necessary assets in the Assets/ directory: + music.png + export.sf2 + LAYLA.MID Usage 1. Run the main script: python main.py 2. Follow the on-screen instructions to interact with the application: + Press r to restart. + Press s to save. + Press f to enter freeplay mode. + Press Ctrl+C to exit. Project Structure * main.py: Entry point of the application. * UIGPT.py: Contains the UI logic and event handling. * Scheduler.py: Handles scheduling of musical notes. * Record.py: Manages recording functionality. * Freeplay.py: Implements freeplay mode. * Assets/: Contains necessary assets like images and sound fonts. * recordings/: Directory where recordings are saved. Contributing 1. Fork the repository. 2. Create a new branch (git checkout -b feature-branch). 3. Make your changes. 4. Commit your changes (git commit -am 'Add new feature'). 5. Push to the branch (git push origin feature-branch). 6. Create a new Pull Request. License This project is licensed under the MIT License. See the LICENSE file for details. Acknowledgements * Pygame for the game development library. * Mido for MIDI file handling. * PySide6 for the GUI components. About No description, website, or topics provided. Resources Readme Activity Stars 97 stars Watchers 2 watching Forks 5 forks Report repository Releases No releases published Packages 0 No packages published Contributors 2 * * Languages * Python 100.0% Footer (c) 2024 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact * Manage cookies * Do not share my personal information You can't perform that action at this time.