This PR refactors the ableton.py file to improve code organization and readability. Several functions have been extracted into a separate utility file, ableton_utils.py, to make the code cleaner and more maintainable. The global variables in ableton.py have been encapsulated into a class for better organization. The main() function has also been simplified by extracting some of its logic into separate functions.
Summary of Changes
Extracted the functions say(text), switch_to_ableton(), and export(track, position) from ableton.py into ableton_utils.py.
Encapsulated the global variables NAME, IS_RETINA, OS, PYTHON_EXEC, and STEMS into a class in ableton.py.
Simplified the main() function in ableton.py by extracting some of its logic into separate functions.
Created the ableton_utils.py file to contain the extracted utility functions.
Improved code organization and readability in ableton.py.
Fixes #25.
To checkout this PR branch, run the following command in your terminal:
Description
This PR refactors the
ableton.py
file to improve code organization and readability. Several functions have been extracted into a separate utility file,ableton_utils.py
, to make the code cleaner and more maintainable. The global variables inableton.py
have been encapsulated into a class for better organization. Themain()
function has also been simplified by extracting some of its logic into separate functions.Summary of Changes
say(text)
,switch_to_ableton()
, andexport(track, position)
fromableton.py
intoableton_utils.py
.NAME
,IS_RETINA
,OS
,PYTHON_EXEC
, andSTEMS
into a class inableton.py
.main()
function inableton.py
by extracting some of its logic into separate functions.ableton_utils.py
file to contain the extracted utility functions.ableton.py
.Fixes #25.
To checkout this PR branch, run the following command in your terminal: