/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* @test
@summary Test RealTime-tunings using SoftReciver.send method */
public class RealTimeTuning {
private static class PitchSpy {
public float getAttenuation() {
return 0;
}
public int getChannels() {
return 0;
}
return new ModelOscillatorStream() {
public void close() throws IOException {
pitch = 0;
}
pitch = 0;
}
}
throws IOException {
return len;
}
}
};
}
};
return testsoundbank;
}
}
// Data Entry
// Tuning Bank
// Data Increment
// Data Decrement
// Data Entry
// Tuning program
// Data Increment
// Data Decrement
}
if (!value)
throw new RuntimeException("assertTrue fails!");
}
throws Exception {
byte[] buff = new byte[2048];
// Create test instrument which we can use to monitor pitch changes
// Send tuning changes
sysex = new SysexMessage();
if (targetPitch == 0) {
// Check if targetPitch != targetNote * 100
}
}
if (tuningProgram != -1)
// First test without tunings
// Test if realtime/non-realtime works
if (realtime)
else
// Test if tunings works
}
// Test with no-tunings
int[] msg;
// 0x02 SINGLE NOTE TUNING CHANGE (REAL-TIME)
0, 60, 70, 0, 0, 0xf7 };
// 0x07 SINGLE NOTE TUNING CHANGE (NON REAL-TIME) (BANK)
36, 64, 0, 60, 80, 0, 0, 0xf7 };
// 0x07 SINGLE NOTE TUNING CHANGE (REAL-TIME) (BANK)
36, 64, 0, 60, 80, 0, 0, 0xf7 };
10, 15, 20, 25, 30, 35, 40, 45, 50, 51, 52, 0xf7 };
10, 15, 20, 25, 30, 35, 40, 45, 50, 51, 52, 0xf7 };
10, 15, 20, 25, 30, 35, 40, 45, 50, 51, 52, 5, 10, 15, 20, 25,
30, 35, 40, 45, 50, 51, 52, 0xf7 };
10, 15, 20, 25, 30, 35, 40, 45, 50, 51, 52, 5, 10, 15, 20, 25,
30, 35, 40, 45, 50, 51, 52, 0xf7 };
}
}