Thanks for the suggestion. I'm not sure I can use this method, though, because I have to be able to write it out as well. According to the help documentation, the '-raw' flag only applies to reading files. Is that correct?
Anyway, I tried it and I'm getting a usage error:
error: usage: read [flags] filename tablename... flags: -skip <n> -nframes <n> -resize -maxsize <n> ... -raw <headerbytes> <channels> <bytespersamp> <endian (b, l, or n)>.
Here's what my patch looks like. I'm not sure what I'm doing wrong.
[read -raw 0 1 8 n Default.syx array1( | [soundfiler]
There's no "header" in the file, it's just raw data for a Midi sysex message, and I want to read each byte as an integer value in the range of 0 to 255.
David.
On Fri, Feb 25, 2011 at 7:26 PM, Mike Moser-Booth mmoserbooth@gmail.com wrote:
Try using the -raw flag for [soundfiler]. Setting the <bytespersample> parameter to 2 will treat it as a 16-bit file.
.mmb
On Fri, Feb 25, 2011 at 7:07 PM, David dfkettle@gmail.com wrote:
It's probably very obvious, but I can't figure out how to read and write files containing arbitrary binary data. I know there are objects for reading and writing sound files, and there's [textfile] for reading text files, but I want to read and write binary files, and interpret each byte as a 16-bit integer. Does anyone have an example I can look at? Since they will be small files, I just need to read them sequentially, I don't need to jump around in the file randomly.
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
-- Mike Moser-Booth mmoserbooth@gmail.com
On Sat, Feb 26, 2011 at 1:43 PM, David dfkettle@gmail.com wrote:
According to the help documentation, the '-raw' flag only applies to reading files. Is that correct?
Well, you can write it back as a soundfile in the formats that [soundfiler] supports. But if it needs to be saved in the original format, you might want to try some of the other suggestions.
Anyway, I tried it and I'm getting a usage error:
error: usage: read [flags] filename tablename... flags: -skip <n> -nframes <n> -resize -maxsize <n> ... -raw <headerbytes> <channels> <bytespersamp> <endian (b, l, or n)>.
Here's what my patch looks like. I'm not sure what I'm doing wrong.
[read -raw 0 1 8 n Default.syx array1( | [soundfiler]
[soundfiler] only supports 2, 3, or 4 bytes per sample...
There's no "header" in the file, it's just raw data for a Midi sysex message, and I want to read each byte as an integer value in the range of 0 to 255.
...which would be 1 byte. Definitely try the other suggestions. :-)
.mmb
David.
On Fri, Feb 25, 2011 at 7:26 PM, Mike Moser-Booth mmoserbooth@gmail.com wrote:
Try using the -raw flag for [soundfiler]. Setting the <bytespersample> parameter to 2 will treat it as a 16-bit file.
.mmb
On Fri, Feb 25, 2011 at 7:07 PM, David dfkettle@gmail.com wrote:
It's probably very obvious, but I can't figure out how to read and write files containing arbitrary binary data. I know there are objects for reading and writing sound files, and there's [textfile] for reading text files, but I want to read and write binary files, and interpret each byte as a 16-bit integer. Does anyone have an example I can look at? Since they will be small files, I just need to read them sequentially, I don't need to jump around in the file randomly.
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management ->
http://lists.puredata.info/listinfo/pd-list
-- Mike Moser-Booth mmoserbooth@gmail.com
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Thanks. I guess I'll have to try another approach.
I changed the sample length to 2 (I didn't read the documentation very carefully, I thought the sample length was in bits, not bytes) and now it works, but I'm left with an array of floating point numbers, and I still have the problem of writing it out again.
I'm still getting a warning message, but I'm not sure what it's trying to tell me:
warning: array array1: clearing save-in-patch flag
David.
On Sat, Feb 26, 2011 at 2:04 PM, Mike Moser-Booth mmoserbooth@gmail.com wrote:
On Sat, Feb 26, 2011 at 1:43 PM, David dfkettle@gmail.com wrote:
According to the help documentation, the '-raw' flag only applies to reading files. Is that correct?
Well, you can write it back as a soundfile in the formats that [soundfiler] supports. But if it needs to be saved in the original format, you might want to try some of the other suggestions.
Anyway, I tried it and I'm getting a usage error:
error: usage: read [flags] filename tablename... flags: -skip <n> -nframes <n> -resize -maxsize <n> ... -raw <headerbytes> <channels> <bytespersamp> <endian (b, l, or n)>.
Here's what my patch looks like. I'm not sure what I'm doing wrong.
[read -raw 0 1 8 n Default.syx array1( | [soundfiler]
[soundfiler] only supports 2, 3, or 4 bytes per sample...
There's no "header" in the file, it's just raw data for a Midi sysex message, and I want to read each byte as an integer value in the range of 0 to 255.
...which would be 1 byte. Definitely try the other suggestions. :-) .mmb
David.
On Fri, Feb 25, 2011 at 7:26 PM, Mike Moser-Booth mmoserbooth@gmail.com wrote:
Try using the -raw flag for [soundfiler]. Setting the <bytespersample> parameter to 2 will treat it as a 16-bit file.
.mmb
On Fri, Feb 25, 2011 at 7:07 PM, David dfkettle@gmail.com wrote:
It's probably very obvious, but I can't figure out how to read and write files containing arbitrary binary data. I know there are objects for reading and writing sound files, and there's [textfile] for reading text files, but I want to read and write binary files, and interpret each byte as a 16-bit integer. Does anyone have an example I can look at? Since they will be small files, I just need to read them sequentially, I don't need to jump around in the file randomly.
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
-- Mike Moser-Booth mmoserbooth@gmail.com
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
-- Mike Moser-Booth mmoserbooth@gmail.com
Hi when running pix_opencv morphology I get a weird GEM error Do I need a CVS version for this to work with 42.5 extended?
pp
Applications/Pd-extended.app/Contents/Resources/extra/pix_opencv_morpholog y.pd_darwin: dlopen(/Applications/Pd-extended.app/Contents/Resources/extra/pix_opencv_m orphology.pd_darwin, 10): Symbol not found: __ZNK12GemException6reportEv Referenced from: /Applications/Pd-extended.app/Contents/Resources/extra/pix_opencv_morpholo gy.pd_darwin Expected in: flat namespace in /Applications/Pd-extended.app/Contents/Resources/extra/pix_opencv_morpholo gy.pd_darwin pix_opencv_morphology ... couldn't create
hi patrick,
Al 26/02/11 21:37, En/na Pagano, Patrick ha escrit:
Hi when running pix_opencv morphology I get a weird GEM error Do I need a CVS version for this to work with 42.5 extended?
here
http://hangar.org/wikis/lab/lib/exe/fetch.php?media=start:pix_opencv-0.2rc6_...
I'd just uploaded a version of pix_opencv binary objects compiled in MACOSX 10.6 tested with Pd-extended version 0.42.5-extended - it's a svn revision
probably the version you where using was compiled against gem version in extended 0-41 ...
....
mmmm ... as you know macos is not our development platform, so it's possible you find some more bugs :) but morphology is working well :)
let me know ....
salut, ll.
pp
Applications/Pd-extended.app/Contents/Resources/extra/pix_opencv_morpholog y.pd_darwin: dlopen(/Applications/Pd-extended.app/Contents/Resources/extra/pix_opencv_m orphology.pd_darwin, 10): Symbol not found: __ZNK12GemException6reportEv Referenced from: /Applications/Pd-extended.app/Contents/Resources/extra/pix_opencv_morpholo gy.pd_darwin Expected in: flat namespace in /Applications/Pd-extended.app/Contents/Resources/extra/pix_opencv_morpholo gy.pd_darwin pix_opencv_morphology ... couldn't create
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Works great thanks so much. I love the pmpd addition to the examples Are you planning on adding any livido support to your stuff?
pp
On 2/26/11 4:55 PM, "lluis gomez i bigorda" lluisgomez@hangar.org wrote:
hi patrick,
Al 26/02/11 21:37, En/na Pagano, Patrick ha escrit:
Hi when running pix_opencv morphology I get a weird GEM error Do I need a CVS version for this to work with 42.5 extended?
here
http://hangar.org/wikis/lab/lib/exe/fetch.php?media=start:pix_opencv-0.2rc 6_macosx-10.6_bins.tgz
I'd just uploaded a version of pix_opencv binary objects compiled in MACOSX 10.6 tested with Pd-extended version 0.42.5-extended - it's a svn revision
probably the version you where using was compiled against gem version in extended 0-41 ...
....
mmmm ... as you know macos is not our development platform, so it's possible you find some more bugs :) but morphology is working well :)
let me know ....
salut, ll.
pp
Applications/Pd-extended.app/Contents/Resources/extra/pix_opencv_morphol og y.pd_darwin:
dlopen(/Applications/Pd-extended.app/Contents/Resources/extra/pix_opencv _m orphology.pd_darwin, 10): Symbol not found: __ZNK12GemException6reportEv Referenced from:
/Applications/Pd-extended.app/Contents/Resources/extra/pix_opencv_morpho lo gy.pd_darwin Expected in: flat namespace in
/Applications/Pd-extended.app/Contents/Resources/extra/pix_opencv_morpho lo gy.pd_darwin pix_opencv_morphology ... couldn't create
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