converters.py
: Make 'note' its own case
This commit is contained in:
parent
1f76b19e69
commit
dcc37ff0dd
@ -67,7 +67,9 @@ def preprocessTJAMeasures(tja):
|
|||||||
'pos_start': 0, 'pos_end': 0, 'time_sig': measure['length'],
|
'pos_start': 0, 'pos_end': 0, 'time_sig': measure['length'],
|
||||||
'data': [], 'properties': measure['properties']}
|
'data': [], 'properties': measure['properties']}
|
||||||
for data in combined:
|
for data in combined:
|
||||||
if data['type'] == 'bpm':
|
if data['type'] == 'note':
|
||||||
|
measure_cur['data'].append(data)
|
||||||
|
elif data['type'] == 'bpm':
|
||||||
currentBPM = float(data['value'])
|
currentBPM = float(data['value'])
|
||||||
# Case 1: BPM change at the start of a measure; just change BPM
|
# Case 1: BPM change at the start of a measure; just change BPM
|
||||||
if data['pos'] == 0:
|
if data['pos'] == 0:
|
||||||
@ -82,7 +84,7 @@ def preprocessTJAMeasures(tja):
|
|||||||
elif data['type'] == 'scroll':
|
elif data['type'] == 'scroll':
|
||||||
currentScroll = data['value']
|
currentScroll = data['value']
|
||||||
measure_cur['scroll'] = currentScroll
|
measure_cur['scroll'] = currentScroll
|
||||||
# 'else' == Note data, and non-bpm/scroll events
|
# 'else' non-bpm/scroll events
|
||||||
else:
|
else:
|
||||||
measure_cur['data'].append(data)
|
measure_cur['data'].append(data)
|
||||||
measure_cur['pos_end'] = len(measure['data'])
|
measure_cur['pos_end'] = len(measure['data'])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user