Thanks for the reply, I would need another help, using the sample files "portmidi.xtm" I can not understand to do this step:
"by passing the appropriate device index arguments to
pm_create_input_stream and pm_create_output_stream you can create
as many as you like"
on the left is the command being executed and on the right the result displayed on the command shell :
(sys:load "libs/external/portmidi.xtm") ------> Loading xtmportmidi library... done in 2.400363 seconds
sys:load notification portmidi already loaded
(pm_initialize) ------------------------------------------------> Portmidi successfully initialised.
(pm_print_devices) ----------------------------------------> Portmidi: found 4 devices
---- device 0 ----
<PmDeviceInfo: interface=MMSystem name=Microsoft MIDI Mapper I/O?:O>
---- device 1 ----
<PmDeviceInfo: interface=MMSystem name=loopMIDI Port I/O?:I>
---- device 2 ----
<PmDeviceInfo: interface=MMSystem name=Microsoft GS Wavetable Synth I/O?:O>
---- device 3 ----
<PmDeviceInfo: interface=MMSystem name=loopMIDI Port I/O?:O>
(bind-val midi_out PmStream* (pm_create_output_stream (Pm_GetDefaultOutputDeviceID))) -------> SetValue: midi_out >>> i8*
(bind-func get_midi_out -----------------------> Compiled: get_midi_out >>> [i8*]* zone size: 8192 (default)
(lambda ()
midi_out))
(define *midi-out* (get_midi_out))
(play-midi-note (now) *midi-out* (random 60 72) (random 60 90) 44100) --------------> eval: unbound variable: *midi-note-on*
Trace: play-midi-note
loopmidi is a virtual loop midi ports I normally use with Supercollider
thanks