buzzchurch.com Forum Index The Buzz Congregation
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Another cry for help.

 
Post new topic   Reply to topic    buzzchurch.com Forum Index -> The Monastery
View previous topic :: View next topic  
Author Message
IX
Cardinal


Joined: 29 May 2005
Posts: 906
Location: mcr:uk

PostPosted: Sunday February 25th, 2007 15:07    Post subject: Another cry for help. Reply with quote

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. Smile
Back to top
View user's profile Send private message
mute
Angel


Joined: 13 Aug 2004
Posts: 3388

PostPosted: Sunday February 25th, 2007 20:16    Post subject: Reply with quote

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
View user's profile Send private message
IX
Cardinal


Joined: 29 May 2005
Posts: 906
Location: mcr:uk

PostPosted: Sunday February 25th, 2007 21:23    Post subject: Reply with quote

Thanks for the link, mute. Looks like exactly the sort of thing I need to push me in the right direction. Smile
Back to top
View user's profile Send private message
sgorpi
Choir Girl


Joined: 10 Dec 2005
Posts: 86
Location: Netherlands

PostPosted: Monday February 26th, 2007 15:41    Post subject: Reply with quote

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 Smile
Back to top
View user's profile Send private message Visit poster's website
IX
Cardinal


Joined: 29 May 2005
Posts: 906
Location: mcr:uk

PostPosted: Monday February 26th, 2007 18:24    Post subject: Reply with quote

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 Smile


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. Smile
Back to top
View user's profile Send private message
usr
Pope


Joined: 12 Aug 2004
Posts: 1159
Location: nuremberg, franconia, germany, europe

PostPosted: Monday February 26th, 2007 19:00    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
IX
Cardinal


Joined: 29 May 2005
Posts: 906
Location: mcr:uk

PostPosted: Monday February 26th, 2007 19:42    Post subject: Reply with quote

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? Crying or Very sad
Back to top
View user's profile Send private message
btd
Cardinal


Joined: 13 Aug 2004
Posts: 779
Location: York, UK

PostPosted: Monday February 26th, 2007 21:27    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
sgorpi
Choir Girl


Joined: 10 Dec 2005
Posts: 86
Location: Netherlands

PostPosted: Monday February 26th, 2007 21:43    Post subject: Reply with quote

there ya go Smile
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 Razz 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 Razz
Back to top
View user's profile Send private message Visit poster's website
IX
Cardinal


Joined: 29 May 2005
Posts: 906
Location: mcr:uk

PostPosted: Monday February 26th, 2007 21:47    Post subject: Reply with quote

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 Smile. The two helper functions you mentioned should be a big help.
Back to top
View user's profile Send private message
IX
Cardinal


Joined: 29 May 2005
Posts: 906
Location: mcr:uk

PostPosted: Monday February 26th, 2007 21:48    Post subject: Reply with quote

sgorpi wrote:
there ya go Smile
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 Razz 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 Razz


Thanks sgorpi! Dance
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    buzzchurch.com Forum Index -> The Monastery All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group