Waveform's null level

All about chiptunes

Moderators: Mug UK, lotek_style, Moderator Team

607
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 109
Joined: Tue Aug 16, 2016 3:20 pm
Location: Frisia, the Netherlands

Waveform's null level

Postby 607 » Thu Sep 22, 2016 12:39 pm

I'm having a problem in MaxYMiser where when a sample starts and ends I hear a "pp". I think it happens because the samples I'm using are centered around the 0, while the Steem audio doesn't seem to be.
To see what I mean, here's a screenshot of Audacity: Image
Does anyone else have this problem too?

AtariZoll
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2755
Joined: Mon Feb 20, 2012 4:42 pm
Contact:

Re: Waveform's null level

Postby AtariZoll » Thu Sep 22, 2016 1:13 pm

You need to normalize it in Audacity with option "Remove any DC offset .." on.
English language is like bad boss on workplace: it expecting from you to strictly follow all, numerous rules, but self bending rules as much likes :mrgreen:

607
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 109
Joined: Tue Aug 16, 2016 3:20 pm
Location: Frisia, the Netherlands

Re: Waveform's null level

Postby 607 » Sun Sep 25, 2016 8:36 am

AtariZoll wrote:You need to normalize it in Audacity with option "Remove any DC offset .." on.

That works and could be quite useful I suppose, thanks.
However, that isn't the problem here. I don't want to use audio from Steem in Audacity, I want to use audio from Audacity in Steem.
I'd suppose I could perhaps normalize centering on a different level, but I wouldn't know what level as it seems to change, somehow.
If you record from Steem, do you get something similar to my screenshot?

AtariZoll
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2755
Joined: Mon Feb 20, 2012 4:42 pm
Contact:

Re: Waveform's null level

Postby AtariZoll » Sun Sep 25, 2016 9:31 am

I just did my first 2 sound recordings from Steem (usually I do it from real HW, together with video :-) ).
Used Steem 3.2 and Steem SSE 3.808 - saved DMA audio and PSG audio. And both were miscentered, as your shot.
So, it is just smaller bug in Steem - saving with incorrect WAV flag about signing. - Actually, they should unsign it - see lower why.

Normally, WAV is with unsigned values, while STE DMA audio needs signed, 8-bit PCM data. So, you need to save, pardon export it as signed, 8-bit mono or stereo, and of course with supported sample freq. But to get proper signed signal, you must have it centered in Audacity first. And here is the problem - with 8-bit PCM no signed, just unsigned option by export as WAV. So, probably better is to save as RAW - then no WAV header too. I used earlier to save as unsigned from Wavelab, because it did not have RAW save, and signed in Atari SW self, after loading PCM data.
English language is like bad boss on workplace: it expecting from you to strictly follow all, numerous rules, but self bending rules as much likes :mrgreen:

607
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 109
Joined: Tue Aug 16, 2016 3:20 pm
Location: Frisia, the Netherlands

Re: Waveform's null level

Postby 607 » Sun Sep 25, 2016 10:01 am

AtariZoll wrote:I just did my first 2 sound recordings from Steem (usually I do it from real HW, together with video :-) ).
Used Steem 3.2 and Steem SSE 3.808 - saved DMA audio and PSG audio. And both were miscentered, as your shot.
So, it is just smaller bug in Steem - saving with incorrect WAV flag about signing. - Actually, they should unsign it - see lower why.

Normally, WAV is with unsigned values, while STE DMA audio needs signed, 8-bit PCM data. So, you need to save, pardon export it as signed, 8-bit mono or stereo, and of course with supported sample freq. But to get proper signed signal, you must have it centered in Audacity first. And here is the problem - with 8-bit PCM no signed, just unsigned option by export as WAV. So, probably better is to save as RAW - then no WAV header too. I used earlier to save as unsigned from Wavelab, because it did not have RAW save, and signed in Atari SW self, after loading PCM data.

I'd like to use real hardware, but MaxYMiser has problems on my STE :\
Thanks for your explanation, but I'm not sure if I know quite what to do.
At the moment I'm doing the following:
import wav, which is correctly centered. Frequency 44100Hz. Export Audio, as Other uncompressed files, with Header: "RAW (header-less)" and Encoding: "Signed 8-bit PCM".
If I now import this sample into MaxYMiser, I still get the "pp" sound when the sample starts and ends. It doesn't matter if I let the sample play completely or cut it short, I'll always hear the "pp" when it goes back to silence, as the silence level is lower than the centre of the sample.

AtariZoll
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2755
Joined: Mon Feb 20, 2012 4:42 pm
Contact:

Re: Waveform's null level

Postby AtariZoll » Sun Sep 25, 2016 10:13 am

It may be that MaxYMiser performs signing after load. So, try to save as RAW, unsigned from Audacity.
English language is like bad boss on workplace: it expecting from you to strictly follow all, numerous rules, but self bending rules as much likes :mrgreen:

607
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 109
Joined: Tue Aug 16, 2016 3:20 pm
Location: Frisia, the Netherlands

Re: Waveform's null level

Postby 607 » Sun Sep 25, 2016 2:45 pm

If I export them unsigned, the "pp" isn't there. However, the sample doesn't sound like it's supposed to sound. In MaxYMiser there's a Sign/Unsign button, and if I press that, it sounds right again, but the "pp"'s reoccur.
Last edited by 607 on Sun Sep 25, 2016 2:46 pm, edited 1 time in total.

AtariZoll
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2755
Joined: Mon Feb 20, 2012 4:42 pm
Contact:

Re: Waveform's null level

Postby AtariZoll » Sun Sep 25, 2016 4:12 pm

Well, then you need to use fade in at start and fade out at end.
English language is like bad boss on workplace: it expecting from you to strictly follow all, numerous rules, but self bending rules as much likes :mrgreen:

607
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 109
Joined: Tue Aug 16, 2016 3:20 pm
Location: Frisia, the Netherlands

Re: Waveform's null level

Postby 607 » Fri Sep 30, 2016 3:34 pm

AtariZoll wrote:Well, then you need to use fade in at start and fade out at end.

In MaxYMiser or in Audacity? I tried a fade out in MaxYMiser before, and I don't think it worked, but I'd try again.

User avatar
Steven Seagal
Atari God
Atari God
Posts: 1835
Joined: Sun Dec 04, 2005 9:12 am
Location: Undisclosed
Contact:

Re: Waveform's null level

Postby Steven Seagal » Sat Oct 01, 2016 12:44 pm

Not sure I understand the real problem, but for info, samples for DMA sound are signed, so we need to adjust to their "zero" (128) or we'll get "pops" when sounds start and stop (there may be little pops anyway).
But the PSG emu is unsigned, its zero is 0.
Mixing unsigned and signed is trouble.

AtariZoll
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2755
Joined: Mon Feb 20, 2012 4:42 pm
Contact:

Re: Waveform's null level

Postby AtariZoll » Sat Oct 01, 2016 7:04 pm

The issue is not how it works in Steem when playing audio, but only the WAV saving. WAV with 8-bit signed is just not used format, and both STE DMA and YM sound is saved as signed 8-bit WAV. So, all what should correct is to unsign them when saving audio. Concrete, just add $80 to every byte in data stream - bytewise, of course.
English language is like bad boss on workplace: it expecting from you to strictly follow all, numerous rules, but self bending rules as much likes :mrgreen:

User avatar
Steven Seagal
Atari God
Atari God
Posts: 1835
Joined: Sun Dec 04, 2005 9:12 am
Location: Undisclosed
Contact:

Re: Waveform's null level

Postby Steven Seagal » Sun Oct 02, 2016 9:38 am

But then it would sound totally wrong. It is saved as it is played, unsigned when 8bit, signed when 16bit, which is the rule for WAVE PCM (I think).

AtariZoll
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2755
Joined: Mon Feb 20, 2012 4:42 pm
Contact:

Re: Waveform's null level

Postby AtariZoll » Sun Oct 02, 2016 11:45 am

I tried 16-bit WAV - and problem is exactly the same:
So looks saved WAV:
SteemSav.jpg

And after DC offset removal:
AfterDCoffsRemoval.jpg


This was simple PSG music. And it sounds exactly same played on PC. But upper is just wrong, and on some systems can make problems - what is actually why this thread is started.
You do not have the required permissions to view the files attached to this post.
English language is like bad boss on workplace: it expecting from you to strictly follow all, numerous rules, but self bending rules as much likes :mrgreen:

User avatar
Steven Seagal
Atari God
Atari God
Posts: 1835
Joined: Sun Dec 04, 2005 9:12 am
Location: Undisclosed
Contact:

Re: Waveform's null level

Postby Steven Seagal » Sun Oct 02, 2016 1:08 pm

PSG emu uses ljbk's table, with unsigned 16bit values.
Steem must convert to signed, by doing XOR 0x8000.
Waveform is the same, zero is changed.
I'm no expert in DSP though, I'll look into it again.

607
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 109
Joined: Tue Aug 16, 2016 3:20 pm
Location: Frisia, the Netherlands

Re: Waveform's null level

Postby 607 » Sun Oct 02, 2016 2:42 pm

I set up Hatari today, and did the same stuff there. There were no problems. There aren't any problems like this on my actual ST either.
So it might be a Steem exclusive bug.
I didn't find it in the bugs list, so it may need to be reported.
I now know how to work around the problem, but it'd still be better if it'd would work as expected in Steem, too.

User avatar
Steven Seagal
Atari God
Atari God
Posts: 1835
Joined: Sun Dec 04, 2005 9:12 am
Location: Undisclosed
Contact:

Re: Waveform's null level

Postby Steven Seagal » Sun Oct 02, 2016 5:23 pm

607 wrote:So it might be a Steem exclusive bug.
I didn't find it in the bugs list, so it may need to be reported.
I now know how to work around the problem, but it'd still be better if it'd would work as expected in Steem, too.


If you think there's a bug AND you use Steem SSE, please fill in a precise report there and I'll check it.


Social Media

     

Return to “Ym rockin'”

Who is online

Users browsing this forum: No registered users and 2 guests