if ステートメント、for ループ、およびリストを使用して、これを実行しようとしています。リストはパラメータの一部です。if ステートメントをどのように記述し、プログラムにさまざまな単語をすべてループさせ、すべてを想定どおりに設定する方法がわかりません。
newSndIdx=0;
for i in range (8700, 12600+1):
sampleValue=getSampleValueAt(sound, i)
setSampleValueAt(newSnd, newSndIdx, sampleValue)
newSndIdx +=1
newSndIdx=newSndIdx+500
for i in range (15700, 17600+1):
sampleValue=getSampleValueAt(sound, i)
setSampleValueAt(newSnd, newSndIdx, sampleValue)
newSndIdx +=1
newSndIdx=newSndIdx+500
for i in range (18750, 22350+1):
sampleValue=getSampleValueAt(sound, i)
setSampleValueAt(newSnd, newSndIdx, sampleValue)
newSndIdx +=1
newSndIdx=newSndIdx+500
for i in range (23700, 27250+1):
sampleValue=getSampleValueAt(sound, i)
setSampleValueAt(newSnd, newSndIdx, sampleValue)
newSndIdx +=1
newSndIdx=newSndIdx+500
for i in range (106950, 115300+1):
sampleValue=getSampleValueAt(sound, i)
setSampleValueAt(newSnd, newSndIdx, sampleValue)
newSndIdx+=1