Csound Csound-dev Csound-tekno Search About

[Cs-dev] MIDI problems with Csound5

Date2006-04-18 06:10
FromAaron Krister Johnson
Subject[Cs-dev] MIDI problems with Csound5
AttachmentsNone  

Date2006-04-18 09:12
FromIstvan Varga
SubjectRe: [Cs-dev] MIDI problems with Csound5
AttachmentsNone  

Date2006-04-18 14:35
FromIstvan Varga
SubjectRe: [Cs-dev] MIDI problems with Csound5
AttachmentsNone  

Date2006-04-18 15:10
FromAaron Krister Johnson
SubjectRe: [Cs-dev] MIDI problems with Csound5
AttachmentsNone  

Date2006-04-18 20:32
FromIstvan Varga
SubjectRe: reflections on packaging (was Re: [Cs-dev] MIDI problems with Csound5)
AttachmentsNone  

Date2006-04-18 21:12
FromAaron Krister Johnson
Subjectreflections on packaging (was Re: [Cs-dev] MIDI problems with Csound5)
AttachmentsNone  

Date2006-04-19 01:34
FromAaron Krister Johnson
SubjectRe: reflections on packaging (was Re: [Cs-dev] MIDI problems with Csound5)
AttachmentsNone  

Date2006-04-19 04:02
FromJonathan Murphy
SubjectRe: [Cs-dev] MIDI problems with Csound5
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Aaron,

I found it a little tricky to install csound5 at first, and so when
I'd figured out how to do it I wrote a little guide, in the hope that
it would make things easier for others. You can find it here: 

http://csounds.com/phpBB2/viewtopic.php?t=115&sid=389a491fd6faa1f7f8b635fa15fdb157

It's really not that difficult (and I'm not a developer, just
lurking). 

Regarding your MIDI troubles, surely if there's an alsa driver for
your soundcard (you're attaching a keyboard to the joystick/MIDI port,
right?), then your device will show up on the alsa sequencer (aconnect
- -li), and you can connect it to a virmidi port hosting a csound
synth. Or am I missing something?

Jonathan.

Aaron Krister Johnson  writes:

> Istvan,
>
> Thanks for your quick reply. I did try PortMidi, and had similar problems. 
> I'll try again.
>
> However, if it's not hard, I'm sure not only I but others would benefit from 
> and rejoice at having arbitrary /dev reading of MIDI streams back in the 
> code, instead of a forced standard like ALSA or PortMIDI. After all, the 
> Linux philosophy is about freedom of choice, right? ;)
>
> One other major issue I noticed was that "-+rtaudio=alsa" seems broken, in 
> that if I open my score with a dummy ftable for say 1000 seconds like so:
>
>  f0 1000
>  e
>
> ...then run it, my performance time is only a few seconds. Has anyone else 
> noticed this? It worked as expected with the old Csound-4.23f12-GNU version 
> available on Csounds.com.
>
> FYI, I use a Slackware 10.1 system on a Dell Inspiron 8200 Laptop.
>
> For now, I'm sticking with Csound4, but i'll happily help test Csound5 until 
> it's workable for me.
>
> Best,
> Aaron.
>
> On Tuesday 18 April 2006 3:12 am, Istvan Varga wrote:
>> On Tuesday 18 April 2006 07:10, Aaron Krister Johnson wrote:
>> > I'd like to use my serial port (/dev/ttyS0) for send MIDI data to Csound,
>> > which worked fine in Csound4 (simple--- "-M/dev/ttyS0" and you're good to
>> > go)
>>
>> Well, I am not sure if ALSA can use the serial port devices for MIDI,
>> but you can work around the issue by piping MIDI data from /dev/ttyS0
>> to a virtual MIDI or MIDI through device, for example:
>>
>>   dd if=/dev/ttyS0 of=/dev/snd/midiC1D0 bs=1
>>
>> > Why is such a simple thing so impossible with Csound5? I tried the
>> > "-+rtmidi=alsa -Mhw:1,0" options, and Csound5 doesn't even recognize that
>> > I have a virmidi driver in the kernel, complaining of no such device.
>>
>> Did you try using the PortMidi driver (which is the default) ?
>> If you do use -+rtmidi=alsa then make sure that you select the right
>> device name. Also, the virmidi driver in ALSA tends to behave in a
>> somewhat buggy and inconsistent way; I often need to use hacks like
>> this to pipe data from one virmidi port to another, and only then can
>> I read MIDI:
>>
>>   dd if=/dev/snd/midiC1D0 of=/dev/snd/midiC1D1 bs=1
>>
>> > I tried the "-+rtmidi=null -M/dev/ttyS0" line, and that failed too....why
>> > is this so hard?
>>
>> The 'null' MIDI driver, as its name says, is a dummy one, so you cannot
>> expect it to read or write any actual MIDI devices.
>>
>> If you still cannot solve the problem, then the Csound4-style MIDI I/O
>> that uses files in /dev can easily be added back as an -+rtmidi option.
>>
>>
>> -------------------------------------------------------
>> This SF.Net email is sponsored by xPML, a groundbreaking scripting language
>> that extends applications into web and mobile media. Attend the live
>> webcast and join the prime developer group breaking into this new coding
>> territory!
>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting language
> that extends applications into web and mobile media. Attend the live webcast
> and join the prime developer group breaking into this new coding territory!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 

iD8DBQFERahLCibrChMdb1sRAki0AJwM/31YtHNIBJoLHFcBzyu88IAEbgCfS1i7
8EKaSEz45QCBp8OhJt2RYFA=
=+7iY
-----END PGP SIGNATURE-----


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2006-04-19 04:56
FromAaron Krister Johnson
SubjectRe: [Cs-dev] MIDI problems with Csound5
AttachmentsNone  

Date2006-04-19 09:37
FromRichard Boulanger
SubjectRe: [Cs-dev] MIDI problems with Csound5
Your guide is most appreciated and helpful Jonathan.  Thanks.

On Apr 18, 2006, at 11:02 PM, Jonathan Murphy wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> Aaron,
>
> I found it a little tricky to install csound5 at first, and so when
> I'd figured out how to do it I wrote a little guide, in the hope that
> it would make things easier for others. You can find it here:
>
> http://csounds.com/phpBB2/viewtopic.php? 
> t=115&sid=389a491fd6faa1f7f8b635fa15fdb157
>
> It's really not that difficult (and I'm not a developer, just
> lurking).
>
> Regarding your MIDI troubles, surely if there's an alsa driver for
> your soundcard (you're attaching a keyboard to the joystick/MIDI port,
> right?), then your device will show up on the alsa sequencer (aconnect
> - -li), and you can connect it to a virmidi port hosting a csound
> synth. Or am I missing something?
>
> Jonathan.
>
> Aaron Krister Johnson  writes:
>
>> Istvan,
>>
>> Thanks for your quick reply. I did try PortMidi, and had similar  
>> problems.
>> I'll try again.
>>
>> However, if it's not hard, I'm sure not only I but others would  
>> benefit from
>> and rejoice at having arbitrary /dev reading of MIDI streams back  
>> in the
>> code, instead of a forced standard like ALSA or PortMIDI. After  
>> all, the
>> Linux philosophy is about freedom of choice, right? ;)
>>
>> One other major issue I noticed was that "-+rtaudio=alsa" seems  
>> broken, in
>> that if I open my score with a dummy ftable for say 1000 seconds  
>> like so:
>>
>>  f0 1000
>>  e
>>
>> ...then run it, my performance time is only a few seconds. Has  
>> anyone else
>> noticed this? It worked as expected with the old Csound-4.23f12- 
>> GNU version
>> available on Csounds.com.
>>
>> FYI, I use a Slackware 10.1 system on a Dell Inspiron 8200 Laptop.
>>
>> For now, I'm sticking with Csound4, but i'll happily help test  
>> Csound5 until
>> it's workable for me.
>>
>> Best,
>> Aaron.
>>
>> On Tuesday 18 April 2006 3:12 am, Istvan Varga wrote:
>>> On Tuesday 18 April 2006 07:10, Aaron Krister Johnson wrote:
>>>> I'd like to use my serial port (/dev/ttyS0) for send MIDI data  
>>>> to Csound,
>>>> which worked fine in Csound4 (simple--- "-M/dev/ttyS0" and  
>>>> you're good to
>>>> go)
>>>
>>> Well, I am not sure if ALSA can use the serial port devices for  
>>> MIDI,
>>> but you can work around the issue by piping MIDI data from /dev/ 
>>> ttyS0
>>> to a virtual MIDI or MIDI through device, for example:
>>>
>>>   dd if=/dev/ttyS0 of=/dev/snd/midiC1D0 bs=1
>>>
>>>> Why is such a simple thing so impossible with Csound5? I tried the
>>>> "-+rtmidi=alsa -Mhw:1,0" options, and Csound5 doesn't even  
>>>> recognize that
>>>> I have a virmidi driver in the kernel, complaining of no such  
>>>> device.
>>>
>>> Did you try using the PortMidi driver (which is the default) ?
>>> If you do use -+rtmidi=alsa then make sure that you select the right
>>> device name. Also, the virmidi driver in ALSA tends to behave in a
>>> somewhat buggy and inconsistent way; I often need to use hacks like
>>> this to pipe data from one virmidi port to another, and only then  
>>> can
>>> I read MIDI:
>>>
>>>   dd if=/dev/snd/midiC1D0 of=/dev/snd/midiC1D1 bs=1
>>>
>>>> I tried the "-+rtmidi=null -M/dev/ttyS0" line, and that failed  
>>>> too....why
>>>> is this so hard?
>>>
>>> The 'null' MIDI driver, as its name says, is a dummy one, so you  
>>> cannot
>>> expect it to read or write any actual MIDI devices.
>>>
>>> If you still cannot solve the problem, then the Csound4-style  
>>> MIDI I/O
>>> that uses files in /dev can easily be added back as an -+rtmidi  
>>> option.
>>>
>>>
>>> -------------------------------------------------------
>>> This SF.Net email is sponsored by xPML, a groundbreaking  
>>> scripting language
>>> that extends applications into web and mobile media. Attend the live
>>> webcast and join the prime developer group breaking into this new  
>>> coding
>>> territory!
>>> http://sel.as-us.falkag.net/sel? 
>>> cmd=lnk&kid=110944&bid=241720&dat=121642
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>>
>> -------------------------------------------------------
>> This SF.Net email is sponsored by xPML, a groundbreaking scripting  
>> language
>> that extends applications into web and mobile media. Attend the  
>> live webcast
>> and join the prime developer group breaking into this new coding  
>> territory!
>> http://sel.as-us.falkag.net/sel? 
>> cmd=lnk&kid=110944&bid=241720&dat=121642
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2 (GNU/Linux)
> Comment: Processed by Mailcrypt 3.5.8  mailcrypt.sourceforge.net/>
>
> iD8DBQFERahLCibrChMdb1sRAki0AJwM/31YtHNIBJoLHFcBzyu88IAEbgCfS1i7
> 8EKaSEz45QCBp8OhJt2RYFA=
> =+7iY
> -----END PGP SIGNATURE-----
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting  
> language
> that extends applications into web and mobile media. Attend the  
> live webcast
> and join the prime developer group breaking into this new coding  
> territory!
> http://sel.as-us.falkag.net/sel? 
> cmd=lnk&kid=110944&bid=241720&dat=121642
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2006-04-19 10:06
FromIstvan Varga
SubjectRe: reflections on packaging (was Re: [Cs-dev] MIDI problems with Csound5)
AttachmentsNone  

Date2006-04-19 16:04
FromAaron Krister Johnson
SubjectRe: reflections on packaging (was Re: [Cs-dev] MIDI problems with Csound5)
AttachmentsNone  

Date2006-04-20 01:25
FromJonathan Murphy
SubjectRe: [Cs-dev] MIDI problems with Csound5
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Thanks for your kind words Dr B.


Aaron,

If I were you I would:

1. Follow Istvan's advice above.
2. If you're still having trouble, remove all of the bits and broken
pieces of Csound5, make sure that you have the required dependencies,
and reinstall.

> 2 links in your guide don't work
>
> http://www.csounds.com/manual/html/ch07s02s06.html 
> http://www.csounds.com/manual/html/ch07s02s07.html 

Thanks for pointing this out. The manual has changed, and now points
to a really outdated article. What's going on there folks? I'd be
happy to write an update if it would be useful. 

> You say they list dependencies, etc. so I'm SOL!

Not really. You need these for a minimal installation:

http://www.python.org/download/
http://www.scons.org/download.php
http://www.alsa-project.org/
http://www.mega-nerd.com/libsndfile/#Download

Python (2.4 is the default, but 2.3 should still work), SCons, ALSA,
libsndfile. 

For a more extensive build you might also want:

http://jackit.sourceforge.net/download/
http://www.ecs.soton.ac.uk/~njh/liblo/
http://download.savannah.gnu.org/releases/fluid/
http://dssi.sourceforge.net/download.html
http://www.ladspa.org/ladspa_sdk/installation.html
http://www.fltk.org/software.php
http://prdownloads.sourceforge.net/pure-data/pd-0.39-2.src.tar.gz?download

JACK, liblo (for OSC), Fluidsynth, DSSI, LADSPA, FLTK,
PureData.

You will need to build the headers where applicable. I have a feeling
that you're missing the alsa headers. Please make sure that
/usr/include/alsa contains the appropriate files. 

If you want to use the FLTK opcodes then you will need to make sure
that you configure it using the --enable-threads argument. 

>> Regarding your MIDI troubles, surely if there's an alsa driver for
>> your soundcard (you're attaching a keyboard to the joystick/MIDI port,
>> right?), then your device will show up on the alsa sequencer (aconnect
>> -li), and you can connect it to a virmidi port hosting a csound
>> synth. Or am I missing something?
>
> Yes, you are! I haven't had any issues with virmidi until Csound5. Aside from 
> not being able to compile Csound with portmidi support (I guess I'll try a 
> pre-compiled binary next), using the ALSA drivers (both midi and audio) 
> without the port* layers didn't work.

Yes, I read your earlier post. What I meant was that if you're
connecting your digital piano to your soundcard, and your soundcard is
supported by alsa, then you don't need to use /dev/ttySO. Is this the
case or are you just connecting it to a spare serial port? What are
the outputs of aconnect -li and aconnect -lo?

Forget about PortMusic. It's wonderful that there is a multiplatform
sound server, and that Csound5 can be compiled to use it, but it is a
sound server, not a driver. It will be using alsa or oss to do it's
work. You need to get the alsa interface working.

> My setup is this: I use alsa's virmidi module to patch whatever softsynths, 
> sequencers, etc. to each other 

So do I. There is no problem doing this with Csound5. Istvan's
interface is rock solid.

A very basic installation should be possible with the following
invocations:

    scons usePortAudio=0 usePortMIDI=0 useJack=0 useFLTK=0
    buildLoris=0 dynamicCsoundLibrary=1 buildDSSI=0

    scons usePortAudio=0 usePortMIDI=0 useJack=0 useFLTK=0
    buildLoris=0 dynamicCsoundLibrary=1 buildDSSI=0 install

If you do not get errors then there should be no problems. You will
need to set the following environment variable:
    
    export OPCODEDIR=/usr/local/lib/csound/plugins
   
Hope that this helps,
Jonathan.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 

iD8DBQFERtTZCibrChMdb1sRAgIOAJsFKZ/ISccFd7b1QTswSHJcQzxdCgCfczLs
YZEtCoujSPApxKGgNTb4UOE=
=atXd
-----END PGP SIGNATURE-----


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2006-04-20 01:54
FromJonathan Murphy
SubjectRe: [Cs-dev] MIDI problems with Csound5
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Sorry people, I found the page that I was looking for. I'll update the
forum page. The page that I came across when I was scanning the manual:

http://www.csounds.com/manual/html/IntroInstall.html#IntroInstallLinux

does however point to some old info. I'm not sure if this is going to
be removed in Steven's current reworking of the manual. My offer still
stands: I'd be happy to write (and maintain) an update. Just the very
basic stuff, how to install from source, environment variables,
and so forth. If it would help.

Regards,
Jonathan.
 
Jonathan Murphy  writes:

> Thanks for pointing this out. The manual has changed, and now points
> to a really outdated article. What's going on there folks? I'd be
> happy to write an update if it would be useful. 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 

iD8DBQFERtvKCibrChMdb1sRArm1AJkBtdACmJ386+KK+NaUx98z4cBDewCfbMnY
t44Hanmyot0oOTV8sJb9xH8=
=fYfq
-----END PGP SIGNATURE-----


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2006-04-20 03:29
FromAaron Krister Johnson
SubjectEureka! (was Re: [Cs-dev] MIDI problems with Csound5)
AttachmentsNone  

Date2006-05-04 22:25
FromIstvan Varga
SubjectRe: reflections on packaging (was Re: [Cs-dev] MIDI problems with Csound5)
AttachmentsNone