request: chiptune tutorial

Write guides and how-tos about LMMS for other members.
Hi

As you can read here I try to make a NES chiptune. (and later freeboy and SID).

https://lmms.io/forum/viewtopic.php?t=35767

It's difficult for 2 reasons:

1. There seems to be no documentation for nescaline, freeboy and SID which makes it very difficult for beginners.
What are the buttons doing, what channel represents a specific channel on the NES, ...
(See https://lmms.io/forum/viewtopic.php?t=35767 )

https://docs.lmms.io/user-manual/5-buil ... .3-freeboy

https://docs.lmms.io/user-manual/5-buil ... -nescaline

https://docs.lmms.io/user-manual/5-buil ... s/5.15-sid

2. What number of channels did the original hardware have and how are they mapped to the instrument channels?
Without documentation, I can't figure it out.

Is there somebody interested in writing chiptune tutorials for nescaline, freeboy and SID with specific focus on the different channels and a summary of what each button of the instrument is doing exactly? Maybe with example (small) songs for LMMS that we can download.

I also want to ask the LMMS documentation team for writing documentation for nesclaine, freebody and SID with similar content as above.

Thanks
Hi

For people interested, I found a great nescaline tutorial including example files!

https://github.com/tutoblender/lmms_nes

I'm still looking for freeboy and SID tutorials.
Hey there!
I'll see if I can write a few details on how the NES, Gameboy, and SID plugins work. I don't know much about them, and it looks like a useful learning opportunity. I'll need to refer to the plugin a lot, and the forums and github for information even more. Hmm...
No promises, but I'll try. I'll also keep an eye out for tutes on the Freeboy and SID emulator plugin.
Alright.
The Freeboy.
The original Gameboy had four channels. Channel 1 and 2 are square/pulse channels.
Channel 3 is a wave channel.
Channel 4 was the noise channel.
The freeboy lets you choose a stereo option: Hard left, hard right, or centre, per channel.
The freeboy lets you control, master, left volume and right volume, treble volume and bass volume. This acts like a high-shelf and low-shelf. It's pretty simple.

Channel 1.
Is a square channel.
The sweep direction arrow (SwDir) controls whether pitch sweeps upwards or downwards. The VSwDir, volume sweep direction arrow, controls direction of volume sweep: Upward means the note sound doesn't stop on its own (unless SwDir is also up, in which case it stops beyond a point), whereas downward means the note starts high and fades out.

Has volume control, and a knob for "length in each step in shift" (SSL). It essentially controls the length of each note as the pitch sweeps downwards. Other than 0, the lower you go, the more staccato it sounds. If you're sweeping downward. If sweeping upward there seems to be very little difference. Someone needs to verify this. I can't hear this one clearly, and my ears have been acting up these past few weeks.

A square wave may have a wave shape like this.
Freeboy2- Rectangular wave.png
Freeboy2- Rectangular wave.png (51.03 KiB) Viewed 6990 times
The ratio of the length of max to the total wavelength is called wave duty cycle. It here is called wave pattern duty (WPD).
A perfect square wave has 50% as the max and min occupy equal amounts. (Presumably this is what "2" means, as in 1:2. Other way around? Can't tell.) Sorry. (It is possible this is in n:4, where n is whatever the value is. This is why 1 and 3 sound the same, as they are phase inverted. This certainly makes more sense. 2 would be 2:4. 1 would be 1:4.)

Sweep RtShift amount (SRS) seems to control number of pitch steps before reaching and staying at baseline frequency. 0 means it stays at the same pitch. Upon sweeping upward, it controls number of pitch steps, but upward pitch steps appear to be lesser in number. While, when sweeping pitch downward, it'll continue forever (I didn't hold more than a minute, but probably continues forever) or fade out (based on direction of volume sweep), in upward pitch sweep, it ends abruptly.

Sweep time is the amount of time taken to complete the (pitch) sweep (ie, all the pitch steps) and end up at last pitch step. If at 0 there are no pitch steps taken.

Channel 2.
Is a square channel.
Has volume control.
Here, the sweeps are volume sweeps, whereas in channel one they are pitch sweeps.
The SSL volume controls the length of each step in volume shift. Again, I can't hear a difference in upward mode. However, setting this to 0 means the note never fades out or stops unless the key is released.
WPD means the same thing as above. It modifies the oscillator wave only, it does not impart an LFO.

Channel 3.
Is the wave channel.
Has volume control.
Located below Channel 2 and Channel four visually.
You can draw the wave in.
Freeboy1- Wave.png
Freeboy1- Wave.png (134.48 KiB) Viewed 6990 times
It's pretty simple.

Channel 4.
Is the noise channel. It is located visually on the left of Channel 2 and above channel 3.]
Has volume control.
SSL seems to work the same as it does on Channel 2: Control volume. 0> never fade out. On downward, the lower the value the faster the fadeout.
I have no idea what Shift Register Width (SRW) does. It seems 7 gives a more regular-sounding noise, 15 gives a more irregular noise.

Now, in the original gameboy, all these four channels were capable of playing at once, but each channel could only produce one sound at a time.
This means you have four Freeboy instruments on your Song Editor. One is on Channel 1. One is on Channel 2. One is on Channel 3. The other is on Channel 4. Each channel can only play one note at a time. Notes may not overlap.

That's as much as is probably true.


If one can modify the parameters partway through (see bold point of Disclaimer for explanation of conditional):
You can use several if you WANT, but if you want to stay true to the original you must use only one Channel-1 instrument at a time, only one channel-2 instrument at a time, etc. It can be messy, as such, to have several channels enabled on one instrument.
If you do not use several instrument tracks for each channel but just one per, and want to modify the sound part of the way through, you may have to use automation on the knobs. However, you must take care to treat each channel as monophonic and ensure a channel is playing only a single sound at a time.
If you are using one instrument track with several channels, be very careful.
Disclaimer:
I need someone to verify the following information for me since I cannot find it myself:
I do not know what SSL does on Channel 2 and 4 with VSwDir set upwards. I do not know what SRW on the noise channel does. I do not know whether Channel 3's wave channel was possible to modify partyway through the track on an actual Gameboy. I do not actually know if it is possible to modify any of the parameters partway through a track on the actual Gameboy.

Moreover, some of this information may be wrong and/or incomplete. I am trying to describe it as I hear it, a dangerously unreliable method for someone with ear issues.

Any suggestions, improvements, and corrections will be appreciated. Thanks!

This was nasty winding. At least I know how the gameboy works now? Thank you for posting this, OP. I've had some vague interest in finding the basics of the freeboy plugin and using it like authentic at some point, and you've gotten me to do this thing. Wow. How cool is that? [strikethrough]Now, to convince myself to write a tutorial on the NEScaline and figure it out. [; [/strikethrough]
musikbear, by the way, if you know anything more you can add about the gameboy/freeboy, or can help with some of the Disclaimer verification above, since you know more, I'd be very grateful. Thanks!
blender.girl wrote:
Wed Oct 05, 2022 9:54 pm
Hi

For people interested, I found a great nescaline tutorial including example files!

https://github.com/tutoblender/lmms_nes

I'm still looking for freeboy and SID tutorials.
Thanks a lot! Very helpful.
Monospace wrote:
Sun Oct 16, 2022 9:14 am
Alright.
The Freeboy.
Excellent information!! 👍
musikbear, by the way, if you know anything more you can add about the gameboy/freeboy, or can help with some of the Disclaimer verification above, since you know more, I'd be very grateful. Thanks!
I went grave-digger in old files some week ago, because i know i had written something about nescaline, where i actually was impressed by the features. I cant find it :/
I fear i wrote directly in wiki, and that it diddent make it into the eBook
The historic-backlink you found Monospace, does not have it.
Argh. That's sad. I'm scouring the archives, but I'm afraid it was never archived- at least, not anything you wrote into the NES book. So many things are lost! I can't even find the page on the SID. All gone.
The page on Freeboy is here, though. (I think you might have written this too? Not sure though.)
https://web.archive.org/web/20210412071 ... le=FreeBoy
It's a bit more simply put than mine. I must raise an eyebrow at the WPD explanation, though. I guess a triangle wave could be a square wave with a different WPD...? But isn't the difference actually in the harmonic strength?
I don't know enough to confirm this one.
Monospace wrote:
Mon Oct 24, 2022 2:51 am
Argh. That's sad.
It is. There is a linked Torrent where everything from the old wiki should be contained, but that fails for me.
I think its something with torrent-client or other bahHaaaa tech yabbie expectations... idk........

I must raise an eyebrow at the WPD explanation, though. I guess a triangle wave could be a square wave with a different WPD...? But isn't the difference actually in the harmonic strength?
I don't know enough to confirm this one.
A real sound engineer is needed for this it think. I believe i found a tech-page on the orr. Nintendo chip, and i then wrote it as i understood it, i may have been wrong, but i saw is as a transition from one wave-form into another, where bort steepness and duration was user controlled.
I ought to do more chip-stuff : P



Ya the freeboy text is mine, maybe if i have restraint my self from adding jokes, it would have been added..
Hi

I don't understand what's going on.

- what information is 'lost' and why is it lost?

- why does nobody knows 100% how it works.
Aren't you the developers?
blender.girl wrote:
Fri Nov 04, 2022 12:57 am
- what information is 'lost' and why is it lost?

- why does nobody knows 100% how it works.
Aren't you the developers?
The "information" lost here is an old tutorial musikBear had written about the chiptune generators. Because sometimes, even if the tute was good but style was funny, it was considered easier to delete it. Very few things were carried, most were entirely rewritten. I should like to contribute to the gitbook, but that isn't likely to happen soon.
The plugins, and even the original hardware they were meant to emulate, were developed ages ago. I wouldn't be surprised if even the original creator of the plugins doesn't know anymore the internal workings of the plugin.

musikBear has dipped his feet into the codebase before and tried working with some of the logic, though he hasn't done anything related to plugins. As far as I can tell, he's made PRs 3-4 times, mostly dealing with unwanted features and/or piano roll code. All of these PRs, as far as I'm aware, haven't been merged. He hasn't quite developed something yet in the sense his contributions are a part of LMMS, but he is a valuable contributor and part of the LMMS working. I like to consider him wise. He knows a lot of things, but he'll know his limits too.

I am not a developer. I'm just a normal user like you (: I really care about LMMS, that's all. I hope to actually develop for LMMS one day, but that is not today.
However, you may take my post as a useful reference since I have referred to the plugin itself and done as specifically accurate and precise a job as I could. The only doubts I have are about the limitations of the actual gameboy, along with other things I've mentioned, for which I have then tried to refer to the internet the best I could. It would be most ideal if you cross-checked those unsureties yourself, though, and get back to us if you find differing information.

PS. I'm not entirely sure why the request for tutorial has been closed. We don't have a SID tute yet... but will anyone ever write it? [: