Comments (4)
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.
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.
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.
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)
- Support command line or scripting with AppleScript/Automator actions HOT 6
- Expose throttled midi through port (feature request) HOT 2
- I am having issues getting the project to run Issue with sparkle HOT 3
- Add feature: Window always on top
- Multiple Instances / multiple saved libraries
- Locate / Scan from folder
- Keyboard shortcut for Rescan MIDI HOT 3
- Showing Controller names and numerical value HOT 1
- Add a way to receive program change, send sysex to specific destination (multiple destinations)
- macOS 13.3 beta: Spying driver isn't loading HOT 1
- Duplicated events from spying MIDI driver
- MIDIMonitor: crash when using device IAC and many notes sent at once HOT 6
- Use the common "CMD + K" shortcut to clear the log. HOT 2
- Add option to format program numbers as General MIDI patch names
- Potential memory corruption when receiving dense event streams HOT 14
- Crash when quitting or closing window, when "Ask to save when a changed window is closed" is off HOT 1
- MIDI Monitor in full screen: hiding/showing Sources or Filters causes broken layout
- MIDI Monitor crash on quit with unsaved changed document
- MIDI Monitor crash when saving, with events with host timestamps > Int64.max
- MIDI Monitor: timestamps can be inconsistent across save/open HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from midiapps.