Wednesday, November 19, 2008

How to: Prepare Samples and Create LSDJ Kits

Thanks to herr_prof and Random for their corrections and additions.

Introduction

I am going to go through how to prepare samples for LSDJ kits and then import them and create LSDJ kits. I am going to use the following three pieces of software:
Bias PEAK (5.2)
Apple QuickTime Pro (7.55)
LSDJ Patcher (5)

I have had the best results with these three pieces of software, but of course there should be a number of options available to users on the major platforms.


1. Select
Select your samples wisely. Keep in mind that you only have just over two seconds worth of audio per kit, so whatever you put in has to count!


2. Crop and Filter
Crop your samples. This is very important, because every little bit of time that you can save on a sample is extra time you can have adding additional samples to your kit.

Now, in my opinion there are three places to look for space when choosing where to crop you samples. You may notice that before the initial attack portion of your sample, there may be small amount of silence or almost silence. You can delete this, of course. Not only will this give you more time, but your depending on the length that you delete from the start, your samples may sound more "in time" with the rest of LSDJ (because the sound will be starting on the beat).

The second place to crop a sound is silence or almost silence once the sound has finished. This is pretty obvious.

The third place that you may or may not be able to crop a sound, depending on the material, is by cutting off part of the tail of the sound. Think about why you have chosen this particular sound - you may be able to remove some of the end of the sound whilst keeping most of its sonic identity intact.

As an example, I am going to work with a particular sample from my creative commons Sega Mega Drive sample pack (md_0_001_oct4.wav is the file name of this sample). This sound is basically a rhythmic blip sort of sound, with a tail of a low frequency with a bit of noise added. Although the tail is harmonically related to the blip at the start, it is really jus the blip that I am interested in. I can keep its sonic identity intact (or at least the part that I want) and remove the tail as well.

To crop a sample in Peak, simply select the portion of the waveform you wish to remove and hit the delete key.

Below you can see a before and after shot of the waveform. My sample has gone from being more than 500 milliseconds in length to a mere 75 milliseconds, and it still has the important essence of what I wanted from it.



Finally, it may be a good idea to roll off some high frequencies (keeping in mind that with a sampling rate of 11.468 KHz we have an upper limit determined by a nyquist frequency of 5.734 KHz). This may reduce some of the hum that is heard when playing back samples in LSDJ.

Depending on your sample material you may want to also sharply roll off some low frequencies and / or use a DC offset remover. This will make normalisation more effective.


3. Add Fades
You may notice some clicking artifacts once you have cropped your sound. Depending on the extent of this clicking or popping, you may wish to fade the start or the end of your sample. Even a fade of 2 or 5 milliseconds may help you in many cases.

To add a fade using Peak, select the portion of the waveform you wish to fade in or out, and select the appropriate command from the DSP menu. Below you can see a screen shot of the waveform after a fade out has been added to the end.


4. Normalise, Add Gain, Dither
Normalisation maximises the amplitude of your waveform before clipping without changing the relative level of amplitude of one portion of the wave to another (ie. it does not compress the waveform).

Select Normalize... from the DSP menu in Peak. Leave the slider at 0.0 dB (this will maximise your waveform to the fullest extent). Hit OK.


Because sample playback tends to be quiet in comparison to the other LSDJ channels, it is also recommended that gain is added after the normalisation process. Although this will clip your sample, the compromise in sound quality should not be too bad considering it will be played back on a Game Boy. Somewhere in the range of 3dB to 6dB should be added.

In Peak, select Change Gain... from the DSP menu. Select an appropriate amount (between 3dB and 6dB). Hit OK. Save your samples to disk.

Below is a screen shot of the sample once it has been normalised and gain has been added. I have added 6dB of gain. Yes, it looks terrible but it doesn't sound too bad.



You may wish to also use dither (either in Peak or in the LSDJ Patcher program) as this may help reduce artifacts upon playback on a Game Boy.

5. Convert
Open up your samples in Apple QuickTime Movie Player.

Select Export... from the File menu in QT Player. Under the Export dropdown menu, select sound to wave. Click on the Options... button. Set the dialog box to the following settings:

Format: PCM; Channels: Mono; Rate: 11.468 KHz; Quality: Best; Sample Size: 8 bits.


Hit OK. Select a path to save your sample to. Give your sample a three character name, because this is the name that will appear in LDJ when you actually go to use your kit. I have called my sample MD1.


7. Add and Save
Open up the LSDJ Patcher v5. Click on the Open ROM button, and navigate to your current version of LSDJ. Use the drop down menu towards the top to select the kit slot that you want to create your new kit in. You can either write over an existing kit or if you have any slots free, you can use these and create a kit there.

Click the create new kit button. Click the add sample button and navigate to your first lsdj sample.

Your sample will be added to the list of fifteen sample slots in your kit. You will also see that your sample takes up a portion of the 3FA0 bytes that are free per kit - this number is shown below the list of fifteen sample slots. In the screen shot above, my one sample takes 1C0 bytes.

Add more samples until the 3FA0space is almost full - you may see that the figure 3FA0 turn red, this means that you have loaded too many samples in a kit.

You can also delete samples from your kit by pressing drop sample.

Once your kit is ready, press the compile kit button. You can then also rename your kit. Once you have renamed your kit, you may need to click the compile button again.

Finally, you can export your kit as a single .kit file to share with other people, or you can export your modified LSDJ ROM. Click the save kit button to export your kit. Click the save rom image to export your custom LSDJ ROM.

Now it is simply a matter of tranfering your newly created custom LSDJ ROM to your LSDJ cart or running in your favourite Game Boy emulator.

16 comments:

Anonymous said...

Nice tutorial! Another thing that isn't mentioned here, which I think is really handy to do (since it gives the samples much better playback from LSDJ) is to filter the samples. Remove all unnecessary frequencies with a hard low-pass and high-pass filter. Be brutal, you may even cut into the fundamental frequency of the sample with the low-pass, and take away a lot of harmonics with the hi-pass; they won't be heard anyway, and it just takes up energy in the frequency band, and thus makes the sample sound quieter when being played back from the Game Boy.

synthtopia said...

Very nice tutorial.

This, along with your YouTube videos, may convince others to try making LSDJ sound libraries.

I put up link to this at Synthtopia - hope it helps get the word out on what you are doing!

Sebastian Tomczak said...

Thanks as always.

Spreading the word for this kind of stuff is good, because its a question that comes up every now and then.

Thanks again!

Seb

Peter Swimm said...

something Ive never tried, but guess should work is to apply some dither effect before doing the downsample effect. I would this there would be slightly less artifacts than simply brick wall limiting the conversion to a certain frequency...

Thoughts?

Peter Swimm said...

duh I forgot there is dither in the app.. still might be better to try it first in the external editor?

Sebastian Tomczak said...

herrprof: i've mentioned dithering now, but not in detail because I haven't tried it (with lsdj stuff).

Thanks for your input!

Anonymous said...

Very nice tutorial indeed. Thanks for the stuff.

Anonymous said...

great tutorial! thanks so much, i can now become a legend.

Anonymous said...

why using quiktime for the final conversion intead of peak ?

ray ban 3025 said...

This tutorial has change my life! kudos

Anonymous said...

if its not too much trouble, could you go into a little more detail about rolling off higher frequencies on the sample? i understand hi and lo pass filters, but am stumped about what cutoff i should use for removing the high frequencies. i'm unaware of what a nyquist frequency is and how or why it determines anything involved. specifically my sample when imported has alot of hum and noise, but i'm not sure if its because i have too much high or low frequency what might be wrong. if it gives you a better idea of the nature of the sample, i'm sampling the Ab Eb Bb and C string swells in the opening of 1812 overture.

Anonymous said...

Interesting article as for me. I'd like to read more concerning this topic. The only thing I would like to see on that blog is a few photos of any devices.
Katherine Flouee
Phone jammer

laloutre said...

Cool tuto !

I'm posting here cause i'm having a problem :
I've a 2seconds sample at 11468 16Bits, but once in LSDJ the sound isn't audible, it's just noise....
I tried to filter it in many ways, but it doesn't change anything...
Does anyone have the same ?
Thx

laloutre said...

Cool tuto !

I'm posting here cause i'm having a problem :
I've a 2seconds sample at 11468 16Bits, but once in LSDJ the sound isn't audible, it's just noise....
I tried to filter it in many ways, but it doesn't change anything...
Does anyone have the same ?
Thx

HID Kits said...
This comment has been removed by a blog administrator.
Anonymous said...

Tha!!!