computer science, anyone?

Discussion in 'Off Topic [BG]' started by brainhii, Jan 10, 2009.

  1. brainhii

    brainhii Guest

    Mar 25, 2007
    do any other TBers enjoy programming? it's fun and you can do a lot of music-related stuff with it. i'm pretty new to it, but here's the method for a neat little text-based polyrhythm generator that i coded with java(if you happen to have a compiler on your computer, that is):

    public void printPolyrhythm(int meterA, int meterB){
    System.out.println();
    int measure = meterA * meterB;
    for(int a = 0; a < measure / meterA; a ++)
    {
    for(int b = 0; b < measure / meterB; b ++){
    if(b == 0)
    System.out.print("x|");
    else
    System.out.print("_|");
    }
    }
    System.out.println();
    for(int b = 0; b < measure / meterB; b ++)
    {
    for(int a = 0; a < measure / meterA; a ++){
    if(a == 0)
    System.out.print("o|");
    else
    System.out.print("_|");
    }
    }

    }

    anyone else have anything to share?
     
  2. brainhii

    brainhii Guest

    Mar 25, 2007
    here's an example of the 2 against 3 polyrhythm that it would return


    x|_|x|_|x|_|
    o|_|_|o|_|_|
     
  3. daystcity

    daystcity Guest

    Mar 23, 2008
    Where am I?!?!?
    hopefully I'll take programming next year! I've always had an interest in computers.
     
  4. anyonefortennis

    anyonefortennis Supporting Member

    Jun 28, 2005
    Lincoln, NE
    I been programing professionally for about 5 years although my degree is in MIS. I'm a .net guy though.

    If you have cool software you coded and want to sell it, you should check out the company I work for. http://www.esellerate.net and you can sell your stuff as shareware.

    My proudest lil piece of code is an app that clears formatting from the clipboard when coping/pasting (anyone else HATE that?). I copied and pasted into notepad one too many times so I got tired of it and coded a fix of my own. Will share it with anyone that wants it.
     
  5. lemur821

    lemur821 Guest

    May 4, 2004
    St. Louis, MO, U.S.
    I've got some snippets of Lisp code that do stuff like draw out necks for various scales. And I was programming my Adlib card a little before it gave up the ghost. I think I've got a version that works with Star Sapphire Common Lisp in DOSbox somewhere....