Skip to content

This repository contains the source code and related files of my final project for the Programming Lab 2 course. The project is a console-based music player system that allows users to select a music genre and receive a randomly generated playlist based on their selection.

Notifications You must be signed in to change notification settings

JordanMedinaOrtiz/music-player-c

Repository files navigation

Music Player System in C/C++ 🎵

Ver README en Español

This repository contains the source code and related files of my final project for the Programming Lab 2 course. The project is a console-based music player system that allows users to select a music genre and receive a randomly generated playlist based on their selection. The main objective of this project was to apply advanced programming concepts, such as file handling, data structuring with structs, queue-based logic, and input validations to simulate the experience of a basic yet functional music player.

Technologies Used

C C++

Objective

  • Build a complete music player simulator from scratch.
  • Practice file input/output for data persistence.
  • Implement queue logic for ordered playlist playback.
  • Use structs for clean data modeling and modular programming.
  • Apply solid input validation to enhance user experience.

Main Features

  • Advanced Array Manipulation: Stores and retrieves albums and songs from .txt files. Playlists are dynamically built from these files based on user input.
  • Struct-based Organization: Models genres, albums, and songs using structs, ensuring clean and modular code.
  • Queue Implementation: A custom queue structure is used to manage playlist order and simulate realistic playback behavior.
  • Robust Input Validation: Avoids duplicate genre selections and ensures that all inputs follow expected formats and constraints.
  • Random Playlist Generator: Automatically creates a random playlist based on the chosen genre for a more dynamic experience.

Skills Acquired

  • Intermediate to advanced programming in C/C++
  • Understanding and implementing file operations
  • Mastery of custom data structures like queues
  • Clean and efficient use of structs for data management
  • Better grasp of terminal-based user interface logic

How to Use

  1. Clone this repository to your local machine:

    git clone https://github.com/jordanmedinaortiz/music-player-c.git
    cd music-player-c
  2. Compile the program using GCC or any compatible C compiler:

    gcc ReproduccionMusical.c -o ReproduccionMusical
  3. Run the program:

    ./ReproduccionMusical
  4. Select your music genre

  5. Enjoy your playlist

This music player was developed individually as part of my final project for the Programming Lab 2 course. It helped me reinforce my understanding of file systems, data structures, and user interaction in C/C++. It’s a great foundation for future music-related or queue-based systems I might build.

Project Image

About

This repository contains the source code and related files of my final project for the Programming Lab 2 course. The project is a console-based music player system that allows users to select a music genre and receive a randomly generated playlist based on their selection.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published