Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /storage/content/49/145849/famitracker.com/public_html/forum/classes/dbHandler.php on line 29
This is thread for my noob (often stupid) questions about Famitracker usage. Made it because I don't want to make 1 billion of threads for every single issue (and believe me, 1 billion is here [i]lowest[/i] estimate) I have with it.
First, I wanted in my first module to make cool volume fading back & forth on triangle channel so it'll have nice background for real song that will be played on Square channels + noise for drums (if any). But I failed greatly. Not is being played, but no volume fading whatsoever or at least I don't hear any.
This is my notes for tri channel (actual note may change if it won't sound right when put whith rest of song):
[url=http://i.imgur.com/fs5rp.png]http://i.imgur.com/fs5rp.png
//edit: Seriously though, this board lacks IMG tag.
Second thing - is there a way to set instrument to produce single one-row beeps without "sustaining"? I mean automatic way, so I won't have to use note cut/note off after each note for bass, because with much notes it can be a chore.
Answer to your first question, from the wiki, emphasis mine:
[quote=Wiki]Triangle
Triangle-shaped waveform, used mostly for bass and drums. [b]There is no volume control for this channel[/b], however; it's either on at full blast, or completely silent. Due to how the hardware is implemented, the output level of the DPCM channel will affect the volume output of the triangle wave.[/quote]
To answer your second question, use the volume envelope for an instrument. You can define a predetermined length that the note will sustain just by drawing/typing in an arbitrary amount of values, or you can cause a decay envelope to trigger by typing in "/" and typing values in after that. When you trigger a "Note Release" it appears like "=" not "-" in the tracker, it will begin the decay envelope.
EDIT: Typo, I accidentally typed delay instead of decay.
Strange, because I've played NES games (on the emulator though) that I'm sure used only 2A03 (those were US rom dumps) and have fading in and out triangle sounds. Maybe this is only FT limitation, not NES itself?
Also for second question, you didn't really answered it, because I already know that it can be done using Note Cut/Note off and envelope (id you want it to fade out), but I meant automated way, so I don't have to put also note cut/off since it is a chore in case of writing module with many bass-related stuff going on. But if FT doesn't support it, then it's OK.
//edit: I've looked through my NES library and I believe Kirby's Adventure is one of said games - This was an US rom so it only had 2a03 code, yet when Kirby enters door at end of stage, sound of entering which is clearly triangle wave slightly fades out. Had to hear it few times to be sure though.
The DAC counter is 7-bit, so it goes all the way up to 127 ($7F). Be careful when using it: if you jump from one value to another distant one, you will hear loud pops.
[url=http://dl.dropbox.com/u/34026765/entry17.ftm]This entry from the Demo Compo uses Zxx slides for triangle volume control. Have a look at it and see if you can figure it out!
This OpenOffice spreadsheet generates fade-in/fade-out DPCM samples with any specified time. (too lazy to make one for Microsoft because it sucks) (also there is no precise volume control so if you want that instead search for Necrophageon's 5-stage delta counter control thingy. no volume fades there though)
F12 determines how fast the DPCM sample fades by bits, so that the delta counter changes by 2 every F12 bits in the sample;
Z12 is the number of delta counter changes in a second when the fade sample is played at pitch F;
AG16:AG31 lists all frequencies from pitch F to pitch 0;
AT12 is the corresponding MIDI note given the frequency from Z12 in hertz if you really need it;
AU16:AU31 lists the time taken for the fade sample in all pitches to slide the delta counter from 0x00 to 0x7F or vice versa, in seconds. A 1.2 really means that the sample in the corresponding pitch will fade the triangle channel from maximum volume to minimum volume in 1.2 seconds, if it is a fade-out sample;
D17 is the direction parameter. If it is 1, the sample fades out, and if it is 0, the sample fades in.
The actual hex string is stored at Row 10. Copy a string from the left and paste it into any hex editor as hex values, while making sure the sample has a proper size of (16k+1) bytes. Markers at Row 11 and Row 14 are only visual aids.
triangle_demo.ftm demonstrates the use of these fade samples. Sample fade_o_46.dmc is created according to the OpenOffice spreadsheet's initial settings. Pay attention to how looped fade samples at rate 1 are preferred over Zxx commands, as shown in fade_i_01.dmc that comes with the demo. If you solo the DPCM channel, you can actually slightly hear some sawtooth-like noises; they [i]should[/i] blend well into other channels that you can hardly notice them when all channels are unmuted. (The song is actually from a Mega Man fangame which uses an XM file to store all music and SFX's. HOH)
Hopefully someone is making a stand-alone program to directly generate these DPCM samples since I have zero knowledge whatsoever when it comes to programming AAaaAAaAaAaAaAAaAaAa *rant*
It's actually good that you've made ODS, because I'm on Linux! Thanks, I'll use it.
Now another dumb question: Does NES' 2A03 support stereo output? I know there are virtually no games that uses stereo, but is it [i]technically[/i] possible?