[BGM] Fix pitch slide reset logic
Seems like it actually modifies the tie note value, so it should reset whenever the tied note changes
This commit is contained in:
parent
e5530e1dd1
commit
f8e3def5d8
|
@ -233,8 +233,6 @@ static func render_channels(tracks: Array, inst_map: Array, _debug_name := 'none
|
||||||
note_event.instrument = current_instrument
|
note_event.instrument = current_instrument
|
||||||
note_event.pan = curve_pan.get_pulse(p)
|
note_event.pan = curve_pan.get_pulse(p)
|
||||||
note_event.pan_end = curve_pan.get_pulse(curve_p_end)
|
note_event.pan_end = curve_pan.get_pulse(curve_p_end)
|
||||||
note_event.pitch_slide = curve_pitch_slide.get_pulse(p)
|
|
||||||
note_event.pitch_slide_end = curve_pitch_slide.get_pulse(curve_p_end)
|
|
||||||
note_event.adsr_attack_rate = current_adsr_attack_rate
|
note_event.adsr_attack_rate = current_adsr_attack_rate
|
||||||
note_event.adsr_decay_rate = current_adsr_decay_rate
|
note_event.adsr_decay_rate = current_adsr_decay_rate
|
||||||
note_event.adsr_decay_total_periods = current_adsr_decay_total_periods
|
note_event.adsr_decay_total_periods = current_adsr_decay_total_periods
|
||||||
|
@ -242,20 +240,22 @@ static func render_channels(tracks: Array, inst_map: Array, _debug_name := 'none
|
||||||
if note >= 0: # Don't shift or play rests
|
if note >= 0: # Don't shift or play rests
|
||||||
last_note_pretransform_pitch = note # Ties reuse this
|
last_note_pretransform_pitch = note # Ties reuse this
|
||||||
last_untied_note_p_start = p
|
last_untied_note_p_start = p
|
||||||
|
curve_pitch_slide.add_point(p, 0) # Reset pitch slide
|
||||||
note += (12 * current_octave) + current_transpose
|
note += (12 * current_octave) + current_transpose
|
||||||
note_event.pitch = note # pitch_idx #* curve_fine_tuning
|
note_event.pitch = note # pitch_idx #* curve_fine_tuning
|
||||||
note_event.velocity = curve_velocity.get_pulse(p) # current_velocity
|
note_event.velocity = curve_velocity.get_pulse(p) # current_velocity
|
||||||
note_event.velocity_end = curve_velocity.get_pulse(curve_p_end)
|
note_event.velocity_end = curve_velocity.get_pulse(curve_p_end)
|
||||||
curve_pitch_slide.add_point(p, 0) # Reset pitch slide
|
|
||||||
elif note == music.NOTE_IS_TIE:
|
elif note == music.NOTE_IS_TIE:
|
||||||
if last_note_pretransform_pitch >= 0:
|
if last_note_pretransform_pitch >= 0:
|
||||||
note = last_note_pretransform_pitch + (12 * current_octave) + current_transpose
|
note = last_note_pretransform_pitch + (12 * current_octave) + current_transpose
|
||||||
note_event.p_note_start = last_untied_note_p_start
|
note_event.p_note_start = last_untied_note_p_start
|
||||||
note_event.pitch = note # pitch_idx #* curve_fine_tuning
|
note_event.pitch = note # pitch_idx #* curve_fine_tuning
|
||||||
|
note_event.pitch_slide = curve_pitch_slide.get_pulse(p)
|
||||||
|
note_event.pitch_slide_end = curve_pitch_slide.get_pulse(curve_p_end)
|
||||||
note_event.velocity = curve_velocity.get_pulse(p)
|
note_event.velocity = curve_velocity.get_pulse(p)
|
||||||
note_event.velocity_end = curve_velocity.get_pulse(curve_p_end)
|
note_event.velocity_end = curve_velocity.get_pulse(curve_p_end)
|
||||||
else:
|
#else:
|
||||||
curve_pitch_slide.add_point(p, 0) # Reset pitch slide on rest
|
#curve_pitch_slide.add_point(p, 0) # Reset pitch slide on rest
|
||||||
channel_note_events.append(note_event)
|
channel_note_events.append(note_event)
|
||||||
p += duration
|
p += duration
|
||||||
EventType.VOLUME:
|
EventType.VOLUME:
|
||||||
|
|
Loading…
Reference in New Issue