I had a couple of ideas for patgen mode... Things that could automate adding a little variation to the generated patterns.
...1 - add a probability item to the menu for each voice. Default 100%. If this item is set lower than 100, then each step generated would have a step probability randomly generated, between the set value and 100%. Eg: if the Patgen probability value was set to 75%, then each generated step for that voice would have a different step ptobability, randomly generated, minimum 75% max 100%.
...2. - add a velocity range item to the menu for each voice. Default 127. If set lower, each generated step will have a Randomly generated velocity somewhere between the set value and 127.
...3 - add a 'skew' item to the menu for each voice. Default 0. Negative numbers would mean more steps are placed towards the start of the bar, positive numbers means more steps at the end of the bar.
Comments
adding menu entries is a bit complicated since you need several elements.
on the AVR:
first of all you need to add a new parameter to the array in Parameters.h.
something like PAR_EUKLID_LENGTH for example. sound parameters are stored per kit, the parameters after that are stored nowhere and the global parameters are stored in the glo.ini file
in menu.c you have to specify a D_TYPE for the parameter. This sets the range of the parameter. for example DTYPE_0B127 results in values from 0 to 127
if it is a global parameter (recommended, since it is not a kit specific parameter) you have to define a handler in menu.c menu_parseGlobalParam(..) to define what should happen when the parameter changes
probably you have to use frontPanel_sendData() to send a message to the mainboard where the pattern generator is running. Also add a function to handle the incoming messages on the mainboard in frontpanelParser.c.
your parameter define (PAR_EUKLID_LENGTH for example) can then be inserted in the menu structure in menuPages.h. You also need to define a custom text to appear in the upper half of the display with the parameter name.
look at the menu.c, valueNames[] array.
a name consists of 3 entries
short name - the 3 letter name in normal view
category - category in detailed view, for example Oscillator or Filter
long name - the long parameter name for detailed vie, e.g. Frequency (so it will display Oscillator Frequency...)
to add new texts, you first have to add an index to the corresponding enum in menu.h (shortNameEnums etc)
and a text entry in the array in menuText.h (shortNames[] for example)
then you can compose a new NamesEnum (TEXT_NEW_PARAMETER) and also put it in the menuPages.h array.
I would reccomend to have a look at the already defined parameters and use the text search function to see how they are implemented.
I hope this chaotic description is of any help
I'm actually surprised there are not more folks hacking the code given that everyone here built their own unit.
=:)
See here:
http://forum.sonic-potions.com/discussion/comment/3705#Comment_3705