Csound Csound-dev Csound-tekno Search About

[Csnd] Re: Re: soft midi connections, linux

Date2008-08-31 20:19
Fromvictor
Subject[Csnd] Re: Re: soft midi connections, linux
No, just lazy and wanting to know how to do it without having to
experiment. So how do you do this, please?

Thanks

Victor
----- Original Message ----- 
From: "Dave Phillips" 
To: 
Sent: Sunday, August 31, 2008 8:11 PM
Subject: [Csnd] Re: soft midi connections, linux


> victor wrote:
>> Has anyone used MIDI software connections on alsa/linux. I mean
>> running csound and then connecting using aconnect, from  say a
>> sequencer?
> Yes, I have. Are you having a problem with it ?
>
> Best,
>
> dp
>
>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe 
> csound" 


Date2008-09-01 14:13
FromDave Phillips
Subject[Csnd] Re: Re: Re: soft midi connections, linux
victor wrote:
> No, just lazy and wanting to know how to do it without having to
> experiment. So how do you do this, please? 
As you know, Csound makes its own MIDI connections, so if you want to 
drive it from a sequencer you'll use aconnect to hook the sequencer to 
the input port designated by the -M option (see below).

Here's an old and simple CSD for MIDI input. In this example I use an 
external MIDI keyboard (connected to Live's hardware MIDI In port) to 
play the synthesizer :




;;; Set -M to some ridiculous value to see a list of available numbered 
MIDI input devices.
;;; At -M100 my system reports that these devices exist for use with 
that option:

; The available MIDI in devices are:
;    0: EMU10K1 MPU-401 (UART) (ALSA)
;    1: VirMIDI 1-0 (ALSA)
;    2: VirMIDI 1-1 (ALSA)
;    3: VirMIDI 1-2 (ALSA)
;    4: VirMIDI 1-3 (ALSA)

;;; In the following instance I've selected the external MIDI port on my 
SBLive
;;; for MIDI input and the default audio output device:

-+rtmidi=pm -M0 -o dac -d -m0





    instr 1
iamp    ampmidi    5000
kfreq    cpsmidib
kmod    midictrl    1,0,10    ; Mod wheel controls vibrato depth and rate.
irate    veloc    1,10        ; This idea shamelessly stolen from J. 
Bohn's Csound tutorial
kvib    oscil    kmod, irate, 1    ; at 
http://www.bohnmedia.com/jbohn/csound/index.html.
a1    oscili    iamp,kfreq+kvib,2
a2    oscili    iamp,(kfreq*1.003)+kvib,3
a3    oscili    iamp,(kfreq*.997)+kvib,4
asig    =    a1+a2+a3   
kenv    linenr    1,.07,.11,.01
    out    asig*kenv
    endin



; ==============================================


f1 0 8192 10 .1 0 .2 0 0 .4 0 0 0 0 .8
f2 0 8192 10 1 0 .9 0 0 .7 0 0 0 .4
f3 0 8192 10 .5 0 .6 0 0 .3 0 0 0 .9
f4 0 8192 10 .9 0 .3 0 0 .6 0 0 0 .5
f0 10000
e






Victor, let me know if this example works for you or if I've 
misunderstood your question. :)

Best,

dp


Date2008-09-02 00:05
From"Andres Cabrera"
Subject[Csnd] Re: Re: Re: Re: soft midi connections, linux
AttachmentsNone  None  

Date2008-09-02 14:42
FromVictor.Lazzarini@nuim.ie
Subject[Csnd] Re: Re: Re: Re: soft midi connections, linux
AttachmentsNone  

Date2008-09-02 15:00
FromDave Phillips
Subject[Csnd] Re: Re: Re: Re: Re: soft midi connections, linux
Victor.Lazzarini@nuim.ie wrote:
> Dave,
>
> thanks. As far as hardware midi is concerned, I'm OK, but I was
> wondering about soft midi, say from Timidity. Does alsa provide
> soft midi connections by default (the 'virMIDI' ones?), or do you
> have to configure them?
>
> Also, I am using -+rtmidi=alsa (no portmidi in the system I want
> to do this, the OLPC). If I list with aconnect -l I generally get
> just the hardware ports. How to get the soft ones?
modprobe snd-virmidi

That will give you four virtual MIDI ports that you can address and 
connect just like the real things.

Best,

dp


Date2008-09-02 21:32
FromVictor.Lazzarini@nuim.ie
Subject[Csnd] Re: Re: Re: Re: Re: Re: soft midi connections, linux
AttachmentsNone