GithubHelp home page GithubHelp logo

Comments (4)

krevis avatar krevis commented on May 20, 2024

That looks reasonable. I see you've found the code in SysEx Librarian (SSEMIDIController) that does the same thing.

  • Is this in a Mac app, Mac command-line tool, or iOS app?
  • Did you call [SMClient sharedClient] early in your app? (For instance in your app delegate's -applicationWillFinishLaunching)
  • If you step through in the debugger, does endpoints contain a few objects, or none?

from midiapps.

masche842 avatar masche842 commented on May 20, 2024

Is this in a Mac app, Mac command-line tool, or iOS app?

A Cocoa Mac app. I used the assistant to scaffold it and just added the MidiController class (printed above).

Did you call [SMClient sharedClient] early in your app? (For instance in your app delegate's -applicationWillFinishLaunching)

No I didn't! Added it to AppDelegate now ... but still no cigar.

If you step through in the debugger, does endpoints contain a few objects, or none?

Yes, it lists all endpoints (the same list that SysexLibrarian has at that point).
I tested with a "real" Midi device earlier, now I've tested with the IAC driver and a (second) SysexLibrarian instance. Works with the first Librarian instance but not with my SysexSniffer.
Content of the first IAC Endoint:

[1] SMSourceEndpoint *  0x600000267400  0x0000600000267400
- SMEndpoint  SMEndpoint    
-- SMMIDIObject  SMMIDIObject    
--- NSObject  NSObject    
--- objectRef MIDIObjectRef 1409035 1409035
--- uniqueID  MIDIUniqueID  -265309521  -265309521
--- ordinal NSUInteger  0 0
--- flags <anonymous struct>    
---- hasCachedName unsigned int:1  1 1
--- cachedName  __NSCFString *  @"Bus 1"  0x00006080004200a0
-- deviceRef MIDIDeviceRef 0 0
-- endpointFlags <anonymous struct>    
-- cachedManufacturerName  NSString *  nil 0x0000000000000000
-- cachedModelName NSString *  nil 0x0000000000000000

One more thing:

When I pause at the end of MidiController.init, send some Midi and continue, the debugger halts at nonretainedDelegate parser:self didReadMessages:messages with EXC_BAD_ACCESS(code=EXC_I386_GPFLT).
Sysex-Librarian does not do that. Maybe I am still missing something?

Thanks for your help!

from midiapps.

krevis avatar krevis commented on May 20, 2024

It sounds like your MidiController is being deallocated before it receives any MIDI events. (To check that, you could override -dealloc and set a breakpoint in the override.)

Is some other object keeping a strong reference to it? The SMPortInputStream won't retain your controller.

If that isn't it, send me your whole Xcdoe project (email [email protected]) and I can take a look.

from midiapps.

masche842 avatar masche842 commented on May 20, 2024

That did the trick!
It's my first objective-c app and ARC got me right away...

Thanks for your help!

from midiapps.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.