So you want to generate interesting melodies.

1. Make a file called 1235.txt containing, one per line, all 24 unique permutations of the elements 1 2 3 5.

2. Cp 1235.txt to D.txt

3. Use sed to convert the numbers in D.txt to notes. Now you have 24 permutations of the major tetrachord in D.
4. Play them each. If it sounds like it increases tension, mark the beginning of that cell in 1235.txt with a +. If it sounds like it decreases tension, mark with a -.

Now those 24 melodic cells are divided into two groups: tension increasers and resolvers.
5. Rinse and repeat for all 12 keys.

You now have 13 plaintext files, filled with stuff like + 1 2 5 3 and - D E F# A
6. Figuratively roll dice to decide, given a +/- cell, what the next cell should be.

33% chance a + follows a +, etc.

Now you're outputting a stream of dynamic tensions: ++-+++-+-+---+ etc
7. Already this sounds good. It's got tension and release baked right into it.

Zero AI, it's literally just some plaintext files.

8. Return to step 6, except add in a separate dice roll for whether the next cell is to stay on the same scale, or move an interval above.
9. Now a cell like E D A F# has a chance to be followed by a tension-increasing cell a tritone higher. Or a tension resolving cell one chromatic step lower:

E D A F#
G# C# E D#

Etc.
10. Now the magic part: do the exact same thing you just did, except with those above pairs of cells instead of individual cells. Listen, mark as +/- if they increase or decrease tension.
And voila. Without any AI, not a single bit of fancy machine learning involved, literally just plaintext files and a text editor and utilities like rand and shuf, you're generating complex melodic lines with dynamic tension and release. Just a bunch of dice under the hood.
You can get fancier. Make a d.a.txt where you gsub the fifth to a flatted fifth, and toss that into the mix. Make a d.b.txt where you toss in a wild flatted seventh instead of a second. Add it to the mix.
You can, literally using just plaintext and rolling imaginary dice, generate basically infinite melodies that sound interesting, that have a dynamic flow that randomly selecting individual notes does not.
This is what I'm playing with at the moment.

Try it. Like it? Reward my incredible laziness.

https://t.co/aHjAaZYHrw

More from Anosognosiogenesis

The US immigration act of 1907 signed by Teddy Roosevelt: ableist as hell. https://t.co/ficeXOImo5


One theory for why the Spanish flu was so unusually lethal for young people:

They hadn't lived through the previous flu pandemic of 1889-1890 (https://t.co/OiDZYtdbWx) that killed about 1 million people. And thus had no carryover immunity.

It's suspected that the 1889 pandemic was not influenza, but a coronavirus.

The 1889 virus spread rapidly, killing mostly the elderly.

The 1889 virus was the first truly modern pandemic: people knew about germs, it spread via trains, it spread at the speed of modern transportation and commerce
So I've mentioned the sharpie test and the tueller drill.

Another reason you are dead within 1.5 seconds of encountering your first fast zombie, is adrenaline.


Most people who get attacked with a knife and survive to talk about it, say they never even knew a knife was there.

Or that they'd been stabbed, until after the fact.

In many cases, they think they'd just been punched, and are completely surprised

One reason the adage is "the winner is the one who dies in the ambulance, not the gutter," is because it's entirely possible to receive a fatal wound, not realize it, and then inflict a fatal wound on the other guy without *him* realizing it.

A dozen times within 30 seconds.

The marker drill teaches how you *will* get cut, fatally, without realizing it.

In full adrenaline freakout, this is even more pronounced.

More from Culture

. THREAD 1/x

David Baddiel is getting lots of coverage and feedback on his book which again focuses on so called 'left wing' antisemitism.

I will start by saying that I have seen antisemitic comments made by Labour members and some genuine cases.

However, I have huge concerns.


2/x

Let's look in detail at this article written in April 2019 in the @Guardian - and I will explain the concerns.

The areas highlighted guide you to believe this was all Labour - IT WASN'T.

It also occurred before 2015! Detail follows...

https://t.co/cK59FP83aG


3/x

So as you see the writer of this rather deceitful piece starts with

"THAT CHANGED IN SEPTEMBER 2015" 🙄

This was done to point the timeframe as Corbyn's leadership. Yet the article goes on to describe things that are not even related to Labour, which occurred in 2014.


4/x

So... What in fact the @Guardian writer is discussing here is this case - where a group of Neo-Nazi's spent months inflicting abuse on Jewish MP Luciana Berger

All the detail is in the Court Notes when Bonehill-Paine was sentenced by the judge.

https://t.co/wAyo6Yro5Q


5/x

The Justice sentencing remarks to Neo-Nazi explain the previous cases too. See the date 2014.

Yet the Guardian writer refers to this NON LABOUR case to effectively make her article a lie.

"Star of David" - this was Garron Helm another neo-Nazi..

You May Also Like

A brief analysis and comparison of the CSS for Twitter's PWA vs Twitter's legacy desktop website. The difference is dramatic and I'll touch on some reasons why.

Legacy site *downloads* ~630 KB CSS per theme and writing direction.

6,769 rules
9,252 selectors
16.7k declarations
3,370 unique declarations
44 media queries
36 unique colors
50 unique background colors
46 unique font sizes
39 unique z-indices

https://t.co/qyl4Bt1i5x


PWA *incrementally generates* ~30 KB CSS that handles all themes and writing directions.

735 rules
740 selectors
757 declarations
730 unique declarations
0 media queries
11 unique colors
32 unique background colors
15 unique font sizes
7 unique z-indices

https://t.co/w7oNG5KUkJ


The legacy site's CSS is what happens when hundreds of people directly write CSS over many years. Specificity wars, redundancy, a house of cards that can't be fixed. The result is extremely inefficient and error-prone styling that punishes users and developers.

The PWA's CSS is generated on-demand by a JS framework that manages styles and outputs "atomic CSS". The framework can enforce strict constraints and perform optimisations, which is why the CSS is so much smaller and safer. Style conflicts and unbounded CSS growth are avoided.