[music-dsp] Sliding frequency notes
alan.wolfe at gmail.com
Thu Sep 16 15:02:19 EDT 2010
Sorry... besides time they do take frequency and samplerate as well (and volume)
What you are saying makes sense. I basically want to know the
previous state without having to store it.
I have a feeling there must be a clever way to get this to work but
it's going to have to simmer in my head for a while :P
On Thu, Sep 16, 2010 at 11:54 AM, robert bristow-johnson
<rbj at audioimagination.com> wrote:
> On Sep 16, 2010, at 2:40 PM, Alan Wolfe wrote:
>> In the above it seems that for each frame you add to your previous
>> value to get the current value.
> specifically the phase value.
>> For my tone generators, i needed them to be "stateless" in that given
>> only a point in time they could give back the appropriate sample
>> without having to know about any previous state.
> so then, your tone generators do not take Frequency or SampleRate as input
> parameters, correct?
>> Do you know of a reasonable way to do that and still do what i'm trying to
> in a sense, you sorta want your cake and eat it, too. :-)
> *especially* if frequency varies, you cannot decouple the operating
> frequency and time inputs to your tone generator. if Frequency were fixed
> and known, then your tone generator can be a simple sin() function lookup
> (where internally, it might be wrapping phase so that a lookup table of one
> cycle is all that is necessary). but if you have varying frequency, you
> have to integrate frequency w.r.t. time to get phase. you can just scale it
> and multiply (like it appears that you were doing), but the instantaneous
> frequency comes wrong.
> r b-j rbj at audioimagination.com
> "Imagination is more important than knowledge."
> dupswapdrop -- the music-dsp mailing list and website:
> subscription info, FAQ, source code archive, list archive, book reviews, dsp
More information about the music-dsp