electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software » Developers' Corner
MIDI over LAN
Post new topic   Reply to topic Moderators: DrJustice
Page 1 of 1 [16 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
DrJustice



Joined: Sep 13, 2004
Posts: 2112
Location: Morokulien
Audio files: 4

PostPosted: Sun Sep 19, 2004 7:12 pm    Post subject: MIDI over LAN Reply with quote  Mark this post and the followings unread

Hi!

Yiha - first post Very Happy - picking up from the Gear News "MidiOverLAN!!!" thread. http://electro-music.com/forum/topic-2880.html

After reading up on OSC i think I like it... For the readers benefit here's a quick rundown on what OSC is, as far as I have understood:

It's basically a scheme for stuffing an address, a timestamp and some data in a packet and dispatching that over some kind of transmission medium. From what I've read so far, very little is defined except the packet format, and a library (sdk). The sdk is very thin, mostly consisting of routines for the packet formatting and a callback mechanism to dispatch incoming packets. You supply a few simple functions to handle the packet traffic, e.g. by UDP. The timestamps have a resultion of 200ps, but no synchronization mechanism is defined - that's a DIY.

I reckon that using an Ethernet LAN and a switch, this could be a good alternative to MIDI. OSC does not (AFAIK) define any specific data types, and a MIDI transport might have to be defined. A defined high resolution parameter transport could be useful too. There may well have been done work on this that I'm not aware of. OSC is apparently used in e.g. C-Sound and Reaktor, so hopefully some common ground have been established. I need to research some more, but as I see it OSC may be a good starting point, partly because it's very loose (still) and because of the addressing scheme (like a URL).

Of course, it would be nice to know if any efforts one choses to put into MIDI over LAN will work with other systems. I wonder what hardware and software manufacturers positions are on the MIDI over LAN issue, and if they have any plans. Thinking here about standardization issues, not the few (proprietary(?)) products that exists in this area. IMHO Ethernet is a cost effective and simple interface quite suitable for taking over the role of MIDI. It would take so little to put an Ethernet port on new non- PC/Mac products (some already have one). Small 'standard' MIDI-to-LAN boxes could ensure the continued use of your old gear. Firewire is also popular - but is it ideal as a MIDI replacement? Got any good OSC info? Should we all just sit back and wait for the manufacturers to come up with the goods?

What are your thoughts?

DJ
--
Back to top
View user's profile Send private message Visit poster's website
mosc
Site Admin


Joined: Jan 31, 2003
Posts: 18240
Location: Durham, NC
Audio files: 224
G2 patch files: 60

PostPosted: Sun Sep 19, 2004 8:47 pm    Post subject: Reply with quote  Mark this post and the followings unread

I don't know much about this. If I were to try it I think the easiest thing would be to use Keykit. I like the idea Tim has of delaying streams by a measure.

Were you thinking of writing end-to-end software?
Back to top
View user's profile Send private message Visit poster's website AIM Address
jksuperstar



Joined: Aug 20, 2004
Posts: 2503
Location: Denver
Audio files: 1
G2 patch files: 18

PostPosted: Sun Sep 19, 2004 9:46 pm    Post subject: Reply with quote  Mark this post and the followings unread

Gibson released a NET attached guitar (no links, but I heard of it through the chip vendor, Xilinx). They have created their own standard.

If this was combined with a distributed processing scheme, and the trend of software synthesis, it could easily extend to an "Audio Farm", where each computer in the farm would be responsible for a few tracks. Synch, audio, & MIDI info would be exchanged over the network. Thus, you could "render" your multi-track composition that is heavily laden with VST or AU instruments in real-time.

I just like the fact that I could use it to synch my audio & MIDI with a VJ's video (someone using Resolume, VVVV, etc, and whom typically run their stuff on laptops, but have no MIDI interface), and maybe some other (electro-)musicians.
Back to top
View user's profile Send private message Visit poster's website
DrJustice



Joined: Sep 13, 2004
Posts: 2112
Location: Morokulien
Audio files: 4

PostPosted: Sun Sep 19, 2004 9:51 pm    Post subject: Reply with quote  Mark this post and the followings unread

My immediate personal interest is to be able to have a modern MIDI replacement. Meaning that ideally all devices should support MIDI transport over Ethernet in a transparent fashion. I'd also like an alternative method for devices to read and write each others parameters/data using a variety of data types (most importantly high resolution parameter control), perhaps supported by a 'discovery' protocol.

I'm thinking of any particular synchronization protocol. That would be a useful option for performance over over high latency connections, though. Keykit looks nice for what it is, but I couldn't really find anything on Konnect. Perhaps tjt can tell us some more?

At this point I'm trying to find an angle of attack on the subject, not knowing what's to come of it yet. When the matter becomes a bit more tangible, then I may know what software to write. The ideal would be if there was a clear standard that everybody supported. However, in our days of format and protocol inflation that may not be as easy as back in the MIDI heydays Rolling Eyes Wink

Surely, I'm not the only person to want hyper-modern super-duper MIDI!?

DJ
--
Back to top
View user's profile Send private message Visit poster's website
blue hell
Site Admin


Joined: Apr 03, 2004
Posts: 24422
Location: The Netherlands, Enschede
Audio files: 297
G2 patch files: 320

PostPosted: Mon Sep 20, 2004 3:52 am    Post subject: Reply with quote  Mark this post and the followings unread

I don't know what OSC does exactly, but I once made a little something for myself that used relative time stamps on MIDI messages over ethernet.

The receiver can keep track of 'lost time' this way but this will not scale very well to a general multi-node environment. In that case probably a dedicated sync server should be in the system (as one of the nodes).

But still a guess has to be made about the time delays that will occur in the actual system. This guess might be wrong and this will always result in some messages being handled at the wrong time. Eventually this might settle although this can't be guaranteed. Excluding WAN and only using LAN will make the system more predictable of course.

The little something I made had a built in chat utility which seemed very handy to communicate amongst humans about setup trouble.

Jan.
Back to top
View user's profile Send private message Visit poster's website
DrJustice



Joined: Sep 13, 2004
Posts: 2112
Location: Morokulien
Audio files: 4

PostPosted: Mon Sep 20, 2004 8:09 am    Post subject: Reply with quote  Mark this post and the followings unread

In July the OSC people held a conference, discussing protocols and and timing amongst other thing.
I found that here http://www.opensoundcontrol.org/about. OSC seem to be the only common standarization effort that is alive and they already have projects and products supporting it

It is obvious that playing globally over the net is on many peoples mind - OSC has a tentative solution. Once the requisite transport protocols are defined and a synchronzied clock implemented, it should as well across the globe as across the room. Simple timestamped FIFOs ought to suffice, but on a LAN that's probably not needed.

I'm going to support OSC, it may not mean much initially, but all little things add to its momentum. Now I'm off to http://www.opensoundcontrol.org/proceedings/ to see what came out of the conference. I hope KISS principles apply - just straight up MIDI without added show-stopping complications ought to come first, and that should be very easily doable. Its' easy to image protocols and addressing schemes that would work fine.

DJ
--
Back to top
View user's profile Send private message Visit poster's website
mosc
Site Admin


Joined: Jan 31, 2003
Posts: 18240
Location: Durham, NC
Audio files: 224
G2 patch files: 60

PostPosted: Mon Sep 20, 2004 8:10 am    Post subject: Reply with quote  Mark this post and the followings unread

Yamaha seems ahead of the rest with the MLAN architecture.

Personally, I would be most interested in WAN MIDI communication. I'd like to jam with people over the internet.

As for Keykit. The way to learn about it is to load it up (free of course) and kick the tires. If you are a programmer, you will love it. If not, it's still lots of fun. The Keykit language is really designed for MIDI processing. Tim's Keykit mailing list is where you get questions ansered. But, I'm sure if our moderator asked him via PM to check out this topic, he'd do that.
Back to top
View user's profile Send private message Visit poster's website AIM Address
DrJustice



Joined: Sep 13, 2004
Posts: 2112
Location: Morokulien
Audio files: 4

PostPosted: Mon Sep 20, 2004 3:58 pm    Post subject: Reply with quote  Mark this post and the followings unread

OK - back from much searching and reading on OSC.

It does indeed have defined data types for the packet payload: floats, ints, midi messages, strings, BLOBs etc. - it's all right there, waiting to be used. They really have Hyper MIDI and more ready to go for anyone that is interested! Way cool Very Happy

To bad that it's such a well kept secret. After lots of searching I have found no evidence of general commercial support. There's a few boards that have people asking about it, notably the NI user forum, but there are few answers.

Anyway, OSC will be my focus - I find this the most viable course of action. Thank you play, for pointing me there thumleft

And yes mosc, there's Yamahas MLAN too. It's firewire based though, so it's not really a player in the same field as OSC as I see it (e.g. no WAN).

Now I'm off to a play time hypothetical design session, better put the kettle on...

DJ
--
Back to top
View user's profile Send private message Visit poster's website
elektro80
Site Admin


Joined: Mar 25, 2003
Posts: 21959
Location: Norway
Audio files: 14

PostPosted: Mon Sep 20, 2004 4:01 pm    Post subject: Reply with quote  Mark this post and the followings unread

But mLan offers a lot anyway for LAN use? On stage .. etc

It seems to smart to have audio and midi and whatever in one cable.

_________________
A Charity Pantomime in aid of Paranoid Schizophrenics descended into chaos yesterday when someone shouted, "He's behind you!"

MySpace
SoundCloud
Flickr
Back to top
View user's profile Send private message Visit poster's website
tjt



Joined: Apr 05, 2003
Posts: 32
Location: San Jose, California

PostPosted: Mon Sep 20, 2004 4:37 pm    Post subject: Konnect details Reply with quote  Mark this post and the followings unread

Blue Hell wrote:
I don't know what OSC does exactly, but I once made a little something for myself that used relative time stamps on MIDI messages over ethernet.

The receiver can keep track of 'lost time' this way but this will not scale very well to a general multi-node environment. In that case probably a dedicated sync server should be in the system (as one of the nodes).


With Konnect, multiple clients register with each other in an arbitrary fashion, and each client merely broadcasts things they receive to everyone that has registered with them (except the originator of a particular message, of course). There is no central sync - each client merely has its own notion of the "measure/loop boundary", and broadcast messages express the timing of their contents in terms of their relationship to the measure/loop boundary. A client receives a message containing some MIDI notes and synchronizes it to the local measure/loop boundary. Broadcasting is done in small chunks (say, a beat's worth). Data is sent around as ASCII text which, using keykit phrase notation, is almost as compact as MIDI.

Blue Hell wrote:
The little something I made had a built in chat utility which seemed very handy to communicate amongst humans about setup trouble.


Yes, Konnect has simple chat as well - definitely a requirement for these type of things.

...Tim...
Back to top
View user's profile Send private message Visit poster's website
DrJustice



Joined: Sep 13, 2004
Posts: 2112
Location: Morokulien
Audio files: 4

PostPosted: Mon Sep 20, 2004 4:44 pm    Post subject: Reply with quote  Mark this post and the followings unread

I'm sure mLan is fine in itself. However, for the purposes I (and possibly others) am thinking of, mLan and firewire simply isn't suitable.

Aside from technical issues there is one thing that I consider importent; the threshold for developers. OSC (over Ethernet) is something anybody can do right now at no cost. mLan over Firewire incurs big league corporate licensing just to say hello and it's more complicated - not one for the small developers. One of the many reasons why MIDI was (is!) such a success is it's simplicity and accessibility.

But hey - we should all embrace the globally capable OSC standard now Smile (Sorry, you know about the newly converted...)

BTW: you can send anything through OSC, including audio.

DJ
--
Back to top
View user's profile Send private message Visit poster's website
blue hell
Site Admin


Joined: Apr 03, 2004
Posts: 24422
Location: The Netherlands, Enschede
Audio files: 297
G2 patch files: 320

PostPosted: Mon Sep 20, 2004 5:05 pm    Post subject: Re: Konnect details Reply with quote  Mark this post and the followings unread

tjt wrote:
There is no central sync - each client merely has its own notion of the "measure/loop boundary"


Thanks Tim.

Now if I understand this corectly you 'simply' make a feature out of the delay problem by making delays musically usefull instead of annoying ... that's a new way of looking to it for me ... I like that idea :-)

I had a quick browse through one of the OSC links provided by DrJustice and in one of those I found a description of a hanclapping process to figure out musically usefull delays, but this was all mili-second based which didn't quite convince me.

With Konnect though it all seems to depend on how structured the music is for how well it works, probably not equally well for all music ?

(Although I can imagine interesting patterns to occur when not all parties have the same ideas about the cyclic structure or its timing)

Jan.
Back to top
View user's profile Send private message Visit poster's website
mosc
Site Admin


Joined: Jan 31, 2003
Posts: 18240
Location: Durham, NC
Audio files: 224
G2 patch files: 60

PostPosted: Mon Sep 20, 2004 8:34 pm    Post subject: Reply with quote  Mark this post and the followings unread

Tim, are there some TCP ports better than others? Ist there a standard Konnect port number?

I would like to try jamming with a midi connection. Do you have some kind of synchroning system for people (not for the notes). I mean, how do people sync up to connect Konnect sessions?
Back to top
View user's profile Send private message Visit poster's website AIM Address
DrJustice



Joined: Sep 13, 2004
Posts: 2112
Location: Morokulien
Audio files: 4

PostPosted: Mon Sep 20, 2004 9:17 pm    Post subject: Reply with quote  Mark this post and the followings unread

Hi tjt!

Thanks for joining in Smile

I've been over and downloaded Keykit. Now I need to learn a bit about it. Perhaps there will be electro-music.com online jams sometime soon...

DJ
--
Back to top
View user's profile Send private message Visit poster's website
mosc
Site Admin


Joined: Jan 31, 2003
Posts: 18240
Location: Durham, NC
Audio files: 224
G2 patch files: 60

PostPosted: Mon Sep 20, 2004 10:22 pm    Post subject: Reply with quote  Mark this post and the followings unread

Good, DJ. I've had Keykit running here for maybe the last 20 years. Laughing

If we can get some experience with KeyKit, maybe Konnect will be good enough, or we'll learn more about what this kind of technology should really do.
Back to top
View user's profile Send private message Visit poster's website AIM Address
tjt



Joined: Apr 05, 2003
Posts: 32
Location: San Jose, California

PostPosted: Sun Sep 26, 2004 7:07 pm    Post subject: how to use Konnect Reply with quote  Mark this post and the followings unread

mosc wrote:
Tim, are there some TCP ports better than others? Ist there a standard Konnect port number?


The default port is 3333.

mosc wrote:
I mean, how do people sync up to connect Konnect sessions?


First, you'll need to download the latest (7.3d) version of keykit in order for this stuff to work - there were several things that I needed to fix, since the last time I used this was several years ago.

Here's how people get connected. I run a server on nosuch.com which listens on port (3333). To connect to it, first add a line like this to your c:\keylocal.k file:

KonnectServer = "nosuch.com"

Then, start keykit and use Tools2->Konnect to create a Konnect tool. It should automatically connect to the server on nosuch.com. It may report that the machine is soundparticles.com - don't worry, that's the same as nosuch.com. After you're connected, you can chat with whoever else is connected, just by typing and pressing carriage return. If you press the Send button (which toggles), all MIDI from your MIDI input will be broadcast to everyone else who is connected. Likewise, if anyone else presses their Send button, they will be broadcasting MIDI back to you. By typing a special line:

!ping

you can ask the server to send you a response, verifying that you are connected, and you will also see a list of other people who are connected.

In order to make any musical sense of what's going on, both sides need to hear a 4-beat pattern. To do this, one person should use the Kboom tool and set up a drum pattern. Then, that person should invoke the "More->Konnect->Send On" item in the Kboom tool. From then on, that person's Kboom pattern will be broadcast to everyone, and provide the background that everyone can jam to. In order for everyone to hear the drum pattern properly, they'll need to have a general midi (or close) drum set responding to channel 10.

After the drum pattern is going, everyone should turn on the "Send" toggle button in their Konnect tool, and jam away. Of course, the sounds that people hear may be completely different than the originator's sound - it all depends on what sounds you have responding to each MIDI channel. Naturally, something like general midi comes in handy here, but if you don't have a general midi synth, you can still use the 'chat' feature to agree upon what sounds are playing in each channel, and who's using what channel. It's a free-for-all, and the current tool doesn't do very much (other than handle the timing) to help coordinate the channels and sounds.

That's pretty much it. I'm running the server now (though i don't run it all the time), if anyone wants to connect. Remember that you need to get the latest version of keykit (7.3d) in order for this to work.

...Tim...
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic Moderators: DrJustice
Page 1 of 1 [16 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » Developers' Corner
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use