sACN to Midi Converter using the raspberry Pi 2 B

347 views
Skip to first unread message

tom eagle

unread,
Jan 8, 2016, 1:05:16 AM1/8/16
to open-lighting
I am new to OLA.  I have it running on a Raspberry Pi 2 B.
I need to find a Midi interface for the Pi.
I would like to be able to patch the DMX addresses to Midi addresses and output the values.
I understand the DMX values will have to be divided by 2 for the Midi values.
I am primarily interested in the Controller Channels for the Midi
I would like to be able to control the faders on my Yamaha Digital Mixer.
I also have Midi Light Dimmers.
The source of the sACN is ETCnomad on my laptop.
Thanks for any suggestion or help.
Tom

Peter Newman

unread,
Jan 8, 2016, 9:01:33 AM1/8/16
to open-lighting
Hi Tom,

We don't currently support MIDI in OLA. There's an issue open for this here:

You could probably do something with ola_trigger:

Or we'd welcome PRs for the MIDI support.

Steve French of Volt Vision

unread,
Jan 8, 2016, 11:10:26 AM1/8/16
to open-l...@googlegroups.com
Tom,
1) Regarding your need to find a midi interface for the rPi, you can make your own midi interface using the rPi GPIOs, but I have been using these USB devices:
They use a generic chinese chipset that is recognized by the rPi as a standard class compliant USB midi device.
First thing is to do "lsusb" to see that the USB midi device is recognized by the OS.
Second thing to do is these:
root@VoV-rPi-bassamp:~# amidi -l
Dir Device    Name
IO  hw:1,0,0  USB Midi Cable MIDI 1

root@VoV-rPi-bassamp:~# aconnect  -i -o 
client 0: 'System' [type=kernel]
    0 'Timer           '
    1 'Announce        '
client 14: 'Midi Through' [type=kernel]
    0 'Midi Through Port-0'
client 20: 'USB Midi Cable' [type=kernel]
    0 'USB Midi Cable MIDI 1'
client 128: 'qlcplus' [type=user]
    0 '__QLC__         '

You can do this too:
root@VoV-rPi-bassamp:~# cat /proc/asound/cards
 0 [ALSA           ]: bcm2835 - bcm2835 ALSA
                      bcm2835 ALSA
 1 [Cable          ]: USB-Audio - USB Midi Cable
                      USB Midi Cable at usb-bcm2708_usb-1.2, full speed

2) Regarding your programming needs:
     a) check out Peter's suggestion of using the ola_trigger
     b) I am working with my programmer right now to make a Midi-to-DMX bridge in Python which works with OLA.  For now it is a private repository on bitbucket (let me know if you want me to invite you to it).  I plan to put it on a public Github soon after it makes sense to do so.  We are following the convention that they are using in QLC+ as shown here:

Here is the readme that we have so far:

MIDI-DMX bridge

Dependencies:

midirt:

$ sudo apt-get install librtmidi-dev

python-rtmidi:

$ sudo pip install --pre python-rtmidi

Usage:

To see available MIDI ports:

$ python midi_dmx_bridge.py

To run:

$ python midi_dmx_bridge.py [midi_port_num] [dmx_universe]

Any MIDI data received from the chosen port will be sent out the chosen DMX universe using StreamingACN. DMX frames will be set every TICK_INTERVAL ms despite how frequently MIDI data is received (the data will remain unchanged until a new MIDI event is received).

The MIDI channels are mapped based on the QLC+ mapping as described here:http://www.qlcplus.org/docs/midiplugin.html

  • MIDI note 1 velocity -> DMX channel 129
  • MIDI note 2 velocity -> DMX channel 130
  • ...
  • MIDI note 128 velocity -> DMX channel 256
 

Let me know if you have any questions and talk soon!
--
Respectfully,
frenchy (Steve French)

--
The Open Lighting Project: open-l...@googlegroups.com, #openlighting (irc.freenode.org)
To unsubscribe from this group, send email to open-lightin...@googlegroups.com
For more options, visit https://groups.google.com/groups/opt_out?hl=en

Peter Newman

unread,
Jan 8, 2016, 12:55:23 PM1/8/16
to open-lighting, fre...@voltvision.com
That sounds great Steve, although I think Tom wants DMX to MIDI, rather than MIDI to DMX, I suspect modification won't be a huge leap though hopefully.

You mention sACN, have you considered having the other plugin you're presumably patching to the port made configurable, or possible to be disabled. That way if someone wants/needs to use ArtNet, or a physical dongle or similar, they can just patch it themselves once your script had made the universe.
On Fri, Jan 8, 2016 at 1:04 AM, tom eagle <dr.tom.eagle> wrote:
I am new to OLA.  I have it running on a Raspberry Pi 2 B.
I need to find a Midi interface for the Pi.
I would like to be able to patch the DMX addresses to Midi addresses and output the values.
I understand the DMX values will have to be divided by 2 for the Midi values.
I am primarily interested in the Controller Channels for the Midi
I would like to be able to control the faders on my Yamaha Digital Mixer.
I also have Midi Light Dimmers.
The source of the sACN is ETCnomad on my laptop.
Thanks for any suggestion or help.
Tom

--
The Open Lighting Project: open-l...@googlegroups.com, #openlighting (irc.freenode.org)
To unsubscribe from this group, send email to open-lighting+unsubscribe@googlegroups.com

tom eagle

unread,
Jan 8, 2016, 4:44:48 PM1/8/16
to open-lighting, fre...@voltvision.com
Steve,
Thank You for the information. I have a lot to learn. I looked at the USB Devices you talked about. Also saw a write-up where the Optic Couple was missing out of the unit. I think I will order a couple.

I would appreciate an invite to bitbucket.

Would it be possible to have a configuration (patch) table for translating DMX to MIDI and MIDI to DMX channels instead of fixed?

Last night was my first time looking at and installing Open-Lighting.  Need to ramp up.  Is there any training videos, I am a visual learner.

Thanks to Peter also.

Tom

tom eagle

unread,
Jan 9, 2016, 11:55:12 PM1/9/16
to open-lighting, fre...@voltvision.com
In the attached DMX Trigger Config File:
1) If Slot 1 and Slot 2 values change, I am assuming the the `echo` command will NOT fire.
2) If ( Slot 1 and/or Slot 2 values change) and Slot 3 changes, is the variables set associated with Slot1 and/or Slot 2 before Slot 3 fires off the `echo` command.
3) If there was a variable assignment in Slot 4 and it changes, would an `echo` command with value from Slot 4 be the old or new value (assuming the value in Slot 3 changed)

4) I am trying to figure out how to move data to MIDI without taking up too many addresses (slots) and still have the data presented in a timely manor.
   I may be wrong but it looks like DMX can only make one or more changes every 1/44 of a second, while MIDI can make one change every 1/1000th of a second.
   And if I use all 512 address in a Universe and they all change, MIDI would only be able to handle less than 2 DMX frames per second.
   Therefore with the possible of all 512 values changing, It would be best if the DMX frame used < 23 addresses (slots) { ( 22 address/DMXframe * 44 frames/second = 968 MIDI changes }
    I am think that 2 control + 16 values slots to use for DMX slots. Lot of devices are in multiples of 16.
    Using the QLC+ Channels map you could out run the MIDI capability.
    Let me know if I have jumped the track somewhere.
Thanks

DMX2MIDI_Trigger_Config.txt

Peter Newman

unread,
Jan 10, 2016, 10:26:30 AM1/10/16
to open-lighting, fre...@voltvision.com
Aside from the 4/2 typo around slots at the end, it looks like it should work. If you mean 1 based slot numbering in your description (compared to 0 in ola_trigger) then I believe you're right. I think slot_value may need to be all lower case. It works through the slots in order, running their actions, so a slot 4 based variable would have the old value when slot 3 triggered.

I wonder if we should add some kind of scale command to ola_trigger, to simplify this sort of thing. Otherwise the Internet suggests this, then you can use the full channel/fader travel:
printf "%d\n" $(bc -q <<< 255/2)

I suspect most people only have a handle of DMX channels mapped to MIDI outputs, so don't hit issues with update frequency.

tom eagle

unread,
Jan 11, 2016, 12:09:42 AM1/11/16
to open-lighting, fre...@voltvision.com
I am having problems with the Trigger Config File:
# DMX2MIDI Trigger Config File
# Tom Eagle 20160110

# Variable definitions
###############################################################################
# slot 0 is MIDI Function (0 thru 7) * 16 MIDI Channel (0 thru 15)
#            0 = Note OFF Event
#            1 = Note ON Event
#            2 = Polyphonic Key Pressure (After-touch)
#            3 = Control Change
#            4 = Program Change
#            5 = Channel Pressure (After-Touch)
#            6 = Pitch Bend Change
#            7 = Channel Mode Messages
#
status = 48      #Which is Function 3, Channel 1 (0=>1)
#
# slot 1 is MIDI Control Unit (0 thru 127)
unit = 0
#
# slot 2 is Data Value (0 thru 127)
value = 0       #which is 0

# Triggers
###############################################################################
# Slot    Trigger Values   Action
# Header Slot 0 saves the current value of slot 0
0         %                status = "${slot_value}"
~
~
I am getting the message as follows:
pi@raspberrypi ~ $ ola_trigger -o 65 -l 4 test.config
tools/ola_trigger/ola-trigger.cpp:184: Loading config from test.config
./tools/ola_trigger/config.ypp:171: ERROR: syntax error at symbol "48" on line 31 column 11

It doesn't like the "48". It is going to take me a long time at this rate.

I started out with the attached file, but cut it to nothing.

Thanks, Tom

DMX2MIDI_Trigger_Config.txt

Peter Newman

unread,
Jan 11, 2016, 9:55:59 AM1/11/16
to open-lighting, fre...@voltvision.com
You need to quote the variables at the top, so "48" and the channel offsets are 1 based, so add one to each one and then it validates.

tom eagle

unread,
Jan 11, 2016, 4:53:16 PM1/11/16
to open-lighting, fre...@voltvision.com

Peter: Is the following corrections to https://www.openlighting.org/ola/advanced-topics/ola-dmx-trigger/ appropriate?


Slot Number


The first column, slot number, specifies the DMX512 slot the action is valid for. Slot numbers range from 0 to 511 (SHOULD BE 1 to 512). Slot numbers may be offset by using the –offset option (see the Usage section below).


Slot Values


The second column controls which DMX512 values trigger the action. Slot values range from 0 to 255. Multiple values are separated by commas. Ranges can be specified with a hyphen.

1,2,3,4   # Values 1 through to 4
1-4,10-14 # Values 1 to 4 and 10 to 14 (inclusive)

The % character the is default match. It triggers for all values that don’t have an explicit action configured


0-100  # Values 0 to 100
%      # Triggers for everything else (101 - 255)

Actions are only triggered when the value changes. In the example above (THERE IS NO COMPLETE EXAMPLE ABOVE), if the value of slot 0  (SHOULD BE slot 1) in the previous frame was 10, and a frame with slot 0  (SHOULD BE slot 1) @ 10 arrived, the action will not be triggered. If a frame with slot 0  (SHOULD BE slot 1) @ 5 arrives, the action will trigger again.

 

tom eagle

unread,
Jan 11, 2016, 7:19:31 PM1/11/16
to open-lighting, fre...@voltvision.com
I am making progress. I have attached the DMX2MIDI Trigger Config File. I am trying to find out how to test it out. I am getting the following:

pi@raspberrypi ~ $ ola_trigger -o 65 -l 4 DMX2MIDI.config
tools/ola_trigger/ola-trigger.cpp:184: Loading config from DMX2MIDI.config
common/io/SelectPoller.cpp:233: ss process time was 0.000003
common/io/SelectPoller.cpp:233: ss process time was 0.000004
common/io/SelectPoller.cpp:233: ss process time was 0.000005
common/io/SelectPoller.cpp:233: ss process time was 0.000005
common/io/SelectPoller.cpp:233: ss process time was 0.000005
common/io/SelectPoller.cpp:233: ss process time was 0.000004
common/io/SelectPoller.cpp:233: ss process time was 0.000005
^Ccommon/io/SelectPoller.cpp:233: ss process time was 8.689213   (Killed Process with a Control C)
pi@raspberrypi ~ $


Now I need to know how to get it into:  http://192.168.1.72:9090/ola.html



DMX2MIDI.config

Peter Newman

unread,
Jan 11, 2016, 8:21:02 PM1/11/16
to open-lighting, fre...@voltvision.com
Ah, yes probably Tom, I'll look at updating the website tomorrow. There are some real world examples here:

But it looks like you've got a valid config file now, so you either need to send some data on universe zero, the default, or use the -u/--universe option to make ola_trigger listen to another universe:

If you want to test without your network protocol, or physical dongle, if you patch the universe to the dummy plugin, it will allow it to exist with nothing else connected. Then you can go to the webpage and waggle some faders (or use ola_dmxconsole on the CLI).

tom eagle

unread,
Jan 11, 2016, 11:22:13 PM1/11/16
to open-lighting, fre...@voltvision.com
I need some live communication to understand some more in order to get it functioning.
I don't know where to find my echo output. Haven't found it yet.
Tom Eagle
816-524-4040 cell
Near Kansas City, Missouri

tom eagle

unread,
Jan 11, 2016, 11:37:25 PM1/11/16
to open-lighting, fre...@voltvision.com


 https://www.openlighting.org/ola/advanced-topics/ola-dmx-trigger/ has the following.

Usage

Before running ola_trigger, make sure that olad is running and the universe has been configured with a DMX512 source. The config file is provided on the command line:

ola_trigger example.conf

Some useful options include:

-l, –log-level <level>
This change the logging level, valid values are 0 (minimum logging) to 4 (full logs). At log level 3 (INFO) and above, all actions (variable assignments and commands) will be logged.
-o, –offset <slot_offset>
This applies an offset to the configured slots. For example if the config file contains definitions for slots 0 and 1, if ola_trigger is run with -o 10 it will watch for values on slots 10 and 11. Defaults to 0.
-u, –universe <universe>
Specifies the universe to use. Defaults to 1.

While http://docs.openlighting.org/ola/man/man1/ola_trigger.1.html has:

SYNOPSIS

ola_trigger [ options ] <config_file>  

DESCRIPTION

ola_trigger Run programs based on the values in a DMX stream.  

OPTIONS

-h, --help
Display the help message
-l, --log-level <int8_t>
Set the logging level 0 .. 4.
-o, --offset <uint16_t>
Apply an offset to the slot numbers. Valid offsets are 0 to 512, default is 0.
-u, --universe <uint32_t>
The universe to use, defaults to 0.
--validate
Validate the config file, rather than running it.
-v, --version
Display version information
--syslog
Send to syslog rather than stderr.
--no-use-epoll
Disable the use of epoll(), revert to select()
--no-use-kqueue
Disable the use of kqueue(), revert to select()
--scheduler-policy <policy>
The thread scheduling policy, one of {fifo, rr}.
--scheduler-priority <priority>
The thread priority, only used if --scheduler-policy is set.


tom eagle

unread,
Jan 11, 2016, 11:40:49 PM1/11/16
to open-lighting, fre...@voltvision.com
Sorry I am asking so many questions. I am getting something different depending upon the universe:

pi@raspberrypi ~ $ ola_trigger -o 65 -l 4 -u 0 DMX2MIDI.config

tools/ola_trigger/ola-trigger.cpp:184: Loading config from DMX2MIDI.config
common/io/SelectPoller.cpp:233: ss process time was 0.000004
common/io/SelectPoller.cpp:233: ss process time was 0.000005
common/io/SelectPoller.cpp:233: ss process time was 0.000004
^Ccommon/io/SelectPoller.cpp:233: ss process time was 3.745446
pi@raspberrypi ~ $ ola_trigger -o 65 -l 4 -u 1 DMX2MIDI.config

tools/ola_trigger/ola-trigger.cpp:184: Loading config from DMX2MIDI.config
common/io/SelectPoller.cpp:233: ss process time was 0.000005
tools/ola_trigger/VariableInterpolator.cpp:67: Unknown variable Slot_Value
Received Segmentation fault
/usr/lib/libolacommon.so.0(+0x82c6c)[0x76e5ac6c]
/lib/arm-linux-gnueabihf/libc.so.6(__default_sa_restorer_v2+0x0)[0x7699ab20]
/usr/lib/libolatrigger.so.0(_ZN13CommandAction7ExecuteEP7Contexth+0x17c)[0x76d98d6c]
/usr/lib/libolatrigger.so.0(_ZN4Slot10TakeActionEP7Contexth+0x8c)[0x76d99fdc]
/usr/lib/libolatrigger.so.0(_ZN10DMXTrigger6NewDMXERKN3ola9DmxBufferE+0x44)[0x76d9e310]
ola_trigger[0xebec]
ola_trigger[0xebb8]
/usr/lib/libola.so.1(_ZN3ola17OlaCallbackClient9HandleDMXERKNS_6client11DMXMetadataERKNS_9DmxBufferE+0x5c)[0x76dbd3e8]
/usr/lib/libola.so.1(+0x1779c)[0x76dbf79c]
/usr/lib/libola.so.1(+0x1776c)[0x76dbf76c]
/usr/lib/libola.so.1(_ZN3ola6client13OlaClientCore13UpdateDmxDataEPNS_3rpc13RpcControllerEPKNS_5proto7DmxDataEPNS5_3AckEPNS_18SingleUseCallback0IvEE+0x64)[0x76dc0918]
/usr/lib/libolacommon.so.0(_ZN3ola5proto16OlaClientService10CallMethodEPKN6google8protobuf16MethodDescriptorEPNS_3rpc13RpcControllerEPKNS3_7MessageEPSA_PNS_18SingleUseCallback0IvEE+0x118)[0x76f1f1ec]
/usr/lib/libolacommon.so.0(_ZN3ola3rpc10RpcChannel13HandleRequestEPNS0_10RpcMessageE+0x3a0)[0x76eeb910]
/usr/lib/libolacommon.so.0(_ZN3ola3rpc10RpcChannel12HandleNewMsgEPhj+0x404)[0x76eec490]
/usr/lib/libolacommon.so.0(_ZN3ola3rpc10RpcChannel15DescriptorReadyEv+0x174)[0x76eed0d4]
/usr/lib/libolacommon.so.0(+0x115a18)[0x76eeda18]
/usr/lib/libolacommon.so.0(+0x94480)[0x76e6c480]
/usr/lib/libolacommon.so.0(_ZN3ola2io27BidirectionalFileDescriptor11PerformReadEv+0x2c)[0x76e6722c]
/usr/lib/libolacommon.so.0(_ZN3ola2io12SelectPoller16CheckDescriptorsEP6fd_setS3_+0x224)[0x76e70428]
/usr/lib/libolacommon.so.0(_ZN3ola2io12SelectPoller4PollEPNS0_14TimeoutManagerERKNS_12TimeIntervalE+0x1f8)[0x76e7073c]
/usr/lib/libolacommon.so.0(_ZN3ola2io12SelectServer14CheckForEventsERKNS_12TimeIntervalE+0xac)[0x76e6cf64]
/usr/lib/libolacommon.so.0(_ZN3ola2io12SelectServer3RunEv+0x8c)[0x76e6d048]
ola_trigger[0xb0b8]
/lib/arm-linux-gnueabihf/libc.so.6(__libc_start_main+0x110)[0x7698481c]
pi@raspberrypi ~ $

tom eagle

unread,
Jan 11, 2016, 11:48:08 PM1/11/16
to open-lighting, fre...@voltvision.com
Attached are PDFs from the OLA Admin.
OLA Admin.pdf
OLA Admin-DMX Monitor Tab.pdf

Peter Newman

unread,
Jan 12, 2016, 7:42:39 AM1/12/16
to open-lighting, fre...@voltvision.com
The website and wiki documentation is out of date, the man page will be current, as it will (hopefully) get changed when people update the binaries, the other pages are harder to keep track of.

I'm guessing you don't have anything on universe 0?

We shouldn't be segfaulting, but as I said before, slot_value needs to be lower case, as per the documentation.

tom eagle

unread,
Jan 12, 2016, 7:34:18 PM1/12/16
to open-lighting, fre...@voltvision.com
Steve,
I forgot I had an MIDISPORT 2X2.
I did the following:
1)sudo apt-get install midisport-firmware
2) fxload midisport-firmware
3) rebooted the PI
4) pi@raspberrypi ~ $ lsusb
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 005: ID 0763:1002 Midiman MidiSport 2x2
pi@raspberrypi ~ $ amidi -l
Dir Device    Name
IO  hw:1,0,0  MidiSport 2x2 MIDI 1
IO  hw:1,0,1  MidiSport 2x2 MIDI 2
pi@raspberrypi ~ $ aconnect -i -o

client 0: 'System' [type=kernel]
    0 'Timer           '
    1 'Announce        '
client 14: 'Midi Through' [type=kernel]
    0 'Midi Through Port-0'
client 20: 'MidiSport 2x2' [type=kernel]
    0 'MidiSport 2x2 MIDI 1'
    1 'MidiSport 2x2 MIDI 2'
pi@raspberrypi ~ $ cat /proc/asound/cards

 0 [ALSA           ]: bcm2835 - bcm2835 ALSA
                      bcm2835 ALSA
 1 [M2x2           ]: USB-Audio - MidiSport 2x2
                      M-Audio MidiSport 2x2 at usb-3f980000.usb-1.3, full speed
pi@raspberrypi ~ $

The USB light on the 2X2 started blinking

Now I have a MIDI output device to work with.  I ordered the unit you suggested, but it will be a few days before it get here.

Now I need to find out what it is going to that to get MIDI coming out the port.

Thank You very much,

Tom


On Friday, January 8, 2016 at 10:10:26 AM UTC-6, Steve French wrote:

tom eagle

unread,
Jan 13, 2016, 2:00:01 AM1/13/16
to open-lighting, fre...@voltvision.com
Moving along!

When I do:
ola_trigger DMX2MIDI.config
The command does NOT produce any output and doesn't return to the command prompt.

The midi-out.c does take in the arguments and produces MIDI signals on the MIDISPORT 2X2 when I running it on the command.

DMX2MIDI.config
midi-out.c

Peter Newman

unread,
Jan 13, 2016, 11:56:00 AM1/13/16
to open-lighting, fre...@voltvision.com
You'll need to fix the spelling here:
midi_contorl_status="48"   #Which is MIDI Function 3, MIDI Channel 1 (0=>1)

and the case (and the spelling of status) of:
midi_control_tatus="${Slot_Value}"

and the case of:
midi_control_unit="${Slot_Value}"

You also need to change:
3         0-255          `/home/pi/midi-out midi_control_status midi_control_unit "0" ${slot_value}`

to:
3         0-255          `/home/pi/midi-out ${midi_control_status} ${midi_control_unit} "0" ${slot_value}`

You're currently passing the literal string midi_control_status to your program, which atoi will barf at, whereas you actually want to pass the value of channel 1, e.g. 42.

I'd also try with -l 4, which should give more info.

tom eagle

unread,
Jan 13, 2016, 7:15:49 PM1/13/16
to open-lighting, fre...@voltvision.com
I am having problems passing argument to midi-out:

pi@raspberrypi ~ $ ola_trigger -o 65 -u 1 DMX2MIDI.config

I get the following as an example:

midi_control_status/midi_control_unit/13/slot_value
0
13
0
80/0d/00

I have attached two current files.

If someone who has worked with ola_trigger could call me.  816-524-4040 or email me.

Thanks,
Tom
midi-out.c
DMX2MIDI.config

tom eagle

unread,
Jan 14, 2016, 7:56:47 PM1/14/16
to open-lighting, fre...@voltvision.com

Why is the /var/log/syslog, /var/log/user.log & /var/log/messages all getting this appended?

pi@raspberrypi /var/log $ tail messages
Jan 14 16:55:50 raspberrypi olad: plugins/e131/e131/DMPE131Inflator.cpp:122: Skipping packet with non-0 start code: 221
Jan 14 16:55:51 raspberrypi olad: plugins/e131/e131/DMPE131Inflator.cpp:122: Skipping packet with non-0 start code: 221
Jan 14 16:55:52 raspberrypi olad: plugins/e131/e131/DMPE131Inflator.cpp:122: Skipping packet with non-0 start code: 221
Jan 14 16:55:53 raspberrypi olad: plugins/e131/e131/DMPE131Inflator.cpp:122: Skipping packet with non-0 start code: 221
Jan 14 16:55:54 raspberrypi olad: plugins/e131/e131/DMPE131Inflator.cpp:122: Skipping packet with non-0 start code: 221
Jan 14 16:55:55 raspberrypi olad: plugins/e131/e131/DMPE131Inflator.cpp:122: Skipping packet with non-0 start code: 221
Jan 14 16:55:56 raspberrypi olad: plugins/e131/e131/DMPE131Inflator.cpp:122: Skipping packet with non-0 start code: 221
Jan 14 16:55:57 raspberrypi olad: plugins/e131/e131/DMPE131Inflator.cpp:122: Skipping packet with non-0 start code: 221
Jan 14 16:55:58 raspberrypi olad: plugins/e131/e131/DMPE131Inflator.cpp:122: Skipping packet with non-0 start code: 221
Jan 14 16:55:59 raspberrypi olad: plugins/e131/e131/DMPE131Inflator.cpp:122: Skipping packet with non-0 start code: 221
pi@raspberrypi /var/log $

 

Steve French of Volt Vision

unread,
Jan 15, 2016, 11:31:28 AM1/15/16
to open-l...@googlegroups.com
Tom,
I invited you to our midi->DMX repo..you probably need a bitbucket account (which is free).
Let me know if any problems...if I set you up as an admin, please dont delete the repository.

Sorry I havent been more help in your DMX->midi escapades....I have been working with a new client all week and things are going great, but it has kept me from playing with OLA midi stuff for now.  If you get stuck and need help, I have a programmer that I call on when I am willing to pay him for helping me.  My personal skills are definitely more hardware and less software...so all this software talk is always more learning for me.  Good luck and talk soon!

--
Respectfully,
frenchy (Steve French)

--

Sean Sill

unread,
Jan 15, 2016, 12:23:58 PM1/15/16
to open-lighting, fre...@voltvision.com
Some sources of E1.31 send a non zero start code. 0xDD == 221 Is the per slot priority packet sent by most ETC consoles. E1.31 devices that support it allow per slot priorities.

tom eagle

unread,
Jan 16, 2016, 8:12:38 PM1/16/16
to open-lighting

OK --- What would stop ola_trigger from triggering?

Packet are being displayed on the ola monitor.

Tom

tom eagle

unread,
Jan 17, 2016, 5:45:57 PM1/17/16
to open-lighting
I found out why I was not getting triggering.

Per the manual:


       -u, --universe <uint32_t>
              The universe to use, defaults to 0.

The default universe is 0.  I am not sure why the default is 0 because I think there is NO Universe 0.
When I changed to "-u 1" I started getting triggering.

tom eagle

unread,
Jan 17, 2016, 5:55:19 PM1/17/16
to open-lighting

The next big problems is the arguments associated with ola_trigger:

The use of ${slot_value} only passes the string "slot_value", not the value.  Here is an example:



# Triggers
###############################################################################
# Slot    Trigger Values   Action
# Header Slot 1 saves the current value of Slot 1
1         %                midi_control_status="${slot_value}"

# Header Slot 2 saves the current value of Slot 2
2         %                midi_control_unit="${slot_value}"

# Data Slot 3 prints the value of Slot 1, Slot 2 & Slot 3 if Slot 3 is changes
3         0-255          `echo ${midi_control_status} ${midi_control_unit} "0" ${slot_value}`

And here is the stderr I get:



common/io/SelectPoller.cpp:233: ss process time was 0.000004
tools/ola_trigger/Action.cpp:77: Executing: echo : ["midi_control_status", "midi_control_unit", "0", "slot_value"]
tools/ola_trigger/Action.cpp:131: child for echo is 3376
common/io/SelectPoller.cpp:233: ss process time was 0.000007
midi_control_status midi_control_unit 0 slot_value
common/io/SelectPoller.cpp:233: ss process time was 0.006265

QUESTION: What do I need to do to get the values of the arguments passed to `echo` ?

tom eagle

unread,
Jan 18, 2016, 12:49:06 AM1/18/16
to open-lighting
Peter,
Has ola_trigger been tested with a command that takes more than one argument.
  I noticed that all the examples I can find only have one argument (i.e. `echo "hi there"`).

WITH ONE ARGUMENT:
tools/ola_trigger/Action.cpp:131: child for echo is 4868
common/io/SelectPoller.cpp:233: ss process time was 0.000008
0 0 0 6
common/io/SelectPoller.cpp:233: ss process time was 0.006114
tools/ola_trigger/Action.cpp:77: Executing: echo : ["0 0 0 11"]
tools/ola_trigger/Action.cpp:131: child for echo is 4869
common/io/SelectPoller.cpp:233: ss process time was 0.000008
0 0 0 11
common/io/SelectPoller.cpp:233: ss process time was 0.005921
tools/ola_trigger/Action.cpp:77: Executing: echo : ["0 0 0 17"]
tools/ola_trigger/Action.cpp:131: child for echo is 4870
common/io/SelectPoller.cpp:233: ss process time was 0.000010
0 0 0 17

WITH MORE THAN ONE ARGUMENT:
pi@raspberrypi ~ $ ola_trigger -o 65 -l 4 -u 1 test_more_than_one_arg.config
tools/ola_trigger/ola-trigger.cpp:184: Loading config from test_more_than_one_arg.config
common/io/SelectPoller.cpp:233: ss process time was 0.000005

tools/ola_trigger/Action.cpp:77: Executing: echo : ["midi_control_status", "midi_control_unit", "0", "slot_value"]
tools/ola_trigger/Action.cpp:131: child for echo is 4904
tools/ola_trigger/Action.cpp:50: Setting midi_control_unit to "0"
tools/ola_trigger/Action.cpp:50: Setting midi_control_status to "0"
common/io/SelectPoller.cpp:233: ss process time was 0.000010
midi_control_status midi_control_unit 0 slot_value
common/io/SelectPoller.cpp:233: ss process time was 0.004328

tools/ola_trigger/Action.cpp:77: Executing: echo : ["midi_control_status", "midi_control_unit", "0", "slot_value"]
tools/ola_trigger/Action.cpp:131: child for echo is 4905

common/io/SelectPoller.cpp:233: ss process time was 0.000007
midi_control_status midi_control_unit 0 slot_value



test_more_than_one_arg.config
test_with_one_arg.config

Peter Newman

unread,
Jan 19, 2016, 8:48:30 PM1/19/16
to open-lighting
Hi Tom,

If you quote the arguments, it works fine:
3         0-255          `echo "${midi_control_status}" "${midi_control_unit}" "0" "${slot_value}"`

If you don't quote them, you'll see you get a load of ${} printed at the end when you ctrl+c; at a guess they're being passed to the shell rather the processed by OLA.

Regarding universes, OLA has a universe 0, although not all protocols may support it. I mentioned the 1/0 thing before .

It does look like we need to investigate how we handle unquoted options further, as the parsing seems to struggle with some simple examples of them.

tom eagle

unread,
Jan 20, 2016, 6:53:25 PM1/20/16
to open-lighting
Peter,
Thanks for helping me out.  The quoted arguments are working. I taught I had tried with the quoted argument, but I guess I didn't.

I understand the universe. I just had universe 1 defined in ola.html.

My dmx2midi is working!!!

Thanks, Tom

tom eagle

unread,
Jan 20, 2016, 7:02:01 PM1/20/16
to open-lighting


Is there a way to stop the following from being logged in to /var/log/syslog, /var/log/user.log & /var/log/messages.  Same messages are being logged to all three logs.

Jan 20 15:54:52 raspberrypi olad: plugins/e131/e131/DMPE131Inflator.cpp:122: Skipping packet with non-0 start code: 221
Jan 20 15:54:53 raspberrypi olad: plugins/e131/e131/DMPE131Inflator.cpp:122: Skipping packet with non-0 start code: 221
Jan 20 15:54:54 raspberrypi olad: plugins/e131/e131/DMPE131Inflator.cpp:122: Skipping packet with non-0 start code: 221
Jan 20 15:54:55 raspberrypi olad: plugins/e131/e131/DMPE131Inflator.cpp:122: Skipping packet with non-0 start code: 221
Jan 20 15:54:56 raspberrypi olad: plugins/e131/e131/DMPE131Inflator.cpp:122: Skipping packet with non-0 start code: 221

Sean explained what is causing it:

Peter Newman

unread,
Jan 20, 2016, 8:57:19 PM1/20/16
to open-lighting
Great, glad to hear it's working Tom.

The message is at info level, so if you just reduce your logging, it will stop emitting it (or you could get a different console :) ). -l 2 will do the job when launching olad (probably via init.d I guess).

I'd be kind of curious of the top 10 output of this:
cut -c 17- /var/log/syslog | grep olad | sort | uniq -c -d

Is that log line just far more frequent because you're getting it once per frame?

tom eagle

unread,
Jan 20, 2016, 9:29:12 PM1/20/16
to open-lighting
pi@raspberrypi /var/log $ cut -c 17- /var/log/syslog | grep olad | sort | uniq -c -d
      4 raspberrypi olad: olad/Universe.cpp:322: Added sink client, 0x144b9e0 to universe 1
      8 raspberrypi olad: olad/Universe.cpp:322: Added sink client, 0x1462a80 to universe 1
      4 raspberrypi olad: olad/Universe.cpp:322: Added sink client, 0x146f000 to universe 1
      8 raspberrypi olad: olad/Universe.cpp:322: Added sink client, 0x146f068 to universe 1
      4 raspberrypi olad: olad/Universe.cpp:343: Sink client 0x144b9e0 has been removed from uni 1
      8 raspberrypi olad: olad/Universe.cpp:343: Sink client 0x1462a80 has been removed from uni 1
      4 raspberrypi olad: olad/Universe.cpp:343: Sink client 0x146f000 has been removed from uni 1
      8 raspberrypi olad: olad/Universe.cpp:343: Sink client 0x146f068 has been removed from uni 1
  13372 raspberrypi olad: plugins/e131/e131/DMPE131Inflator.cpp:122: Skipping packet with non-0 start code: 221
pi@raspberrypi /var/log $

tom eagle

unread,
Jan 21, 2016, 12:28:47 AM1/21/16
to open-lighting
Peter:
pi@raspberrypi ~ $ ola_trigger -u 1 -l 2 -o 64 dm.config
DOES NOT STOP the messages in all three logs. I don't understand why the same thing appears in all three logs.
Thanks, Tom


On Wednesday, January 20, 2016 at 7:57:19 PM UTC-6, Peter Newman wrote:

Peter Newman

unread,
Jan 21, 2016, 8:39:56 AM1/21/16
to open-lighting
The message is coming from olad Tom, not ola_trigger, so you need to change olad's log level.

I don't really understand why it's in three logs either, or why you have three, but that's an OS specific thing.

Reply all
Reply to author
Forward
0 new messages