File: sampleplayer_chop.py

package info (click to toggle)
bespokesynth 1.3.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 44,592 kB
  • sloc: cpp: 117,136; ansic: 18,752; python: 593; xml: 74; makefile: 4
file content (12 lines) | stat: -rw-r--r-- 298 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
#requires a sampleplayer named "sampleplayer"

import sampleplayer

tempo = 99.5
secondsPerBeat = 60.0 / tempo
startOffsetSeconds = 3
startBeat = 0

sp = sampleplayer.get("sampleplayer")
for i in range(4):
   sp.set_cue_point(i, secondsPerBeat*(startBeat+i) + startOffsetSeconds, secondsPerBeat, 1)