New volume control

Please test the binary below. It is the new volume control system and I would like some feedback before I make it part of the library and you all will have to use it :wink:

NOTE: Watch your ears if using headphones on high volumes, because this can push even more power out.

syntest.bin (42.2 KB)

What is it? An explanation:

This is a new way of controlling volume levels on Pokitto. Instead of a sliding volume control from 0 to 255, this is 8 distinct levels. You can control the volume both in the start-up screen and with C+left / C+right during the SynthTest demo.

In a moment I will explain why it is what it is.

1 Like

Long explanation moved to a new topic

6 Likes

Seems OK to me. The only thing is that 4 and 7 arenā€™t represented in the graphic.

Did you try with headphones and speaker? The idea is that there is a smooth transition from hphone levels to speaker levels, i.e. highest headphone level is quiet on the speakers then increases to volume levels you wouldnā€™t want to listen on headphones any more.

Level 4 goes yellow and 7 is the same as 6. This is because I needed 8 levels to be able to do bitshifting fast but couldnt get a meaningful difference between 6 and 7.

I tried with headphones, I have a suggestion, but i donā€™t think itā€™s possible from previous discussions. Is it possible to detect the headphones being plugged in and automatically reduce the volume?

I did notice though, that my headphone jack is not fully connected (this is the first time I have used headphones on this pokitto). I just looks like the bottom 2 pin are not soldered correctly, I should be able to fix that with my soldering level.

[edit] now that my headphones work correctly I noticed that when the volume level is lower, the volume change within the test program is not smooth. Moving the volume from 0 to 255 will result in only 3 or 4 actual changes.

As I am writing this massive explanation thingy, I realized this may or may not be something that is of interest to others. I am a first-order geek, and I find these things endlessly fascinating, so I canā€™t really tell.

So, is there interest in me explaining how the entire Pokitto sound generation (DACs, buffers, amplification works, how to control the DAC directly etc?) Is this something you are interested in learning, or should I focus on porting games etc. instead?

  • Yes, its interesting. Please continue
  • No, use your time in a more productive way
  • Postpone it to later date

0 voters

Thanks for the feedback everyone

The new volume now works like this as per suggestion from @spinal (distinct level 4 added, level 7 removed)

Works in both hardware and sim.

Pushing to git now, mbed soon.

I will make a new gamedisk with this improved sound control very soon.

Heres the binary:

syntest.bin (42.2 KB)

#Background story
I.e. why we had a crappy wolume control and why making this took so long

The volume in Pokitto is controlled by a digital I2C controlled potentiometer. I was not able to get the necessary ā€œlevelsā€ out of the potentiometer. The problem is that when you have a 3.3V device like Pokitto, the actual window within which the amplification works is extremely small. The digital potentiometer couldnā€™t control the volume with such small increments as was needed.

Solution

Now there are 7 levels (0-6) that I have individually adjusted using a scope and listening. 1,2,3 are suitable for headphone use, 4 is on the limit, and 5 and 6 are intended for speaker use

The way it is implemented is that there is a premultiplier table for each level and a discrete volume level for the hardware I2C digipot. These, in combination, make the necessary, well defined volume levels.

3 Likes

mbed upload is not working at the moment.

But its on github now.

2 Likes

mbed pokittolib is now 1:1 with github

2 Likes