Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[request] i think tic80 is suffering this sound problem #2201

Open
atesin opened this issue May 17, 2023 · 13 comments
Open

[request] i think tic80 is suffering this sound problem #2201

atesin opened this issue May 17, 2023 · 13 comments

Comments

@atesin
Copy link

atesin commented May 17, 2023

YOUTUBE LINK (CTRL+CLICK TO OPEN IN A NEW TAB):

youtube link

i suspect tic80 has suffering this sound issue... because as the video said, triangle waveform is the most similar to sine wave so is often used for bass sounds

.... in tic80 i can't use triangle waves below octave # 4 because it turns from barely audible to absolutely muted (just happen to triangle wave)... moreover as i go down in notes i start to hear the jags/hisses more stronger than the base sound itself ... and if you pay attention to most songs in tic80, you will notice theese high pitched noises between, very notorious in some cases, even more noticeable with headphones

sometimes, even the sound of some channels cancel each other resulting in a "wobbling" sound with some notes/instruments missed

some time ago i noted this issue when remaking draconus song ... so i couldn't get bass sounds as the original octave because was almost inaudible, so i had to leave at 1 octave above, resulting song less faithful ... when i found this video i remembered this immediately, and wanted to share with you

maybe some kind of sound interpolation (EVEN LINEAR) would help to minimize the issue and make tic80 sound better, stronger and cleaner ;)

EDIT: i found a clearer example where jagged triangle "bass", sounds "whistly" instead bass
https://www.youtube.com/watch?v=O4nlb1L5e74

--
edit2 after almost a year to avoid religious discussions: this "issue" is actually a request (see the title) to put an option via gui or config file for example, to add a sound interpolation option... that way, if you like sound artifacts you could leave sound as is, but if you want more physically pure waveforms you have the option to enable sound interpolation, that currently we don't have

@Weeppiko
Copy link

This is NOT an issue, this is by design. TIC-80 sound is based on low resolution wavetables chips, and the low resolution cause some types of waveform to have this "crunchy" sound, which is more noticeable on lower octaves. This is the same characteristic found on sound chips like the Konami SCC (https://youtu.be/OpBp0c-7TVQ), the PC-Engine sound chip (https://youtu.be/gOtFb3sXkTs), and many other wavetable chips. Adding interpolation to it would just make it to lose this characteristic and IMO just making it to sound worse. Now about the sounds cancelling each other is also not a TIC-80 issue, it will just happen at some point to the wave phases to be in opposite directions, basically cancelling each other, which is generally solved by detuning one of the sounds.

@atesin
Copy link
Author

atesin commented Jul 24, 2023

This is NOT an issue, this is by design

how do you know it?, are you sure?

(yeah i supposed that, so this is actually a request, not a bug report.. i changed the title to reflect that)

TIC-80 sound is based on low resolution wavetables chips

yeah, but that sound SUCKS at sometimes... (like low volume triangle wave bass sounds, hisses, whistles and sound artifacts)

trying to not being romantic, that sound chips did the best they could do at that times, but still sucks... i am sure if konami, sega, commodore or others would be able to improve the sound quality of their chips they would do it at once without doubts

... until is easier, we don't have to repeat the same limitations and maybe could do it a little better

(did you watched the videos i posted?)

@atesin atesin changed the title i think tic80 has suffering this sound problem [request] i think tic80 has suffering this sound problem Jul 24, 2023
@atesin atesin changed the title [request] i think tic80 has suffering this sound problem [request] i think tic80 is suffering this sound problem Jul 24, 2023
@Weeppiko
Copy link

yeah, but that sound SUCKS at sometimes... (like low volume triangle wave bass sounds, hisses, whistles and sound artifacts)

And guess what, if you add interpolation to it then a lot of other waveform will not sound right, e.g. a simple square wave would sound more like a hybrid square and triangle wave a not like a clean square wave.

we don't have to repeat the same limitations

TIC-80 is mostly about limitations so that doesn't make sense, if we are going to get rid of audio limitations then why not also get rid of graphics limitations? And it is not even a limitation in the first place, is just an authentic chiptune characteristic that most real videogames/old computers had. TIC-80 is way more videogame authentic sound wise than PICO-8, and IMO this is one of it's strong points.

@atesin
Copy link
Author

atesin commented Jul 31, 2023

valid points ... but then would be nice if at least sound interpolation were implemented as an optional feature, for who wants interpolated sound .... somebody likes purist sound with their glitches and stuff (retro gamers?), others like a more clearer sound (musicians and music lovers?)

i.e. most emulators implement sound interpolation option features

@zhangew
Copy link

zhangew commented Sep 5, 2023

Nice discussion.

@atesin
Copy link
Author

atesin commented Sep 5, 2023

@Weeppiko :
you cannot deny sometimes sound quality is awful, quiet, whistly and distorted... anyway, some people like that sound, some other don't... you cannot force everybody to use what you like, that is why a sound interpolation OPTION would be nice

for example, i am sure there are many musicians that see tic80 as a music production tool, and want and deserve a better sound quality, like anybody that just want it... if don't, you could just simply leave sound interpolation disabled

i.e.: triangle waves are most similar to sine waves (more than square and sawtooth) so are often used to produce bass sounds, but triangle waves below octave # 3 are barely audible without interpolation so it can't be used for bass sounds either :(

(did you watched the video at first post?... with headphones?... please do)

@nesbox
Copy link
Owner

nesbox commented Sep 10, 2023

You can analyze the sound output with Sonic Visualiser app, for example, this is a part of the exported Sonic Mini track
image
And looks pretty smooth
image
instead of
image

All the magic done by this library https://slack.net/~ant/libs/audio.html#Blip_Buffer

@atesin
Copy link
Author

atesin commented Sep 11, 2023

hi @nesbox i am glad you joined this conversation ... all other talks are speculations

correct me if i am wrong, but i see the numbers in first picture, integer part are seconds with 5 milliseconds steps?... (quite low res)
those waveforms looks squary... how triangle waveforms looks instead?, smooth or like this?

imagen

does tic80 use Blip_Buffer library to make sounds?... can sound interpolation set enabled with this library?

@nesbox
Copy link
Owner

nesbox commented Sep 12, 2023

This is how a raw triangle wave looks like
image

@nesbox
Copy link
Owner

nesbox commented Sep 12, 2023

And I don't see any interpolation code in the BlipBuf library, I think it could be done manually just before sending sound samples data to a sound device.

@atesin
Copy link
Author

atesin commented Dec 12, 2023

just to note... i found that lastest release of Blip_Buffer library comes from 2006 !!! (almost 18 years)

search for "Blip_Buffer" in official news page here: https://slack.net/~ant/news.html

not necessarily bad if library is well polished, just to note

@Weeppiko
Copy link

@atesin I stumbled into this again and after putting a bit more thought in it I realized that the best solution would be having an interpolation toggle per SFX basis instead of a global thing that muffles everything. This would make it possible to use both interpolated and non-interpolated sounds at the same time, it's up to the artist to choose when to use it or not (which is basically what happens in the video you sent, only the triangle wave is interpolated but everything else remains the same).

As side note: Saying that musicians prefer "clearer interpolated sounds" ignores the fact that the entire chiptune community is based on musicians that like these old sound chips and how they sound, which is where I come from. TIC-80 is, essentially, another tool for chiptune music as it is.

@atesin
Copy link
Author

atesin commented Mar 15, 2024

@Weeppiko : sounds good that the best option could be to enable sound interpolation per chanel, in all channels at once, that way we could keep some independence between channels and avoid each channel will interfere each other

i am talking from my ignorance, but maybe a good way to achieve it is through some kind of "lookahead" to look the next sample value, and interpolate intermediate values each cycle (linearly, i dont know/care) to produce smoother slopes... or maybe the sound card already have a function to tell it "go from sample A to sample B linearly in T time"

imagen

a little drawback with this is square waves would actually become "trapezoid" waves... but in another hand this effectively is what could smooth energy in wave corners (sudden changes in slope), what is really what produces "whistle" artifacts in pointy waves, as air in reality behaves like "jelly" in slow motion, producing these high pitch "shakes" and vibrations when hitted with brief and sudden high energy strikes

imagen

these are the "shakes" produced when sound changes its slope abruptly, what is perceived by human ear like "tweets" artifacts... as viewed in an oscilloscope... here you can deduct that physical medium (air, electricity, etc) are "elastic" like a string or jelly... the more vertical or rough slope changes, the more "brush" looking waves and whistle artifacts

imagen

@everyone_else_chiptune_purist : well as i commented before, this issue is a request to add sound interpolation OPTION.... enable if you like, or just leave disabled if you don't (and stop both..... xD)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants