[Audio-engine-dev] Some small Gervill fixes
Karl Helgason
kalli at midverk.is
Fri May 2 09:25:39 PDT 2008
Hi,
You are correct according to the MIDI 1.0 Detailed Spec. page 12 :)
Thanks for noticing this. Although LSB controls (32..64) aren't used in the synthesizer except for bank select and data entry.
And your patch didn't apply for those cases, because it happened earlier in the code.
Support for LSB controls could be easily added by adding more ModelConnectionBlock entries into SoftPerformer.java
I am not currently filtering the control values to 0..127 because some user likes to be able to overdrive the values
for example to set Volume to 255 which mean more than 100% volume (it was possible with the previous beatnik synthesizer).
This could however result in unpredictable behaviors.
If we want to prevent out of range values we should do that at the beginning in the controlChange method with if statement.
But it is cool to get more code reviewers :) Sun is planning to add Gervill into OpenJDK 6 after JavaOne.
I have added this fix into the CVS and these also:
- Added: AudioFloatFormatConverter, used to convert
between PCM_SIGNED, PCM_UNSIGNED, PCM_FLOAT in 8/16/24/32 bit (big/little endian),
and resample using (linear/cubic/sinc...) if needed.
- Added: WaveExtensibleReader, used to read WAV files using WAVE_FORMAT_EXTENSIBLE format.
- Added: WaveFloatFileWriter, used to writing WAV files with PCM_FLOAT encoding.
- Fix: AudioFloatConverter tests incorrectly AudioFormat frameSize against SampleSizeInBits
Support for 64-byte float added, and support for 32+ bit PCM samples.
SampleSizeInBits not dividable by 8 are now handled correctly.
- Fix: DLSID(GUID) values incorrectly read from files in DLSSoundBank.
- Fix: WaveFloatFileReader incorrectly sets framrate.
- Fix: DLSSoundbank writes avgBytesPerSec incorrectly if SampleSizeInBits is not dividable by 8.
- Fix: SoftChannel didn't reset concept of LSB control to 0 when MSB control value is set
(according to MIDI 1.0 Detailed Spec. page 12)
- Fix: SoftChannel, added check for illegal noteNumbers.
If illegal notenumber was used in NoteOn/NoteOff
a ArrayOutOfIndex exception was thrown.
I especially proud of the new AudioFloatFormatConverter, it makes sample rate conversion available via a FormatConversionProvider.
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4916960
cheers,
Karl
________________________________________
Frá: audio-engine-dev-bounces at openjdk.java.net [audio-engine-dev-bounces at openjdk.java.net] Fyrir hönd Mark Wielaard [mwielaard at redhat.com]
Sent: 1. maí 2008 23:33
Viðtakandi: audio-engine-dev at openjdk.java.net
Afrit: distro-pkg-dev at openjdk.java.net
Efni: Re: [Audio-engine-dev] Some small Gervill fixes
Hi,
Another small nit. In SoftChannel.controlChange() the controller values
for least significant values (32-64) weren't reset to zero when the most
significant values were set. This showed up when calling
getController().
2008-05-01 Mark Wielaard <mwielaard at redhat.com>
* com/sun/media/sound/SoftChannel.java (controlChange):
Reset least significant controller if necessary.
Let me know what you think. I added this patch to IcedTea.
Cheers,
Mark
No virus found in this incoming message.
Checked by AVG.
Version: 7.5.524 / Virus Database: 269.23.7/1408 - Release Date: 30.4.2008 18:10
More information about the audio-engine-dev
mailing list