Fixed text() function

Previously the text() function would directly manipulate its input,
which can have unintended, difficult-to-trace bugs and side effects,
now it copies the string into a new object
Got rid of duplicate sample string array

nKck etc.
Changed initSounds() function

It used to manipulate the kck, snr etc arrays directly, now it uses an
intermediary array so the original arrays can be used elsewhere.