[PD] Writing -dB or VU level to a TXT File

Pall Thayer palli at pallit.lhi.is
Sat Apr 4 03:05:52 CEST 2009


On unix related systems, printing the output of [savepanel] will show  
you the path to the file. Perhaps that will show you how you can  
format the path to work in [write(

[savepanel]
|
[print]

will print it to the pd window.


On 4.4.2009, at 00:40, Benalt, Adam D (NBC Universal, MSNBC) wrote:

> Thanks Jonathan,
> This works as you noted below, however I need this to be an automated
> process.
> At least a couple of times per second, writing one numeric value to  
> the
> same text file over and over again.
> Then I can query it as needed and it will return the VU level at that
> moment.
>
> Pall --
> This concept seems simpler than using terminal, as I'm not really
> familiar with how that will work.
>
>
> Adam D. Benalt
> Production Technology Director
> 212-664-1142 desk
> 646-306-4751 blackberry
>  MSNBC
>
> -----Original Message-----
> From: Jonathan Wilkes [mailto:jancsika at yahoo.com]
> Sent: Friday, April 03, 2009 7:59 PM
> To: Benalt, Adam D (NBC Universal, MSNBC); Pall Thayer
> Cc: pd-list at iem.at
> Subject: Re: [PD] Writing -dB or VU level to a TXT File
>
>
> Hi Adam,
>      I'm not exactly sure what you're trying to do with that patch,  
> but
> if you're having trouble with file names in windows, use the following
> chain of objects:
>
> [bang(
> |
> [savepanel]
> |
> [write $1(
> |
> [textfile]
>
> In this case, "bang" and "write $1" are messages (created with
> <ctrl-2>), and "savepanel" and "textfile" are objects (<ctrl-1>).   
> When
> you connect them together, click the bang message at the top and you
> will get the standard "save as" dialog box.  The filename will be
> automatically formatted, so you don't have to worry about typing in
> backslashes or whatever.
>
> You can right click and choose "help" to get info on any pd object (as
> well as messages, arrays, gui's, etc).
>
> -Jonathan
>
>
>
> --- On Sat, 4/4/09, Pall Thayer <palli at pallit.lhi.is> wrote:
>
>> From: Pall Thayer <palli at pallit.lhi.is>
>> Subject: Re: [PD] Writing -dB or VU level to a TXT File
>> To: "Benalt, Adam D (NBC Universal, MSNBC)" <adam.benalt at msnbc.com>
>> Cc: pd-list at iem.at
>> Date: Saturday, April 4, 2009, 1:13 AM Have you tried [write
>> C:/tmp/textfile.txt] ?
>>
>> I haven't run PD on Windows in years, so I'm not sure and have no way
>> of testing.
>>
>> On 3.4.2009, at 23:05, Benalt, Adam D (NBC Universal,
>> MSNBC) wrote:
>>
>>> Yeah, that's what I thought at first.
>>> But, when I try to enter a back-slash '\'
>> I get an error in the print
>>> window that says "keycode 92: dropped"
>>> Also the help file shows the slashed the way I wrote
>> them, I just
>>> copied
>>> what was in there.
>>>
>>> Thanks again.
>>>
>>>
>>> Adam D. Benalt
>>> Production Technology Director
>>> 212-664-1142 desk
>>> 646-306-4751 blackberry
>>>  MSNBC
>>>
>>> -----Original Message-----
>>> From: Pall Thayer [mailto:palli at pallit.lhi.is]
>>> Sent: Friday, April 03, 2009 7:02 PM
>>> To: Benalt, Adam D (NBC Universal, MSNBC)
>>> Cc: pd-list at iem.at
>>> Subject: Re: [PD] Writing -dB or VU level to a TXT
>> File
>>>
>>> I would think that on Windows you have to do something
>> like [write C:
>>> \tmp\textfile.txt] but I'm not positive.
>> Anyway, the problem I see is
>>> the path to the file. /tmp/textfile.txt means nothing
>> to Windows.
>>>
>>> best r.
>>> Pall
>>>
>>> On 3.4.2009, at 22:54, Benalt, Adam D (NBC Universal,
>> MSNBC) wrote:
>>>
>>>> Thanks Pall --
>>>> I appreciate your responses.
>>>>
>>>> Yes, I am on windows.
>>>> And, yes, I am trying to get PD to do this.
>>>> So far it looks like the right tool for the job,
>> but I just
>>>> downloaded
>>>
>>>> it today on the advice of a friend.
>>>> Together we've cobbled together the attached
>> .pd file.
>>>> If you start the Metro (clicking the [1]) the atom
>> number box
>>>> gives me
>>>
>>>> the level from the line input (in this case a
>> microphone.) But I
>>>> can't
>>>
>>>> get the write to txt box to hook up properly, or
>> to write to a file.
>>>>
>>>>
>>>> Adam D. Benalt
>>>> Production Technology Director
>>>> 212-664-1142 desk
>>>> 646-306-4751 blackberry
>>>>  MSNBC
>>>>
>>>> -----Original Message-----
>>>> From: Pall Thayer [mailto:palli at pallit.lhi.is]
>>>> Sent: Friday, April 03, 2009 6:49 PM
>>>> To: Benalt, Adam D (NBC Universal, MSNBC)
>>>> Cc: pd-list at iem.at
>>>> Subject: Re: [PD] Writing -dB or VU level to a TXT
>> File
>>>>
>>>> Oh, I just noticed you're on Windows and uh...
>> as far as I can tell
>>>> you're not even talking about PD.
>>>>
>>>>
>>>> On 3.4.2009, at 19:52, Benalt, Adam D (NBC
>> Universal, MSNBC) wrote:
>>>>
>>>>> Hey All --
>>>>> I'd appreciate any advice that you could
>> offer on this.
>>>>>
>>>>> Ultimately, what I'd want to do is just
>> access the Line-In audio
>>>>> data
>>>
>>>>> (I'm assuming it's somewhere in the
>> Windows API?) and then write
>>>>> that
>>>
>>>>> data (maybe constantly updated to a TXT file?)
>> so I can access the
>>>>> TXT
>>>>
>>>>> file from another program.
>>>>>
>>>>> Basically, how to get numerical data (writing
>> into a txt file)
>>>>> representing the levels on a sound card?
>>>>>
>>>>> Please e-mail responses to:
>> adam.benalt at msnbc.com
>>>>>
>>>>> Adam D. Benalt
>>>>> Production Technology Director
>>>>> 212-664-1142 desk
>>>>> <att3a7c4.PNG>
>>>>>
>>>>>
>> <att3a7c4.PNG>_______________________________________________
>>>>> Pd-list at iem.at mailing list
>>>>> UNSUBSCRIBE and account-management ->
>> http://lists.puredata.info/
>>>>> listinfo/pd-list
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Pall Thayer
>>>> palli at pallit.lhi.is
>>>> http://www.this.is/pallit
>>>>
>>>>
>>>>
>>>> <METER TEST2.pd>
>>>
>>>
>>>
>>>
>>> --
>>> Pall Thayer
>>> palli at pallit.lhi.is
>>> http://www.this.is/pallit
>>>
>>>
>>>
>>
>>
>>
>>
>> --
>> Pall Thayer
>> palli at pallit.lhi.is
>> http://www.this.is/pallit
>>
>>
>>
>>
>> _______________________________________________
>> Pd-list at iem.at mailing list
>> UNSUBSCRIBE and account-management ->
>> http://lists.puredata.info/listinfo/pd-list
>
>
>




--
Pall Thayer
palli at pallit.lhi.is
http://www.this.is/pallit







More information about the Pd-list mailing list