View Single Post
Old 09-18-2016, 01:36 AM   #1
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 18,361
Default Q: IP addresses and ports

I have no idea about IP addresses and ports (as used in oscii-bot scripts, and generally). Can someone explain them clearly?

I understand that oscii-bot needs to communicate with Reaper and with the MIDI control surface, in and out. So it needs 4 connections.

I see these examples in sample_script.txt
Code:
//        @input devicenameforcode MIDI "substring match" [skip]
//        @input devicenameforcode OSC "*:9000"
//        @input devicenameforcode OSC "192.168.1.2:9000"
@input r24 MIDI "ZOOM R"
//        @output devicenameforcode OSC "127.0.0.1:8000" [maxpacketsize] [sleepamt]
//        @output devicenameforcode MIDI "substring match" [skip]
@output localhost OSC "127.0.0.1:8000"
And, from other scripts:
Code:
@input osc_in OSC "*:9000"
@output osc_out OSC "localhost:8000"
@output midi_out MIDI "AlphaTrack"
@input midi_in MIDI "AlphaTrack"

@input in MIDI "Mix"
@input OSC_IN OSC "localhost:9000"
@output OSC_to_REAPER OSC "192.168.0.10:8000" 0 0
@output out MIDI "Mix"
So the four types are:
@input ... MIDI,
@output ... OSC,
@input ... OSC and
@output ... MIDI.
And the MIDI lines reference the MIDI device name, as seen in the Control Surface definition (is that right?).

Now, for the @input ... OSC:
-- the first item is some unique name, for use within the script
-- the IP address is sometimes '*', or 'localhost' or '192.168.1.2'
-- what do those 3 mean?
-- what's the difference?
-- the port number is (always?) 9000; why is that number used?
-- how do I know that nothing-else is using it?

And for the @output ... OSC:
-- the first item is some unique name, for use within the script
-- the IP address is sometimes or 'localhost' or '127.0.0.1 or '192.168.0.10'
-- what do those 3 mean?
-- what's the difference?
-- the port number is (always?) 8000; why is that number used?
-- how do I know that nothing-else is using it?

-- why don't the 2 OSC lines use the same IP address?
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar is offline   Reply With Quote