Chat

Author Topic: Wave-phasing on the PC engine causes popping sounds on the .hes exports  (Read 665 times)

Offline Michirin9801

  • Member
  • Posts: 240
I was unsure whether this was a PC engine problem or a Deflemask problem, but when I play the .hes exports of songs that use instruments that use the wave macro to change the wavetables multiple times (in other words: songs that use wave-phasing instruments) there's some very noticeable popping sounds which, according to a trusty PCE developer, shouldn't really happen, or at least not to that extent... I can't exactly explain what is happening, but I can point you towards this thread on the PCEFX forum:
http://www.pcenginefx.com/forums/index.php?topic=21779.30
It's better explained there, I'm also including 2 examples with both the .dmf and the .hes exports
Oh and, in case this is a bug and you want to fix it, you might want to look for help on the Mednafen forums, just saiyan...

[EDIT]
Okay so, apparently he was wrong... Nevermind then...
But still, you really should update Deflemask's ROM builder for the PC engine, elmer's on to something with his Huzak project, you really should keep an eye on that!
« Last Edit: January 08, 2017, 03:18:03 AM by Michirin9801 »

Offline elmer

  • Newbie
  • Posts: 30
  • Delek FTW
Wave-phasing on the PC engine causes popping sounds on the .hes exports
« Reply #1 on: January 26, 2017, 05:36:06 PM »
[EDIT]
Okay so, apparently he was wrong... Nevermind then...

Yep, it doesn't look like there's any way to completely avoid the popping ... but the other issue is the sheer amount of time taken to upload the new waveform to the PSG in the .hes export.

It's doing an incredibly slow set-register-then-copy-a-byte 32-times to change the waveform. That's a *minimum* of 1632 CPU cycles. Plenty of time for the "click" to be audible.

Having the .hes code do the copy with a fast TIN instruction would cut that down to 209 cycles.

Offline Michirin9801

  • Member
  • Posts: 240
Wave-phasing on the PC engine causes popping sounds on the .hes exports
« Reply #2 on: January 27, 2017, 12:35:47 AM »
Having the .hes code do the copy with a fast TIN instruction would cut that down to 209 cycles.
Would that make the popping any less noticeable?
And if so, are you gonna implement that into Huzak?

Offline elmer

  • Newbie
  • Posts: 30
  • Delek FTW
Wave-phasing on the PC engine causes popping sounds on the .hes exports
« Reply #3 on: February 02, 2017, 04:59:01 PM »
Having the .hes code do the copy with a fast TIN instruction would cut that down to 209 cycles.
Would that make the popping any less noticeable?

Haha ... that's actually a very, very good question.  :D

I guess that it depends upon what it is in the circuit that is causing that hardware pop when you turn off the channel.

Whatever is going on, reducing the time that channel's output is completely paused for the wavetable upload, to 1/8th the delay, suggests that it's likely to sound a little better, and that the low-pass filter in the audio output is more likely to catch the pop.

It looks like the .hes player software that the guys are using could be easily modified to add another bytecode to do the upload as-fast-as-possible with the TIN instruction.

But it's entirely up to them whether they want to bother.


Quote
And if so, are you gonna implement that into Huzak?

Yeah, already did. It's designed to be used in games, and there was no way that I'd want to burn the CPU cycles doing it the slow way.  ;)

Offline Fragmare

  • Newbie
  • Posts: 49
  • Delek FTW
Wave-phasing on the PC engine causes popping sounds on the .hes exports
« Reply #4 on: February 05, 2017, 02:44:00 PM »
I honestly think if it were just optimized, it would sound fine.  You might get a little popping here and there on the HuC6280 first revision chip, but keep in mind Bloody Wolf did wave phasing, and I recall that sounding fantastic on the ole Turbob.  I agree that the amount of popping in the Deflemask HES outputs is quite exaggerated, though... so much so, that I don't bother trying to change waveforms mid-note for any reason.  But yea, probably just needs fast writes... similar to what a game would use.

HuC6280 chiptuning (at least in Deflemask) is still relatively young, i suppose, so I guess issues like this and the note>sample switching are to be expected until people stumble across them... like us.  :)
« Last Edit: February 05, 2017, 02:45:44 PM by Fragmare »

Offline Michirin9801

  • Member
  • Posts: 240
Wave-phasing on the PC engine causes popping sounds on the .hes exports
« Reply #5 on: February 05, 2017, 11:25:32 PM »
That Steel Drum would sound pretty sweet if well optimised, and so would C64 style pulse-length modulation, but other than that I don't even know what kind of instruments would sound good with updating waveforms...
What I'm really interested in though is that trick from Firepro 2 that Bonknuts showed off in the original thread in the PCEFX forum, you know, the one where you "corrupt" the waveform by writing some sort of data to it as it plays?
I mean this one:

This would be sweet if you wanna do a really FM-esque sound on the PC engine...

Offline Fragmare

  • Newbie
  • Posts: 49
  • Delek FTW
Wave-phasing on the PC engine causes popping sounds on the .hes exports
« Reply #6 on: February 06, 2017, 07:38:32 PM »
That Steel Drum would sound pretty sweet if well optimised, and so would C64 style pulse-length modulation, but other than that I don't even know what kind of instruments would sound good with updating waveforms...
What I'm really interested in though is that trick from Firepro 2 that Bonknuts showed off in the original thread in the PCEFX forum, you know, the one where you "corrupt" the waveform by writing some sort of data to it as it plays?
I mean this one:

This would be sweet if you wanna do a really FM-esque sound on the PC engine...

Oh hell yes, I saw that video too!  That effect looks (and sounds) sick!  Almost looks like the waveform is being corrupted with noise... which would be perfect for some Thunder Force IV style guitar sounds on the PC-Engine.