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
I think it would be a very interesting and useful tool to be able to set semi-random points within the different instrument envelopes.
For example if in MMLish an arpeggio envelope was R R R | 0 4 7, it could generate three semi-random frequencies before it goes into a major chord. It would add a random element to the NSF and FTM that doesn't always translate to WAV renders; thus giving more re-listenability. It could be two bytes used for either volume, arpeggio, pitch(es), duty, or N163 wave macro.
There could also be a sequencer note variable "R-X" that inserts a semi-random note from the designated frequency table of that channel/generator.
It's not hard to make a pseudo-random number generator in an NSF but it's very hard to make something that won't play the same every time on an NSF emulator.
You need to get a seed to start the random number generator, and I can think of no way to do with a normal NSF. An NSF player clears RAM before beginning your NSF, so you can't use random startup bits in RAM. Some games seed their random number generator based on timing of user input, but an NSF has no input.
When I wanted to do something random, I made a multitrack NSF where the track number represented the seed.
Yeah this might be interesting, but there is no source of random numbers in NSF environments (as rainwarrior explained). The option would be to support it in NES files only.
Random variation can still be useful, even if it plays the same way every time, at least individual notes could have variety.
It's easier to do with something like ADSR envelopes though, e.g. random tweaks to attack time or strength within a specified range. With macros, though, I think it would be less useful.
If a volume macro could be relative instead of absolute you might have something like:
Giving a linear decay from a random volume between 10 and 15.
I can't really think of a way to do it that could produce useful attack/decay macros, though. Other than making pure noise / random arpeggios / etc. I can't think of anything in particular it would be good for.