Jump to content

MB SID V2 discussion?


Razmo

Recommended Posts

Hey! a new feature for V2 Thorsten! ... different clockings in the engine! ... 1, 2 and 4MHz ... it should work with all 8580s and those 6581 marked with an "S" i believe...

now where you mention this - it could already be integrated as a sound engine option (2 bits are still free) - on the other hand: maybe there is a better usage for the remaining bits?

The clock frequency can be changed in USER_Init (works only when the SID is clocked from the PIC, but this is recommented anyhow).

Note: the frequency can also be changed from MIOS Studio on-the-fly without rebooting the PIC, the PR2/CPR1L SFRs can be written like SRAM cells (addresses: 0xfcb and 0xfbe)

Best Regards, Thorsten.

Link to comment
Share on other sites

  • Replies 100
  • Created
  • Last Reply

Top Posters In This Topic

Hi Thorsten!

Yes!... maybe it's better to wait with the last bits... I don't know any advantage to increased frequency clocking to justify it... The envelopes of SID will get faster, but they don't function well anyway so why bother!? One thing though is that times calculated for the delay to properly work the envelopes will shorten I guess... so a smaller latency would be possible maybe.

Actually I think I made some test back then with my own design, where I actually toggle the reset-line of SID to simply reset the whole SID chip before starting a new note... I believe it worked quite alright, but this would require you to have direct access to the reset pin of SID from the PIC to be done... don't know if you have implemented that in your design (?).

Regards, Jess.

Link to comment
Share on other sites

Hi Thorsten!

Well... If the reset line is accesible from your design, all you have to do is to reset the SID to clear all and everything in the SID by togling the reset line off/on, when this has been done I think that you would have to re-write all the SID's registers again before you can trigger the gate bit. I did this trick with my old design, and actually I thin k that I recall that it worked extremely well... It's definitely worth a try! ... IF it works, the envelope bug should be cured  :P ... I'm almost sure that I recorded my design using this technique actually... have to check them out...

Regards, Jess.

Link to comment
Share on other sites

Hi again Thorsten...

I just checked my old MP3s of my SIDsynth... I was right, I did make an MP3 utilizing this hardware reset line feature!  :) ... The name of the file reveals it he he! ... I'll be emailing you this MP3 in a few minutes... believe I did send this to you sometime in the past, but in case you erased it, then I'll send it to you again.

I also now recall that the drawback ( ::) ) using this trick is that it adds a small "click" to the initiating of a note, but for sounds with instant attack this is not that noticeable, and it WILL reset the envelope timer! ... If this works well as I suspect it will, then percussion sounds will get to whole new dimentions.

Regards, Jess.

Link to comment
Share on other sites

Damn i love that kick at 50 seconds, if that could talk it would say "take THIS" right before you hit the drum each time ;) I think I have a nosebleed :D

The snares are sounding OK (I mean, for my purposes, my "wish list")... I mean they sound good, but they're all very same-ey. Damn I wish I had my mbsid built so I could show you what I'm talking about...uhhhhhmm gee it's hard putting sounds into words!!

As an illustration, often my snares are not so much like a real snare drum as they are like smacking a metal pole with a steel hammer. Obviously FM is well suited to that kind of metallic sound but it's still do-able without it, especially when you've got ringmod and fast envelopes on your side. I think a major difference would be made by gating out/fading out the noise a bit faster, but the attack is lacking 'snap' at the moment and I'm not sure why?

Link to comment
Share on other sites

Hi Stryd!  :)

I'm with you here... the snares lack something, but it's already quite alright compared to one oscillator typical SID snaredrums.

I think that the reason we are not getting enough punch out of the Snares is that the Phase reset is resetting the phase at 0 degrees where the triangle waveform probably begins at zero... to get a nice "click" it should start one fourth into the waveform where the amplitude of the waveform is at maximum... this is just not possible with the SID, so it'll have to doo as it is... another thing is the noise... it's not that snappy either. I think that maybe by using the square waveform, and then filtering it for the right "thump" might do the trick, since a square waveform start it's phase with max volume... don't know... will try that out.

Anyway, using the SID as a drummachine is perhaps a bit overkill.. I don't think I'll be using it in normal compositions because of it's limitations, but I'd use it for stuff that "real drummachines" cannot do, and in particulaer 100% SID compositions that SHOULD utilize only the SID chip. I feel that what is important with a SID synth/drummachine is to be able to get that special sound, that only the SID does... and that IOS sounding cheesy and computerish... after all, if it was to sound just like any other music-machine out there, then why bother using it? in honesty; there are machines out there that are much better suited for that and sound much more professional than the SID I think. Therefore, wavetables should NEVER be omitted just because we realize that more "pro sounds" are possible with the SID... It's just an extra bonus... main goal should always be nostalgica, because that is what SID sound is all about.

And yes, using the ringmod may give some extra possibilities... I'll check out on that later today. As said before, drumsounds on V2 should REALLY allow for 3osc sounds! ... that combined with wavetable features would make drums that no other machine can do... and THAT is what I'd be aming at!

Regards, Jess.

Link to comment
Share on other sites

Alright, I've integrated an automatic SID reset on each new note as 6th sound engine option

-> http://www.ucapps.de/mios/midibox_sid_v1_7303b_rc3.zip

for the register refresh, it is important, that the ADSR registers are initialized before the gate flag is set. Fortunately I already wrote the appr. code for MBSID-D, so it was some quick copy&paste.

An interesting effect that I noticed is, that the envelope won't be reset immediately with the RES input! The reset itself should be held for 10 SID CLK cycles (recommented in datasheet), but after the reset some additional cycles have to be inserted before the registers are written, otherwise the attack won't work, and with certain settings the release phase stays active.

So, it seems, that some flip flops of the ENV logic are not directly connected to the RES input!

Jess: could you please check, if the same sounds are possible like with your reset implementation?

The reset routine can be found in sid_sr.inc, SID_SR_Reset

Here the demo which Jess has made with his own engine - again: quite imressive :)

-> http://www.midibox.org/users/razmo/8580HRDRST.mp3

Best Regards, Thorsten.

Link to comment
Share on other sites

Hi Thorsten!  :)

Typpical!... That SID seems to be a stubborn son of a Yannes!  :-\ ... Seems to want it's way, not giving in... guess it likes it's "handicap" somehow  ;D

I'll look at the things you said later today... It's my child-weekend, so I've got two Critters here who is to be delivered home to their mother in about an hour, so... familly endeavors first  ;D

Eventually I won't give up on that envelope bug until I find a solution... (don't say I'm not optimistic  8))

Regards, Jess.

Link to comment
Share on other sites

So far I remember the JCH tracker used the following technique: 20 mS before the gate bit was set, it cleared the Sustain/Release register. This ensured, that the envelope reached the floor before the attack phase started again.

Such a method is bad for MIDI, because it adds a latency of 20 mS - suboptimal for live playing, and a host sequencer must provide a timing compensation function.

A modification of this method I have used for MBSID-D was the possibility to clear the Sustain/Release at the end of a wavetable sequence - this works quite well so long there are no overlapping notes - good for drums, bad for lead sounds.

This technique could be enhanced by an automatic timer based clear, the required delay can be determined from the release rate. This is what I'm planning to implement for MBSID V2. It's not a complete solution, but it works good especially for short, punchy sounds.

Best Regards, Thorsten.

Link to comment
Share on other sites

I'm with you here... the snares lack something, but it's already quite alright compared to one oscillator typical SID snaredrums.

Quite alright? I think they're excellent!

I'd be interested to hear though... Mix square (lower freq) and triangle oscs, and 50% or so ringmod them by high freq noise, with a 0 attack, quick decay, to a low sustain level, medium release... It won't be that classic sound but I'm so curious to hear it if you feel like making some unusual percussion :) But first have some fun with the family :)

And TK, thanks for the new option!

Link to comment
Share on other sites

Hi again everyone.

Davo: Yes! the SID drums should be there, and is made using the wavetable, changing the waveforms rapidly... this was just an experiment to do it the "right way"  :)

Thorsten: I've checked out the new reset feature, and it works alright... I stumbled on some thing that are not so good, but I remember having the same probs when I did my own synth back then... Whenever the SIDs envelopes are used with other settingsg than 0,0,15,0, the sound will get a bit af soft attack to it... I don't think there is any way around this, which is pretty bad when it comes to drum synthesizing. The envelopes don't "hickup" anymore though which is a great improvement! ... The worst attack problems will drop in when the release value is higher... I guess that the main problem with the env.bug is with the release phase obviously, but why this is not reset when even reseting the hardware reset line of SID, well... don't ask me!  :-\

Have you tried to clear all envelope registers prior to toggling the reset line also? maybe even clearing the control register also... I don't know... have to try everything... SID is quirky!  ::)

Nonetheless; the feature open up a lot of new potential, so I wote it to be there  8)

Regards, Jess.

Link to comment
Share on other sites

MB SID V2.... >:(....noooooooooooo....i have to complete my first Midibox V1...but..however... ;D

Thorsten, do you think to redisign all MIDIbox SID part's (pcb)...or just you think to a simple add-on (just another pcb) to implement the whole system?

lee

Link to comment
Share on other sites

Hi Stryd...

I think that making an external VCA would be a nice thing... but on the other hand, one should be careful not to jump too far off the original SID... Afterall we are talking nostalgica here, and putting something extra on it would make it... ermm... NOT SID anymore, but rather a hybrid of sorts. It would "cure" the envelope bug though... I'm just wondering what it is we REALLY like about the SID? ... Is it the sound engine?... The filter? .. It's "stubborness" and quirkyness? ... I think it's all of it in one good blend.

Anyway, another thing that I've thought about would be to make a good combination of PIC and SID... I believe that one of the things that are hardest to reproduce of the SID is of course the filter. The rest of the digital logic has been duplicated fairly well on emulators, and if those emulators just had the real analog filter, maybe it would be much more accurate. Therefore I'm wondering, if it would be possible to reverse engineer the digital parts of SID, and then redo this in PIC code... Make a conversion into analog, and feed the external input of a real SID chip, to get that special SID filter. What this would give us is the ability to cure all the associated bugs of both 6581 and 8580. No envelope bugs, No standing waves on 6581. It is certainly possible to do it, it's just a matter of feeding the external filter input. On top of this, new enhancements could be done too to make new sounds... The question is if the PIC can handle it... but it's a nice thought though  :P

Regards, Jess.

Link to comment
Share on other sites

In addition to my last post:

Also, I think that was is so cool about the SID is that something that was build in 82, can perform so well... we like the SID so much we want it to "learn new tricks"... but old dogs can't do new tricks. The SID is what it is, and the goal of many a SID programmer on C64 was to squeeze as much out of it as one can, by tweaking it's parameters... and I think, that this is what should be done too with the MB-SID. Lets see how much we can perform with this one chip alone... though I believe we have good ol' SID on steroids already!  ;D

Regards, Jess.

Link to comment
Share on other sites

Hi Thorsten!

Today I've been looking deeply into the workings of SIDs envelope and it's bug, and I believe I think I know the cause of it technically. I did a series of tests to try and find out what happens, and this is what I found out:

We know, that if the envelope is set to 0,0,15,0, that no problems exist. In fact, this is wrong! ... You can mess about with the Attack parameter as much as you'd like, as long as the decay and release rates remain 0. In fact you can also set the sustain parameter to any value you want, and still no problem uccurs, the envelope is NOT delayed. This way we learn, that we can actually set the relative volumes of the oscillators by setting the sustain parameter to what ever value we want... it works! no delay on the envelope triggering.

The problem begins when other values but 0 are present in either the decay or release parameter. Even if you only raise the decay value, the envelope bug sets in, and it's easy to hear! try and make a simple oscillator playing a pulse waveform, and set the envelope to 0,1,15,0... when you press a low key you will hear the tone... now hold the key down, while you press a high key... now release/press the high key repeatedly so that the tone alternates between low and high note... you will now hear the envelope abruptly cut off the notes but if you listen carefully, you can hear the note that is cut off VERY briefly!... It lasts for about 33ms... you can also hear that ALL OTHER PARAMETERS that are changed with the cut note (pitch, phase reset, waveform etc.) is correctly an instantly changed to the new notes values... it's simply and only the envelope that reach the release phase 33ms later than it should.

Now I've been thinking about what could be the cause of this reaction... I bet that the SID has some sort of decreasing counter, and a simple comparator that compares the counter value to the sustain value (during the decay phase), and against a set "release-end" value for clearing the counter again after the release phase has ended. The decrease of the envelope can be viewed in a waveform-recording of the SID (e.g. soundforge), and can be seen to be clearly logarithmic in nature giving it a good "thump" (like the curve parameter)... I therefore asume, that the EGs output values that SID compares it's sustain/release-off values to, is logarithmic, and if this is so, it probably takes quite some time for the EG values to reach 0 because of it's logarithmic nature (never really reaching 0), so I bet that if the counter is below a certain value, then the counter will be reset as if the end of the release phase has been reached... this could explain why the 6581s oscillators was still sounding when the envelope had reached it's end if the "0" end value was set too high... maybe this "off-value" that is compared to has been lowered on the 8580 (if you pump up the volume on an 8580 you CAN actually hear the oscillators running!!! in fact I believe that the bug was never fixed!... I believe that many registers in the 8580 was made logarithmic like e.g. the filter cutoff, and I believe that also the volume register of 8580 is logarithmic! ... this explains the lower running of the oscillators! ... after using the new ENV2->vol I noted that the volume gets MUCH lower in the low range of the register... because it's also logarithmic on the 8580!)

If what I wrote above is true, then this also explains why the envelope is delayed on a new note, because if the counter never really reached the "envelope off" value compared to, then it has probably not been reset meaning that when the gate bit is set again, the envelope continues from it's former position reaching for "0" and then reset the counter, and voila! the envelope begins again... also this will explain why different release rates give different delays... simply because a longer release rate takes longer to reach that "0" value compared for, which also explains why a resetting of the ADSR to 0 will make that delay equal under all settings of the release/decay registers...

If all this is correct, then we can see that the release phase is running, when the gate bit is off... meaning that as soon as the gate bit is triggered, that envelope starts over with the counter in what ever value it was left in, if it did not reach "0". We have to make sure that the counter reach that "0" as fast as possible right before triggering the gate bit! ... so my suggestion would be to do the following:

1. MIDI note on recieved:

2. Set ADSR registers to 0s (this will make the EG begin counting down as fast as possible)

3. Wait for the EG to reach the "0" counter value, so that the counter will be reset properly (this will be rather fast and approx: 0.002ms!!!).

4. Set and initialize the new ADSR values and other regs.

5. Trigger the gate bit (if this is done too fast after the ADSR was set to 0s, the EG may not yet have reached the "0" counter value, and the counter will not have reset, resulting in the EG bug)

I REALLY think you should try this out Thorsten!... I'm beginning to believe it might actually work, and if it does, the envelope bug will have seen it's own demise!  :o

Regards, Jess.

Link to comment
Share on other sites

You also mentioned something about the JCH player resetting the EG registers before triggering the note, and waiting 20ms... I think this is the same solution, but on the C64 the delay time of 20ms is probably because they wait 1 or 2 raster-screens as this is convenient and of no importance because it's a player... with MIDI realtime playing 20ms is too much (in fact I measured the delay to have to be 33ms!?) ... but I believe that a 0.002 or 0.003 ms delay is actually enough since my measurements in soundforge clearly shows that the attack/release phases with a setting of 0 in the registers last for roughly 0.002ms. so in general, the EG bug is present all the time, and also with ADSR settings of 0,0,15,0 ... the rate of 0 in decay and release is just so fast, that it will have reset the counter because you cannot press two notes en sequence in under 0.004 seconds!  :)

I also remember that Yannes chose the EG rates and put them in a lookup table, and actually chose the values copying the rates from another synthesizer... I read that somewhere in an interview with yannes.

Regards, Jess.

Link to comment
Share on other sites

Just my quick and silent wish in the middle of this v1 v2 v3 debate:

Thorsten: Please, even though all the limitless possibilities are witing us with the new PIC power, it is crucial to keep Midibox SID hardware backwards compatible. Of course there can be tweaks, additional encoders/buttons etc, but changing the design too much will be a disaster for most of the people who have had the money and the time to build v1. If you can keep SID in the original box, even with shortcuts and multibutton triggers, it is 100% great.

I know that you have stated every time that you don't have need to revamp the hardware desing, it is not that I have forgotten, just encouraging you to keep the faith ;)

Roope

Link to comment
Share on other sites

I believe Thorsten will stick to it  ;D ... I asked about hardware changes/additions and got the evil e-mail eye from him  ;D (sorry Thorsten... Exageration gives better understanding  ;D)...

Oh and by the way, now that I'm cramping in my wrists from writing about EGs and such  :-\:

The option to reset the SID will still give one major benefit:

The EG can be switchable between two modes using this. If the reset line is used, the EG is reset enough so that it will not continue from the last value it had... The SIDs EG works in a way, that if the release is long, and has not died out yet when a new triggering of the EG is done, than it just start the attack phase from the value it already has. This is impossible to get around in a normal usage of the SID, but the resetting of the reset line will allow this since the last used value will be reset to 0. just tested it... it works.

Regards, Jess.

Link to comment
Share on other sites

You can really be sure that you can re-use the modules as well as the hardware case for MBSID V2, seems that I cannot highlight this often enough ;-)

Something what could happen is, that the module matrix nodes could get another purpose. Currently the sources are statically E1/E2/L1-L6, and the targets are statically O123 Pitch/PW and Filter, but in future the sources and targets could be freely defineable.

This could mean in other words, that the labeling of the mod matrix does only suit with the default assignments, and that they can be customized - but I cannot say more to this topic until now.

Again: you can be sure, that the CS hardware won't be changed

Jess: the hypotheses you are writing are making sense to me, I've had similar "impressions" about the envelope behaviour in the past. Especially I can confirm that commonly used 20 mS delay between release=0 and the next gate trigger is only related to the refresh rate normal used by SID trackers. It was just save enough to say, that it will perfectly work with 20 mS

From my experiences with MBSID-D, the delay between setting Release=0, refreshing the Sustain/Release register and setting the gate can be much shorter. But I never tried different combinations of D (and R) values in order to prove the miminum delay.

The assumption, that a delay much lower than 1 mS are enough make also sense, this corresponds with the obervations I made last sunday with the reset trigger.

Here I have to repeat again: it seems that the reset input doesn't affect the flip flops of the EG. I had to add a delay between the reset deactivation and the refresh of the SID registers, otherwise the envelope works like without reset - means especially: if the envelope hasn't reached zero, a new gate trigger will start the attack phase - the volume hasn't reached zero.

This means in other words (and this is my hypothesis): with a reset, ADSR will be set to 0, but the EG won't be affected. So, it doesn't make a difference if all SID registers are reset, or only the S/R registers (I'm not sure, but I think that A/D don't neet to be set to 0, since the gate bit is cleared anyhow when the workaround is used)

Tomorrow evening (it's too late now for such experiments...) I will try out the following: I will replace the reset option by a function which sets the release rate to 0, waits for a specific delay, and then sets the gate flag.

Biggest advantage: this can be done for each oscillator individually! Nice for polyphonic sounds :)

Best Regards, Thorsten.

Link to comment
Share on other sites

I just had to put into words that I think this is a great thread.

While razmo and TK are working on the innards of the SID, we're all being very quiet - Hey Raz, TK.... we're not bored, we're watching you work, in silent awe! :)

Link to comment
Share on other sites

Hi Stryd!  :)

Well, thank you for the care  :D ... Guess we are just a two guys with a passion for the SID... I had my first musical inspiration back then in 1986 listening to the SID (so much my mother often had to scream her lungs out for me to turn down the volume  ;D). It means a lot to me this SID chip, and it has always been my dream to play it like a real synth... then came the SID Station... I bought it... and was disappointed because it did not support the 8580, ... I even tried to pursuade Elektron into making a mod for it... wich they would not... so I'm stubborn and decided that when noone wanted to do it for me, I'd do it myself, and I started researching electronics on the net (had no experience)... and made my own... but as told in an earlier post, Thorsten obviously saw this, and contacted me informing me about the MBSID, which I rapidly accepted!  :) .. but... stubborn as I am, wanting my own features, I gave some idears to Thorsten, and now we work together by me giving idears and such... wich hopefully will be to everyones advantage  ;)

My sole goal with the MBSID is very simple: Prove that SID can kick some serious pro-gear butt! ... do it's own special sound no other gear can (wavetables etc.) and lastly, for remixing good old C64 songs for the RKO pulling nostalgica into the remixing. My goal at remixing would certainly be a remix made with nothing but the SID in such a way that no-one will guess it's actually the SID chip!.. I believe it's possible  8)

My dream SID synth would be (MBSID V2) with these SIDs:

1. 6581 R1

2. 6581 R2

3. 6581 R3

4. 6581 R4

5. 6581 R4AR

6. 6582A

7. 8580R5

8. 8580R5

just imagine these being played monophonically, remixing some of hubbards old hits, bringing in all the generations of SID!  :P That'd be awesome nostalgica! ... got the chips allready  8)

Regards, Jess.

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...