The general functions like Program 108 (page 248) are the kind where the index array notation is

Question:

The general functions like Program 108 (page 248) are the kind where the index array notation is really useful. Write reverse, copy, and clip using index array notation.


Data from Program 108

def reverse(source): target = makeEmptySound (getLength(source)) getlength (source)-1 for targetIndex in range (0,getLength(target)): sourceIndex = sourceValue = getSampleValueAt (source, sourceIndex) setSampleValueAt (target, targetIndex, sourceValue) - 1 sourceIndex = sourceIndex return target

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: