Csound Csound-dev Csound-tekno Search About

[CSOUND-DEV:5565] Re: PortMIDI on Windows

Date2004-12-21 21:03
FromVictor Lazzarini
Subject[CSOUND-DEV:5565] Re: PortMIDI on Windows
I have not checked it, because I'm away from work, but
I'll try a guess here. Sometimes MIDI devices send
NOTE_OFF messages as NOTE_ON with velocity 0;
If you're not getting note offs but retriggering, that
might be the problem. 

I had a look at the new pmidi.c
and at first, the code on sensMidi() now seems to be
right, as it is picking up the whole message instead of
a single byte at a time. 

It also occurs to me that with the adoption of portmidi,
we will have to change the external midi callback 
description in the API to deal with the portmidi 
message structure instead of raw bytes.

Victor
 
> Well, I updated from CVS and rebuilt before doing anything
> at all, so probably it was the latest stuff. An earlier
> attempt showed events coming in to pmidi.c, but they 
never
> got inserted or triggered any instruments. This attempt
> showed events inserting and triggering, but no note offs
> and repeated note ons.
> 
> Original Message:
> -----------------
> From:  jpff@codemist.co.uk
> Date: Tue, 21 Dec 2004 08:06:05 +0000
> To: csound-dev@eartha.mills.edu
> Subject: [CSOUND-DEV:5559] Re: PortMIDI on Windows
> 
> 
> Was that using the version I checked in last night or an
> earlier one? ==John ffitch
> >>>>> "Michael" == Michael Gogins <
gogins@pipeline.com>
> writes:
> 
>  Michael> I tested PortMIDI on Windows. It doesn't quite
> work for me
>  Michael> -- almost, but not quite.
> 
> 
> ----------------------------------------------------------
> ---------- mail2web - Check your email from the web at
> http://mail2web.com/ .
> 

Date2004-12-21 21:32
Fromjpff@codemist.co.uk
Subject[CSOUND-DEV:5566] Re: PortMIDI on Windows
Could someone be so kind as to send me a blow-by-blow instructions to
use virmidi on ALSA/Linux?  I really need a test world for MIDI and I
have no MIDI card on any of my Linix machines; someone introduced be
to virmidi which seems the solution as I should be able to drive
Csound from Rosegarden, but I do not understand aconnect
==John ffitch

Date2004-12-22 01:30
Fromsteven yi
Subject[CSOUND-DEV:5567] virmidi (was Re: Re: PortMIDI on Windows)
Hi John,

I found this on google:

http://linux-sound.org/quick-toots/4-sequencers_and_softsynths/quick-toot-midisynth_howto.html

I've used this toot before to setup virmidi, though that was a while 
ago.  I assume it's still valid.

Hope that helps!
steven


jpff@codemist.co.uk wrote:
> Could someone be so kind as to send me a blow-by-blow instructions to
> use virmidi on ALSA/Linux?  I really need a test world for MIDI and I
> have no MIDI card on any of my Linix machines; someone introduced be
> to virmidi which seems the solution as I should be able to drive
> Csound from Rosegarden, but I do not understand aconnect
> ==John ffitch
> 
> 
> 

Date2004-12-22 09:49
Fromjpff@codemist.co.uk
Subject[CSOUND-DEV:5568] Re: virmidi (was Re: Re: PortMIDI on Windows)
Thanks Steven.  I am a little further forward but I am still
confused.  I see

xenakis:~/Sourceforge/csound5> aconnect -li
client 0: 'System' [type=kernel]
    0 'Timer           '
    1 'Announce        '
        Connecting To: 63:0
client 72: 'Virtual Raw MIDI 1-0' [type=kernel]
    0 'VirMIDI 1-0     '
        Connecting To: 73:0
        Connected From: 63:1
client 73: 'Virtual Raw MIDI 1-1' [type=kernel]
    0 'VirMIDI 1-1     '
        Connected From: 72:0
client 74: 'Virtual Raw MIDI 1-2' [type=kernel]
    0 'VirMIDI 1-2     '
client 75: 'Virtual Raw MIDI 1-3' [type=kernel]
    0 'VirMIDI 1-3     '
xenakis:~/Sourceforge/csound5> aconnect -lo
client 72: 'Virtual Raw MIDI 1-0' [type=kernel]
    0 'VirMIDI 1-0     '
        Connecting To: 73:0
        Connected From: 63:1
client 73: 'Virtual Raw MIDI 1-1' [type=kernel]
    0 'VirMIDI 1-1     '
        Connected From: 72:0
client 74: 'Virtual Raw MIDI 1-2' [type=kernel]
    0 'VirMIDI 1-2     '
client 75: 'Virtual Raw MIDI 1-3' [type=kernel]
    0 'VirMIDI 1-3     '
xenakis:~/Sourceforge/csound5> 
ans when I run csound5 with -M3 I see....

**** Pm_CountDevices()=8
0: ALSA, VirMIDI 1-0 (output)
1: ALSA, VirMIDI 1-0 (input)
2: ALSA, VirMIDI 1-1 (output)
3: ALSA, VirMIDI 1-1 (input)
4: ALSA, VirMIDI 1-2 (output)
5: ALSA, VirMIDI 1-2 (input)
6: ALSA, VirMIDI 1-3 (output)
7: ALSA, VirMIDI 1-3 (input)
**** opening MIDI device 3

and then it continues.  However it never reads any MIDI events from
VirMIDI 1-1 when I play a score in Rosegarden.  It maybe that I do not
know how to set up the Rosegarden MIDI (I am really ignorant about
MIDI -- barely understand any of the term).  Should I use a different
sequencer, and if so how/which?  I really want to get the PortMIDI
port done and this lack of testing is a pain.
==John ffitch

Date2004-12-22 19:08
Fromsteven yi
Subject[CSOUND-DEV:5570] Re: virmidi (was Re: Re: PortMIDI on Windows)
Hi John,

I also do not use MIDI very much, and the last time I used virmidi I did 
not use aconnect to make connections, but a GUI application, which I do 
not remember off-hand.  (I believe I used 
http://pkl.net/~node/alsa-patch-bay.html, available from Planet CCRMA as 
an RPM).

It seems like you have everything set up (not knowing what the device 
numbers are for 63:0, 73:0, etc.).  If you have pd or vkeybd installed, 
you might want to try those for connecting to csound.  (vkeybd is in 
planet-ccrma and looks to be in debian stable).

I'll also give setting up virmidi a try, though it may be a couple of 
days until I can get some feedback here as I've just purchased a new 
laptop and am still working to get csound5 compiled on the new machine, 
as well as will be flying across the country.

steven


jpff@codemist.co.uk wrote:
> Thanks Steven.  I am a little further forward but I am still
> confused.  I see
> 
> xenakis:~/Sourceforge/csound5> aconnect -li
> client 0: 'System' [type=kernel]
>     0 'Timer           '
>     1 'Announce        '
>         Connecting To: 63:0
> client 72: 'Virtual Raw MIDI 1-0' [type=kernel]
>     0 'VirMIDI 1-0     '
>         Connecting To: 73:0
>         Connected From: 63:1
> client 73: 'Virtual Raw MIDI 1-1' [type=kernel]
>     0 'VirMIDI 1-1     '
>         Connected From: 72:0
> client 74: 'Virtual Raw MIDI 1-2' [type=kernel]
>     0 'VirMIDI 1-2     '
> client 75: 'Virtual Raw MIDI 1-3' [type=kernel]
>     0 'VirMIDI 1-3     '
> xenakis:~/Sourceforge/csound5> aconnect -lo
> client 72: 'Virtual Raw MIDI 1-0' [type=kernel]
>     0 'VirMIDI 1-0     '
>         Connecting To: 73:0
>         Connected From: 63:1
> client 73: 'Virtual Raw MIDI 1-1' [type=kernel]
>     0 'VirMIDI 1-1     '
>         Connected From: 72:0
> client 74: 'Virtual Raw MIDI 1-2' [type=kernel]
>     0 'VirMIDI 1-2     '
> client 75: 'Virtual Raw MIDI 1-3' [type=kernel]
>     0 'VirMIDI 1-3     '
> xenakis:~/Sourceforge/csound5> 
> ans when I run csound5 with -M3 I see....
> 
> **** Pm_CountDevices()=8
> 0: ALSA, VirMIDI 1-0 (output)
> 1: ALSA, VirMIDI 1-0 (input)
> 2: ALSA, VirMIDI 1-1 (output)
> 3: ALSA, VirMIDI 1-1 (input)
> 4: ALSA, VirMIDI 1-2 (output)
> 5: ALSA, VirMIDI 1-2 (input)
> 6: ALSA, VirMIDI 1-3 (output)
> 7: ALSA, VirMIDI 1-3 (input)
> **** opening MIDI device 3
> 
> and then it continues.  However it never reads any MIDI events from
> VirMIDI 1-1 when I play a score in Rosegarden.  It maybe that I do not
> know how to set up the Rosegarden MIDI (I am really ignorant about
> MIDI -- barely understand any of the term).  Should I use a different
> sequencer, and if so how/which?  I really want to get the PortMIDI
> port done and this lack of testing is a pain.
> ==John ffitch
> 
> 
> 

Date2004-12-23 08:38
Fromjpff@codemist.co.uk
Subject[CSOUND-DEV:5576] Re: virmidi (was Re: Re: PortMIDI on Windows)
I found the amidi command and used it to send simple MIDI commands to
csound5.  As a result I found (and fixed) a rather trivial error which
meant that the first MIDI event was repeated whenever there was a new
event, substituting for it.  No strong testing yet, but updated on CVS
and the Linux and source snapshot files.  Needs others to check it.
==John ffitch