Greetings All
I have 2 large equations that I would like to use with the expr command. Is it possible to import a text file into the expr command? Here's an example of one of the 2 equations http://dl.dropbox.com/u/6576402/questions/eq1.txt Basically it's a 1 second periodic signal with sample rate at 44100 which the equation gives me control over the frequency,amplitude,phase and vertical offset
I do have the ability to create a wave (audio) file of the equation first and import the wave file into PureDate, but will I have the same control over the frequency,amplitude,phase and vertical offset that the equation gives me?.
If you want to know what I'm creating.
control the variables of the equations that will vary frequency,amplitude,phase and vertical offset over time. 2) The second option will allow the variables to be controllable/variable using a midi controller and it's audio signal played
I know Puredata can do this very well with small equations and the expr command but using large equations I'm not sure. Also if I should be doing this in a different way please let me know I'm always willing to learn something new.
A .pd file is a text file, so you can just open your Pd patch in a
text editor, and paste in the equation. But honestly with something
that big, I think making a C external might be easier in the long run.
.hc
On Sep 4, 2011, at 9:22 AM, Rick T wrote:
Greetings All
I have 2 large equations that I would like to use with the expr
command. Is it possible to import a text file into the expr command? Here's an example of one of the 2 equations http://dl.dropbox.com/u/6576402/questions/eq1.txt Basically it's a 1 second periodic signal with sample rate at 44100
which the equation gives me control over the
frequency,amplitude,phase and vertical offsetI do have the ability to create a wave (audio) file of the equation
first and import the wave file into PureDate, but will I have the
same control over the frequency,amplitude,phase and vertical offset
that the equation gives me?.If you want to know what I'm creating.
- The first option will import a text file into a table/array that
will control the variables of the equations that will vary
frequency,amplitude,phase and vertical offset over time. 2) The second option will allow the variables to be controllable/ variable using a midi controller and it's audio signal playedI know Puredata can do this very well with small equations and the
expr command but using large equations I'm not sure. Also if I
should be doing this in a different way please let me know I'm
always willing to learn something new.Thanks
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
If nature has made any one thing less susceptible than all others of
exclusive property, it is the action of the thinking power called an
idea, which an individual may exclusively possess as long as he keeps
it to himself; but the moment it is divulged, it forces itself into
the possession of everyone, and the receiver cannot dispossess himself
of it. - Thomas Jefferson
Hi Rick,
As per the olde Dorset saying, to strangers seeking directions...
"You dont want to go from here"
Looks like a mistake of exchanging computational space for data space. In other words, probably the program used to generate this text file file is closer to what you actually should do (some kind of convolution is it?)
You have a sum of some amplitude offset, times some tabulated value, times alternately sin or cos terms, times some ratios of the sample number.
Only the table values really need dealing with.
modulo two will give you either 0 or 1 to determine whether to choose sin() or cos(), or better, multiply that by pi/2 and incorporate it into the trig term as cos(x) = sin(pi/2 -x)
The sample number is an int that keeps increasing by one and everything else is constant.
[until] can be used to construct an iteration, and an integration (running sum) can be done using the accumulator idiom.
On Sun, 4 Sep 2011 11:35:39 -0400 Hans-Christoph Steiner hans@at.or.at wrote:
A .pd file is a text file, so you can just open your Pd patch in a
text editor, and paste in the equation. But honestly with something
that big, I think making a C external might be easier in the long run..hc
On Sep 4, 2011, at 9:22 AM, Rick T wrote:
Greetings All
I have 2 large equations that I would like to use with the expr
command. Is it possible to import a text file into the expr command? Here's an example of one of the 2 equations http://dl.dropbox.com/u/6576402/questions/eq1.txt Basically it's a 1 second periodic signal with sample rate at 44100
which the equation gives me control over the
frequency,amplitude,phase and vertical offsetI do have the ability to create a wave (audio) file of the equation
first and import the wave file into PureDate, but will I have the
same control over the frequency,amplitude,phase and vertical offset
that the equation gives me?.If you want to know what I'm creating.
- The first option will import a text file into a table/array that
will control the variables of the equations that will vary
frequency,amplitude,phase and vertical offset over time. 2) The second option will allow the variables to be controllable/ variable using a midi controller and it's audio signal playedI know Puredata can do this very well with small equations and the
expr command but using large equations I'm not sure. Also if I
should be doing this in a different way please let me know I'm
always willing to learn something new.Thanks
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
If nature has made any one thing less susceptible than all others of
exclusive property, it is the action of the thinking power called an
idea, which an individual may exclusively possess as long as he keeps
it to himself; but the moment it is divulged, it forces itself into
the possession of everyone, and the receiver cannot dispossess himself
of it. - Thomas Jefferson
Thanks for the information. I've been able to find instructions on how to create a hello world C-external but not one that does a simple sinewave equation like A*sin(w*t+p) ( https://secure.wikimedia.org/wikipedia/en/wiki/Sine_wave) Does anyone have one or know where to find one. It makes sense to make a C external and create inputs for the values of frequency,amplitude,phase and vertical offset. That way I can feed/control those values with a midi controller or a table/array in PureData.
Thanks
On Sun, Sep 4, 2011 at 5:35 AM, Hans-Christoph Steiner hans@at.or.atwrote:
A .pd file is a text file, so you can just open your Pd patch in a text editor, and paste in the equation. But honestly with something that big, I think making a C external might be easier in the long run.
.hc
On Sep 4, 2011, at 9:22 AM, Rick T wrote:
Greetings All
I have 2 large equations that I would like to use with the expr command. Is it possible to import a text file into the expr command? Here's an example of one of the 2 equations http://dl.dropbox.com/u/6576402/questions/eq1.txt Basically it's a 1 second periodic signal with sample rate at 44100 which the equation gives me control over the frequency,amplitude,phase and vertical offset
I do have the ability to create a wave (audio) file of the equation first and import the wave file into PureDate, but will I have the same control over the frequency,amplitude,phase and vertical offset that the equation gives me?.
If you want to know what I'm creating.
- The first option will import a text file into a table/array that will
control the variables of the equations that will vary frequency,amplitude,phase and vertical offset over time. 2) The second option will allow the variables to be controllable/variable using a midi controller and it's audio signal played
I know Puredata can do this very well with small equations and the expr command but using large equations I'm not sure. Also if I should be doing this in a different way please let me know I'm always willing to learn something new.
Thanks
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of everyone, and the receiver cannot dispossess himself of it. - Thomas Jefferson
Actually, now I spotted this part.....
I do have the ability to create a wave (audio) file of the equation first and import the wave file into PureDate, but will I have the same control over the frequency,amplitude,phase and vertical offset that the equation gives me?.
Why not import the wave into a table, scan the oscillator with a phasor and add a frequency, amplitude or phase shift in the signal domain?
If that's what you really want to do it's _much_ easier than you might think.
(frequency) | [phasor~] | [+~]-(phase shift) | [*~]-(size of table) | [tabread~ table] | [+~]-(amplitude offset) | (output)
On Sun, 4 Sep 2011, Rick T wrote:
I have 2 large equations that I would like to use with the expr command. Is it possible to import a text file into the expr command? Here's an example of one of the 2 equations http://dl.dropbox.com/u/6576402/questions/eq1.txt
You don't use [expr~] for this, you use [fft~] instead, or similar.
| Mathieu Bouchard ---- tél: +1.514.383.3801 ---- Villeray, Montréal, QC