RJ Ryan | 2 Nov 2012 20:37
Favicon
Gravatar

fix for pmlinuxalsa segfault when receiving events for a closed device

Hi all / Roger,


We (Mixxx) are getting segfaults when we close a device but then poll another device. 

The relevant Mixxx bug is here:

We filed a Trac bug here:
but weren't sure if the Trac was that active so I figured I'd drop a report in here.

Sean's patch fixes the immediate issue but I added a patch with a fix for a couple oddities (e.g. alsa_in_close doesn't NULL midi->descriptor). I also sprinkled some other null checks here and there. 

Best regards,
RJ Ryan
_______________________________________________
media_api mailing list
media_api@...
http://lists.create.ucsb.edu/mailman/listinfo/media_api
Jeremiah Benham | 13 Jul 2012 23:07

cross compiling portmidi for win32

I am trying to use gub to cross compile portmidi for win32 because it is 
a dependency of denemo. Would I pretty much follow the linux 
installation instructions or the windows instruction? In the windows 
version it uses a .bat file. Should I read the bat file and basically do 
what it does or what do you recommend?

Please cc me because I am not subscribed to the mailing list.

Thanks,
Jeremiah
KEVIN BARNUM | 27 Mar 2012 07:24

Request device control value

Hey all,

One of my beta testers is using a Behringer BCF2000 that has motorized sliders.  He says they aren't intended
for animation, just to move the sliders into different preset positions.  When he sets up his sliders in
this way they don't send any midi messages, which presents a problem since my plugin is intended for
real-time animation in a 3D program.  So the starting values aren't the same as the sliders and this causes
unwanted results when starting a new recording session.

So, is there a way to request the value of controls from the device without waiting for messages?

I'm not really a "midi guy" (my plugin was initially for joysticks and the like, but a lot of users requested
midi support, so I added it through the use of PortMidi), so midi is fairly foreign to me.  Something tells me
this might not be possible, but I'm hoping it is.  

Thanks,
Kevin
Olivier Tristan | 12 Mar 2012 11:39

PortMidi leak

Hi Guys,

Just wanted to report a leak in pmmacosxcm.c

in ConnectedEndpointName, it lacks a
CFRelease(result) at line 829
if anyStrings is false

Thanks,

--

-- 
UVI <http://www.uvi.net/>
Olivier Tristan| Research & Development
o.tristan@...

Facebook <http://www.facebook.com/UVI.Official> Twitter 
<http://twitter.com/UVIofficial> Youtube 
<http://www.youtube.com/user/UVIofficial> SoundCloud 
<http://soundcloud.com/uvi-official> Blog UVI <http://blog.uvi.net/>

_______________________________________________
media_api mailing list
media_api@...
http://lists.create.ucsb.edu/mailman/listinfo/media_api
Anthony Palomba | 3 Feb 2012 19:36
Picon
Gravatar

Porttime not being built on OSX?

Hey folks,

I have been trying to build the latest portmidi for OSX.
I am running OSX 10.7 and Xcode4.2.

The output below shows the result of a command line build
and install. The install seems to show that I am installing
/usr/local/include/porttime.h, but no porttime library.

When I try to compile source code that uses portime, I
get errors like "Symbol not found: _Pt_Time"


Shouldn't the make file be creating and installing a
porttime.a and porttime.dylib?




mbp:portmidi apalomba$ make -f pm_mac/Makefile.osx
cd Release; make
[ 26%] Built target pmjni
[ 50%] Built target portmidi-static
[ 53%] Built target latency
[ 56%] Built target midiclock
[ 60%] Built target midithread
[ 63%] Built target midithru
[ 66%] Built target mm
[ 70%] Built target qtest
[ 73%] Built target sysex
[ 76%] Built target test
[100%] Built target portmidi-dynamic
mbp:portmidi apalomba$ cd Release/
mbp:Release apalomba$
mbp:Release apalomba$ sudo make install
Password:
[ 26%] Built target pmjni
[ 50%] Built target portmidi-static
[ 53%] Built target latency
[ 56%] Built target midiclock
[ 60%] Built target midithread
[ 63%] Built target midithru
[ 66%] Built target mm
[ 70%] Built target qtest
[ 73%] Built target sysex
[ 76%] Built target test
[100%] Built target portmidi-dynamic
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/lib/libportmidi_s.a
-- Installing: /usr/local/lib/libpmjni.dylib
-- Installing: /usr/local/lib/libportmidi.dylib
-- Up-to-date: /usr/local/include/portmidi.h
-- Up-to-date: /usr/local/include/porttime.h
mbp:Release apalomba$

_______________________________________________
media_api mailing list
media_api@...
http://lists.create.ucsb.edu/mailman/listinfo/media_api
Tim Burgess | 30 Jan 2012 15:33

PmEvent and system exclusive messages

Hi,

 

I just want to double-check my understanding of PortMIDI’s approach to SysEx:

 

1.        The first and last PmEvents received as part of a SysEx message will have their status bytes set to f0 and f7, respectively and can be treated as 3-byte messages if the time-stamp isn’t required;

2.       Any PmEvents containing SysEx data, except as described above, use all four bytes of a PmEvent, so the time stamp byte becomes just another data byte.

 

Best wishes.

 

Tim Burgess

Raised Bar Ltd

Phone:  +44 (0)1827 719822

 

Don't forget to vote for improved access to music and music technology at

 

http://www.raisedbar.net/petition.htm

 

 

_______________________________________________
media_api mailing list
media_api@...
http://lists.create.ucsb.edu/mailman/listinfo/media_api
Anthony Palomba | 27 Jan 2012 01:14
Picon
Gravatar

Re: Trouble building protmidi with Xcode 4.2...

Hey folks,

I am still trying to get portmidi to build under Xcode 4.2. Again I am running OSX 10.7
and using the terminal. This the output I am getting...

Can someone please give me some pointers?


eric-jordan-pc:portmidi anthonypalomba$ make -f pm_mac/Makefile.osx
cd Release; make
[  3%] Building C object pm_common/CMakeFiles/pmjni.dir/__/pm_mac/pmmacosxcm.c.o
In file included from /Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/MacMemory.h:28,
                 from /Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/CarbonCore.h:65,
                 from /Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/AE.framework/Headers/AE.h:20,
                 from /Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:21,
                 from /Users/anthonypalomba/audio development/portmidi/pm_mac/pmmacosxcm.c:38:
/Developer/SDKs/MacOSX10.7.sdk/Developer/Headers/FlatCarbon/strings.h:1:2: warning: #warning Strings.h is not available on Mac OS X
llvm-gcc-4.2: error trying to exec '/usr/bin/../llvm-gcc-4.2/bin/powerpc-apple-darwin11-llvm-gcc-4.2': execvp: No such file or directory
In file included from /Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/MacMemory.h:28,
                 from /Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/CarbonCore.h:65,
                 from /Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/AE.framework/Headers/AE.h:20,
                 from /Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:21,
                 from /Users/anthonypalomba/audio development/portmidi/pm_mac/pmmacosxcm.c:38:
/Developer/SDKs/MacOSX10.7.sdk/Developer/Headers/FlatCarbon/strings.h:1:2: warning: #warning Strings.h is not available on Mac OS X
lipo: can't figure out the architecture type of: /var/folders/cx/wbrcqfsd1sj24131hjmxsx_m0000gn/T//cc6n3jn0.out
make[3]: *** [pm_common/CMakeFiles/pmjni.dir/__/pm_mac/pmmacosxcm.c.o] Error 255
make[2]: *** [pm_common/CMakeFiles/pmjni.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [all] Error 2
eric-jordan-pc:portmidi anthonypalomba$

_______________________________________________
media_api mailing list
media_api@...
http://lists.create.ucsb.edu/mailman/listinfo/media_api
Anthony Palomba | 11 Jan 2012 22:35
Picon
Gravatar

Can not build portmidi with Xcode 4.2!

Greetings Portmedia list,

I have been trying to get portmidi to build on the mac
and have been running into trouble. I was hoping someone
here could help me out.

I am running Xcode 4.2 and OSX 10.7 on a MacBook Pro.
I also installed Cmake 2.8.7

1. portmidi.xcodeproj build fails and gives me the following error:

"The run destination "My Mac 64-bit" is not valid for Running the scheme "ALL_BUILD"

If I try selecting just portmidi, I get a similar error.


2.The command line build also fails, output is below...

Anyone know what the issue might be?
Has anyone been able to get this to build with Xcode 4.2?


Last login: Tue Jan 10 10:55:31 on ttys000
Anthonys-MacBook-Pro:~ anthonypalomba$ cd /Users/anthonypalomba/audio\ development/portmidi/pm_mac
Anthonys-MacBook-Pro:pm_mac anthonypalomba$ pwd
/Users/anthonypalomba/audio development/portmidi/pm_mac
Anthonys-MacBook-Pro:pm_mac anthonypalomba$ make -f pm_mac/Makefile.osx pmdefaults
make: pm_mac/Makefile.osx: No such file or directory
make: *** No rule to make target `pm_mac/Makefile.osx'.  Stop.
Anthonys-MacBook-Pro:pm_mac anthonypalomba$ cd ..
Anthonys-MacBook-Pro:portmidi anthonypalomba$ make -f pm_mac/Makefile.osx pmdefaults
mkdir -p Release
cd Release; make -f ../pm_mac/
make[1]: *** ../pm_mac/: Is a directory.  Stop.
make: *** [Release/libpmjni.dylib] Error 2
Anthonys-MacBook-Pro:portmidi anthonypalomba$ pwd
/Users/anthonypalomba/audio development/portmidi
Anthonys-MacBook-Pro:portmidi anthonypalomba$ make -f pm_mac/Makefile.osx
rm -f CMakeCache.txt
mkdir -p Release
cd Release; cmake .. -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- SYSROOT: /Developer/SDKs/MacOSX10.5.sdk
-- DEFAULT_DEBUG_FLAGS not nil: -g
-- SYSROOT: /Developer/SDKs/MacOSX10.5.sdk
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/anthonypalomba/audio development/portmidi/Release
cd Release; make
Scanning dependencies of target pmjni
[  3%] Building C object pm_common/CMakeFiles/pmjni.
dir/__/pm_mac/pmmacosxcm.c.o
/Users/anthonypalomba/audio development/portmidi/pm_mac/pmmacosxcm.c:24:20: error: stdlib.h: No such file or directory
In file included from /Users/anthonypalomba/audio development/portmidi/pm_mac/pmmacosxcm.c:28:
/Users/anthonypalomba/audio development/portmidi/pm_common/portmidi.h:97:20: error: stdint.h: No such file or directory
In file included from /Users/anthonypalomba/audio development/portmidi/pm_mac/pmmacosxcm.c:28:
/Users/anthonypalomba/audio development/portmidi/pm_common/portmidi.h:269: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PmTimestamp’
/Users/anthonypalomba/audio development/portmidi/pm_common/portmidi.h:270: error: expected declaration specifiers or ‘...’ before ‘*’ token
/Users/anthonypalomba/audio development/portmidi/pm_common/portmidi.h:270: error: ‘PmTimestamp’ declared as function returning a function
/Users/anthonypalomba/audio development/portmidi/pm_common/portmidi.h:356: error: expected declaration specifiers or ‘...’ before ‘int32_t’
/Users/anthonypalomba/audio development/portmidi/pm_common/portmidi.h:357: error: expected declaration specifiers or ‘...’ before ‘PmTimeProcPtr’
/Users/anthonypalomba/audio development/portmidi/pm_common/portmidi.h:363: error: expected declaration specifiers or ‘...’ before ‘int32_t’
/Users/anthonypalomba/audio development/portmidi/pm_common/portmidi.h:364: error: expected declaration specifiers or ‘...’ before ‘PmTimeProcPtr’
/Users/anthonypalomba/audio development/portmidi/pm_common/portmidi.h:366: error: expected declaration specifiers or ‘...’ before ‘int32_t’
/Users/anthonypalomba/audio development/portmidi/pm_common/portmidi.h:434: error: expected declaration specifiers or ‘...’ before ‘int32_t’
/Users/anthonypalomba/audio development/portmidi/pm_common/portmidi.h:512: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PmMessage’
/Users/anthonypalomba/audio development/portmidi/pm_common/portmidi.h:579: error: expected specifier-qualifier-list before ‘PmMessage’
/Users/anthonypalomba/audio development/portmidi/pm_common/portmidi.h:613: error: expected declaration specifiers or ‘...’ before ‘int32_t’
/Users/anthonypalomba/audio development/portmidi/pm_common/portmidi.h:634: error: expected declaration specifiers or ‘...’ before ‘int32_t’
/Users/anthonypalomba/audio development/portmidi/pm_common/portmidi.h:642: error: expected declaration specifiers or ‘...’ before ‘int32_t’
In file included from /Users/anthonypalomba/audio development/portmidi/pm_mac/pmmacosxcm.c:29:
/Users/anthonypalomba/audio development/portmidi/pm_common/pmutil.h:47: error: expected declaration specifiers or ‘...’ before ‘int32_t’
In file included from /Users/anthonypalomba/audio development/portmidi/pm_mac/pmmacosxcm.c:30:
/Users/anthonypalomba/audio development/portmidi/pm_common/pminternal.h:27: error: expected ‘)’ before ‘s’
/Users/anthonypalomba/audio development/portmidi/pm_common/pminternal.h:49: error: ‘pm_synchronize_fn’ declared as function returning a function
/Users/anthonypalomba/audio development/portmidi/pm_common/pminternal.h:98: error: expected declaration specifiers or ‘...’ before ‘*’ token
/Users/anthonypalomba/audio development/portmidi/pm_common/pminternal.h:98: error: ‘uint32_t’ declared as function returning a function
/Users/anthonypalomba/audio development/portmidi/pm_common/pminternal.h:104: error: expected specifier-qualifier-list before ‘PmTimeProcPtr’
/Users/anthonypalomba/audio development/portmidi/pm_common/pminternal.h:153: error: ‘none_synchronize’ declared as function returning a function
/Users/anthonypalomba/audio development/portmidi/pm_common/pminternal.h:161: error: ‘pm_read_bytes’ declared as function returning a function
In file included from /Users/anthonypalomba/audio development/portmidi/pm_mac/pmmacosxcm.c:31:
/Users/anthonypalomba/audio development/portmidi/porttime/porttime.h:44: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PtTimestamp’
/Users/anthonypalomba/audio development/portmidi/porttime/porttime.h:46: error: expected ‘)’ before ‘timestamp’
/Users/anthonypalomba/audio development/portmidi/porttime/porttime.h:61: error: expected declaration specifiers or ‘...’ before ‘PtCallback’
/Users/anthonypalomba/audio development/portmidi/porttime/porttime.h:79: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Pt_Time’
/Users/anthonypalomba/audio development/portmidi/porttime/porttime.h:88: error: expected ‘)’ before ‘duration’
/Users/anthonypalomba/audio development/portmidi/pm_mac/pmmacosxcm.c:35:19: error: stdio.h: No such file or directory
/Users/anthonypalomba/audio development/portmidi/pm_mac/pmmacosxcm.c:36:20: error: string.h: No such file or directory
/Users/anthonypalomba/audio development/portmidi/pm_mac/pmmacosxcm.c:38:39: error: CoreServices/CoreServices.h: No such file or directory
/Users/anthonypalomba/audio development/portmidi/pm_mac/pmmacosxcm.c:39:35: error: CoreMIDI/MIDIServices.h: No such file or directory
/Users/anthonypalomba/audio development/portmidi/pm_mac/pmmacosxcm.c:40:32: error: CoreAudio/HostTime.h: No such file or directory
/Users/anthonypalomba/audio development/portmidi/pm_mac/pmmacosxcm.c:41:20: error: unistd.h: No such file or directory
/Users/anthonypalomba/audio development/portmidi/pm_mac/pmmacosxcm.c:85: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘client’
/Users/anthonypalomba/audio development/portmidi/pm_mac/pmmacosxcm.c:86: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘portIn’
/Users/anthonypalomba/audio development/portmidi/pm_mac/pmmacosxcm.c:87: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘portOut’
/Users/anthonypalomba/audio development/portmidi/pm_mac/pmmacosxcm.c:93: error: field ‘sync_time’ declared as a function
/Users/anthonypalomba/audio development/portmidi/pm_mac/pmmacosxcm.c:94: error: expected specifier-qualifier-list before ‘UInt64’
/Users/anthonypalomba/audio development/portmidi/pm_mac/pmmacosxcm.c:118: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘timestamp_pm_to_cm’

_______________________________________________
media_api mailing list
media_api@...
http://lists.create.ucsb.edu/mailman/listinfo/media_api
René Dudfield | 15 Dec 2011 17:42
Picon
Gravatar

portmidi OSX ppc, x86 32 and 64?

Hello,

I'm trying to get a binary of portmidi that works on ppc, x86, and x86 64...

I've been trying to compile it on Lion, with no luck.

Does anyone provide a binary somewhere?  Or can anyone help me compile it?


cheers,

_______________________________________________
media_api mailing list
media_api@...
http://lists.create.ucsb.edu/mailman/listinfo/media_api
dev don | 13 Dec 2011 12:14
Picon

SegFault on Windows 7

Hi all,

Several hours were spent on google learning that this problem has supposedly been solved in previous versions of portmidi, but on my windows 7 64 bit system the following code hangs on exit even though I call Pm_Close() properly (I think.) Any help is appreciated.


void AccMidi::initMidiOut() { /// INIT MIDI OUT - works fine, outStream doublePointer is stored properly int pmErr = Pm_Initialize(); int devOutId = Pm_GetDefaultOutputDeviceID(); outStream = new PortMidiStream*; Pt_Start(1, 0, 0); // porttime timer int pErr3 = Pm_OpenOutput(outStream, devOutId, NULL, 0, NULL, tmInfoOut, 1 ); } void AccMidi::closeMidi() { Pt_Stop(); delete tmInfoOut; PmError err = Pm_Close(outStream); // HANG HERE, WITH GOOD DOUBLEPOINTER REFERENCE }

_______________________________________________
media_api mailing list
media_api@...
http://lists.create.ucsb.edu/mailman/listinfo/media_api
Roger Dannenberg | 12 Dec 2011 01:56
Picon
Favicon

test #2

If you get this, the Media API is back -- thanks to Stephen, Larry, and 
Matt at UCSB.

-Roger

Gmane