Skip to content

Commit 797b00c

Browse files
committed
fixed arp octave not persisting
1 parent e7afcd3 commit 797b00c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

textbeat/player.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1687,9 +1687,9 @@ def run(self):
16871687
p = base
16881688

16891689
if arpnotes:
1690-
ch.arp(notes, arpcount, sustain, arppattern, arpreverse)
1690+
ch.arp(notes, arpcount, sustain, arppattern, arpreverse, octave)
16911691
arpnext = ch.arp_next(self.shell or self.cmdmode in 'lc')
1692-
notes = [ch.arp_note]
1692+
notes = [ch.arp_note - (octave*12)] # [HACK] first note already has frame octave offset above
16931693
delay = ch.arp_delay
16941694
# if not fcmp(delay):
16951695
# pass

textbeat/track.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,11 +318,11 @@ def patch(self, p, stackidx=-1):
318318
def bank(self, b):
319319
self.ccs[0] = b
320320
self.cc(0,b)
321-
def arp(self, notes, count=0, sustain=False, pattern=[], reverse=False):
321+
def arp(self, notes, count=0, sustain=False, pattern=[], reverse=False, octave=0):
322322
self.arp_enabled = True
323323
if reverse:
324324
notes = notes[::-1]
325-
self.arp_notes = notes
325+
self.arp_notes = list(map(lambda n: n + (octave*12), notes))
326326
self.arp_cycle_limit = count
327327
self.arp_cycle = count
328328
self.arp_pattern = pattern if pattern else [1]
@@ -361,7 +361,7 @@ def arp_next(self, stop_infinite=True):
361361
self.arp_idx = 0
362362
# else:
363363
# self.arp_idx += 1
364-
return bool(self.arp_note)
364+
return self.arp_note != None
365365
def arp_restart(self, count = None):
366366
self.arp_enabled = True
367367
# self.arp_sustain = False

0 commit comments

Comments
 (0)