Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user TheTom ! (Registered 2018-07-22) You are not logged in 
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: 812
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
Dymo/G★P
Matt
CA$H/TRiAD
Jailbird/Booze Design
JCH/Vibrants
Icecube/Light
Archmage/SHAPE
AmiDog
Perff/No Name
TheRyk/MYD
Guests online: 57
Top Demos
1 Uncensored  (9.7)
2 Edge of Disgrace  (9.7)
3 Coma Light 13  (9.6)
4 Comaland 100%  (9.6)
5 The Shores of Reflec..  (9.6)
6 Wonderland XII  (9.6)
7 Lunatico  (9.6)
8 We Come in Peace  (9.5)
9 Incoherent Nightmare  (9.5)
10 Wonderland XIII  (9.5)
Top onefile Demos
1 FMX Music Demo  (9.6)
2 Daah, Those Acid Pil..  (9.5)
3 Pandemoniac Part 2 o..  (9.5)
4 Party Horse  (9.5)
5 Treu Love [reu]  (9.5)
6 Merry Xmas 2017  (9.4)
7 Arok 20 Invitation  (9.4)
8 Dawnfall V1.1  (9.4)
9 In Memoriam BHF  (9.4)
10 Dawnfall  (9.4)
Top Groups
1 Oxyron  (9.4)
2 Booze Design  (9.4)
3 Censor Design  (9.4)
4 Finnish Gold  (9.4)
5 Crest  (9.3)
Top Original Suppliers
1 hedning  (9.7)
2 Derbyshire Ram  (9.3)
3 Jazzcat  (9.1)
4 Irata  (9.0)
5 Fungus  (9.0)

Home - Disclaimer
Copyright © No Name 2001-2018
Page generated in: 0.081 sec.