# Amp in Sound library not working

**URL:** https://discourse.processing.org/t/amp-in-sound-library-not-working/47528
**Category:** Libraries
**Created:** [November 11, 2025, 10:45am UTC](https://discourse.processing.org/t/amp-in-sound-library-not-working/47528 "2025-11-11T10:45:30Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)
#### Post date: [November 11, 2025, 4:11pm UTC](https://discourse.processing.org/t/amp-in-sound-library-not-working/47528/2 "2025-11-11T16:11:35Z")

</div>

Hello @todocono,

Initially it did not seem to work for me as well.  
Too much going and a cacophony of sound and I slimmed it down to volume only!

There was an error as well in mapping.

I then went in to the various Windows sound settings and looked around and then it seemed to work! I did not change anything and initially did not see “Simple Playback” in there initially.

Try this modified version:

```processing
/**
 * This is a simple sound file player. Use the mouse position to control playback
 * speed, amplitude and stereo panning.
 */

// GLV modified code below for amplitude only:

import processing.sound.*;

SoundFile soundfile;

void setup() {
  size(120, 360);
  background(255);

  // Load a soundfile
  soundfile = new SoundFile(this, "vibraphon.aiff");

  // Play the file in a loop
  soundfile.loop();
  
  mouseY = height/2; // Set initial value before using mouse in sketch window
}      

void draw() {
  background(255);
  
  // Map mouseY from 0.0 to 1.0 for amplitude
  //float amplitude = map(mouseY, 0, width, 0.0, 1.0);
  float amplitude = map(mouseY, 0, height, 0.0, 1.0); //< Corrected to height!
  
  println(mouseY, amplitude);
  
  circle(width/2, mouseY, 20);
  
  soundfile.amp(amplitude);
}

```

My Volume mixer:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/b/a/ba5fa4ca3e49079209f7823b68a54f48af4b191e.png)

The GitHub source:

> **[GitHub - processing/processing-sound: Audio library for Processing built with JSyn](https://github.com/processing/processing-sound)**
>
> Audio library for Processing built with JSyn

`:)`

---

_[View the full topic](https://discourse.processing.org/t/amp-in-sound-library-not-working/47528)._
