buffer.getNumSamples() is 0 in Arpeggiator example

You need to add an audio input. See: