Welcome, Guest. Please login or register.

Author Topic: Trackers that do 14-bit sound on 68000?  (Read 15364 times)

Description:

0 Members and 3 Guests are viewing this topic.

Offline ChaosLord

  • Hero Member
  • *****
  • Join Date: Nov 2003
  • Posts: 2608
    • Show all replies
    • http://totalchaoseng.dbv.pl/news.php
Re: Trackers that do 14-bit sound on 68000?
« on: January 31, 2013, 04:44:25 PM »
Quote from: Karlos;724644

IIRC, 14-bit replay requires cycle exact synchronization between the paired channels that are used to play the MSB/LSB halves of your 16-bit sample. I think that the 14-bit routines bypass Paula DMA sample replay all together and give her (registers) a good poking.

No.
14-bit audio works by using Paula's built-in for free Channel Locking function which locks 2 channels together into 1 channel.  1 of the channels provides 8-bits of data and the other channel provides 6-bits of volume control.  They are fed with the normal DMA mechanism, otherwise it would be quite useless.



Quote

Either that, or they pre-fill short buffers for each channel and then trigger her to replay them directly.

Either way, I am not sure that trying the replay as channels in a tracker will work. A simple test would be to play a regular sample on a channel and it's inverse on a channel on the same side. If they cancel each other out completely (or almost completely) then your plan seems plausible. Otherwise, even a sub-millisecond latency between two channels is going to sound dreadful.

If the tracker is programmed 100% correctly then it would, in fact, work perfectly.  I did it myself, not in a tracker but in whatever sample editor I was using that day.  AudioMaster 3  or Audition 4 or whatever.  In my test I sent my sound sample to the left speaker and my inverted sound sample to the right speaker and to my astonishment I heard silence!    IMHO Using 2 8-bit channels together as a 16-bit channel works as long as the tracker replay routine is programmed 100% correctly to start the 2 channels at exactly the same time.
Wanna try a wonderfull strategy game with lots of handdrawn anims,
Magic Spells and Monsters, Incredible playability and lastability,
English speech, etc. Total Chaos AGA
 

Offline ChaosLord

  • Hero Member
  • *****
  • Join Date: Nov 2003
  • Posts: 2608
    • Show all replies
    • http://totalchaoseng.dbv.pl/news.php
Re: Trackers that do 14-bit sound on 68000?
« Reply #1 on: January 31, 2013, 04:57:19 PM »
Quote from: Wilse;724715

I should also add that I can't tell the difference between a 320kbps mp3 and a 16 bit .wav either. However, there were a couple of youngsters on my sound engineering course who claimed they could. So, in my case, I think it *is* my ears (or at least how I perceive what they hear).  

You can hear the difference if you save the .mp3 out as a sound sample.  Pick your fave sample out of the song... like a 3 second sample.  Cut it out and save it as its own separate sample.  Listen to it on its own.  It will sound like crap.  I have experienced this myself many times.

.mp3s rely on creating an aural illusion.  If you have cast a Dispel Illusion spell or your mom built you with the Immunity to Illusion DNA v3.1 installed to your brain then of course you will hear the difference and .mp3s will sound worse than a normal .shn or .flac or .16sv or .wav file.
Wanna try a wonderfull strategy game with lots of handdrawn anims,
Magic Spells and Monsters, Incredible playability and lastability,
English speech, etc. Total Chaos AGA
 

Offline ChaosLord

  • Hero Member
  • *****
  • Join Date: Nov 2003
  • Posts: 2608
    • Show all replies
    • http://totalchaoseng.dbv.pl/news.php
Re: Trackers that do 14-bit sound on 68000?
« Reply #2 on: February 01, 2013, 07:02:52 AM »
Quote from: ral-clan;724831
How would this work? An MP3 uncompressed to a WAV should sound exactly the same as an MP3 being uncompressed on the fly.  The should be bit for bit identical.


It is bit for bit identical.  That is the point.  And it "sounds" perfect.

Now cut a piece out.

Listen to the piece by itself.

It will sound like crap.  All kinds of weird distortion.

When you remove the illusion the distortion becomes obvious to anyone.  Its weird.
Wanna try a wonderfull strategy game with lots of handdrawn anims,
Magic Spells and Monsters, Incredible playability and lastability,
English speech, etc. Total Chaos AGA
 

Offline ChaosLord

  • Hero Member
  • *****
  • Join Date: Nov 2003
  • Posts: 2608
    • Show all replies
    • http://totalchaoseng.dbv.pl/news.php
Re: Trackers that do 14-bit sound on 68000?
« Reply #3 on: February 02, 2013, 12:53:50 AM »
Quote from: Karlos;724953
It's not that weird. MP3 isn't just about conversion of amplitude/time domain to frequency/phase domain (and subsequent quantization into bands). Even before that, pretty sophisticated algorithms are applied that account for the way in which sound is perceived and also how the ear reacts to sudden changes in volume. Collectively, this is the Psychoacoustic Modelling part of the encoding and it's used to make quantitative decisions about where to discard information about sound you won't perceive well because of the state your ear and auditory cortex will be in given the most recent sounds you have just heard.

For example, when there's a sudden increase in volume, the ear physically responds by tightening the tympanic membrane, which results in a loss in sensitivity. If a quiet sound immediately follows again, your ear takes some time to relax again and the cells responsible for reporting certain frequencies will be recovering too. You won't hear the quiet part as well as you would without being exposed to the previous sound and it may be that you are especially desensitised to certain frequencies for a moment. All of these phenomena and more are used by the PM stage to work out what it can discard that you won't notice.

So, when you take a sample out of the middle of a MP3 track that's had a good PM algorithm applied, particularly if the sample comes from a region following a sudden transient change in volume, pitch change or whatever, without that preceding cue, you are left with audio encoded in a manner your ear is not expecting and you likely will notice encoding artefacts as a consequence.


Well, since you explained it that way... it doesn't sound weird at all.  :razz:  :biglaugh:
Wanna try a wonderfull strategy game with lots of handdrawn anims,
Magic Spells and Monsters, Incredible playability and lastability,
English speech, etc. Total Chaos AGA
 

Offline ChaosLord

  • Hero Member
  • *****
  • Join Date: Nov 2003
  • Posts: 2608
    • Show all replies
    • http://totalchaoseng.dbv.pl/news.php
Re: Trackers that do 14-bit sound on 68000?
« Reply #4 on: February 02, 2013, 01:01:55 AM »
Quote from: ral-clan;724908
I don't know, he would have to write his original explanation a little more clearly.  Maybe I misunderstood.


Let me say it another way:
I don't know how to magically cut sounds out of an mp3.

An mp3 is compressed.  You cannot just arbitrarily cut a piece of sound out of it.  The file is compressed in blocks.  At a minimum you would have to cut at a block boundary.

It is a basic rule of computer science that compressed data must be UNcompressed first before you start manipulating it.


Just like you can't magically cut 3 seconds out of the middle of a .lha file.  First you must UNcompress the .lha file into a normal file.  Then you cut the data.
Wanna try a wonderfull strategy game with lots of handdrawn anims,
Magic Spells and Monsters, Incredible playability and lastability,
English speech, etc. Total Chaos AGA
 

Offline ChaosLord

  • Hero Member
  • *****
  • Join Date: Nov 2003
  • Posts: 2608
    • Show all replies
    • http://totalchaoseng.dbv.pl/news.php
Re: Trackers that do 14-bit sound on 68000?
« Reply #5 on: February 02, 2013, 01:16:22 AM »
Quote from: ral-clan;724904
Sorry, but I don't follow your argument.  MP3 encoding is a lossy encoding format, i.e the frequencies that are removed are done so at the encoding stage.

True of course.


Quote

  When you listen to an MP3

Nobody listens to mp3s.  You listen to a wav.

Your mp3 player decompresses the mp3 into a wav and then sends the wav to your speakers.


Quote

 or de-encode one to a WAV, they should be identical.  i.e. you cannot "get back" lost frequencies by un-encoding an MP3 back to a WAV.

Nobody claimed to get back any lost frequencies.  Any lost frequencies are lost forever.

Quote

A 3-second sound clip of an MP3 or the same 3-second clip of this mp3 converted back to a WAV should sound identical.

Yes they will sound identically awful.  They will sound nothing like how they sounded when you listened to the song in its entirety.

Quote

Granted, an mp3 is always inferior to the ORIGINAL master wav, but the two 3-second test clips both derived post-encoding process should sound the same.

There is only one 3 second test clip.  Not 2.  You are really making this confusing :)




Let me try again:
1. Save your .mp3 song file as a .wav (This is so you can CUT pieces out of it, nothing more!)

2. Pick out a kewl sample that you want to use in your new Octamed SoundStudio Remix and cut that out and save it as TestClip.wav

3. Listen to the clip you just cut.  It will sound yucky.

Every time I have ever done the above steps I end up with a sample that sounds really weird and unpleasant.  This is why ppl say "mp3 sux, gimme a FLAC".
Wanna try a wonderfull strategy game with lots of handdrawn anims,
Magic Spells and Monsters, Incredible playability and lastability,
English speech, etc. Total Chaos AGA
 

Offline ChaosLord

  • Hero Member
  • *****
  • Join Date: Nov 2003
  • Posts: 2608
    • Show all replies
    • http://totalchaoseng.dbv.pl/news.php
Re: Trackers that do 14-bit sound on 68000?
« Reply #6 on: February 02, 2013, 06:40:13 PM »
Quote from: Karlos;725038
I don't think this is correct. Or rather, I don't believe existing calibrated/uncalibrated cybersound drivers for Paula work this way.


I believe you are correct.

Not that I have ever looked at the code or anything.  So who really knows how it really works.

The channel joining method is just how I assumed it worked since that method automatically seems to provide only 14 bits of resolution.  While ottomh it seemed like if you played real samples on 2 channels at once you would get 16 bit resolution.

According to what I read 14-bit replayers don't using channel-joining technique.

According to what I read it plays 2 samples at once, 1 at full volume and 1 at volume 1 (or something like that).

What I do know is that 14-bit players feel computationally heavy.  They always drag down my cpu.  After reading your msg I guess the 14-bit players have a ton of work they have to do.

14-bit players have to take an incoming 16-bit unsigned sample and convert it to signed, split every single 16-bit value into 2 halves (one half goes to one paula channel and the other half has to goto another paula channel).  Then do all that rigamorale that u talked about in your message.  Then repeat the whole process for the other side of the audio.  Ugh! :)

Having to do all that stuff 88200 times a second.  No wonder it drags my cpu :)

I am just happy that Paula allows this 100% perfect down to the nanosecond start-audio-on-2-channels-on-once concept to work.  Whoever designed that chip got a lot of things right.
Wanna try a wonderfull strategy game with lots of handdrawn anims,
Magic Spells and Monsters, Incredible playability and lastability,
English speech, etc. Total Chaos AGA