include "../../GenCF1/include/CF1.pl"

# Method parameters
method = sas # This method can be faster in some cases
#method = swa # This method is best for analysis and corrections in most cases

cantus_id = 1 # Start analysis from this cantus id
accept_reseed = 0 # After accepting first result reseed (if random_seed) and choose new range (if random_range)
random_seed = 0 # Seed melody with random numbers. This ensures giving different results if generation is very slow.
random_range = 0 # Limit scanning to one of possible fast-scan ranges (automatically enabled for RSWA)
s_len = 1 # Maximum number of measures to full scan. Higher values are slow to compute
correct_inrange = 10 # Limit allowed range of corrected melody to range of source melody + specified number of chromatic steps. Set to high value to disable.
optimize_dpenalty = 1 # Saves only melodies closest to source melody. Decreases memory usage. Setting this flag may make corrections farther from source melody. Resetting allows for more close results when corrections>1
max_correct_ms = 1000000 # Maximum time in milliseconds to correct using sas (set to 0 to scan up to the end)
transpose_back = 0 # Should be set to 1 for CF1 generation algorithm only

# Analysis
random_key = 0 # Select any of possible keys regardless of last note
show_transpose = 0,12 # Semitones to transpose each voice (separated with comma)
confirm_mode = 1 # 0 - do not confirm expected flags; 1 - confirm global/local; 2 - confirm mistakes

# Correction
corrections = 0 # Number of corrections to show. Set to 0 to disable corrections. Does not work for swa.
pre_bad = 60 # How many notes to recalculate before rule violation
post_bad = 120 # How many notes to recalculate after rule violation
step_penalty = 3 # Penalty for adding one more changing step while correcting cantus
pitch_penalty = 1 # Penalty for changing note one more diatonic step while correcting cantus
approximations = 500 # Maximum number of approximations to run if rpenalty decreases
swa_steps = 100 # Size of Sliding Window Approximation algorithm window in steps
correct_range = 12 # Maximum interval allowed between each source and corrected note (chromatic)
animate = 0 # Draw animation of preliminary result every X ms (0 to show each change, high to disable animation)
animate_delay = 0 # Delay in ms after each animation step
prohibit_min_severity = 0 # Rules with severity below this can be violated

# Technical parameters
midifile_in_mul = 0.5 # Multiply note length with this value when loading
t_cnt = 100000 # Maximum number of steps generated
midifile_export_marks = 1 # Set to export marks (harmony) to midifile lyrics
midifile_export_comments = 0 # Set to export comments (violations) to midifile lyrics
emulate_sas = 0 # 0 = disable emulator, 1 = Enables SAS algorithm emulator
cor_ack = 0 # Acknowledge correction results by running both algorithms: SAS and ASWA
