I have an older Disklavier, model HQ100, which I drive from a PC using WinAmp via a USB MIDI adaptor and the MIDI input port. The only volume control is the knob that adjusts the distance of the hammers from the strings, but that has no effect on the force with which the keys are struck, which depends solely on the MIDI velocity value. I would like to have a program to adjust MIDI velocity levels "on the fly", and ideally one that would work in conjuction with WinAmp (but that is not a requirement as long as there would be some means to queue files in a playlist). I sat at dinner last night thinking of the velocity adjustment algorithm to use. On arriving home, I decided to check this user group to see if anyone had already solved this problem, and I found your timely message thread. It seems the problem is not yet solved, but there are others out there who have similar requirements. I can contribute the velocity adjustment algorithm, if someone else who understands MIDI file structure can do the programming. I have written a small Excel spreadsheet with interactive slider bar inputs and a velocity distribution graph so that you can see the impact of the variables on the velocity value modifications. (I don't see how I can attach the file here, but I will try to post it in the "all new uploads go here" folder. If anyone wants it, write to me outside the group forum and I will send it.) Briefly, there are three variables: 1) Absolute Maximum Velocity is the value that under no circumstances can be exceeded. This is the safety value so that high velocity values do not cause damage to the piano. Maximum MIDI velocity is 127, however values of 100 to 110 have been suggested as maximum "safe" levels. MIDI velocities above this maximum will be truncated to this value. 2) Target Minimum Velocity is the lower threshhold for sounding the piano, or for setting a minimum volume higher if so desired. All MIDI velocities below this level will be raised to this level, unless volume control is set lower. 3) Volume Control is a percentage of original velocity, within the bounds set by Absolute Maximum Velocity and Target Minimum Velocity. If Volume may be adjusted below the Target Minimum Velocity if desired to turn volume down completely. Volume profile will be completely flat at this point. The algorithm (in Excel format) is: =MIN(AbsMax,MAX(TargetMin,(TargetMax-TargetMin)/(OrigMax-TargetMin)* (OrigVel-TargetMin)+TargetMin)) Where: AbsMax = Absolute Maximum Velocity (safety limit) TargetMin = Target Minimum Velocity (lower threshhold) TargetMax = Volume Control % times 127 (maximum MIDI velocity value) OrigMax = 127 (maximum MIDI velocity value) OrigVel = Input velocity value from MIDI file (the value to be modified). This will make more sense if you view the file, play with the variable slider bars, and see from the graph how the algorithm works. Future enhancements could include a curved profile (this one is linear), different profiles or settings for various ranges (treble, mid-level, bass), etc, but I think the algorithm I have proposed will be more than satisfactory for 99.44% of users. Is there anyone in the group that could program this? John Sutton China --- In disklavier@yahoogroups.com, Carl Youngblood <carl@y...> wrote: > > It seems like the algorithm being used is wrong. If a note is already > soft, it should not be reduced to zero. It should be reduced less the > further it is from the desired overall volume, until turning down the > volume doesn't change it at all. Think of a normal distribution, with > the desired volume being right at the middle of the bell curve. > Turning down the volume should bring notes closer to the center of the > bell curve instead of just subtracting uniformly from their > velocities. > > On 12/10/05, bnbwv <davis2002@c...> wrote: > > In trying to reduce the volume on my old wagon grand, there are two > > complications. First, the volume controller (7) has no effect on > > hammer velocity (volume). Second, if you just scale down all > > velocities, the softer notes won't sound at all. You need to map > > velocities into a range from a low of around 25 to a high that > > depends on the 'volume' you desire. Your MIDIMOD program is what is > > needed, with the mapping being done on the fly rather than as a file > > in / file out operation. >
Message
Re: Volume Control of Midi during playback
2006-01-24 by whatsay2that
Attachments
- No local attachments were found for this message.