Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user maak ! (Registered 2024-04-18) You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Single cycle of decay at note start - in VICE too as of December 2016
2018-01-27 07:10
ChristopherJam

Registered: Aug 2004
Posts: 1370
Single cycle of decay at note start - in VICE too as of December 2016

It seems VICE users received a present with very little fanfare a little over a year ago. Decemeber 31st 2016, Groepaz checked in a patch from Leandro Nini (reSID patch #138) that contained a number of envelope emulation enhancements based on die reverse engineering and transistor level emulation.

Biggest news for me is reSID finally emulates the SID bug that results in a single cycle of decay state at the very beginning of every 'gate on' event.

I discovered this bug myself back in 2013, but got distracted attempting to create an envelope emulation that covered various other niggles I found at the same time. Without the circuit diagrams the reSID team has since acquired, cycle exact emulation proved intractable, and I moved on to other things. In hindsight I probably shouldn't have been such a perfectionist.

It's reasonably straightforward for music routine coders to ensure that the bug never affects musicians. Whenever you're about to gate on, if the current release value equals the current attack value, you need to ensure decay matches as well. If you don't do this, there's a 1 in <rate> chance that you'll let the rate counter escape¹, and note start will be delayed by a frame and a half; ADSR bug strikes again. For attack=decay=0, that's a one in nine; not good.

Simplest way to do this after a hard restart is to set gate before you set AD; then decay will still be zero, which will match the attack and release from the restart.



(¹ of course, if the attack value is lower than the decay value, the chances of a rate counter escape are considerably higher, but you knew that already, and musicians frequently do this deliberately to delay note start to halfway through the next frame).
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Mason/Unicess
JackAsser/Booze Design
hedning/G★P
CA$H/TRiAD
Didi/Laxity
sailor/Triad
Airwolf/F4CG
DKT/Samar
iAN CooG/HVSC
theK/ATL
kbs/Pht/Lxt
The Syndrom/TIA/Pret..
megasoftargentina
Guests online: 71
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 The Ghost  (9.6)
10 Bromance  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.8)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 Rainbow Connection  (9.5)
6 Wafer Demo  (9.5)
7 TRSAC, Gabber & Pebe..  (9.5)
8 Onscreen 5k  (9.5)
9 Dawnfall V1.1  (9.5)
10 Quadrants  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Swappers
1 Derbyshire Ram  (10)
2 Jerry  (9.8)
3 Violator  (9.8)
4 Acidchild  (9.7)
5 Starlight  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.029 sec.