Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add possiblity to read binary files in Vanilla #792

Open
mariobuoninfante opened this issue Nov 20, 2019 · 4 comments
Open

add possiblity to read binary files in Vanilla #792

mariobuoninfante opened this issue Nov 20, 2019 · 4 comments
Labels

Comments

@mariobuoninfante
Copy link

@mariobuoninfante mariobuoninfante commented Nov 20, 2019

Hi,

At the moment it's not possible to read binary files using [text]. It would be great to have this in place to for example deal with sysex files.

Interesting thread here: https://lists.puredata.info/pipermail/pd-list/2019-01/124364.html
where workarounds are discussed as well.

Cheers,
Mario

@Spacechild1

This comment has been minimized.

Copy link
Contributor

@Spacechild1 Spacechild1 commented Nov 20, 2019

Hey, I think Miller has expressed interest in adding support for reading/writing binary files to/from [array]. I think this would make more sense since a binary file is just a list of numbers (bytes).

@umlaeute umlaeute added the feature label Nov 20, 2019
@umlaeute umlaeute changed the title (feature request) add possiblity to read binary files in Vanilla add possiblity to read binary files in Vanilla Nov 20, 2019
@umlaeute

This comment has been minimized.

Copy link
Contributor

@umlaeute umlaeute commented Dec 4, 2019

in the meantime, why can't you use [soundfiler]?

i guess the reason is, because [soundfiler] doesn't accept 1-byte data.
until it does, it shouldn't be too hard to use [soundfiler] to read raw data in 2-byte chunks and then manually convert it to 1-byte data.

the only issue i can think of is that if your file as an odd number of bytes, you will lose the last one... (and you won't even get notified)

@Spacechild1

This comment has been minimized.

Copy link
Contributor

@Spacechild1 Spacechild1 commented Dec 4, 2019

i guess the reason is, because [soundfiler] doesn't accept 1-byte data.

The default mode of [soundfiler] converts all data to the range [-1, -1], which is not what we want when we talk about reading binary files. Since Miller added the -ascii option to read ASCII text files, I'll just go ahead and propose a -binary option to read binary files.

@umlaeute

This comment has been minimized.

Copy link
Contributor

@umlaeute umlaeute commented Dec 5, 2019

sure.
although it's not so hard to multiply values by 127 :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.