Compare all server options against default values

This is here for anyone who may find it useful in any way.

This will post all default values for instance variables defined in class ServerOptions, and then compare those values against one’s current configuration.

It’s retracted from a project & slightly modified for the threads… it should definently & deserves to be run at least once, if you’ve never witnessed the full list of options for the server.

((
	(
		default
		
		(
			Server.default_
			
			(
				Server.local
			)
		)
		
		.options_
		
		(
			options
			
			(
				s
			)
			
			// ServerOptions ( )
			
			.maxSynthDefs_
			
			(
				2 ** 12
			)
		)
		
		.options
	)
	
	.addUniqueMethod  
	
	(
		\display ,
		
		{	
			defaultValues
			
			(
				ServerOptions
			)
			
			.asSortedArray
			
			.flatten
			
			.pairsDo
			
			{
				|option default| var unique;
				
				if(
					default == value
					(
						unique = perform
						(
							s.options, option
						)
					)
				){
					postln
					(
						option -> default
					)
				}{
					Post <<
					(
						option -> default
					)
					<< "\t" << "*" << "\t" <<
					(
						option -> unique
					)
					<<
					(
						$\n
					)
				}
			}
		}
	)
))

; 

s.options.display.size

Here’s the output:

changed default server to: localhost
(bindAddress -> 127.0.0.1)
(blockSize -> 64)
(initialNodeID -> 1000)
(loadDefs -> true)
(maxLogins -> 1)
(maxNodes -> 1024)
(maxSynthDefs -> 1024)	*	(maxSynthDefs -> 4096.0)
(memSize -> 8192)
(memoryLocking -> false)
(numAudioBusChannels -> 1024)
(numBuffers -> 1024)
(numControlBusChannels -> 16384)
(numInputBusChannels -> 2)
(numOutputBusChannels -> 2)
(numPrivateAudioBusChannels -> 1020)
(numRGens -> 64)
(numWireBufs -> 64)
(pingsBeforeConsideredDead -> 5)
(protocol -> udp)
(recChannels -> 2)
(recHeaderFormat -> aiff)
(recSampleFormat -> float)
(remoteControlVolume -> false)
(reservedNumAudioBusChannels -> 0)
(reservedNumBuffers -> 0)
(reservedNumControlBusChannels -> 0)
(safetyClipThreshold -> 1.26)
(useSystemClock -> true)
(verbosity -> 0)
(zeroConf -> false)
-> 60
1 Like