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
It so happens that Axx is quite useful but doesn't mimic the way instruments that are allowed to vibrate freely in real life drop off sharply at first then have a long tail. In addition, if the volume of an instrument is changed, the Axx must be changed if it is desired that the length of the note played be constant.
I'd like an effect that simulates such an exponential drop in volume. It should either stop at 1 volume or at least sustain 1 for a long time, and in addition its drop in volume per frame should be roughly proportional to how high the volume is. Let's call our new effect Exx, ignoring for the moment that E is taken.
One could simulate Exx with instruments for different speeds of exponential dropoff, Axxs, setting the volume very frequently, etc - but the same could be said about Axx and many other effects in Famitracker.
An example algorithm might be:
Store the volume as the higher of two bytes (or highest of three bytes if necessary)
For every frame Exx is active for:
Multiply volume by 256-(xx), storing overflow in a third byte (e.g. 0x0F00 -> 0x0F0000)
Divide volume by 256
If the volume was 1 (0x0100 in this case, since the lower byte is precision) before this step and is 0 after, set it to 1
Higher of the two bytes is the new volume - lower byte is stored so there are no rounding errors from frame to frame
[quote=dawiki]Axy - volume slide, can be used on any channel except Triangle and DPCM. A0x = slide down, Ax0 = slide up. A larger value will result in a faster slide. A00 will stop the volume slide.[/quote]
This isn't entirely correct - here's what I've found out.
Axy - volume slide direction / speed = x-y. This is why A0F slides down so fast, it has a speed of -15. However AF0 slides up quickly as well with a speed of +15. Interestingly something like A54 will slide UP at the same rate as A10 because both are equal to "1."
They're not completely identical though, A05 for example has a speed of 5 and does not sustain. A16 will sustain at volume 1. Any nonzero value for x will cause it to sustain at 1. I thought originally that it was sustaining at x, which would honestly be cool/useful (or whichever number is the smaller of the two - if you have A4F for example it'd be cool if instead of just sliding down to volume 1 at a speed of 11, you'd slide down to volume 4 at a speed of 15 - it'd be much more useful if it was x=destination volume, y=speed).
I've attached a FTM file that demonstrates the sustain (and kind of does what Patashu was asking, dropping off sharply and having a long tail).
Neat find! I can see this becoming a useful technique, especially for time-critical situations like OHCs where you don't necessarily have time to mess around with instruments.
_______________________
Follow me on [url=https://twitter.com/jrlepage2a03]Twitter.
I record (some) NSFs on hardware. Feel free to [url=http://www.famitracker.com/forum/posts.php?id=3633]request a hardware render.
This could reduce the number of instruments you'd need to create when you only need a slight variation of one, speaking of which, similarly to the N163 waveforms, I could imagine having more than one Duty cycle and Arpeggio or even Volume sequences per instrument, and to change between them you'd simply use the corresponding effect, like so:
V01 - Calls Duty sequence 01, if it's not defined, it simply switches to 25%
007 - Calls Arpeggio sequence 07, if 07 is not defined, it starts a 0-0-7 arpeggio loop
E01 - Calls Volume sequence 01, if not defined, sets volume to 01
This could really help if you need different variations of an instrument, like you want to have the same volume envelope like before, but a different Duty cycle sequence, etc.
To avoid compatibility issues, you'd have the option of using "Single sequence mode" or "Mulitple sequences mode" similarly how you choose between Absolute, Relative and Fixed arps.
[quote=rainwarrior]Wow, I never even considered trying anything besides A0x. That's kinda interesting.[/quote]
Seconding this! I always figured Axy would act like A0(y-x). Never thought it would have a side effect like that.
[quote=rainwarrior][quote=Rushjet1]...it'd be much more useful if it was x=destination volume, y=speed).[/quote]
Now you're teasing me with something I'd use constantly.[/quote]
Normally I don't want to fade up to volume F, and it's not easy to stop Ax0 in the middle if you want it to end anywhere else. So, I only find A0x useful, because you can specify the starting point in the volume column.
Th Axx effect was only intended to be used with at least one digit as zero, so other ways should be considered undefined. I noticed that Rushjet1's example didn't export properly, but I can probably fix that anyway if it would be useful.
I'll also consider new volume effects. Adding a targeted slide would be very easy.
[quote=jsr]Th Axx effect was only intended to be used with at least one digit as zero, so other ways should be considered undefined. I noticed that Rushjet1's example didn't export properly, but I can probably fix that anyway if it would be useful.
I'll also consider new volume effects. Adding a targeted slide would be very easy.[/quote]