I need a script to write region names to text as quoted below.
The pink region is ignored and bar 1 will be the first non pink bar so if there is
Project start measure: -1 for 2 bar offset bar 1 will be bar 1
else bar one will be bar 3
so these will be the Section bar numbers below 1A this will be any blue regions
9B will be any green regions
there are 2 region csv in the zip you can load into Reaper
region_chords_colors.csv these are just 2 colors for A and B section
region_chords_colors_fills.csv this has a few more blues and greens
to show post fills and pre fills
EDIT: I think it maybe best to get it to work from the fills csv so where ever
a dark blue post fill is that will be A and where ever a dark green post fill is that will be B
Region color 97D0FE is A Ending will be Section: 97A
Region color 9EF5B6 is B Ending if it was this green it would be Section: 97B
these will be the last chord at the bottom of the text bar
97
the underscores _ are when the chord is on beat 2 or 4
| D Bm | is a chord on beat 1 and 3
| Gbm G _ _ | is a chord on beat 1 and 2
| D _ _ Gbm | is a chord on beat 4
it always writes the current chord from previous bars on beat 1
it only needs to write:
Tempo: 120 > current project tempo
Chorus: bars
1 to
96 (repeat 1 times) > bars from start to the start of the ending bar
97
Sections: > either A for blues and B for greens
the others leave as is:
Meter: 4/4
Style: Swing
Key: D > this could be the first chord or I can add a user input for it
If it can save the text to *.mjb in the script folder
Code:
local info = debug.getinfo(1,'S');
script_path = info.source:match[[^@?(.*[\/])[^\/]-$]]
region_chords_to_text.zip
Quote:
Name: Song
Meter: 4/4
Style: Swing
Key: D
Tempo: 120
Chorus: bars 1 to 96 (repeat 1 times)
Sections: 1A 9B 17A 25B 33A 41B 49A 57B 65A 73B 81A 89B 97A
| D Bm | Gbm G _ _ | G A _ _ | A D |
| D _ _ Gbm | G | G | A |
| Bm | Gbm | G | D |
| Bm | Gbm | G | A |
| D | Gbm | G | A |
| D | Gbm | G | A |
| Bm | Gbm | G | D |
| Bm | E | G | G A |
| D | Gbm | G | A |
| D | Gbm | G | A |
| Bm | Gbm | G | D |
| Bm | Gbm | G | A |
| D | Gbm | G | A |
| D | Gbm | G | A |
| Bm | Gbm | G | D |
| Bm | E | G | G A |
| D | Gbm | G | A |
| D | Gbm | G | A |
| Bm | Gbm | G | D |
| Bm | Gbm | G | A |
| D | Gbm | G | A |
| D | Gbm | G | A |
| Bm | Gbm | G | D |
| Bm | E | G | G A |
| D |
|