Segmentation Fault when trying to create midi output stream

44 views
Skip to first unread message

Rhazes Spell

unread,
Mar 25, 2018, 1:28:13 PM3/25/18
to Extempore
Hi All-

I am trying to do a simple proof of concept to use Extempore to drive instruments in FL Studio. I am getting a segmentation fault when I run the following lines:


(define *midi-out* (pm_create_output_stream (pm_default_out)))

Extempore is able to see my Midi_out devices:
Running: 
(sys:load "libs/external/portmidi.xtm")
(pm_initialize)
(pm_print_devices)

I get:
OUTPUT >>>>

Portmidi successfully initialised.

-- MIDI input devices --

  device id 1 : <PmDeviceInfo: interface=MMSystem name=LoopBe Internal MIDI I/O?:I>

-- MIDI output devices --

  device id 0 : <PmDeviceInfo: interface=MMSystem name=Microsoft MIDI Mapper I/O?:O>
  device id 2 : <PmDeviceInfo: interface=MMSystem name=Microsoft GS Wavetable Synth I/O?:O>
  device id 3 : <PmDeviceInfo: interface=MMSystem name=LoopBe Internal MIDI I/O?:O>




All of the following result in segmentation faults:

(define *midi-out* (pm_create_output_stream (pm_default_out)))

(define *midi-out* (pm_create_output_stream 0) )
(define *midi-out* (pm_create_output_stream 2) )
(define *midi-out* (pm_create_output_stream 3) )

Are there any thoughts on what I am doing wrong? Or hints about how to start debugging / trouble shooting? Thanks in advance.


Cheers,


Rhazes Spell

unread,
Mar 25, 2018, 1:40:47 PM3/25/18
to Extempore
I tried running the portmidi-output.xtm (FYI, I am running Win 10 and the Extempore binary 0.7).

No joy, but there was no segmentation fault.  I received the following output:

sys:load notification portmidi already loaded
Portmidi successfully initialised.

-- MIDI input devices --

  device id 1 : <PmDeviceInfo: interface=MMSystem name=LoopBe Internal MIDI I/O?:I>

-- MIDI output devices --

  device id 0 : <PmDeviceInfo: interface=MMSystem name=Microsoft MIDI Mapper I/O?:O>
  device id 2 : <PmDeviceInfo: interface=MMSystem name=Microsoft GS Wavetable Synth I/O?:O>
  device id 3 : <PmDeviceInfo: interface=MMSystem name=LoopBe Internal MIDI I/O?:O>
PortMIDI error opening output port: 'PortMidi: `Invalid device ID''

Andrew Sorensen

unread,
Mar 26, 2018, 8:05:20 PM3/26/18
to extemp...@googlegroups.com
What device ID did you use?

--
You received this message because you are subscribed to the Google Groups "Extempore" group.
To unsubscribe from this group and stop receiving emails from it, send an email to extemporelang+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andrew Sorensen

unread,
Mar 26, 2018, 8:12:25 PM3/26/18
to extemp...@googlegroups.com
What happens if you do the following - from a fresh start.

evaluate the following lines one at a time.

(sys:load "libs/external/portmidi.xtm") 

(pm_initialize)

(pm_print_devices) ;; after this check that your previous device id's a still valid

;; assuming the id's from your previous email are still valid.

(define *mout* (pm_create_output_stream 3))

(println 'my_midi_out *mout*)

----------------------------------

What is the result of this final println?


Message has been deleted

Alex Mole

unread,
Jun 10, 2018, 5:02:05 AM6/10/18
to Extempore
Heya -- sorry to jump into this thread, but I hit the same issue on Win10...

To answer your question, I never make it as far as the last line - the segfault happens a second or two after I try to create the output stream. That happens whichever device id I use (assuming it's a valid one). But pm_print_devices enumerates them all fine, so I believe that portmidi is working, and I'm definitely able to hit the midi devices from other tools on my PC (midi-ox for instance).

This is using the most recent binary distro of extempore.

Please let me know if there's anything else I can try to help track this down :)


Cheers,
--alex


To unsubscribe from this group and stop receiving emails from it, send an email to extemporelan...@googlegroups.com.

Andrew Sorensen

unread,
Jun 11, 2018, 3:34:11 AM6/11/18
to Extempore
Let me know how you go with this build.

Alex Mole

unread,
Jun 14, 2018, 3:53:09 PM6/14/18
to extemp...@googlegroups.com
That's fixed it, thanks!

Was I just on an old build, or is this a prerelease?

Cheers,
--alex
Reply all
Reply to author
Forward
0 new messages