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

taking input from a 'data file' #31

Closed
dataknut opened this issue Nov 14, 2013 · 3 comments
Closed

taking input from a 'data file' #31

dataknut opened this issue Nov 14, 2013 · 3 comments
Milestone

Comments

@dataknut
Copy link

Brilliant tool - good work!

Scenario:
I want to process a data file (time stamped stream of numbers) grabbed (perhaps) via http or an IP socket and have sonic_pi 'audiolise' it. The streams represent a number of different entities (e.g. households) observed over time - typically every second. There will be n observations per second where n = the number of entities observed.

Feature needed:
Issue #20 would do this if I pre-processed the data into a play file but I have real time data which I'd like sonic_pi to play out on the fly. Also the data files are too big for a rpi to hold (typically several Gb) - so the play files would be too (?). Hence suggestion to play a minimally buffered stream out in real (or faster/slower) time. The feature may also require some maths/text manipulation features - e.g. to split lines and strings etc.

many thanks
Ben

@whaleygeek
Copy link

As I understand it, Sonic Pi is just ruby (i.e. the files you type in to the edit window interact with the engine are just ruby code). so presumably you could just write some ruby code inside one of the normal edit windows to use the standard ruby libraries and methods for opening sockets and reading data, and then call the play() command with the data that comes back from the socket?

@samaaron
Copy link
Collaborator

samaaron commented May 3, 2014

Yep, you should be able to use regular Ruby libraries from within Sonic Pi - although I definitely think I could spend some time thinking about how to make this easier for users...

@samaaron samaaron added this to the Future milestone Aug 30, 2014
@samaaron
Copy link
Collaborator

Closing for now - handling of 'generic' data files is not planned - for this use the (unsupported) Ruby features for the particular data file you're planning on working with.

It may be possible that I'll add support for a small number of specific data files such as MIDI files in the future. Please do let me know which file types you'd like to see supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants