oksunp / vvopensource

Automatically exported from code.google.com/p/vvopensource
0 stars 0 forks source link

Is there some documentation about how to set up a basic MIDI manager somewhere? #4

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I would like to create a simple MacOSX app to send basic signals to a MIDI app 
like Traktor, just as a proof-of-concept. I've successfully run the MIDITestApp 
to do just that, but I'm having a hard time reverse engineering it, and 
especially how VVMIDIManager is initialized. Is there some documentation about 
VVMIDI somewhere, similar to what you have for VVOSC and VVBasics?

Original issue reported on code.google.com by sebastie...@gmail.com on 25 Jul 2010 at 8:58

GoogleCodeExporter commented 8 years ago
"some documentation about how to set up a basic MIDI manager"

like [[VVMIDIManager alloc] init]?  that's all that the sample app is doing- if 
you're having any problems beyond that, please post them here and i'll take a 
look at them.

Original comment by raycut...@gmail.com on 26 Jul 2010 at 11:10

GoogleCodeExporter commented 8 years ago
Thanks a lot. I managed to figure my way out.

Original comment by sebastie...@gmail.com on 7 Aug 2010 at 11:26

GoogleCodeExporter commented 8 years ago
I too cannot for the life of me get my delegate to call setupChanged() and I 
haven't been able to figure out how how VVMIDIManager is initialized. in fact, 
I can't find "VVMIDIManager alloc" anywhere in your code.

// my BVIAppDelegate.h looks like this...
@interface BVIAppDelegate : NSObject <VVMIDIDelegateProtocol> {
    VVMIDIManager           *midiManager;
    NSMutableArray          *msgArray;
}

- (void) setupChanged;
- (void) receivedMIDI:(NSArray *)a fromNode:(VVMIDINode *)n;
// END

Of course, I have setupChanged and receivedMIDI implemented. Everything builds 
fine but my delegate is never called. 

You wrote:
"like [[VVMIDIManager alloc] init]?  that's all that the sample app is doing"

.. but I can't find anywhere in the MIDITestApp where you are doing this. I 
tried initializing it in init() but I get a linker error when I try this...

- (id) init {
    self = [super init];
    msgArray = [[NSMutableArray arrayWithCapacity:0] retain];
    midiManager = [[VVMIDIManager alloc] init];
    [midiManager setDelegate:self];
    return self;
}

Any insights?

Thanks, Ben

Original comment by b...@benvigil.com on 23 May 2012 at 5:05

GoogleCodeExporter commented 8 years ago
I'm looking at the MIDITestApp, which initializes the midiManager in IB. 
Nowhere in the project is there a separate alloc/init of the midiManager 
(obviously), followed by the necessary -setDelegate: call. So how are you 
setting midiManager as the AppController's delegate??? Stumped...

Original comment by mrwh...@gmail.com on 16 Nov 2012 at 4:26