# Anecdotal Fortran... :-)

**URL:** <https://fortran-lang.discourse.group/t/anecdotal-fortran/704>\
**Category:** Uncategorized\
**Created:** [February 11, 2021, 5:58pm UTC](https://fortran-lang.discourse.group/t/anecdotal-fortran/704 "2021-02-11T17:58:03Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![vmagnin](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/vmagnin/32/28_2.png) [@vmagnin](https://fortran-lang.discourse.group/u/vmagnin)\
**Post date:** [February 13, 2021, 1:56pm UTC](https://fortran-lang.discourse.group/t/anecdotal-fortran/704/8 "2021-02-13T13:56:18Z")

</div>

> [@ivanpribec](#):
>
> Next February (08/02/2022) it will be 60 years since the piece of music was generated. It would be a cool project to modernize the program and synthesize the sound too, directly in Fortran (probably by interfacing to a sound library).

Thanks for sharing!  
It could be done in Fortran. I have written a C teaching project to synthesize sounds and write them in a WAV format. It was inspired by:  
[https://gasstationwithoutpumps.wordpress.com/2011/10/08/making-wav-files-from-c-programs/](https://gasstationwithoutpumps.wordpress.com/2011/10/08/making-wav-files-from-c-programs/)  
A WAV comprises a header with metadata then the soundtracks in PCM ([Pulse-code modulation - Wikipedia](https://en.wikipedia.org/wiki/Pulse-code_modulation)). And you need a little endian procedure to write the 2 or 4 bytes data.

The Xenakis’ book is here:  
[https://books.google.fr/books?id=y6lL3I0vmMwC&printsec=frontcover&hl=fr&redir\_esc=y#v=onepage&q&f=false](https://books.google.fr/books?id=y6lL3I0vmMwC&printsec=frontcover&hl=fr&redir_esc=y#v=onepage&q&f=false)  
You can read some parts of the Fortran code around page 317(but I don’t know if it is the code of that music, we can preview only a limited number of pages).

---

_[View the full topic](https://fortran-lang.discourse.group/t/anecdotal-fortran/704)._
