[HN Gopher] Yamaha DX7 chip reverse-engineering, part 6: the con...
       ___________________________________________________________________
        
       Yamaha DX7 chip reverse-engineering, part 6: the control registers
        
       Author : picture
       Score  : 54 points
       Date   : 2022-02-07 19:18 UTC (3 hours ago)
        
 (HTM) web link (www.righto.com)
 (TXT) w3m dump (www.righto.com)
        
       | kens wrote:
       | Yes, another DX7 post. Author here if there are any questions :-)
        
         | bsedlm wrote:
         | I have a question (from part one); it's a clarification
         | question.
         | 
         | > The digital implementation of frequency modulation starts
         | with a lookup table that holds a digitized sine wave.
         | 
         | > The next step is to modulate the output by adding a
         | modulation signal to the index.
         | 
         | In those paragraphs, you're saying that you start with a table
         | of sine-function values.
         | 
         | This table has (for the sake of example) 4096 different values.
         | I suppose in real life there may be many more.
         | 
         | then you read this table by incrementing an index between 1 and
         | 4096. this happens many times per second and every time you
         | increment the index by one unit. This will output a sine wave
         | at a specific frequency determined by how quickly you increment
         | this index (i.e. how often the table is read out).
         | 
         | So far alright, if you're adding 1 to the index 40960 times
         | every second you'll a sine wave with a 10hz frequency (is this
         | correct?)
         | 
         | but then, instead of adding 1 to the index 40960 times per
         | second, you add 100 every single one of those 40.1k reads of
         | the table? and this generates a sine with a frequency of
         | 1000hz!?
         | 
         | this is quite frankly very surprising to me. The kind of thing
         | I don't see myself coming up with easily; referring to the fact
         | that it's possible to change the output frequency just by
         | jumping around the table (instead of reading it all out one by
         | one jump the index by 100 table entries) while keeping the
         | number of times per second the table is read the same.
         | 
         | Finally, if the index increments themselves are read out from
         | another sine wavetable, you get FM modulation... this is more
         | reasonable but it depends on the previous very surprising (to
         | me) way to change the frequency of a sine wave.
         | 
         | thanks for the great write-ups.
        
           | kens wrote:
           | Yes, that's essentially how it works. You might think that
           | jumping through the sine table in large steps would make your
           | waveform too irregular. But that's what happens with any
           | digital audio. E.g. a CD has music at 44kHz, so a 4400 Hz
           | tone only gives you 10 points from a sine wave which would
           | seem very irregular. But a low-pass filter smooths things
           | out, so you end up with a nice smooth sine wave. (Look up
           | Nyquist frequency if you want more details.)
           | 
           | One additional thing about the DX7 index is that you can
           | think of the index as having 10 fractional bits, so you have
           | much more accuracy in the increments. Otherwise, the
           | frequency resolution is pretty bad because the frequency
           | changes in big jumps when the index step changes by 1.
        
         | jacquesm wrote:
         | Keep them coming :)
        
         | DoctorNick wrote:
         | Are you working on an FPGA re-implementation? Basically
         | everything with a DX7 chip in it is insanely priced (especially
         | the PLG cards for the Yamaha MU-series, those are >$400), so
         | this would be awesome to have.
        
           | mbf1 wrote:
           | I do wonder if it's feasible just to use some cheap off the
           | shelf (COTS) general purpose ARM cpus like in Rasperry Pi
           | computers and some code to perform the same calculations that
           | Yamaha did in an ASIC in 1980's in real time. Even PIC
           | microcontrollers today have a decent amount of computation
           | for a couple cents.
           | 
           | Being latency sensitive here is definitely key.
        
             | DoctorNick wrote:
             | Someone ported an emulator to the teensy:
             | https://github.com/dcoredump/MicroDexed
        
         | edb_123 wrote:
         | Very good and deeply interesting work! As the owner of the
         | later model, I have to ask: would you consider doing the same
         | with a DX7II, if they are dissimilar enough at this level to
         | warrant doing do?
        
           | kens wrote:
           | My plan is to look at the DX7's other custom chip (the EPS),
           | but I probably won't look at another synthesizer since I have
           | too many other projects.
        
         | cush wrote:
         | Is the idea this will soon yield a VST/emulator?
        
           | [deleted]
        
           | jacquesm wrote:
           | That has already been done (see: Dexed), think of this as the
           | last steps in documenting what exactly it is that the DX7
           | actually does internally.
           | 
           | You can then use that to:
           | 
           | - verify that the emulators indeed get it all correct
           | 
           | - test your assumptions about how you thought it worked
           | 
           | - maybe program it to do things it wasn't strictly speaking
           | meant to do
        
         | monocasa wrote:
         | What's the expected clock rate for the logic? I think I missed
         | that for context. The output is probably latched into the DAC
         | at tens of khz, but there's so much bit serial stuff and time
         | shared logic like the oscillators that it's much higher
         | internally? Does it reach mhz?
        
           | jacquesm wrote:
           | 3142144 Hz
           | 
           | 4 times the DAC frequency.
           | 
           | Or, actually, 49096 * 16 * 4
           | 
           | http://yates.ca/dx7/Schematics%20&%20PCBs/DX7%20Schematic%20.
           | ..
           | 
           | Top right of the diagram.
        
             | mmastrac wrote:
             | Almost p MHz!
        
               | jacquesm wrote:
               | Heh, I must have looked at that diagram a million times
               | and never noticed that. Thank you!
        
         | throw_m239339 wrote:
         | No question, just fascinating article, although I'm not an
         | electrical engineer nor I'd be able to program these chips.
        
       | TheOtherHobbes wrote:
       | "The second way updates a single entry, allowing different notes
       | to have different algorithms..."
       | 
       | So the chips allowed multitimbral operation, but the DX7 didn't
       | support it?
        
         | kens wrote:
         | Yes, that's how it looks, the chip supports multitimbral
         | operation but the synthesizer doesn't. Disclaimer: I haven't
         | tested this out, so I'm not 100% sure.
        
       | olliej wrote:
       | This is a skill I wish I had because it just seems so
       | interesting, but I'm badness enough at EE (quantitively bad: I
       | failed out :D ) to not have any real hope :D
        
       ___________________________________________________________________
       (page generated 2022-02-07 23:00 UTC)