1. Field of the Invention
This invention relates to a coefficient update unit used to effect a linear change in an electrical characteristic over a controllable time interval. More specifically it relates to an update unit used in music synthesizers and the like to effect changes in such characteristics as the amplitude of an audio signal.
2. Background Information
In music synthesizers it is often desirable to provide pre-programmed, electrically controllable changes in the characteristics of an audio signal. Thus synthesizers can automatically effect a prescribed change in the amplitude of a signal over a prescribed time interval. For reasons related to cost and speed of operation this is usually accomplished with a finite state machine that is constructed as an Application Specific Integrated Circuit (ASIC). The circuitry first divides the desired amplitude change by a number of standard time intervals to determine the nominal per-period update increment (PPI) in the coefficient. With the passage of each time interval the amplitude is incrementally updated by the amount of the PPI. The process is terminated when the target amplitude is reached.
If the prescribed change in signal characteristic is not exactly divisible by the prescribed number of time intervals, i.e. incremental coefficient updates, the resulting remainder must be distributed among the incremental updates. In practice this has been accomplished by adding one bit to selected incremental updates and subtracting one from the remainder until the remainder reaches zero. In prior systems, the remainder has not been spread evenly across the entire update period. This may result in a perceived noise update during the update procedure.
Specifically, if division of the amplitude change by the prescribed number of time intervals results in a quotient whose magnitude is greater than zero, the prior system ignores the remainder. This leaves a residue unless the remainder is zero and one or more further update routines must then be undertaken to effect the entire amount of the originally commanded update. Obviously, this results in an uneven distribution of the update increments. Moreover, this arrangement requires repeated involvement of the processor that commands the updates.
On the other hand, when the quotient is zero, the prior system increments (or decrements) the coefficient by one unit in successive time intervals until the remainder has been “used up”. The coefficient will thus reach its final value before the end of the commanded transition period and then remain unchanged for the remainder of the period.
Another drawback of the foregoing arrangement is the relatively large amount of the storage required. Moreover, the algorithm for division of the coefficient change by the number of requested time intervals requires a relatively long cycle for the state machine which processes the coefficient updates.
A coefficient update unit incorporating the invention limits the number of incremental updates to powers of two. In binary terms, the division of the coefficient difference amounts to shifting the coefficient difference to the right. The quotient then comprises the bits to the left of the binary point and the remainder comprises the bits to the right. To keep track of the binary point the unit uses the most significant bit of the commanded number of time intervals. For example, if the initial value is 8, i.e., binary 1000, the one in the most significant bit position of the count marks the position of the binary point separating the quotient from the remainder. In the preferred arrangement, the system then counts upward from this number, i.e., from 8 in this example. In the seventh interval the interval count will reach 15 (binary 1111). In the end of the eighth interval the last four bits of the count will reach binary 0000, indicating that the update has been completed.
The update unit also includes a novel arrangement for distributing the remainder uniformly among the update intervals. During each counting cycle it ascertains the bit position in the interval count in which the bit changes from a zero to a one. It then checks the corresponding bit in the reversed remainder. If that bit is a one, it adds a bit to the quotient in increasing (or decreasing) the coefficient that is to be updated. With the foregoing arrangement, the update unit completes an update with exactly the prescribed number of update intervals. The cleared state of the interval count can thus be used as an indicator of update completion.
The invention description below refers to the accompanying drawings, of which:
As depicted in
A system clock 18 times the operation of the state machine 10. Preferably, the clock has a frequency related to the rate at which the synthesizer delivers output samples to an audio output unit (not shown).
When a coefficient is to be updated, the processor 14 loads the value of the target coefficient into a memory location 121 and loads a location 122 with an initial update interval count (UCNT), i.e., the number of standard update intervals over which the update is to be effected. The state machine 10 then subtracts the target coefficient from the current coefficient, which is contained in a memory location 123, to obtain a difference (DIFF) that is stored in a location 124. The difference is divided by the initial interval count to determine the nominal per-period update increment (PPI) in each clock period.
Specifically, the initial interval count is constrained to be a power of 2. In binary terms it is, therefore, a number containing a single one followed by zeros. The division thus amounts to moving the binary point of DIFF to the left by a number of places equal to the number of zeros following the one in the commanded count. The position of that one thus marks the binary point in DIFF that separates the quotient from the remainder.
The update operation then consists of increasing (or decreasing) the current coefficient by the nominal per-period increment (PPI), i.e. the quotient, with the increment being increased by 1 during selected update intervals to distribute the remainder substantially uniformly throughout these intervals.
More specifically, each time the current coefficient is incremented, the update interval count is increased by one. The single bit in the count that changes from a zero to a one is detected and, if the bit in the corresponding position of the reversed remainder is a one, the increment to the current coefficient is changed by (PPI+1). Otherwise, the current coefficient is changed by an increment equal to PPI. As the interval count increases, it eventually reaches 2*(initial UCNT)−1, whose binary representation is all ones. In the next clock interval the incrementing of the interval count causes it to return to zero. The update has thus been completed; this state of the interval count is sensed by the state machine 10 to terminate the update operation.
In the preferred arrangement all incremental updates are effected by subtraction. Thus, when the coefficient is to be decreased, DIFF has a positive value and when the PPI (the quotient portion of DIFF) is subtracted from the current coefficient, the coefficient is decreased. Conversely, when the coefficient is to be increased, DIFF has a negative value and thus, when PPI is subtracted from the current coefficient, the coefficient is increased. This arrangement simplifies the circuitry of the state machine 10. Specifically, the circuitry need not be able to perform both additions and subtractions. This is a desirable feature when the state machine is constructed as an Application Specific Integrated Circuit (ASIC), since it helps to minimize the physical area of the circuit.
The state machine can, of course, be constructed differently without departing from the invention. Thus it may be capable of both additions and subtractions or, if the target coefficient is sent to the update unit as a negative number, it may be constructed with circuits that can add, but not subtract, when performing the incremental updates.
An example of the logic design and operation of the state machine 10 is illustrated in
Next, in step 46, UCNT is incremented and the bit position, BP, of UCNT which changes from a zero to a one is ascertained.
In step 48, the state machine 10 ascertains whether the reversed remainder contains a 1 in the bit position corresponding to the bit position ascertained in step 46. If it is a 1, PPI is increased by 1 at step 50. Otherwise, the process proceeds directly to step 52, where the PPI is subtracted from the current coefficient, thus incrementally updating the coefficient. Next, at step 58 the current coefficient is transmitted to the unit that is controlled in accordance with the coefficient. The state machine then returns to step 40.
On the next pass through the loop, with the register 121 not containing a target value to be processed by the state machine, the process branches to step 41, in which the update interval count (UCNT) is checked. Assuming that it is not zero, the machine proceeds to step 46 and the coefficient is updated, as described above, in steps 48–52.
With the prescribed number of incremental updates, UCNT will ultimately advance to zero and, at step 40, the update procedure will terminate. In practice, the zero state of UCNT may be sensed by detecting an overflow from the most significant one in the register 122 when UCNT is incremented.
The system can be configured to decrease UCNT during each update interval and detect the clearing of UCNT to terminate the update procedure. In that case the remainder can be distributed among the incremental updates by detecting the bit in UCNT that changes from one to zero and adding one to PPI if the corresponding bit of the reversed remainder is a one. However, I prefer to count upward, as illustrated herein, because this preserves the most significant one in UCNT, which is used to separate the quotient (PPI) from the remainder in DIFF. If a downward count is used, an additional memory location is required to provide the demarcation between these two quantities.
At any time, the CPU 14 (
The drawing illustrates the procedure for update of a single coefficient. However, in practice the state machine 10 updates a plurality of coefficients. The RAM 12 (
An example of the foregoing operation is illustrated in
Continuing in
In
Finally,
Number | Name | Date | Kind |
---|---|---|---|
4313173 | Candy et al. | Jan 1982 | A |
4757465 | Hakoopian et al. | Jul 1988 | A |
5694345 | Peterson | Dec 1997 | A |
5898878 | Densham et al. | Apr 1999 | A |
5937010 | Petranovich et al. | Aug 1999 | A |
6141671 | Adams et al. | Oct 2000 | A |