Re: [fpc-pascal] Re: Linux sound (especially MIDI) programming: ALSA?

2012-05-15 Thread Mark Morgan Lloyd

Mark Morgan Lloyd wrote:

leledumbo wrote:

http://sourceforge.net/projects/fpalsa/
http://sourceforge.net/projects/humus/


Thanks for those. Also 
http://perso.wanadoo.es/plcl/alsapas/alsapas-en.html so as I thought 
there appears to be (at least) two sets of ALSA bindings: fpalsa and 
alsapas.


Noted HuMuS, but that appears to be for PortAudio. However using that as 
a seed I get to http://breakoutbox.de/pascal/pascal.html#PortAudio which 
claims to include PortMidi support- this is supposedly cross-platform 
but requires an additional library which might not be available on all 
distreaux. Also MIDI is very much the poor cousin and operating 
support is patchy, so since I've got ALSA working I'm reluctant to risk 
breaking anything.


Since running on anything other than Linux is not a significant 
priority, I think I'll probably start off with by doing a comparison of 
fpalsa and alsapas, and writing code that will support either if 
possible. If I could also code to support PortMidi that would be a 
bonus, but by no means essential: I'm trying to knock together a MIDI 
transposer for my own use, and testbed some techniques for another project.


To wrap this up, alsapas is a translation of the ALSA headers etc. as of 
v0.9.7, and fpalsa is similar but corresponds to the slightly later 
v1.0.24. They have a slightly different style in that alsapas uses 
variable parameters while fpalsa uses pointers to be a bit closer to the 
original (and possibly to allow null parameters); alsapas is attractive 
in that it's got useful examples.


As far as MIDI is concerned, alsapas still works but there's a handful 
of parameters named out that are no longer compatible with FPC, I've 
followed the author's convention and renamed those to _out; basic 
operation appears OK on Debian Squeeze x86 with a 3.2 kernel.


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Re: Linux sound (especially MIDI) programming: ALSA?

2012-05-07 Thread leledumbo
http://sourceforge.net/projects/fpalsa/
http://sourceforge.net/projects/humus/


--
View this message in context: 
http://free-pascal-general.1045716.n5.nabble.com/Linux-sound-especially-MIDI-programming-ALSA-tp5688908p5690300.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Re: Linux sound (especially MIDI) programming: ALSA?

2012-05-07 Thread Mark Morgan Lloyd

leledumbo wrote:

http://sourceforge.net/projects/fpalsa/
http://sourceforge.net/projects/humus/


Thanks for those. Also 
http://perso.wanadoo.es/plcl/alsapas/alsapas-en.html so as I thought 
there appears to be (at least) two sets of ALSA bindings: fpalsa and 
alsapas.


Noted HuMuS, but that appears to be for PortAudio. However using that as 
a seed I get to http://breakoutbox.de/pascal/pascal.html#PortAudio which 
claims to include PortMidi support- this is supposedly cross-platform 
but requires an additional library which might not be available on all 
distreaux. Also MIDI is very much the poor cousin and operating 
support is patchy, so since I've got ALSA working I'm reluctant to risk 
breaking anything.


Since running on anything other than Linux is not a significant 
priority, I think I'll probably start off with by doing a comparison of 
fpalsa and alsapas, and writing code that will support either if 
possible. If I could also code to support PortMidi that would be a 
bonus, but by no means essential: I'm trying to knock together a MIDI 
transposer for my own use, and testbed some techniques for another project.


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal