[linux-audio-user] jaming over the internet?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



måndagen den 29 september 2003 19.56 skrev Rob:
> On Monday 29 September 2003 12:50, Robert Jonsson wrote:
> > Anybody know of an application that allows streaming of midi
> > and/or audio over the net for the purpose of allowing several
> > people to jam together?
>
> I seem to remember something like that for Windows too, but
> remember that latency that would be more than acceptable for
> gaming (30-40ms) could make it impossible to jam as you're
> envisioning.

Well, 30-40ms might be stretching it a bit too far. But theoretically I think 
it would be possible. Probably not with ADSL or Cable though...

First, ping is a roundtrip measurement. I would argue that only the time for 
the data to travel one way is important, you wouldn't listen to yourself 
playing over the internet, on the other end the stream would be listened to 
by the jam-peer ( oh, if there isn't such an entity, can I invent it? can I?) 
the peer would play her part back over the wire to complete the roundtrip.

Let's imagine a theoretical example using audio. Naturally the buffers and 
soundcard would add to the latency so the buffers would have to be kept 
short. With buffers at 2x128 the input latency would be about 5.3ms with 
48khz sampling frequency, the soundcard would probably add another 2ms.
If ping times of 10 ms is possible, which is no big deal if the computers are 
on the same DMZ, then the net would add half that, 5 ms.

Adding these values together, the peer would receive the audio and output it 
over the speaker after about 5.3 + 2 + 5 + 2 + 5.3 ms = 19.6 ms.
Now... the packing of the audio data isn't added. I have no idea how 
much/little that would add. I imagine the data would be sent with some 
compressed format and packed in frames, like mp3...
5 ms is a nice round number that might be applicable as the time to pack and 
schedule new audio data to the network card, the same number might also be 
applicable for receiving and unpacking it at the jam-peer (tm).
This would mean that one way transportation would approximately take 30 ms.

Comparing this number to the actual time it takes for sound to travel through 
air, we find that in 30 ms sound has travelled some whooping 10.3 m.

So... the scenario might be comparable to if you and your mate (sorry, 
jam-peer!) would be standing some 10 meters apart. Probably not ideal, but I 
think it would be workable.

With midi pretty much all the packing/unpacking would be omitted leaving even 
better possibilities of making it realizable.

But then again, who knows until one has tried :)
I wonder if ecasound/ogg/shoutcast would be a workable combination if one 
wishes to try something stupid.... :) ?

/Robert



[Index of Archives]     [Linux Sound]     [ALSA Users]     [Pulse Audio]     [ALSA Devel]     [Sox Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux