| View previous topic :: View next topic |
| Author |
Message |
IX Cardinal

Joined: 29 May 2005 Posts: 906 Location: mcr:uk
|
Posted: Sunday February 25th, 2007 15:07 Post subject: Another cry for help. |
|
|
Here I go again! Starting a new machine and could use a bit of help with a couple of things, otherwise it'll take me years to figure it all out by myself
First up, can somebody explain/provide an example of how the MidiOut function works? I've been experimenting but I'm having no joy at all so far.
Second, windows. Aaaaargh! If anyone could provide a simplified example of getting values into and out of list-boxes, text-boxes and drop-downs I'd be grateful. I'm in VCExpress so no visual editor and a bit of example code would be a big help.
Also, how does the ScheduleEvent function work?
Thanks in advance. I'll try not to ask too many noob questions this time.  |
|
| Back to top |
|
 |
mute Angel
Joined: 13 Aug 2004 Posts: 3388
|
Posted: Sunday February 25th, 2007 20:16 Post subject: |
|
|
i dont know if you've used vb or delphi for anything.. but its very different in vc++ than in those languages. basically what you have to do in vc is what you would be doing in vb if you were doing add-on program for another application.. that being more or less a msg hook on the listbox or whatever dialog/input you are using and looking for a change or command (ive been getting back into this stuff lately myself and have been using vce so i know how you're feeling).
it's actually pretty simple stuff.. full versions of vc++ fill in some of this stuff for you with its reseditor similar to rad.. i found a pretty good example via google that'll probably help you out:
http://www.winprog.org/tutorial/controls.html |
|
| Back to top |
|
 |
IX Cardinal

Joined: 29 May 2005 Posts: 906 Location: mcr:uk
|
Posted: Sunday February 25th, 2007 21:23 Post subject: |
|
|
Thanks for the link, mute. Looks like exactly the sort of thing I need to push me in the right direction.  |
|
| Back to top |
|
 |
sgorpi Choir Girl
Joined: 10 Dec 2005 Posts: 86 Location: Netherlands
|
Posted: Monday February 26th, 2007 15:41 Post subject: |
|
|
if you like i can post microsoft win32 programmers reference .hlp file with most of the win32 api stuff (so NO mfc) it maybe a bit old file, but i found it very usefull  |
|
| Back to top |
|
 |
IX Cardinal

Joined: 29 May 2005 Posts: 906 Location: mcr:uk
|
Posted: Monday February 26th, 2007 18:24 Post subject: |
|
|
| sgorpi wrote: | if you like i can post microsoft win32 programmers reference .hlp file with most of the win32 api stuff (so NO mfc) it maybe a bit old file, but i found it very usefull  |
Cheers sgorpi. I might take you up on that if the tutorial mute posted doesn't get me running. I'll pm you if I think I need it.
Midi output function anyone? Please?
Edit: sgorpi, if that reference helped you to do the mtw window then I'll take it. I want to add something very similar to Strip at some point in the future, once I've got the basics down.  |
|
| Back to top |
|
 |
usr Pope

Joined: 12 Aug 2004 Posts: 1159 Location: nuremberg, franconia, germany, europe
|
Posted: Monday February 26th, 2007 19:00 Post subject: |
|
|
win32 api help file is absolutely essential. i even prefer older versions that are in the original windows .HLP format over newer ones in that compressed html thingy, because the search function works better. _________________ .nl chefs go blok blok blok |
|
| Back to top |
|
 |
IX Cardinal

Joined: 29 May 2005 Posts: 906 Location: mcr:uk
|
Posted: Monday February 26th, 2007 19:42 Post subject: |
|
|
| usr wrote: | | i even prefer older versions that are in the original windows .HLP format over newer ones in that compressed html thingy |
Good point. Now you mention it, so do I.
Midi output stuff? Anyone? Please?  |
|
| Back to top |
|
 |
btd Cardinal

Joined: 13 Aug 2004 Posts: 779 Location: York, UK
|
Posted: Monday February 26th, 2007 21:27 Post subject: |
|
|
A starting point for MidiOut (this is from PeerCtrl, which uses the MIDI out stuff for feedback to Pocket Dial-type endless encoders)
| Code: | void mi::SendMIDICC(const int device, const int channel, const int ctrl, const int value)
{
dword data = (0xAF + channel)
+ (ctrl << 8)
+ (value << 16);
pCB->MidiOut(device, data);
} |
Basically data is a packet of data according to the MIDI spec, and device is a device number as described somewhere in the aforementioned Win32 docs. You can use midiOutGetNumDevs() to find the number of devices, and midiOutGetDevCaps() to find device names and other info. I think you need to #include <mmsystem.h> and possibly link with winmm.lib or somesuch to use these two functions.
And don't forget, the chosen device must be selected as an output device in Buzz's preferences!!! |
|
| Back to top |
|
 |
sgorpi Choir Girl
Joined: 10 Dec 2005 Posts: 86 Location: Netherlands
|
Posted: Monday February 26th, 2007 21:43 Post subject: |
|
|
there ya go
http://totalegekte.com/tmp/win32help.zip
i found this more usefull then msdn these days, indeed because of the quicker search and overview of relevant things good overview of GUI stuff but it doesn't contain anything about multimedia stuff sadly... so if anyone has a help file on that, do mention it  |
|
| Back to top |
|
 |
IX Cardinal

Joined: 29 May 2005 Posts: 906 Location: mcr:uk
|
Posted: Monday February 26th, 2007 21:47 Post subject: |
|
|
Thanks btd. Looks mostly like what I've been doing but I didn't know how to find the device numbers, so I guessed they were numbered sequentially starting at 0. Since I've been totally unable to get my synth to respond, I suspect that I was wrong . The two helper functions you mentioned should be a big help. |
|
| Back to top |
|
 |
IX Cardinal

Joined: 29 May 2005 Posts: 906 Location: mcr:uk
|
Posted: Monday February 26th, 2007 21:48 Post subject: |
|
|
| sgorpi wrote: | there ya go
http://totalegekte.com/tmp/win32help.zip
i found this more usefull then msdn these days, indeed because of the quicker search and overview of relevant things good overview of GUI stuff but it doesn't contain anything about multimedia stuff sadly... so if anyone has a help file on that, do mention it  |
Thanks sgorpi!  |
|
| Back to top |
|
 |
|