Hi
I have some newbie questions about Pd. I wanted to write a Patch
which is based on this one (maybe):
http://puredata.hurleur.com/sujet-643-sample-player
The mentioned Sample Player has 2 Sliders which control the Start-/
End-Loop position which is the exact thing what i was looking for.
What i want to do:
I want to make a patch, a sample player. When i press a button i want
to loop the actual sample position according to the key i have pressed.
I give you an example. I load a loop which is 120 BPM fast. I set
somewhere my tempo. When i press "a" it starts looping 1/4th at the
actual play position.
For this sort of thing. The Sample Player seems to be perfect. But
now there are the difficulties.
tempo for any note length.
like.
I know...dumb question you know too. But maybe there is someone who
knows an answer.
Many, many thanks.
–––––––––––––––––––
Zeitler Andreas
Hallo, Zeitler Andreas hat gesagt: // Zeitler Andreas wrote:
I have some newbie questions about Pd. I wanted to write a Patch
which is based on this one (maybe): http://puredata.hurleur.com/sujet-643-sample-player The mentioned Sample Player has 2 Sliders which control the Start-/ End-Loop position which is the exact thing what i was looking for.
Attached is a slightly different sampler, actually not a sampler itself, but a tutorial on how to build your own sampler.
What i want to do: I want to make a patch, a sample player. When i press a button i want
to loop the actual sample position according to the key i have pressed.I give you an example. I load a loop which is 120 BPM fast. I set
somewhere my tempo. When i press "a" it starts looping 1/4th at the
actual play position.For this sort of thing. The Sample Player seems to be perfect. But
now there are the difficulties.
- How can i set the tempo right? I figured out how to calculate the
tempo for any note length.
If you work through attached tutorial, maybe some of the neccessary calculations (as: duration(smps) => duration(msec) etc.) become clearer.
- How can i get my keyboard entries into the software?
Use the [keyname] or [key] objects.
- And lust but not least. How can i get the Patch to act how i would
like.
Just build it! If you get stuck, try to make a patch that illustrates where you got stuck and send it here.
You may want to start with empty subpatches, that divide your problem/approach into smaller problems/steps. Like first do a completely empty patch and put some empty subpatches in there:
[pd load_file]
[pd get_duration_in_msec]
[pd convert_duration_to_BPM]
[pd get_keypresses]
[pd play_sample]
or similar. Then give your subpatches inlets and outlets and connect them in order. And last fill in these subpatches with the real patches one by one, always checking if every subpatch does what it should do.
I know...dumb question you know too.
It's not a dumb question at all. While playing samples isn't exactly magic, it's also not trivial to do, especially for the first time.
Frank Barknecht _ ______footils.org_ __goto10.org__
If you're just getting started with Pd, it might be a good idea to use the [susloop~] external because it also allows for dynamic pitch shift, the math for which can be tricky (though apparently someone just got it down on their own recently if I recall from a previous post). Are you using Pd-extended? It has this object included by default in the bsaylor library. Look into the documentation, it's a really handy one, I have attached my GUI for it which you can use by putting the attached file into your "extra" directory and then typing "susloopgui~" to create the object.
As for intervals like 1/4, etc... use [key] or [keyname]. [key] will give you the numeric keycode for a keyboard press; using [sel] you can then do the appropriate math based on which key is pressed. Again I don't know how new you are to pd, but proficiency with sends and receives, hot and cold inlets using trigger, etc will be really helpful in getting all to work properly as far as the math goes.
For setting tempo, you will need to calculate the total length of the sample and divide it accordingly. With susloop~ you give it a beginning and end point in samples (as in the actual pieces of data, not soundfiles), so you could say that a quarternote at 120 BPM with a samplerate of 44100 samples per second would be 22050 samples long, right? Thus an eighth note is 11025, and so on with division.
The attached gui has the sliders implemented. I hope that this helps a little bit!
Good luck, Kevin
On 5/28/07, Zeitler Andreas azeitler@zettt.de wrote:
Hi
I have some newbie questions about Pd. I wanted to write a Patch which is based on this one (maybe): http://puredata.hurleur.com/sujet-643-sample-player The mentioned Sample Player has 2 Sliders which control the Start-/ End-Loop position which is the exact thing what i was looking for.
What i want to do: I want to make a patch, a sample player. When i press a button i want to loop the actual sample position according to the key i have pressed.
I give you an example. I load a loop which is 120 BPM fast. I set somewhere my tempo. When i press "a" it starts looping 1/4th at the actual play position.
For this sort of thing. The Sample Player seems to be perfect. But now there are the difficulties.
- How can i set the tempo right? I figured out how to calculate the
tempo for any note length.
- How can i get my keyboard entries into the software?
- And lust but not least. How can i get the Patch to act how i would
like.
I know...dumb question you know too. But maybe there is someone who knows an answer.
Many, many thanks.
–––––––––––––––––––
Zeitler Andreas
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list