Improvements to existing code

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • NexxuSix

    #1

    Improvements to existing code

    Hi all,
    There is a powerful software synthesizer available today, but it lacks
    a few key features. It's been awhile since I've coded, but was wonder
    if anybody would be interested in a collaboration on this project?

    http://sourceforge.net/projects/zynaddsubfx

    One of the main things this synth needs is a way to accept Program
    Changes within a bank. There are some revisions initially set up in
    the software, but no routines have been written to handle the request.

    Snippet from ZynAddSubFX/src/Seq/MidiFile.C:

    case 0xc0 ... 0xcf://program change - ignored
    skipnbytes(1);
    break;

    I understand some coding, but I'm a little rusty. Any thoughts on
    this?

    -NexxuSix

  • Victor Bazarov

    #2
    Re: Improvements to existing code

    NexxuSix wrote:
    [..]
    Snippet from ZynAddSubFX/src/Seq/MidiFile.C:
    >
    case 0xc0 ... 0xcf://program change - ignored
    skipnbytes(1);
    break;
    >
    I understand some coding, but I'm a little rusty. Any thoughts on
    this?
    It is not valid C++, if that's what you wanted to ask.

    V
    --
    Please remove capital 'A's when replying by e-mail
    I do not respond to top-posted replies, please don't ask


    Comment

    • NexxuSix

      #3
      Re: Improvements to existing code

      On Jul 5, 7:41 am, "Victor Bazarov" <v.Abaza...@com Acast.netwrote:
      NexxuSix wrote:
      [..]
      Snippet from ZynAddSubFX/src/Seq/MidiFile.C:
      >
      case 0xc0 ... 0xcf://program change - ignored
      skipnbytes(1);
      break;
      >
      I understand some coding, but I'm a little rusty. Any thoughts on
      this?
      >
      It is not valid C++, if that's what you wanted to ask.
      >
      V
      --
      Please remove capital 'A's when replying by e-mail
      I do not respond to top-posted replies, please don't ask
      Well, I don't know if this makes a difference, but this is the source
      code that is written with g++ for Linux. Source code should be source
      code, no matter what the compiler is, I suppose. What I was hoping was
      to soo if anybodt might be interested in helping co-author a routine
      for ZynAddSubFX so that it can change programs within a bank. Would
      anybody be interested in partnering with me on this project?

      -Nexx

      Comment

      • Victor Bazarov

        #4
        Re: Improvements to existing code

        NexxuSix wrote:
        On Jul 5, 7:41 am, "Victor Bazarov" <v.Abaza...@com Acast.netwrote:
        >NexxuSix wrote:
        >>[..]
        >>Snippet from ZynAddSubFX/src/Seq/MidiFile.C:
        >>
        >> case 0xc0 ... 0xcf://program change - ignored
        >> skipnbytes(1);
        >>break;
        >>
        >>I understand some coding, but I'm a little rusty. Any thoughts on
        >>this?
        >>
        >It is not valid C++, if that's what you wanted to ask.
        >>
        >V
        >--
        >Please remove capital 'A's when replying by e-mail
        >I do not respond to top-posted replies, please don't ask
        >
        Well, I don't know if this makes a difference, but this is the source
        code that is written with g++ for Linux.
        Of course it does. Most likely whoever wrote it relied on certain C++
        *extensions* in g++ (and plenty of those there are, I might add).
        Source code should be source
        code, no matter what the compiler is, I suppose.
        You're absolutely right. It *should*.
        What I was hoping was
        to soo if anybodt might be interested in helping co-author a routine
        for ZynAddSubFX so that it can change programs within a bank. Would
        anybody be interested in partnering with me on this project?
        I don't know. I am not, though.

        V
        --
        Please remove capital 'A's when replying by e-mail
        I do not respond to top-posted replies, please don't ask


        Comment

        • Default User

          #5
          Re: Improvements to existing code

          NexxuSix wrote:
          On Jul 5, 7:41 am, "Victor Bazarov" <v.Abaza...@com Acast.netwrote:
          NexxuSix wrote:
          [..]
          Snippet from ZynAddSubFX/src/Seq/MidiFile.C:
          case 0xc0 ... 0xcf://program change - ignored
          skipnbytes(1);
          break;
          I understand some coding, but I'm a little rusty. Any thoughts on
          this?
          It is not valid C++, if that's what you wanted to ask.
          Well, I don't know if this makes a difference, but this is the source
          code that is written with g++ for Linux. Source code should be source
          code, no matter what the compiler is, I suppose.

          Many compilers provide various extensions to the language. These
          extensions are non-standard and off-topic here. The case range you show
          in the original is one such extension.

          I believe g++ provides compiler flags to force it into a conforming
          mode, which would disallow or warn such extensions.




          Brian

          Comment

          • BobR

            #6
            Re: Improvements to existing code


            Victor Bazarov <v.Abazarov@com Acast.netwrote in message
            news:f6iouk$hm5 $1@news.datemas .de...
            NexxuSix wrote:
            [..]
            Snippet from ZynAddSubFX/src/Seq/MidiFile.C:

            case 0xc0 ... 0xcf://program change - ignored
            skipnbytes(1);
            break;

            I understand some coding, but I'm a little rusty. Any thoughts on
            this?
            >
            It is not valid C++, if that's what you wanted to ask.
            GCC has an extension that does case ranges. And yes, it bit me once!

            OP: Invoke g++ with -ansi -pedantic, and you should get an error out of it.
            (assuming you use GCC)

            case 0xc0:
            case 0xc1:
            // .....
            case 0xce:
            case 0xcf: { /* body here */ skipnbytes(1); break; }

            --
            Bob R
            POVrookie


            Comment

            • James Kanze

              #7
              Re: Improvements to existing code

              On Jul 5, 7:45 pm, NexxuSix <Nexxu...@gmail .comwrote:
              On Jul 5, 7:41 am, "Victor Bazarov" <v.Abaza...@com Acast.netwrote:
              NexxuSix wrote:
              [..]
              Snippet from ZynAddSubFX/src/Seq/MidiFile.C:
              case 0xc0 ... 0xcf://program change - ignored
              skipnbytes(1);
              break;
              I understand some coding, but I'm a little rusty. Any thoughts on
              this?
              It is not valid C++, if that's what you wanted to ask.
              Well, I don't know if this makes a difference, but this is the source
              code that is written with g++ for Linux. Source code should be source
              code, no matter what the compiler is, I suppose.
              It depends. C++ source code should be C++ source code, no
              matter what the compiler is. But as Victor pointed out, the
              above is not C++. When g++ is invoked as a C++ compiler ("g++
              -std=c++98 -pedantic"), it doesn't compile with g++. (Like most
              compilers, when invoked without special options, g++ compiles a
              language of its own, somewhat similar to C++, but not exactly
              the same language.)

              --
              James Kanze (GABI Software) email:james.kan ze@gmail.com
              Conseils en informatique orientée objet/
              Beratung in objektorientier ter Datenverarbeitu ng
              9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

              Comment

              • NexxuSix

                #8
                Re: Improvements to existing code

                On Jul 6, 4:56 am, James Kanze <james.ka...@gm ail.comwrote:
                On Jul 5, 7:45 pm, NexxuSix <Nexxu...@gmail .comwrote:
                >
                On Jul 5, 7:41 am, "Victor Bazarov" <v.Abaza...@com Acast.netwrote:
                NexxuSix wrote:
                [..]
                Snippet from ZynAddSubFX/src/Seq/MidiFile.C:
                case 0xc0 ... 0xcf://program change - ignored
                skipnbytes(1);
                break;
                I understand some coding, but I'm a little rusty. Any thoughts on
                this?
                It is not valid C++, if that's what you wanted to ask.
                Well, I don't know if this makes a difference, but this is the source
                code that is written with g++ for Linux. Source code should be source
                code, no matter what the compiler is, I suppose.
                >
                It depends. C++ source code should be C++ source code, no
                matter what the compiler is. But as Victor pointed out, the
                above is not C++. When g++ is invoked as a C++ compiler ("g++
                -std=c++98 -pedantic"), it doesn't compile with g++. (Like most
                compilers, when invoked without special options, g++ compiles a
                language of its own, somewhat similar to C++, but not exactly
                the same language.)
                >
                --
                James Kanze (GABI Software) email:james.ka. ..@gmail.com
                Conseils en informatique orientée objet/
                Beratung in objektorientier ter Datenverarbeitu ng
                9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

                Ahh... so, in other words, g++ will compile the c++ to a linux
                derivitive. I think I'm starting to understand all of this. Well...
                the other thing (and to update this thread) is, that I've asked Paul
                Nasca to consider updating his code, but so far, nothing. And, I don't
                think anybody out on Google Summer of Code has taken consideration as
                well. So I'm told that because this Synth is a real time synth, it
                might not be possible at all, without stopping the sound first to
                change a patch. Well, it would be nice if this was possible, because
                ZynAddSubFX has a lot of potential.... and it's a very powerful synth.
                I could only hope that Paul Nasca would consider updating the code...
                but it seems unlikely... hence the reason I am "here" asking for help.

                Comment

                Working...