Jump to content

SID filters - questions.


kokoon

Recommended Posts

so i've built the box to a stage when i can tweak the filters with an encoder. i have one 6581 and one 8580. and now some questions. they're all regarding the LP filter. i'm using the latest SID version (midibox_sid_v1_7_303beta9)

1. the 6581 filter has such a low range!

it's almost unusable. from the samples off the http://www.prophet64.com/ tb-303 emulator i'd say the filter is capable of pretty serious resonating but not from the midibox. is there anything that can be done software-wise? apparently the 303 version of the SID application "changes the filters behaviour" and that's why i'm asking. i've tried a ton of different filter caps and ended up using the original ones from the c64.

2. the 8580 filter isn't completely smooth.

towards the low-end there are some weird "steps" (i can look the precise value) that make the filter feel non-analogue. anyone else noticed this? can this be fixed? how did the guys from http://www.prophet64.com/ achieve such great filter sounds?

3. am i talking nonsense?

Link to comment
Share on other sites

  • Replies 72
  • Created
  • Last Reply

Top Posters In This Topic

have you tried with the sid v1.7a? I had that on my only working sid board until a few days ago and i didn't have any complaints at all about the range of the thing. In fact if anything i thought it was much better than the prophet64; both in signal-to-noise and in my ability to change things (filters obviously only being one small part of this...) plus it was such a HUGE pain to load p64 into my c64s, since i only have a tape drive...

I havent tried the 303beta9 that i've uploaded yet because everything is offline while i make my optimized psu, but i really want to try these new algorithms.

Link to comment
Share on other sites

The secret behind Prophet64 is, that it only provides a reduced parameter set, which is required to produce a TB303-like sound... and nothing else. Therefore it might seem that sounds are possible which were not possible before, but this is not true!

You just only need to get a feeling about the mighty MBSID engine ;-)

In general the filter behaviour is device specific. Note that this is an analog circuit, depending on the revision number and the age of the SID it sounds different.

Fine control: you could assign one or two envelopes to the filter, set depth to +30 or so, then use cutoff as "coarse controller", and the "sustain" as "fine controller". Play some short notes and modify the "delay" parameter - do you hear the difference? :)

However, once you select the tb303 algorithm in the v1.7303beta9 version, you will notice a reduced, but fine controlable cutoff range. Thats one of the main differences. Then load one of the TB303 examples from the patches/ directory into JSynthLib, check especially the envelope settings, they are giving you a lot of hints, what is important for TB303-like sounds.

As mentioned many times before, I will write a detailed TB303 tutorial! Just give me some days to realize the new CEM filter circuit as an additional demonstration which powerful sounds are possible with external extensions

Best Regards, Thorsten.

Link to comment
Share on other sites

thanks alot for the detailed reply.

so - if i understood this correctly - the "cutoff" setting doesn't reach to the max cutoff value because it needs to leave some for both the potential envelopes? if so then what about LFOs? so what you're saying is that for the filter to reach the max i'd have to put some envelopes on the filter and modify it positively?

i know the filters are device-specific but i'm almost certain that no c64 had filters with such low filters range.

what about the stepiness of the 8580 filters? you know what i mean by that?

Link to comment
Share on other sites

The envelope trick I described above was the solution to avoid the stepiness, please try it out to understand what I mean.

Don't forget to set CBM8580_FILTER_SWITCH to 1 (in main.asm) when you are using the 8580, or just upload the prepared *_8580_*.syx/*_8580_*.hex file, where this is already done.

Of course, it also works with LFOs. By default, you can reach the max cutoff value with the cutoff CC, there is no additional headroom for modulation sources. The modulation sources just give you the possibility to finetune the cutoff when the ENV/LFO depth is low.

Reg. your 6581: I guess that this is a bad chip, the behaviour cannot be improved by software or hardware modifications.

Or you don't know yet, that the 8580 filter has a different (much better) characteristic compared to 6581

Therefore I didn't give you a comment to this problem - this has been discussed several times, and it's not clear to me if you've read these postings or not

Best Regards, Thorsten.

Link to comment
Share on other sites

The envelope trick I described above was the solution to avoid the stepiness, please try it out to understand what I mean.

okay i get it now. so you're aware that the cutoff parameter curve isn't completely smooth?

Don't forget to set CBM8580_FILTER_SWITCH to 1 (in main.asm) when you are using the 8580, or just upload the prepared *_8580_*.syx/*_8580_*.hex file, where this is already done.

i know that. could you decribe a bit what that flag does? change the curve?

Reg. your 6581: I guess that this is a bad chip, the behaviour cannot be improved by software or hardware modifications.

i'm talking about 3 different 6581 chips. their filters sound nothing like 2-pole (12dB) filters.

Or you don't know yet, that the 8580 filter has a different (much better) characteristic compared to 6581

Therefore I didn't give you a comment to this problem - this has been discussed several times, and it's not clear to me if you've read these postings or not

i've probably read absolutely everything on the subject of SID filters here on ucapps and midibox.org and i've also read some other sites. but from the ucapps MBSID page i got the idea that you feel the 6581 filter is better than 8580 filter. i know those tables and samples were updated later but it doesn't say that the 8580 filter is now better.

actually what i wanted to know is whether the cutoff parameter reaches from min to max of the actual SID filter cutoff value. now that i know that i can conclude that the prophet64 wouldn't sound any better filter-wise than MBSID does. right?

i guess the next step from MBSID will be an external filter. i'm thinking something like you did (a moog ladder) or maybe a WASP filter. that wasp sound is fantastic.

don't get me wrong - i don't want to start a fuss or anything - i hugely respect everything you've done and am building my MBSID with great confidence in its powers. it was just that the samples on the prophet64 site got me thinking that MBSID doesn't use all the headroom of the filter. by the way - i do know how a substractive synth's soundpath looks like and i've built quite a few in reaktor and pd so i have pretty good idea how this works - but just in theory. i haven't done anything like this in assembler and i understand that there are many limitations/ tricks needed.

Link to comment
Share on other sites

okay i get it now. so you're aware that the cutoff parameter curve isn't completely smooth?

yes, it's a SID specific problem, that the cutoff parameter is not linear

i know that. could you decribe a bit what that flag does? change the curve?

yes, it compensates the non-linearity by re-using the exponent table which is also used to map the oscillator frequency. This works well for the upper frequency range, but not so well for the lower range. But the envelope trick can be used if sweeps within this range are desired.

And again: another possibility is the use of the TB303 option, which reduces the cutoff to the lower range, so that you won't notice stepiness anymore in the range you are mainly using for these types of sound

i'm talking about 3 different 6581 chips. their filters sound nothing like 2-pole (12dB) filters.

yes, especially the resonance doesn't really work

i've probably read absolutely everything on the subject of SID filters here on ucapps and midibox.org and i've also read some other sites. but from the ucapps MBSID page i got the idea that you feel the 6581 filter is better than 8580 filter. i know those tables and samples were updated later but it doesn't say that the 8580 filter is now better.

the 8580 filter is definitely better for TB303-like sounds, the 6581 is better for soft sounds, I will make this clear in the TB303 tutorial

actually what i wanted to know is whether the cutoff parameter reaches from min to max of the actual SID filter cutoff value. now that i know that i can conclude that the prophet64 wouldn't sound any better filter-wise than MBSID does. right?

Ok, again a complete statement to avoid any confusion:

Yes, if no modulation source is assigned to the filter, and if the TB303 option is not enabled, you can sweep the cutoff over the whole range with CC#46 - sometimes it sounds steppy because of the 7bit resolution of this CC, but this can be fixed by using modulation sources for fine control.

don't get me wrong - i don't want to start a fuss or anything - i hugely respect everything you've done and am building my MBSID with great confidence in its powers. it was just that the samples on the prophet64 site got me thinking that MBSID doesn't use all the headroom of the filter. by the way - i do know how a substractive synth's soundpath looks like and i've built quite a few in reaktor and pd so i have pretty good idea how this works - but just in theory. i haven't done anything like this in assembler and i understand that there are many limitations/ tricks needed.

Most samples of the Prophet64 side are made with the 8580, when you are activating the TB303 SE option you can realize very similar sounds, because it changes the way how the filter is controled

Best Regards, Thorsten.

Link to comment
Share on other sites

Kokoon, you are right about the blocky behaviour of the 8580 filter in the lower end - a fast sweep causes a metallic boinging sound and a slow sweep goes in audible steps. It's one of the reasons I switched from 2x8580 to 8580/6581configuration. The 6581 filter seems to go through the cutoff range smoother, and the 6581 filter doesn't turn the sound completely off in the lowest values like the 8580 filter does. Then again, the 8580 filter is more pronounced and effective with a better resonance, so there is good and bad in both chip types.  :)

Link to comment
Share on other sites

Good news: in the meantime I found a solution to overcome this rough CC resolution: I've implemented an interpolation algorithm for the filter, which is just an envelope generator with dynamic attack/decay rate. The rate can be determined by measuring the time between two changes, and the difference between the two values - very simple.

I found out, that such an interpolation is a *must* once a filter with high resonance is controlled, therefore I've created an example with the CEM3378 to demonstrate the difference.

-> http://www.midibox.org/midibox_sid/mbsid_filter_interpolation.mp3

1st part: filter sweep without interpolation

2nd part: filter sweep with interpolation

3rd part: same like 1, but with delay Fx

4th part: same like 2, but with delay Fx

The graphical representation of the CC sweep:

mbsid_filter_interpolation.gif

(interpolation can be disabled with Sound Engine Option 2 - for the guys who like this typical 8bit effect ;-))

Best Regards, Thorsten.

Link to comment
Share on other sites

Yes, it's a software feature. Currently it only works for the AOUT and 6581. For the 8580 I have to add a second interpolation routine, since the output curve is different.

Before the next release I have to solve two things: the second interpolation (I will rewrite the routine, so that it can use two different parameter sets), and the filter keytracking issue (it works fine, but there is no place anymore within the Sysex data structure to store this parameter, currently I'm using the ENV2 curve value to control the tracking  - I have to find a compatible solution - somehow)

Best Regards, Thorsten.

Link to comment
Share on other sites

Reg. the keytracking issue: maybe the best solution is to make MIDI sync a global parameter which is not stored in the patch. In addition, the wavetable rate should also be global if it is synced via MIDI. This frees one value in the SysEx dump which can be used for filter keytracking :)

Best Regards, Thorsten.

Link to comment
Share on other sites

I've finally managed to find a solution without compatibility problems: the keytracking value is stored within the same value which contains the SusKey flag

I've also added the second interpolation - unfortunately it turned out that it doesn't help that much in the low-range of a 8580 filter, because a small change increases the cut-off so much, that it can be notified as a "stepiness effect". Sorry - no chance to improve this :-/

However, the new beta version is located here:

http://www.ucapps.de/mios/midibox_sid_v1_7_303beta10.zip

Additional changes: the MBHP_AOUT_LC outputs a 12bit filter value and a 4bit resonance value. 4bit is enough for the TB303 emulation which just increases the resonance on an accented note - finetuning can be done with an external trimmer (pot)

Best Regards, Thorsten.

Link to comment
Share on other sites

you could do one thing - i once programmed this (not in asm) but i'm not sure if i'll be able to describe it in english:

make interpolation speed variable - dependent on the input change speed. that would mean if you turn the encoder slowly then changing physical values can take even 50ms per unit which should probably be enough.

i'm sorry if you already considered this and concluded it's too heavy resource-wise.

another thought - why should the entire cutoff freq range be used? for my taste the bottom ~10 units are unusable. maybe we could change this ourselves? along with the mapping function that now causes the "stepiness effect"?

i'm sorry i'm making such a big deal out of it but smooth filter sweeps are the most important thing for me :) ofcourse if nothing can be done then so be it.

Link to comment
Share on other sites

you could do one thing - i once programmed this (not in asm) but i'm not sure if i'll be able to describe it in english:

make interpolation speed variable - dependent on the input change speed. that would mean if you turn the encoder slowly then changing physical values can take even 50ms per unit which should probably be enough.

i'm sorry if you already considered this and concluded it's too heavy resource-wise.

the speed is already variable, the speed is determined by measuring the time between the last and the current change

Maybe I should highlight again, that the 8580 resolution and non-linearity problem is NOT a software problem!

another thought - why should the entire cutoff freq range be used? for my taste the bottom ~10 units are unusable. maybe we could change this ourselves? along with the mapping function that now causes the "stepiness effect"?

this special 8580 stepiness within the low range (and not the one I fixed via interpolation) is caused by the 8580 hardware implementation, it cannot be improved via software, no way - really - it's unsolvable!

i'm sorry i'm making such a big deal out of it but smooth filter sweeps are the most important thing for me :) ofcourse if nothing can be done then so be it.

at least the 6581 and AOUT filter curves are very smooth now :)

Best Regards, Thorsten.

Link to comment
Share on other sites

so it's actually impossible to get the filter over that range without the "step" by any means even outside mbsid?

thats what I told you one week ago ;-)

If it helps: the SID provides a 11bit register for filter cutoff frequency, this means a range from 0x000-0x7ff is available. Sounds perfect, but the "internal" filter control curve of the 8580 is not linear, and the change from 0x000 to 0x001 is hearable! In order to linearize the curve (requirement for proper ENV/LFO modulation), 0x000 is mapped to a certain range. When you are incrementing the CutOff CC by +8 or so, and when you are hearing the first step, the CutOff register has been switched to 0x001 (this mapping is, what you are switching on with the 8580 filter flag). Values over 0x008 don't cause this steppiness effect anymore, in addition, higher CC# cause bigger changes in the filter cutoff register, but these changes are very smooth (no steppiness) - especially, since MBSID provides interpolation

i didn't know that and then i'm really sorry about the whining about the software.

Nearly every 6 months a guy like you blames about ostensible software imperfections, so this is nothing new to me. This should also explain, why I'm reacting a little bit shirty in the meantime...

Best Regards, Thorsten.

Link to comment
Share on other sites

Since you know about programming - here the mapping CC->SID Filter value when the 8580 Filter flag is set:


CC | SID_FC 8580
00 | 0000
01 | 0000
02 | 0000
03 | 0000
04 | 0000
05 | 0000
06 | 0000
07 | 0000
08 | 0001
09 | 0001
0A | 0001
0B | 0001
0C | 0001
0D | 0001
0E | 0001
0F | 0002
10 | 0002
11 | 0002
12 | 0002
13 | 0002
14 | 0003
15 | 0003
16 | 0003
17 | 0003
18 | 0004
19 | 0004
1A | 0004
1B | 0005
1C | 0005
1D | 0005
1E | 0006
1F | 0006
20 | 0007
21 | 0007
22 | 0008
23 | 0008
24 | 0009
25 | 0009
26 | 000A
27 | 000B
28 | 000B
29 | 000C
2A | 000D
2B | 000E
2C | 000F
2D | 0010
2E | 0011
2F | 0012
30 | 0013
31 | 0014
32 | 0015
33 | 0017
34 | 0018
35 | 001A
36 | 001B
37 | 001D
38 | 001F
39 | 0021
3A | 0023
3B | 0025
3C | 0027
3D | 002A
3E | 002C
3F | 002F
40 | 0032
41 | 0035
42 | 0038
43 | 003C
44 | 003F
45 | 0043
46 | 0047
47 | 004B
48 | 0050
49 | 0055
4A | 005A
4B | 005F
4C | 0065
4D | 006B
4E | 0072
4F | 0079
50 | 0080
51 | 0088
52 | 0090
53 | 0098
54 | 00A2
55 | 00AB
56 | 00B6
57 | 00C0
58 | 00CC
59 | 00D8
5A | 00E5
5B | 00F3
5C | 0101
5D | 0111
5E | 0121
5F | 0132
60 | 0145
61 | 0158
62 | 016D
63 | 0182
64 | 019A
65 | 01B2
66 | 01CC
67 | 01E7
68 | 0204
69 | 0223
6A | 0244
6B | 0266
6C | 028B
6D | 02B2
6E | 02DB
6F | 0306
70 | 0335
71 | 0365
72 | 0399
73 | 03D0
74 | 040A
75 | 0448
76 | 0489
77 | 04CE
78 | 0517
79 | 0565
7A | 05B7
7B | 060E
7C | 066B
7D | 06CC
7E | 0734
7F | 07A2
[/code]
[code]
CC  | SID_FC 6581
00 | 0000
01 | 0010
02 | 0020
03 | 0030
04 | 0040
05 | 0050
06 | 0060
07 | 0070
08 | 0080
09 | 0090
0A | 00A0
0B | 00B0
0C | 00C0
0D | 00D0
0E | 00E0
0F | 00F0
10 | 0100
11 | 0110
12 | 0120
13 | 0130
14 | 0140
15 | 0150
16 | 0160
17 | 0170
18 | 0180
19 | 0190
1A | 01A0
1B | 01B0
1C | 01C0
1D | 01D0
1E | 01E0
1F | 01F0
20 | 0200
21 | 0210
22 | 0220
23 | 0230
24 | 0240
25 | 0250
26 | 0260
27 | 0270
28 | 0280
29 | 0290
2A | 02A0
2B | 02B0
2C | 02C0
2D | 02D0
2E | 02E0
2F | 02F0
30 | 0300
31 | 0310
32 | 0320
33 | 0330
34 | 0340
35 | 0350
36 | 0360
37 | 0370
38 | 0380
39 | 0390
3A | 03A0
3B | 03B0
3C | 03C0
3D | 03D0
3E | 03E0
3F | 03F0
40 | 0400
41 | 0410
42 | 0420
43 | 0430
44 | 0440
45 | 0450
46 | 0460
47 | 0470
48 | 0480
49 | 0490
4A | 04A0
4B | 04B0
4C | 04C0
4D | 04D0
4E | 04E0
4F | 04F0
50 | 0500
51 | 0510
52 | 0520
53 | 0530
54 | 0540
55 | 0550
56 | 0560
57 | 0570
58 | 0580
59 | 0590
5A | 05A0
5B | 05B0
5C | 05C0
5D | 05D0
5E | 05E0
5F | 05F0
60 | 0600
61 | 0610
62 | 0620
63 | 0630
64 | 0640
65 | 0650
66 | 0660
67 | 0670
68 | 0680
69 | 0690
6A | 06A0
6B | 06B0
6C | 06C0
6D | 06D0
6E | 06E0
6F | 06F0
70 | 0700
71 | 0710
72 | 0720
73 | 0730
74 | 0740
75 | 0750
76 | 0760
77 | 0770
78 | 0780
79 | 0790
7A | 07A0
7B | 07B0
7C | 07C0
7D | 07D0
7E | 07E0
7F | 07F0

the interpolation smooths down the changes, but as you can see in the 8580 table, there is not that much headroom at the lower CC range

Best Regards, Thorsten.

FAQMARKER

Link to comment
Share on other sites

wow i never realized that the bottom cutoff settings of 8580 even don't make a difference at all :) now it's all clear to me haha.

one more question - is that mapping table hard-coded or is there a exponential mapping function of some sort? i always thought the SID filter register would be 7bit (yeah i know you couldn't have interpolation that way ;)

i'm thinking maybe it would be nice (certainly for me) to have a few filter cutoff modes (low, med and high freq)...

Link to comment
Share on other sites

Just open "sid_sw.inc" and search for "SIDSW_Filter_CBM8580", you will find the code which gets the mapped value from SID_FRQ_TABLE. This table is located in sid_frq_table.inc, and is normaly used for the MIDI Note->Oscillator Frequency calculation. So, it's not a good idea to change this one. Duplicating this table is also not possible, since it takes 256 bytes - this is ca. the amount of memory which is still free in the application.

So, you could downstrip the MBSID application, means: remove features which are not used. But this is not trivial

Please understand that I cannot provide the exact informations, how to do this for certain functions, it would always result into a lot of effort at my side to find out the possibilities which save 20..30 bytes per function - it already took a lot of effort to put all this TB303 stuff into a project which was already out of memory.

In between 2 weekends I rewrote the whole control surface handler, just to save ca. 500 bytes (I'm proud that it still works like before without any bug). And this memory was filled by the new code.

Another way would to wait for a full functional PIC18F4620 (like I). It provides an internal 64k flash, which means, that you could store 128 different filter tables in there (or some additional features ;-))

Best Regards, Thorsten.

Link to comment
Share on other sites

wow so you actually use the pitch -> freq logarythmic conversion for this? how on earth did you think of this? not that it doesn't work well :)

i think i'll stop bothering you now. i understand the resources are very tight and no one should expect you to rewrite anything. you saved 500 bytes ascii bytes or binary? either way that's quite nice.

i can't wait for this tb-303 howto though - is the functionality finished or do plan to add antything else before releasing it (along with the documentation)?

Link to comment
Share on other sites

Re-using this existing table was the idea of Jess D. Skov-Nielsen :)

TB303 mode: implementation is finished, I don't plan more features for the next official release.

Currently I'm a little bit out of ideas for demo sequences. I also don't have a clear plan, in which form the tutorial could be useful and wouldn't produce even more questions.

Maybe it makes sense to start the tutorial in the Wiki as some kind of living document which gives a sufficient overview about the parameters at the beginning, and detailed infos once people really want to know about this - is anybody interested in creating TB303 demos?

Best Regards, Thorsten.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...