didgmo 0.3.2
rank_lua_fft
modules
Collaboration diagram for rank_lua_fft:
Parameters:
pathpath to lua description file
Returns:
the actual ranking

This module can be used with all the scan_* modules. The rank function here is written in Lua and provided to this module by the file name of the Lua script. In the Lua script, there is a function rank, which takes as argument the fft spectrum of a given didg geometry as a table and returns just one number, the rank. Command line arguments can be given to the Lua script, they are accessible by the table 'arg' in the script.

Example invocation on the cli:

 didgmo scan_evolution [scan_options] rank_lua_fft {my_script.lua} [rank_options]
 

Example Lua script:

 -- The options given to the cli as the 'rank_options' are accessible in the table 'arg'
 -- Here we read two command line arguments
 -- The example invocation on the cli: didgmo scan_evolution [scan_options] rank_lua_fft my_script.lua 11 22

 argument1 = arg[1] -- 11
 argument2 = arg[2] -- 22

 function rank (fft)
   local rank

   -- do your ranking here based on the provided command line arguments and the provided fft spectrum
   -- and finally return the rank of this fft spectrum.
   -- the higher the rank value, the better the geometry reflects your desired sound characteristica.
   -- avoid giving  binary ranks, e.g. good (1) and bad (0) based on conditionals, use real numbers instead

   return rank
 end