It is currently Fri Nov 24, 2017 11:46 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Pseudorandom NSF?
PostPosted: Fri May 09, 2014 7:35 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6454
Location: UK (temporarily)
Is there any source of entropy available to an NSF? If I, say, wanted to make an NSF that would play a random different tune each time, or a bunch of fragments that would be played in a random order...


Top
 Profile  
 
 Post subject: Re: Pseudorandom NSF?
PostPosted: Fri May 09, 2014 7:46 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19256
Location: NE Indiana, USA (NTSC)
NSF isn't supposed to have entropy apart from the track number (1-255). If you're making an NES ROM, on the other hand, there are ways to read entropy out of analog effects in the PPU: see Pretendo.


Top
 Profile  
 
 Post subject: Re: Pseudorandom NSF?
PostPosted: Fri May 09, 2014 9:27 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5838
Location: Canada
NSF is very deterministic by design. As tepples says, the track number is really the only source of entropy available that adheres to the NSF specifications.

There may be non-deterministic elements available to any specific implementation of a player, especially hardware players, but to take advantage you would be building the NSF specifically for that one player. It would be very difficult to make an NSF that doesn't play the same each time on most emulators, but I expect it would be marginally possible on some. Any such effects are out-of-spec for an NSF, at any rate. Everything that isn't explicitly deterministic is forbidden, more or less. (State of the stack, the Y register at entry to init, A/X/Y at entry to play, use of PPU, reading the controller, use of IRQs, etc. may do different things on different implementations, so they are forbidden to be relied upon by an NSF.)

When I wrote my cover of Giant Steps, I put a random variation into the drum patterns to give them a little more life. The NSF version plays them the same every time, but the NES version increments the seed while waiting on the title screen.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: MrNorbert1994 and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group