pouët.net

Let's nerd-talk prepping samples for Protracker

category: music [glöplog]
Keep me updated :P
added on the 2019-06-16 22:11:50 by Virgill Virgill
@jco: I somehow doubt that you actually failed. You probably did not test your samples on a real Amiga, or at least with a hi-cut filter approximation on your PC.

I just listened to some samples in the ST-XX collection and they sound as noisy as my own (and most likely your own) 8bit conversion attempts.

off topic: @Virgill: I listened to your "Fibonacci" 4k(?) tune a couple of times this morning. You should put that on your soundcloud ! That entire "tiny sound planet" music "disk" was really nice. Would love to see / hear more of this (maybe make this a series?). I bet there are many more "buried treasures" out there.

Last but not least: Call me crazy but today I started working on a .mod file exporter for my "new-school" tracker. So far it handles simple note-ons and offs, loads+converts wav files via sox (with special support for 9xx "sample chains"), and exports a .mod file (which I test in Protracker 2.3D for Windows).

One thing I totally forgot regarding the mod format is that it does not store note indices (like my own tracker back in the day) but DMA periods.
In other words: micro-tuning is "for free" :-)
added on the 2019-06-16 23:39:10 by bsp bsp
I just sketch out my track in Cubase, and do my sound design/mix with ToneBoosters's TimeMachine on the master bus (which has presets for the Amiga with and without the filter). I'll do whatever I can in Cubase to make the mix sound as good as possible through that preset, completely disregarding what it sounds like without it.

Then I just export the channels (usually buses), and convert those samples with r8brain to 8, 11, 16 and 22 kHz to give me some various sample sizes to work with. Normally my sample memory budget for a 500 demo with Slummy is somewhere between 150 and 250 KB (usually leaning towards the smaller end of the spectrum). Puzzling together what works for the different sounds while still meeting the memory usage budget is usually the hardest part.

I don't normalize anything before converting, but rather just export in the volume I've mixed in Cubase. I skip the normalization because I want a "high resolution" for doing echoes with the volume command in the module. Therefore I prefer 0x40 being the "regular" volume for any given sound.

And that's pretty much it. I try to avoid overthinking stuff too much, but rather just work as much as possible in a "representative environment" for the final result.
added on the 2019-06-17 01:21:52 by lug00ber lug00ber
I just uploaded this little sound demo: 8_bit_brick_wall_limiting_and_gating

Signal Chain: UnfilteredAudio G8 Gate => Acon Digital Limit => D16 Decimort 2 (8bit, ~20kHz) => Pro EQ HiShelf 6dB 4.9kHz (approximate Amiga LPF / LED off)

The source clip is something I recorded last year but I thought the Drum'n'Bass style would be fitting for a lo-fi target like the Amiga (even "hifi" D'n'B stuff is usually compressed heavily).

The gate makes quite a difference regarding the perceived noise floor (I am toggling it a few times for comparison).

A similar effect can be achieved by simple cutting off the noisy part of the sample (the release phase). Practically all one-shot Amiga samples do that, for good reason.

For an actual mod, you would cut the loop into pieces (either multiple samples or sample chains) and then rebuild it via note triggers (Recycle-style).

For sustained sounds, use (short) loops and the volume register for fading out samples (8bit waveform + 6bit volume register = 14bit).

Like lug00ber said, the memory budget for an A500 tune is ~200k so there is not really much space for long loops / samples, anyway.

A1200 is a whole different topic, of course (delta encoded 14bit samples streamed from fast-ram / disk + enough chip-RAM even for "huge" 800..1000k mods).
added on the 2019-06-17 01:59:57 by bsp bsp
Pity this topic didn't come up a bit earlier :-) I spent last two weeks trying to prepare and convert samples for my module (using wav2amiga) and the noise in my bass is still louder than a jet engine taking shower.

Apart from the noise, one thing I had a problem with was the dynamic (or rather lack of it).

I was told to move to PT or OpenMPT for composing as early as possible in the process because otherwise (I worked with Renoise) the quality difference might be too big (and for me it was). I'll give it a go next time.

I'll keep an eye on this thread, thanks everyone!
added on the 2019-06-17 03:29:30 by LiSU^TRS LiSU^TRS
Quote:
he will devour all the beautiful chip RAM


Eeeyyy!

;D
added on the 2019-06-17 08:05:28 by d0DgE d0DgE
Quote:
Pity this topic didn't come up a bit earlier :-) I spent last two weeks trying to prepare and convert samples for my module (using wav2amiga) and the noise in my bass is still louder than a jet engine taking shower.!


Does the noise matter when its playing in the background as its supposed to do?
Forget much of dynamics if possible 8)
added on the 2019-06-17 09:15:25 by leGend leGend
jco that article is pretty much gone at the moment, no idea if i have time (or bock) to ever get it back.. :)

But, in a nutshell, what Paula does is sampling the voices and then applying volume through a counter/comparator (think a simple "if (cycle&0x3f >= volume) output=0);" at the full 3.5MHz chip freq. If you disregard the subtle intermodulation effects FWIW it's perfect nearest-neighbor filtering of an 8bit sample followed by "analog" multiplication of the volume.

But that also means that the 8bit and rate restrictions only apply to the incoming sample before resampling. If you try to limit rate and/or bit depth after the fact it's wrong (in fact the 14bit sample output trick on Amiga uses one voice at full and one at 1/64th volume) and you get the sound of old 8 bit software mod players or perhaps an old GUS but not the Amiga. :)
added on the 2019-06-17 10:54:27 by kb_ kb_
Quote:
do my sound design/mix with ToneBoosters's TimeMachine on the master bus (which has presets for the Amiga with and without the filter)

Oooh, that looks VERY useful. And the pack with it in is only €29...
added on the 2019-06-17 10:59:29 by Subi Subi
or in totally realistic pseudo-C in case someone wants to create that Paula VST:

Code:// these are basically the registers int period; char *sample_pointer; char volume; // 0..64 // internal state int pcounter=0, cycle=0; char current_sample=0; // run this at 3.5MHz, then resample and dc filter the signal down to your output rate int paula_voice_tick() { // I might have confused signed and unsigned here, also the loop logic and DMA rate limit is missing. if (!pcounter) { current_sample = *sample_pointer++; pcounter = period; } out = (cycle&0x3f < volume) ? current_sample : 0; pcounter--; cycle++; return out; }


Btw, if anyone ever wondered whe the volume on Amiga goes to 64, not 63 as it would be intuitively more logical, that's the reason. :=)
added on the 2019-06-17 11:07:03 by kb_ kb_
... and make that function return a float and "float out = (cycle&0x3f < volume) ? current_sample/127.0f : 0.0f;" just to be really clear.
added on the 2019-06-17 11:11:50 by kb_ kb_
jco: You understood me right the second time. Dithering is add uncorrelated noise in high bit depth + round to lower bit depth. Just rounding directly to lower bit depth (not adding any noise) leads to nonlinear distortion. My point was that usually, you prefer the controlled noise from dither to the uncontrolled distortion you get without it.

Fun fact: SACD is 1-bit! But it's 2.8 MHz, which allows you to go creative with dithering + noise shaping so that all the error goes way up beyond ultrasound, and the end result becomes significantly better (in terms of dynamic range at frequencies relevant to human hearing) than CD's 44.1/16.
added on the 2019-06-17 12:18:50 by Sesse Sesse
Bandwidth-wise 1-bit @ 2.8MHz = 16-bit @ 175 KHz (or 87,5 KHz if we're talking stereo)
SACD vs CDDA = PWM vs PCM
Same thing, different representation.
added on the 2019-06-17 12:47:10 by rutra80 rutra80
sesse, yep. correct about sacd :) and some sony handheld recorders support it. class d amps also work in a similar fashion afaik, plays a role in why they are so energy efficient.
added on the 2019-06-17 12:50:20 by jco jco
As for 14-bits on Amiga, did anybody actually measure if it really works properly?
Because for the trick to work, both channels should be 100% in sync. But then I read that if a channel isn't at 64 volume, there's 45 degree phase shift...
added on the 2019-06-17 12:51:42 by rutra80 rutra80
another analogy: fading leds with pwm.
added on the 2019-06-17 12:51:53 by jco jco
@jco or playing music on ZX Spectrum beeper or PC speaker.
added on the 2019-06-17 12:58:25 by rutra80 rutra80
PWM is much more than PCM with a different representation, though. Sure, you can definitely split your signal into 65536-length blocks, and then convert PCM directly to that. But nothing says you have to, and you'll get a better result if you just let your noise shaping run free of any such blocking.

kb: Assuming you were free of such pesky things as memory constraints (and memory speed constraints), could one in theory reprogram the Paula volume often enough to actually get a very high-bandwidth 1-bit signal?
added on the 2019-06-17 13:16:46 by Sesse Sesse
I have no idea if there are any further constraints in the hardware - never did much on Amiga and just basically guessed how it works to then have it verified by people with actual knowledge and an oscilloscope :)

But, if you just let the voice output 0xff (or 0x7f? totally forgot if it was signed or unsigned, sorry) you should be able to do your own PWM just by reprogrammign the volume register, yeah. No idea how fast you can actually do this to.
added on the 2019-06-17 13:24:04 by kb_ kb_
(I guess it it were feasible people would have done it by now - it's way less weird than how to play 8bit samples on the SID for example :) )
added on the 2019-06-17 13:25:36 by kb_ kb_
sesse, certainly, if your sample rate is high enough and especially if your desired output is an analog signal, you're not bound by "equal length" blocks, so dither all the way.

i doubt that the amiga can be abused for 1bit modulation though. but who knows what trickery is possible there
added on the 2019-06-17 15:21:04 by jco jco
How can your desired output be anything but an analog signal :-)

My assumption would be the same as kb's, though. If nothing else, you'd spend all of your CPU time just setting Paula bits, so you couldn't show any graphics.
added on the 2019-06-17 15:51:47 by Sesse Sesse
PWM is one big dither.
What DACs were paired with SACD players? Because at the end that PWM gets decoded to waveform describable by some sensible bit depth and sampling rate. SACD has roughly twice the CDDA bandwidth so you could either encode at CDDA frequency with 32bit depth (where you don't need dithering nor noise shaping), or you could keep 16bits at 88kHz (where you could dither with noise shaped to ultrasonic frequencies), or something in-between. So, giving PCM CDDA the same bandwidth as PWM SACD has, would bring it on par quality-wise.

As for Amiga, there's hardwired lowpass filter after Paula with 6dB/oct attenuation starting at 5kHz, so unless you desolder a couple of capacitors there's not much to hear over 14kHz, even if PWM trickery would be feasible.
added on the 2019-06-17 15:52:50 by rutra80 rutra80
sesse, if i'm pwming a led, output is still very digital, it just abuses persistence of vision. but that's wordplay ;)

rutra80, don't tell that to superstitious hifi esoterics ;)
do good mod players emulate that lowpass filter?
added on the 2019-06-17 16:29:25 by jco jco
https://lib.openmpt.org/libopenmpt/ seems to emulate it
added on the 2019-06-17 22:42:11 by rutra80 rutra80

login