# Polyphony project v0.3.0

**URL:** <https://in-thread.sonic-pi.net/t/polyphony-project-v0-3-0/5259>\
**Category:** Creations & Ideas\
**Created:** [March 14, 2021, 11:59am UTC](https://in-thread.sonic-pi.net/t/polyphony-project-v0-3-0/5259 "2021-03-14T11:59:35Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![d0lfyn](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/d0lfyn/32/2254_2.png) [@d0lfyn](https://in-thread.sonic-pi.net/u/d0lfyn)\
**Post date:** [March 14, 2021, 11:59am UTC](https://in-thread.sonic-pi.net/t/polyphony-project-v0-3-0/5259/1 "2021-03-14T11:59:35Z")

</div>

I spent two weeks attempting to write a working theory of digital music as it were, but it was a distraction from what sounded good, so I scrapped it and the “music” that resulted. I left that wrong turn with some new ideas however!

This complete rewrite:

- organises everything into files
- simplifies and detangles lots of spaghetti code, removing 1000 lines I didn’t need
- keeps and builds upon what worked of the sections from v0.2.0
- makes all rhythms calculative, with ideas I got from [an interesting discussion](https://in-thread.sonic-pi.net/t/rhythmic-consonance/5162) about rhythm I shared earlier this month
- frees modulations of key to go anywhere within the major/minor/locrian modality
- begins to use version control and to document (I don’t know if an API is worth the effort), setting up a wiki, quick start readme, and contributors, &c.
- &c.

Here’s a glimpse of what this program can do right now:

https://w.soundcloud.com/player/?visual=false&url=https%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F1006257814&show_artwork=true&maxheight=166

And here’s the project on GitHub:

> **[dolphinOfDelphi/20210303-polyphony](https://github.com/dolphinOfDelphi/20210303-polyphony)**
>
> Ideate. Compose. Perform. Contribute to dolphinOfDelphi/20210303-polyphony development by creating an account on GitHub.

🌸 🐬

---

<div class="post-metadata">

**Author:** ![Future](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/future/32/1871_2.png) [@Future](https://in-thread.sonic-pi.net/u/Future)\
**Post date:** [March 14, 2021, 8:03pm UTC](https://in-thread.sonic-pi.net/t/polyphony-project-v0-3-0/5259/2 "2021-03-14T20:03:47Z")

</div>

wow, this is insane!!!

---

<div class="post-metadata">

**Author:** ![d0lfyn](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/d0lfyn/32/2254_2.png) [@d0lfyn](https://in-thread.sonic-pi.net/u/d0lfyn)\
**Post date:** [March 14, 2021, 9:40pm UTC](https://in-thread.sonic-pi.net/t/polyphony-project-v0-3-0/5259/3 "2021-03-14T21:40:31Z")

</div>

thanks!! 😊 i think i’m nearing v1.0.0 and my first generative album

---

<div class="post-metadata">

**Author:** ![Nechoj](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/nechoj/32/1814_2.png) [@Nechoj](https://in-thread.sonic-pi.net/u/Nechoj)\
**Post date:** [March 15, 2021, 10:14am UTC](https://in-thread.sonic-pi.net/t/polyphony-project-v0-3-0/5259/4 "2021-03-15T10:14:52Z")

</div>

Congratulations! I think the splitting up into modules has greately improved the overal concept. It’s much clearer now and can be used more efficiently. Good luck with your album!

---

<div class="post-metadata">

**Author:** ![d0lfyn](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/d0lfyn/32/2254_2.png) [@d0lfyn](https://in-thread.sonic-pi.net/u/d0lfyn)\
**Post date:** [March 15, 2021, 11:18am UTC](https://in-thread.sonic-pi.net/t/polyphony-project-v0-3-0/5259/5 "2021-03-15T11:18:58Z")

</div>

Thank you! Yes, in the earlier stages of prototyping I just kept adding and adding as I experimented, but now things are finally settling and resolving. Thanks again for your help; there are three weights in the settings, and the general-purpose functions will find application elsewhere.

The music has changed so much in the months since my initial concept for the album that I think I’ll need something new. From “begin anywhere” to… “novum organum”? (Just learned that’s already a book by Francis Bacon, darn.)

---

<div class="post-metadata">

**Author:** ![Nechoj](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/nechoj/32/1814_2.png) [@Nechoj](https://in-thread.sonic-pi.net/u/Nechoj)\
**Post date:** [March 15, 2021, 11:28am UTC](https://in-thread.sonic-pi.net/t/polyphony-project-v0-3-0/5259/6 "2021-03-15T11:28:04Z")

</div>

I noticed that you restrict the harmonic structure to major/minor/locrian. Did you think about extending it? I have a background in Jazz music and we would rarely stick to such basic scales …  
Maybe you had a look at the 12-bar blues I posted elsewhere (Topic: how to create a bass line?). I am spending quite some time in finding nice scale-hamony associations, especially for modulation of keys. This is what makes music so inherently interesting to listen. You can lead the audience to expect a certain change in harmony and then you break that expectation you just created - surprise! And then you can build up the tensions, such as one voice following a well known pattern, but the other voice starts to disent and deviate more and more with the pattern, the tension increases until a clever resolution is performed finally. That’s what I love to hear and do in music.

---

<div class="post-metadata">

**Author:** ![blipson](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/blipson/32/1772_2.png) [@blipson](https://in-thread.sonic-pi.net/u/blipson)\
**Post date:** [March 15, 2021, 11:37am UTC](https://in-thread.sonic-pi.net/t/polyphony-project-v0-3-0/5259/7 "2021-03-15T11:37:59Z")

</div>

If I had to describe the 16 strings and pianos track in one word, I’d say “Coplandesque.”

---

<div class="post-metadata">

**Author:** ![d0lfyn](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/d0lfyn/32/2254_2.png) [@d0lfyn](https://in-thread.sonic-pi.net/u/d0lfyn)\
**Post date:** [March 15, 2021, 12:15pm UTC](https://in-thread.sonic-pi.net/t/polyphony-project-v0-3-0/5259/8 "2021-03-15T12:15:50Z")

</div>

> [@Nechoj](#):
>
> Did you think about extending it?

I actually briefly ventured into exploring the other heptatonic scales after seeing one of your posts a couple weeks ago, and your reply just now made me suddenly realise how I could still do that! (I could code my modulation function to choose between Ionian/Lydian/Mixolydian and Dorian/Phrygian/Aeolian/harmonic minor/melodic minor.) (I love the Lydian mode.) Oh my gosh, that expands the palette manyfold!

Alright, I just implemented it, and I like what I’m hearing already. (Getting Steve Reich vibes.) Do I have options for augmented heptatonic scales? (It has to be heptatonic because of the way I calculate chords at the moment… but things could be different!) I’ll do some research.

Hmm… I’m going to give more thought to and learn more about voice relationship dynamics.

I especially like Baroque, Bebop, Minimalism, Trance. Speed, manifoldness, intensity.

> [@blipson](#):
>
> “Coplandesque.”

I haven’t listened to much Copland. I’ll add some tracks to my queue!

---

<div class="post-metadata">

**Author:** ![blipson](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/blipson/32/1772_2.png) [@blipson](https://in-thread.sonic-pi.net/u/blipson)\
**Post date:** [March 15, 2021, 12:36pm UTC](https://in-thread.sonic-pi.net/t/polyphony-project-v0-3-0/5259/9 "2021-03-15T12:36:31Z")

</div>

Try from 3:08 to 4:21, maybe continue to 5:20:

[![](https://img.youtube.com/vi/KfdwgXSdcMw/maxresdefault.jpg "Stage@Seven: Copland: Appalachian Spring – Alondra de la Parra") ](https://www.youtube.com/watch?v=KfdwgXSdcMw)

---

<div class="post-metadata">

**Author:** ![d0lfyn](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/d0lfyn/32/2254_2.png) [@d0lfyn](https://in-thread.sonic-pi.net/u/d0lfyn)\
**Post date:** [March 15, 2021, 12:45pm UTC](https://in-thread.sonic-pi.net/t/polyphony-project-v0-3-0/5259/10 "2021-03-15T12:45:11Z")

</div>

On the seventh movement of Appalachian Spring with Leonard Bernstein conducting! Getting Stravinsky and Holst vibes. We performed this tune in band class!

---

<div class="post-metadata">

**Author:** ![Nechoj](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/nechoj/32/1814_2.png) [@Nechoj](https://in-thread.sonic-pi.net/u/Nechoj)\
**Post date:** [March 15, 2021, 12:47pm UTC](https://in-thread.sonic-pi.net/t/polyphony-project-v0-3-0/5259/11 "2021-03-15T12:47:06Z")

</div>

> [@d0lfyn](#):
>
> augmented heptatonic scales

I think you would create such a scale on your own: use the augmented scale and then remove the ‘uninteresting’ notes to get it in heptatonic form (i.r., remove 2nd, 4th, and keep 1, 3, 5, 6, 7)  
EDIT: or try 1, 2, 3, 6, 7

---

<div class="post-metadata">

**Author:** ![d0lfyn](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/d0lfyn/32/2254_2.png) [@d0lfyn](https://in-thread.sonic-pi.net/u/d0lfyn)\
**Post date:** [March 15, 2021, 12:49pm UTC](https://in-thread.sonic-pi.net/t/polyphony-project-v0-3-0/5259/12 "2021-03-15T12:49:38Z")

</div>

Thanks! Alright, that provides something for every possibility I think.

---

<div class="post-metadata">

**Author:** ![d0lfyn](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/d0lfyn/32/2254_2.png) [@d0lfyn](https://in-thread.sonic-pi.net/u/d0lfyn)\
**Post date:** [March 15, 2021, 1:14pm UTC](https://in-thread.sonic-pi.net/t/polyphony-project-v0-3-0/5259/13 "2021-03-15T13:14:27Z")

</div>

Found two augmented heptatonic scales built in to Sonic Pi: :leading\_whole and :enigmatic. I wonder how these will sound!

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/sonic_pi/original/2X/c/cb6382621b75649e3e7d0676a6bc2a16e4a74a14.png)

Looks pretty wild haha

---

<div class="post-metadata">

**Author:** ![Nechoj](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/nechoj/32/1814_2.png) [@Nechoj](https://in-thread.sonic-pi.net/u/Nechoj)\
**Post date:** [March 15, 2021, 1:25pm UTC](https://in-thread.sonic-pi.net/t/polyphony-project-v0-3-0/5259/14 "2021-03-15T13:25:46Z")

</div>

Use the augmented preferably on the dom7 hamony in a minor key in order to create maximum tension before resolution

---

<div class="post-metadata">

**Author:** ![d0lfyn](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/d0lfyn/32/2254_2.png) [@d0lfyn](https://in-thread.sonic-pi.net/u/d0lfyn)\
**Post date:** [March 15, 2021, 1:49pm UTC](https://in-thread.sonic-pi.net/t/polyphony-project-v0-3-0/5259/15 "2021-03-15T13:49:41Z")

</div>

Noted! Yeah, I need to be judicious. The enigmatic scale does not sound musical at all.

I haven’t set any rules for resolution because I don’t want to use functional harmony.

---

<div class="post-metadata">

**Author:** ![Nechoj](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/nechoj/32/1814_2.png) [@Nechoj](https://in-thread.sonic-pi.net/u/Nechoj)\
**Post date:** [March 15, 2021, 1:52pm UTC](https://in-thread.sonic-pi.net/t/polyphony-project-v0-3-0/5259/16 "2021-03-15T13:52:00Z")

</div>

> [@d0lfyn](#):
>
> I don’t want to use functional harmony

Well, any chord progessions are functional somehow …

---

<div class="post-metadata">

**Author:** ![d0lfyn](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/d0lfyn/32/2254_2.png) [@d0lfyn](https://in-thread.sonic-pi.net/u/d0lfyn)\
**Post date:** [March 15, 2021, 2:01pm UTC](https://in-thread.sonic-pi.net/t/polyphony-project-v0-3-0/5259/17 "2021-03-15T14:01:54Z")

</div>

True, but I haven’t currently specified any chord progressions except for returning to the tonic chord, so the functions are all coincidental.

---

<div class="post-metadata">

**Author:** ![Nechoj](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/nechoj/32/1814_2.png) [@Nechoj](https://in-thread.sonic-pi.net/u/Nechoj)\
**Post date:** [March 15, 2021, 2:05pm UTC](https://in-thread.sonic-pi.net/t/polyphony-project-v0-3-0/5259/18 "2021-03-15T14:05:41Z")

</div>

I think people listening cannot but hear the functional movements they are used to. Either you play with those perceptions, break those, develop those or ignore those. But at the end, you will have a judgement on what ‘sounds good’ (see your post above), and there are reasons why you think something sounds good or not. And these reasons can be expressed through purposeful composition (my believe …)

---

<div class="post-metadata">

**Author:** ![d0lfyn](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/d0lfyn/32/2254_2.png) [@d0lfyn](https://in-thread.sonic-pi.net/u/d0lfyn)\
**Post date:** [March 15, 2021, 2:19pm UTC](https://in-thread.sonic-pi.net/t/polyphony-project-v0-3-0/5259/19 "2021-03-15T14:19:25Z")

</div>

Yep, I too believe that good music can be rationalised to some degree, otherwise I wouldn’t have been able to program this algorithm (😃) I’ve been composing for about a decade, and my rules are part theory and part experience. There are many rules I’ve been able to specify, but others like which chord to progress to I leave to chance, because I’ve found that under certain conditions, basically every chord progression can sound good.

That said, I didn’t use harmonic and melodic minor scales before this, and I think I’m going to need special rules for them.

---

<div class="post-metadata">

**Author:** ![Nechoj](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/nechoj/32/1814_2.png) [@Nechoj](https://in-thread.sonic-pi.net/u/Nechoj)\
**Post date:** [March 15, 2021, 2:24pm UTC](https://in-thread.sonic-pi.net/t/polyphony-project-v0-3-0/5259/20 "2021-03-15T14:24:16Z")

</div>

The interesting questions seems to be, what ‘rules’ you are using to develop the algorithms and what ‘freedom’ they have got to choose randomly. The chance that purely random generated notes ‘sound good’ is quite small. On the other hand, using randomness you can create new things that are lying aside the known paths …  
I found it very inspiring to listen to the results of my programmed improvisations, because some of the sequences I would not have invented myself. Really interesting stuff to play with.

[Next page](https://in-thread.sonic-pi.net/t/polyphony-project-v0-3-0/5259.md?page=2)
