Hey everyone,
I am trying to simulate random guitar-like strumming patterns. Currently, I’m using a random number (ichord) which will decide which set of event_i commands to execute. Each set of these event_i commands has a different strumming pattern, which I primarily realised through using different combinations of p2 delays.
I would like to randomise these p2 values for each set of event_i’s. If you look in the file, I have labelled these patterns. However, these patterns are unique only to the randomised ‘ichord’. I want to be able to use any strumming pattern for any chord.
Maybe defining a 2-D array could work? Here is a pseudo-pseudocode
istrum 1, 5
if istrum = 1 then
iarr[0][0] ; strumming pattern 1, first note
iarr[0][1] ; second note
iarr[0][2] ; third note
iarr[0][3]; fourth note
iarr[0][4] ; fifth note
else if irand ==2 then
iarr[1][0] ; strumming pattern 2, first note
iarr[1][1] ; second note
iarr[1][2] ; third note
iarr[1][3] ; fourth note
iarr[1][4] ; fifth note
…etc., and then I would just use these array values in the p2 statement in the event_i commands.
Any feedback/suggestions would be appreciated.
FM only.csd (12.3 KB)
thanks,
Amogh