Play audio files and generate synthesizer sounds

by velo_ninja

HTML

<script src="https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3"></script>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Custom Audio Player with EQ</title>
  <style>
    body {
      font-family: Arial, sans-serif;
      background-color: #121212;
      color: white;
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100vh;
      margin: 0;
    }

    .audio-player {
      width: 100%;
      max-width: 700px;
      background: #2c2c2c;
      padding: 30px;
      border-radius: 15px;
      box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    }

    .controls {
      display: flex;
      flex-direction: column;
      align-items: center;
    }

    .playback-controls, .volume-controls, .eq-controls, .track-selection {
      margin: 20px 0;
      text-align: center;
    }

    button {
      padding: 12px 20px;
      background-color: #ff4081;
      border: none;
      border-radius: 5px;
      color: white;
      font-size: 16px;
      cursor: pointer;
      margin: 5px;
    }

    button:hover {
      background-color: #e0356c;
    }

    input[type="range"] {
      width: 80%;
      max-width: 300px;
      margin: 5px 0;
      background: #555;
    }

    label {
      display: block;
      margin-bottom: 5px;
      text-align: center;
    }

    select, input[type="range"] {
      display: block;
      width: 100%;
      max-width: 400px;
      margin: 5px 0;
    }

    canvas {
      width: 100%;
      max-width: 600px;
      margin-top: 20px;
      border-radius: 10px;
    }

    .buttons-container {
      display: flex;
      justify-content: space-between;
      width: 100%;
      margin: 20px 0;
    }

    .buttons-container button {
      flex: 1;
      margin: 0 10px;
    }
  </style>
</head>
<body>
  <div class="audio-player">
    <div class="controls">
      <div class="track-selection">
        <select...