Playing music

open-source

#21

That sounds surprisingly good! Do you have an own mixer of 4 channels? It sounds much better than Pokitto’s own mixer. What is the sample rate?

If you can get rid of those extra"pops" when changing the sample (supposing?) it would make it perfect.
We need somehow boost the lower frequencies when playing with the internal speaker. Using headphones the sound is more balanced.


#22

Anyone wondering what it sounds like but can’t test it out… Check out @Spinal_Cord’s Tweet: https://twitter.com/Spinal_Cord/status/1093867050630565890?s=09


#23

Yup, had to mix the channels myself, i didn’t know if there was another way. The only affects supported right now are volume changes and the playing speed. I wouldn’t know what many of the other mod effects do nevermind replicate them.
The music is only semi-automatically converted ATM.


#24

Amazing stuff @spinal !

Edit: Neil, just thought of something

That popping noise may be because you might turn the sample value to zero between samples

In PCM samples, silence is typically 127


#25

I don’t think that’s what the issue is, the samples are converted to signed variables, mixed, then converted back.


#26

That regular popping can only be the result of a systematic big “jump” in the output value. I am pretty sure it is a calculation error of some kind, such as a sudden change from 0->127 or overflow from 255->low


#27

I understand, but I can’t see anywhere in code that might be doing that.

I can’t even tell right now, if this version sounds better or worse…

music_player.LPC11U68 (10).zip (48.7 KB)


#28

I’ve made a couple of changes to how this works, nothing drastically different. It does seem to sound better. I think thiugh, that the samples being 8bit is the biggest issue when it comes to playback quality when mixing.

Expect an update soon™…