Hello !
Thanks for your response but I don't succeed to have something working :(
my code :
init:
if (snd_seq_open(&seq, "default", SND_SEQ_OPEN_DUPLEX, 0) >= 0) {
m_iClient = snd_seq_set_client_name(seq, "LiveMix");
m_iPort = snd_seq_create_simple_port(seq, "control", 0,
SND_SEQ_PORT_TYPE_MIDI_GENERIC | SND_SEQ_PORT_TYPE_SOFTWARE
| SND_SEQ_PORT_TYPE_APPLICATION);
m_iMidi = snd_seq_create_simple_port(seq, "control",
SND_SEQ_PORT_CAP_READ | SND_SEQ_PORT_CAP_SUBS_READ |
SND_SEQ_PORT_CAP_WRITE | SND_SEQ_PORT_CAP_SUBS_WRITE,
SND_SEQ_PORT_TYPE_APPLICATION);
} else {
qDebug() << "The ALSA MIDI system is not available. No ports based
on it will be created";
}
get (to save) :
snd_seq_client_info_t *cinfo;
snd_seq_port_info_t *pinfo;
snd_seq_client_info_alloca(&cinfo);
snd_seq_port_info_alloca(&pinfo);
snd_seq_client_info_set_client(cinfo, -1);
snd_seq_port_info_set_client(pinfo,
snd_seq_client_info_get_client(cinfo));
snd_seq_port_info_set_port(pinfo, m_iMidi);
snd_seq_query_subscribe_set_client(subs, m_iClient);
snd_seq_query_subscribe_set_port(subs, m_iMidi);
snd_seq_query_subscribe_set_type(subs, SND_SEQ_QUERY_SUBS_READ);
snd_seq_query_subscribe_set_index(subs, 0);
while (snd_seq_query_port_subscribers(seq, subs) >= 0) {
const snd_seq_addr_t *addr;
addr = snd_seq_query_subscribe_get_addr(subs);
qDebug()<<222<<addr->client<<addr->port;
snd_seq_query_subscribe_set_index(subs,
snd_seq_query_subscribe_get_index(subs) + 1);
}
snd_seq_query_subscribe_alloca(&subs);
snd_seq_query_subscribe_set_client(subs, m_iClient);
snd_seq_query_subscribe_set_port(subs, m_iMidi);
snd_seq_query_subscribe_set_type(subs, SND_SEQ_QUERY_SUBS_WRITE);
snd_seq_query_subscribe_set_index(subs, 0);
while (snd_seq_query_port_subscribers(seq, subs) >= 0) {
const snd_seq_addr_t *addr;
addr = snd_seq_query_subscribe_get_addr(subs);
qDebug()<<333<<addr->client<<addr->port;
}
The first block seem to return all the client-port, the second return
nothing. :(
Does anybody have an idea ?
Thanks in advance
Stéphane
On Dec 10, 2007 9:02 AM, Clemens Ladisch < cladisch(a)fastmail.net> wrote:
> Stéphane Brunner wrote:
> > Than I want to know with port will be connected on witch other to
> reconnect
> > it on other LiveMix run.
>
> Try snd_seq_query_port_subscribers().
>
>
> HTH
> Clemens
> _______________________________________________
> Linux-audio-dev mailing list
> Linux-audio-dev(a)lists.linuxaudio.org
> http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev
>
--
Stéphane Brunner
mail : stephane.brunner(a)gmail.com
messageries instantanées : stephane.brunner(a)gmail.com (
http://talk.google.com)
--------------------------------------
http://www.ubuntu-fr.org - Distribution Linux
http://fr.wikipedia.org - Encyclopédie communautaire
http://mozilla-europe.org - Navigateur internet / Client de messagerie
http://framasoft.net - Annuaire de logiciel libre (gratuit)
http://jeuxlibres.net - Jeux Libres (gratuit)
--------------------------------------
Il existe 10 sortes de personnes : celles qui connaissent le binaire, et les
autres.
Si Microsoft inventait un truc qui plante pas, ce serait un clou.
Si un jour on te reproche que ton travail n'est pas un travail de
professionnel, dis toi que :
Des amateurs ont construit l'arche de Noé, et des professionnels le Titanic.
Hello,
I've installed the slv2 package on my machine but can't run any plugins?
When I start
lv2_jack_host
get lots of known plugins URI's like
http://ll-plugins.nongnu.org/lv2/dev/klaviatur/0.0.0
which I want to run.
But when I start I get
lv2_jack_host http://ll-plugins.nongnu.org/lv2/dev/klaviatur/0.0.0
Failed to find plugin http://ll-plugins.nongnu.org/lv2/dev/klaviatur/0.0.0.
also running it with
lv2_jack_host /usr/lib/lv2/klaviatur.lv2/manifest.ttl
URI: /usr/lib/lv2/klaviatur.lv2/manifest.ttl
Failed to find plugin /usr/lib/lv2/klaviatur.lv2/manifest.ttl.
or
lv2_jack_host file://usr/lib/lv2/klaviatur.lv2/manifest.ttl
URI: file://usr/lib/lv2/klaviatur.lv2/manifest.ttl
Failed to find plugin file://usr/lib/lv2/klaviatur.lv2/manifest.ttl.
fails.
Can anybody give me a hint how to start this host with the correct URI
parameter?
Thanks
Chris
hi everyone!
i'm looking for a simple way of creating a system's phase response graph
from its impulse response. i know the maths is trivial, but i couldn't
find a program that does it... anyone? if possible, i'd prefer a quick
solution that does not involve having to learn GNU octave or the
intricacies of gnuplot :)
thanks,
jörn
--
jörn nettingsmeier
home://germany/45128 essen/lortzingstr. 11/
http://spunk.dnsalias.org
phone://+49/201/491621
Kurt is up in Heaven now.
Does anyone know if any of the cards that support Dolby Digital live (DDL)
have linux support including the DDL support. I couldn't really find mention
of linux DDL support anywhere.
Thanks,
Nathanael
Attached are two patches:
* The logs patch replaces various calls to fprintf(),printf() and
fputs() with calls to jack_error() and newly appeared jack_info()
functionality. It also fixes some obvious error/info log mismatches
in current code.
* The dbus patch provides additional fronted to jack server, alternative
to jackd. the dbus object is auto activatated when
needed. Starting and stopping of the jack server are methods of the
dbus object. Other methods are for setting/getting jack
settings. Settings are being persisted.
D-Bus patch requires logs patch. As currently exported it also requires
midi-alsa-munge patch, but this is not real requirement.
So patch apply order is (against latest svn, tested with r1070):
* jackd-midi-alsa-munge-r1051.patch (p0)
* jack-logs-20071209-r1070.patch (p1)
* jack-dbus-20071209-r1070.patch (p1)
What is not implemented yet:
* Provide access to clock source parameter (tricky)
* Provide access to debug-timer parameter (not fully documented -
optarg)
* Send signals to (control) apps (status changes, connections, clients,
port renames, xruns, error and info logs)
* In client library, when compiled with dbus support, try to start via
dbus frontend first (auto-activation)
* Implement configurator supporting multiple user configurations
(separate D-Bus object)
D-Bus patch currently requires dbus-glib for main code and libxml2 for
settings persistence. Applying patch enables configure time checks for
required libraries and if they are not present, corresponding feature is
not built.
Currently there is problem with ffado driver (freebob works). libffado
uses libxml++ that uses libxml2. libxml2 has quite lot of global
things, Including global hooks used by libxml++ and initialized in
constructor global object. To avoid crashes when ffado driver is
available, it is ignored by the jackdbus frontend (it is still available
in jackd). This is temporary solution. I could of course don't use
libxml2 but this will only delay effect in ffado driver until some other
driver is starts using libxml2.
After compiling and installing jackdbus, you will get also a small
python app, jack_control that allows accessing of jackdbus. jack_control
is test app, and while quite usable is not supposed to be in line with
full-featured jack control apps like qjackctl and patchage.
Theory of operation:
JACK server works in background with log file and settings preserved in
~/.jackdbus/ directory. jack controller dbus object is autoactivated
when accessed. Thus jack server works in background while allowing to
access it post factum, either logs, settings or start/stop.
Multiconfig functionality is provided by separate object to be reused by
control apps like patchage and qjackctl. All of them will reuse jack
presets and user will get transparent workflow.
If they adapt it. Dave, Rui?
--
Nedko Arnaudov <GnuPG KeyID: DE1716B0>
hello,
I am trying to develop an app using jack. My first goal is to play a
stereo wav.
I've used clockloop http://plugin.org.uk/clockloop by Steve Harris as a
starting point. It uses libsndfile to open a mono wav.
I've reached a point where 2 outputs are created and connected to the
first two outputs of the sound card.
I managed to send a mono file to both outs. I've opened a stereo file,
but I'm having trouble outputting it correctly.
I am a bit confused on how to continue.
If someone could give me some pointers would be much appreciated.
thanks in advance
stefanos
This is what I have so far:
//================ audio.c ===============
/*
* Copyright (C) 2003 Steve Harris
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include <stdlib.h>
#include <jack/jack.h>
#include "audio.h"
#include <stdio.h>
buffer_t *buffers = NULL;
unsigned int buffer_size = 0;
unsigned int num_buffers = 0;
unsigned int play_pos = 0;
float gain_inc = 0.01f;
float c_gain = 0.1f;
jack_client_t *client;
jack_port_t *output_port_ML;
jack_port_t *output_port_MR;
int process(jack_nframes_t nframes, void *arg)
{
unsigned int i,j;
sample_t *outML = (sample_t *)jack_port_get_buffer(output_port_ML,
nframes);
sample_t *outMR = (sample_t *)jack_port_get_buffer(output_port_MR,
nframes);
for (j=0; j<nframes; j++) {
outML[j] = 0.0f;
outMR[j] = 0.0f;
}
for (i=0; i<num_buffers; i=i++) {
if (buffers[i].state == on) {
for (j=0; j<nframes; j++) {
outML[j] += (buffers[i].data[(play_pos + j) %
buffer_size]) * c_gain;
outMR[j] += (buffers[i].data[(play_pos + j) %
buffer_size]) * c_gain;
}
}
}
play_pos = (play_pos + nframes) % buffer_size;
return 0;
}
//====================== audio.h ======================
#ifndef AUDIO_H
#define AUDIO_H
#include <jack/jack.h>
typedef jack_default_audio_sample_t sample_t;
typedef enum {
off,
on,
ramp_down,
ramp_up,
} b_state;
typedef struct {
float *data;
float gain;
b_state state;
} buffer_t;
extern buffer_t *buffers;
extern unsigned int buffer_size;
extern unsigned int num_buffers;
extern jack_client_t *client;
extern jack_port_t *output_port_ML;
extern jack_port_t *output_port_MR;
extern float gain_inc;
int process(jack_nframes_t nframes, void *arg);
#endif
//=================== clockloop.c =======================
/*
* Copyright (C) 2003 Steve Harris
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <alsa/asoundlib.h>
#include <sndfile.h>
#include "audio.h"
void midi_action(snd_seq_t * seq_handle);
jack_client_t *client;
jack_port_t *output_port_ML;
jack_port_t *output_port_MR;
int main(int argc, char **argv)
{
unsigned int i;
int count;
const char **ports;
if (argc < 2) {
fprintf(stderr, "Usage: %s <audio-file> ...\n", argv[0]);
return 1;
}
/* JACK stuff */
if ((client = jack_client_new("clock-loop")) == 0) {
fprintf (stderr, "jack server not running?\n");
return 1;
}
jack_set_process_callback (client, process, 0);
output_port_ML = jack_port_register (client, "out_Master_Left",
JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0);
output_port_MR = jack_port_register (client, "out_Master_Right",
JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0);
num_buffers = argc - 1;
buffers = malloc(sizeof(buffer_t) * num_buffers *
2); // *2 for stereo
buffer_size = 0;
for (i = 0; i<num_buffers; i++) {
SNDFILE *sf;
SF_INFO sfi;
sfi.format = 0;
sf = sf_open(argv[i + 1], SFM_READ, &sfi);
/*if (sfi.channels != 1) {
fprintf(stderr, "%s: only works with mono files\n", argv[0]);
return 1;
}*/
if (!buffer_size) {
buffer_size = sfi.frames;
gain_inc = (float)jack_get_buffer_size(client) /
(buffer_size * 8.0f);
buffers[i].state = on;
buffers[i].gain = 1.0f;
} else {
buffers[i].state = off;
buffers[i].gain = 0.0f;
}
if (sfi.frames > buffer_size) {
fprintf(stderr, "%s warning: '%s' is %d frames longer than
reference file, truncating\n", argv[0], argv[i+1], (int)(sfi.frames -
buffer_size));
}
buffers[i].data = malloc(buffer_size * sizeof(float));
count = sf_read_float(sf, buffers[i].data, buffer_size);
if (count < buffer_size) {
fprintf(stderr, "%s warning: only read %d/%d frames from
file '%s', zero padding\n", argv[0], count, buffer_size, argv[i+1]);
memset(buffers[i].data + count, 0, buffer_size - count);
}
sf_close(sf);
}
if (jack_activate(client)) {
fprintf (stderr, "cannot activate client");
exit(1);
}
/* connect the ports*/
if ((ports = jack_get_ports (client, NULL, NULL,
JackPortIsPhysical|JackPortIsInput)) == NULL) {
fprintf(stderr, "Cannot find any physical playback ports\n");
exit(1);
}
if (jack_connect (client, jack_port_name (output_port_ML),
ports[0])) {
fprintf (stderr, "cannot connect output ports\n");
}
if (jack_connect (client, jack_port_name (output_port_MR),
ports[1])) {
fprintf (stderr, "cannot connect output ports\n");
}
for(;;)
sleep (1);
}
I'm trying to find a good solution for realtime upsampling and eq effects.
So far it seems running jamin with jack enabled programs, and passing them
through jamin for processing will be the best program for adjusting eq
levels, and setting crossovers. In this area, information on other programs
I have missed is appricated.
I would then like to be able to take the sound and upsample it to dts for
5.1 or 7.1 surround sound, and being able to set delays for each speaker to
be able to tune the audio to the acoustics of the area. A perfect setup
would be able to to full eq/crossover/delay settings for each speaker while
doing live encodes, but any additional information on open source projects
related to these areas are appricated.
Thanks in advance,
Nathanael Anderson
Traverso 0.42.0 Release Announcement
The Traverso development team is pleased to announce the release of Traverso
0.42.0
About Traverso:
Traverso is a GPL licensed, cross platform program for recording and mixing
music, speech, and sounds on the computer
Important changes in this release:
* Read and write support for Ogg Vorbis, WavPack, FLAC and MP3
* On the fly sample rate conversion
* A simple yet effective Project backup and restore system
* Better use of available hard disk bandwidth
* Encoding formats for recording added: W64 and WavPack
* 3 new themes added, notably the medium-contrast and ubuntu theme
* Fixed a number of bugs, added new ones and various improvements all over the
place
* User Manual translated into German and Portuguese
Source tarball and installers for Mac OS X and Windows are available on the
download page [1]
Distribution packages are being created, with some (openSUSE, Gentoo) allready
available for installation.
We welcome any feedback in the forums [2], user mailing list [3] or internet
relay chat, channel #traverso
Enjoy!
The Traverso team.
[1] http://traverso-daw.org/
[2] http://traverso-daw.org/forum/
[3] http://savannah.nongnu.org/mail/?group=traverso
Rubber Band is an audio time-stretching and pitch-shifting library and
utility designed for musical applications.
http://www.breakfastquay.com/rubberband/
It includes a library that supports a sample-accurate multithreaded
offline mode and a real-time lock-free streaming mode; a command-line
utility program; and a LADSPA pitch-shifter plugin. Rubber Band is
Free Software under the GNU GPL.
Chris
Rubber Band is an audio time-stretching and pitch-shifting library and
utility designed for musical applications.
http://www.breakfastquay.com/rubberband/
It includes a library that supports a sample-accurate multithreaded
offline mode and a real-time lock-free streaming mode; a command-line
utility program; and a LADSPA pitch-shifter plugin. Rubber Band is
Free Software under the GNU GPL.
This small update (v1.0.1) fixes an option parsing bug and a dodgy
bit of #ifdef nesting. The core code is the same as in 1.0.
Chris