Phase Music

Musical topics not directly related to steel guitar

Moderators: Dave Mudgett, Janice Brooks

Post Reply
User avatar
b0b
Posts: 29108
Joined: 4 Aug 1998 11:00 pm
Location: Cloverdale, CA, USA
Contact:

Phase Music

Post by b0b »

Sometimes I escape into my headphones to code and arrange strange electronic music. Many people find the results to be unlistenable. Yesterday, as workmen in my house were installing a new air conditioner to help us beat this triple-digit heat, I became totally absorbed in Java code that spit out random "melodies" and mixing them together in Audacity.

At one point, I had my headphones on but the sound was actually coming out of the computer's speakers. I kept turning it up unknowingly until the Mrs shouted, "What's that noise?". :lol:

Anyway, here's the result. I only ask that you give it at least 70 seconds of your time to hear the first of 4 segments in its entirety - if you can stand it for that long!

https://bp.b0b.com/2022/08/co-go-phase/
-𝕓𝕆𝕓- (admin) - Robert P. Lee - Recordings - Breathe - D6th - Video
User avatar
Jerry Overstreet
Posts: 12622
Joined: 11 Jul 2000 12:01 am
Location: Louisville Ky

Post by Jerry Overstreet »

Interesting. I did not find it unlistenable for the duration.
Bill McCloskey
Posts: 6877
Joined: 5 Jan 2005 1:01 am
Location: Nanuet, NY
Contact:

Post by Bill McCloskey »

You are writing in Java and it is producing Javanese Gamelan music?
Check out my latest video: My Biggest Fears Learning Steel at 68: https://youtu.be/F601J515oGc
User avatar
Jim Fogle
Posts: 1086
Joined: 23 Jul 2019 9:47 am
Location: North Carolina, Winston-Salem, USA
Contact:

Post by Jim Fogle »

I think the secret is you picked a nice sounding sound to start with. I didn't find the randomness I expected. Would I buy the record? Ah, no. I listened to the full track and found it fairly peaceful as long as I kept the volume level pretty low.
Remembering Harold Fogle (1945-1999) Pedal Steel Player
Dell laptop Win 10, i3, 8GB, 480GB
2023 BiaB UltraPlus PAK
Cakewalk by Bandlab Computer DAW
Zoom MRS-8 8 Track Hardware DAW
User avatar
b0b
Posts: 29108
Joined: 4 Aug 1998 11:00 pm
Location: Cloverdale, CA, USA
Contact:

Post by b0b »

One of the problems with JMusic is that it doesn't support microtonal MIDI. That limits the range of available "Instruments" to waveforms described in code. I wrote one called OddHarmonicInst, but the other 3 are straight from JMusic libraries.

The range of MIDI instruments available is virtually limitless, but without microtonal support I can't do the Bohlen-Pierce scale as MIDI. I should write a test program that outputs the scale using each JMusic Instrument class so that I can compare them. Actually, I should have done that first, but I had this phasing idea that wouldn't wait... :mrgreen:

Code: Select all

  static BPScale scale;
  
  // the notes of two otonal chords CGA and GBE are the only ones used
  private static String notenames[] = { 
    "C1", "E1", "G1", "A2", "B2", 
    "C2", "E2", "G2", "A3", "B3",   // C2 could be the bottom note for melodies
    "C3", "E3", "G3", "A4", "B4",   // A4 could be the top note for melodies
    "C4", "E4", "G4", "A5", "B5"    
  };
  
  /*********************************************************************************
   * creates 4 similar melody files in "/Users/quasar/Music/Bohlen-Pierce/CoGo Phase
   */
  static void writeCoGoPhase()
  {
    Instrument instruments[] = {
        new SineInst(44100),
        new SquareLPFInst(44100),
        new OddHarmonicInst(44100),
        new VibesInst(44100)
    };
    String instnames[] = { "Sine", "Square", "Odd", "Vibes"};
    
    createMelodies();
    // phase melody project
    for (int i=0; i<4; i++) {
      Score score = new Score();
      score.setTempo(93.428571);
      Part part = createMelodyPart(instnames[i]);
      score.add(part);
      Write.au(score,"/Users/quasar/Music/Bohlen-Pierce/CoGo Phase/" + instnames[i] + ".au", instruments[i]);
    }
  }
  
  // 9-note melodies as note names
  static String[][] melodies = new String[5][10];
  static void createMelodies()
  {
    for (int i=0; i<5; ++i)
      for (int j=0; j<9; ++j)
      {
        melodies[i][j] = notenames[randint(9) + 5];  // C2 to A4
      }
  }
  
  static Part createMelodyPart(String name)
  {
    Part part = new Part(name);
                
    //create the phrase note by note
    for(int i=0; i<4; i++)  // the 4 melodies
    {
      Phrase phrase = new Phrase(109.0 * (double)i); // each 9 note melody will repeat 12 times
      phrase.add(new Rest(0.5));
      
      for (int n=0; n<12; n++) 
      {
        for (int j=0; j<9; ++j)
        {
          int dynamic = randint(32) + 64;
          double time = 1.0;  // quarter note
          // randomize timing a wee bit
          time += (Math.random() < 0.5 ? -0.00625 : 0.00625);
          time += (Math.random() < 0.5 ? -0.00625 : 0.00625);
          Note note = new Note(
              scale.getFreq(melodies[i][j]), 
              time,  
              dynamic);      
          phrase.add(note);
        }
      }
      phrase.add(new Rest(0.5));
      // System.out.println(phrase.toString());
      part.addPhrase(phrase);
    }
    return part;
  }
The actual phasing was done with tempo changes of half of the melodies in Audacity.
-𝕓𝕆𝕓- (admin) - Robert P. Lee - Recordings - Breathe - D6th - Video
User avatar
Ian Rae
Posts: 5826
Joined: 10 Oct 2013 11:49 am
Location: Redditch, England
Contact:

Post by Ian Rae »

There are only two things I don't like about it. One is the tonal stasis, like poetry with only one vowel.

The other is the whole idea of computers playing music, because they're too precise. Just as when we listen to microtonal music our ears try to "correct" to the nearest note we're familiar with, the extreme rhythmic precision in this work does not present itself as "phasing" (although it's obvious what's happening) but rather as one of those bad drummer experiences. My brain wants to quantize the beats.

Having said all that, the world needs b0bs to explore musical outer space in case we need to move there one day.
Make sleeping dogs tell the truth!
Homebuilt keyless U12 7x5, Excel keyless U12 8x8, Williams keyless U12 7x8, Telonics rack and 15" cabs
Donny Hinson
Posts: 21192
Joined: 16 Feb 1999 1:01 am
Location: Glen Burnie, Md. U.S.A.

Post by Donny Hinson »

Spooky!

Sounds like the battery in the ice-cream truck is dying.

:lol:
User avatar
Jim Fogle
Posts: 1086
Joined: 23 Jul 2019 9:47 am
Location: North Carolina, Winston-Salem, USA
Contact:

Post by Jim Fogle »

bOb,

You might enjoy this article about building a media player: https://www.section.io/engineering-educ ... avascript/

I also found this article about Tone.js: https://tonejs.github.io/
Remembering Harold Fogle (1945-1999) Pedal Steel Player
Dell laptop Win 10, i3, 8GB, 480GB
2023 BiaB UltraPlus PAK
Cakewalk by Bandlab Computer DAW
Zoom MRS-8 8 Track Hardware DAW
User avatar
b0b
Posts: 29108
Joined: 4 Aug 1998 11:00 pm
Location: Cloverdale, CA, USA
Contact:

Post by b0b »

Thanks for the comments, everyone. :D

Ian, here's a Bohlen-Pierce piece I played with real instruments. https://bp.b0b.com/2022/07/3-bohlen-pierce-instruments/ In general I agree with you that human music is superior. I've been coding algorithmic music since my first computer - an Atari 400 - to do things that none of the musicians I knew could play. I released an album of it in 1991. It sold dozens of copies. :lol: I've toyed with the idea of playing those songs live, but I actually don't think I could do it.

Jim, thanks for the links. Javascript is a very different language from Java. I haven't learned it, but I should.
-𝕓𝕆𝕓- (admin) - Robert P. Lee - Recordings - Breathe - D6th - Video
Dave Magram
Posts: 597
Joined: 10 Jan 2003 1:01 am
Location: San Jose, California, USA

Post by Dave Magram »

b0b,

Interesting results.

You wrote in the description: "This electronic piece uses the otonal chords CGA and GBE..."

I'm curious--what is the meaning of "otonal" in this context?
The only result I got with a Google search was "autumnal".

-Dave
User avatar
b0b
Posts: 29108
Joined: 4 Aug 1998 11:00 pm
Location: Cloverdale, CA, USA
Contact:

Post by b0b »

Bohlen-Pierce literature references those kinds of chords as "otonal" and another kind as "utonal". I think it's roughly equivalent to "major" and "minor" in a 12-tone system. With the morphing drone chords and a five-note scale containing only notes from the two chords, I was trying to understand the sound of the "otonal space".
-𝕓𝕆𝕓- (admin) - Robert P. Lee - Recordings - Breathe - D6th - Video
User avatar
Jim Fogle
Posts: 1086
Joined: 23 Jul 2019 9:47 am
Location: North Carolina, Winston-Salem, USA
Contact:

Post by Jim Fogle »

bOb, I did not know java and javascript were that different. Thank you for telling me. I use to code in the seventies and eighties but moved away from it. I still find it interesting what people code for fun.

In some ways I think computing was more fun back in the days the Commodore 64, Atari 400, Sinclair ZX81 and the Tandy Model 1 ruled the personal computing world.
Remembering Harold Fogle (1945-1999) Pedal Steel Player
Dell laptop Win 10, i3, 8GB, 480GB
2023 BiaB UltraPlus PAK
Cakewalk by Bandlab Computer DAW
Zoom MRS-8 8 Track Hardware DAW
User avatar
Mike Bacciarini
Posts: 745
Joined: 16 Jul 2018 1:31 pm
Location: Arizona

Post by Mike Bacciarini »

Intriguing, and I don’t know why.

Donny, the battery in the ice cream truck….. hilarious!

All of this low level computer stuff reminds me of:
“There are 10 kinds of people who understand binary.
Those who do, and those who don’t.
MCI Arlington S-10 3+5, George L E-66, BJS & Emmons bars, Fender Princeton 65W, Fender Satellite SFX, custom FX rack, 1983 Dobro 60D, SX-8 lap steel, Martin D16GT, Ibanez AS73, 1978 Rickenbacker 4000 custom.
User avatar
Charlie McDonald
Posts: 11054
Joined: 17 Feb 2005 1:01 am
Location: out of the blue

Post by Charlie McDonald »

Sometimes I worry about b0b; I guess he's just going through a phase.
Those that say don't know; those that know don't say.--Buddy Emmons
User avatar
Mike Neer
Posts: 10990
Joined: 9 Dec 2002 1:01 am
Location: NJ
Contact:

Post by Mike Neer »

b0b, I always keep my ears open for interesting new (to me) stuff. I think you might really enjoy the work of composer Tom Johnson, whose music is based on advanced mathematics (group theory, etc) and is very creative and interesting. He has written a few books (I own Self-Similar Melodies) and he also talks a lot about his works on his youtube channel. Check him out, I don’t think you’ll be disappointed.
Here is one of his Rational Melodies, a self-replicating melody. He is a treasure—he explains it all.

https://youtu.be/Bqn7cLC6bak
User avatar
b0b
Posts: 29108
Joined: 4 Aug 1998 11:00 pm
Location: Cloverdale, CA, USA
Contact:

Post by b0b »

Thanks for that link, Mike. I'd never heard of Tom Johnson before. His compositions seem to be every bit as "unlistenable" as mine! ;-) :lol:

My biggest influences in this realm are the minimalists Terry Riley ("In C") and Steve Reich ("Music for 18 Musicians"). I've heard that Mozart sometimes composed by throwing dice. That inspired the randint( ) function that I use in most of my algorithmic music.
-𝕓𝕆𝕓- (admin) - Robert P. Lee - Recordings - Breathe - D6th - Video
Dave LaDelfa
Posts: 7
Joined: 20 Jul 2022 5:59 pm
Location: California, USA

Post by Dave LaDelfa »

b0b wrote:I'd never heard of Tom Johnson before. His compositions seem to be every bit as "unlistenable" as mine! ;-)
I will agree that a lot of Tom Johnson's music is more enjoyable as intellectual concept than as listening material. However, he has at least one certifiable masterpiece in his oeuvre: "An Hour For Piano" (1971). A tiny clocklike pattern repeats a few times and then fractures in a tiny, almost imperceptible manner. Then another thing happens to it. And it just kind of evolves. Always quiet. Takes ... an hour. Highly recommended.
Post Reply