asb2m10 / dexed

DX7 FM multi plaform/multi format plugin
GNU General Public License v3.0
2.86k stars 247 forks source link

Envelope Generator in Water Droplets #137

Open rickyackel opened 6 years ago

rickyackel commented 6 years ago

Water Droplets in in CART2B is an odd patch but it doesn't seem to work in your implementation. The original DX7 will play each operators second-rate/envelope at different times because the first rate is set to varying slow rates. While it is puzzling that this happens when you see a rate of 5 going to level 0 from level 0, it can be delightful to get a sudden change or addition to the sound seconds after your keypress down and although Yamaha thought of this, their implementation is also buggy. On the original DX7, you will get a correct version or a condensed version. This seems to be related to how many of the previous 16 notes were held down to play past Rate/Level 2. Notes held long enough will play normal and the others will play a faster condensed version. Your version is mathematically correct in that a rate of 5 will still take 0 milliseconds going from Levels 0 to 0, but it takes the fun out of it. The Yamaha implementation meant that it was unpredictable so it wasn't used much by programmers but your implementation could. I'm afraid my DX7 with E! got hit with a power surge and is now only capable of sending MIDI or I'd attach an audio file. I'd like to suggest that a zero level change still take 10 ms per level. Perhaps the times could be altered logarithmically. If you are checking your DX7 results remember to first hold down 16 keys for about 15 seconds after which you will hear what it is supposed to sound like. Rick

papwalker commented 6 years ago

Can't see 'Water Droplets' in my Yamaha 2B or anywhere for that matter. However it's probably related to the timing anomaly documented by Howard Massey where a chord might return as a random arpeggio. Also the DX7 has no idea of level 4 until all 16 notes have played. It initializes at zero until then.

rickyackel commented 6 years ago

Doh! I've been calling Patch 25 - DXCARTF0/CART2B (WATER GDN) Water Droplets for 30 years, sorry. I spent about a month in the 80s trying to figure out what was going on with it, and even wrote to Yamaha to see if it could be fixed. No answer. If you pull it up on the an original DX7and just tap notes you will get likely get the condensed version, all the droplets in about a second, but hold down the sustain pedal and play 16 notes and after that they will all sound like the correct version, about 10 seconds. I have not quantified this precisely but I believe it is related to the 16 note polyphony of the original DX7. Dexed plays all the droplets at once, which is not even close.

papwalker commented 6 years ago

On Dexed, bring all the EG L1 up to 40. Don't touch anything else just the L1 for all six operators. Increase 'em all to 50 / 60 Make 'em all the same L1 value let us know when it get close to your expected sound.

This is indeed caused by the change in behavior on the DX7 when working below L=20 See page 117 The complete DX7 by Howard Massey be quick http://yates.ca/dx7/The%20Complete%20DX7/The%20Complete%20DX7.pdf

rickyackel commented 6 years ago

This workaround does make the condensed version of WATERGDN play, but only because all the operators in this patch are carriers. A Modulator with this envelope will sound completely different. The potential of having Rates acting more like Duration when there is a zero difference in output levels creates about 6,000,000 new possible variations. If you want the "mathematically correct" implementation of DX7 FM, then Rate 99 and rate 0 take the same length of time to go between Level 1 and 2 because the distance its traveling is not Rate dependent since it is not "travelling" any distance and can now be used to delay audio artifacts. Massey calls the behaviour a Software "bug"that causes notes to arpeggiate in a random order. My head could not accept the fact that this computer controlled instrument did anything randomly and it is only when I took into account the polyphony that the behaviour became reproducible. If you want to reproduce the bug in the code, have notes that have not reached Rate 2 start at Rate 2 the when time the 17th note is played. The correct version of WATERGDN takes about 20 seconds to play operator 6. It's still got a rate of 9, so there is some longer envelope time yet. If you want to faithfully reproduce this bug, or ignore it, I would prefer you work around it and give the envelope rates less than 40 a future. I mentioned 10 ms in my original post, but in order to get to 20 seconds, we might start with 3 ms per level down to 70 and additional 10 ms between 40and 70 and 15 ms per level down to 0. Some background: I bought one of the first DX7s to come to Canada and taught programming and performance basics at a local music shop as well as some private tutoring in Programming and MIDI. I graduated from a Computer/Analyst Programmer course in the 70s and decided it was not the life for me, but I don't regret it because I still think like a programmer, hence my OCD about making sense of WATERGDN. Thanks for taking my feedback. I never thought I'd ever have a chance to write it again.

rupa commented 6 years ago

i can't help with this but i just want to say this is the best bug report I've seen in years and I'm thrilled each time there's a new development

papwalker commented 6 years ago

@rickyackel @jeremybernstein and Pascal made significant inroads to this issue last release. They put a lot of empirical work into the EG timing so it is much better than it was. The problem is that as far as I can see the rates are likely to be in ROM lookup tables rather than a function let alone linear. Bear in mind that all the guys are working gratis, pro bono, so it's hard to track and fix every bu overnight. It's good to get your feedback and have a solid Genuine Yamaha patch to test against. I've been using madFame9s DreamPiano to test the delay aspects of level to level rates and I believe @jeremybernstein may have used this patch to correct the timings somewhat. Did you enjoy Massey's book? Cheers

BTWI think the 'randomness' is an artifact of the subtleties in a players timing and velocity in the chord.

rickyackel commented 6 years ago

@papwalker re:BTW: Well, something to consider is that if you hold the sustain pedal down and play WATERGDN at any velocity after you've played the first 16 notes, you will never get another condensed play of the patch. With a segment time of 20 seconds, it is easy to lose patience and release the keys. It is the condensed version that makes the patch look like its being random. I held down the sustain and played in time after the beat of the second droplet, and the 20 second later scale was accurate in timing and pitch, which is not random at all. This is an 80s computer and randomness is not an easy thing to do, even by accident. The book looks interesting. I've got it on the iPad. I had to scroll with 100 swipes to get to page 117. I'll try and peruse through it. I don't see a madFame9 in the Dexed_cart_1 or a DreamPiano in instruments/Keyboard/Piano. Can you direct me to it? I'll check it out. @rupa Thanks. I spent a lot of time on the posts (except for looking up the correct name of the patch...) and I'm learning stuff too. Think I'll take look at that book. My DX7 is actually working but the memory gets corrupted after shut down. I have 1 cartridge with my favourite sounds and I still think some of them are irreplaceable. The Dexed versions sound great too.

papwalker commented 6 years ago

@rickyackel
Madfame https://www.youtube.com/watch?v=rN9e5QUnd7o This used be be 'condensed' as you call it prior to last dexed release. Corruption sounds like crook battery.

waltercruz commented 3 years ago

fascinating bug reporting.