-
Notifications
You must be signed in to change notification settings - Fork 2
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
proposal: integrating streams from sludge server #1
Comments
Hey, thanks for your interest! Looks like this would involve pulling in something like opuslib or PyOgg for encoding/decoding.
For uploading, it looks like we'll want to attach a side-effect to the stream of interest which:
Does all of that sound right? I'm imagining an interface along the lines of stream_from_rivalium = rivalium.recv("stream_id_here")
stream_with_side_effect_of_uploading = rivalium.send(my_interesting_audio_stream) Although, I suppose That raises another question: should stream_with_side_effect, public_url = rivalium.send(my_interesting_audio_stream) Maybe it should also return (and optionally take) the admin URL, so multiple Aleatora streams can upload to the same Rivalium stream: stream_with_side_effect, public_url, admin_url = rivalium.send(my_interesting_audio_stream)
another_effectful_stream, *_ = rivalium.send(another_audio_stream, admin_url) Let me know what you think! I'm sure I'm missing some important details here, like working with sortition collections and the non-random modes of sludge. |
Yo! Unexpectedly well researched response. After reading I'm now wishing I spent more time on documentation, but I think you've grasped the idea pretty well nonetheless.
I'm wondering now if it makes sense to build this as a standalone client with the initial focus on getting it to work nicely with Aleatora (btw, awesome project name). Some notes:
Your downloading suggestion looks pretty straight forward, and can vary for live/normal/random modes but we can just start with implementing random mode. What would a signal look like from the audio buffer in case there's no audio yet available? As 0s are usually indicative on an empty signal, it could just stream those and Aleatora can decide whether to quit the stream or hold onto it until audio is available. The main thing with creating the buffer is to possibly borrow my implementation for the decoding and joining segments, as there needs to be a small cross fade (~10ms, borrowed from the pre-skip data) to avoid clicks (there's no other simple way afaik). I'm not sure how all this works with python, most of my experience is with using the pyo dsp library.
In regards to uploading, I err against uploading more than a single stream, the idea is for the files to represent a sequence of 1 channel audio. If there is to be multiple inputs, they should each have their own Rivalium stream, and if multiple inputs should be combined, then I'm not sure if that should happen within the sending system or within the Rivalium client. Maybe that's what yr trying to work out, but I got a bit confused by In regards to collections, to add streams its just sending a public URL and storing the code, then removing them by sending the code. Calling a collection endpoint just performs a redirect, so it's only a matter of following the redirect. Sortition will also be updated to handle different streaming modes soon too. For the different modes, the main thing to think about is fetching the length (in seconds) and being able to play from a given second. As live and normal playback modes will generally have an "end" this will probably be handled similarly to an empty stream. As mentioned before, maybe this would be good as a package that can be imported into Aleatora rather than built directly into it. I'm not as familiar with python as I am with JS, so I'm wondering how much time you'd be willing to put into helping implementing this as I can do as much as possible, but there might be things here and there I'd probably need some advice for. Thanks again for your quick response, and let me know if you need any more details. |
OH. Therefore, it's worth considering how one might handle a returned segment URL after upload, and also the emitted URL from the Rivalium output when the buffer is playing a particular segment. I would imagine that Aleatora would be good for associating things like controller signals, OSC, MIDI, or any metadata generated from the coding environment with a segment, and also taking segment URL, mapping it to a pre-loaded hash table and using the values to control a plugin, etc etc. |
Great. My research mostly consisted of fiddling around with Rivalium with the dev console open on the "Network" tab. 🙂
Yes, this depends on your interests and how much work is needed for the integration. But I suspect the integration won't be that much work. If it can be nicely self-contained in a single module, I wouldn't mind hosting it here, perhaps under an
Ah, I was wondering about this. (I ran into a similar issue some time ago with MP3s... which unfortunately don't include a field saying how many samples to skip!)
One option is for the stream to simply block until audio is available. This is how, for example, the networking streams work - and then they can be made nonblocking with
No worries. DSP can be done directly in Aleatora, and there is a
Right. Aleatora streams can be played multiple times, with potentially different outcomes, so one question was whether a Rivalium stream should stick with a particular Aleatora stream across playthroughs, or if each separate playthrough should get its own Rivalium stream. It sounds like the first option is the right approach. As for multiple inputs getting separate streams - yep, that makes sense. I think that should be the default, but it also seems plausible that someone might want multiple Aleatora streams to go to the same Rivalium stream (perhaps the streams are closely related, or maybe the user is experimenting and revising a stream live); hence the idea of allowing the user to optionally say "use this existing Rivalium stream rather than making a new one."
Yep, Aleatora streams can also end, so that can map over directly.
Interesting. Yes; actually, the implementation I was imagining for
I'm happy to help out or accept a PR. I might take a stab at this over the weekend, if you don't beat me to it. 🙂 |
If yr interested, I have some free time on the weekend too, maybe we can schedule a window for a chat and run through some ideas or whatever. Happy to work on it as just a PR to aleatora and we can see where it goes from there. I'm in Germany, so I'm about 6 hours ahead of you, if you're available somewhere between 9am and 2pm your time, let me know.
Depends on the decoder, opusdec cli tool seems to remove the pre-skip and excess page data, whereas the decoder I'm using the browser doesn't, so just inspect the size of the output buffer and its contents to be sure.
This is interesting, I will look into how this works, feel free to send through any useful information to help me learn more.
This is basically the same principle as rivalium but with "live" (as in, immediate but not real time) "streams" (as in streams of files, not packets), its funny to have designed projects around similar goals but with completely different approach.
Yeah I would suggest reusing rvm streams, as the longer the stream the more randomness and diversity there is (unless you want to eliminate any previously recorded audio, in which case a new rvm stream is necessary).
Do you mean as above suggestion about reuse or as in sending 2 aleatora streams into the same rvm stream? This is what I'm mostly concerned about as the input audio should basically be combined before being segmented and encoded, that's all. |
👍
Yes, more like re-use; someone might want an Aleatora stream to send to a Rivalium stream, and then they might want to send more to that same Rivalium stream from another Aleatora stream later on.
Sure, that sounds good (and more efficient than back-and-forth on GitHub 🙂). |
Either is fine. |
Good talking to you! I created a feature branch + draft PR for this, and dumped the output of our call there as a starting point. |
Hi!
Cool project, would be an interesting opportunity to combine this with streams coming from my NIME project, rivalium.
There's 4 components:
If its possible, would be awesome if we could plug in a sludge stream URL or sortition URL and decode+playback the audio within aleatora. Even more awesome would be to have the ability to encode + upload to a sludge endpoint too, but this can be facilitated via a virtual input device. For now, could also test with sending browser output to a virtual device then using that as input to aleatora, so basically the inverse of the previous suggestion.
Not sure if there's a better way to discuss this, but I will take a look at yr project further when I get a chance and see what is possible. Here's some more info on my project if you need it.
Cheers!
The text was updated successfully, but these errors were encountered: