I’m going to guess that the issue is here:
\index, Pfunc({ |e| ~samples[\celli_pizz][\midinotes].indexIn( e.use{ ~midinote.()} ) })
If indexIn uses if/then logic, then you can’t pass an array of note numbers into it.
But you could .collect over that array:
\index, Pfunc({ |e| e.use { ~midinote.() }.asArray.collect { |note| ~samples[\celli_pizz][\midinotes].indexIn(note) } })
This is not tested and I’m not even sure that’s the issue, but it seems the riskiest place.
hjh