Re: [PD] Solution for deleting files via pd?

2013-01-28 Thread Sebastian Valenzuela
Thank you all so much for the great answers :)

Since I posed the question I have been working out a solution. In the
attached file I first send a message to [shell] to tell me how many files
are in the folder. Then, since all the files are named 1.wav, 2.wav,
etc., I run those numbers through a [list-drip] and tell [shell] to delete
them one at a time. It ALMOST works I think, but it has an error that says
shell: old process still running... Maybe [list-drip]'s consecutive
messages are too fast? Maybe there is no time between the  first kind of
[shell] command and the second?

Also, I'm a Macbook Pro (4 GB ram) user running 10.7.5 Lion.

I'd appreciate any help with my code. Like I said, I think I'm almost
there, maybe my code needs a little tweaking.

Thank you,
Sebastian


On Mon, Jan 28, 2013 at 7:24 AM, Lorenzo Sutton lorenzofsut...@gmail.comwrote:

 Hi.

 Just a small addition to the various answers


 On 27/01/13 22:25, Sebastian Valenzuela wrote:

 Hi list,

 My Pd patch creates and saves new audio files to a designated folder on
 my desktop. I would like to have Pd delete these files every time I open my
 patch ([loadbang]).

 I've heard the [shell] object is a possibility, but i'm not too keen on
 terminal commands or how they will pertain to [shell]...

 It would be helpful if you specified on with Operating System you are,
 because [shell] is heavily OS dependent (I'm guessing Windows, but I may be
 wrong)


 Can anyone please give me an example of a command I would send to [shell]
 to delete all files within a specified folder on my desktop? If this isn't
 the best way to do it, is there another possibility through Pd?

 A different strategy might also be to actually *not* delete files from
 within Pd, but outside, befor or after you close your patch. This is easily
 accoplished e.g. by a script.

 Also a suggestion would be to give the temporary files very eloquent names
 such as 'TEMP_FILE_TO_DELETE_0001.wav' etc. and (whichever way you decide
 to do it) delete specifically *those* files instead of e.g. the whole
 directory, so e.g. instead of:

 rm -f ./dir_to_delete/*

 something like

 rm -f ./dir_to_delete/TEMP_FILE_TO_**DELETE_*.wav'

 In my humble opinion it makes it more obvious what you want to delete, and
 (hopefully) less error/disaster prone (ok.. I've been bit by accidentally
 deleting files with no back up)

 Lorenzo.


 Thank you for your time,
 Sebastian



 __**_
 Pd-list@iem.at mailing list
 UNSUBSCRIBE and account-management - http://lists.puredata.info/**
 listinfo/pd-list http://lists.puredata.info/listinfo/pd-list



 __**_
 Pd-list@iem.at mailing list
 UNSUBSCRIBE and account-management - http://lists.puredata.info/**
 listinfo/pd-list http://lists.puredata.info/listinfo/pd-list




-- 
Sebastian Ignacio Valenzuela Rojas
Composer - Performer
svalenzuelamusic.wix.com/home
youtube.com/svalenzuelamusic http://www.youtube.com/svalenzuelamusic


clearAudioFolder.pd
Description: Binary data
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] Solution for deleting files via pd?

2013-01-27 Thread Sebastian Valenzuela
Hi list,

My Pd patch creates and saves new audio files to a designated folder on my
desktop. I would like to have Pd delete these files every time I open my
patch ([loadbang]).

I've heard the [shell] object is a possibility, but i'm not too keen on
terminal commands or how they will pertain to [shell]...

Can anyone please give me an example of a command I would send to [shell]
to delete all files within a specified folder on my desktop? If this isn't
the best way to do it, is there another possibility through Pd?

Thank you for your time,
Sebastian
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] Patch that creates messages with multiple elements?

2013-01-27 Thread Sebastian Valenzuela
Hi,

How would I go about building something that takes a number, and creates a
message with THAT many consecutive numbers in it, starting with 1?

For example: When I receive the number 7, my machine creates a message
that looks like [1 2 3 4 5 6 7(... or when I get 3 it creates [1 2 3(

I would appreciate any thoughts on this.

Thank you,
Sebastian
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] Cursor automation in pd?

2013-01-09 Thread Sebastian Valenzuela
Hi everyone,

I can't find the answer to this question anywhere. Is it possible to
automate the movement and clicks of a mouse in pure data?

Or maybe there is an easier way of doing what i'm trying to do? In my
project, I am having pd sense a google talk phone call being made to my
browser (Google Chrome). It will wait for one ring, then I'd like it to
move the mouse and accept the call on the browser. One problem I see with
this is that it might stop once it clicks out of the patch..?

I know there are other automation programs out there; I was actually
working on some code in AutoIt to accept that call. But i'd like to do it
all in pd, if possible.

Thank you for your time,
Sebastian
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] Sample a value from different sliders?

2012-12-16 Thread Sebastian Valenzuela
Hi all,

In my patch I am toggling between different sliders and changing their
values. I would like to display the value of the current slider I am
changing in a number box (Number2). Every slider's value will stay the same
when I leave it to change other sliders. I tried creating this, and i've
ALMOST got it, but the sliders change everytime I leave them :(

Can anyone take a look at my patch please? I've attached it
I would greatly appreciate any help.

Thank you for your time,
Sebastian


Changing sliders.pd
Description: Binary data
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] 2 triggers to turn on 1 trigger?

2012-12-13 Thread Sebastian Valenzuela
Hey everyone,

Simple question I guess, but i'm having trouble with it. 3 triggers... When
triggers 1 and 2 are ON, they turn ON trigger 3, but with any other
configuration of the first two triggers, the third trigger is turned OFF.
How can I do this?

Thank you in advance,
Sebastian
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] Changing the color of a trigger after clicking...?

2012-12-12 Thread Sebastian Valenzuela
Hi again,

I've seen this in code before but I can't seem to find it! I have on/off
buttons that I'd like to be RED when they're off, and GREEN when they're
on. Does this require making a button disappear  Does anyone have
experience with this?

Thank you in advance,
Sebastian
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] Text with bigger font?

2012-12-05 Thread Sebastian Valenzuela
Hi,

I'd like to title sections of my patch (ex. Reverb, Levels, etc.) in
bigger font. The only way I know to do this is by writing comments, then
increasing the font size in the edit menu... but this increases ALL font
sizes! Is there any way of creating text in my patch with bigger font
without universally affecting font size?

Thank you,
Sebastian

-- 
Sebastian Ignacio Valenzuela Rojas
Composer - Performer
svalenzuelamusic.wix.com/home
youtube.com/svalenzuelamusic http://www.youtube.com/svalenzuelamusic
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] Creating an Automatic Offset Adjuster

2012-12-02 Thread Sebastian Valenzuela
Hello,

I'm creating a patch that will adjust the volume of an incoming signal. It
is controlled by the Yaw of a wii remote connected to my laptop via
bluetooth (OSCulator app), but i've found that the data from the remote's
gyroscope is constantly changing. For example, i'll turn the remote so the
yaw turns the volume up 100%, then i'll move it around, but when I come
back to this same position the yaw/volume will be 75% up.

To fix this I've created a subpatch that stores the raw Yaw data into an
array and uses the min/max of that array to adjust the range of the yaw
data controlling the volume. The problem is that i've set the array to
write over itself after the 99th index... so the min/max values are only
stored for a few seconds before being over-written. This auto-offset
adjuster works great ONLY for those few seconds where the array isn't
over-written.

Does anyone know the best way of doing this?

I've attached the subpatch. Its hot inlet is where i send my raw gyroscope
data, the cold inlet is used to turn on/off the patch, and the outlet is
the scaled data (between 0-1) which controls volume.

Sorry for the long message, thank you for your time.
-Sebastian

-- 
Sebastian Ignacio Valenzuela Rojas
Composer - Performer
svalenzuelamusic.wix.com/home
youtube.com/svalenzuelamusic http://www.youtube.com/svalenzuelamusic


auto_offset.pd
Description: Binary data
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] 2 color questions in GEM

2012-11-26 Thread Sebastian Valenzuela
Part of the function of a patch i'm working on requires the background
color to change according to the first 8 numbers on my number pad. I've
assigned a variety of different colors to the numbers 1-8, but i'm finding
that 2 of them are yellow... when only one should be yellow and the other
orange.

I've been changing the color of [gemwin] to Orange by sending it a [color
255 165 0( message, but this still comes out as yellow. All my other colors
(blue, green, black, white, red, purple, white) work fine. Any ideas?

My second question: how do you change the color of text rendered in the
[text2d] object? Does that have to do with changing the font? Its coming up
as white, I'd just like to change it to black.

Thank you,
Sebastian
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] Highest and Lowest values of array?

2012-11-06 Thread Sebastian Valenzuela
I imagine this isn't very difficult to do, but i haven't been able to find
it anywhere. I have controller data constantly begin written (and updated)
into an array - What is the easiest way to extract the highest and lowest
numbers from this array as these two variables change?

I'm not looking for something that will constantly be giving me the value
of those variables, but, for example, something that gives me the highest
value once, and updates that number when it finds a new highest value.

Thank you pd-list!
-Sebastian
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] Binary to Decimal numbers

2012-10-17 Thread Sebastian Valenzuela
Hi all,

I have 4 toggle switches that I would like to turn on/off in order to
produce binary numbers from 0-15. I thought of using [pack] to put them all
together... but then I wouldn't know how to call on them when they are in
particular arrangements (subsequently triggering numbers). There must be an
easier way to do this..?

Thank you,
Sebastian
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] Gradually speed up sound file

2012-10-17 Thread Sebastian Valenzuela
Hi all,

I'm reading a sound file by sending a message of [848900 19000( to [line~]
which then goes to [tabread4~]. Playing it this way results in the normal
speed of this file. I'd like to start this sound file slower than normal
and linearly speed it up as it moves along. I'm totally stumped on this
one... any help would be greatly appreciated!

Thank you,
Sebastian
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] Add or subtract the number 1 from number box

2011-12-14 Thread Sebastian Valenzuela
Hi,

Fairly simple idea, but my teacher and I can't wrap our heads around it.
I'd like to change the value in a number box by pressing a button to
subtract 1 and another button to add 1 to a number.
I know i can just click and drag the number in a number box, but i'd like
the individual step-wise precision of using a button.

Any help would be appreciated!

Thank you,
Sebastian
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] [gemwin] - Storing window-shots and changing view?

2011-12-12 Thread Sebastian Valenzuela
Hi everyone,

I have two big questions regarding the graphics object [gemwin]:

How does one change the focus of the graphics window?
For example, we are using a computer video camera to look at the surface of
a pepperoni pizza (in real time), but i want to change the view so that all
you see is one pepperoni slice in the graphics window (still a square
window/image).

Also, How does one go about temporarily storing an image/frame of the live
video going through the graphics window object?
For example, now that i have the piece of pepperoni in view, i want to
capture ONLY this portion of the entire pizza/live video stream.

I am new to [gemwin], but would like to implement it into an audio/video
installation due next week. Any help would be greatly appreciated!

Thank you so much for your time,
Sebastian
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] Detect a stagnate number

2011-11-14 Thread Sebastian Valenzuela
Hi everyone,

When I was learning ChucK I remember being able to do this with boolean
logic: Receive values from integer X. If X stays the same for a period of
at least 1 second... (to end this sentence in Pure Data) I'd like to send
a single bang. So I'd like to build something or find some object that
watches a constantly changing number box and when it becomes stagnate
(doesn't move from one number to the next) for a period of 1 second, I'd
like to send a single bang.

Thank you for reading my question,
Sebastian
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] Ignore initial impulse/bang

2011-11-14 Thread Sebastian Valenzuela
Hi,

I would like an object or a construction of something that would ignore the
first bang it receives. To be more descriptive, If something outputs a bang
when it receives one, I would like it to output a bang the SECOND time it
receives a bang. Also, if possible, I would like to reset this behavior.

Thank you,
Sebastian
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] Audio line circuit breaker?

2011-11-14 Thread Sebastian Valenzuela
Hi again,

Can such a thing be built? Something you can put in between an audio source
and audio receiver (like an osc~ object going to a dac~) that would either
break that signal or allow audio to flow from one to the other (On/Off).
There is probably a very easy answer to this.

Thank you for reading,
Sebastian
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] Sigmund~ or Bonk~ question: discerning input between two sounds

2011-11-08 Thread Sebastian Valenzuela
Hi everyone,

I'll be beat-boxing (with my voice) TWO sounds into my computer microphone:
a Kick drum sound and a Hi-Hat sound. I would like to use some sort of
spectral analysis object to send bangs when it recognizes them. I ran these
two sounds through a spectral analyser and found that the Kick sound was
between 100-300 hz and the Hi-Hat sound was between 1k-10k hz. What is
the most precise way to do this? In [sigmund~], what are the arguments I
would use, and how would I specify these ranges through these arguments?

Thank you for your time,
Sebastian
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] Hold integer until bang object??

2011-10-16 Thread Sebastian Valenzuela
Hello,

Is there an object that will hold a number it has received and wait for an
incoming bang to go ahead and SEND that number through its output?

Or is there a way to make this work?

I would need this to work more than once.
For example:
*send 41 to object*, *send bang which releases 41 from its output*, *send 57
to object*, *bang which releases 57*, etc...

Thank you for taking the time to read this!
Any help is greatly appreciated!
-Sebastian
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] Hold TWO numbers until bang??

2011-10-16 Thread Sebastian Valenzuela
Hello,

Is there an object that will hold TWO numbers it has received and wait for
an incoming bang to go ahead and SEND them through its output?

Or is there a way to make this work?

I would need this to work more than once.
For example:
*send 0.123 1500 to object*, *send bang which releases 0.123 1500 from
its output*, *send 0.445 677 to object*, *bang which releases 0.445 677*,
etc...

Thank you for taking the time to read this!
Any help is greatly appreciated!
-Sebastian
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] Output numbers consecutively, one at a time in PD

2011-09-12 Thread Sebastian Valenzuela
Hello,

I need an object that will output a sequence of numbers [that I would
program], one at a
time, every time i send it a bang. I need this to loop.

So if my set of numbers are [2, 5, 7] it would go...

bang - 2, bang - 5, bang - 7, bang - 2... etc.

Is there such an object?
If not, what could I use to make this operation?

Thank you for your help,
Sebastian

p.s. Sorry if this is a simple operation, i'm sort of new to the pd environment.

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Output numbers consecutively, one at a time in PD

2011-09-12 Thread Sebastian Valenzuela
Thank you for the responses, Andy and Jonathan. But I am looking for
something that will output THE FIRST number whenever I hit bang...
then the NEXT number when i hit bang a second time (and so on).  So
there is no steady, timed rate (as with the list sequencers) of number
output, and I don't want to output all my numbers out right away (as
with the list-drip object).

-Sebastian

On Mon, Sep 12, 2011 at 2:38 PM, Jonathan Wilkes jancs...@yahoo.com wrote:
 - Original Message -

 From: Andy Farnell padawa...@obiwannabe.co.uk
 To: pd-list@iem.at
 Cc:
 Sent: Monday, September 12, 2011 3:03 PM
 Subject: Re: [PD] Output numbers consecutively, one at a time in PD


 Follow the examples under the [list] object help tree
 until you find an example called list sequencer.

 Or you can use [list-drip] from the list-abs.  It's easier to write and more
 efficient for large lists:

 [bang(
 |
 [list append 2 5 7]
 |
 [list-drip]
 |
 [print]


 On Mon, 12 Sep 2011 13:48:44 -0500
 Sebastian Valenzuela svalenzuelamu...@gmail.com wrote:

  Hello,

  I need an object that will output a sequence of numbers [that I would
  program], one at a
  time, every time i send it a bang. I need this to loop.

  So if my set of numbers are [2, 5, 7] it would go...

  bang - 2, bang - 5, bang - 7,
 bang - 2... etc.

  Is there such an object?
  If not, what could I use to make this operation?

  Thank you for your help,
  Sebastian

  p.s. Sorry if this is a simple operation, i'm sort of new to the pd
 environment.

  ___
  Pd-list@iem.at mailing list
  UNSUBSCRIBE and account-management -
 http://lists.puredata.info/listinfo/pd-list


 --
 Andy Farnell padawa...@obiwannabe.co.uk

 ___
 Pd-list@iem.at mailing list
 UNSUBSCRIBE and account-management -
 http://lists.puredata.info/listinfo/pd-list


 ___
 Pd-list@iem.at mailing list
 UNSUBSCRIBE and account-management - 
 http://lists.puredata.info/listinfo/pd-list




-- 
Sebastian Ignacio Valenzuela Rojas
Composer - Guitarist
www.wix.com/ciseven/svalenzuela
www.youtube.com/svalenzuelamusic

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] Transposing samples using MIDI numbers

2011-09-12 Thread Sebastian Valenzuela
Hi,

Is there a way to transpose the sound of a sample [stored in a table]
to match a pitch/midi note number?
In my project, when a sample is played back [using tabplay~] I would
like something to tune that sample to say, midi note 69 or A 440.
I would like to be able to send this number to the transposing
function via a number box.
I am SOO close to realizing an idea, I just need this one crucial part.

Thank you for your time,
Sebastian

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] Can GEM select a color from an image?

2011-09-10 Thread Sebastian Valenzuela
I am in the process of writing an algorithmic piece where I take
pictures, determine the most prevalent color in that picture, then
store that as a number in an array. I would then call on these numbers
to determine the triggering of samples.

Is there an object in Pure Data that can determine the most common
color in an image? If so, how does it work?

Thanks for taking the time to read this,
-Sebastian

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


[PD] pix_write questions

2011-09-10 Thread Sebastian Valenzuela
Subject: pix_write questions

Hello,

I would like to capture an image from the streaming video im getting
in the pix_video object using pix_write. I would then want the outlet
of pix_write to send that captured image to be loaded in pix_image.

Here it is again:

pix_video  pix_write  pix_image

Is this possible?

I feel like I would have to save this image somewhere along the line.

If you send an example script, could you please tell me how to open
it? I'm kind of new to this environment.

Thank you for taking the time to read this,
Sebastian

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list