On Mon, Mar 19, 2012 at 06:58:29PM +0100, Robin Gareus wrote:
> # mplayer -ao alsa,device=hw=1,0 some_music.wav
> # zita-a2j -dhw:1,1
>
> I get endless messages:
> Starting synchronisation.
> Detected excessive timing errors, waiting 15 seconds.
> This may happen with current Jack1 after freewheeling.
(meanwhile I'm back home, the loopback device is hw:3 here)
[terminal 1]
fons@zita1:/audio/audiofiles/tracks> mplayer -ao alsa:device=hw=3.1 diana-krall-almost-blue-44.wav
MPlayer SVN-r34426-4.6.2 (C) 2000-2011 MPlayer Team
181 audio & 384 video codecs
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
Playing diana-krall-almost-blue-44.wav.
Audio only file format detected.
Load subtitles in ./
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 44100 Hz, 2 ch, s16le, 1411.2 kbit/100.00% (ratio: 176400->176400)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
AO: [alsa] 44100Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A: 4.0 (04.0) of 244.0 (04:04.0) 0.1%
...
[terminal 2]
fons@zita1:~> zita-a2j -d hw:3,0 -r 44100
Starting synchronisation
/me makes connections in qjackctl and hears lovely piano intro...
So this just works. I do indeed have to start mplayer first, but
only the first time. After that I can stop and restart mplayer
without problem. This is probably some quirk of the loopback
device. There is no such thing as 'requesting exclusive access'
in the ALSA pcm API - it depends only on the device.
> The message is repeated every ~15 sec; and it does not stop.
> Each time a message is printed there's a short very jittery sound (I can
> discern the music) but it remains silent for the remaining time.
The silence is intentional - the app waits for the dust to
settle down after it has detected 'impossible' timing info
from either Jack's DLL or from the one tracking the ALSA device.
There was a bug in the loopback device - it returned the wrong
type of event when using poll() in some cases. It's fixed in
1.0.24. That would certainly explain what you see.
> How do you conduct this test?
>
> I assume that there is no other ALSA-client involved and you use the
> loopback in float/32 mode, w/native samplerate.
Zita-a2j and j2a use libzita-alsa-pmci to access ALSA devices.
It uses exactly the same methods as Jack's backend - very early
versions (libclalsadrv 7 years ago) were in fact a C++ copy
of Jack's backend. That means that whatever works with Jack
will work with zita-a2j and j2a or any of my apps using ALSA.
AFAIK Jack doens't run well with dmix/dsnoop either. And anyway
there's no reason to use them with Jack.
To run the delay test (assuming hw:3 is the loopback device):
[Terminal 1]
zita-a2j -d hw:3,0
[Terminal 2]
zita-j2a -d hw:3,1
[Terminal 3]
jack_delay
and make the required connections.
The off-list reply was a typo - back on LAD now.
Ciao,
--
FA
A world of exhaustive, reliable metadata would be an utopia.
It's also a pipe-dream, founded on self-delusion, nerd hubris
and hysterically inflated market opportunities. (Cory Doctorow)
Hello all,
A bugfix update of zita-ajbridge is now available at the
usual place.
Thanks to Robin Gareus who discovered the bug: the typical
last-minute-after-testing-added-line-typo. In this case
it meant that both apps would use the lowest resampling
quality in all cases...
Ciao,
--
FA
A world of exhaustive, reliable metadata would be an utopia.
It's also a pipe-dream, founded on self-delusion, nerd hubris
and hysterically inflated market opportunities. (Cory Doctorow)
(apologies for cross posting)
The Hydrogen team is excited to announce the first 'Hyrdogen Spring Drum
Kit Contest' !
As you all know, a drum machine is only as good as the sounds it produces
-no matter how many whistles and bells it boasts.
Some time ago there was a small poll on the Hydrogen site asking the
Hydrogen users (aka 'you' ;-) what feature they wanted more than anything
else.
The answer was clear : "more and better drum kits".
The goal of this fun contest is simple : with your help we can expand
Hydrogen's sound library with some great new drum kits, and since this is a
contest there are some really neat prizes to win!
So if you have been playing with samples and thinking about creating a drum
kit, but then decided not to do so after all : now is the perfect time to
push yourself and go that extra mile. Once it's done you'll feel so much
better ;-) Or maybe you have already made a drum kit in the past but
didn't think it was worth submitting? Think again and share your hard work
with the rest of the world!
Curious ? Check out the details on the contest page
<http://hydrogen.popez.org/hcms/node/2035>
Hope to hear from you soon !
The Hydrogen team
I am forwarding a mail and sample code from Ed Sweeney
(with permission).
He'd appreciate any comments.
---------------------------------------------------------------------
Joel,
Programming jack is fun.
Check out the attached, it is jack's simple_session_client.c in perl.
I don't know how to test the savequit session events but support for
them is coded and the sample processing totally works. I rewrote
metro.c metronome in perl too, works.
I have generated API libs for perl, python, ruby, and lua. Each of
them has a reworked simple_client that works. Ruby has a bug with the
metronome I haven't been able to find yet.
I'm sure there are lots of bugs and wrong design choices and poorly
chosen names but it is a start!
The build system is messy. I'll put a tarball on a server and tar up
a binary installable perl module today. If this looks like it will be
usable, I'll put it on github.
-- simple_client.pl --
#!/usr/bin/perl
use jackscript;
use strict;
use warnings;
use Cwd 'abs_path';
my $jc;
if (defined($ARGV[0])) {
print("restarting with uuid $ARGV[0]\n");
$jc = jackscript::JsClient->new("simpler", $ARGV[0], $jackscript::JackSessionID);
} else {
$jc = jackscript::JsClient->new("simpler", undef, $jackscript::JackNullOption);
}
my $in = $jc->registerPort("input", $jackscript::JackPortIsInput);
my $out = $jc->registerPort("output", $jackscript::JackPortIsOutput);
$jc->activate();
my $done = undef;
until($done) {
my $jsevent = $jc->getEvent(-1);
if ($jsevent->getType() == $jackscript::PROCESS) {
my $inbuffer = $in->getBuffer();
my $outbuffer = $out->getBuffer();
my $nframes = $outbuffer->length();
for (my $i = 0; $i < $nframes; $i++) { #copy input to putput
my $s = $inbuffer->getf($i);
$outbuffer->setf($i,$s);
}
} elsif ($jsevent->getType() == $jackscript::SAMPLE_RATE_CHANGE) {
my $sr = $jc->getSampleRate();
print("sample rate change event: sample rate is now $sr\n");
} elsif ($jsevent->getType() == $jackscript::SHUTDOWN) {
print("jack shutdown event\n");
$done = "done!";
} elsif ($jsevent->getType() == $jackscript::SESSION) {
my $dir = $jsevent->getSessionDir();
my $uuid = $jsevent->getUuid();
my $se_type = $jsevent->getSessionEventType();
my $setypeTxt = $se_type == $jackscript::JackSessionSave ? "save" : "quit";
print("session notification: path $dir, uuid $uuid, type: $setypeTxt\n");
if ($se_type == $jackscript::JackSessionSaveAndQuit) {
$done = "done!";
}
my $script_path = abs_path($0);
my $cmd = "perl $script_path $uuid";
$jsevent->setCommandLine($cmd); #tell jackd how to restart us
} else {
die("unknown event type\n");
}
$jsevent->complete();
}
print("simple_client.pl ended\n");
--
Joel Roth
Hello. I'm using portaudio19 to write an app that connects to jack (and
alsa) and I can't find anywhere in the portaudio api a way to ask jack
for the current samplerate and buffersize.
¿Am I missing something obvious?
¿Do I have to use the jack api to get these params and then be able to
use the portaudio api for starting a stream, implementing the audio
callback, etc?
ChipSound 0.1.0 under zlib license
----------------------------------
"I’ve decided to officially release the engines
(scripting, physics, sound and 2.5D rendering)
behind Kobo II as Free/Open Source, in order to
make the game available to basically anyone with
OpenGL and a C compiler.
[...]
First out is ChipSound, which is now under the
zlib license.
[...]"
NOTE:
ChipSound currently depends on SDL for audio I/O.
Full story:
http://olofsonarcade.com/2012/03/13/chipsound-0-1-0-released-zlib-
license/
Direct download:
http://www.olofson.net/download/ChipSound-0.1.0.tar.bz2
Related; Kobo II site:
http://kobo2.net/
--
//David Olofson - Consultant, Developer, Artist, Open Source Advocate
.--- Games, examples, libraries, scripting, sound, music, graphics ---.
| http://consulting.olofson.nethttp://olofsonarcade.com |
'---------------------------------------------------------------------'