64k synths
category: music [glöplog]
Actually i would just copy the lfo trig functionality from Elektron Monomachine.
It's quite ingenious.
TRIG (trig mode) is an important parameter for getting the most out of the LFO's. The trig modes are described in the list below, and their function is visualised in combination with the waveforms in Figure 3 on page 32.
• FREE = The LFO is running continuously, never restarting or stopping.
• TRIG = The waveform is restarted for each LFO-trig, and then runs continuously.
• HOLD = The waveform is running free in the background, but the output LFO level is latched for each LFO-trig and held still until the next LFO-trig.
• ONE = The waveform is restarted for each LFO-trig, then runs for one cycle and finally stops and holds the last LFO level.
• HALF = The waveform is restarted for each LFO-trig, then runs for one half cycle and finally stops and holds the last LFO level.
http://www.muzbar.ru/images/ArticleFiles/3007/3007_monomachine_manual_OS1.32.pdf
(Page 35)
It's quite ingenious.
TRIG (trig mode) is an important parameter for getting the most out of the LFO's. The trig modes are described in the list below, and their function is visualised in combination with the waveforms in Figure 3 on page 32.
• FREE = The LFO is running continuously, never restarting or stopping.
• TRIG = The waveform is restarted for each LFO-trig, and then runs continuously.
• HOLD = The waveform is running free in the background, but the output LFO level is latched for each LFO-trig and held still until the next LFO-trig.
• ONE = The waveform is restarted for each LFO-trig, then runs for one cycle and finally stops and holds the last LFO level.
• HALF = The waveform is restarted for each LFO-trig, then runs for one half cycle and finally stops and holds the last LFO level.
http://www.muzbar.ru/images/ArticleFiles/3007/3007_monomachine_manual_OS1.32.pdf
(Page 35)
sample-and-hold LFOs are teh awesome
Quote:
Have to admit I don't know what pitched noise is.
I dont know what exactly the c64 does, but i use a sample and hold on a random value based on the note frequency
init:
hold = frand()
tick:
phase += frequency
if (phase > 1)
hold = frand()
phase -= floor(phase)
out = hold
My LFOs already do those modes, free run, one shot, retrigger, and with a sample and hold mode.
So basically I use a sample and hold LFO but run it in the audible frequency range and that gives "pitched noise"? Like the code is already there just that the LFO's are capped at 50hz maximum freq so I set one up to run up to 20k Hz and thats done.
So basically I use a sample and hold LFO but run it in the audible frequency range and that gives "pitched noise"? Like the code is already there just that the LFO's are capped at 50hz maximum freq so I set one up to run up to 20k Hz and thats done.
drift: Like that, yeah. Just beware that S&H tends to get dirty/alias quite badly if you only do it per-sample and crank up the rate to the kilohertz range. Simple linear "interpolation" as in splitting the sample in before/after-S&H parts already does wonders there, and so does pre-filtering the carrier signal. Really depends on the type of sound you're after.
Also, the C64 noise generator is a 23bit LFSR random generator that has a very distinct tonality to it. Don't worry if you don't get that sound with white noise and S&H. If you really want t go that route, check the reSID source code, it's one of the best documented pieces of code I've ever read :)
Adding a simple 1-pole filter to your noise generators and make it adjustable is a good idea, too. Did that in V2 because I had a "pitch" and "color" parameter anyway that the noise gen didn't use, and it helped a lot.
Also, the C64 noise generator is a 23bit LFSR random generator that has a very distinct tonality to it. Don't worry if you don't get that sound with white noise and S&H. If you really want t go that route, check the reSID source code, it's one of the best documented pieces of code I've ever read :)
Adding a simple 1-pole filter to your noise generators and make it adjustable is a good idea, too. Did that in V2 because I had a "pitch" and "color" parameter anyway that the noise gen didn't use, and it helped a lot.
Quote:
My LFOs already do those modes, free run, one shot, retrigger, and with a sample and hold mode.
Great.
One thing popped to mind. There are Rnd1 and Rnd2 modifiers in Logic's ES2 synth.
Like lfo's which are hardwired to Rnd Hold.
Very useful.
Thanks EVERYONE for all the advice. I have made quite a lot of improvements already. Added basic FM with osc2 driving osc1 which has made it easier to make good percussion sounds. Also fixed an awesome bug with the mod matrix which was causing the poor performance. Turns out accidentally calling the entire mod matrix function twice per sample isn't very good idea.
The pitched noise worked out very well and was easy to do, does sound quite c64-ish, well not exactly the same but similar. Sounds great at low frequencies. Just thinking about this Kebby:
Ok so I am aware these noise signals are going to alias like crazy but I just kinda thought that with noise it wouldn't matter since it is part of the character of the noise sound.
But when you say linear interp you mean like this? Excuse my awesome paint image but I find it easier to visualise waveforms. Black line is my sample and hold signal, red is the the interpolated signal. This is what you mean?
Or a sharper ramp just at the discontinuities? I am trying to imagine how this works at sample rate frequencies. Because I don't want to have any high frequency rolloff which you get with most antialiasing solutions.
The pitched noise worked out very well and was easy to do, does sound quite c64-ish, well not exactly the same but similar. Sounds great at low frequencies. Just thinking about this Kebby:
Quote:
drift: Like that, yeah. Just beware that S&H tends to get dirty/alias quite badly if you only do it per-sample and crank up the rate to the kilohertz range. Simple linear "interpolation" as in splitting the sample in before/after-S&H parts already does wonders there, and so does pre-filtering the carrier signal. Really depends on the type of sound you're after.
Ok so I am aware these noise signals are going to alias like crazy but I just kinda thought that with noise it wouldn't matter since it is part of the character of the noise sound.
But when you say linear interp you mean like this? Excuse my awesome paint image but I find it easier to visualise waveforms. Black line is my sample and hold signal, red is the the interpolated signal. This is what you mean?
Or a sharper ramp just at the discontinuities? I am trying to imagine how this works at sample rate frequencies. Because I don't want to have any high frequency rolloff which you get with most antialiasing solutions.
I actually use cosine interpolation instead of linear interpolation for this.
The interpolation range can be adjusted from 0 (as in no interpolation) to the number of samples at the current frequency.
That way i can have it dirty or variable smoothed noise according to a parameter. It is not the same as a real filtered signal though.
The interpolation range can be adjusted from 0 (as in no interpolation) to the number of samples at the current frequency.
That way i can have it dirty or variable smoothed noise according to a parameter. It is not the same as a real filtered signal though.
Quote:
I actually use cosine interpolation instead of linear interpolation for this.
The interpolation range can be adjusted from 0 (as in no interpolation) to the number of samples at the current frequency.
That way i can have it dirty or variable smoothed noise according to a parameter. It is not the same as a real filtered signal though.
That sounds like a good method, will try and implement that myself.
drift: what I meant is that the S&H sample points don't necessarily align with your sample boundaries. Let's say we're running at 48KHz, start at sample 0, and set S&H frequency to 15KHz - the next S&H point will at sample 3.2 from here (no time to draw a fancy mspaint picture for that, sorry :).This means:
a) you'll need to sample the incoming signal at position 3.2 - so the usual precautions about resampling apply. Linear interpolation is already better, and of course you can go to full pre-filtered sinc() from here but in reality it probably makes it sound boring if you get too good at this.
b) it also means that the "jump" in the output signal occurs between two samples - you can of course output the old value at 3 and the new one at 4 but at these high frequencies it actually matters that the actual point was at 3.2. Again, simple linear interpolation (aka out[4]=0.2*old+0.8*new in this case) is pretty good at reducing the worst dirt, and again feel free to go nuts.
What you and gopher understood is actually another thing (personally I very much prefer that S&H gives you a stairstepped signal full of high frequencies), so you can do that on top. That adjustable cosine interpolation sounds like a good idea in fact. :)
a) you'll need to sample the incoming signal at position 3.2 - so the usual precautions about resampling apply. Linear interpolation is already better, and of course you can go to full pre-filtered sinc() from here but in reality it probably makes it sound boring if you get too good at this.
b) it also means that the "jump" in the output signal occurs between two samples - you can of course output the old value at 3 and the new one at 4 but at these high frequencies it actually matters that the actual point was at 3.2. Again, simple linear interpolation (aka out[4]=0.2*old+0.8*new in this case) is pretty good at reducing the worst dirt, and again feel free to go nuts.
What you and gopher understood is actually another thing (personally I very much prefer that S&H gives you a stairstepped signal full of high frequencies), so you can do that on top. That adjustable cosine interpolation sounds like a good idea in fact. :)
kb: understood, makes perfect sense now. Thanks for clarifying. Yeah I want the noise to be crunchy, definitely not going to go nuts trying to perfectly antialias it.
gopher: thanks once again for sharing your advice, it's a great idea having a variable interp.
Best thread ever. Well it is for me at least. So much help and advice/tips in a couple of pages right here.
gopher: thanks once again for sharing your advice, it's a great idea having a variable interp.
Best thread ever. Well it is for me at least. So much help and advice/tips in a couple of pages right here.
Quote:
You "owe" us all great 64k soundtracks. That's the hard part :D
:)
trc_wm: where can I find an email or some contact info to write to you?
sofascener@gmail.com should do it!
Ooh, FM Synthesis is easier than I thought.
Soundcloud example
Am I doing it wrong when I just modulate the phase of the carrier signal, instead of the frequency ?
(heard the dx7 does it that way)
Soundcloud example
Am I doing it wrong when I just modulate the phase of the carrier signal, instead of the frequency ?
(heard the dx7 does it that way)
yup, DX7 "FM" is actually phase modulation.
I think that's how most people do that, so it's fine. There's also a nice rant by iq about this subject!
Note that "phase distortion synthesis" is a third technique that's totally cheating but still manages to sound nice.
Note that "phase distortion synthesis" is a third technique that's totally cheating but still manages to sound nice.
Clinkster does the same thing. It sounds like crap if you don't oversample it, but with 4x oversampling (and properly filtered downsampling) it works quite nicely. :)