Page 1 of 1

Windows Clipboard Collection.

Posted: Mon Dec 23, 2013 9:04 pm
by trogluddite
Seasons greetings everyone,

As is now a well established tradition at this time of year, I have prepared something a little special for you to play with over the holidays...

Ever wished you could just cut and paste a CSV list straight into an array - no messing with a text box; just click - and it's in there - or if you could copy and paste data that's a PITA to convert to text like a Color or Font - or take the settings of an oscillator and paste them into another (and not accidentally into your filter - or text document!).

Now you can, with the new Clipboard module collection...
Clipboard release 001.fsm
Tested on Flowstone v3.0.3 (Raindrop) and v3.0.4 (Bluebird)
(159.25 KiB) Downloaded 1634 times

NB - I advise NOT to use this download for the time being, as there seems to be a bug in FlowStone when calling dlls from exported files - this has been reported, and I'll let you know if/when this is fixed!

This is not some cheat using a hidden file somewhere, it is all done using Windows' own clipboard, and taking advantage of its many features... :ugeek:

- Copy/Paste between applications and VST instances.
- All data is tagged with a format label, so you can always be sure what is there and whether the data is appropriate.
- Data can be stored in multiple formats at once - store an Array as a 'green' Float Array, Ruby Array object and a CSV String for pasting into other app's - all at the same time.
- Parse data from alternative clipboard formats. Can't find a String Array anywhere on the clipboard? - never mind, maybe there's a CSV string on there that you could parse, or a Ruby array that could have it's numbers turned into strings.
- Custom format types for data that you want to keep to yourself! - e.g. 'FILTER' data that will copy/paste your filter settings, but won't accidentally paste into your envelopes.
- Modules for most of the 'green/yellow/red' data types - no coding required!
- Ruby API that can be used in any RubyEdit instance for those who prefer to code.
- Master module that is also a Clipboard viewer, so you can always see what's going on.

The download is complete with User Guide and some examples to get you started,

Bah Humbug, and all that ;) :twisted:

Trog.

Re: Windows Clipboard Collection.

Posted: Mon Dec 23, 2013 10:13 pm
by tester
Nice one, thanks.

Re: Windows Clipboard Collection.

Posted: Tue Dec 24, 2013 12:33 pm
by Jay
Hi

Thank you very much for these Trogg! it looks like a fair bit of work has gone into making this! really cool and very very useful indeed.

Have a happy Paganfest whatever you are up to m8! :D

cheers!

Re: Windows Clipboard Collection.

Posted: Tue Dec 24, 2013 1:53 pm
by trogluddite
Cheers guys, :D
Jay wrote:It looks like a fair bit of work has gone into making this!

Well, as always, "standing on the shoulders of giants" helps a lot- much of the credit is deserved by these guys...
- Daniel Berger - his posts at Ruby forum finally got my head around using the win32API class to call Windows routines.
- erm, Microsoft! :shock: . Yes, hate to admit it, but the Windows API for the clipboard is rather tasty! For example, when you paste ASCII text, you'll also see a Unicode text entry in the clipboard. Nothing to do with me; Windows does that for you automatically so that text will always paste between app's with different text encoding - very neat!

What it really needs now are some better Keyboard routines - i.e. a proper 'key-pressed' callback, so that we could use the standard Ctrl-C, Ctrl-V shortcuts. The current lack of "keyboard focus" for FS windows really gets in the way of this.

Jay wrote:Have a happy Paganfest whatever you are up to m8!

He he - well I agree with the druids on one thing - the solstice is the big day for me. Just knowing that the shortest day is gone instantly puts me in a better mood - to and from work each day in the dark doesn't last forever!

Re: Windows Clipboard Collection.

Posted: Thu Dec 26, 2013 12:07 pm
by adamszabo
great stuff thank you! And merry christmas to you and everybody!

Re: Windows Clipboard Collection.

Posted: Thu Feb 06, 2014 9:04 pm
by Perfect Human Interface
Recently realized this functionality would be nice to have, and lo and behold... Awesome to see that it works with standard Windows notation (e.g. you can copy .567 right from this post and it will paste in no problem).

Did you know that FL Studio has copy/paste clipboard functions on all their standard controls? This is fully compatible... :) Great work!!

Re: Windows Clipboard Collection.

Posted: Thu Feb 06, 2014 9:36 pm
by RJHollins
When TROG first posted this, it was like WOW ... this looks serious !

Haven't a clue how to use it :lol: So I went back to working on my little things ...

Brought back to our attention [thank-you] ... and on second look ... still no clue how to use it .... BUT ...

I wondered ...

If this is moving data into and out of the 'clipboard' ... does this open the possibility of 2 FS apps/plugins to communicate [via the clipboard] and share/trade data ?? Just wondering ...

Another question ...

I'm finding that I need to grab FS items between 2 different FS projects. Sometimes I run 2 instances of FS to help me see how I have things wired or named.

The problem ... being 2 separate instances ... there is NO copy/paste between them ... so, I have to have an additional copy running on the main FS [so I can flip between to grab and flip back to paste].

Is there a better way ?

Re: Windows Clipboard Collection.

Posted: Fri Jun 20, 2014 3:54 pm
by trogluddite
Hi all,
FYI - I've found a bug in FlowStone when calling Windows dll's from exported EXE and VSTs, so I'd advise not to use these modules for the time being - 'll let you know if/when the bug is fixed.

RJHollins wrote:does this open the possibility of 2 FS apps/plugins to communicate [via the clipboard] and share/trade data ?? Just wondering ...

Yes, it does - but actually there's a better way that I'm working on that lets different applications share a block of memory - which is blisteringly fast. Sadly, this is subject to the same bug noted above, so we'll have to see what Malc can do about getting that fixed.

RJHollins wrote:being 2 separate instances ... there is NO copy/paste between them

I don't think there's any way that we can improve on that - I find it very frustrating too. We just don't have deep enough access to the schematic to turn the data into something that the clipboard can use - and the FS cut/paste seems to use a custom system that's independent of the main Windows clipboard.