Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6713560

MidiChannel.controlChange(int,int) allows values >127

    XMLWordPrintable

Details

    Description

      The specification of javax.sound.midi.MidiChannel.controlChange(int,int) says:
      ------------------------------------------------------------------------------------------
      void controlChange(int controller,
                         int value)
         . . .

      Parameters:
          controller - the controller number (0 to 127; see the MIDI 1.0 Specification for the interpretation)
          value - the value to which the specified controller is changed (0 to 127)
      ------------------------------------------------------------------------------------------

      Unfortunatelly it is not said what happens if the "value" exceeds the specified range.
      In case of openJDK if one calls
        chanel.controlChange({control >= 64}, 133)
      then the following call of
        channel.getController({same control})
      will return 133.

      That is not conformant with getController(..)'s spec which says that the return value is to be in the range 0-127.
      However the problem is more likely to be with the "setter" method.

      Attachments

        Issue Links

          Activity

            People

              darcy Joe Darcy
              ashusher Alexander Shusherov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: