PnS Drag n Drop

Official support for: bluecataudio.com
RELATED
PRODUCTS

Post

Hello! thanks for the heads up.
(1) is really odd. I'll have to double check, but it could actually be a bug in MacOS (our framework entirely relies on the OS for drawing the stuff being dragged).
(2) is actually a known issue that was discovered recently and we already have a fix for that. The fix should make it into the next preview, unless you find other horrible issues to keep the Blue Cat busy :-)

Post

It looks like a very nice plug-in by the way! :-)

Post

Hi :-)

>>unless you find other horrible issues to keep the Blue Cat busy :-)<<
well, yes sorry if I am causing trouble, heheh :-D No, honestly, I usually try to fix things by myself as good as possible, but in these cases I couldn't find a kuiml-solution or workaround... Imagine, in the real plugin (not that dragtest-demo) there is a 7x12 matrix of these drag sources, and they are really tiny. Took me some days to strip the plugin code down to something reproduceable and find out that it's the widget border causing trouble :-D
However:
2) great, I am looking forward to working with the new version
1) OK, could be, yes. I don't care having a non-draggeable border...but this strange behaviour of catching drag sources while having clicked somewhere else and then hovering over them. As it has also something to do with mouse click processing ... maybe the fix of 2) also fixes 1) for me.

Thanks !
Rudi
http://www.pulpoaudio.com
Virtual Percussion Instruments
email: pulpo@pulpoaudio.com

Post

All right, found the bug for issue #2!

There is indeed a small area around the border of any widget (width is dependent o system, but on Mac it is typically 2 pixels wide) where drag will not start, unless you drag towards the inside of the widget. It has been fixed and will be included in the next preview, hopefully soon!

I guess we've been using mostly pretty large widgets for drag and drop so far, so it was not noticed earlier. Thanks for reporting this bug!

Post

Fantastic! 😊
http://www.pulpoaudio.com
Virtual Percussion Instruments
email: pulpo@pulpoaudio.com

Post

The PnS preview has just been updated and should include both fixes (and more).

If you have the opportunity to try it out, can you pleases tell me if it works for you too?

Enjoy! :party:

Post

...ooooh ... didn't see this post :-O will install and test asap and let you know , thnx
http://www.pulpoaudio.com
Virtual Percussion Instruments
email: pulpo@pulpoaudio.com

Post

Hi there :-)

so, from fist view everything seems to be fine. File DnD to Logic works like a charm, DnD from "near-the-border-edge" on Mac as well. Good Job, thanks a lot ! Got my plugin so far that I can make a PoC

Ehhhm....but.... :-D ... (sorry, sorry) i'm not absolutely sure if it's an issue with the newest Preview ... i found 2 things:

- For the plugin background I had a colour gradient from blue to orange (or so...) which suddenly isn't there anymore. Instead, I can see a tiny, thin orange line at the top, the rest is blue, no transition from one colour to another. Admittedly, I am using Ilyas Letimix skin to set this gradient, so it may also be an issue between both PnS and Letimix .... or even my fault, but I tried to set up a new PlugIn UI from scratch and it didn't work as it did before.

- Another thing (this may go directly @Ilya, if I am not mistaken): I am using a letimix-font "Bellota" for the title line of the plugin. Shows fine during development, but when I export the plugin and open it in Logic, the title shows with a different font. Probably with "Raleway-ExtraLight.ttf", which is the only entry in the "fonts" folder of the exported package (/Users/rudi/Library/Audio/Plug-Ins/Components/Guajeo AU.component/Contents/Resources/Guajeo AU data/Skins/LetiMix/fonts).
Bellota is nowhere in the package, so I think it actually can't display with this font.
Included Bellota-Regular.otf from the letimix skin into this folder, but no effect.
What can I do here ?

Thanks again&Cheers
Rudi
http://www.pulpoaudio.com
Virtual Percussion Instruments
email: pulpo@pulpoaudio.com

Post

Thanks for testing, glad that it works!

Regarding the gradient, if Ilya is using SVG, there has indeed been some changes in the latest implementation because it was not fully compatible with the svg specification, so maybe the Letimix skin is impacted.

For the font I guess you will indeed want to get in touch with Ilya - there is nothing we can do about it here.

Post

Hey guys! Thanks for the reporting, yes, definitely gradient backgrounds are not working with the latest update, will remake them using CANVAS I guess, can take some time!
Regarding fonts exporting I'll take a look as well, you can BTW send me a copy of your export log to support at letimix.com, it usually contains a lot of info what objects were copied and why.

Post

Fixing SVG gradients turned out to be fast, until the next update to LM Skin is out you can just replace this piece of a code in "LetiMix/common.inc" if you're using latest PnS preview.

<!-- Custom Gradient-capable Background -->
<TEMPLATE id="SVG_GRADIENT" type="1" opacity="1" color1="#EEEEEE" color2="#000000" opacity1="1" opacity2="1" pos1="0" pos2="100" shift="0">
<!-- vertical up-down -->
<LV id="x1" value="0" />
<LV id="y1" value="0" />
<LV id="y2" value="100" />
<LV id="x2" value="0" />
<LV id="gcolor1" value="$color1$" />
<LV id="gcolor2" value="$color2$" />
<LV id="gopacity1" value="$opacity1$" />
<LV id="gopacity2" value="$opacity2$" />
<LV id="s1" formula="$pos1$+$shift$" /> <!-- stop positions -->
<LV id="s2" formula="$pos2$+$shift$" />
<LV id="s3" value="100+$shift$" />
<LV id="s4" value="100+$shift$" />
<!-- flat (no gradient, fill with primary color) -->
<REPEAT count="($type$ == 0)" index_name="_i00_">
<LV id="gcolor2" value="$color1$" />
<!-- <LV id="gopacity1" value="1" /> ignore color1 opacity (use global) -->
<LV id="gopacity2" value="$gopacity1$" />
<LV id="s1" value="0" />
<LV id="s2" value="100" />
</REPEAT>
<!-- vertical up-down -->
<REPEAT count="($type$ == 1)" index_name="_i01_">
<LV id="x1" value="0" />
<LV id="y1" value="0" />
<LV id="y2" value="100" />
<LV id="x2" value="0" />
</REPEAT>
<!-- vertical down-up -->
<REPEAT count="($type$ == 2)" index_name="_i02_">
<LV id="x1" value="0" />
<LV id="y1" value="100" />
<LV id="y2" value="0" />
<LV id="x2" value="0" />
</REPEAT>
<!-- vertical edges-center -->
<REPEAT count="($type$ == 3)" index_name="_i03_">
<LV id="s2" formula="-50+$pos2$+$shift$" />
<LV id="s3" formula="150-$pos2$+$shift$" />
<LV id="s4" formula="100-$pos1$+$shift$" />
</REPEAT>
<!-- vertical center-edges -->
<REPEAT count="($type$ == 4)" index_name="_i04_">
<LV id="s1" formula="100-$pos2$+$shift$" />
<LV id="s2" formula="50-$pos1$+$shift$" />
<LV id="s3" formula="50+$pos1$+$shift$" />
<LV id="s4" formula="$pos2$+$shift$" />
<LV id="gcolor1" value="$color2$" />
<LV id="gcolor2" value="$color1$" />
<LV id="gopacity1" value="$opacity2$" />
<LV id="gopacity2" value="$opacity1$" />
</REPEAT>

<!-- horizontal left-right -->
<REPEAT count="($type$ == 5)" index_name="_i05_">
<LV id="x1" value="0" />
<LV id="y1" value="0" />
<LV id="y2" value="0" />
<LV id="x2" value="100" />
</REPEAT>
<!-- horizontal right-left -->
<REPEAT count="($type$ == 6)" index_name="_i06_">
<LV id="x1" value="100" />
<LV id="y1" value="0" />
<LV id="y2" value="0" />
<LV id="x2" value="0" />
</REPEAT>
<!-- horizontal edges-center -->
<REPEAT count="($type$ == 7)" index_name="_i07_">
<LV id="x1" value="0" />
<LV id="y1" value="0" />
<LV id="y2" value="0" />
<LV id="x2" value="100" />
<LV id="s2" formula="-50+$pos2$+$shift$" />
<LV id="s3" formula="150-$pos2$+$shift$" />
<LV id="s4" formula="100-$pos1$+$shift$" />
</REPEAT>
<!-- horizontal center-edges -->
<REPEAT count="($type$ == 8 )" index_name="_i08_">
<LV id="x1" value="0" />
<LV id="y1" value="0" />
<LV id="y2" value="0" />
<LV id="x2" value="100" />
<LV id="gcolor1" value="$color2$" />
<LV id="gcolor2" value="$color1$" />
<LV id="gopacity1" value="$opacity2$" />
<LV id="gopacity2" value="$opacity1$" />
<LV id="s1" formula="100-$pos2$+$shift$" />
<LV id="s2" formula="50-$pos1$+$shift$" />
<LV id="s3" formula="50+$pos1$+$shift$" />
<LV id="s4" formula="$pos2$+$shift$" />
</REPEAT>

<!-- show gradient -->
<svg width="100%" height="100%" opacity="$opacity$">
<linearGradient id="grad" x1="$x1$%" x2="$x2$%" y1="$y1$%" y2="$y2$%">
<stop offset="$s1$%" stop-color="$gcolor1$" stop-opacity="$gopacity1$" />
<stop offset="$s2$%" stop-color="$gcolor2$" stop-opacity="$gopacity2$" />
<stop offset="$s3$%" stop-color="$gcolor2$" stop-opacity="$gopacity2$" />
<stop offset="$s4$%" stop-color="$gcolor1$" stop-opacity="$gopacity1$" />
</linearGradient>
<rect fill="url(#grad)" width="100%" height="100%" />
</svg>

</TEMPLATE>

Post

Thanks for jumping in! The changes in gradients are indeed not a big deal (unless there is a bug). They have just been fixed to be compliant with the SVG spec.

Post

A long run on this topic, I've been digging into that a bit while generating midi data, and I can't seem to drag that data from my plugin window, it's most likely an applicative_type issue. So far I've identified only system::filePath and system::text, the first most likely doesn't fit, the second doesn't seem to be accepted (I'm using an output string containing my midi smf encoded data). Do I need to encode my string into something else (base64 or anything), or is there an applictive_type matching the midi mime type ?

Thaaanks,
Altar
Never attribute to malice that which is adequately explained by stupidity.

Post

I'm actually not sure if there is a portable way to do that, ended up creating files in system's temporary folder, and using the filePath in the draggable item tag so the DAW properly interprets it as dropping a file to a track.
Pretty simple, a bit less elegant that making something straight using system routines, but I'm not even sure it's doable...
For example, dragging a midi clip from bitwig to the outside world doesn't create a midi file, only an internal bitwig blob that is useless outside BW (used pasteboard viewer to figure that out)
Never attribute to malice that which is adequately explained by stupidity.

Post

I believe the only way to do it is indeed to use temporary files. I don't think there is a standard way of passing binary MIDI data between apps directly.

Post Reply

Return to “Blue Cat Audio”