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 Composing > Sid ADSR problem / hardrestart
2006-07-18 21:32
stunt
Account closed

Registered: Jul 2006
Posts: 48
Sid ADSR problem / hardrestart

Hey guys,

I more or less understand the hardrestart thing,
but can anyone explain to me what the exact problem
with the ADSR is? So explain what the effect is when i dont
use hard restart.

Lots of thx.

The audioarts sidproject (hardware and software pimping of c64)s:

http://www.audioarts.nl/getNews.php?ID=19
2006-07-18 21:48
cadaver

Registered: Feb 2002
Posts: 1153
Some notes may fail to trigger (causing just silence) with certain ADSR values or too short gate-off time between them, or in a passage with repeated notes, the attack of some notes may sound different. It's a matter of experimentation, you will notice given enough time :)

Depending on hardrestart method, these things may also happen even when it's used. Full ($F) sustain is especially notorious for causing bugs.

Notice that by giving enough gateoff time for each note and experimenting with ADSR values, it is perfectly possible to create fine SID music without hardrestart. For example Galway, later Tel, later Hubbard, some (most?) Ouwehand, Aleksi Eeben
2006-07-18 23:21
stunt
Account closed

Registered: Jul 2006
Posts: 48
ok, yeah that was my intuition too: that when you avoid certain adsr settings, that there is no problem.

I was also wondering wether the adsr 'bug' is different for different revisions of the 6581 or with the 8580 ?

I have heard that the the fourth revision of 6581 (R4) sounds the best. Can people confirm this?

2006-07-19 08:32
Bamu®
Account closed

Registered: May 2005
Posts: 1332
Quote: ok, yeah that was my intuition too: that when you avoid certain adsr settings, that there is no problem.

I was also wondering wether the adsr 'bug' is different for different revisions of the 6581 or with the 8580 ?

I have heard that the the fourth revision of 6581 (R4) sounds the best. Can people confirm this?



I guess the adsr "bug" is always the same on each revision.
Btw. always the latest revision is the best one. So, try R5 :D
2006-07-19 10:41
Hein

Registered: Apr 2004
Posts: 933
R3, my favorite.
2006-07-19 11:02
stunt
Account closed

Registered: Jul 2006
Posts: 48
Ok guys,

that's really great. Everyone has his own favorite sid etc. But that's just a matter of opinion.

What interests me is the *facts*, i just want to know WHAT is different
between all sids:

- the cutoff range (preferably give indications of frequencies) of different revisions of both 6581 and 8580.
- the resonance
- de steepness of the fliters of different types and revisions
- the response of the filter

and most important:

- the exact symptoms of the ADSR bug. I want to know *exactly* which adsr values give problems without or even with hardrestart, and wether, and if so, how this differs between different types and revisions of sids.

So give me your experiences:

- what adsr values to avoid etc
- if you are just familiar with 1 or 2 sids, just spam everything you experienced working with your own sid and tell what type and revision it is.

And dont give me that i should just experience myself, because believe me i will and have done that a lot. But i just think it's stupid to re invent wheels that are already invented. That's what a forum like this is for right? to share knowledge and skill so its possible for us all to create cooler and better and more beautiful audio and viz.

Peace out

Stunt - the guy that pimps c64s and bleeps
AudioArtsSidProject: http://www.audioarts.nl/getNews.php?ID=19
2006-07-19 11:16
cadaver

Registered: Feb 2002
Posts: 1153
Bugs happen in different playroutines/editors in different ways, because the SID clocks its internal counters (which are indirectly responsible for ADSR bugging) each CPU cycle. Any values to avoid are situation-dependent.

Of course, studying the reSID source code (envelope generator) should give you a fairly good understanding of what's exactly happening.
2006-07-19 11:17
Hein

Registered: Apr 2004
Posts: 933
I can't wait to hear your first sidtune. Musically it's not a problem for you to create something cool I guess, but only by experimenting you can find out the true nature of SID, not by collecting data. And it's an ongoing debate, which sid is best.

But if you desperately seek info, I think you should contact the ones trying to emulate the sid. Those are the laboratory people.
2006-07-19 11:29
cadaver

Registered: Feb 2002
Posts: 1153
I get the feeling that if someone prepares to utilize the SID too scientifically, he will only be disappointed. There are no lookuptables in players to auto-correct filter output for each sid revision ;)

And yeah, there is no need to get too agitated, it's not like people are deliberately withholding information so as to pass on the suffering of experimentation, it's just that most simply go by their feeling.
2006-07-19 12:36
Bamu®
Account closed

Registered: May 2005
Posts: 1332
As long as the editor/player has a *good* hardrestart, I do not bother much about the SID-BUG. :D
2006-07-19 12:44
cadaver

Registered: Feb 2002
Posts: 1153
Now while we're at it, don't forget to write the rest of nata-FAQ. (sigh, another fine thread derailed...)
2006-07-19 12:47
Bamu®
Account closed

Registered: May 2005
Posts: 1332
Quote: Now while we're at it, don't forget to write the rest of nata-FAQ. (sigh, another fine thread derailed...)

May I ask who is writing the nata-FAQ ?
2006-07-19 12:51
Bamu®
Account closed

Registered: May 2005
Posts: 1332
Ahhh, now I understand! :]]]]]]]]]]
2006-07-19 12:55
Stainless Steel

Registered: Mar 2003
Posts: 966
I have the feeling nata is getting obsessed with that hard restart issue :-)
2006-07-19 13:01
abracadabra
Account closed

Registered: Jul 2006
Posts: 14
You probably never have seen how nata is composing music. :)
A good/advanced hardrestart is essential for him.
2006-07-19 13:14
cadaver

Registered: Feb 2002
Posts: 1153
Good HR is probably quite essential to many. Still they don't need to talk about it in (almost) every thread. Hmm?
2006-07-19 13:16
Bamu®
Account closed

Registered: May 2005
Posts: 1332
Maybe not. But it's always a *by the way*. :)))

And as far I can remember this is a thread about HARDRESTART.

Cadaver. Feel free to write a nice FAQ about Hardrestart. There are a lot of people which don't know what it is.

2006-07-19 13:32
cadaver

Registered: Feb 2002
Posts: 1153
Yes, you for example. HR = ADSR manipulation at gateoff, not "sexy note start", which is the meaning you seem to have adopted. (the latter does not necessarily require the former)
2006-07-19 14:06
stunt
Account closed

Registered: Jul 2006
Posts: 48
Quote: I can't wait to hear your first sidtune. Musically it's not a problem for you to create something cool I guess, but only by experimenting you can find out the true nature of SID, not by collecting data. And it's an ongoing debate, which sid is best.

But if you desperately seek info, I think you should contact the ones trying to emulate the sid. Those are the laboratory people.


Cadaver said:
"I get the feeling that if someone prepares to utilize the SID too scientifically, he will only be disappointed. There are no lookuptables in players to auto-correct filter output for each sid revision ;)"

I respect your point of view: there's guys that like to work by intuition. If that's your strategy that gives you the results you're after, i'll recommend you continu to use the strategy. If my strategy is to be precise and scientic, and i assume there's more guys over here that feel comfortable using this scientical approach. I assume we all respect eachoterhs individual strategies and approaches that people have on this forum.

Furthermore I think it's a great suggestion to create such lookuptables, so let's create them if nobody has ever attempted to do this yet (which would suprise me).

"And yeah, there is no need to get too agitated, it's not like people are deliberately withholding information so as to pass on the suffering of experimentation, it's just that most simply go by their feeling."

Ok. When i compose I always go by feeling. Now that i'm creating my own hardware/software sid synth, I want to optimise and use all technical/scientifical data available to the max, about both software and hardware aspects.

Another thing that I'd like to investigate is the influence that capacitors have on performance of sid. I'll probably replace capacitors to optimise my pimped c64's. I'm going to create ubersid.

I'll check reSID btw. Thx for the tip.

Anyhow, my question still stands: please elaborate and give me details about values to avoid, values that always provoke hangups etc. If it's different for different players, provide info on that or simply describe the symptoms that the adsrbug has in the different players that you are accustomed to work with.

@ the guy that asked for my sidmusic: as this topic is about building a sid synth, and i dont see the relevance of my skills as a composer, it might be offtopic to bring it up. But let's just say that i make my living as a composer for the media, and since business is going quite well I now some fotunately have some time and money left to finally develop my c64. Because i love sid sound and want to use it for my music productions. Furthermore i'd love to focus more on making music for games and demo's, because composing for commercials and tv is so boring sometimes.

I would like to develop stuff that people will enjoy to use, so please elaborate, I'm thankful for all your suggestions and comments. Let's create cool tools.
2006-07-19 14:18
cadaver

Registered: Feb 2002
Posts: 1153
Ah, the whole time I thought these questions were in preparation to create the most amazing music for Battlestar Galactica :)

Anyway, my input would be to go for maximum configurability. For hardrestart, give options to write any ADSR value and perform gateon/gateoff some time before the note. The more accuracy you can get to the timing (more than standard 20ms PAL frame?), the better.

An example:
60 ms before: ADSR 0000 and gateoff
20 ms before: ADSR to instrument values and gateon with no waveform
0 ms: start the note

Note that because you need to know there's a note coming so that you can do gateoff/HR before it, this introduces a latency to live-playing. But if you can stomach it, with this kind of long HR, particularly if the timing stays accurate, there are like no instrument ADSR values to avoid.
2006-07-20 09:12
Bamu®
Account closed

Registered: May 2005
Posts: 1332
Quote: Yes, you for example. HR = ADSR manipulation at gateoff, not "sexy note start", which is the meaning you seem to have adopted. (the latter does not necessarily require the former)

Just to disgrace you: I know that *Hardrestart* is basically an ADSR manipulation. :P
For me and a lot other sane composers only the "sexy note start" counts, and nothing else.
It's simple: If a certain player doesn't allow accurate = sexy note start, it will be declared as BAD hardrestart (if it has HR).
Of course, it's absolutely no problem to make nifty instruments with hardrestart that isn't up-to-date, but actually it's not the same (I think you understand that)

Maybe YOU can explain us why your *own* player has such a good hardrestart?
Just for fun? Hmmm?
Just tell us who requested to you to implement that up-to-date hardrestart.
Maybe composers? Hmmm?

... and then reconsider my attitude to hardrestart :)

2006-07-20 09:29
stunt
Account closed

Registered: Jul 2006
Posts: 48
ok since hardly any on topic replies here in this thread (pity, am i so unclear?) , you may also explain to me what is a 'sexy note start' and how it relates to hardrestart.
2006-07-20 09:31
cadaver

Registered: Feb 2002
Posts: 1153
@Nata: it was originally requested by Jammer, in very vague way. Done mainly as a learning exercise, to see if I was able to reproduce what for example JCH playroutines produced. And the silent frame was also advantageous for rastertime.

But the short & even note start is only one of many possibilities, and once you know how it's done, it sort of loses its mystery? The main point is: many people find it useful, only you feel the need to get all fanatical about it.

@Stuntgitarist: when you manipulate ADSR in the way the example couple of posts above shows you, and always write ADSR first, waveform afterwards, it performs just that. You can also use for example ADSR 0F00 or F800 as the fixed value.
2006-07-20 09:46
Bamu®
Account closed

Registered: May 2005
Posts: 1332
Aha!
And value F800 ? Where is the difference?
2006-07-20 09:55
cadaver

Registered: Feb 2002
Posts: 1153
The SID uses the same internal counter for all of attack, decay and release. The counter itself can never be reset, so it's to cause a different kind of delay, I guess.
2006-07-20 09:56
Bamu®
Account closed

Registered: May 2005
Posts: 1332
Hmm, I can't hear any audible difference.
2006-07-20 10:27
stunt
Account closed

Registered: Jul 2006
Posts: 48
Quote: Ah, the whole time I thought these questions were in preparation to create the most amazing music for Battlestar Galactica :)

Anyway, my input would be to go for maximum configurability. For hardrestart, give options to write any ADSR value and perform gateon/gateoff some time before the note. The more accuracy you can get to the timing (more than standard 20ms PAL frame?), the better.

An example:
60 ms before: ADSR 0000 and gateoff
20 ms before: ADSR to instrument values and gateon with no waveform
0 ms: start the note

Note that because you need to know there's a note coming so that you can do gateoff/HR before it, this introduces a latency to live-playing. But if you can stomach it, with this kind of long HR, particularly if the timing stays accurate, there are like no instrument ADSR values to avoid.


Ok. Cadaver, i sent you a p.m.
hope you noticed. i'll also
respond to your helpful suggestion here:

Why 60 and 20 ms?

is that random?
why not 40 and 20?

you say "0 ms: start the note". what do you mean by that? to select the waveform? (b/c gate on (whcih is my definition of starting a note, is already on by that time).

Stunt
ps.
So for those who didn't figure yet...i'm trying to get a hold of how to create the best music routine for live(!) jamming and knobfiddling with c64. (so not a tracker, not a sequencer, not a player). But all info on how trackers and players are done is very interesting to me if it can inspire me for my thing.
2006-07-20 12:52
cadaver

Registered: Feb 2002
Posts: 1153
It's not really random, it seems at least 40ms (two 50Hz frames) of gateoff time is needed to know the next note triggers nicely, and even more without hardrestart.

To start the note = to select the waveform + gateon, initial frequency and initial pulsewidth if needed
2006-07-20 14:50
stunt
Account closed

Registered: Jul 2006
Posts: 48
Quote: It's not really random, it seems at least 40ms (two 50Hz frames) of gateoff time is needed to know the next note triggers nicely, and even more without hardrestart.

To start the note = to select the waveform + gateon, initial frequency and initial pulsewidth if needed


@ cadaver: hmm ok. Do you mean that ADSR reset has to be at least 2 frames before start of note OR do you mean that ADSR has to two frames before you init adsr with new note values?

I mean what about this , would this work?:

40ms (2frames) before - ADSR reset
0ms - put note values to adsr and wave and directly after that set gate to 'on'.

@ cadaver: i appreciate it a lot that you guys are helping a novice coder like me to find out the hardrestart stuff. I almost understand how it works now. Still 1 question: what exactly is part of the hardrestart , does HR just mean to reset the ADSR before notes, or is the way in which you trigger the notes also part of it? in other words: does it matter wether you firstly put gate on and then select waveform to trigger the note, or can you also first select waveform and then toggle the note on by putting gate to 'on' ?

Because in my application, all parameters are constantly set to the right instrument setting (pw, adsr, waveform, ringmod etc) except for pitch and gate on/off. when i play a note on my keyboard it just sets the right pitch and puts the gate to on. in the future with my wersi board and the midi, there will be sent a 'gate off' signal when keypress is released.

OFcourse for the ADSRbug i now understand to also reset adsr 2 frames before the note will play (i'll create a 2 frame-latency-live-mode that will enable tones with the problematic adsr values).

But why set the other values again each note? like waveform etc? Isn't it more cpu-efficient to change waveform etc with a command that stands loose from each individual note that is played?

Greetz,

Stunt
2006-07-20 15:06
cadaver

Registered: Feb 2002
Posts: 1153
IMO hardrestart does not involve the new note trigger itself, it's just getting the SID to a stabile enough state before the note.

Actually to answer all your questions accurately would require writing testcode, and your code would be different anyway. There comes a point when just trying out stuff is 10x more helpful than asking about it :)

You can freely select waveform at whatever point you want, only the gatebit matters for the envelope generator. However many musicroutines prefer absolute silence (just gatebit, or testbit+gatebit so that the oscillator gets reset) for the first gated on frame.

It's also possible that depending on which kind of attack you are pleased with, you can squeeze the latency time to one frame. This, for instance, is completely different from the hardrestart that was discussed above:

20ms before: gate off, ADSR to 0000 or 000F
0 ms: gate on + waveform (write those first!), ADSR to instrument values, frequency, pulsewidth etc.

It possibly bugs on full sustain.

But to answer about CPU efficiency, we usually don't care about such small things in musicroutines, but rather avoid the real costly operations like multiplication, or reading & interpreting many bytes of the musicdata at once.
2006-07-20 23:01
stunt
Account closed

Registered: Jul 2006
Posts: 48
@ cadaver:

ok thx , that was helpful.
2006-07-22 11:44
Bamu®
Account closed

Registered: May 2005
Posts: 1332
*by the way*

@cadaver
Are there any HR/ADSR values that can prevent ADSR-Bugs? It seems that 0F00 (GT, Jch..) is the best, but what is with other values?
Ok, F800 is quite a good mix (IMHO F000 would sounds too hard), but the A/S value seems to have no audible function.

Ok, here some sceners that use different HR values:

0F00 : - (standard value of some editors)

FF00 : Jeff
0FF0 : Randall/Jammer
0F20 : GRG

FFF0 : maybe a mix of all is the best? :)
2006-07-22 14:28
stunt
Account closed

Registered: Jul 2006
Posts: 48
I think nata's question is interesting.
I notice that you guys seem to mock him sometimes,
(just new to this forum makes me wonder how he
did deverse that position:P), but i can relate to
nata's question very much.

Also i'd really like to see a table of different ADSR settings that bug/dont bug under different circumstances.
I hear peeps saying that it's different for each player/tracker, but as far as i know understand there's a
limited amount of adsrbug approaches, so why not create a table, that describes symptoms of adsrbug under all of them.
To me the different HRcircumstances are (please extend this list if it's not complete yet):

-no HR
-20 ms HR
-40 ms HR
-60 ms HR

Or correct me if i'm (once a gain) summarizing stuff in a way that's too simple :P

cul8rallig8rs

STunt - coder with a typically non-coder mindset
2006-07-22 17:34
cadaver

Registered: Feb 2002
Posts: 1153
@Nata: I would say that 0000, the hardest one, is theoretically best, as the internal counters are left counting the smallest possible cycle. Still there can be some bugs depending how the timing between playroutine's successive frames changes. Something worth trying is to always write last frame's buffered SID values at the beginning of the next frame.

@Stuntgitarist: there are as many timing possibilities as there are CPU cycles between the end of the last note and the beginning of the new :) Only you can tell how ADSRbugs will behave for you, when you test your own routine.

(something very educational would be to modify reSID to display its envelope generator value & internal counter value on each CPU cycle, then you see how even swapping some instructions around may have a different effect)
2006-07-22 18:23
Laxity

Registered: Aug 2005
Posts: 459
"And we're back in the loop again".. Yihaa! ;)
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
E$G/hOKUtO fOrcE
Ax!s/Onslaught - TND
hedning/G★P
Higgie/Kraze/Onslaught
Lavazza/Censor Design
kbs/Pht/Lxt
Røly/Mayday!
teloni0
Asphodel
zzarko
Guests online: 158
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 Crackers
1 Mr. Z  (9.9)
2 S!R  (9.9)
3 Mr Zero Page  (9.8)
4 Antitrack  (9.8)
5 OTD  (9.8)

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