Create music with Fortran

Yes it’s possible !!!

2 Likes

But why? :smile:

This brings back memories of visiting the computer lab at university in the middle of the night to enter the Fortran program to be run in the next batch because the lab was quieter then so easier to get on a terminal. I should have been sleeping or partying. It’s hard being an engineering student!

2 Likes

Maybe because music theory = mathematics = Fortran ?

This is just amazing… Although I’m the proud owner of a venerable V2 kit that I restored to work earlier this week with stable oram, this is my first post here.
I came to learn and to check for portable midi keyboard options, and I found this gem.
Actually, I did some music back in 1982 with Fortran IV, plus a bit of assembly…
Back then, me and an university colleague created Data General Nova 4 assembly code to make a diatonic scale with PWM using only the buzzer/bell/crtl-G of the Tektronix 4010 terminal. Then I made a kind of karaoke system in Fortran: a basic melody was defined with a text simple syntax, along with the lyrics, and the editor would trigger the compiler and link with the assembly routine to produce and run an executable that played the song in the 4010 - a kazoo sound alike - displaying the lyrics in sync. The top hit was a rendition of “Scotland the Brave”.
I wish I had some video/audio. But I still have that (now useless) code :stuck_out_tongue:

3 Likes

Now when was the last time we ran a competition around a piece…?

Probably the Jump opening synth line…

Oh and welcome aboard!

I lost a fortran for dummies book on Paddington station a long time ago. I’m not hopeful of gettting it back…

2 Likes

Thx for the warm welcome!

2 Likes

A very nice article written by the same guy, about Factory Records and Peter Saville’s design (with some Fortran code) and the hard time it was to create music with machines.
All in french.

Peter Saville’s color code in Fortran

Edit: for reference

image

1 Like

You haven’t seen a fortran book lying around any stations recently have you…?
All in English.

In that book published in 1963
FormalizedMusic

there’s a full listing in Fortran for composing music based on stochastic principles.

The book is available on Google book

The code is now on Github:

How to compile:

How the program work is explained here:

Ronald Squibbs, “6. Iannis Xenakis’s Free Stochastic Music Program as an Aid to Analysis” in Kanach, Sharon, and Peter Nelson, eds. 2024. Meta-Xenakis: New Perspectives on Iannis Xenakis’s Life, Work, and Legacies. 1st ed. Cambridge, UK: Open Book Publishers.

Here’s a result, “ST/10=1,080262”, by “Ensemble de Musique Contemporaine de Paris”

  • ST for stochastic
  • 10 for ten instruments
  • 080262: this was first computed by an IBM 7090 the 8th of February 1962

[Edit] I wasn’t convicted this piece has his place in the “Music is the best” thread :wink: [/Edit]

Finally a quote from John Backus, the father of Fortran:

Well, don’t go into software. It’s just such a complicated mess that you just frazzle your brains trying to do anything worthwhile.

All my sources comes from this post in French:

3 Likes

I have not looked at FORTAN since I left university in 1990. I remember going to the computer lab at 3am because it was so busy at other times. Writing my FORTRAN on a terminal connected to the mainframe and submitting the source code to be compiled and run by the lab technician the next day, afterwhich I would get the result… almost certainly a syntax error that I would then need to correct before the next run. Rinse - repeat until some working code a few days later.

BTW - I don’t want to recode zynseq in FORTRAN!!! :smile:

4 Likes

Rust then?

Brainfuck

5 Likes

an exemple of brainfuck use

https://code-poetry.com/delta_t

from
https://code-poetry.com/home

Available in a printed book version

This javascript code


produce

And what about this python code

from random import random as r          #
from numpy  import zeros  as z  #
                  #
the, fire='station' is 'getting', 'ready'
   #
w,h=77,19;s=z([h,w],str);b=z(w*h+w+1,int)
                   #
to, hatch = all ('its'), 'trucks'   #
                    #
while 1:  #
                               #
 the= 'night' is 'daydreaming'
           #
 for _ in range(w//9):b[int((r()*w)+w*(h-1))]=40   
                     #
 of, a, blaze = 'so', 'big',()
          #
 for i in range(w*h):  #
  b[i]=(b[i]+b[i+1]+b[i+w]+b[i+w+1])//4
  if i<w*h-1:s[i//w,i%w]=" .:^*xsS#$"[min(b[i],9)]   
                                #
 management = 'will' + 'attend'
                       #
 print('\n'.join(''.join(l) for l in s))
             #
'' in their, little - van #

click here

All of these funny stuff makes me think to

example:

2 Likes

In the same manner, here’s à tuto on how to create music with Perl

1 Like

Hopefully someone will be inspired to make a Perl Drumkit.

3 Likes