# RFC: working on making chord naming/chordList more consistent

**URL:** <https://uzu.lurk.org/t/rfc-working-on-making-chord-naming-chordlist-more-consistent/2717>\
**Category:** TidalCycles\
**Tags:** innards\
**Created:** [7 January 2021 04:57 UTC](https://uzu.lurk.org/t/rfc-working-on-making-chord-naming-chordlist-more-consistent/2717 "2021-01-07T04:57:17Z")\
**Posts on this page:** 1\
**Showing post:** 61

<div class="post-metadata">

**Author:** ![cleary](https://uzu.lurk.org/user_avatar/uzu.lurk.org/cleary/32/177_2.png) [@cleary](https://uzu.lurk.org/u/cleary)\
**Post date:** [8 July 2022 03:53 UTC](https://uzu.lurk.org/t/rfc-working-on-making-chord-naming-chordlist-more-consistent/2717/61 "2022-07-08T03:53:09Z")

</div>

Hi all,  
I apologise for a complete and utter lack of movement here - 2022 has been the wrong kind of exciting for me and I've simply had to let stuff slide, this included. @mrreason 's done some [work in this area recently](https://club.tidalcycles.org/t/building-chords-from-scales/1721/10), so I figure an update is warranted.

I spent a bit of time discussing and working out how to recursively parse the chord modifiers, I came up with this code:

this is behaving as I would expect, you can pass it any combination of any number of chord modifiers, it will crash if you pass it an unknown option :

```haskell
modsFunc :: [Float] -> [String] -> [Float]
modsFunc xs [] = xs
modsFunc xs ["o"] = if (length xs > 2)
                      then [(xs !! 0 - 12), (xs !! 2 - 12), (xs !! 1)] ++ reverse (take (length xs - 3) (reverse xs))
                    else xs
modsFunc xs ['i' : is] = take (length xs) $ drop ((length is) + 1) $ concatMap (\x -> map (+ x) xs) [0,12..]
modsFunc xs [m] = if (length xs > (read m :: Int)
                    then take (read m :: Int) xs
                  else xs
modsFunc xs ms = modsFunc (modsFunc xs (init ms)) [(last ms)

```

you can call it as per: modsFunc [0,2,4,6] ["ii", "o", "12"] where the chord is the first list, and the modifiers sit in the second list, in any order

If you're interested in checking out the discussion that got to this point, please see:

> **[Discord - A New Way to Chat with Friends & Communities](https://discord.com/channels/779427371270275082/779743442288377876/852044233367486534)**
>
> Discord is the easiest way to communicate over voice, video, and text. Chat, hang out, and stay close with your friends and communities.

@yaxu [had some recommendations for parsing differently](https://discord.com/channels/779427371270275082/779743442288377876/851920767875547197) which I was planning to explore but have been unable to do so after more than a year ☹

If anyone would like to pick this up, be my guest!

---

_[View the full topic](https://uzu.lurk.org/t/rfc-working-on-making-chord-naming-chordlist-more-consistent/2717)._
