- Timestamp:
- Nov 20, 2013, 2:50:37 AM (11 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
- Children:
- aad688e
- Parents:
- 1e1a2c9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/demos/demo_sink_create_woodblock.py
r1e1a2c9 rdedeffc 33 33 for i in range(duration): 34 34 x = int((i % period) / float(period) * tablelen) 35 sinetone[i] = (sinetable[x] + sinetable[x+1]) / 2 35 idx = int(x) 36 frac = x - idx 37 a = sinetable[idx] 38 b = sinetable[idx + 1] 39 sinetone[i] = a + frac * (b -a) 36 40 37 41 # apply some envelope … … 40 44 sinetone[:attack] *= exp( e * ( float_ramp[:attack] / attack - 1 ) ) 41 45 42 if 0:46 if 1: 43 47 import matplotlib.pyplot as plt 44 48 plt.plot(sinetone)
Note: See TracChangeset
for help on using the changeset viewer.