How does digi YM sound works?

All about chiptunes

Moderators: Mug UK, lotek_style, Moderator Team

Zamuel_a
Atari God
Atari God
Posts: 1223
Joined: Wed Dec 19, 2007 8:36 pm
Location: Sweden

How does digi YM sound works?

Postby Zamuel_a » Mon Mar 31, 2014 4:12 pm

I noticed that the intro music (when the static picture is showing) in Giana Sisters is some kind of digital sample / tracker or similair. I also found it in the SNDH archive in the Mad Max folder and the name was giana_title_digi something... It only takes 82k so how can they fit a sample for several minutes into that?
ST / STFM / STE / Mega STE / Falcon / TT030 / Portfolio / 2600 / 7800 / Jaguar / 600xl / 130xe

User avatar
Mug UK
Administrator
Administrator
Posts: 11311
Joined: Thu Apr 29, 2004 7:16 pm
Location: Stockport (UK)
Contact:

Re: How does digi YM sound works?

Postby Mug UK » Mon Mar 31, 2014 5:42 pm

Chris Huelsbeck wrote the original tune and Jochen Hippel converted it for the ST, so it could be an early TFMX format? In 80 Days Around The World he (Jochen) was using chip+digi tunes and both games are 1987/88.

Pure guesswork though .. the correct info is probably buried in an ST News article.
My main site: http://www.mug-uk.co.uk - slowly digging up the bits from my past (and re-working a few): Atari ST, Sega 8-bit (game hacks) and NDS (Music ripping guide).

I develop a free Word (for Windows) add-in that's available for Word 2007 upwards. It's a fix-it toolbox that will allow power Word users to fix document errors. You can find it at: http://www.mikestoolbox.co.uk

User avatar
nativ
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 4089
Joined: Mon Jul 30, 2007 10:26 am
Location: South West, UK

Re: How does digi YM sound works?

Postby nativ » Mon Mar 31, 2014 10:07 pm

drums and percussion 20k song 15k ? 45k for lead and looped bass / pad. I have made really small tracker mods before, samples become just waveforms really small data.. reminds me I must get around to converting some Ace sounds to 8 bit AVRs
Atari STFM 512 / STe 4MB / Mega ST+DSP / Falcon 4MB 16Mhz 68882 - DVD/CDRW/ZIP/DAT - FDI / Jaguar / Lynx 1&2 / 7800 / 2600 / XE 130+SD Card // Sega Dreamcast / Mega2+CD2 // Apple G4

http://soundcloud.com/nativ ~ http://soundcloud.com/nativ-1 ~ http://soundcloud.com/knot_music
http://soundcloud.com/push-sounds ~ http://soundcloud.com/push-records

evil
Captain Atari
Captain Atari
Posts: 161
Joined: Sun Nov 12, 2006 8:03 pm

Re: How does digi YM sound works?

Postby evil » Fri Apr 04, 2014 3:13 pm

Zamuel_a wrote:I noticed that the intro music (when the static picture is showing) in Giana Sisters is some kind of digital sample / tracker or similair. I also found it in the SNDH archive in the Mad Max folder and the name was giana_title_digi something... It only takes 82k so how can they fit a sample for several minutes into that?


It's a Soundtracker-style song (with that I mean it's not Soundtracker/Protracker but a homecooked format by TEX). Technically it's a sample mixer (four channels) and samples for instruments like any Soundtracker routine.

Digi sound on YM is not that hard in theory. You got three channels with 4-bit volume on each. Combining the volumes will give you slightly better precision than 8-bits. So what you do is create a volume table of all volume combinations to cover an 8-bit sample. The higher sample frequency, the more often you need to change the volumes of the YM.

So an unoptimized player can look like:

a0=sample data
a1=volume tab

moveq #0,d0
move.b (a0)+,d0 ;get sample data 8 bit unsigned
lsl.w #2,d0 ;align to volume tab 4 byte per entry (ABC-)
move.b #8,$ffff8800.w ;select channel A
move.b (a1,d0.w),$ffff8802.w ; set volume A
move.b #9,$ffff8800.w ;select channel B
move.b 1(a1,d0.w),$ffff8802.w ; set volume B
move.b #10,$ffff8800.w ;select channel C
move.b 2(a1,d0.w),$ffff8802.w ; set volume C

And that's it. Now do that 15000 times per second for a 15 kHz sample :) Of course that's dreadful horribly slow code. But should be easy to read and easy to come up with optimizations.

So that's the good part. The bad part is that the volume table will be all f.ucked up if you do it the normal mathematical way. Due to a really bad mixer when the Atari combine the channels, there seems to be feedback going from channel to channel. So a good volume table isn't linear and nice at all. Some unlucky dudes back int he 80's did analysis of the various volume combinations and came up with volume tables that actually works. Most people are using the ones from Quartet or ST Replay.

User avatar
yerzmyey
Atari Super Hero
Atari Super Hero
Posts: 578
Joined: Fri Sep 19, 2008 12:23 pm
Contact:

Re: How does digi YM sound works?

Postby yerzmyey » Wed Feb 04, 2015 10:50 pm

Zamuel_a:

> How does digi YM sound works?
-------------------
Yes, with volumes toying, like Evil said.

I was using only the later engines (ProTracker ST and DigiComposer), and the DC has distinguishably better engine.
But it was until I found the HexTracker.

Paulo could tell more about it, I'm sure, as he made the Hex engine being able to play even 6 channel digi songs in an acceptable quality of 21-22khz. http://ym-digital.i-demo.pl/album2/06_Y ... tation.mp3
http://ym-digital.i-demo.pl/ ATARI 520ST music-band
http://ay-riders.speccy.cz/ ZX Spectrum music-band
http://yerzmyey.i-demo.pl/ ZX/A500/A1200/ST/XL music
https://soundcloud.com/yerzmyey ZX/A500/A1200/ST/STE/F030 music
http://z80.i-demo.pl/ MP3 archive of Z80 chip music
No good deed will escape unpunished.


Social Media

     

Return to “Ym rockin'”

Who is online

Users browsing this forum: No registered users and 2 guests