Re: [LAD] send midi message

2012-01-06 Thread Pedro Lopez-Cabanillas
On Friday 06 January 2012, you wrote:
 btw: is there a way to list available clients/ports from the api.
 I know that aconnect -i / -o does this, but is there a c/c++ function?
 
 Dave

The functions are: snd_seq_query_next_client() and snd_seq_query_next_port(); 
you need to loop calling these functions while they return a correct answer. 
For instance, this is the relevant code in aconnect.c :

static void do_search_port(snd_seq_t *seq, int perm, action_func_t do_action)
{
  snd_seq_client_info_t *cinfo;
  snd_seq_port_info_t *pinfo;
  int count;

  snd_seq_client_info_alloca(cinfo);
  snd_seq_port_info_alloca(pinfo);
  snd_seq_client_info_set_client(cinfo, -1);
  while (snd_seq_query_next_client(seq, cinfo) = 0) {
/* reset query info */
snd_seq_port_info_set_client(pinfo, 
snd_seq_client_info_get_client(cinfo));
snd_seq_port_info_set_port(pinfo, -1);
count = 0;
while (snd_seq_query_next_port(seq, pinfo) = 0) {
  if (check_permission(pinfo, perm)) {
do_action(seq, cinfo, pinfo, count);
count++;
  }
}
  }
}

See: 
http://git.alsa-project.org/?p=alsa-utils.git;a=blob;f=seq/aconnect/aconnect.c
I guess you already know the reference documentation site:
http://www.alsa-project.org/alsa-doc/alsa-lib/seq.html

Just for comparison, a similar enumeration using Drumstick looks like this:

QListIteratorPortInfo it(m_Client-getAvailableOutputs());
while(it.hasNext()) {
PortInfo p = it.next();
cout  p.getClientName()  :  p.getPort();
}

See Drumstick's example drumgrid:
http://drumstick.sourceforge.net/docs/drumgrid.cpp-example.html

Regards,
Pedro
___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


Re: [LAD] send midi message

2012-01-06 Thread Dave Stikkolorum



On 06-01-12 11:21, Pedro Lopez-Cabanillas wrote:

On Friday 06 January 2012, you wrote:

btw: is there a way to list available clients/ports from the api.
I know that aconnect -i / -o does this, but is there a c/c++ function?

Dave

The functions are: snd_seq_query_next_client() and snd_seq_query_next_port();
you need to loop calling these functions while they return a correct answer.
For instance, this is the relevant code in aconnect.c :

static void do_search_port(snd_seq_t *seq, int perm, action_func_t do_action)
{
   snd_seq_client_info_t *cinfo;
   snd_seq_port_info_t *pinfo;
   int count;

   snd_seq_client_info_alloca(cinfo);
   snd_seq_port_info_alloca(pinfo);
   snd_seq_client_info_set_client(cinfo, -1);
   while (snd_seq_query_next_client(seq, cinfo)= 0) {
 /* reset query info */
 snd_seq_port_info_set_client(pinfo,
snd_seq_client_info_get_client(cinfo));
 snd_seq_port_info_set_port(pinfo, -1);
 count = 0;
 while (snd_seq_query_next_port(seq, pinfo)= 0) {
   if (check_permission(pinfo, perm)) {
 do_action(seq, cinfo, pinfo, count);
 count++;
   }
 }
   }
}

See:
http://git.alsa-project.org/?p=alsa-utils.git;a=blob;f=seq/aconnect/aconnect.c
I guess you already know the reference documentation site:
http://www.alsa-project.org/alsa-doc/alsa-lib/seq.html

Just for comparison, a similar enumeration using Drumstick looks like this:

 QListIteratorPortInfo  it(m_Client-getAvailableOutputs());
 while(it.hasNext()) {
 PortInfo p = it.next();
 cout  p.getClientName()  :  p.getPort();
 }

Thanks,

I was thinking that maybe it would be nicer to connect from my program 
to Hydrogen.

Then I don't have to restart Hydrogen everytime my program has ended.


See Drumstick's example drumgrid:
http://drumstick.sourceforge.net/docs/drumgrid.cpp-example.html

Regards,
Pedro

Dave
___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


Re: [LAD] send midi message

2012-01-06 Thread Dan Muresan
As an aside, I wish more applications used Jack MIDI instead of ALSA. It
would make applications easier to connect... True, there is a2j, but it
doesn't seem to work in all circumstances.


-- 
Dan Muresan
http://alumnus.caltech.edu/~muresan/
___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


Re: [LAD] send midi message

2012-01-06 Thread Dave Stikkolorum

On 06-01-12 12:06, Dan Muresan wrote:
As an aside, I wish more applications used Jack MIDI instead of ALSA. 
It would make applications easier to connect... True, there is a2j, 
but it doesn't seem to work in all circumstances.

I my case I want to have only a drum synth playing
and controlling it with midi messages.
I think that doing it with Jack would give me extra delay.



--
Dan Muresan
http://alumnus.caltech.edu/~muresan/ 
http://alumnus.caltech.edu/%7Emuresan/

Dave
___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


Re: [LAD] send midi message

2012-01-06 Thread Dan Muresan
 I my case I want to have only a drum synth playing
 and controlling it with midi messages.
 I think that doing it with Jack would give me extra delay.

Well, Hydrogen doesn't seem to have Jack MIDI, so you couldn't control it
that way anyway. This is proof of the network effect -- the more existing
apps use Jack MIDI, the more attractive it becomes to new apps.

But in general, I don't see why two apps communicating over Jack MIDI would
encounter more delay compared to two apps communicating over ALSA MIDI.

-- Dan

-- 
Dan Muresan
http://alumnus.caltech.edu/~muresan/
___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


Re: [LAD] send midi message

2012-01-06 Thread Dave Stikkolorum
Not the communication, but I think Hydrogen over jack has more delay 
then directly,

but I don't know this for sure.

Also jack causes other , not jack programs like audio plugins for 
browser, to hang/stop.


I think that in the case I also like to use my normal desktop 
applications and a sequencer

I jump to alsa.

Why is jack / or an other audio layer not completely integrated like in 
windows and mac os,

so that you don't have to start al the seperate applications?

Dave

On 06-01-12 12:33, Dan Muresan wrote:

 I my case I want to have only a drum synth playing
 and controlling it with midi messages.
 I think that doing it with Jack would give me extra delay.

Well, Hydrogen doesn't seem to have Jack MIDI, so you couldn't control 
it that way anyway. This is proof of the network effect -- the more 
existing apps use Jack MIDI, the more attractive it becomes to new apps.


But in general, I don't see why two apps communicating over Jack MIDI 
would encounter more delay compared to two apps communicating over 
ALSA MIDI.


-- Dan

--
Dan Muresan
http://alumnus.caltech.edu/~muresan/ 
http://alumnus.caltech.edu/%7Emuresan/

___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


Re: [LAD] send midi message

2012-01-06 Thread Paul Davis
On Fri, Jan 6, 2012 at 7:13 AM, Dave Stikkolorum dav...@dds.nl wrote:
 Not the communication, but I think Hydrogen over jack has more delay then
 directly,
 but I don't know this for sure.

the use of JACK adds no delay.

 Also jack causes other , not jack programs like audio plugins for browser,
 to hang/stop.

http://jackaudio.org/faq

 Why is jack / or an other audio layer not completely integrated like in
 windows and mac os,

its not completely integrated on either of those platform. if you want
to route audio between applications on windows or OS X, guess what
your likely first choice technology is going to be?

also, because this is linux. there is nobody around to force such things.
___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


Re: [LAD] send midi message

2012-01-06 Thread Dave Stikkolorum



On 06-01-12 13:22, Paul Davis wrote:

On Fri, Jan 6, 2012 at 7:13 AM, Dave Stikkolorumdav...@dds.nl  wrote:

Not the communication, but I think Hydrogen over jack has more delay then
directly,
but I don't know this for sure.

the use of JACK adds no delay.


Also jack causes other , not jack programs like audio plugins for browser,
to hang/stop.

http://jackaudio.org/faq


Why is jack / or an other audio layer not completely integrated like in
windows and mac os,

its not completely integrated on either of those platform. if you want
to route audio between applications on windows or OS X, guess what
your likely first choice technology is going to be?
Ok, maybe that's true. But the use is in the basic situations more 
simple I think.

don't get me wrong. I am a linux fan anyway ;)


also, because this is linux. there is nobody around to force such things.

Ok, that's true.
Sometimes I get very frustrated to start all these applications seperatly.
Also lash seems to be dead(according to it's creator).
And I don't think Jack sessions is going to be adopted by al these programs.


___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


Re: [LAD] send midi message

2012-01-06 Thread Dave Phillips

On 01/06/2012 07:32 AM, Dave Stikkolorum wrote:


Sometimes I get very frustrated to start all these applications 
seperatly.

Also lash seems to be dead(according to it's creator).
And I don't think Jack sessions is going to be adopted by al these 
programs.




Hi Dave,

You might consider learning how to write simple shell scripts as 
launchers. For my purposes scripts work nicely in many situations.


Best,

dp

___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


Re: [LAD] send midi message

2012-01-06 Thread Dave Stikkolorum


On 06-01-12 13:40, Dave Phillips wrote:

On 01/06/2012 07:32 AM, Dave Stikkolorum wrote:


Sometimes I get very frustrated to start all these applications 
seperatly.

Also lash seems to be dead(according to it's creator).
And I don't think Jack sessions is going to be adopted by al these 
programs.




Hi Dave,

You might consider learning how to write simple shell scripts as 
launchers. For my purposes scripts work nicely in many situations.



I have already done those things. But it is not completely satisfying.

I wrote some stuff to startup as a project.
So lets say I want to compose a song called song I start
a couple of seuencer programs with jack and save it under the same name
like song.muse , song.hsong etc..

But during the project you also like to add instruments etc. then
it is a little more complicated and less transaparent.


Best,

dp

___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev

___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


Re: [LAD] send midi message

2012-01-06 Thread Tim E. Real
On January 6, 2012 1:32:36 PM Dave Stikkolorum wrote:
 On 06-01-12 13:22, Paul Davis wrote:
  On Fri, Jan 6, 2012 at 7:13 AM, Dave Stikkolorumdav...@dds.nl  wrote:
  Not the communication, but I think Hydrogen over jack has more delay
  then directly,
  but I don't know this for sure.
  
  the use of JACK adds no delay.
  
  Also jack causes other , not jack programs like audio plugins for
  browser, to hang/stop.
  
  http://jackaudio.org/faq
  
  Why is jack / or an other audio layer not completely integrated like
  in
  windows and mac os,
  
  its not completely integrated on either of those platform. if you want
  to route audio between applications on windows or OS X, guess what
  your likely first choice technology is going to be?
 
 Ok, maybe that's true. But the use is in the basic situations more
 simple I think.
 don't get me wrong. I am a linux fan anyway ;)
 
  also, because this is linux. there is nobody around to force such
  things.
 
 Ok, that's true.
 Sometimes I get very frustrated to start all these applications seperatly.
 Also lash seems to be dead(according to it's creator).

LADISH has stepped in as a emulating replacement for LASH.
By now it may be fully functional. 
Nedko, is it working yet?

Tim.

 And I don't think Jack sessions is going to be adopted by al these programs.
 
 

___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


Re: [LAD] send midi message

2012-01-06 Thread thijs van severen
2012/1/6 Dan Muresan danm...@gmail.com

  I my case I want to have only a drum synth playing
  and controlling it with midi messages.
  I think that doing it with Jack would give me extra delay.

 Well, Hydrogen doesn't seem to have Jack MIDI, so you couldn't control it
 that way anyway. This is proof of the network effect -- the more existing
 apps use Jack MIDI, the more attractive it becomes to new apps.


fyi : the upcoming 0.9.6 release of hydrogen adds jack MIDI




 But in general, I don't see why two apps communicating over Jack MIDI
 would encounter more delay compared to two apps communicating over ALSA
 MIDI.

 -- Dan


 --
 Dan Muresan
 http://alumnus.caltech.edu/~muresan/

 ___
 Linux-audio-dev mailing list
 Linux-audio-dev@lists.linuxaudio.org
 http://lists.linuxaudio.org/listinfo/linux-audio-dev




-- 

follow me on my Audio  Linux blog http://audio-and-linux.blogspot.com/ !
___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


Re: [LAD] send midi message

2012-01-06 Thread m.wolkst...@gmx.de
Am Fri, 6 Jan 2012 23:05:09 +0100
schrieb thijs van severen thijsvanseve...@gmail.com:

 2012/1/6 Dan Muresan danm...@gmail.com
 
   I my case I want to have only a drum synth playing
   and controlling it with midi messages.
   I think that doing it with Jack would give me extra delay.
 
  Well, Hydrogen doesn't seem to have Jack MIDI, so you couldn't control it
  that way anyway. This is proof of the network effect -- the more existing
  apps use Jack MIDI, the more attractive it becomes to new apps.
 
 
 fyi : the upcoming 0.9.6 release of hydrogen adds jack MIDI
and also full jack session support ;)

greetings wolke

 
 
 
 
  But in general, I don't see why two apps communicating over Jack MIDI
  would encounter more delay compared to two apps communicating over ALSA
  MIDI.
 
  -- Dan
 
 
  --
  Dan Muresan
  http://alumnus.caltech.edu/~muresan/
 
  ___
  Linux-audio-dev mailing list
  Linux-audio-dev@lists.linuxaudio.org
  http://lists.linuxaudio.org/listinfo/linux-audio-dev
 
 
 
 
___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


[LAD] [OT] Statistics about usage of GUI toolkits

2012-01-06 Thread Julien Claassen

Hello everyone!
  Does anyone of you know about a good resource for statistical info about 
used graphical toolkits? So which toolkits are used the most. Including all 
platforms would be nice, but info on Linux-based toolkits would be a good 
start.

  Thanks and kind regards
  Julien

=-=-=-=-=-=-=-=-=-=-=-=-
Such Is Life: Very Intensely Adorable;
Free And Jubilating Amazement Revels, Dancing On - FLOWERS!

==  Find my music at  ==
http://juliencoder.de/nama/music.html
.
If you live to be 100, I hope I live to be 100 minus 1 day,
so I never have to live without you. (Winnie the Pooh)
___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


Re: [LAD] [OT] Statistics about usage of GUI toolkits

2012-01-06 Thread Ralf Madorf
Since I'm a noob too, this is how I once tested programming for Linux.

What are well known tool kits and what are less known tool kits? The
statistic already is in your mind.
What programming language is preferred?
For what usage is the tool kit needed?
Are licences important? (Wasn't important for me)
How easy seem to be first steps, when reading examples? (Was important
for me)
Is eye candy important?

You might search for something like FLTK.

http://de.wikipedia.org/wiki/Liste_von_GUI-Bibliotheken
http://de.wikipedia.org/wiki/FLTK

Regarding to Linux you might google for APP_NAME dependencies, assumed
the app's name doesn't start with a Q ;).

- Ralf

PS: Yes, I never programmed for Linux.

___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


Re: [LAD] [OT] Statistics about usage of GUI toolkits

2012-01-06 Thread Julien Claassen

Hello Ralf!
  Thanks for this. But I think I found the same article inthe english 
wikipedia. But I didn't see a statistic of usage.I'm not worried about how 
easyit is to program or on how much eye-candy there is or isn't. I'm just 
interested in the amount of usage. So you might say, I'm looking for defacto 
standards. I know, that on Linux there's a lot written in GTK+ and QT. I know, 
that QT also works on windows. I suppose, that on Mac one of there toolkits is 
currently preferred. I gather, that they are very much aware of consistency in 
their application looks.
  So I'm not even asking, which one is the best, but just which ones are used 
the most.

  Warm regards
Julien

=-=-=-=-=-=-=-=-=-=-=-=-
Such Is Life: Very Intensely Adorable;
Free And Jubilating Amazement Revels, Dancing On - FLOWERS!

==  Find my music at  ==
http://juliencoder.de/nama/music.html
.
If you live to be 100, I hope I live to be 100 minus 1 day,
so I never have to live without you. (Winnie the Pooh)
___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


Re: [LAD] [OT] Statistics about usage of GUI toolkits

2012-01-06 Thread Nils
Maybe you can query a Distribution and its package system for dependencies.
List the deps for all packages, grep for the toolkit names, count the lines.
Eventhough Archlinux AUR and Gentoo may have more packages many of them are 
duplicates (git versions etc.) so maybe you want a binary-only distribution 
like Debian. Exclude the devel-packages here.

I am personally interested if qt + kde or gtk is more frequent. I like both.:)

If this is not about Linux the answer is The native windows api/toolkit.

Nils

On Sat, 7 Jan 2012 00:10:55 +0100 (CET)
Julien Claassen jul...@mail.upb.de wrote:

 Hello everyone!
Does anyone of you know about a good resource for statistical info about 
 used graphical toolkits? So which toolkits are used the most. Including all 
 platforms would be nice, but info on Linux-based toolkits would be a good 
 start.
Thanks and kind regards
Julien
 
 =-=-=-=-=-=-=-=-=-=-=-=-
 Such Is Life: Very Intensely Adorable;
 Free And Jubilating Amazement Revels, Dancing On - FLOWERS!
 
 ==  Find my music at  ==
 http://juliencoder.de/nama/music.html
 .
 If you live to be 100, I hope I live to be 100 minus 1 day,
 so I never have to live without you. (Winnie the Pooh)
 ___
 Linux-audio-dev mailing list
 Linux-audio-dev@lists.linuxaudio.org
 http://lists.linuxaudio.org/listinfo/linux-audio-dev
 
___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


Re: [LAD] [OT] Statistics about usage of GUI toolkits

2012-01-06 Thread Ralf Madorf
GTK+ is available for Microsoft and Apple too.
FLTK is available for Microsoft and Apple too.
Qt is available for Microsoft and Apple too.

Veteran coders for all platforms for sure are able to comment how easy
and fast or how hard and slow a source code can be used for Unix,
M$ and Apple.

When I watched pics of software a lot of apps look like FLTK on Windows.

___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


[LAD] ganv build error: error: ISO C++ forbids declaration of ‘cairo_region_t’ with no type

2012-01-06 Thread Diego Simak
Hi all, I don't really know if this email should be directed to LAD, or LAU
or just Drobilla devs... anyway:

I'm trying to build Ingen from SVN using all LV2 files (packages,
extensions, tools, etc.) from SVN as well.
During ganv build stage I'm getting this error:

/home/diego/Desktop/ingen/drobilla-lad/ganv/ganv/canvas-base.h:259:2:
error: ISO C++ forbids declaration of ‘cairo_region_t’ with no type
/home/diego/Desktop/ingen/drobilla-lad/ganv/ganv/canvas-base.h:259:16:
error: expected ‘;’ before ‘*’ token

.and the build just fails.

I know that there's a ticket 792 [1] opened about this issue but I would
like to know if there is some simple solution to solve this error.
I'm on Ubuntu 10.04 with libcairo2-1.8.10.


Thank you very much.
Diego

[1]: http://dev.drobilla.net/ticket/792
___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


Re: [LAD] [OT] Statistics about usage of GUI toolkits

2012-01-06 Thread Julien Claassen

Hello Nils!
  Thanks. that should be interesting. If I have an answer for Linux, I'll be 
sure to let you know. :-)
  As for windows, would you happen to know, which one is the current native 
API? The wikipedia article was a little unclear about that. At least my view 
of it seemed a little unclear.

  Warm regards
  Julien

=-=-=-=-=-=-=-=-=-=-=-=-
Such Is Life: Very Intensely Adorable;
Free And Jubilating Amazement Revels, Dancing On - FLOWERS!

==  Find my music at  ==
http://juliencoder.de/nama/music.html
.
If you live to be 100, I hope I live to be 100 minus 1 day,
so I never have to live without you. (Winnie the Pooh)
___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev


Re: [LAD] send midi message

2012-01-06 Thread Dan Muresan
 fyi : the upcoming 0.9.6 release of hydrogen adds jack MIDI
 and also full jack session support ;)

There you go. So, to the OP, it might be a good idea to use Jack MIDI
instead of ALSA. It's easier to learn and use, more portable (FWIW...), and
easier to connect to other Jack apps.

For connecting apps that still use legacy ALSA MIDI (like pre-0.9.6
hydrogen in this case), there's always a2jmidid (
http://home.gna.org/a2jmidid/)


-- Dan
___
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev