Does anyone have any tips on getting SIDney to sound less 'detuned' when playing it?
I've tried turning off multi and and having one waveform per voice (though I think that two waveforms per voice also causes some frequency phasing i.e triangle and pulse) but I can't really get it sounding 'harmonious'...
I was testing it against another linux synth, zynaddsubfx, but i'll try it against a piano or such when I have time.
Ok, I don't know whether this is a bug or not, but I opened up the mini moog and clicked the A440 button to start the A concert pitch thing and tested that against my grand piano sample using headphones, it seemed ok. So I then took one of the voices and started fiddling around with the 'tune' option until I got harmony with A on the SIDney, the mini and my piano sample!
Perhaps Nick, you could incorporate those values on the 'tune' knob in the picture into the next release as the 'center' of the 'tune' knob?
You have made two points here, both may be bugs:
A_440 tuning is out: what is your samplerate - is it 44.1Hz? Are you using jack? Jack will typically default to 48kHz, bristol will default to 44.1kHz - that tuning value you have may be a direct result of a mismatch? Having said that maybe my tables are incorrect and I will review them - your generally report issues that turn out to be bugs and this is again likely to be the case. Also, if the MINI A-440 was in tune with your piano this is admittedy unlikely. Did you make sure that the Transpose control was correct - this has 24 whole note steps and you may be a single step out.
Regarding the phasing, this is a separate issue. When you do not have Multi selected then each voice will have waveforms that are totally in sync (they are taken from exactly the same phase accumulator) and actually sound quite mechanical, ie, they just affect the waveform, not the phase. The voices will have separate accumulators however, when tuned and in Mono mode, they should also sound almost mechanically correct.
When you select Multi then the SID chip will use separate phase accumulators for each waveform of each voice, and there is a default detune of several cents so that the sound starts to move. The SID chip has a control to configure this however you do not get access to that control from Sidney (you will from the next one). What I can do, perhaps, is make the SID detune a function of the global detune, that way you could control it from the -detune option?
Andrew, I think you have found more bugs and I am happy to fix them.
“A_440 tuning is out: what is your samplerate - is it 44.1Hz? Are you using jack? Jack will typically default to 48kHz, bristol will default to 44.1kHz - that tuning value you have may be a direct result of a mismatch?”
Perhaps there may be a bit of upsampling here.. JACK is indeed running at 48hz, and I never changed the samplerate on start up.. so bristol probably is defaulting to 44.1hz..
“Did you make sure that the Transpose control was correct - this has 24 whole note steps and you may be a single step out. “
Yes, I'm absolutely sure that the Transpose is correct. If you listen to the mp3 I posted, I play several A3s at the start on both my midi controller with the piano sample and my controller with bristol. They, in my opinion, sound in tune.
Also, about the phasing, never mind about it, it was just speculation on my part.
Here's a recording of the piano, sidney and the mini moog A concert pitch tone (all are at 48hz)
and yes, the sidney is using the same patch in that picture I posted.
I'm pretty certain this is a bug, not user error on my part. :-)
I have put in code that ties the chip detune to the -detune parameter, it will be in the next release. The phasing you heard was real and you will be able avoid or reduce it with -detune. A value of about 200 will give you the same results as you now here, a value of 0 will naturally put everything (ie, all waveforms in Multi mode) in tune.
Do you get this message at line 5 of the output when you start bristol?
Fixing samplerate at 48000
Actually, forget that, let me review your patch and a couple of different emulators and get a fix put in to the code.
Yeah Nick, actually, I like the current detune in multi mode, and, as you hear, it works fine with other instruments. I don't really see much of a reason to tie the chip detune to the global -detune parameter.
The main problem, imo was the fact that the oscillators are out of tune.
Agreed, they are out of tune just as you explained. Am looking into why just now - just heard the difference. Will work on fix.
The link between global detune and SID detune is already done, it was a good idea and not hard to code. This detune is not actually global - it is per emulation so you can specify a different one per synth that you start.
Hmm, I'm not sure I personally agree with having the detune with 'multi' as a startup option y'know? It, (In My Humble Opinion) kind of ruins the tweakability of the synth (or any of the synths), you know?
Like, while this might be a good idea to do this, I think it'd be a bit limiting if I wanted to change the detune of the oscillators, I'd have to stop the synth and then restart it again with a different -detune option....
But, this is entirely your call, you are the dev of this project.
I just spent hours and hours checking my code, its frequency tables, mods, pitch shift, all correct. Checked through the chip code, how it applies its frequencies, how they were getting passed, again all seemed correct.
This SID project continues to amaze me. I eventually spent some time downloading the original manual pages again and came across some insight into the problem: There were two different C64, one was for the US with NTSC video scanning, the other for Europe with PAL and they had a different CPU clock rate. The SID chip was clocked from the CPU and the frequency tables I had were for the PAL version, not the NTCS version but for whatever reason the frequency reference I had was for the other model - the figure came from the same manual pages though. Wild. The nice thing about it was that the chip emulator was correct but it was being softclocked at the wrong rate. It's fixed now, will be in the next release unless you want the header file early.
Regarding detune, if you want to hear something close to the original then do not use Multi - this is purely bristol specific. The original did not have this capability, I put it in there because it is fun to do this stuff. So it it a bit like this: if you only want SID then do not use multi. If you want the benefit of extra audio width then use multi but accept that the variable can only be controlled in sidney using the -detune option. The next synth will let you configure this yourself, but not sidney.
Andrew, keep the suggestion coming in, keep the bug reports coming in.
Won't the -detune option work on the oscillators with and without the Multi option on? Or have you edited the code so that the -detune option only works on 'multi'?
How does 'multi''s sound compare to multi off if there is no detune?
But while I'm at it, by how many cents did you detune each oscillator in 0.40.2 before correcting it? Or did you not in fact correct that, just the correct frequency tables? so A3 is indeed at concert pitch?
I suppose what I'm asking is, was the out of tune oscillators present in 0.40.2 a result of the wrong freqency tables? Or as a result of the auto-detuning between the oscillators with 'multi' on? I should've checked whether the oscillators were out of tune without 'multi' on.
Apologies for fighting over this issue of "I want de-tuned oscillators with 'multi' on as default!!11!ELEVENTY-ONE". But I'll just accept it. :-)
No hard feelings,
Would you mind sending me the header file that corrects the frequency table mismatch? I just tried comparing my piano samples to the SIDney, and yes, there seems to be a smaller amount of out-of-tune oscillators as well (though not as large with 'multi' on).
This is rather a long response but you have a lot of relevant questions:
Forget Multi for now - you have reported sidney being off true pitch:
I based the bristol softSID on a manual I downloaded from the net, it gave an equation for frequency tables that was based on a C64 with a 0.985MHz clock for the PAL (European) systems however the same manual also refers to a 1.02MHz system clock, actually from the NTSC (US) systems, and when mixing these two I used frequency tables that move the oscillators forward too quickly - you had to adjust the voice tuning downwards to correct this.
Then I found another manual that explained the differences between the two models of the C64 and it gave another equation for generation of the frequency tables. When I applied this it was almost correct, I also had to revise the nominal clock rate to 1.023MHz (the true NTSC system clock rate) to get perfect pitch with the Mini A-440 switch - it now has absolutely no audible phasing or beating so is within 1 cent of A-440. It was probably about 30 cents out before this change. This had nothing at all to do with the detune from Multi although if you read the rest of this mail it could seem to be related.
Ok, the other side of the story, Multi and detune:
If you DEselected Multi, ie, with the LED off then the following happens with 0.40.2: The softSID will evaluate one frequency using phase accumulation which generates a Ramp wave. This was out of tune due to the CPU speed mismatch. It would then extract a Square and Tri wave from the Ramp so all would be the same amount out of tune but would be totally in tune to themselves as they come from the same phase accumulation.
If you enable Multi then the bristol softSID will evaluate a separate phase accumulation for each of the waveforms for each voice. They are totally unrelated, and the frequency of each phase accumulation is a little different, about +20 cents for the Square wave and +40 cents for the Tri (this has now also changed to square being plus and tri being minus 20 cents, this way it will not sound either sharp or flat). Now if you select Multi, and tuned the sidney Tri wave to the Mini A-440 as you did in your patch, and then select the SID Square wave it will sound differently out of tune to A-440 concert pitch - that is how it works.
Finally, a third point, the -detune parameter:
The emulator detune parameter up until now only works with the MIDI tables for that synth and introduces a small degree of randomness to emulate temperature sensitivity of the old analogue oscillators. SID does not use the MIDI tables, it has its own mappings, so the option does not apply for the 0.40.2 softSID and that is correct, the SID did not have temperature sensitivity, its oscillators were purely digital. The code I now have (0.40.3) will configure a phasing detune to the oscillators in Multi ON only, it is configurable from the -detune option, ie, I link it through the MIDI access to the softSID. The default value will remain at 20 cents but you can change it with -detune. Also, it is not random, it is a fixed value to introduce a defined phasing effect, not to emulate temperature sensitivity.
So, in my current 0.40.3, without Multi then all the waveforms are 'pitch perfect' and all in exact phase. You need to listen to the difference: with Multi on AND multiple waveforms selected you will hear the sound start to move a little as they go in and out of phase. With Multi OFF you will hear the origin SID waveforms which are all extractions of the Ramp wave, exact same frequency, exact same phase. With 0.40.3 and '-detune 0' you will have the sounds in phase however it will not sound the same as not using multi since the waveforms are still generated separately and mixed differently: the SID used an AND function to mix the waves - the bristol softSID does this too, but not with Multi enabled, when you enable Multi it uses a summing function like a mixer, not an ANDing function.
I Hope that helps. I will try and get you an email with the files you need to test this. If you use them then keep a backup of the ones from 0.40.2, just in case you have compilation issues.
Kind regards, Nick.
"Now if you select Multi, and tuned the sidney Tri wave to the Mini A-440 as you did in your patch, and then select the SID Square wave it will sound differently out of tune to A-440 concert pitch - that is how it works."
Yes, this does make sense.
"If you DEselected Multi, ie, with the LED off then the following happens with 0.40.2: The softSID will evaluate one frequency using phase accumulation which generates a Ramp wave. This was out of tune due to the CPU speed mismatch. It would then extract a Square and Tri wave from the Ramp so all would be the same amount out of tune but would be totally in tune to themselves as they come from the same phase accumulation.
If you enable Multi then the bristol softSID will evaluate a separate phase accumulation for each of the waveforms for each voice. They are totally unrelated, and the frequency of each phase accumulation is a little different, about +20 cents for the Square wave and +40 cents for the Tri (this has now also changed to square being plus and tri being minus 20 cents, this way it will not sound either sharp or flat). Now if you select Multi, and tuned the sidney Tri wave to the Mini A-440 as you did in your patch, and then select the SID Square wave it will sound differently out of tune to A-440 concert pitch - that is how it works. "
But how could I have got the pitches tuned to A-440 if they were about -20 and +40 cents out ol tune with multi selected? Or is it that I did get close, but because of the multi auto detune, I was a few tens of cents out?
Thanks a lot for explaining all of that to me! I learn something new every day!
I'll make sure to back up my files before compiling the files.
"But how could I have got the pitches tuned to A-440 if they were about -20 and +40 cents out of tune with multi selected? Or is it that I did get close, but because of the multi auto detune, I was a few tens of cents out?"
Exactly right. What you would have found is that just one of the waveforms would have been in tune with A-440, the other would have been a few cents out but would just have caused phasing rather than real discordance. Let me try and get you those files by email, I am interested for you to test them for accuracy and see what you think of the detune now.
Cool Nick, I got your e-mail and I'll try out those files when I get a chance, either later to-night or probably tommorrow...
Also, I found the comments in the source code quite useful and interesting!
Let me know how you get on. When comparing frequencies between Multi, no Multi, etc, and A-440 then use the SID Ramp as the reference. It is the only waveform that should be in tune all the time, ie, it should only vary according to the Tune control (well, and transpose and mods I admit). All I mean to say is Ramp should be the same with and without Multi.
From what I've tested so far, the SIDney ramp is in tune with A-440 in with multi and without multi. The waveforms triangle and pulse waveforms detune nicely with multi on.
In this I start with multi off and then cycle through the waveforms etc etc.
That is good, that was the goal of the fix I made for you. I think that your code will not work with '-detune 0' - that would need yet another file that I did not copy you so for now trust me, it works here setting all three waves to A-440 and it will be in the next release.
Kind regards, Nick
Cool. I was wondering to myself, "hmm, wouldn't I also need include/bristol/bristolsid1.c"? That doesn't appear to be the case. :-)
Yeah, quite right - this is the code that binds the GUI commands through to the softSID. Let me send you a copy, the next release is probably still a while off.
Got your e-mail, but is this strictly necessary for the sidney tuning bug?
Log in to post a comment.