Electronic music generation


The problem with writing electronic music is that it is normally done through an interface that doesn’t always reflect the artists’ primary interests. I’ll admit, Ableton Live is an excellent tool, and I use it as my primary tool for many creative tasks. However, I need finer control. I need to be able to apply a function to automate a control change sequence of events.

Some ideas:

  • Make the program revolve around minimalism so that the musical structure of the song is defined up-front, and can be dynamically changed using the smaller parts as the main ideas. Like a tracker does with patterns, but more modern.
  • Having designed image processing software, adapt ideas from this program in terms of visual layout and functionality, but more mouse driven.
  • Listen to structure of songs and represent them to create test input for the music-generating algorithm.
  • Generalize enough for other hardware, but also focus on building own hardware explicitly to maximize utility.
  • Balance the flexibility afforded by old NES programming language MML and the assembly compiler, against its tediousness in writing harmonies. Take advantage of the declarative ability to define musical phrases symbolically.

Speaking of NES:

It’s fairly easy to generate the 32ksample loop that the NES’s noise channel uses. The following C code will generate it on stdout (8bits/sample, 1 channel)

int main (int argc, char * argv[]) {
  unsigned char feedback;
  unsigned short nreg=1;
  int i;
  for (i=0;i>13)&1)^((nreg>>14)&1);
    nreg=(nreg<>14)&1)?'~':' ');

Then you loop it and only play it at specific sample rates, specifically (for US NESes) 3,579,545 Hz divided by the numbers in the NTSC line at http://nesdevwiki.org/wiki/APU_Noise

For the NES triangle, just take an ordinary triangle wave and degrade it to 4bits.



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: