[Question]
  [
This task is simple: Write a program or function that outputs the list of all musical notes (using English note names) from A♭ to G♯.
All notes without a name consisting of a single letter (i.e. black notes on a musical keyboard) should have their name printed twice, once as the sharp of a note, once as the flat of one. Sharp or flat notes that can be described with a single letter, like B♯ (C) or F♭ (E) should not be outputted.
Here is an example of the output:
```
Ab, A, A#, Bb, B, C, C#, Db, D, D#, Eb, E, F, F#, Gb, G, G#
```
# Specifications
* The program or function must not take any input.
* The notes may be printed in any order, and in any list output permitted by our [standard I/O rules](https://codegolf.meta.stackexchange.com/questions/2447/default-for-code-golf-input-output-methods)
* The sharp and flat Unicode symbols (♯/♭) may be substituted with `b`
and `#`
* As always, [Standard loopholes](https://codegolf.meta.stackexchange.com/questions/1061/loopholes-that-are-forbidden-by-default) are forbidden.
* As this is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), the smallest program, in bytes, wins.
  
[Answer]
# [Malbolge](https://github.com/TryItOnline/malbolge), ~~482~~ ~~370~~ 353 bytes
R1: Removed commas inbetween (as not required by the challenge)
R2: Shave off a few bytes
```
('<;_#!=6Z|{8xUwvt,PrqonKmk)"FhCUTdb?`+<;:[Z7YtVU2T|/g-O+i(gJrHc#EC~B{@zZxw:tt'r5Qo"!l/K-hUfe?bP``_Lo~[}|X2VCTR3Q+N`_^9+7Hji3ffdAc~w|u;]\wpon4VUSSQ.PONcb(JI^]#DCYX|@?>=<:u9NMRKo32MFj.C,Ae)>'<%:^"!~5:3WxwwuRts0q(Lnml)"Fhgfe"y?a`_zyxq7YXWlUj0RgfkjMb(JI^c\[Z~BAV?T=Rv987Mq44310FEi-,G@)>b&%#"8=6Z{{yyw/Sut1*)('Km$k(!Efe{zyx>`uz]r8ZXnm3TTih.PkNchg`&HFF[DY}Az
```
[Try it online!](https://tio.run/##HdCLdoEAAIDhZylDlnsscgnRDLmkqNxSKpfSWIlKr95sL/Cd//zGVpdMXVPCEIpXK5sIUPsQfK90Z52blRxfL@a5b5wSILknWGYn4SJcrWALAeWtGZtn/IyWGsEHSOtdu3KkQwQtr@EKdwezrPi1ODFBQM/0U3tWVXBpLIqbgRksnj6XnxEMjUzgobhZl2G0ezwgqrpryoHj25XV0vk2z4UZO51O0uPRUJag3td6FWkTPOc38HqtitnlIUX3TSRPkcc0kWwqiXq8GsXWIBAUMWR@dxybtn6yF2hwNvS/dk1VwAe@FTfu435BeW6us8csramnI/Wvy8uFELSaM5yp0bdyCaUuhQKSy5KdQyr52UjUpVg0ApZeZzzv8XAyU9vKvSegeN94O0FAR1W8l1sXbXd1LQnc2UAY5rBPj09Dea@JsS5JLtr8s@mG4S8 "Malbolge – Try It Online")
[Answer]
# [CP-1610](https://en.wikipedia.org/wiki/General_Instrument_CP1600) assembly ([Intellivision](https://en.wikipedia.org/wiki/Intellivision)), 31 DECLEs1 = 39 bytes
A routine taking an output pointer in **R4** and writing the notes there, separated with spaces. In the example code, we write directly to the screen.
### Hex dump (routine only)
```
275 001 2BD 03C 048 1DB 2B8 012 044 2A9 2BA 108 078 201 003 262
261 263 2FA 008 37A 140 225 00B 089 22C 011 2B7 018 210 000
```
### Full source
```
                ROMW    10              ; use 10-bit ROM width
                ORG     $4800           ; map this program at $4800
                ;; ------------------------------------------------------------- ;;
                ;;  test code                                                    ;;
                ;; ------------------------------------------------------------- ;;
4800            SDBD                    ; set up an interrupt service routine
4801            MVII    #isr,     R0    ; to do some minimal STIC initialization
4804            MVO     R0,       $100
4806            SWAP    R0
4807            MVO     R0,       $101
4809            EIS                     ; enable interrupts
480A            MVII    #$200,    R4    ; R4 = backtab pointer
480C            CALL    notes           ; invoke our routine
480F            DECR    R7              ; loop forever
                ;; ------------------------------------------------------------- ;;
                ;;  ISR                                                          ;;
                ;; ------------------------------------------------------------- ;;
      isr       PROC
4810            MVO     R0,       $0020 ; enable display
4812            CLRR    R0
4813            MVO     R0,       $0030 ; no horizontal delay
4815            MVO     R0,       $0031 ; no vertical delay
4817            MVO     R0,       $0032 ; no border extension
4819            MVII    #$D,      R0
481B            MVO     R0,       $0028 ; light-blue background
481D            MVO     R0,       $002C ; light-blue border
481F            JR      R5              ; return from ISR
                ENDP
                ;; ------------------------------------------------------------- ;;
                ;;  routine                                                      ;;
                ;; ------------------------------------------------------------- ;;
      notes     PROC
4820            PSHR    R5              ; save return address
4821            SDBD                    ; R5 = pointer to @@chr
4822            MVII    #@@chr,   R5
4825            CLRR    R3              ; R3 = 0 (space)
4826            MVII    #$12,     R0    ; R0 = bitmask = $12
4828            SWAP    R0,       2     ; extend it to $1212
4829  @@loop    MVI@    R5,       R1    ; R1 = next symbol
482A            MVII    #('A'-32)*8, R2 ; R2 = 'A' character
482C  @@note    SARC    R0              ; right shift the bitmask
482D            BC      @@next          ; skip this note if the carry is set
482F            MVO@    R2,       R4    ; append the note
4830            MVO@    R1,       R4    ; append the symbol
4831            MVO@    R3,       R4    ; append a space
4832  @@next    ADDI    #8,       R2    ; advance to the next note
4834            CMPI    #('H'-32)*8, R2 ; is it now a 'H'?
4836            BLT     @@note          ; if not, process the inner loop
4838            TSTR    R1              ; was the symbol a space?
4839            BNEQ    @@loop          ; if not, process the outer loop
483B            PULR    R7              ; return
483C  @@chr     DECLE   ('#'-32)*8      ; '#'
483D            DECLE   ('b'-32)*8      ; 'b'
483E            DECLE   0               ; space
                ENDP
```
### Output
[![output](https://i.stack.imgur.com/Tui88.gif)](https://i.stack.imgur.com/Tui88.gif)
*screenshot from [jzIntv](http://spatula-city.org/~im14u2c/intv/)*
---
*1. A CP-1610 opcode is encoded with a 10-bit value, known as a 'DECLE'. This routine is 31 DECLEs long, starting at $4820 and ending at $483E (included).*
[Answer]
# [Python 3](https://docs.python.org/3/), 50 bytes
```
print(*map(''.join,zip(3*'ADGBCEF',7*' '+5*'#b')))
```
[Try it online!](https://tio.run/##K6gsycjPM/7/v6AoM69EQys3sUBDXV0vKz8zT6cqs0DDWEvd0cXdydnVTV3HXEtdQV3bVEtdOUldU1Pz/38A "Python 3 – Try It Online")
Python 2: [48 bytes](https://tio.run/##K6gsycjPM/r/v6AoM69EITexQENdXS8rPzNPpyqzQMNYS93Rxd3J2dVNXcdcS11BXdtUS105SV1T8/9/AA "Python 2 – Try It Online")
This code can be adjusted as to include B# and Cb, at the cost of no additional bytes. This can be achieved by replacing `5` with `6`.
---
Additionally, it is (finally) shorter than just outputting the plain string:
# [Python 3](https://docs.python.org/3/), 51 bytes
```
exit('Ab A A# Bb B C C# Db D D# Eb E F F# Gb G G#')
```
[Try it online!](https://tio.run/##BcGxDYAwDADBVV5yEaiZwIkT72EJCRqgSAHTm7vnm8d9bZn7e86laKCoUINKowkWGCb0oDMYggeOS1kzfw "Python 3 – Try It Online")
Python 2: [50 bytes](https://tio.run/##BcGxDcAgDADBVV5yQZ8NDAbv4SppAEU0md6529@517wy9/vMUzRQVKhBpdEECwwTetAZDMEDx6Vk/g "Python 2 – Try It Online")
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), ~~16~~ ~~15~~ 13 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
```
Au…b #âŽ7×bûÏ
```
-2 bytes thanks to *@maxb*.
[Try it online.](https://tio.run/##AR4A4f9vc2FiaWX//0F14oCmYiAjw6LFvTfDl2LDu8OP//8)
Outputs as a list, where the single-char notes are with a trailing space.
**Explanation:**
```
Au             # Push the lowercase alphabet, and uppercase it
  …b #         # Push string "b #"
      â        # Take the cartesian product of both strings to create all possible pairs:
               #  ["Ab","A ","A#","Bb","B ","B#",...,"Zb","Z ","Z#"]
       Ž7×     # Push compressed integer 1999
          b    # Convert it to a binary string "11111001111"
           û   # Palindromize it to "111110011111110011111"
            Ï  # Only leave the notes in the list at the truthy values (1), (the trailing
               # items beyond the length of this binary string are also discarded)
               # (after which the result is output implicitly)
```
[See this 05AB1E tip of mine (section *How to compress large integers?*)](https://codegolf.stackexchange.com/a/166851/52210) to understand why `Ž7×` is `1999`.
`Ž7×` could alternatively be `₄·<` (1000, double, decrease by 1) for the same byte-count.
[Answer]
# [Perl 6](https://github.com/nxadm/rakudo-pkg), 41 bytes
```
{S:g/[E|B]\#...//}o{'A'..'G'X~'b #'.comb}
```
[Try it online!](https://tio.run/##K0gtyjH7n1upoJamYPu/OtgqXT/atcYpNkZZT09PX782v1rdUV1PT91dPaJOPUlBWV0vOT83qfZ/cWKlQpqG5n8A "Perl 6 – Try It Online")
Simple cross product of the notes and the sharps/flats, followed by removing the extra invalid notes. This is an anonymous code block that produces the string:
```
Ab A  A# Bb B   C  C# Db D  D# Eb E   F  F# Gb G  G#
```
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 18?\* 20 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
```
ØAḣ7µp⁾b#Żs6ḣ€4ẎḊ;W€
```
A monadic Link returning a list of lists of characters.
\* If a mixed list of (a) lists of characters and (b) characters is acceptable remove the trailing `W€` for 18.
**[Try it online!](https://tio.run/##y0rNyan8///wDMeHOxabH9pa8KhxX5Ly0d3FZkD@o6Y1Jg939T3c0WUdDmT/P7QoCyito/AfAA "Jelly – Try It Online")**
### How?
```
ØAḣ7µp⁾b#Żs6ḣ€4ẎḊ;W€ - Link: no argument
ØA                   - list of characters     [A-Z]
  ḣ7                 - head to 7              "ABCDEFG"
    µ                - new monadic link (call that X)
      ⁾b#            - list of characters     "b#"
     p               - Cartesian product      ["Ab","A#","Bb","B#","Cb","C#","Db","D#","Eb","E#","Fb","F#","Gb","G#"]
         Ż           - prepend a zero       [0,"Ab","A#","Bb","B#","Cb","C#","Db","D#","Eb","E#","Fb","F#","Gb","G#"]
          s6         - split into sixes    [[0,"Ab","A#","Bb","B#","Cb"],["C#","Db","D#","Eb","E#","Fb"],["F#","Gb","G#"]]
            ḣ€4      - head each to 4      [[0,"Ab","A#","Bb"],["C#","Db","D#","Eb"],["F#","Gb","G#"]]
               Ẏ     - tighten              [0,"Ab","A#","Bb","C#","Db","D#","Eb","F#","Gb","G#"]
                Ḋ    - dequeue                ["Ab","A#","Bb","C#","Db","D#","Eb","F#","Gb","G#"]
                  W€ - wrap each (of X)       ["A","B","C","D","E","F","G"]
                 ;   - concatenate            ["Ab","A#","Bb","C#","Db","D#","Eb","F#","Gb","G#","A","B","C","D","E","F","G"]
```
[Answer]
# [Retina 0.8.2](https://github.com/m-ender/retina/wiki/The-Language/a950ad7d925ec9316e3e2fb2cf5d49fd15d23e3d), 33 bytes
```
ABCDEFG
.
 $&b $& $&#
 [BE]#...
```
[Try it online!](https://tio.run/##K0otycxL/P@fy9HJ2cXVzZ1Lj0tBRS0JiIFImUsh2sk1VllPT4/r/38A "Retina 0.8.2 – Try It Online") Explanation:
```
ABCDEFG
```
Insert the base note names.
```
.
 $&b $& $&#
```
Expand each note to include flat and sharp versions.
```
 [BE]#...
```
Delete `B#`, `E#` and also the notes following them (`Cb` and `Eb`).
[Answer]
# [R](https://www.r-project.org/), 50 bytes
```
cat("Ab,A,A#,Bb,B,C,C#,Db,D,D#,Eb,E,F,F#,Gb,G,G#")
```
[Try it online!](https://tio.run/##BcHBDcAgDATBXrhPkLYJg8F14HSA0r8zc6ve8z3NEsPESAaTKTxxXKxksdkikiDUetUP "R – Try It Online")
Boring answer.
# [R](https://www.r-project.org/), 60 bytes
```
cat(outer(LETTERS[1:7],c("#","","b"),paste0)[-c(2,5,17,20)])
```
[Try it online!](https://tio.run/##K/r/PzmxRCO/tCS1SMPHNSTENSg42tDKPFYnWUNJWUlHCYiSlDR1ChKLS1INNKN1kzWMdEx1DM11jAw0YzX//wcA "R – Try It Online")
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 21 bytes
```
Φ⪪⭆…α⁷⭆b #⁺ιλ²§↨⊖⊘φ²κ
```
[Try it online!](https://tio.run/##RYvBCsIwEER/JdTLBiKkXjx40oroQSj0C9Z0scFtGtJt0a@PuYiH4cG8GTdgchNyzm3yQeDiWShBF9kLdFK65x0jNB/H1AxTBDRqr436q@qhNpVRLS8zeKNY66J3JUe5hZ7ecMKZ4Ewu0UhBqIcr8lpQW2t/21d5HXLO25W/ "Charcoal – Try It Online") Link is to verbose version of code. Explanation:
```
    α                   Predefined variable uppercase alphabet
   … ⁷                  First 7 letters i.e. `ABCEDFG`
  ⭆                     Map over characters and join
       b #              Literal string `b #`
      ⭆                 Map over characters and join
          ⁺ιλ           Concatenate outer and inner characters
 ⪪           ²          Split back into substrings of length 2
Φ                       Filter where nonzero
                  φ     Predefined variable 1000
                 ⊘      Halved i.e. 500
                ⊖       Decremented i.e 499
               ↨   ²    Converted to base 2 i.e. [1, 1, 1, 1, 1, 0, 0, 1, 1]
              §     κ   Cyclically indexed by outer index
                        Implicitly print matching values on separate lines
```
[Answer]
# [Stax](https://github.com/tomtheisen/stax), ~~17~~ 15 [bytes](https://github.com/tomtheisen/stax/blob/master/docs/packed.md#packed-stax)
```
║♠+I▬┌ó£ΔφΔ`╗╨Å
```
[Run and debug it](https://staxlang.xyz/#p=ba062b4916daa29cffedff60bbd08f&i=&a=1)
Bonus program: [print the fancy symbols](https://staxlang.xyz/#p=8119b28c65e3c9a847e07684d593273f040372&i=&a=1)
[Answer]
# [Japt](https://github.com/ETHproductions/japt), ~~23~~ 22 bytes
```
;B¯7
ï"b #" fÏÄ %9%8<6
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=O0KvNwrvImIgIyIgZs/EICU5JTg8Ng&input=MCAgMSAgMiAgMyAgNCAgNSAgNiAgNyAgOCAgOSAgMTAgMTEgMTIgMTMgMTQgMTUgMTYgMTcgMTggMTkgMjAKQWIsQSAsQSMsQmIsQiAsICAgICAsQyAsQyMsRGIsRCAsRCMsRWIsRSAsICAgICAsRiAsRiMsR2IsRyAsRyMKCjQsNiwxMywxNQ)
```
;B          Alphabet
  ¯7        First seven characters ("ABCDEFG")
            Assign to U
ï"b #"       Cartesian product with "b #" ("Ab,A ,A#,Bb,B ,B#,Cb,C ,C#,Db,D ,D#,Eb,E ,E#,Fb,F ,F#,Gb,G ,G#")
f           Filter:
 ÏÄ           Is index + 1
   %9%8       Mod 9 Mod 8
     <6       Less than 6
            End filter ("Ab,A ,A#,Bb,B ,C ,C#,Db,D ,D#,Eb,E ,F ,F#,Gb,G ,G#")
```
[Answer]
# dzaima/APL REPL, ~~38~~ ~~28~~ 25 bytes
```
(⊤2056111)⌿,' b#'∘.,⍨7↑⎕A
```
[Try it online!](https://tio.run/##SyzI0U2pSszMTfwPBBqPupYYGZiaGRoaaj7q2a@jrpCkrP6oY4aezqPeFeaP2iY@6pvq@C@/oCQzP6/4v24xAA "APL (dzaima/APL) – Try It Online")
[Answer]
# [PHP](https://php.net/), 65 bytes
Makes the list with a loop. Items are separated by `_` with a trailing separator.
```
for(;$l=ABCDEFG[$i++];)echo$l._.[$a="$l#_",$a.$b=$l.b_,$b][$i%3];
```
[Try it online!](https://tio.run/##K8go@G9jXwAk0/KLNKxVcmwdnZxdXN3co1UytbVjrTVTkzPyVXL04vWiVRJtlVRylOOVdFQS9VSSbIGiSfE6KkmxQKWqxrHW//8DAA "PHP – Try It Online")
---
# [PHP](https://php.net/), 43 bytes
PHP outputs anything as is, when not inside `<?php` and `?>` tags.
```
Ab,A,A#,Bb,B,C,C#,Db,D,D#,Eb,E,F,F#,Gb,G,G#
```
[Try it online!](https://tio.run/##BcGxAQAgCASxYb69JVCEPb6ydP8Gk3ffTJggxDKLzRZpkhTHHIoSbZrWzAc "PHP – Try It Online")
[Answer]
# Commodore C64/TheC64 Mini (probably other Commodore 8-bit BASIC variants) - 52 tokenized BASIC bytes
```
 0?"{CTRL+N}Ab A A# Bb B C C# Db D D# Eb E F F# Gb GG#
```
Pressing the `CTRL` key plus `N` on the C64 keyboard goes into 'business mode' on the character set for upper/lower case characters. We may print this out in a string in one byte / token; and as we have 40 columns, the space from G to G# is not required.
We do not need to close the string in this case as it is not a multi-statemented line with a `:` separator.
How this looks on a Commodore C64 (and compatibles) screen is shown below.
[![Commodore 64 musical notes](https://i.stack.imgur.com/6nZ8a.png)](https://i.stack.imgur.com/6nZ8a.png)
[Answer]
# [Ruby](https://www.ruby-lang.org/), 43 bytes
```
p (2..18).map{|i|"FCGDAEB"[i%7]+"b #"[i/7]}
```
[Try it online!](https://tio.run/##KypNqvz/v0BBw0hPz9BCUy83saC6JrNGyc3Z3cXR1UkpOlPVPFZbKUlBGcjUN4@t/f8fAA "Ruby – Try It Online")
With the range `0..20` this would print an array containing all the flats, all the naturals and all the sharps. The undesired ones `Fb Cb E# B#` are omitted by using the range `2..18`
The notes are printed out ordered according to <https://en.wikipedia.org/wiki/Circle_of_fifths> , or in other words ascending by 7 semitones (a frequency ratio of almost exactly 1.5) each time. 
This leads to the note letter order given, in which each note is five degrees inclusive (known as a "fifth") above the previous one. For example `F->C` is `FGABC` 
[Answer]
# [brainfuck](https://github.com/TryItOnline/brainfuck), 106 bytes
```
+++[[-<+>>++<]>]<<[-<->]++<<++<,+<-<[->+>+<<]<+[>>>>>+>-[<.<<<.>.[<]]>[>]<+[---<.<.<.[<]]>[>]<++<.<<.<<<-]
```
[Try it online!](https://tio.run/##RYpBCoBADAMfFLMvCPlI6UEFQQQPgu9f25MpOcw027Oe9/Hu15wAIijYgNIpFdFZpOoCsYzh4hTCHZihIWl4hDId7h/JsnW/Q896yZzzAw "brainfuck – Try It Online")
Outputs each note separated by carriage returns.
[Answer]
# [Zsh](https://www.zsh.org/), 36 bytes
```
<<<${${(F):-{A..G}{b,,#}}//[BE]#???}
```
An uglier solution, but it saves two characters. `(F)` joins a list on newlines, and `//[BE]#???` removes the parts of the string we need.
[Try it online!](https://tio.run/##qyrO@P/fxsZGpVqlWsNN00q32lFPz722OklHR7m2Vl8/2sk1Vtne3r72/38A "Zsh – Try It Online")
---
## [Zsh](https://www.zsh.org/), 38 bytes
```
<<<${${:-{A..G}{b,,#}}:#([BE]#|[CF]b)}
```
I always enjoy it when Zsh beats Perl (hopefully I don't speak too soon...).
```
<<<${${:-{A..G}{b,,#}}:#([BE]#|[CF]b)}
     ${:-             }                 # empty-fallback, basically an anonymous parameter expansion
         {A..G}{b,,#}                   # Cross product range A-G with b,(nothing),#
   ${                 :#             }  # Remove matching elements
                        ([BE]#|[CF]b)   # B#, E#, Cb, Fb
<<<                                     # Print to stdout
```
[Try it online!](https://tio.run/##qyrO@P/fxsZGpVql2kq32lFPz722OklHR7m21kpZI9rJNVa5JtrZLTZJs/b/fwA "Zsh – Try It Online")
[Answer]
# [Lost](https://github.com/Wheatwizard/Lost), 105 bytes
```
v<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>
>%?"Ab A A# Bb B C C# Db D D# Eb E F F# Gb G G\9"-+@
```
Outputs with `#b` and space delimiter.
[Try it online](https://tio.run/##dcG9CYAwEIDR3ik@EqwkAwgSvfwuYXW1YKG4/jlB3rvu5zX7tqE4MsV5d6II4klKIpM9RSkUT1UqjebpSqefqwvLYWZBfg) or [verify that it's deterministic](https://tio.run/##dcG7CYBAEEDB3CoeLkZyBQhyev8OjIw2FgwU218ruJnrfl6zb@3yPYOftjEogSBEJZJIQlYyWShKoVKFpjTauYxu3s3MBXPHDw).
### Explanation:
**Explanation of the language in general:**
Lost is a 2D path-walking language. Most 2D path-walking languages start at the top-left position and travel towards the right by default. Lost is unique however, in that ***both the start position AND starting direction it travels in is completely random***. So making the program deterministic, meaning it will have the same output regardless of where it starts or travels, can be quite tricky.
A Lost program of 2 rows and 5 characters per row can have 40 possible program flows. It can start on any one of the 10 characters in the program, and it can start traveling up/north, down/south, left/west, or right/east.
In Lost you therefore want to lead everything to a starting position, so it'll follow the designed path you want it to. In addition, you'll usually have to clean the stack when it starts somewhere in the middle.
**Explanation of the program:**
All arrows, including the reflect `\` in the string, will lead the path towards the leading `>` on the second line. From there the program flow is as follows:
* `>`: travel in an east/right direction
* `%`: Put the safety 'off'. In a Lost program, an `@` will terminate the program, but only when the safety is 'off'. When the program starts, the safety is always 'on' by default, otherwise a program flow starting at the exit character `@` would immediately terminate without doing anything. The `%` will turn this safety 'off', so when we now encounter an `@` the program will terminate (if the safety is still 'on', the `@` will be a no-op instead).
* `?`: Clean the top value on the stack. In some program flows it's highly likely we have a partial string on the stack, so we use this to wipe the stack clean of that potential string.
* `"`: Start a string, which means it will push the integer code-points of the characters used.
* `Ab A A# Bb B C C# Db D D# Eb E F F# Gb G G\9`: Push the code-points for these characters, being `65 98 32 65 32 65 35 32 66 98 32 66 32 67 32 67 35 32 68 98 32 68 32 68 35 32 69 98 32 69 32 70 32 70 35 32 71 98 32 71 32 71 92 57` respectively
* `"`: We're done pushing code-points of this string
* `-+`: Subtract the top two values from one another: (92-57=) `35`
* `@`: Terminate the program if the safety is 'off' (which it is at this point). After which all the values on the stack will be output implicitly. Using the `-A` program argument flag, these code-points will be output as characters instead.
*Minor note:* The top part could also have been `v<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<` instead. Lost will wrap around to the other side when moving in a direction. So using `v<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>` could be a slightly shorter path, and since it's the same byte-count anyway, why not use it. :)
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 21 bytes
```
ØAḣ7;p¥⁾b#“¿€×Ø‘œPẎẎ€
```
[Try it online!](https://tio.run/##y0rNyan8///wDMeHOxabWxccWvqocV@S8qOGOYf2P2pac3j64RmPGmYcnRzwcFcfEAGF/h9uPzrp4c4Z/wE "Jelly – Try It Online")
[Answer]
# [Brachylog](https://github.com/JCumin/Brachylog), 36 bytes
```
"#b"ẹ,Ẹ↺;Ṇh₇ᵗ↔{∋ᵐc}ᶠ⟨h₅ct₁₄⟩⟨h₁₂ct₅⟩
```
[Try it online!](https://tio.run/##SypKTM6ozMlPN/r/X0k5Senhrp06D3fteNS2y/rhzraMR03tD7dOf9Q2pfpRR/fDrROSax9uW/Bo/gqgRGtyyaOmxkdNLY/mr4SIADlNIMFWoMj///@jAA "Brachylog – Try It Online")
I'm currently in the process of brute-forcing the powerset index that would let me get rid of `⟨h₅ct₁₄⟩⟨h₁₂ct₅⟩` (and by extension `↺`, since the output doesn't need to be in the same order as the example output), but it's taking quite a while... maybe I should put a minute aside to actually work out what order sublists are generated in, and compute the index that way...
[Answer]
# [Canvas](https://github.com/dzaima/Canvas), 23 [bytes](https://github.com/dzaima/Canvas/blob/master/files/chartable.md)
```
Ｚ７ｍ｛#＋¹¹b＋］｛“╷!↕„２┬²＠？Ｐ
```
[Try it here!](https://dzaima.github.io/Canvas/?u=JXVGRjNBJXVGRjE3JXVGRjREJXVGRjVCJTIzJXVGRjBCJUI5JUI5YiV1RkYwQiV1RkYzRCV1RkY1QiV1MjAxQyV1MjU3NyUyMSV1MjE5NSV1MjAxRSV1RkYxMiV1MjUyQyVCMiV1RkYyMCV1RkYxRiV1RkYzMA__,v=8)
[22 bytes](https://dzaima.github.io/Canvas/?u=JXUyNTc3JTIxJXUyMTk1JXUyMDFFJXVGRjNBJXVGRjE3JXVGRjREJXVGRjVCJTIzJXVGRjBCJUI5JUI5YiV1RkYwQiV1RkYzRCV1RkY1QiV1RkYxQiV1RkYxMiV1RkY0RSV1MjUxNCV1RkYwQSV1RkYzMA__,v=8) with extra newlines in the output
[Answer]
# [Pyth](https://github.com/isaacg1/pyth), ~~23~~ 21 bytes
```
s<R7c.>*<r1G7"b #"2 9
```
[Try it online!](https://tio.run/##K6gsyfj/v9gmyDxZz07LpsjQ3VwpSUFZyUjB8v9/AA "Pyth – Try It Online")
```
s<R7c.>*<r1G7"b #"2 9   Implicit: G=lowercase alphabet
         r1G            Convert G to upper case
        <   7           First 7 characters
       *     "b #"      Cartesian product with "b #"
     .>           2     Rotate the above 2 places to the right
    c               9   Chop into pieces of length 9
 <R7                    Trim each to length 7
s                       Flatten, implicit print
```
Edit: Partial rewrite to save 2 bytes, previous version: `s%2c*<r1G7"b #"xLG"fhoq` [Try it online!](https://tio.run/##K6gsyfj/v1jVKFnLpsjQ3VwpSUFZqcLHXSktI7/w/38A "Pyth – Try It Online")
[Answer]
# T-SQL, 124 bytes
```
SELECT value+a
FROM STRING_SPLIT('A-B-C-D-E-F-G','-')
    ,(VALUES('b'),(''),('#'))b(a)
WHERE value+a NOT IN ('B#','E#','Cb','Fb')
```
Line breaks are for display purposes only.
Longer but much more interesting than the **trivial version (50 bytes)**:
```
PRINT'Ab,A,A#,Bb,B,C,C#,Db,D,D#,Eb,E,F,F#,Gb,G,G#'
```
[Answer]
## [Keg](https://github.com/JonoCode9374/Keg), 43 bytes
The string, compressed.
```
AbAA\#BbBCC\#DbDD\#EbEFF\#GbGG\#(:H<[ $]')'
```
[TIO](https://tio.run/##y05N///fMcnRMUbZKcnJ2TlG2SXJxSVG2TXJ1c0tRtk9yd09RlnDysMmWkElVl1T/f9/AA)
[Answer]
# [Z80Golf](https://github.com/lynn/z80golf), ~~31~~ 29 bytes
```
00000000: 9d5b dc6d df7f 0603 3e40 d13c cb3a 3008  .[.m....>@.<.:0.
00000010: fff5 7b2f ffaf fff1 20f1 10ec 76         ..{/.... ...v
```
[Try it online!](https://tio.run/##NYwxDsIwEAR7XrEvONY5YocIIf6RKrZzNCA6CvJ4cxFkitFU8xl4fz2sNf4Zca59Ri2xoloyMFKhy4moQQtK1hlKDoBM8hTnepOLjJTD7xD8YWY9Uu7Ma95kAR1dgUtBitgRWY/bw0PerX0B "Z80Golf – Try It Online")
**Explanation**:
Z80Golf is just a simple fantasy machine based on the Z80 8-bit CPU. The program is loaded at memory location `0x0000`, and the rest of the memory is filled with zeroes. Output is done by calling `0x8000`, which will output the value of register A as a character.
The program starts with the data that will be processed, 6 bytes in total. Each pair of bytes specifies a note suffix, and a bitmask controlling which of the letters can be combined with this note. To save bytes, the suffix character is inverted (`xor 0xff`) -- this allows the data to be executed as instructions with little side effects, making it possible to remove a jump that skips this data:
```
               ;    GFEDCBA
    db 0xff^'b', 0b01011011 ; Ab Bb Db Eb Gb
    db 0xff^'#', 0b01101101 ; A# C# D# F# G#
    db 0xff^' ', 0b01111111 ; A  B  C  D  E  F  G
skip_data:
```
This is how the CPU decodes this:
```
    sbc a, l  ; a subtraction with carry on registers we don't care about
    ld e, e   ; put the E register back into itself. This instruction is useless
              ; but still exists to make the encoding regular.
    call c, 0xdf6d ; if the carry flag is set, call a function. The carry flag isn't set
              ; because of the initial register values (all zeroes) when the sbc above
              ; was executed
    ld a, a   ; as above, put A back into itself.
```
This data is read two bytes at a time into the DE register pair. The stack pointer is used to point to the next element. It starts out at 0, and because the Z80 uses a full, descending stack, any pops will read the next data pair -- all stack operations are 16-bit.
The outer loop is implemented with a decrementing counter in the B register, for which the Z80 provides special support in the form of the `djnz` instruction:
```
    ld b, 3
process_pair:
    ...
    djnz process_pair
    halt
```
The current letter is held in the A register. Because the increment fits well at the start of the loop, we load one less than the actual start value of `A`:
```
process_pair:
    ld a, 'A'-1
    pop de ; D = bitmask, E = suffix character
process_note:
    inc a
    srl d ; put the current bitmask bit in the carry flag
          ; also sets the zero flag if this is the last note in the pair
    jr nc, skip
    ; Print the note. Note that we need to preserve the zero flag to check it in the
    ; loop condition later.
    rst $38 ; Short encoding of call $0038.
            ; Because the program is so short, the memory in the 0038..8000 range
            ; is filled with zeroes, which happens to be the encoding for a no-op.
            ; The execution will therefore fall-through to the character-print hook.
    push af ; Save the letter on the stack (which will be just to the left of the
            ; unprocessed data) to free up A for printing other characters.
            ; (only 16-bit register pairs can be saved, so we also push the flags)
    ld a, e
    cpl     ; Undo the inversion used to make the execution fall-through the data.
            ; Done again each iteration because it takes less bytes to operate
            ; on the A register.
    rst $38 ; Print the suffix.
    xor a   ; Standard assembly practice of setting a register to zero by XORing it
            ; with itself. Saves a byte over a simple `ld a, 0`.
    rst $38 ; Print a null byte as a separator.
    pop af  ; Restore the current letter from the stack.
skip:
    jr nz, process_note ; If the zero flag (last changed at the srl d) is not set,
                        ; loop once again
    djnz process_pair
    halt
```
[Answer]
# [APL (Dyalog Unicode)](https://www.dyalog.com/), 45 bytes
```
2↓(,¨⎕A)⎕R', &'⊢'AbAA#BbBCC#DbDD#EbEFF#GbGG#'
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT///3@hR22QNnUMrHvVNddQEEkHqOgpq6o@6Fqk7Jjk6KjslOTk7K7skubgouya5urkpuye5uyur/0971DbhUW8fUIOn/6Ou5kPrjR@1TQTygoOcgWSIh2fw/zQA "APL (Dyalog Unicode) – Try It Online")
Simple `⎕R`eplace operation, prepending `,` to each element in the string that matches each letter in the `⎕A`lphabet, then dropping the first 2 characters, which are `,`.
[Answer]
# Brainfuck, 214 Bytes
```
>>>>++++++++[<++++<++++<++++++++++++<++++++++>>>>-]<<+++<++<+.>.>>.<<<.>>>.<<<.>>.>.<<<+.>.>>.<<<.>>>.<<<+.>>>.<<<.>>.>.<<<+.>.>>.<<<.>>>.<<<.>>.>.<<<+.>.>>.<<<.>>>.<<<+.>>>.<<<.>>.>.<<<+.>.>>.<<<.>>>.<<<.>>.>.<<<+
```
[Try it Online!](https://tio.run/##SypKzMxLK03O/v/fDgi0oSDaBkQiCBiAc0CKdWNtbCBiNtp6dnp2dno2NjZACkbrgRmYUtpEqKGa9v//AQ)
[Answer]
# [JavaScript (Node.js)](https://nodejs.org), 84 bytes
```
_=>[...'ABCDEFG'].map((n,i)=>`${i%3!=2?n+'b,':''}${n}${i%3!=1?`,${n}#`:''}`).join`,`
```
[Try it online!](https://tio.run/##y0osSyxOLsosKNHNy09J/Z9m@z/e1i5aT09P3dHJ2cXVzV09Vi83sUBDI08nU9PWLkGlOlPVWNHWyD5PWz1JR91KXb1WpTqvFipsaJ@gA@IqJ4AkEjT1svIz8xJ0Ev4n5@cV5@ek6uXkp2ukaWhqWv8HAA "JavaScript (Node.js) – Try It Online")
Just returning the string (as shown below) would be shorter by 36 bytes, but where's the fun in that?
```
_=>'Ab,A,A#,Bb,B,C,C#,Db,D,D#,Eb,E,F,F#,Gb,G,G#'
```
[Answer]
# [brainfuck](https://github.com/TryItOnline/brainfuck), ~~255~~ 115 bytes
```
--[----->+<]>-----[<+>>+>+<<-]>>+<<<-[->+++<]>+++[->>>+>+<
<<<]>>>>--->+++++++[-<<<<.>.>>.<<<.>>>.<<<.>>.>.<<<+>>>>]
```
[Try it online!](https://tio.run/##SypKzMxLK03O/v9fVzdaFwTstG1i7cCsaBttOzttIN9GN9YORNkAldhpa4MUAEkgGyptAxTQA0KQNj0gD8iyg9J6YIY2WHZQS/3/DwA "brainfuck – Try It Online")
[Answer]
# [Bash 5](https://www.gnu.org/software/bash/), 42 bytes
```
x=`echo {A..G}{b,,#}`;echo ${x//[BE]#???/}
```
Output:
```
Ab A A# Bb B C C# Db D D# Eb E F F# Gb G G#
```
]