text:
Are the beams above or below the notes?
In musical notation, groups of notes shorter than one beat are joined together by a line at the bottom called a beam. Here are a few bars of music with the beams highlighted:

(Taken from Second Suite in F by Gustav Holst; you can hear how these notes sound at 0:13 in this video.)
You may notice that beam #6 is above the ovals that define the notes, and its vertical lines attached to their right sides, while the others are below the notes and attached to their left. What determines this? There are a few simple rules, which are the subject of this challenge.

By default, the placement of the beam is determined by its highest or lowest note. If the note farthest from the centermost line of the staff is above it, then the beam goes below the notes. If the note with the highest absolute value is above the centermost line of the staff, then the beam goes below the notes.
If the highest and the lowest note are the same distance from the center line, the direction of the beam is determined by which side of the center line the majority of notes in the beam lie on. If a majority of notes lie above the centre line, the beam goes down. If a majority of notes lie below the centre line, the beam goes up. Notes on the center line do not count either way.
If the highest and the lowest note are the same distance from the center line, and equally many notes lie above and below the center line, the beam may be placed either above or below the notes.

In the sample notation above, the beams of clusters #1, 2, 3, and 5 are determined to be below the notes because their highest notes (their second, second, first, and third respectively) are above the center line. #6's lowest note is its first/third note, which is below the center line. #4's highest and lowest note are equally distant from the center line and it contains no majority either way. Its beam could be placed either above or below, but my composition program renders it as below.
Your commission
Write a program that takes in a list of integers, which may be zero or negative, and outputs a truthy/falsey value. These integers represent notes and their distance from the center line; positive values represent notes above the line, zero represents notes on the line, and negative values represent notes below the line. Determine, given a cluster of notes that sit those distances from the center line, which way the cluster's beam should go; output TRUE if the beam should go above the notes and FALSE if the beam should go below the notes. To restate the rules above and give the algorithm:

Find the number in the list with the largest absolute value. If it is greater than zero, output FALSE. If it is less than 0, output TRUE. If it is 0, output may be TRUE or FALSE as convenient. If there are positive and negative numbers with the same, maximal absolute value, continue.
Determine whether the majority of numbers are positive and negative, ignoring zeroes. If a majority of numbers are positive, output FALSE. If a majority of numbers are negative, output TRUE.
Otherwise, output may be TRUE or FALSE as convenient.

You might be given only one number. In that case, it has the highest absolute value, so if it is greater than 0 output false; if it is less than zero output true; and if it is 0 you may output true or false.
You may not assume the numbers are sorted.
Test cases
5, 4, 3 -> FALSE                     # #3
1, 0, -1 -> TRUE or FALSE            # #4
0, 1, 2, 0 -> FALSE                  # #5
-2, -1, -2 -> TRUE                   # #6
3, 1, 4, 1, 5, -9 -> TRUE            # Largest absolute value below 0, rule 1
3, 1, 4, 1, 5, -5 -> FALSE           # Largest absolute value tied, determined by majority, rule 2
3, 1, -3, -1, 5, -5 -> TRUE or FALSE # Largest absolute value tied and no majority, unspecified

Jelly, 13 9 bytes
ṠÆm+Ṁ+Ṃ<0

Try it online!
A monadic link taking a list of integers and returning a Jelly Boolean indicating the direction of the stems as per the spec.
Modified with inspiration from @RobinRyder’s excellent R answer so be sure to upvote that one too!
Explanation
Ṡ         | Signs
 Æm       | Mean
   +Ṁ     | Add max (of original argument)
     +Ṃ   | Add min (of original argument)
       <0 | Less than 0

R, 40 bytes
function(x)min(x)+max(x)+mean(sign(x))<0

Try it online!
If min(x)+max(x) is non-zero, its sign corresponds to the note farthest from the centre and gives the direction of the beam.
Adding mean(sign(x)) can never change the sign. Indeed, either (a) all notes are of the same sign and mean(sign(x)) is of the same sign as min(x)+max(x) or (b) notes are of both signs and mean(sign(x)) is strictly in \$(-1,1)\$  whereas min(x)+max(x) is an integer, so the sign of the sum is unchanged.
If min(x)+max(x)==0, the sign of the mean decides the direction.
If undecided, defaults to FALSE.

@(x)min(x)+max(x)+mean(sign(x))<0 also works as Octave.

Python 3, 55 bytes
lambda a:(min(a)+max(a)or sum((i>0)-(i<0)for i in a))<0

Try it online!

JavaScript (ES6),  66  64 bytes
a=>(a.map(m=v=>(k+=v>0||-!!v,a=v>a?a:v,m=v<m?m:v),k=0)|a+m||k)<0

Try it online!
Commented
a => (                   // a[] = input array, re-used to store the minimum value
  a.map(m =              // initialize m = maximum to a non-numeric value
    v => (               // for each value v in a[]:
      k +=               //   update k:
        v > 0 ||         //     increment it if v > 0
        -!!v,            //     decrement it if v < 0
      a = v > a ? a : v, //   update a to min(a, v) (always v if a is non-numeric)
      m = v < m ? m : v  //   update m to max(m, v) (always v if m is non-numeric)
    ),                   //
    k = 0                //   start with k = 0
  )                      // end of map()
  | a + m                // use a + m if it's not equal to 0
  || k                   // otherwise, use k
) < 0                    // test if the above value is negative

63 bytes with with Math

05AB1E, 15 14 13 bytes
ÄZQÏ‚¤Ëè.±Od≠

Output will be false if either of the two is a possible output.
-1 byte and fixed a bug for [0,0,1,-1,-1] thanks to @Grimmy.
Try it online or verify all test cases.
Explanation:
Ä         # Convert each value in the (implicit) input-list to their absolute value
          #  i.e. [3,1,-5,4,1,5,-5] → [3,1,5,4,1,5,5]
          #  i.e. [0,1,-2,0] → [0,1,2,0]
 Z        # Push the maximum of these absolute values (without popping the list itself)
          #  i.e. [3,1,5,4,1,5,5] → 5
          #  i.e. [0,1,2,0] → 2
  Q       # Check for each absolute value whether it's equal to this maximum
          #  i.e. [3,1,5,4,1,5,5] and 5 → [0,0,1,0,0,1,1]
          #  i.e. [0,1,2,0] and 2 → [0,0,1,0]
   Ï      # And only leave the values of the (implicit) input-list at the truthy indices
          #  i.e. [3,1,-5,4,1,5,-5] and [0,0,1,0,0,1,1] → [-5,5,-5]
          #  i.e. [0,1,-2,0] and [0,0,1,0] → [-2]
    ‚     # Pair it with the (implicit) input-list
          #  i.e. [3,1,-5,4,1,5,-5] and [-5,5,-5] → [[3,1,-5,4,1,5,-5],[-5,5,-5]]
          #  i.e. [0,1,-2,0] and [-2] → [[0,1,-2,0],[-2]]
     ¤    # Push the last value of this pair (without popping) again
      Ë   # And check if all values are equal (1 if truthy; 0 if falsey)
          #  i.e. [-5,5,-5] → 0
          #  i.e. [-2] → 1
       è  # Use it to index into the pair
          #  i.e. [[3,1,-5,4,1,5,-5],[-5,5,-5]] and 0 → [3,1,-5,4,1,5,-5]
          #  i.e. [[0,1,-2,0],[-2]] and 1 → [-2]
.±        # Take the signum of each value
          #  i.e. [3,1,-5,4,1,5,-5] → [1,1,-1,1,1,1,-1]
          #  i.e. [-2] → [-1]
  O       # Sum those together
          #  i.e. [1,1,-1,1,1,1,-1] → 4
          #  i.e. [-1] → -1
   d      # Check if it's non-negative (>=0)
    ≠     # And invert the boolean (so basically check if it's negative / <0)
          #  i.e. 4 → 1 → 0
          #  i.e. -1 → 0 → 1
          # (after which this is output implicitly as result)

This gives incorrect output on lists such as [1,2,3,-3,-3], where the multiplicity of signs of maxima does not match the general multiplicity of signs.

@LegionMammal978 Should be fixed now, thanks for letting me know. As I mentioned, I misread rule 2 and thought it only applied to the abs(max) values instead of the full list.

d treats 0 as positive, which makes you fail test cases like [0,0,1,-1,-1]. Using .±Od instead of d.M fixes it at the cost of 1 byte.

13 with ÄZQÏ‚¤Ëè.±Od≠.

@Grimmy Ah, good catch regarding the [0,0,1,-1,-1]. And thanks for the -2 with the Ë and indexing into the pair. :)

Retina 0.8.2, 58 bytes
O#`\S+
\d+
$*
+` -1+ +1+

^-(1+)($| ((?!.*\1$)|-.* \1$))

Try it online! Link includes test cases. Explanation:
O#`\S+

Sort the numbers numerically.
\d+
$*

Convert to unary.
+` -1+ +1+

Match inner pairs of negative and positive numbers and delete them until only one negative and/or positive number remains.
^-(1+)($| ((?!.*\1$)|-.* \1$)

Output a truthy value if the (largest) negative number is the only number, or if its absolute value is greater than the largest positive number, or if another negative number remains and its absolute value equals the largest positive number.

PHP, 178 127 111 107 105 bytes
<?php foreach($argv as$n){$c+=$s=$n<=>0;($a=$n*$s)>$m&&$x=$s;$a-$m||$x=0;$a>=$m&&$m=$a;}echo$x?$x<0:$c<0;

Try it online!
Ungolfed
<?php
$notes = explode(',', $argv[1]);

$max_note = 0;
$max_sign = 0;
$counts = 0;
foreach ($notes as $note) {
    $sign = $note <=> 0;
    $counts += $sign;

    if (abs($note) > $max_note) {
        $max_sign = $sign;
    } elseif (abs($note) == $max_note) {
        $max_sign = 0;
    }

    if (abs($note) >= $max_note) {
        $max_note = abs($note);
    }
}

echo ($max_sign == 0) ? ($counts < 0) : ($max_sign == -1);
?>

Wolfram Language (Mathematica), 26 bytes
Min@#+Max@#+Mean@Sign@#<0&

Try it online! Pure function. Takes a list of numbers as input, and returns True or False as output. Uses the same logic as Robin Ryder's answer. Additionally, here's the 49-byte function I came up with myself:
Tr[{}⋃Sign@MaximalBy[#,Abs]/.{-1,1}->Sign@#]<0&

J, 17 bytes
0>>./+<./+#%~1#.*

Try it online!
Based on Robin Ryder's insightful alrogithm - make sure to upvote his.

0> Is 0 greater than...
>./ The max...
+ Plus...
<./ The min...
+ Plus...
# The input length...
%~ Divided into...
1#. The sum of...
* The signs.

Burlesque, 23 bytes
psJ)snav/^>]j<]CL++@0.<

Try it online!
Following the logic of @RobinRyder. Takes input as A B C ...
psJ  # Parse input to list of ints and dup
)sn  # Map sign
av   # Average (returns double)
/^   # Swap and Dup
>]   # Max
j<]  # Min
CL++ # Collect all and sum
@0.< # <0.0

C (gcc), 118 115 109 bytes
#define A a[p]
p;s;q;r;f(a,t)int*a;{p=t;for(q=r=*a;p--;s+=(A>0)-(A<0))q=q>A?q:A,r=r<A?r:A;a=q+r+(s>0)<(s<0);}

Uses Robin Ryder's method.
Try it online!

Perl 6 Raku, 31 bytes
{0>.min+.max+sum($_».sign)/$_}

Try it online!
Based on Robin Ryder's solution.

Factor, 44 bytes
[ dup minmax + swap [ sgn ] map mean + 0 < ]

Try it online!
Port of Robin Ryder's R answer.


text:
Make The Finest Magic Code Square
In math a magic square is an N×N grid of numbers from 1 to N2 such that every row, column, and diagonal sums to the same total. For example here's a 3×3 magic square:

In this challenge we'll extend the idea to magic code squares where, instead of numbers, each grid cell is any non-newline character. They can be be repeated and in any order.
And instead of sums, each row, column, and diagonal is viewed as an N-character single-line program whose output is a distinct number from 0 to 2N+1 (inclusive).
For example, if you had a 4×4 magic code square that looked like
ABCD
EFGH
IJKL
MNOP

it would need to output the numbers 0 through 9, perhaps like:
  ABCD-9
  EFGH-2
  IJKL-6
  MNOP-5
 /||||\
3 4180 7

That is, the ten embedded 4-character single-line programs that form the rows, columns, and diagonals of the grid each need to output a unique number from 0 through 9. In this case:
ABCD -> 9
EFGH -> 2
IJKL -> 6
MNOP -> 5
AFKP -> 7
DHLP -> 0
CGKO -> 8
BFJN -> 1
AEIM -> 4
DGJM -> 3

(Note that the diagonals are read from top to bottom. This is required.)
As another example, this 3×3 code square
d*P
0##
! d

would need to output 0 through 7 when its rows, column, and diagonals are run to make it magical, perhaps like:
  d*P-1
  0##-0
  ! d-6
 /|||\
5 432 7

Scoring
The goal of this challenge is not necessarily to make the smallest or the biggest magic code square. In some programming languages very small magic code squares might be easy to make and in other languages very large ones might be.
The challenge here is to create what you think is the best, most elegant, or most impressive magic code square or related set of magic code squares. Hence this is a popularity-contest, the answer with the highest number of votes wins.

Your submission must include at least one valid magic code square, and may include many related ones if you have found them, or even an infinite neighborhood of them.
Please list the N (or range of N's) you found at the top of your answer.
For submitting multiple magic code squares in the same language but with very different implementations use multiple answers.
Of course you are encouraged to share your process of searching for magic code squares and explain why yours is interesting! (Info about any Parker magic code squares might be funny.)

Is there a minimum grid size?

@Lyxal The effective minimum is 2x2 since 1x1 is impossible.

Are we allowed to exit with an error?

@Lyxal I'll say yes, per the meta default - "terminating with an error or an uncaught exception is fine here, as long as it doesn't produce stray output to STDOUT"

@Calvin'sHobbies We missed you!

the diagonal top-right -> bottom-left seems to be reverse to me, is there a reason it's not bottom-left -> top-right?

@Kaddath As far as I know an anti-diagonal usually goes from the top-right to bottom-left. To quote Wikipedia: "The antidiagonal of a dimension N square matrix ..., runs from the top right corner to the bottom left corner." Languages with a builtin of the anti-diagonal(s) of a matrix (like Jelly or 05AB1E for example) do the same: Try it online in Jelly or Try it online in 05AB1E.

@Kaddath The magic square image depicts the diagonal going down and left. I just kept it the same for consistency.

Must we start with 0 or may we choose to start from 1 instead?

@Shaggy You do need to start at 0, sorry.

After 2 hours of attempts I've come to the sad conclusion that this is impossible in PHP... :(

@SamDean I scratched my head for a while thinking about convoluted machiavelic plans that all failed too :D

@Kaddath The closest plan I had was some horrendous commenting option but because the only way to end "//" comments is with a new line I needed "/**/" comments but if you put that on the top line then that means one of your "down" programs has to start with an "*" and I couldn't make that work

@SamDean yeah I wanted a first line to be basically made of " for this reason, but couldn't find anything starting by "" because needed escaping in this line

Keg, 4x4 magic square
0601
7.92
3._.
8654

Try it online!
Outputs

 0601 - 1
 7.92 - 7
 3._. - 3
 8654 - 4
/||||\
98652 0

I can't believe this actually works! Programs need the -hr flag to properly output the required result.
Test suite. Uncomment each line to run it. The -in flag is purely to make the test suite a nicer experience, as otherwise, the newlines would interfere with the programs.
Programs

0601 - 1 (Push 0, 6, 0 and 1,then print the top of stack (TOS))
7.92 - 7 (Push 7 and print it. This makes the rest of the program a NOP)
3._. - 3 (Push 3 and print it. The _ will the try and pop from an empty stack, ending execution)
8654 - 4 (Push 8, 6, 5 and 4 and then print TOS)
0738 - 8 (Push 0, 7, 3 and 8 and then print TOS)
6..6 - 6 (Push 6 and print it. The . will try and print from an empty stack, end execution)
09_5 - 5 (Push 0 and 9, then pop the 9 and discard it then push 5. TOS is then printed)
12.4 - 2 (Push 1, then 2 and print TOS. The rest of the program is NOPs after that.)
0._4 - 0 (Like the program for 3, but with 0)
19.8 - 9 (Like the program for 2 but with 9)

@Calvin'sHobbies I've fixed my answer to fit the challenge specs

Cool. What does the -hr do?

@Calvin'sHobbies Well, if, at the end of execution, nothing has been explicitly printed using either . or ,, -hr will output the last item on the stack raw.

An explanation of the programs, like Jonathon Allan did, would probably help people understand it which feels important in a popularity contest!

@SamDean, I've added an explanation now.

05AB1E, 4x4 5x5
8www4
w3Tαw
Uw₃4<
XθнĀ·
wTwºß

Try it online. (Loops over the rows; columns; main diagonal; and main anti-diagonal of the square, and will run it as 05AB1E code with .V, after which it will print the result and discard everything that remains on the stack for the next iteration with )\.)
Explanation:
The w are no-ops, so I'll ignore them in the explanations below. In addition, the top of the stack is output implicitly for all of these programs as result.
Horizontal:

8 4: push \$8\$; push \$4\$.

3Tα: push \$3\$; push \$10\$; take the absolute difference between the two: \$\lvert3-10\rvert\$.

U₃4<: pop and store in variable X (stores an empty string in X with an empty stack); push \$95\$; push \$4\$; decrease the top by 1: \$4-1\$.

XθнĀ·: push \$1\$; pop and push its last digit: \$1\$; pop and push its first digit: \$1\$; Python-style truthify it: \$1\$; double it: \$2×1\$.

Tºß: push \$10\$; mirror it without overlap: \$1001\$; pop and push its smallest digit: \$0\$.

Vertical:

8UX: push \$8\$; pop and store it in variable X; push variable X.

3θT: push \$3\$; pop and push its last digit: \$3\$; push \$10\$.

T₃н: push \$10\$; push \$95\$; pop and push its first digit: \$9\$.

α4Āº: take the absolute difference (no-op with an empty stack); push \$4\$; Python-style truthify it: \$1\$; mirror it without overlap: \$11\$.

4<·ß: push \$4\$; decrease it by 1: \$4-1\$; double it: \$2×3\$; pop and push its smallest digit: \$6\$.

Main diagonal / anti-diagonal:

83₃Āß: push \$83\$; push \$95\$; Python-style truthify it: \$1\$; pop and push its smallest digit: \$1\$.

4α₃θ: push \$4\$; push the absolute difference (will use the single argument on the stack twice): \$\lvert4-4\rvert\$; push \$95\$; pop and push its last digit: \$5\$.

Polyglot, 10x10
0     14
      5
    16
    7
        18
        9
20
 10
 12
  13

This yields the following row/column/diagonal programs (one per line):
0
       01
0     2
         3
4
      5
  6
    7
    8
        9
 10
      011
 12
  13
0     14
15
    16
  17
        18
    19
20
       021

In many stack-based languages, including 05AB1E and Jelly, each of those programs outputs the corresponding integer.

Nice. :) Btw, your last line contains 1 space too many (11 characters). Noticed it when I was copy-pasting your answer in my 05AB1E test script. Without that final space it works fine, so +1 from me. Out of curiosity, did you find this by trial-and-error, a test/bruteforce script, or with a certain strategy in mind?

@KevinCruijssen I quickly got the idea for this pattern, which gets all the rows/columns right but messes up the diagonals. I tried for a while to fix it manually, but eventually gave up. I then ran a brute-force search over all 4x4 patterns to find one that hits all-but-one of [0, 1, 2, 3, 10, 11, 12, 13, 20, 21]. The resulting pattern is at the bottom-left of my solution, the rest is just manual rearranging of my initial idea.

Jelly, A simple 3 by 3
Surely we can get a bigger one in Jelly, but if not...
5+2
+ḷ*
1+2

Try them online!
(splits on new lines (Ỵ) and evaluates (V) each (€) as Jelly programs)
5+2 : 5 + 2 = 7
5+1 : 5 + 1 = 6
5ḷ2 : left(5, 2) = 5
2*2 : 2 ^ 2 = 4
1+2 : 1 + 2 = 3
2ḷ1 : left(2, 1) = 2
+ḷ* : left((0 + 0), 0) ^ 0 = 1
+ḷ+ : left((0 + 0), 0) + 0 = 0

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
Bucket and Minimize
The challenge - given a numeric list L and an integer N as inputs, write a function that:

finds the bucket sizes for L such that it is split into N whole buckets of equal or near-equal size, and
returns for each element in L the minimum of that element's bucket.

Example -
L=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
N=5

Compute the bucket sizes with the following:
\$\left \lfloor \frac{| L |}{N} \right \rfloor + 1\$ elements go into \$|L| \bmod
  N\$ buckets, and
\$\left \lfloor \frac{| L |}{N} \right \rfloor \$  go into the rest,
where |L| is the length of L. For the above, we get
floor(12/5)+1 into 12 mod 5 buckets, and floor(12/5) in the rest:
[[0, 1, 2], [3, 4, 5], [6, 7], [8, 9], [10, 11]]

Finally, we output a list where each element is the minimum of its bucket:
[0, 0, 0, 3, 3, 3, 6, 6, 8, 8, 10, 10]

Some test cases:
In -> Out

[1, 2, 3, 4], 1 -> [1, 1, 1, 1]

[1, 2, 3, 4], 2 -> [1, 1, 3, 3]

[0, 2, 4, 6, 8], 3 -> [0, 0, 4, 4, 8]

[9, 3, 0, 1, 5, 7, 4, 6, 8, 10, 12, 11, 2, 13], 5 -> [0, 0, 0, 1, 1, 1, 4, 4, 4, 10, 10, 10, 2, 2]

[3, 0, -2, 0, -1], 2 -> [-2, -2, -2, -1, -1]

This is a code golf challenge. Shortest answer in bytes wins. Standard loopholes apply and such.
Edit:

you may assume L is not empty
you do not have to handle the case where N>|L|
your answer should return a flat list

Sandbox

Do we have to handle an empty $L$?

Do we have to handle $N>|L|$?

"numeric list L" - all examples contain only non-negative integer elements - I suggest [3, 0, -2, 0, -1], 2

Ah, does the output have to be flat or is a list of list acceptable?

@Adam, no and no. i have updated the post

@JonathanAllan yes your output must be a flat list

@JonathanAllan non-positive test case added

APL (Dyalog Unicode), 40 bytesSBCS
Anonymous infix lambda. Takes \$N\$ as left argument and \$L\$ as right argument.
{p/⌊/¨(-p)↑¨↑∘⍵¨+\p←1+@(⍳⍺|l)⌊⍺⍴⍺÷⍨l←≢⍵}

Try it online!
{…} \$⍺:=N,\ ⍵:=L\$
 l←≢⍵ \$l:=|L|\$
 ⍺÷⍨ \$l\over N\$
 ⍺⍴ \$(\underbrace{\frac{l}N,\frac{l}N,\frac{l}N,\cdots,\frac{l}N}_{N\text{ elements}})\$
 ⌊ \$(\underbrace{\left\lfloor\frac{l}N\right\rfloor,\left\lfloor\frac{l}N\right\rfloor,\left\lfloor\frac{l}N\right\rfloor,\cdots,\left\lfloor\frac{l}N\right\rfloor}_{N\text{ elements}})\$
 1+@(…) increment at the following indices:
  ⍺|l \$|L|\bmod N\$
  ⍳ \$(1,2,3,…,|L|\bmod N)\$
 p← \$p:=(\underbrace{\overbrace{1+\left\lfloor\frac{l}N\right\rfloor,1+\left\lfloor\frac{l}N\right\rfloor,\cdots,1+\left\lfloor\frac{l}N\right\rfloor}^{|L|\bmod N\text{ elements}},\left\lfloor\frac{l}N\right\rfloor,\left\lfloor\frac{l}N\right\rfloor,\cdots,\left\lfloor\frac{l}N\right\rfloor}_{|n|\bmod N\text{ elements}})\$
 +\ cumulative sum of that list
 ↑∘⍵¨ for each element, take that many elements from \$L\$
 (-p)↑¨ for each list, take as many trailing elements as the corresponding number in \$p\$
 ⌊/¨ minimum of each list
 p/ replicate each minimum by the the corresponding number in \$p\$

Jelly, 7 bytes
œsṂṁ$€F

A dyadic Link accepting L on the left and N on the right which yields a list as specified.
Try it online! Or see the test-suite.
(Also œsµṂṁ)F is the same.)
How?
œsṂṁ$€F - Link: list of order-able items, L; positive integer, N
œs      - split L into N chucks, longer ones to the left
     €  - for each chunk:
    $   -   last two links as a monad - i.e. f(chunk):
  Ṃ     -     minimum of chunk
   ṁ    -     mould like chunk
      F - flatten

"mould like chunk"... gotta love the jelly builtins

JavaScript (ES6),  101  87 bytes
Takes input as (array)(n).
a=>n=>a.map(w=_=>--w?m:m=Math.min(...a.slice(p,p+=w=L/n+(i++<L%n)|0)),L=a.length,i=p=0)

Try it online!
How?
Variables

\$L\$ is the length of the input array
\$i\$ is the ID of the current bucket
\$w\$ is the width of the current bucket
\$m\$ is the minimum value in the current bucket
\$p\$ is a pointer to the starting point of the next bucket

Commented
a => n =>                     // given the input array a[] and the integer n
  a.map(w =                   // initialize w to a non-numeric value
  _ =>                        // for each value in a[]:
    --w ?                     //   decrement w; if it's not equal to 0:
      m                       //     append the current minimum
    :                         //   else:
      m =                     //     append the updated value of m
        Math.min(             //       which is the minimum value found in
          ...a.slice(         //         the slice of a[]
            p,                //           starting at p
            p +=              //           and ending at the updated value of p (-1):
              w =             //             update w:
                L / n +       //               floor(L / n) is the base width
                (i++ < L % n) //               add 1 if i is less than L mod n
                              //               (then increment i)
                | 0           //               apply the floor()
          )                   //         end of slice()
        ),                    //       end of Math.min()
    L = a.length,             //   initialize L
    i = p = 0                 //   start with i = p = 0
  )                           // end of map()

J, 52 50 47 42 39 37 35 32 27 bytes
](]#(<.//.~I.))[:+/-@[]\]=]

Try it online!
This solution doesn't use any of the arithmetic formulas. Instead it relies on
geometric transformations.
We'll use the example
5 f 0 1 2 3 4 5 6 7 8 9 10 11

to see how the transformations work:

]=] Does the input equal itself, elementwise?  This converts the input to ones:
1 1 1 1 1 1 1 1 1 1 1 1

-@[]\ Split it into rows whose size is 5 (the left arg), filling the final partial row with zeros:
1 1 1 1 1
1 1 1 1 1
1 1 0 0 0

[:+/ Sum the rows:
3 3 2 2 2

] (...(...)) <above result> Execute the verb in parens with that result (3 3 2 2 2) as the right arg, and the original list ] as the left arg.  Now we'll break down the verb in inner parens first...
<.//.~I. This is a dyadic hook which first transforms the right arg 3 3 2 2 2 using I., which duplicates the indexes in place according to the multiplier at each index.  Thus I. 3 3 2 2 2 gives:
0 0 0 1 1 1 2 2 3 3 4 4

<.//.~ Use this mask to group /.~ the implicit left arg (the original list):
0 0 0  1 1 1  2 2  3 3  4  4  <-- Mask
0 1 2  3 4 5  6 7  8 9  10 11 <-- Original List

<./ Returning the min of each group:
0 3 6 8 10

]#(  ...  ) Returning to the verb in outer parens: Make right arg ] (ie, 3 3 2 2 2) copies of # the result of the verb in the inner parens. Thus: make 3 copies of the min of the first group, 3 copies of the min of the 2nd group, 2 copies of the min of the third group, etc:
0 0 0 3 3 3 6 6 8 8 10 10

Pyth, 8 bytes
smLhSdcF

Try it online!
This answer is mostly straightforward in that c provides the appropriate splitting behaviour. After that, we map twice to each element of the inner list the element of that list which is minimal. The interesting part is performing this double map: mLhSd expands into mmhSdd.

R, 52 47 bytes
function(L,n)ave(L,sort(seq(0,a=L)%%n),FUN=min)

Try it online!
ave replaces each member of a group with the value provided by FUN applied to that group; the rest is just figuring out the groups.
Thanks to Robin Ryder for -5 bytes.

47 bytes

@RobinRyder thanks!

Python 3.8, 90 bytes
lambda L,N,x=0:sum([(w:=len(L)//N+(v<len(L)%N))*[min(L[x:(x:=x+w)])]for v in range(N)],[])

Try it online!

I really like what you did with the walrus operator there! Do you think it makes sense for me to say that, in a way, you were able to use the := operator to stuff variable definitions inside the lambda expression?

@RGS Yes, although since I needed x to be zero for the first use in the list comprehension I had to define it in the function's arguments.

sure. Very clever!

CJam, 25 bytes
q~\_,@d/m]/{_,\[:e<]*}%e_

Try it online!
Explanation
q~                         "Read whole input & eval";
  \                        "Swap the splitted-items down";
   _                       "Copy the list";
    ,                      "Find its length";
     @                     "Roll the 3rd-to-top on top";
      d                    "Convert the number to double";
       /                   "Divide them (resulting in a float)";
        m]                 "Find the ceiling of that number";
          /                "Divide the list into that many chunks";
           {         }%    "Map every item in that list";
            _,\            "Preserve the length of the list";
                :e<        "e< doesn't take a single list, so";
                           "we have to reduce by minimum";
               [   ]       "Turn this result into a list";
                    *      "Repeat the list that many times";
                       ]   "Put the result into a list";
                        e_ "Flatten the list";

Python, 118 bytes
def f(L,N):l=len(L);s=l//N;m=l%N;return sum([[min(L[s*i+i*(m>0):s*i+s+i*(m>0)+(i<m)])]*(s+(i<m))for i in range(N)],[])

Try it online!

Charcoal, 21 bytes
Ｆη⊞υＥ÷Ｌθ⁻ηι⊟θＦ⮌υＩＥι⌊ι

Try it online! Link is to verbose version of code. Explanation:
Ｆη

Loop from N down to 1.
⊞υＥ÷Ｌθ⁻ηι⊟θ

Remove the last |L|/N elements of L and add them to a separate list.
Ｆ⮌υＩＥι⌊ι

Reverse the secondary list to restore the elements to their original order, but map each to their minimum before implicitly printing them on separate lines.

Perl 6 Raku, 66 65 63 59 bytes
-4 bytes thanks to Jo King.
{flat map {.min xx$_},@^m.rotor((1,0 X+@m/$^n)Zxx@m%$n,$n)}

Try it online!
This function causes an exception when first executed, but subsequently works. In previous versions of Rakudo, it always worked, and I have filed a Rakudo bug. Thanks for helping me find it.
Explanation
{                                                         } # anonymous function with parameters @m (array) and $n (bucket size)
                                       @m/$^n               # calculate bucket size: length(@m) / $n
                                (1,0 X+      )              # make a list consisting of 1 + bucket-size, bucket-size
                                                            # using the cross-product metaoperator X with operator +
                                              Zxx@m%$n,$n   # repeat (1 + bucket-size) length(@m) % $n times
                                                            # and repeat bucket-size $n times (* didn't work)
                                                            # using the zip metaoperator Z with operator xx
                      @^m.rotor(                         )  # take batches of those sizes from the list @m
      map {.min xx$_},  # replace each bucket with its minimum repeated by its length
 flat                   # flatten the list

Previous version, 65 61 bytes
{$/=$^m/$^n;flat map {.min xx$_},$m.rotor(1+$/xx$m%$n,$/xx*)}

Try it online!
Explanation
{                                                           } # anonymous function with params $m (array) and $n (bucket size)
 $/=$^m/$^n;                                                  # calculate minimum bucket size $/
                                          1+$/xx$m%$n         # take (length of m)%n batches of size 1+$/
                                                     ,$/xx*   # and then as many batches of size $/ as possible
                                 $m.rotor(                 )  # from the list $m
                 map {.min xx$_},                             # replace each bucket with its minimum repeated by its length
            flat                                              # flatten the list

You can narrow down the bug to rotoring with a Seq of Seqs. Try it online!

@JoKing Thanks, I've updated the bug.

C (clang), 107 105 bytes
Z,x,y,i,m;f(*a,z,n){for(x=z%n,Z=z/n;m=*a,y=Z,z;a+=y)for(z-=i=y+=x-->0;i--;)wmemset(a,m=a[i]<m?a[i]:m,y);}

Try it online!
Thanks to @ceilingcat for saving 2

05AB1E, 7 5 bytes
äεWδ,

-2 bytes thanks to @Grimmy.
Prints each of the integers on a separated line.
Try it online or verify all test cases.
Outputting as a list would be 6 bytes instead:
äεWδ]˜

Try it online or verify all test cases.
Explanation:
ä       # Split the (implicit) input-list into the (implicit) input-integer
        # amount of pieces, with smaller pieces at the left side if not all are equal
 ε      # Map each inner integer-list to:
  W     #  Push the minimum (without popping the list itself)
   δ    #  Using this minimum, apply to each value in the list:
    ,   #   Print (this minimum) with trailing newline

ä       # Split the (implicit) input-list into the (implicit) input-integer
        # amount of pieces, with smaller pieces at the left side if not all are equal
 ε      # Map each inner integer-list to:
  W     #  Push the minimum (without popping the list itself)
   δ    #  Using this minimum, apply to each value in the list:
    ]   #   Close both this double-vectorized apply-each, as well as the map itself,
        #   leaving the minimums in the inner lists after the apply-each is finished
     ˜  # Flatten this list of integer-lists
        # (after which the resulting list is output implicitly as result)

5 bytes with vertical output: äεWδ=

iirc one element per line is an allowed-by-default output method for lists, but just in case it isn't, here's 6 bytes with horizontal output,

@Grimmy Ah, nice approach with =. I actually tried using the δ to create the list and get rid of the Duplicate, but couldn't really figure it out. I also had no idea using  δ] inside another map/loop would work like that. o.Ô That's pretty interesting.

Haskell, 158 145 bytes
Thank you @SirBogman and @PostRockGarfHunter for saving 13 bytes and for the great tip
Please feel free to improve it.
l%n=map(minimum.o)[0..t-1]where(t,w,v,g,a)=(length l,t`div`n,w+1,t`mod`n*v,map(l!!));n&b=div n b*b;o i|i<g=a[i&v..i&v+w]|b<-g+(i-g)&w=a[b..b+w-1]

Explanation
list % n=
  map
  (minimum . sublist)
  [0..listSize - 1]
  where
    (listSize, widthLastBlocks, widthFirstBlocks, lengthFirstBlocks, indecesToElem)=
      (length l                        -- t
      ,listSize`div`n                  -- w
      ,widthLastBlocks+1               -- v
      ,listSize`mod`n*widthFirstBlocks -- g
      ,map(list!!))                    -- a

    n & b = div n b * b -- bigest multiple of b smaller than n

    sublist i           -- o
      |i < lengthFirstBlocks =
        indecesToElem [i & widthFirstBlocks
                       ..
                       i&widthFirstBlocks + widthFirstBlocks - 1]
      |b <- lenghtFirstBlocks + (i - lengthFirstBlocks) & widthLastBlocks =
        indecesToElem [b..b + widthLastBlocks - 1]

Welcome to the site.  Nice to see Haskell.  where is rarely the answer though.  Here you can use bindings inside of a guard.  e.g. l%n|t<-length l,w<-div t n=....

@PostRockGarfHunter thank you, that's great, but how do I deal with o/sublist, since it's defined upon w and g?  I tried that and had some erros saying that these variables were not in scope.

I've taken a bit of a look and to be honest I can't really read your code.  Obviously that is not your fault it is golfed after all.  It is just pretty different from most golfed code I see so I don't really have the instincts.  I would suggest trying again from scratch keeping in mind that pattern guards are shorter than where and I think the result will be shorter, or even just keep it in mind for next time.  But I am not sure how to transform your current code into pattern guards since I don't have a good grasp of it.

151 bytes: Rearranged things a bit more without fully understanding the code. Could probably golf more.
Try it online!

Here's a 152 byte version where I moved a to the outer where and eliminated the inner where: Try it online.

145 bytes:
l%n=map(minimum.o)[0..t-1]where(t,w,v,g,a)=(length l,t\div`n,w+1,t`mod`nv,map(l!!));n&b=div n bb;o i|i<g=a[i&v..i&v+w]|b<-g+(i-g)&w=a[b..b+w-1][Try it online](https://tio.run/##XU7LboMwELz3KzZSQTgMFgaSpkr8JRESWCCwYpsopfiSf6fmklY97Ozu7GNmbL9uvTHraiInbXtPrHbafls@sWvO@ZyJ2o/9o09meCwY0DKZmN4N80gGc9PppXHwqQi1nbrG7Rdsb8xux9jZxUqGDXKk9uo8kX7qyyDbq44XzgOkvn6qSzakic4GFvswUpyr1AfZ1bbakaRueqP7Q7v5fTMkRB0dXoTgvKoj8a8vfg9QoMIRpzoqX@QnqATlIAE6gD5AFegIOgVmY4sQYbSl8q9YiRxZsUHwUKw/) Replaced|0<1=a[g+(i-g)&w..g+(i-g)&w+w-1]with|b<-g+(i-g)&w=a[b..b+w-1]`

I was trying to improve your solution again, but I ended up making a new one.

Ruby, 91 77 bytes
->l,n{(0..z=l.size).flat_map{|x|(k=l.slice!(0,z/n+(z%n>x ?1:0))).map{k.min}}}

Try it online!

In Ruby 2.7 save one byte with ->l,n{a=b=0;l.chunk{b+=(a+=1)>(w=l.size)/n+(b<w%n ?1:0)?a=1:0}.flat_map{[_2.min]*_2.size}}

Haskell, 116 bytes
p=replicate
[]&_=[]
f&(x:xs)=(p x$minimum$take x f)++(drop x f)&xs
f%n|(q,r)<-divMod(length f)n=f&((p r$q+1)++p n q)

Try it online!
The % operator is the bucket and minimize function, where f is the list and n is the bucket size.
The & operator is a helper that repeats x times the minimum of the first x elements of the list f, where x is the head of the right parameter list. The sum of the right parameter list may be greater than the length of the left parameter list, but the left parameter list must be divided evenly.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
How predictable is popular music?
The McGill Billboard Project annotates various audio features of songs from a random sample of the Billboard charts. I scraped this data to produce the following file of chord progressions:
chords.txt
Write the shortest code that outputs the above file (or its contents).
Edit: Here's a quick description of the notation to get you started:

N denotes no chord.
A:min denotes the A minor triad chord.
C#:sus4(b7,9) and other spicy chords are completely described here.

That's .... a really long list. Does the output have to be in order?

are compression/decompression libraries allowed?

Could you include a brief description of the chord format? Understanding what C#:sus4(b7,9) exactly means may help to compress it.

What prevents us from reading the file and printing it?

@RGS You can do that. As per the rules described in this meta post, your score would be your_code_size + 802213 + 1.

Ha ha, seriously! Clever way to ask us to find the shortest logic in pop music, will we be cited in the academic paper? :D Joke aside, what is N? Also I think it would have been better with simpler patterns extracted, or chords used in the songs rather than the whole songs..

@JoKing - Yes, the output must be in order.

@HymnsForDisco - Yes, compression/decompression libraries are allowed, but presumably, the best compressions will leverage insights from music theory.

@DustinG.Mixon I'm hugely interested, being a musician, but quite discouraged by the 125000+ lines of data, I have a work too :D is there a version with songs titles just for info? Another interesting part would be the relative aspect of notes, as the same progression can be transposed, but that's another matter, the way notes are written make this a bit difficult

@Kaddath - For the record, the file size is not unprecedented for this community. Song titles (and other interesting information) are available at The McGill Billboard Project website under "Index."

This challenge would be more interesting if (like the Moby Dick challenge) we hade to output something close to the file, with score depending on both code size and number of errors.

Java (JDK), 295709 47044 (gzipped file) + 943 (code) + 1 (file) + 67 (imports) = 48055 bytes
Examining the file manually (with some help from notepad++), I found that there were 976 unique entries in the file, formed of 36 unique characters (plus newlines):
#(),/123456789:ABCDEFGNXabdghijmnsu
I then looked for common patterns, and created a dictionary as follows (key = value):

:maj = ¬
:min = `
\r\nA = "
\r\nB = £
\r\nC = $
\r\nD = %
\r\nE = ^
\r\nF = &
\r\nG = *
\r\nN = _
\r\nX = -
:sus = +
:hdim = =
:dim = [
(9) = }
(#9) = ]
:7 = {
:5 = ~
:aug = ;
#11 = @
b7 = '
maj7 = <
b13 = >
:11 = ?
(11) = \
b:9 = Z
¬^¬ = H
¬%¬ = I
¬$¬ = J
¬"¬ = K
£b¬ = L
¬*¬ = M
b¬"b = O
¬&¬ = P
b¬^b = Q
+4(', = R
¬£ = S
+4(') = T
%b¬ = U
£`£ = V
`7%`7 = W
7"` = Y
"b{] = c
*`7 = e
:13^b = f
`7$ = k
%` = l
^` = o
"` = p
b`7^ = q
b{% = r
cc = t
oo = v
&#~ = w
__ = x
YY = y
&#¬ = z

I then find-and-replace using those items in order:
()->{String s = "A LONG STRING THAT I CAN'T PASTE HERE - SEE TIO LINK";
		String[] d=new String[]{"&#¬","z","YY","y","__","x","&#~","w","oo","v","cc","t","b{%","r","b`7^","q","\"`","p","^`","o","%`","l","`7$","k",":13^b","f","*`7","e","\"b{]","c","7\"`","Y","`7%`7","W","£`£","V","%b¬","U","+4(')","T","¬£","S","+4(',","R","b¬^b","Q","¬&¬","P","b¬\"b","O","¬*¬","M","£b¬","L","¬\"¬","K","¬$¬","J","¬%¬","I","¬^¬","H","b:9","Z","(11)","\\",":11","?","b13",">","maj7","<","b7","'","#11","@",":aug",";",":5","~",":7","{","(#9)","]","(9)","}",":dim","[",":hdim","=",":sus","+","\r\nX","-","\r\nN","_","\r\nG","*","\r\nF","&","\r\nE","^","\r\nD","%","\r\nC","$","\r\nB","£","\r\nA","\"",":min","`",":maj","¬"};
		for (int i=0;i<d.length;i+=2){s=s.replace(d[i+1],d[i]);}return s;}

TIO (sort of).
EDIT
By compressing the string, as suggested in the comments, this answer can then be made shorter.
Using the GZIPped version of the string in a file "f" (size 45708 bytes), the code can then be as follows:
import java.io.*;
import java.nio.file.*;
import java.util.zip.*;
()->{String s="",l;try{BufferedReader b=new BufferedReader(new InputStreamReader(new GZIPInputStream(new ByteArrayInputStream(Files.readAllBytes(Paths.get("f"))))));while((l=b.readLine())!=null){s+=l;}}catch(Exception e){}String[] d=new String[]{THE SAME DICTIONARY AS THE PREVIOUS CODE - REDACTED HERE TO MAKE ANSWER SHORT ENOUGH};for (int i=0;i<d.length;i+=2){s=s.replace(d[i+1],d[i]);}return s;}

FYI - If you zip your string, it's only 47,044 bytes, so I think this would beat my answer.

Python 3, 969 + 36208 (size of data file) = 37177 bytes
A mix of encoding and traditional compression.
I store each of the roots (the "letters") and index into an array to find them, then, if it's not N, X or the empty string (which don't have a "chord type" (combination of the quality and other stuff tacked on the end) and are immediately followed by a newline), I use the next byte to index a table of the "chord types".
The data file (named "b") is available on my GitHub.
import base64,zlib,io
x,y=eval(zlib.decompress(base64.decodebytes(b"eNocyAEGgEAYBtGrxIc/7CWqKiAAsYLuf4jsg2dM71VtqgXhN1whN4TGjtA4IE+ExoXQuAdPva3XnJ+q+sAVI4SBAHqXdCQkC4xxOM53eu/3T3axB0dl5w3bu5SrvWgtsi4XF5q3uHhQD/BG1T3LOLKaFjI9rZ4tmvwroGnl/wuZ7K4+jk01anfsKV9TuSfXUW7YkR5QP+RDcWIH4gvS2CE75o69zJ68eNxacS0HRvwgXMRwxbKWQHw4DuXQerKGqx/DLtgp9R28Y+yQHXOHdU/2HJ7iqVeue+KneqkxUM+oxTDxDrni4c87jxdaQgsyzSQ+pWKhvaHXH7547D1t0+MR0oB1iCGB1IWkDu0V3l8GaBwaJwvsG/3y8NHDL5Z7gT7qpJGLabRVjqgnc7IkT7jmHdsK0uMR6gEOjIAEZkAD1iGGBiTQhBTCYGPHjHyh5dAP3uvKJM5FUExLcs3r24KpQwwNSKAJXafkUh9E4u6iEJ8q5Xgdm6alqEMMDUggda3IvG9/E+Ga5xFD49aHrx77KQRp5KK5WGp1YaUskuSZrMmGYo2Lm3qAAyMggRnQgDE0IYVeQhhsDSA5NE7WMDtmpF9wLwrmc5/UIYGwA41MV17zpVDq0IAEmpD1Qz5U54rMW1/UoQEJZHyozv24g1j6PJS//vzqkX6NvJjC1CGGxDUi/YFykqJY42pa0LPxP0cbuWEvu5mi4teChg2hS+74qKaRxhigDg1IIIVM/049NpYLAINXQ3I=")))
f=io.BytesIO(zlib.decompress(open("b","rb").read()))
while 1:
 a=x[f.read(1)[0]];print(a if not a or a in"NX"else a+y[f.read(1)[0]])

Edit: I decided not to be lazy after all and go Google correct music terms.

It doesn't seem to work: IndexError: index out of range with the provided file

@GB I use the error out at the end to exit the loop

Ok, so I assume the output file is smaller than expected because of CR/LF. I can't verify the original because I have no access to dropbox from behind a company proxy.

@GB yeah, it should be because of the CR/LF, is the end Cb:maj(9) repeated and a final N?

+1 for better score than general compressing

Python 3, 23 + 802213 (size of file we want to reproduce) + 1
Quite a naïve answer IMO
lambda s:open(s).read()

This function takes as argument the file we want to reproduce and then prints it xD
Scoring as per this meta answer, linked by @Arnauld

Just to be clear, the purpose of my comment was actually to dissuade you from doing so. :-)

@Arnauld it is just a basic benchmark while you guys are trying to figure out the best encodings :)

Worst Golf Score Ever :P

@Kaddath Just look up some Lenguage/Unary answers, those score a lot worse. ;) This ~62 trillion bytes answer of mine is actually rather short for Lenguage. Usually it's more like this 5.71728886e+3431 bytes answer, haha. ;p

I don't think this counts as a serious contender.

@Grimmy should I delete it?

@Grimmy It's serious all the time there are no other answers

Python 3: 93943 = 91,752 + 1990 + 1
This is my messy attempt at a compression.
Sadly still worse than simply zipping the file though XD.
The information density of the file is not as great as it seems and there were several observable redundancies. Because of that I have doubts that there is a reasonable way to predict the data. I am prepared to be wrong though :-).
The code by itself is not golfed that much, since the main portion of the cost is the size of the compressed files. The decompressor is only 1990 bytes long.
The compression itself is done by Two separate huffman trees, implied ":" between them and two one-bit streams that act as a guides. Also there are few simple substitutions in place.

First huffman tree codes the first letter
Second huffman tree codes the portion that follows the ":"
First bit file (a) codes whether the line before the ":" consists of 0-1 or 2 characters
Second bit file (u) codes whether the second character before : is "b" or "#"

Lastly, all the files are compressed via zip since on my work computer we don't have anything else. Might try other compressors later on.
zip-input
This archive has to be in programs working directory.
The code itself is tied tightly to the file. It does not cover full format specifications listed by the author of the question. (Also, I have hard-coded the input file size into the decoder - after I missed the proper termination one times too many.)
There is definitely a room for improvements - for example few more substitutions tied to the numbers in brackets.
There might be a missing trailing newline in the output, that I somehow keep missing while trying to debug.
Huffman tree generator:
import heapq as h
import numpy as np
from bitarray import bitarray

class List:
    def __init__(self, char, freq):
        self.char = char
        self.freq = freq
        self.leftSon = None
        self.rightSon = None

    def __lt__(self, other):
        return self.freq < other.freq

    def check(self,arr,  prefix):
        if self.char is not None:
            arr.append((self.char, prefix))
        else:
            self.leftSon.check(arr, prefix + "0")
            self.rightSon.check(arr, prefix + "1")

    def encode(self):
        if self.char is None:
            toRet = "0"
            toRet += self.leftSon.encode()
            toRet += self.rightSon.encode()
        else:
            toRet = "1" + np.binary_repr(ord(self.char), 8)
        return toRet

class HuffmanTree:
    def __init__(self, inputList):
        a = []
        for x in inputList:
            h.heappush(a, List(x[0], x[1]))
        while len(a) > 1:
            first = h.heappop(a)
            second = h.heappop(a)
            new = List(None, first.freq + second.freq)
            new.leftSon = first
            new.rightSon = second
            h.heappush(a, new)
        self.root = a[0]
        self.encodeArray = []
        self.root.check(self.encodeArray, "")
        encodeDict = {}
        for x in self.encodeArray:
            encodeDict[x[0]] = x[1]
        self.encodeDict = encodeDict
        print(self.encodeArray)

    def encodeSelf(self):
        head = self.root
        bits = head.encode()
        x = bitarray()
        for b in bits:
            if b == "0":
                x.append(0b0)
            else:
                x.append(0b1)
        return x

The code to generate the support files:
import huffman
from bitarray import bitarray

a = ""
with open("chords.txt") as chr:
    a = chr.read()

def getCounts(l):
    counts = {}
    for x in l:
        if x in counts.keys():
            counts[x] += 1
        else:
            counts[x] = 1
    res = []
    for x in counts.keys():
        res.append((x, counts[x]))
    return res

def stringToBits(string):
    ret = bitarray()
    for x in string:
        if x =="0":
            ret.append(0b0)
        else:
            ret.append(0b1)
    return ret

lines = a.split("\n")
firstPart = []
secondPart = []
for i in lines:
    a = i.split(":")
    firstPart.append(a[0])
    if len(a) > 1:
        secondPart.append(a[1] + "\n")

###First part
Afile = ""
huffFile = ""
sharpFile = ""

firstPartChars = ""
fChar = []
sChar = []
for x in firstPart:
    firstPartChars += x
    if len(x) == 0:
        fChar.append("\n")
        Afile += "0"
    else:
        fChar.append(x[0])
    if len(x) == 1:
        Afile += "0"
    if len(x) == 2:
        Afile += "1"
        sChar.append(x[1])

print([x for x in set(fChar)])
print([x for x in set(sChar)])

fCharCount = getCounts(fChar)
sCharCount = getCounts(sChar)
firstHuff = huffman.HuffmanTree(fCharCount)
for char in fChar:
    code = firstHuff.encodeDict[char]
    huffFile += code

for char in sChar:
    if char == "b":
        sharpFile += "0"
    elif char == "#":
        sharpFile += "1"
    else:
        raise Exception("error in sharp file")

#######
#####Second part
sPartFile = ""
subs = {}
subs["maj"] = "~"
subs["min"] = "&"
subs["sus"] = "^"
subs["aug"] = "%"
subs["dim"] = "$"
subs["hdi"] = "@"
spPart = []
secSubPart = ""
for x in secondPart:
    c = x.replace("maj", "~").replace("min", "&").replace("sus", "^").replace("aug", "%")\
        .replace("dim", "$").replace("hdim", "@")
    spPart.append(c)
    secSubPart += c
secPartCounts = getCounts(secSubPart)
secondHuff = huffman.HuffmanTree(secPartCounts)
for x in secSubPart:
    sPartFile += secondHuff.encodeDict[x]

aBits = stringToBits(Afile)
huffBits = stringToBits(huffFile)
sharpBits = stringToBits(sharpFile)
sPartBits = stringToBits(sPartFile)
print("test")
with open("a", "wb") as t:
    aBits.tofile(t)
with open("h", "wb") as t:
    huffBits.tofile(t)
with open("u", "wb") as t:
    sharpBits.tofile(t)
with open("f", "wb") as t:
    sPartBits.tofile(t)

with open("i", "wb") as t:
    a = firstHuff.encodeSelf()
    a.tofile(t)
with open("j", "wb") as t:
    b = secondHuff.encodeSelf()
    b.tofile(t)

Finally the code itself:
from bitarray import bitarray as b
import zipfile
with zipfile.ZipFile("h.zip", 'r') as z:
    z.extractall(".")

class N:
    def __init__(s):
        s.c = None
        s.l = None
        s.r = None
    def i(s):
        return s.l == None
    def d(s, r):
        if s.i():
            return s.c
        else:
            if r.b() == 0:
                return s.l.d(r)
            else:
                return s.r.d(r)
class R:
    def __init__(s, bits):
        s.d = bits
        s.i = 0

    def b(s):
        t = s.d[s.i]
        s.i += 1
        return t

    def B(s):
        toRet = s.d[s.i:s.i + 8]
        s.i += 8
        return toRet

def rn(r):
    if r.b() == 1:
        n = N()
        n.c = r.B().tostring()
    else:
        left = rn(r)
        right = rn(r)
        n = N()
        n.l = left
        n.r = right
    return n

def bff(i):
    with open(i, "rb") as f:
        c = b()
        c.fromfile(f)
        return c

def huffRead(a):
    c = bff(a)
    r = R(c)
    n = rn(r)
    return n

fh = huffRead("i")
fp = R(bff("h"))
sh = huffRead("j")
sp = R(bff("f"))
af = R(bff("a"))
bp = R(bff("u"))

ft = ""
test = open("test", "w")
i=0
while i < 125784:
    i += 1
    tp = ""
    n = "\n"
    s = "#"
    b = "b"
    t = fh.d(fp)
    spr = True
    if af.b() == 0:
        if t == n:
            tp += t
            spr = False
        elif t == "N" or t == "X":
            tp += t + n
            spr = False
        else:
            tp += t + ":"
    else:
        tp += t
        if bp.b() == 1:
            tp += s + ":"
        else:
            tp += b + ":"
    if spr:
        x = sh.d(sp)
        while x != n:
            tp += x
            x = sh.d(sp)

        tp += x
    tp = tp.replace("~", "maj").replace("&", "min").replace("^", "sus")\
        .replace("%", "aug").replace("$", "dim").replace("@", "hdim")
    ft += tp
print(ft)

MATLAB, 55935 = 10 + 55924 + 1
Compress the text file as a 55924-byte zip file c and then run the code
unzip('c')
We add a byte to the score to account for the extra file.

bash, 802213 + 5 + 1 = 802219 bytes
cat<b

With a file named b containing the contents of chords.txt.

Bash, 39098 bytes
xz -c -d a

Try it online!
General compressing tool, also make them able to find source