‘is it going up or down?’

Previously I’d tackled the ever increasing pitch paradox, now it’s time for the ‘is it going up or down?’ paradox. I will walk you through my process.

Editing the old chord

In the ever increasing pitch paradox I had already coded the different octaves of a tritone interval. The only difference for this instance is the mode of activation.

tritone_5 =play tritone_k, attack: 0.05, decay: 50, sustain: sustain

This is the part of the code that I need but I need it tweaked. I don’t want the different ADSR values changed. so I have to remove them. I Can do it manually but it becomes tedious for 12 different instances..

So I inputted the text into Sublime text editor. Then I used a Regular expression to select the pattern. my pattern is any character (with any number of occurrences) after a comma and followed by a new line.

My search pattern

you can find out more about RegEx and experiment here: https://regexr.com

Final touches

I felt that the tones are going up so I lowered the pitch of the second note of the interval by an octave. And as expected, it still felt that the interval is going up.

I included the code and the audio output in the submission folder

Leave a comment

Design a site like this with WordPress.com
Get started