Custom Firmware on the OP-1

I’m on linux so I wouldn’t be able to run Illustrator even if I had it. There’s a mac at work with Illustrator though.

As @mathelev pointed out the original files have been done with Illustrator. I’m not sure what the export options should be though.

The script I wrote is mainly targeting Inkscape files. However I think it would be possible to make it convert most SVG files to the correct format. That would be hard to do, since the SVG would first have to be parsed, and then all the elements would need to be reformatted and then output in the simple format that the OP-1 understands. That includes removing some things entirely. Also I’m not sure if I’m up to the task or have enough time…

As far as I can remember we don’t know what the SVG parser is. To be honest I think it’s a custom parser written by TE. Why? Because of the strings in the firmware file:
<span style=“background-color: rgb(255, 255, 255); font-family: “Courier New”; font-size: x-small;”>…\src\gui\3rdp\rapidxml-1.13\rapidxml.hpp:592 memory
<span style=“background-color: rgb(255, 255, 255); font-family: “Courier New”; font-size: x-small;”>…\src\gui\lib\Parser.cpp:577 Can’t decode id %s in SVG document %s.Non-ASCII character in group/object id?

Looks like they use rapidxml for the XML part of the SVG files (note it’s in a directory called “3rdp” which means third party. The parser on the other hand is just in a directory called “lib” and no mention of third party there.

The best option would probably be to just use Inkscape and figure out what the export options should be.
EDIT: I just ran the finger sequencer SVG through op1svg. It uses a python library (svg.path) to parse the paths and for some reason that library just crashes with this file :confused:

Well the modified graphics I posted way back when were done in illustrator CS4 by my gf.
So I’ll ask her about what settings she used.
I only know that you can’t get too crazy and need to keep layers and groups intact.

1 Like

I made a script that goes through all the original SVG files and lists every tag and attribute that’s used in them. So at least these tags can be used (i think that “defs” and “clipPath” and “use” might not have any effect.
Tags:
<span style=“font-family: “Courier New”; font-size: x-small;”> svg, g, path, circle, line, polyline, ellipse, polygon, rect, defs, clipPath, use

Attributes:
<span style=“font-size: x-small; font-family: “Courier New”;”> version, id, x, y, width, height, viewBox, enable-background, space, fill, stroke, d,

<span style=“font-size: x-small; font-family: “Courier New”;”> stroke-width, cx, cy, r, x1, y1, x2, y2, stroke-dasharray, display, stroke-linecap, points,
<span style=“font-size: x-small; font-family: “Courier New”;”> rx, ry, stroke-linejoin, stroke-miterlimit, href, overflow, clip-path, opacity, transform

I think that most of those are supported but some are probably left overs from Illustrator. I’m pretty sure that “stroke-dasharray” has no effect. What’s weird is that I thought transform isn’t supported at all. However one part of the tonearm in album.svg has a matrix transform which seems to work fine (it rotates the weight rectangle of the tone arm to the correct angle). I also found “transform”, “matrix” and “translate” in the firmware file which indicates that they probably are supported.

Here’s a list of strings that are SVG related within the firmware code:

<span style=“font-family: “Courier New”; font-size: x-small;”>none
<span style=“font-family: “Courier New”; font-size: x-small;”>opacity
<span style=“font-family: “Courier New”; font-size: x-small;”>stroke
<span style=“font-family: “Courier New”; font-size: x-small;”>stroke-width
<span style=“font-family: “Courier New”; font-size: x-small;”>stroke-linecap
<span style=“font-family: “Courier New”; font-size: x-small;”>butt
<span style=“font-family: “Courier New”; font-size: x-small;”>round
<span style=“font-family: “Courier New”; font-size: x-small;”>square
<span style=“font-family: “Courier New”; font-size: x-small;”>inherit
<span style=“font-family: “Courier New”; font-size: x-small;”>miter
<span style=“font-family: “Courier New”; font-size: x-small;”>belvel <- EDIT: WTF, belvel? It should be bevel… Maybe their custom parser has a typo in it.
<span style=“font-family: “Courier New”; font-size: x-small;”>fill
<span style=“font-family: “Courier New”; font-size: x-small;”>transform
<span style=“font-family: “Courier New”; font-size: x-small;”>matrix
<span style=“font-family: “Courier New”; font-size: x-small;”>translate
<span style=“font-family: “Courier New”; font-size: x-small;”>scale
<span style=“font-family: “Courier New”; font-size: x-small;”>width
<span style=“font-family: “Courier New”; font-size: x-small;”>height
<span style=“font-family: “Courier New”; font-size: x-small;”>viewBox
<span style=“font-family: “Courier New”; font-size: x-small;”>line
<span style=“font-family: “Courier New”; font-size: x-small;”>polyline
<span style=“font-family: “Courier New”; font-size: x-small;”>points
<span style=“font-family: “Courier New”; font-size: x-small;”>polygon
<span style=“font-family: “Courier New”; font-size: x-small;”>ellipse
<span style=“font-family: “Courier New”; font-size: x-small;”>circle
<span style=“font-family: “Courier New”; font-size: x-small;”>rect
<span style=“font-family: “Courier New”; font-size: x-small;”>path

So there’s a decent amount of clues now for figuring out what can’t be used and what SVG features should work. Also right now op1svg doesn’t even use XML to parse the input files so I should probably rewrite it to be more robust. That shouldn’t be too hard with this information.

EDIT2: Regardint the “transform” attribute: I’m pretty sure the problem that I had was that the transform was applied to a group element instead of each sub element. Maybe removing the transform from a group and inserting it into all sub-elements will work. That would make life easier…
So my gf says she used the layers in Illustrator as they are, did not rename, delete or add any layers and used the feature that you can hide layers to see what part of the finger sequencer she was editing.

Also, open the original files from the OP-1 in Illustrator and work with that. Do not open+save in Inkscape because it garbles the files hardcore.
1 Like
svg tags:
  • line
  • polyline
  • points
  • polygon
  • ellipse - cx, cy, rx, ry
  • circle - cx, cy, r
  • rect - x1, y1, x2, y2
  • path
  • g (group)
  • defs - (holds symbols or clippaths or basically anything reusable)
  • use (href or xlink:href)
stroke-related attributes
  • stroke
  • stroke-width
  • stroke-dasharray
  • stroke-linecap (values below)
    • butt
    • round
    • square
    • inherit
    • miter
    • belvel (should be "bevel" really
other common object attributes
  • fill
  • opacity
  • transform (e.g. transform="scale(0.5 0.5) translate(1 -1)")
    • matrix
    • translate
    • scale
svg or symbol -level attributes (also used for tags)
  • width
  • height
  • viewBox
zero value for e.g. stroke, fill, etc
  • none

this is actually pretty good.
Group transforms are pretty standard in svg, so I would expect them to work



Hmm I see. Quite complicated.


It seems that op1svg fails by one of the regexs returning an empty list. @wavi is right in pointing out that some xml tree structure (i.e with lxml) would be more robust. But that is a big rewrite of the code. If I just had more time I would have looked into the regex errors.

Hmm, seems complicated.
I made a script (attached) to test ‘op1svg’ (jan. 12 commit) on all the default svg files and return the ones that fail:

  • reroutelfo.svg failed
  • ftwo.svg failed
  • singlelfo.svg failed
  • ok.svg failed
  • rndlfo.svg failed
  • dsynth.svg failed
  • dbox.svg failed
  • sketch.svg failed
  • fm.svg failed
  • com.svg failed
  • help.svg failed
  • cls.svg failed

is it possible to include external trigger for the Sequencers?? jus realised that this is not possible…

Bit of a long shot… but would it be possible to get the old beta arp in the current firmware? Also, was the updated tremolo LFO included in the 076 beta, or did that come later in 218?

@cretakano I don’t believe that would be possible, because that would require swapping out the current arp code with the older arp code. That would mean we would need access to the source code, which is not the case. The code gets compiled, which makes it readable to the OP-1 hardware, but renders it unreadable to humans. I don’t think anyone has gotten anything decompiled and understood yet.

Decompiled: yes/no (at least the boot loader)
Understood: no (but most parts of the boot loader)

Ah that’s a shame… just downgraded to that old beta and the arp was so much better with 8 steps, wish they had kept it for the final version.

@cretakano said:
Ah that’s a shame… just downgraded to that old beta and the arp was so much better with 8 steps, wish they had kept it for the final version.

Hmm, yeah would love to find out why they turfed it. If there was an LFO mod option on the arp step settings, it would really expand it.

@analogue86 said:
is it possible to include external trigger for the Sequencers?? jus realised that this is not possible…

This would be great

@analogue86 said:
is it possible to include external trigger for the Sequencers?? jus realised that this is not possible…

You should submit that to TE directly. That would be great to have

What a crazy thread, I will have to read this through multiple times. Great read.

I can’t believe TE haven’t implemented the option to modify the “onboard” default synth presets on the OP-1. This is such a deal breaker for me. It’s only a handful of those sounds I would ever want to put in my own music anyway.

Will have to study this thread thouroughly to understand how I can circumvent this handicap of the machine

@soren88 this thread won’t tell you much on how to modify the algorithms that create the sounds of the onboard synths and drum machines. That is not anything that has been cracked on this thread. If you want to learn how to easily enable an extra effect and synth or modify the images that show up on the screen, that is in this thread.

@GCF said:
@soren88 this thread won’t tell you much on how to modify the algorithms that create the sounds of the onboard synths and drum machines. That is not anything that has been cracked on this thread. If you want to learn how to easily enable an extra effect and synth or modify the images that show up on the screen, that is in this thread.

I don’t intend to mess with the actual DSP algorithms, just modify the already existing parameters so that all the default synth patches are to my liking.