Output the list of musical notesPrint me a scaleMusical Score InterpreterPlaying the Name GameGenerate the names of the keys on a pianoTuning Strings­Notes to TablatureFind the longest musical substringInsta-Name… Just Add Coder!What is the frequency of this note?Can this value be made with unique coins and/or notes?Is this a Major Scale (or equivalent)?

Causal Diagrams using Wolfram?

How far did Gandalf and the Balrog drop from the bridge in Moria?

Pokemon Go: Gym Badge Over-completed?

Why aren't rainbows blurred-out into nothing after they are produced?

How can I find files in directories listed in a file?

A+ rating still unsecure by chrome's opinion

When was "Fredo" an insult to Italian-Americans?

How can I find an old paper when the usual methods fail?

Why does Japan use the same type of AC power outlet as the US?

Boss wants me to ignore a software API license

Scam? Phone call from "Department of Social Security" asking me to call back

Doesn't the speed of light limit imply the same electron can be annihilated twice?

What kind of liquid can be seen 'leaking' from the upper surface of the wing of a Boeing 737-800?

Are there examples in Tanach of 3 or more parties having an ongoing conversation?

Sword-and-sorcery flick from the 80s with magic scarf

Sum Square Difference, which way is more Pythonic?

Escape Velocity - Won't the orbital path just become larger with higher initial velocity?

Why did IBM make the PC BIOS source code public?

Is it really Security Misconfiguration to show a version number?

Do I have to cite common CS algorithms?

What are the advantages of this gold finger shape?

Go to last file in vim

Why won't the Republicans use a superdelegate system like the DNC in their nomination process?

Is there a fallacy about "appeal to 'big words'"?



Output the list of musical notes


Print me a scaleMusical Score InterpreterPlaying the Name GameGenerate the names of the keys on a pianoTuning Strings­Notes to TablatureFind the longest musical substringInsta-Name… Just Add Coder!What is the frequency of this note?Can this value be made with unique coins and/or notes?Is this a Major Scale (or equivalent)?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








7












$begingroup$


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


  • The sharp and flat Unicode symbols (♯/♭) may be substituted with b
    and #


  • As always, Standard loopholes are forbidden.


  • As this is code-golf, the smallest program, in bytes, wins.










share|improve this question









$endgroup$













  • $begingroup$
    related
    $endgroup$
    – Jonathan Allan
    7 hours ago










  • $begingroup$
    May we output "C " instead of "C"?
    $endgroup$
    – Arnauld
    7 hours ago










  • $begingroup$
    @Arnauld yes you may
    $endgroup$
    – TheOnlyMrCat
    7 hours ago






  • 1




    $begingroup$
    By the way, B# exists in music notation; it's for example in the key signature for the key of C#, where it serves as the leading tone.
    $endgroup$
    – Kaz
    6 hours ago










  • $begingroup$
    So no naturals, double-flats or double-sharps either? :-) (I kid, those are only needed for certain scales.)
    $endgroup$
    – ErikF
    5 hours ago

















7












$begingroup$


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


  • The sharp and flat Unicode symbols (♯/♭) may be substituted with b
    and #


  • As always, Standard loopholes are forbidden.


  • As this is code-golf, the smallest program, in bytes, wins.










share|improve this question









$endgroup$













  • $begingroup$
    related
    $endgroup$
    – Jonathan Allan
    7 hours ago










  • $begingroup$
    May we output "C " instead of "C"?
    $endgroup$
    – Arnauld
    7 hours ago










  • $begingroup$
    @Arnauld yes you may
    $endgroup$
    – TheOnlyMrCat
    7 hours ago






  • 1




    $begingroup$
    By the way, B# exists in music notation; it's for example in the key signature for the key of C#, where it serves as the leading tone.
    $endgroup$
    – Kaz
    6 hours ago










  • $begingroup$
    So no naturals, double-flats or double-sharps either? :-) (I kid, those are only needed for certain scales.)
    $endgroup$
    – ErikF
    5 hours ago













7












7








7





$begingroup$


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


  • The sharp and flat Unicode symbols (♯/♭) may be substituted with b
    and #


  • As always, Standard loopholes are forbidden.


  • As this is code-golf, the smallest program, in bytes, wins.










share|improve this question









$endgroup$




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


  • The sharp and flat Unicode symbols (♯/♭) may be substituted with b
    and #


  • As always, Standard loopholes are forbidden.


  • As this is code-golf, the smallest program, in bytes, wins.







code-golf kolmogorov-complexity






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 8 hours ago









TheOnlyMrCatTheOnlyMrCat

3462 silver badges11 bronze badges




3462 silver badges11 bronze badges














  • $begingroup$
    related
    $endgroup$
    – Jonathan Allan
    7 hours ago










  • $begingroup$
    May we output "C " instead of "C"?
    $endgroup$
    – Arnauld
    7 hours ago










  • $begingroup$
    @Arnauld yes you may
    $endgroup$
    – TheOnlyMrCat
    7 hours ago






  • 1




    $begingroup$
    By the way, B# exists in music notation; it's for example in the key signature for the key of C#, where it serves as the leading tone.
    $endgroup$
    – Kaz
    6 hours ago










  • $begingroup$
    So no naturals, double-flats or double-sharps either? :-) (I kid, those are only needed for certain scales.)
    $endgroup$
    – ErikF
    5 hours ago
















  • $begingroup$
    related
    $endgroup$
    – Jonathan Allan
    7 hours ago










  • $begingroup$
    May we output "C " instead of "C"?
    $endgroup$
    – Arnauld
    7 hours ago










  • $begingroup$
    @Arnauld yes you may
    $endgroup$
    – TheOnlyMrCat
    7 hours ago






  • 1




    $begingroup$
    By the way, B# exists in music notation; it's for example in the key signature for the key of C#, where it serves as the leading tone.
    $endgroup$
    – Kaz
    6 hours ago










  • $begingroup$
    So no naturals, double-flats or double-sharps either? :-) (I kid, those are only needed for certain scales.)
    $endgroup$
    – ErikF
    5 hours ago















$begingroup$
related
$endgroup$
– Jonathan Allan
7 hours ago




$begingroup$
related
$endgroup$
– Jonathan Allan
7 hours ago












$begingroup$
May we output "C " instead of "C"?
$endgroup$
– Arnauld
7 hours ago




$begingroup$
May we output "C " instead of "C"?
$endgroup$
– Arnauld
7 hours ago












$begingroup$
@Arnauld yes you may
$endgroup$
– TheOnlyMrCat
7 hours ago




$begingroup$
@Arnauld yes you may
$endgroup$
– TheOnlyMrCat
7 hours ago




1




1




$begingroup$
By the way, B# exists in music notation; it's for example in the key signature for the key of C#, where it serves as the leading tone.
$endgroup$
– Kaz
6 hours ago




$begingroup$
By the way, B# exists in music notation; it's for example in the key signature for the key of C#, where it serves as the leading tone.
$endgroup$
– Kaz
6 hours ago












$begingroup$
So no naturals, double-flats or double-sharps either? :-) (I kid, those are only needed for certain scales.)
$endgroup$
– ErikF
5 hours ago




$begingroup$
So no naturals, double-flats or double-sharps either? :-) (I kid, those are only needed for certain scales.)
$endgroup$
– ErikF
5 hours ago










15 Answers
15






active

oldest

votes


















2












$begingroup$


Jelly, 18?* 20 bytes



Ø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!



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"]





share|improve this answer











$endgroup$






















    1












    $begingroup$


    R, 50 bytes





    cat("Ab,A,A#,Bb,B,C,C#,Db,D,D#,Eb,E,F,F#,Gb,G,G#")


    Try it online!



    Boring answer.




    R, 60 bytes





    cat(outer(LETTERS[1:7],c("#","","b"),paste0)[-c(2,5,17,20)])


    Try it online!






    share|improve this answer











    $endgroup$










    • 1




      $begingroup$
      I think the list of examples of redundant notes isn't meant to be exhaustive--the example output also omits Cb and E#.
      $endgroup$
      – Unrelated String
      8 hours ago


















    1












    $begingroup$


    Retina 0.8.2, 33 bytes




    ABCDEFG
    .
    $&b $& $&#
    [BE]#...



    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).






    share|improve this answer









    $endgroup$






















      1












      $begingroup$


      Charcoal, 21 bytes



      Φ⪪⭆…α⁷⭆b #⁺ι벧↨⊖⊘φ²κ


      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





      share|improve this answer









      $endgroup$






















        1












        $begingroup$


        Jelly, 21 bytes



        ØAḣ7;p¥⁾b#“¿€×Ø‘œPẎẎ€


        Try it online!






        share|improve this answer









        $endgroup$






















          1












          $begingroup$


          Perl 6, 41 bytes





          S:g/[Eo'A'..'G'X~'b #'.comb


          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#





          share|improve this answer









          $endgroup$






















            1












            $begingroup$

            dzaima/APL REPL, 38 28 25 bytes



            (⊤2056111)⌿,' b#'∘.,⍨7↑⎕A


            Try it online!






            share|improve this answer











            $endgroup$














            • $begingroup$
              I think that you can remove the ⎕←.
              $endgroup$
              – Erik the Outgolfer
              7 hours ago










            • $begingroup$
              @EriktheOutgolfer hmm yeah, if I switch to REPL
              $endgroup$
              – dzaima
              7 hours ago










            • $begingroup$
              Oh right, I forgot to count the LOL.
              $endgroup$
              – Erik the Outgolfer
              7 hours ago


















            1












            $begingroup$


            Stax, 17 15 bytes



            ║♠+I▬┌ó£ΔφΔ`╗╨Å


            Run and debug it



            Bonus program: print the fancy symbols






            share|improve this answer











            $endgroup$






















              1












              $begingroup$


              Japt, 23 22 bytes



              ;B¯7
              ï"b #" fÏÄ %9%8<6


              Try it



              ;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
              <5 Less than 5
              End filter ("Ab,A ,A#,Bb,B ,C ,C#,Db,D ,D#,Eb,E ,F ,F#,Gb,G ,G#")





              share|improve this answer











              $endgroup$






















                0












                $begingroup$


                Brachylog, 36 bytes



                "#b"ẹ,Ẹ↺;Ṇh₇ᵗ↔∋ᵐcᶠ⟨h₅ct₁₄⟩⟨h₁₂ct₅⟩


                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...






                share|improve this answer









                $endgroup$






















                  0












                  $begingroup$


                  APL (Dyalog Unicode), 45 bytes





                  2↓(,¨⎕A)⎕R', &'⊢'AbAA#BbBCC#DbDD#EbEFF#GbGG#'


                  Try it online!



                  Simple ⎕Replace operation, prepending , to each element in the string that matches each letter in the ⎕Alphabet, then dropping the first 2 characters, which are ,.






                  share|improve this answer









                  $endgroup$






















                    0












                    $begingroup$


                    Canvas, 23 bytes



                    Z7m{#+¹¹b+]{“╷!↕„2┬²@?P


                    Try it here!



                    22 bytes with extra newlines in the output






                    share|improve this answer









                    $endgroup$






















                      0












                      $begingroup$

                      Brainfuck, 214 Bytes



                      >>>>++++++++[<++++<++++<++++++++++++<++++++++>>>>-]<<+++<++<+.>.>>.<<<.>>>.<<<.>>.>.<<<+.>.>>.<<<.>>>.<<<+.>>>.<<<.>>.>.<<<+.>.>>.<<<.>>>.<<<.>>.>.<<<+.>.>>.<<<.>>>.<<<+.>>>.<<<.>>.>.<<<+.>.>>.<<<.>>>.<<<.>>.>.<<<+


                      Try it Online!






                      share|improve this answer









                      $endgroup$






















                        0












                        $begingroup$


                        Perl 5, 47 bytes





                        say'Ab A# Db D# Gb G# Bb Eb C# F# ',join$",A..G


                        Try it online!






                        share|improve this answer











                        $endgroup$






















                          0












                          $begingroup$


                          Zsh, 38 bytes





                          <<<$$:-A..Gb,,#:#([BE]#


                          I always enjoy it when Zsh beats Perl (hopefully I don't speak too soon...).



                          <<<$$:-A..Gb,,#:#([BE]#
                          $:- # empty-fallback, basically an anonymous parameter expansion
                          A..Gb,,# # Cross product range A-G with b,(nothing),#
                          $ :# # Remove matching elements
                          ([BE]#|[CF]b) # B#, E#, Cb, Fb
                          <<< # Print to stdout


                          Try it online!






                          share|improve this answer









                          $endgroup$

















                            Your Answer






                            StackExchange.ifUsing("editor", function ()
                            StackExchange.using("externalEditor", function ()
                            StackExchange.using("snippets", function ()
                            StackExchange.snippets.init();
                            );
                            );
                            , "code-snippets");

                            StackExchange.ready(function()
                            var channelOptions =
                            tags: "".split(" "),
                            id: "200"
                            ;
                            initTagRenderer("".split(" "), "".split(" "), channelOptions);

                            StackExchange.using("externalEditor", function()
                            // Have to fire editor after snippets, if snippets enabled
                            if (StackExchange.settings.snippets.snippetsEnabled)
                            StackExchange.using("snippets", function()
                            createEditor();
                            );

                            else
                            createEditor();

                            );

                            function createEditor()
                            StackExchange.prepareEditor(
                            heartbeatType: 'answer',
                            autoActivateHeartbeat: false,
                            convertImagesToLinks: false,
                            noModals: true,
                            showLowRepImageUploadWarning: true,
                            reputationToPostImages: null,
                            bindNavPrevention: true,
                            postfix: "",
                            imageUploader:
                            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                            allowUrls: true
                            ,
                            onDemand: true,
                            discardSelector: ".discard-answer"
                            ,immediatelyShowMarkdownHelp:true
                            );



                            );













                            draft saved

                            draft discarded


















                            StackExchange.ready(
                            function ()
                            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f190013%2foutput-the-list-of-musical-notes%23new-answer', 'question_page');

                            );

                            Post as a guest















                            Required, but never shown

























                            15 Answers
                            15






                            active

                            oldest

                            votes








                            15 Answers
                            15






                            active

                            oldest

                            votes









                            active

                            oldest

                            votes






                            active

                            oldest

                            votes









                            2












                            $begingroup$


                            Jelly, 18?* 20 bytes



                            Ø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!



                            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"]





                            share|improve this answer











                            $endgroup$



















                              2












                              $begingroup$


                              Jelly, 18?* 20 bytes



                              Ø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!



                              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"]





                              share|improve this answer











                              $endgroup$

















                                2












                                2








                                2





                                $begingroup$


                                Jelly, 18?* 20 bytes



                                Ø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!



                                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"]





                                share|improve this answer











                                $endgroup$




                                Jelly, 18?* 20 bytes



                                Ø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!



                                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"]






                                share|improve this answer














                                share|improve this answer



                                share|improve this answer








                                edited 6 hours ago

























                                answered 7 hours ago









                                Jonathan AllanJonathan Allan

                                58.7k5 gold badges44 silver badges185 bronze badges




                                58.7k5 gold badges44 silver badges185 bronze badges


























                                    1












                                    $begingroup$


                                    R, 50 bytes





                                    cat("Ab,A,A#,Bb,B,C,C#,Db,D,D#,Eb,E,F,F#,Gb,G,G#")


                                    Try it online!



                                    Boring answer.




                                    R, 60 bytes





                                    cat(outer(LETTERS[1:7],c("#","","b"),paste0)[-c(2,5,17,20)])


                                    Try it online!






                                    share|improve this answer











                                    $endgroup$










                                    • 1




                                      $begingroup$
                                      I think the list of examples of redundant notes isn't meant to be exhaustive--the example output also omits Cb and E#.
                                      $endgroup$
                                      – Unrelated String
                                      8 hours ago















                                    1












                                    $begingroup$


                                    R, 50 bytes





                                    cat("Ab,A,A#,Bb,B,C,C#,Db,D,D#,Eb,E,F,F#,Gb,G,G#")


                                    Try it online!



                                    Boring answer.




                                    R, 60 bytes





                                    cat(outer(LETTERS[1:7],c("#","","b"),paste0)[-c(2,5,17,20)])


                                    Try it online!






                                    share|improve this answer











                                    $endgroup$










                                    • 1




                                      $begingroup$
                                      I think the list of examples of redundant notes isn't meant to be exhaustive--the example output also omits Cb and E#.
                                      $endgroup$
                                      – Unrelated String
                                      8 hours ago













                                    1












                                    1








                                    1





                                    $begingroup$


                                    R, 50 bytes





                                    cat("Ab,A,A#,Bb,B,C,C#,Db,D,D#,Eb,E,F,F#,Gb,G,G#")


                                    Try it online!



                                    Boring answer.




                                    R, 60 bytes





                                    cat(outer(LETTERS[1:7],c("#","","b"),paste0)[-c(2,5,17,20)])


                                    Try it online!






                                    share|improve this answer











                                    $endgroup$




                                    R, 50 bytes





                                    cat("Ab,A,A#,Bb,B,C,C#,Db,D,D#,Eb,E,F,F#,Gb,G,G#")


                                    Try it online!



                                    Boring answer.




                                    R, 60 bytes





                                    cat(outer(LETTERS[1:7],c("#","","b"),paste0)[-c(2,5,17,20)])


                                    Try it online!







                                    share|improve this answer














                                    share|improve this answer



                                    share|improve this answer








                                    edited 8 hours ago

























                                    answered 8 hours ago









                                    GiuseppeGiuseppe

                                    19.1k3 gold badges16 silver badges67 bronze badges




                                    19.1k3 gold badges16 silver badges67 bronze badges










                                    • 1




                                      $begingroup$
                                      I think the list of examples of redundant notes isn't meant to be exhaustive--the example output also omits Cb and E#.
                                      $endgroup$
                                      – Unrelated String
                                      8 hours ago












                                    • 1




                                      $begingroup$
                                      I think the list of examples of redundant notes isn't meant to be exhaustive--the example output also omits Cb and E#.
                                      $endgroup$
                                      – Unrelated String
                                      8 hours ago







                                    1




                                    1




                                    $begingroup$
                                    I think the list of examples of redundant notes isn't meant to be exhaustive--the example output also omits Cb and E#.
                                    $endgroup$
                                    – Unrelated String
                                    8 hours ago




                                    $begingroup$
                                    I think the list of examples of redundant notes isn't meant to be exhaustive--the example output also omits Cb and E#.
                                    $endgroup$
                                    – Unrelated String
                                    8 hours ago











                                    1












                                    $begingroup$


                                    Retina 0.8.2, 33 bytes




                                    ABCDEFG
                                    .
                                    $&b $& $&#
                                    [BE]#...



                                    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).






                                    share|improve this answer









                                    $endgroup$



















                                      1












                                      $begingroup$


                                      Retina 0.8.2, 33 bytes




                                      ABCDEFG
                                      .
                                      $&b $& $&#
                                      [BE]#...



                                      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).






                                      share|improve this answer









                                      $endgroup$

















                                        1












                                        1








                                        1





                                        $begingroup$


                                        Retina 0.8.2, 33 bytes




                                        ABCDEFG
                                        .
                                        $&b $& $&#
                                        [BE]#...



                                        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).






                                        share|improve this answer









                                        $endgroup$




                                        Retina 0.8.2, 33 bytes




                                        ABCDEFG
                                        .
                                        $&b $& $&#
                                        [BE]#...



                                        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).







                                        share|improve this answer












                                        share|improve this answer



                                        share|improve this answer










                                        answered 8 hours ago









                                        NeilNeil

                                        87.2k8 gold badges46 silver badges183 bronze badges




                                        87.2k8 gold badges46 silver badges183 bronze badges
























                                            1












                                            $begingroup$


                                            Charcoal, 21 bytes



                                            Φ⪪⭆…α⁷⭆b #⁺ι벧↨⊖⊘φ²κ


                                            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





                                            share|improve this answer









                                            $endgroup$



















                                              1












                                              $begingroup$


                                              Charcoal, 21 bytes



                                              Φ⪪⭆…α⁷⭆b #⁺ι벧↨⊖⊘φ²κ


                                              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





                                              share|improve this answer









                                              $endgroup$

















                                                1












                                                1








                                                1





                                                $begingroup$


                                                Charcoal, 21 bytes



                                                Φ⪪⭆…α⁷⭆b #⁺ι벧↨⊖⊘φ²κ


                                                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





                                                share|improve this answer









                                                $endgroup$




                                                Charcoal, 21 bytes



                                                Φ⪪⭆…α⁷⭆b #⁺ι벧↨⊖⊘φ²κ


                                                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






                                                share|improve this answer












                                                share|improve this answer



                                                share|improve this answer










                                                answered 7 hours ago









                                                NeilNeil

                                                87.2k8 gold badges46 silver badges183 bronze badges




                                                87.2k8 gold badges46 silver badges183 bronze badges
























                                                    1












                                                    $begingroup$


                                                    Jelly, 21 bytes



                                                    ØAḣ7;p¥⁾b#“¿€×Ø‘œPẎẎ€


                                                    Try it online!






                                                    share|improve this answer









                                                    $endgroup$



















                                                      1












                                                      $begingroup$


                                                      Jelly, 21 bytes



                                                      ØAḣ7;p¥⁾b#“¿€×Ø‘œPẎẎ€


                                                      Try it online!






                                                      share|improve this answer









                                                      $endgroup$

















                                                        1












                                                        1








                                                        1





                                                        $begingroup$


                                                        Jelly, 21 bytes



                                                        ØAḣ7;p¥⁾b#“¿€×Ø‘œPẎẎ€


                                                        Try it online!






                                                        share|improve this answer









                                                        $endgroup$




                                                        Jelly, 21 bytes



                                                        ØAḣ7;p¥⁾b#“¿€×Ø‘œPẎẎ€


                                                        Try it online!







                                                        share|improve this answer












                                                        share|improve this answer



                                                        share|improve this answer










                                                        answered 7 hours ago









                                                        Erik the OutgolferErik the Outgolfer

                                                        35.5k4 gold badges30 silver badges110 bronze badges




                                                        35.5k4 gold badges30 silver badges110 bronze badges
























                                                            1












                                                            $begingroup$


                                                            Perl 6, 41 bytes





                                                            S:g/[Eo'A'..'G'X~'b #'.comb


                                                            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#





                                                            share|improve this answer









                                                            $endgroup$



















                                                              1












                                                              $begingroup$


                                                              Perl 6, 41 bytes





                                                              S:g/[Eo'A'..'G'X~'b #'.comb


                                                              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#





                                                              share|improve this answer









                                                              $endgroup$

















                                                                1












                                                                1








                                                                1





                                                                $begingroup$


                                                                Perl 6, 41 bytes





                                                                S:g/[Eo'A'..'G'X~'b #'.comb


                                                                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#





                                                                share|improve this answer









                                                                $endgroup$




                                                                Perl 6, 41 bytes





                                                                S:g/[Eo'A'..'G'X~'b #'.comb


                                                                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#






                                                                share|improve this answer












                                                                share|improve this answer



                                                                share|improve this answer










                                                                answered 7 hours ago









                                                                Jo KingJo King

                                                                30.7k3 gold badges71 silver badges138 bronze badges




                                                                30.7k3 gold badges71 silver badges138 bronze badges
























                                                                    1












                                                                    $begingroup$

                                                                    dzaima/APL REPL, 38 28 25 bytes



                                                                    (⊤2056111)⌿,' b#'∘.,⍨7↑⎕A


                                                                    Try it online!






                                                                    share|improve this answer











                                                                    $endgroup$














                                                                    • $begingroup$
                                                                      I think that you can remove the ⎕←.
                                                                      $endgroup$
                                                                      – Erik the Outgolfer
                                                                      7 hours ago










                                                                    • $begingroup$
                                                                      @EriktheOutgolfer hmm yeah, if I switch to REPL
                                                                      $endgroup$
                                                                      – dzaima
                                                                      7 hours ago










                                                                    • $begingroup$
                                                                      Oh right, I forgot to count the LOL.
                                                                      $endgroup$
                                                                      – Erik the Outgolfer
                                                                      7 hours ago















                                                                    1












                                                                    $begingroup$

                                                                    dzaima/APL REPL, 38 28 25 bytes



                                                                    (⊤2056111)⌿,' b#'∘.,⍨7↑⎕A


                                                                    Try it online!






                                                                    share|improve this answer











                                                                    $endgroup$














                                                                    • $begingroup$
                                                                      I think that you can remove the ⎕←.
                                                                      $endgroup$
                                                                      – Erik the Outgolfer
                                                                      7 hours ago










                                                                    • $begingroup$
                                                                      @EriktheOutgolfer hmm yeah, if I switch to REPL
                                                                      $endgroup$
                                                                      – dzaima
                                                                      7 hours ago










                                                                    • $begingroup$
                                                                      Oh right, I forgot to count the LOL.
                                                                      $endgroup$
                                                                      – Erik the Outgolfer
                                                                      7 hours ago













                                                                    1












                                                                    1








                                                                    1





                                                                    $begingroup$

                                                                    dzaima/APL REPL, 38 28 25 bytes



                                                                    (⊤2056111)⌿,' b#'∘.,⍨7↑⎕A


                                                                    Try it online!






                                                                    share|improve this answer











                                                                    $endgroup$



                                                                    dzaima/APL REPL, 38 28 25 bytes



                                                                    (⊤2056111)⌿,' b#'∘.,⍨7↑⎕A


                                                                    Try it online!







                                                                    share|improve this answer














                                                                    share|improve this answer



                                                                    share|improve this answer








                                                                    edited 6 hours ago

























                                                                    answered 7 hours ago









                                                                    dzaimadzaima

                                                                    17.3k2 gold badges27 silver badges66 bronze badges




                                                                    17.3k2 gold badges27 silver badges66 bronze badges














                                                                    • $begingroup$
                                                                      I think that you can remove the ⎕←.
                                                                      $endgroup$
                                                                      – Erik the Outgolfer
                                                                      7 hours ago










                                                                    • $begingroup$
                                                                      @EriktheOutgolfer hmm yeah, if I switch to REPL
                                                                      $endgroup$
                                                                      – dzaima
                                                                      7 hours ago










                                                                    • $begingroup$
                                                                      Oh right, I forgot to count the LOL.
                                                                      $endgroup$
                                                                      – Erik the Outgolfer
                                                                      7 hours ago
















                                                                    • $begingroup$
                                                                      I think that you can remove the ⎕←.
                                                                      $endgroup$
                                                                      – Erik the Outgolfer
                                                                      7 hours ago










                                                                    • $begingroup$
                                                                      @EriktheOutgolfer hmm yeah, if I switch to REPL
                                                                      $endgroup$
                                                                      – dzaima
                                                                      7 hours ago










                                                                    • $begingroup$
                                                                      Oh right, I forgot to count the LOL.
                                                                      $endgroup$
                                                                      – Erik the Outgolfer
                                                                      7 hours ago















                                                                    $begingroup$
                                                                    I think that you can remove the ⎕←.
                                                                    $endgroup$
                                                                    – Erik the Outgolfer
                                                                    7 hours ago




                                                                    $begingroup$
                                                                    I think that you can remove the ⎕←.
                                                                    $endgroup$
                                                                    – Erik the Outgolfer
                                                                    7 hours ago












                                                                    $begingroup$
                                                                    @EriktheOutgolfer hmm yeah, if I switch to REPL
                                                                    $endgroup$
                                                                    – dzaima
                                                                    7 hours ago




                                                                    $begingroup$
                                                                    @EriktheOutgolfer hmm yeah, if I switch to REPL
                                                                    $endgroup$
                                                                    – dzaima
                                                                    7 hours ago












                                                                    $begingroup$
                                                                    Oh right, I forgot to count the LOL.
                                                                    $endgroup$
                                                                    – Erik the Outgolfer
                                                                    7 hours ago




                                                                    $begingroup$
                                                                    Oh right, I forgot to count the LOL.
                                                                    $endgroup$
                                                                    – Erik the Outgolfer
                                                                    7 hours ago











                                                                    1












                                                                    $begingroup$


                                                                    Stax, 17 15 bytes



                                                                    ║♠+I▬┌ó£ΔφΔ`╗╨Å


                                                                    Run and debug it



                                                                    Bonus program: print the fancy symbols






                                                                    share|improve this answer











                                                                    $endgroup$



















                                                                      1












                                                                      $begingroup$


                                                                      Stax, 17 15 bytes



                                                                      ║♠+I▬┌ó£ΔφΔ`╗╨Å


                                                                      Run and debug it



                                                                      Bonus program: print the fancy symbols






                                                                      share|improve this answer











                                                                      $endgroup$

















                                                                        1












                                                                        1








                                                                        1





                                                                        $begingroup$


                                                                        Stax, 17 15 bytes



                                                                        ║♠+I▬┌ó£ΔφΔ`╗╨Å


                                                                        Run and debug it



                                                                        Bonus program: print the fancy symbols






                                                                        share|improve this answer











                                                                        $endgroup$




                                                                        Stax, 17 15 bytes



                                                                        ║♠+I▬┌ó£ΔφΔ`╗╨Å


                                                                        Run and debug it



                                                                        Bonus program: print the fancy symbols







                                                                        share|improve this answer














                                                                        share|improve this answer



                                                                        share|improve this answer








                                                                        edited 6 hours ago

























                                                                        answered 7 hours ago









                                                                        recursiverecursive

                                                                        7,84115 silver badges31 bronze badges




                                                                        7,84115 silver badges31 bronze badges
























                                                                            1












                                                                            $begingroup$


                                                                            Japt, 23 22 bytes



                                                                            ;B¯7
                                                                            ï"b #" fÏÄ %9%8<6


                                                                            Try it



                                                                            ;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
                                                                            <5 Less than 5
                                                                            End filter ("Ab,A ,A#,Bb,B ,C ,C#,Db,D ,D#,Eb,E ,F ,F#,Gb,G ,G#")





                                                                            share|improve this answer











                                                                            $endgroup$



















                                                                              1












                                                                              $begingroup$


                                                                              Japt, 23 22 bytes



                                                                              ;B¯7
                                                                              ï"b #" fÏÄ %9%8<6


                                                                              Try it



                                                                              ;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
                                                                              <5 Less than 5
                                                                              End filter ("Ab,A ,A#,Bb,B ,C ,C#,Db,D ,D#,Eb,E ,F ,F#,Gb,G ,G#")





                                                                              share|improve this answer











                                                                              $endgroup$

















                                                                                1












                                                                                1








                                                                                1





                                                                                $begingroup$


                                                                                Japt, 23 22 bytes



                                                                                ;B¯7
                                                                                ï"b #" fÏÄ %9%8<6


                                                                                Try it



                                                                                ;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
                                                                                <5 Less than 5
                                                                                End filter ("Ab,A ,A#,Bb,B ,C ,C#,Db,D ,D#,Eb,E ,F ,F#,Gb,G ,G#")





                                                                                share|improve this answer











                                                                                $endgroup$




                                                                                Japt, 23 22 bytes



                                                                                ;B¯7
                                                                                ï"b #" fÏÄ %9%8<6


                                                                                Try it



                                                                                ;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
                                                                                <5 Less than 5
                                                                                End filter ("Ab,A ,A#,Bb,B ,C ,C#,Db,D ,D#,Eb,E ,F ,F#,Gb,G ,G#")






                                                                                share|improve this answer














                                                                                share|improve this answer



                                                                                share|improve this answer








                                                                                edited 3 hours ago

























                                                                                answered 4 hours ago









                                                                                Embodiment of IgnoranceEmbodiment of Ignorance

                                                                                4,9661 silver badge30 bronze badges




                                                                                4,9661 silver badge30 bronze badges
























                                                                                    0












                                                                                    $begingroup$


                                                                                    Brachylog, 36 bytes



                                                                                    "#b"ẹ,Ẹ↺;Ṇh₇ᵗ↔∋ᵐcᶠ⟨h₅ct₁₄⟩⟨h₁₂ct₅⟩


                                                                                    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...






                                                                                    share|improve this answer









                                                                                    $endgroup$



















                                                                                      0












                                                                                      $begingroup$


                                                                                      Brachylog, 36 bytes



                                                                                      "#b"ẹ,Ẹ↺;Ṇh₇ᵗ↔∋ᵐcᶠ⟨h₅ct₁₄⟩⟨h₁₂ct₅⟩


                                                                                      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...






                                                                                      share|improve this answer









                                                                                      $endgroup$

















                                                                                        0












                                                                                        0








                                                                                        0





                                                                                        $begingroup$


                                                                                        Brachylog, 36 bytes



                                                                                        "#b"ẹ,Ẹ↺;Ṇh₇ᵗ↔∋ᵐcᶠ⟨h₅ct₁₄⟩⟨h₁₂ct₅⟩


                                                                                        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...






                                                                                        share|improve this answer









                                                                                        $endgroup$




                                                                                        Brachylog, 36 bytes



                                                                                        "#b"ẹ,Ẹ↺;Ṇh₇ᵗ↔∋ᵐcᶠ⟨h₅ct₁₄⟩⟨h₁₂ct₅⟩


                                                                                        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...







                                                                                        share|improve this answer












                                                                                        share|improve this answer



                                                                                        share|improve this answer










                                                                                        answered 7 hours ago









                                                                                        Unrelated StringUnrelated String

                                                                                        3,3052 gold badges3 silver badges17 bronze badges




                                                                                        3,3052 gold badges3 silver badges17 bronze badges
























                                                                                            0












                                                                                            $begingroup$


                                                                                            APL (Dyalog Unicode), 45 bytes





                                                                                            2↓(,¨⎕A)⎕R', &'⊢'AbAA#BbBCC#DbDD#EbEFF#GbGG#'


                                                                                            Try it online!



                                                                                            Simple ⎕Replace operation, prepending , to each element in the string that matches each letter in the ⎕Alphabet, then dropping the first 2 characters, which are ,.






                                                                                            share|improve this answer









                                                                                            $endgroup$



















                                                                                              0












                                                                                              $begingroup$


                                                                                              APL (Dyalog Unicode), 45 bytes





                                                                                              2↓(,¨⎕A)⎕R', &'⊢'AbAA#BbBCC#DbDD#EbEFF#GbGG#'


                                                                                              Try it online!



                                                                                              Simple ⎕Replace operation, prepending , to each element in the string that matches each letter in the ⎕Alphabet, then dropping the first 2 characters, which are ,.






                                                                                              share|improve this answer









                                                                                              $endgroup$

















                                                                                                0












                                                                                                0








                                                                                                0





                                                                                                $begingroup$


                                                                                                APL (Dyalog Unicode), 45 bytes





                                                                                                2↓(,¨⎕A)⎕R', &'⊢'AbAA#BbBCC#DbDD#EbEFF#GbGG#'


                                                                                                Try it online!



                                                                                                Simple ⎕Replace operation, prepending , to each element in the string that matches each letter in the ⎕Alphabet, then dropping the first 2 characters, which are ,.






                                                                                                share|improve this answer









                                                                                                $endgroup$




                                                                                                APL (Dyalog Unicode), 45 bytes





                                                                                                2↓(,¨⎕A)⎕R', &'⊢'AbAA#BbBCC#DbDD#EbEFF#GbGG#'


                                                                                                Try it online!



                                                                                                Simple ⎕Replace operation, prepending , to each element in the string that matches each letter in the ⎕Alphabet, then dropping the first 2 characters, which are ,.







                                                                                                share|improve this answer












                                                                                                share|improve this answer



                                                                                                share|improve this answer










                                                                                                answered 7 hours ago









                                                                                                J. SalléJ. Sallé

                                                                                                2,3983 silver badges23 bronze badges




                                                                                                2,3983 silver badges23 bronze badges
























                                                                                                    0












                                                                                                    $begingroup$


                                                                                                    Canvas, 23 bytes



                                                                                                    Z7m{#+¹¹b+]{“╷!↕„2┬²@?P


                                                                                                    Try it here!



                                                                                                    22 bytes with extra newlines in the output






                                                                                                    share|improve this answer









                                                                                                    $endgroup$



















                                                                                                      0












                                                                                                      $begingroup$


                                                                                                      Canvas, 23 bytes



                                                                                                      Z7m{#+¹¹b+]{“╷!↕„2┬²@?P


                                                                                                      Try it here!



                                                                                                      22 bytes with extra newlines in the output






                                                                                                      share|improve this answer









                                                                                                      $endgroup$

















                                                                                                        0












                                                                                                        0








                                                                                                        0





                                                                                                        $begingroup$


                                                                                                        Canvas, 23 bytes



                                                                                                        Z7m{#+¹¹b+]{“╷!↕„2┬²@?P


                                                                                                        Try it here!



                                                                                                        22 bytes with extra newlines in the output






                                                                                                        share|improve this answer









                                                                                                        $endgroup$




                                                                                                        Canvas, 23 bytes



                                                                                                        Z7m{#+¹¹b+]{“╷!↕„2┬²@?P


                                                                                                        Try it here!



                                                                                                        22 bytes with extra newlines in the output







                                                                                                        share|improve this answer












                                                                                                        share|improve this answer



                                                                                                        share|improve this answer










                                                                                                        answered 6 hours ago









                                                                                                        dzaimadzaima

                                                                                                        17.3k2 gold badges27 silver badges66 bronze badges




                                                                                                        17.3k2 gold badges27 silver badges66 bronze badges
























                                                                                                            0












                                                                                                            $begingroup$

                                                                                                            Brainfuck, 214 Bytes



                                                                                                            >>>>++++++++[<++++<++++<++++++++++++<++++++++>>>>-]<<+++<++<+.>.>>.<<<.>>>.<<<.>>.>.<<<+.>.>>.<<<.>>>.<<<+.>>>.<<<.>>.>.<<<+.>.>>.<<<.>>>.<<<.>>.>.<<<+.>.>>.<<<.>>>.<<<+.>>>.<<<.>>.>.<<<+.>.>>.<<<.>>>.<<<.>>.>.<<<+


                                                                                                            Try it Online!






                                                                                                            share|improve this answer









                                                                                                            $endgroup$



















                                                                                                              0












                                                                                                              $begingroup$

                                                                                                              Brainfuck, 214 Bytes



                                                                                                              >>>>++++++++[<++++<++++<++++++++++++<++++++++>>>>-]<<+++<++<+.>.>>.<<<.>>>.<<<.>>.>.<<<+.>.>>.<<<.>>>.<<<+.>>>.<<<.>>.>.<<<+.>.>>.<<<.>>>.<<<.>>.>.<<<+.>.>>.<<<.>>>.<<<+.>>>.<<<.>>.>.<<<+.>.>>.<<<.>>>.<<<.>>.>.<<<+


                                                                                                              Try it Online!






                                                                                                              share|improve this answer









                                                                                                              $endgroup$

















                                                                                                                0












                                                                                                                0








                                                                                                                0





                                                                                                                $begingroup$

                                                                                                                Brainfuck, 214 Bytes



                                                                                                                >>>>++++++++[<++++<++++<++++++++++++<++++++++>>>>-]<<+++<++<+.>.>>.<<<.>>>.<<<.>>.>.<<<+.>.>>.<<<.>>>.<<<+.>>>.<<<.>>.>.<<<+.>.>>.<<<.>>>.<<<.>>.>.<<<+.>.>>.<<<.>>>.<<<+.>>>.<<<.>>.>.<<<+.>.>>.<<<.>>>.<<<.>>.>.<<<+


                                                                                                                Try it Online!






                                                                                                                share|improve this answer









                                                                                                                $endgroup$



                                                                                                                Brainfuck, 214 Bytes



                                                                                                                >>>>++++++++[<++++<++++<++++++++++++<++++++++>>>>-]<<+++<++<+.>.>>.<<<.>>>.<<<.>>.>.<<<+.>.>>.<<<.>>>.<<<+.>>>.<<<.>>.>.<<<+.>.>>.<<<.>>>.<<<.>>.>.<<<+.>.>>.<<<.>>>.<<<+.>>>.<<<.>>.>.<<<+.>.>>.<<<.>>>.<<<.>>.>.<<<+


                                                                                                                Try it Online!







                                                                                                                share|improve this answer












                                                                                                                share|improve this answer



                                                                                                                share|improve this answer










                                                                                                                answered 6 hours ago









                                                                                                                Zachary CottonZachary Cotton

                                                                                                                6392 silver badges5 bronze badges




                                                                                                                6392 silver badges5 bronze badges
























                                                                                                                    0












                                                                                                                    $begingroup$


                                                                                                                    Perl 5, 47 bytes





                                                                                                                    say'Ab A# Db D# Gb G# Bb Eb C# F# ',join$",A..G


                                                                                                                    Try it online!






                                                                                                                    share|improve this answer











                                                                                                                    $endgroup$



















                                                                                                                      0












                                                                                                                      $begingroup$


                                                                                                                      Perl 5, 47 bytes





                                                                                                                      say'Ab A# Db D# Gb G# Bb Eb C# F# ',join$",A..G


                                                                                                                      Try it online!






                                                                                                                      share|improve this answer











                                                                                                                      $endgroup$

















                                                                                                                        0












                                                                                                                        0








                                                                                                                        0





                                                                                                                        $begingroup$


                                                                                                                        Perl 5, 47 bytes





                                                                                                                        say'Ab A# Db D# Gb G# Bb Eb C# F# ',join$",A..G


                                                                                                                        Try it online!






                                                                                                                        share|improve this answer











                                                                                                                        $endgroup$




                                                                                                                        Perl 5, 47 bytes





                                                                                                                        say'Ab A# Db D# Gb G# Bb Eb C# F# ',join$",A..G


                                                                                                                        Try it online!







                                                                                                                        share|improve this answer














                                                                                                                        share|improve this answer



                                                                                                                        share|improve this answer








                                                                                                                        edited 3 hours ago

























                                                                                                                        answered 4 hours ago









                                                                                                                        XcaliXcali

                                                                                                                        6,5941 gold badge6 silver badges23 bronze badges




                                                                                                                        6,5941 gold badge6 silver badges23 bronze badges
























                                                                                                                            0












                                                                                                                            $begingroup$


                                                                                                                            Zsh, 38 bytes





                                                                                                                            <<<$$:-A..Gb,,#:#([BE]#


                                                                                                                            I always enjoy it when Zsh beats Perl (hopefully I don't speak too soon...).



                                                                                                                            <<<$$:-A..Gb,,#:#([BE]#
                                                                                                                            $:- # empty-fallback, basically an anonymous parameter expansion
                                                                                                                            A..Gb,,# # Cross product range A-G with b,(nothing),#
                                                                                                                            $ :# # Remove matching elements
                                                                                                                            ([BE]#|[CF]b) # B#, E#, Cb, Fb
                                                                                                                            <<< # Print to stdout


                                                                                                                            Try it online!






                                                                                                                            share|improve this answer









                                                                                                                            $endgroup$



















                                                                                                                              0












                                                                                                                              $begingroup$


                                                                                                                              Zsh, 38 bytes





                                                                                                                              <<<$$:-A..Gb,,#:#([BE]#


                                                                                                                              I always enjoy it when Zsh beats Perl (hopefully I don't speak too soon...).



                                                                                                                              <<<$$:-A..Gb,,#:#([BE]#
                                                                                                                              $:- # empty-fallback, basically an anonymous parameter expansion
                                                                                                                              A..Gb,,# # Cross product range A-G with b,(nothing),#
                                                                                                                              $ :# # Remove matching elements
                                                                                                                              ([BE]#|[CF]b) # B#, E#, Cb, Fb
                                                                                                                              <<< # Print to stdout


                                                                                                                              Try it online!






                                                                                                                              share|improve this answer









                                                                                                                              $endgroup$

















                                                                                                                                0












                                                                                                                                0








                                                                                                                                0





                                                                                                                                $begingroup$


                                                                                                                                Zsh, 38 bytes





                                                                                                                                <<<$$:-A..Gb,,#:#([BE]#


                                                                                                                                I always enjoy it when Zsh beats Perl (hopefully I don't speak too soon...).



                                                                                                                                <<<$$:-A..Gb,,#:#([BE]#
                                                                                                                                $:- # empty-fallback, basically an anonymous parameter expansion
                                                                                                                                A..Gb,,# # Cross product range A-G with b,(nothing),#
                                                                                                                                $ :# # Remove matching elements
                                                                                                                                ([BE]#|[CF]b) # B#, E#, Cb, Fb
                                                                                                                                <<< # Print to stdout


                                                                                                                                Try it online!






                                                                                                                                share|improve this answer









                                                                                                                                $endgroup$




                                                                                                                                Zsh, 38 bytes





                                                                                                                                <<<$$:-A..Gb,,#:#([BE]#


                                                                                                                                I always enjoy it when Zsh beats Perl (hopefully I don't speak too soon...).



                                                                                                                                <<<$$:-A..Gb,,#:#([BE]#
                                                                                                                                $:- # empty-fallback, basically an anonymous parameter expansion
                                                                                                                                A..Gb,,# # Cross product range A-G with b,(nothing),#
                                                                                                                                $ :# # Remove matching elements
                                                                                                                                ([BE]#|[CF]b) # B#, E#, Cb, Fb
                                                                                                                                <<< # Print to stdout


                                                                                                                                Try it online!







                                                                                                                                share|improve this answer












                                                                                                                                share|improve this answer



                                                                                                                                share|improve this answer










                                                                                                                                answered 1 hour ago









                                                                                                                                GammaFunctionGammaFunction

                                                                                                                                4216 bronze badges




                                                                                                                                4216 bronze badges






























                                                                                                                                    draft saved

                                                                                                                                    draft discarded
















































                                                                                                                                    If this is an answer to a challenge…



                                                                                                                                    • …Be sure to follow the challenge specification. However, please refrain from exploiting obvious loopholes. Answers abusing any of the standard loopholes are considered invalid. If you think a specification is unclear or underspecified, comment on the question instead.


                                                                                                                                    • …Try to optimize your score. For instance, answers to code-golf challenges should attempt to be as short as possible. You can always include a readable version of the code in addition to the competitive one.
                                                                                                                                      Explanations of your answer make it more interesting to read and are very much encouraged.


                                                                                                                                    • …Include a short header which indicates the language(s) of your code and its score, as defined by the challenge.


                                                                                                                                    More generally…



                                                                                                                                    • …Please make sure to answer the question and provide sufficient detail.


                                                                                                                                    • …Avoid asking for help, clarification or responding to other answers (use comments instead).




                                                                                                                                    draft saved


                                                                                                                                    draft discarded














                                                                                                                                    StackExchange.ready(
                                                                                                                                    function ()
                                                                                                                                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f190013%2foutput-the-list-of-musical-notes%23new-answer', 'question_page');

                                                                                                                                    );

                                                                                                                                    Post as a guest















                                                                                                                                    Required, but never shown





















































                                                                                                                                    Required, but never shown














                                                                                                                                    Required, but never shown












                                                                                                                                    Required, but never shown







                                                                                                                                    Required, but never shown

































                                                                                                                                    Required, but never shown














                                                                                                                                    Required, but never shown












                                                                                                                                    Required, but never shown







                                                                                                                                    Required, but never shown







                                                                                                                                    Popular posts from this blog

                                                                                                                                    ParseJSON using SSJSUsing AMPscript with SSJS ActivitiesHow to resubscribe a user in Marketing cloud using SSJS?Pulling Subscriber Status from Lists using SSJSRetrieving Emails using SSJSProblem in updating DE using SSJSUsing SSJS to send single email in Marketing CloudError adding EmailSendDefinition using SSJS

                                                                                                                                    Кампала Садржај Географија Географија Историја Становништво Привреда Партнерски градови Референце Спољашње везе Мени за навигацију0°11′ СГШ; 32°20′ ИГД / 0.18° СГШ; 32.34° ИГД / 0.18; 32.340°11′ СГШ; 32°20′ ИГД / 0.18° СГШ; 32.34° ИГД / 0.18; 32.34МедијиПодациЗванични веб-сајту

                                                                                                                                    19. јануар Садржај Догађаји Рођења Смрти Празници и дани сећања Види још Референце Мени за навигацијуу