Browse Source

docstrings

master
Nils 5 years ago
parent
commit
88c216c9d0
  1. 3
      engine/api.py
  2. 2
      engine/pattern.py

3
engine/api.py

@ -653,8 +653,7 @@ def changePatternVelocity(trackId, steps):
callbacks._patternChanged(track)
#Other functions
#Other functions. These can't be template functions because they use a specific track and Patroneos row and scale system.
def noteOn(trackId, row):
track = session.data.trackById(trackId)
midipitch = track.pattern.scale[row]

2
engine/pattern.py

@ -275,7 +275,7 @@ class Pattern(object):
velocity = noteDict["velocity"]
pitch = self._cachedTransposedScale[noteDict["pitch"] + scaleTransposition] + halftoneTransposition
exportPattern += cbox.Pattern.serialize_event(startTick, 0x90, pitch, velocity) # note on
exportPattern += cbox.Pattern.serialize_event(endTick-1, 0x80, pitch, velocity-1) # note off #-1 ticks to create a small logical gap. Does not affect next note on.
exportPattern += cbox.Pattern.serialize_event(endTick-1, 0x80, pitch, velocity) # note off #-1 ticks to create a small logical gap. Does not affect next note on.
pattern = cbox.Document.get_song().pattern_from_blob(exportPattern, oneMeasureInTicks)
self._builtPatternCache[cacheHash] = pattern

Loading…
Cancel
Save