A sequencer and a synthesizer in Perl? Why not?

This is a side project from a side project, but it turned out to be a lot of fun so that I'll probably continue to spend some of my spare time on it.

It started with my interest for the Corinna project to bring "modern" object orientation into the core of the Perl programming language.

Then I noticed (a few years ago) that my favourite editor Emacs does not understand newer Perl syntax, and as a side project I added missing stuff to CPerl mode. So, upcoming Emacs 30 will understand Perl syntax including Perl 5.40.

While working on this I noticed that - as could be expected - there is not much code out there in the wild which already uses the new Perl syntax. So, to get some test and practice, I had to write my own. The stuff I wrote would not need to serve any practical purpose, but exercise lots of syntactical variations.

So this project was started to test CPerl mode and at the same time have fun. For the Perl code this means that it isn't very consistent in its style intentionally because I needed CPerl mode to cover different coding styles. The repository also contains some dead code and many undocumented features. Sorry for that. I also use Feature::Compat::Class instead of use feature 'class' because that way I can debug the objects by using "older" Perl versions which fall back to Object::Pad.

Part of this work was the specification of a file format which I could use to test the audio software: It should be easy to write for humans (unlike MIDI). This spec is now here, but unfortunately GitHub's POD rendering clobbers Unicode characters in Code sections. Also, HTML rendering of musical note symbols looks worse than I expected even when correctly decoded, so perhaps I'll drop that.

The `eg` directory has a few examples of music roll files which can be played with the program `bin/mrt_play`. This needs the `sox` program to be on your path.

Two of the samples created by mrt_play (~300kB, ~30 seconds each) are at https://haraldjoerg.github.io/i/entertainer.ogg and https://haraldjoerg.github.io/i/lvb_27_2.ogg.

The code is on GitHub.


In reply to Sound from Scratch by haj

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.