[sdiy] audio effects in C??
Dan Snazelle
subjectivity at hotmail.com
Sat Feb 18 00:26:33 CET 2012
These ideas all help!! Inspiring ideas on a friday night!!! Woo hoo
Dan
Sent from my iPhone
On Feb 17, 2012, at 5:51 PM, Tom Wiltshire <tom at electricdruid.net> wrote:
> Dan,
>
> Let me check I understand what you're asking...you've got something like this:
>
> inputValue = getInput();
> outputValue = someFunction(inputValue);
> dacOutput(outputValue);
>
> And you're wondering what might be fun to put in someFunction(), right?
>
> You could try experimenting with different waveshaping curves. Set up a table which gives you an arbitrary output value for each input value. Fill it with values. Off you go!
> Try some distortion curves (tube-like soft distortion stuff like tanh, hard edged distortion, etc etc - and don't forget to add a DC offset to the curve!), try some quadratic/cube functions (ax^2+bx+c and such like), try some functions made of sums of sines or cosines (sin(ax)+0.5sin(bx)+0.5cos(cx) etc etc) and see what you get coming out. It won't be what you put in, that's for sure.
>
> Alternatively, there's a whole host of standard effects algorithms based around delays (every type of chorus, flangers, echos, ping pong, vibratos) so maybe you could try implementing a short delay line and using that. Many effects vary the length of the delay by varying the point where the sample is read out (using an LFO, say). Feedback (either positive or negative) is great with delay lines too.
>
> Hope these ideas help,
> Tom
>
>
>
>
> On 17 Feb 2012, at 20:59, dan snazelle wrote:
>
>> Ok lets say I have a program (on an Avr or pic) that has a few different variables.
>>
>> maybe one of them is a triangle. one of them is a pot value. one of them is just a random number.
>>
>>
>> the normal thing to do would be to do something like:
>>
>> analogWrite (3, outputValue)
>>
>> or
>>
>> dacOutput(outputValue)
>>
>>
>> I am wondering what i can DO to the signal in C before it gets sent out.
>>
>> I believe I can XOR it by doing this
>>
>> XORvalue=outputValue^SineValue;
>> dacOutput(XORvalue);
>>
>>
>> I know I can also multiply 2 values together.
>>
>>
>> but there must be some more interesting "FX" based on algorithms or tricks.
>>
>> anyone have any ideas? they dont't have to be pretty or entirely practical ;)
>>
>>
>>
>> thanks so much
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> Synth-diy mailing list
>> Synth-diy at dropmix.xs4all.nl
>> http://dropmix.xs4all.nl/mailman/listinfo/synth-diy
>
>
More information about the Synth-diy
mailing list