|
|
|
04-21-2008, 09:07 PM
|
#1
|
Human being with feelings
Join Date: Mar 2007
Posts: 794
|
Please help me - advice/help: basic plug-in.
Please help me if you can...
Please excuse my total lack of correct terminology here!
I want to make a plug-in (or if you want to volunteer...) that seems, that it could be, very simple:
1. It is a picture (either a bitmap/png/etc) or just 'screen colour' (no pic.) that displays some static buttons (they do not need to move).
2. Each button needs one or two text labels.
3. The text labels need to change (the text they display) depending on the MIDI note received from MIDI-IN.
4. The MIDI-IN data needs to be passed to REAPER (as it is control surface data). Whether this is 'copied' to the plug-in or sent to the plug-in and then on to REAPER I have no idea.
Please help if you can - I have no idea how to do any of the above
If we can make this work this WILL add a much-needed feature to REAPER.
Thank you!
Deric.
__________________
REAPER? Oh yes...
|
|
|
04-21-2008, 11:42 PM
|
#2
|
Human being with feelings
Join Date: Nov 2007
Location: Cologne/Bangkok
Posts: 1,258
|
i didn´t really get what or for what you exactly need that, but have you checked the (freeware) plugin market? kvraudio for example.
there are several plugins/programs to controll midi in/out i think.
greez kainer
|
|
|
04-22-2008, 12:05 AM
|
#3
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
Well, I don't know what Deric is up to, either... But if it's some sort of MIDI Monitor-thing, it could work better this way than if it was a VST-plugin. Having it as a Reaper Extension plugin would dismiss the need for the user to insert the plugin into a track's FX-chain etc...It would be a simple togglable window in Reaper.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
|
|
|
04-22-2008, 03:12 AM
|
#4
|
Human being with feelings
Join Date: Mar 2007
Posts: 794
|
Please come back!
Hi,
This is what it's for:
I've been working on control surface map (for REAPER, obviously) and the biggest problem with any control surface map - especially complicated/flexible set-ups is that it's almost impossible to remember which keys do what and what 'mode' you're in.
I will be posting the latest map for the 01X in the next day or so - but then want to be able to work on a 'plug-in' (of some description) that is a representation of the control surface's buttons and controls.
1. The representation will show a bunch of buttons.
2. Each button will have a text label.
3. The text label will reflect the function of each button.
4. As the user changes the 'mode' the control surface is in (by pressing buttons on the control surface) the function(s) of the buttons will also change.
5. The 'plug-in' will need to then change the labels on the buttons to reflect the 'new' function(s) of the buttons. (for the mode the user has put the control surface in).
I hope this is easy to understand... I want a plug-in that is just some text and 'dumb' buttons. The labels of the buttons need to change depending on the MIDI messages received. (each button press sends out a MIDI message, combinations of buttons send out several MIDI messages).
Xenakios - a toggle-able window would be ideal!
Please let me know if you need any more info... but I just either need someone to help, or to help by pushing me in the right direction... I have NO IDEA where to even start to make a plugin...
Please help!
__________________
REAPER? Oh yes...
|
|
|
04-22-2008, 05:45 AM
|
#5
|
Human being with feelings
Join Date: Dec 2007
Location: In church, burning it down
Posts: 1,345
|
Deric infact to do what you want to do you could also just have a folder with a bunch of images too
The images would all be the same except that each one would have different text below its buttons+dials
So basically when you put the controller into a different mode it would display a different image
I'm not sure but i think that may well be easier to implement
NAS
__________________
Not Gods or Saints but HUMAN be
|
|
|
04-22-2008, 09:06 AM
|
#6
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
Well, I am afraid Deric needs to know the whole ordeal about creating dialog windows, putting stuff on them etc...I don't even know where to begin to explain all that...
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
|
|
|
04-22-2008, 09:11 AM
|
#7
|
Human being with feelings
Join Date: Mar 2007
Posts: 794
|
Thanks so far guys,
Can anyone tell me where to start to create a plug-in instead please?
Perhaps I can create/modify a plug-in for what's needed.
Someone here *must* know how to create a plug-in?
Thanks again!
Deric.
__________________
REAPER? Oh yes...
|
|
|
04-22-2008, 09:46 AM
|
#8
|
Code Monkey
Join Date: Sep 2007
Location: Madison, WI
Posts: 857
|
Deric, did you download my MFC example from this thread?
|
|
|
04-22-2008, 10:14 AM
|
#9
|
Human being with feelings
Join Date: Mar 2007
Posts: 794
|
Hi SWS,
Thanks for coming in.
I did, and installed it last night.
I posted this topic after trying to figure out what to do with it for a few hours
Sorry - but I am really new to this stuff and don't know where to start... If it wasn't for the help yourself and Xenakios provided a couple of weeks ago I wouldn't have got to this stage - I've now got a comprehensive map set-up...
I now want to go to the next 'logical stage' and make some sort of plug-in for it...
Problem is I don't know where to start - sorry.
I have your SDK kit - but I haven't a clue what to do with it.
Do you remember telling me to open the 'reaper_csurf.dsw' a couple of weeks ago? That's how basic my knowledge was. I've now got a map.
So now I'm at the same stage I was then - but with plug-ins instead... (well, OK, I've learnt a bit of C++ since then so that will help).
So, yes, I have the stuff you've designed - but I haven't the first idea of what to do with it...
__________________
REAPER? Oh yes...
Last edited by Deric; 04-22-2008 at 10:16 AM.
Reason: Typo
|
|
|
04-22-2008, 10:24 AM
|
#10
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
Well, you should take some comfort in that you've already successfully compiled plugins... It doesn't matter if there is any GUI in the plugin or not (if it for example handles just taking control surface messages and translates them to Reaper commands). It's still a plugin from Reaper's point of view.
Now, you "just" need to get a grasp of how to create a dialog window, place controls like buttons on it and make those controls "do things". A good example to learn at least something of this stuff is the Ninjam Loop example plugin by Justin in the Reaper Plugin SDK. SWS's MFC example could be another approach but might not be such a joyful experience with Visual C++ 2008 Express. (Because of the lack of a visual resource editor etc...) Actually, I regret to say, you will be VERY stuck with all GUI stuff with VC++ 2008 Express. It isn't really meant for any of that stuff, as you can see from Microsoft's own pages, they say something along the lines "for game developers". (Games usually would not need the resource editing stuff etc, they'll draw everything on screen via other means.)
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
|
|
|
04-22-2008, 10:32 AM
|
#11
|
Human being with feelings
Join Date: Mar 2007
Posts: 794
|
Hi Xenakios,
Thanks - doesn't sound too positive though
OK, I'll have a look at the NinJam loop example you mention and see if I can make any sense out of it.
I'll check back shortly to see if SWS has added anything.
Thanks again fellas!
Deric
__________________
REAPER? Oh yes...
|
|
|
04-22-2008, 12:55 PM
|
#12
|
Code Monkey
Join Date: Sep 2007
Location: Madison, WI
Posts: 857
|
Deric, what compiler are you using?
|
|
|
04-22-2008, 01:01 PM
|
#13
|
Human being with feelings
Join Date: Mar 2007
Posts: 794
|
Hi SWS
'Microsoft Visual C++ Express Edition 2008'
(in the 'Help->About' it also says 'Version 9.0.21022.8 RTM')
(The RTM bit made me laff - a bit...)
__________________
REAPER? Oh yes...
|
|
|
04-22-2008, 01:30 PM
|
#14
|
Code Monkey
Join Date: Sep 2007
Location: Madison, WI
Posts: 857
|
Yeah, Xen is right, you're kinda hosed if you want to make Win32 UI stuff with 2008 Express, unfortunately.
I can probably code something up for you at some point but I'm quite busy for the next couple weeks. For a very quick solution, would it help to use the function MessageBox() to display a message to the user? Look under help for usage and/or see the NinJamLoop example.
|
|
|
04-22-2008, 01:38 PM
|
#15
|
Human being with feelings
Join Date: Mar 2007
Posts: 794
|
SWS,
Thanks for checking it out and confirming.
That's a kind offer - and I may still take you up on it if I'm 'ready to jump' in a couple of weeks!
Is there a free compiler I can use that will allow me to make use of the stuff you've designed??
OK I'll take a look at the help for MessageBox() (where is that? Is it a REAPER thing, or a C++ thing, or ?).
Thanks again SWS.
I really hope Justin makes some 'building block' modules available to help us do this stuff...
__________________
REAPER? Oh yes...
|
|
|
04-22-2008, 01:43 PM
|
#16
|
Human being with feelings
Join Date: Mar 2007
Posts: 794
|
Xenakios/SWS,
Just wanted to add that I really appreciate the help, support, and community-spirit you guys have/are provided... brilliant stuff!
Thanks a lot!
__________________
REAPER? Oh yes...
|
|
|
04-22-2008, 03:00 PM
|
#17
|
Human being with feelings
Join Date: Mar 2007
Posts: 21,551
|
Cool idea for a "status panel" for a control surface Deric. I hope you get it worked out.
Question: Can you send parallel messages?
If you can maybe the plugin can send a status message to another GUI window, one not created in C, and change the status there. If you can add some simple messages to your plugin that go outside of Reaper, I can deliver your status panel in about 30 minutes... and put it on the Reaper transport bar.
The trick is doing more than one thing with the dll plugin... also triggering a windows system message outside of Reaper on each status change. If that's even possible.
It could be a simple text string sent to a certain handle other than Reaper's with WM_Message.
So the question to the Reaper API gurus...
Does the Reaper API limit code execution (from a loaded dll) that addresses things outside of Reaper?
Last edited by Lawrence; 04-22-2008 at 03:08 PM.
|
|
|
04-22-2008, 05:13 PM
|
#18
|
Human being with feelings
Join Date: Mar 2007
Posts: 794
|
OK, just got back... with....
Visual Studio 2005!
SWS, is this any use? (I cadged it off a friend - who told me it was "a bit late").
Haven't stuck the disks in yet - should I install it?
Lawerence, thanks man, yeah - me too - it would/will be SO cool it'd be amazing... The following step would be to implement it for 'any' control surface.... Can you imagine??? No more heaps of unusable MIDI gear (because we never know what it's set-up for at that moment etc...).
I'm afraid I can't answer your questions... It'd be nice if Justin could drop a few words in.
__________________
REAPER? Oh yes...
|
|
|
04-22-2008, 05:33 PM
|
#19
|
Code Monkey
Join Date: Sep 2007
Location: Madison, WI
Posts: 857
|
Deric, yes, you should install it, it will be much more useful than "Express". Once you've got it up and running open the MFC project and open the dialog resource. There's where you can drag-and-drop buttons onto the window.
|
|
|
04-22-2008, 05:37 PM
|
#20
|
Human being with feelings
Join Date: Mar 2007
Posts: 794
|
SWS,
Great! Thanks for getting back to me so soon! Makes it worth getting it!!!
Can I just ask - is it self-explanatory once I open the project in the 'proper' compiler??
Thanks again!
Woohoo!! I'm excited!
Edit: Ps. Is it called 'dialogue resource'?
__________________
REAPER? Oh yes...
|
|
|
04-22-2008, 05:40 PM
|
#21
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
Quote:
Originally Posted by Lawrence
Question: Can you send parallel messages?
If you can maybe the plugin can send a status message to another GUI window, one not created in C, and change the status there. If you can add some simple messages to your plugin that go outside of Reaper, I can deliver your status panel in about 30 minutes... and put it on the Reaper transport bar.
The trick is doing more than one thing with the dll plugin... also triggering a windows system message outside of Reaper on each status change. If that's even possible.
It could be a simple text string sent to a certain handle other than Reaper's with WM_Message.
So the question to the Reaper API gurus...
Does the Reaper API limit code execution (from a loaded dll) that addresses things outside of Reaper?
|
This actually doesn't sound too impossible. I would not know for sure unless I tested it someway, though...Say, put some command in a C++ Reaper plugin that sends Windows messages to a Delphi EXE, that in turn sends back a custom message/command to Reaper that again passes that back to the plugin...
The uncertain part is the "external window/app sends custom messages to Reaper", as I am not sure if the current Reaper plugin API can pass custom Windows messages to the extension plugins. (It used to work that way, if I recall correctly, but Justin streamlined the thing a bit later...)
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
|
|
|
04-23-2008, 03:58 AM
|
#22
|
Human being with feelings
Join Date: Mar 2007
Posts: 794
|
Boo! One of the archives on one of the VS2005 disks is corruputed (or some other problem) and it won't install.
I've tried manually extracting it, copying it to disk, cleaning the CD...
Will see if I can get another copy...
__________________
REAPER? Oh yes...
|
|
|
04-23-2008, 05:27 AM
|
#23
|
Human being with feelings
Join Date: Mar 2007
Posts: 794
|
OK we seem to be getting somewhere... tried a different DVD drive and it seems to be reading all the .cab files correctly!
Very strange - but hey - looks like it's happening (at the moment!).
__________________
REAPER? Oh yes...
|
|
|
04-23-2008, 07:53 AM
|
#24
|
Human being with feelings
Join Date: Mar 2007
Posts: 21,551
|
Quote:
Originally Posted by Xenakios
The uncertain part is the "external window/app sends custom messages to Reaper", as I am not sure if the current Reaper plugin API can pass custom Windows messages to the extension plugins. (It used to work that way, if I recall correctly, but Justin streamlined the thing a bit later...)
|
Keep in mind that this status panel would be one-way communication (I think), in that if you change the status on the control surface the button on the status panel changes to reflect the current state of the hardware.
So the *dll takes in a command from the CS and then spits out a winodws message to the third party GUI panel... (besides whatever else it does).
But yeah, if he's trying to also use the status panel buttons to actually send commands to the control surface (to change the status of the hardware) through Reaper, that's something else altogether.
Last edited by Lawrence; 04-23-2008 at 07:58 AM.
|
|
|
04-23-2008, 05:21 PM
|
#25
|
Human being with feelings
Join Date: Mar 2007
Posts: 794
|
Sorry - scrub this - dl'd the VC7 version and that loads.
Next question - what do I do with it? Is there a way to see what the current code outputs as an example?
Thanks,
Deric
Quote:
Originally Posted by sws
Deric, yes, you should install it, it will be much more useful than "Express". Once you've got it up and running open the MFC project and open the dialog resource. There's where you can drag-and-drop buttons onto the window.
|
Sorry about this... I've *finally* got VS2005 installed (the updates required were... took ages!).
I try to open reaper_mfc_example.vcproj and I get this, am I opening the correct file? If so, what do I need to do?:
The following error has occurred during XML parsing:
File: C:\Documents and Settings\Administrator\Desktop\reaper_extension_sd k_\reaper_mfc_test\reaper_mfc_example.vcproj
Line: 10
Column: 2
Error Message:
'9.00' violates enumeration constraint of '7.00 7,00 7.10 7,10 8.00 8,00'.
The attribute 'Version' with value '9.00' failed to parse.
The file 'C:\Documents and Settings\Administrator\Desktop\reaper_extension_sd k\reaper_mfc_test\reaper_mfc_example.vcproj' has failed to load.
__________________
REAPER? Oh yes...
Last edited by Deric; 04-23-2008 at 05:42 PM.
|
|
|
04-24-2008, 03:39 AM
|
#26
|
Human being with feelings
Join Date: Oct 2007
Location: Berlin, GER
Posts: 199
|
It's because you saved the file under a newer VS version. Open that file in a text editor and change the 9.00 to 8.00
|
|
|
04-25-2008, 05:52 AM
|
#27
|
Human being with feelings
Join Date: Apr 2008
Location: Durham, NC
Posts: 70
|
Sorry, I'm coming in on this late. Wouldn't it make more sense to add the gui part of this to the specific control surface plug in, as opposed to having two plugins? Your control surface plug in is already going to know it's state and so the gui representation just has to reflect that state.
I've been messing around with wxWidgets some and it's pretty cool, actually. Took me a bit to figure out how to build and link a demo application to it, but once you're up and running the code is pretty simple to crank out. There is also a resource editor, apparently, but I haven't checked it out yet. I'd definitely consider using that over MFC.
I've been working on a standalone app, though, so I haven't actually built a Reaper plugin that uses it. I don't see why it wouldn't work, though.
chris
|
|
|
04-26-2008, 03:49 AM
|
#28
|
Human being with feelings
Join Date: Mar 2007
Posts: 794
|
Quote:
Originally Posted by spacelabstudio
... add the gui part of this to the specific control surface plug in... ...Your control surface plug in is already going to know it's state and so the gui representation just has to reflect that state...
|
That sounds sensible, ideally I would just send the screen updates from the plug (it's a .cpp file: [reaper_extension_sdk\jmde\csurf\csurf_ <name>.cpp]) my problem is that I'm a total beginner and don't know how to:
1.Make a screen image.
2.Get REAPER to display that image.
3.Update the name fields on the image.
What I want happen is this:
A.REAPER initialises and loads the control surface (CS) map.
B.REAPER loads a graphical representation of the CS (CS-GUI).
C.The CS-GUI is updated to reflect the layout of the CS in real-time.
D.REAPER can except a key-command (originated from the CS) to toggle viewing the CS-GUI (ideally it would have configurable transparency).
That is what I want to happen.
I don't know if this is possible, how to do it, or really where to start.
If I could build something into the .cpp that would be fantastic.
Problem is I just need a bit more guidance and/or slightly 'meatier' explanations on the ways I can go about this.
SWS - can I build the MFC stuff 'into' the .cpp?
Quote:
Originally Posted by spacelabstudio
...I've been messing around with wxWidgets some and it's pretty cool...
|
Could you post a screenshot or explanation of what they are, and what you can do with them, so I/we can see why it/they are useful please?
Cheers
Deric.
Edit:
Quote:
Originally Posted by 404NotFound
It's because you saved the file under a newer VS version. Open that file in a text editor and change the 9.00 to 8.00
|
Ahhh.. I see - I'd openend it (or tried to!) in C++ Visual Express 2008. Thanks
__________________
REAPER? Oh yes...
Last edited by Deric; 04-26-2008 at 04:56 AM.
Reason: Added response to 404NotFound.
|
|
|
04-26-2008, 04:56 AM
|
#29
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
Quote:
Originally Posted by Deric
Could you post a screenshot or explanation of what they are, and what you can do with them, so I/we can see why it/they are useful please?
Cheers
Deric.
|
wxWidgets are pretty much just the plain old ugly Windows GUI controls (I could be wrong, maybe they can be skinned or whatever, too) but they are supposed to be easier to handle in code than using the Microsoft spesific stuff (win32 APIs and/or MFC, which admittedly are a HUGE pain). I'd be interested in trying them (wxWidgets), but I could not even easily compile their included test projects... I guess I should try again.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
|
|
|
04-28-2008, 08:16 AM
|
#30
|
Human being with feelings
Join Date: Apr 2008
Location: Durham, NC
Posts: 70
|
Quote:
Originally Posted by Deric
Could you post a screenshot or explanation of what they are, and what you can do with them, so I/we can see why it/they are useful please?
|
http://www.wxwidgets.org/
Work through some tutorials and dig through the API. You can pretty much do anything you can already do directly calling Windows APIs, but the API is a little cleaner and if you ever want to port to another platform you should be able to use most of your code as written.
Creating dialogs and windows using standard looking Windows components is very easy. Drawing and implementing your own is harder, but no harder than it would be anyway.
Deric, your questions are a bit daunting for their breadth and scope. No one can synopsize how to write a gui program in C++ in a forum. Seeing as how your questions are largely general in nature and not necessarily about the vagaries and specifics of using the Reaper plugin API, you might consider just doing some boning up. Maybe get a good C++ book (see my other thread) to get the language fundamentals down and then write a simple standalone gui app in MFC or wxWidgets or whatever just to prove to yourself you can do it. That should beef up your fundamentals and hopefully render the Reaper plugin API a bit more transparent to you.
Also, asking very specific questions that are narrow in scope is more likely to net answers here and can help shed light on confusing issues.
chris
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 08:51 AM.
|