Funtion tables parameter morphing
Date | 2007-07-31 14:16 |
From | ad80a |
Subject | Funtion tables parameter morphing |
There is the possibility with csound to put k or a VARIABLES in function generators? I'm tryng to do some table morphing with ftmorf or tabmorph, but I see that actually with these opcodes it's a linear CROSSFADING between tables... I think it would be nice to morph PARAMETERS of function, rather than function themselves...an example: to change the lengt of segment in a GEN7 function like -1 4096 1 4096 -1 putting a variable -1, klengt, 1, klengt1, -1 will generate a changing SHAPE of the triangle waveform and non-linear distortion like pulsewidth etc, obtaining with klengt=0 klengt1=8192 a saw wave...the same with exponential curves or even better with polynominals (changing coefficients)... I suppose this is possible via waveshaping with table family opcodes, but to obtain an effect like the example will be little tricky I think...specially changing the shape at control or audio rate... Some suggestions? Thank you -- View this message in context: http://www.nabble.com/Funtion-tables-parameter-morphing-tf4192892.html#a11923794 Sent from the Csound - General mailing list archive at Nabble.com. |
Date | 2007-08-01 18:27 |
From | Anthony Kozar |
Subject | Re: Funtion tables parameter morphing |
I am not sure if it is possible to do this with the current set of opcodes. ftgen only works with i-rate parameters. You can modify tables at k-rate using the Vectorial family of opcodes, but I am not aware of a way to use a GEN function at k-rate. This is probably not the right approach for creating dynamic spectra signals anyways. Changing a table at k-rate may introduce discontinuities in the signal. Effects like pulsewidth can be acheived with other specialized opcodes. Try looking at vco anc vco2 for example. Other good dynamic spectrum techniques include waveshaping (as you anticipated), FM, and discrete summation formulae (see the buzz and gbuzz opcodes). Anthony Kozar anthonykozar AT sbcglobal DOT net http://anthonykozar.net/ ad80a wrote on 7/31/07 9:16 AM: > > There is the possibility with csound to put k or a VARIABLES in function > generators? I'm tryng to do some table morphing with ftmorf or tabmorph, but > I see that actually with these opcodes it's a linear CROSSFADING between > tables... I think it would be nice to morph PARAMETERS of function, rather > than function themselves...an example: to change the lengt of segment in a > GEN7 function like -1 4096 1 4096 -1 putting a variable -1, klengt, 1, > klengt1, -1 will generate a changing SHAPE of the triangle waveform and > non-linear distortion like pulsewidth etc, obtaining with klengt=0 > klengt1=8192 a saw wave...the same with exponential curves or even better > with polynominals (changing coefficients)... > I suppose this is possible via waveshaping with table family opcodes, but to > obtain an effect like the example will be little tricky I think...specially > changing the shape at control or audio rate... > Some suggestions? > Thank you |
Date | 2007-08-01 19:21 |
From | Greg Thompson |
Subject | API MIDI functions |
I'm interested in passing MIDI events via the API I assume I use the following callbacks to do this. csoundSetExternalMidiInOpenCallback(instance->csound, midiInOpen); csoundSetExternalMidiReadCallback(instance->csound, midiInRead); csoundSetExternalMidiInCloseCallback(instance->csound, midiInClose); int midiInOpen(CSOUND *csound, void **userData, const char *devName) { printf("midiInOpen\n"); return 0; } int midiInRead(CSOUND *csound, void *userData, unsigned char *buf, int nBytes) { printf("midiInRead\n"); return 0; } int midiInClose(CSOUND *csound, void *userData) { printf("midiInClose\n"); return 0; } I've snooped around and found the pmidi.c file which provides a reasonable example of how to use them. What I'm wondering is how do I get the API to use my callback functions. So far I can't get any of those functions to be called by Csound. I thought it was controlled by the command line ... but I'm not sure exactly how it should be done: -+rtmidi=null -M0 ?? Any guidance here would be appreciated. thanks greg |