Chiptune Questions

Hi

I just started messing a bit with writing chiptunes, and have a few questions:

  1. If I draw a waveform in a blank sample, renoise defaults to a sample length of 168 at 44100. This seems to relate to just about a C, although the resulting sample seems a little sharp. Is that the intention, to give me C by default? I could (and probably will) tune such a sample with a known C, but does anyone know what finetune I need to apply to get an sample that’s in tune?

  2. True chiptunes could/should be in what, 8bit/22050, or? This would mean loosing any frequency above 11025, however. What do people do in this regard? One solution could be to apply LofiMat 2 on the masterbus, but mix in some/all of the dry signal. Or do you have all samples in 8bit/22050 internally?

  3. True chiptunes should probably stay away from DSP effects, but I would like to broaden the sound and experiment with make something more “modern”, mostly to have it blend better with the sound of my regular output. Any thoughts on this. Especially, anything I should try with vocals. Yeah, I know, chiptunes should really be instrumental, but I have a habit of adding vocals to most of my stuff.

  4. Being new to this whole approach, I find myself quickly running out of tricks with tracker effects (tried 02xx with bass drum, and 0Fxx for FM-like vibrato). Is there anywhere I can read about more such tricks. Also where can I find (lots of) chiptunes in xrns format to steal from?

If you want to generate a bass- and snaredrum with self generated sounds, on the Commodore 64, two or three different wave type were used to create a basic shape. For the bassdrum it was noise and sine (in that order) and for the snare sine-noise-sine. (other combinations are possible as well).
Then to get this bass-drum his decent boom effect, in Renoise you can use the pitch envelop and make it start real high and let it end on a very low frequency in a very short time.
There’s lots of nice tricks you can use without actually really having to use the pattern effects.

Sure, that’s like the 808 does it, have been doing that elsewhere, some time back also.

Yeah, I guess so, but 02xx works similar…

I guess you’re right. But part of the interrest for me is also to seek new (or should I say “old”) ways of doing things.

Would still be interested in looking into good modules and/or xrns.

I know you can do a lot with the pattern effects, but coming from the C64 world, i never have liked the solutions that trackers offered. Impulse Tracker was one of the first trackers that had envelopes in which i could really make a “decent” chiptune and not that bleep bleep crap most seemed to generate in a tracker. Lots of folks never really understood how a good arpeggio can be made very vivid and abused the arpeggio command to generate an arpeggio with all sorts of ugly results.
The only way for me to create a decent chiptune in a tracker that only had pattern effect commands was by simply sampling C64 sounds. I could also create a nice arpeggio without having to sample it, but i had to use two or more instruments to get this arpeggio sounding as vivid as desired.

Made my last one in Impulse tracker:
http://modarchive.org/index.php?request=vi…mp;query=156167
You have to really play this one in Schism tracker to get the idea of the meaning… Renoise does a real lousy job on converting this one. (Ignores the pitch enevelopes). But you can do pretty much the same in Renoise.

It was for a contest with a large sample pack, i took out one sample and split different wave-forms out and then joined them together in an external sample editor to create the chip-samples. The last part i did with another contest :P. this song really just only uses one sample.

It can sound rather good if you control a VST instrument’s pitchbend with a very rapid custom-shaped oscillator (emulating the arpeggio effect with a point envelope).

With some vst plugins this may work out… i have not so many plugins where this works full scale or works at all.
But you can create lots of nice effects with the PB option controlled by the LFO.

I’m running linux, and hardly use vst’s…

To find the required length of the sample, we simply calculate: sampling rate divided by frequency = length of sample needed to contain one full loop cycle.

For a variety of reasons, A440Hz is generally considered to be the standard tuning. This makes things a little bit weird for us in the digital realm, because 440 will not divide neatly into any of the common sampling rates we can use.

For example:

32000 / 440 = 72.727272727272727272727272727273
44100 / 440 = 100.22727272727272727272727272727
48000 / 440 = 109.09090909090909090909090909091
etc.

However, if we bend the rules just a little bit and imagine that the standard tuning is actually 441Hz, then something cool happens:

44100 / 441 = 100

100 neat, tidy, perfect little digital samples!

So, with all that in mind…

Now you have a perfect instrument - no fine-tuning required!

I was going to write a bit more, but I got up for a snack and totally lost my train of thought. Ah well, it wasn’t so important.

Cool and easy trick, dblue!

Hmmm. That seems logical, but I was referring to the renoise default choice of 168 samples. I know about A being 440hz, however middle C is not that simple:

http://www.phy.mtu.edu/~suits/notefreqs.html
http://hypertextbook.com/facts/2003/DanielleDaly.shtml

The first one suggests middle C is 261.63hz, while the second page has several “choices” :frowning: Anyhow it seems that the renoise default of 168 samples relates to 262.5hz, which is “some kind of” middle-C:

atte@vestbjerg:~$ python
Python 2.6.4 (r264:75706, Nov 2 2009, 14:38:03)
[GCC 4.4.1] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.

44100 / 261.63
168.55865153078776

44100 / 168.
262.5

But still, I’d like the devs why 168 samples were chosen, was it indeed to correspond to a sample by default being tuned to middle C, and is there a need to tune it further to get a real middle C? I’m still gonna tune with an actual middle C sample, but still thought it would be nice to hear it from the devs…

The page I referenced on Wikipedia also agrees: http://en.wikipedia.org/wiki/Piano_key_frequencies
C4 = 261.626Hz (slight difference in decimal places, rounding, blah blah blah)

A pretty badly out of tune C, but yes, more or less within the acceptable range. Regarding the 168 sample length, as you’ve just clearly demonstrated: 44100 / 261.63Hz = 168.55865153078776
But it’s not possible to have a sample with a fractional length, so that value must be rounded up or down to the nearest whole integer. It appears Renoise is simply rounding down to 168, but for what it’s worth, rounding up to 169 would be no better (I tried).

Maybe there wasn’t really a big decision process behind it, and taktik just quickly added the feature with a default value that seemed quite sensible, and he simply thought of middle C as a good choice. Personally, I would have made it A440, as I feel it’s just a better system to base things on. I end up changing the sample length every time I use this feature anyway, to match whatever music I’m making at the time, so in its current form its not really affecting me badly.

If you want a pretty damn good match that should work for most situations, you can take my 441Hz 100-sample sine from above, set the base note to A-3, then finetune it to -7. That’s about as good as you’ll get with the basic fine tune controls, without messing around endlessly with a variety of different lengths, seeing if you can just get it (which I did… and failed).

If you want to perfectly match the middle C 261.626Hz… then it requires a bit of work. To test things out, I generated a 60 seconds 261.626Hz 44.1Khz tone in SoundForge and brought it into Renoise. Then I took my 441Hz 44.1Khz 100-sample sine from earlier and tried to match them. I played both tones together, but inverted the phase of one of them, so that they would hopefully cancel each other out and result in silence — a good sign that they’re perfectly in tune.

Well, even the most ridiculously tiny difference caused my sine to quickly drift out of phase and become useless. I did finally get them to sync up, but it was a pain in the ass, and it required a looooot of trial and error, haha.

Here’s the .XRNS I came up with:
http://illformed.org/dump/music/dblue_middle_c_tuning.zip

You’ll notice that my sine has a pretty weird looping pitch envelope on it. I couldn’t quite manage to make it sit perfectly still by using only one value… instead, it seemed like I had to make a loop there, to swing the pitch back and forth by a tiny amount in each direction, and that somehow stablises it.

Resampling is weird stuff.

The first pattern is just some quick goofy stuff to prove that each instrument is doing what it’s meant to.

The second pattern is the phase cancellation test. If all goes well, it should remain totally silent. There IS noise being generated, but it’s pretty much inaudible, so I’ve also placed a Distortion2 on the Master track. If you toggle that on and off, it will make the noise audible (in a quiet and sensible way). I have to assume this noise is interpolation artifacts, rounding errors, weird random leftovers from functions within functions, etc?

The third pattern demonstrates what happens when one of the instruments is off in its tuning by just a few cents.

Overall, I’ll take an educated guess and say that what I’ve made here probably isn’t totally perfect and in sync, as there was definitely a lot of random trial and error in getting it to work. It may just be drifting/phasing at an incredibly slow and unnoticeable rate, but could appear after listening to it for several minutes, I’m not sure. (And too tired to test that theory right now)

So anyway… that’s my weird little night of Renoise experimentation. I hope this demo has showed… something?… to anyone who is looking… I really love exploring these weird, subtle things in the world of audio :D

Closing thoughts…

  • 261.626Hz is a strange, strange frequency.
  • Computers do not like fractions! No sir, they don’t!
  • Something very weird happens late at night, when you’re sitting in the dark, painstakingly tuning sinewaves down to three decimal places, while the sound of aliasing and interpolation errors fizzles gently in the background… I felt more in tune, like Renoise was trying to communicate with me somehow.
  • Computers love integers! Whole numbers make computer happy. Happy computer means happy Renoise!

.
Final sanity check

  • Be smart.
  • Use A=440Hz as your base note, then let the software figure out the rest.
  • It’s a standard for a very good reason!

dblue, Professor at the University of Renoise. :D

If you like NES stuff, you can buy this (NES samples). It is not expensive, personnaly, I like it. (96Khz, 24 bit !!)
I did this remix some time ago. I can send you the Xrns if you want.

Don’t forget that you can also shorten the length of a sample. After much experimenting with the draw tool I decided to suit the length to my ability to edit the sample easily.

In this tune (http://www.sdcompo.com/results.php?dl=434) I made the sample size for my pulse waves 16, since it is possible to make a perfect square wave from a sample length of only 2, but allows for tweaking in a way that feels much like working drawbars on an organ although it does not have the same effect.

The more complex waveforms were done at the default sample length, hand-drawn and then “fixed” with the “sample smooth” option run many, many times until the result was correct. The results sound in tune to each other, though I admit I never attempted to tune it to other instruments. There’s nothing wrong with finetuning all your samples down a few cents if you’re going to play along with other instruments.

As for effects, like in any music it is possible to choose as many or as few as you want, depending on what you think chiptune ought to sound like. If you prefer the sound of pure waveforms with little effect, then by all means use no effects at all, but I’ve seen groups plug modified NES into guitar effects for a heavy metal sound. Why limit yourself?

There’s nothing wrong with using VST as your sound source as well, as long as that is available to you.

some sites to check out…

http://www.bannister.org/software/index.htm
“Emulators: Note that the current releases of these projects all require Mac OS X 10.4 or later. Older releases are available from the archive but are strictly unsupported.”

http://www.littlesounddj.com/lsd/
“Purchase the full version ROM here! ($2) - If you like the program, larger donations are really appreciated.”

http://lsdjsav.cookiethievery.com/
“This website turns your Little Sound DJ .sav files into pretty little text, for saving/printing/whatnot.”

http://www.youtube.com/user/littlescale
http://little-scale.blogspot.com/2008/11/h…reate-lsdj.html
“How to: Prepare Samples and Create LSDJ Kits”

http://www.nanoloop.de/

http://www.rhinoplex.org/8cylinder/

Thanks, some good stuff to look into!