james(a)dis-dot-dat.net wrote:
>Howdy peeps.
>
>Not really much of a release, so not much fanfare, but in the
>interests of sharing effort I give you...
>
>Powernap!
>
>http://dis-dot-dat.net/?item=code/powernap/
>
>If, like me, you need to drive an app from a Python interface,
>powernap can help. It's a small extension that switches to the
>real-time scheduler and provides two handy sleep-like functions:
>
>nap() naps for a given number of milliseconds, timed with the RTC
>
>rnap() is a "rolling nap" that tries to make the time between calls
>the given number of milliseconds. A padding nap, if you will.
>
>It works for me and it might come in handy for someone else.
Nice, this will definitely come in handy for me.
Have you done any benchmarking on what kind of timing precision you can
get?
-DR-
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Oi,
I am currently writing on a modular synth with great emphasis on
sequencing (but allowing tight interaction between both parts)
in a comparable modular way (pattern creation/algortihmic
composition/chord filters etc),
I wrote some parts of the core of the application but I am not really
keen on coding something that has been done several times before;
that's why I thought about
joining/"forking" a more complete modular synthesizing environment and
adding the core components I need/have. The point is, that I don't
know enough about
the existant modular synthesizers to evaluate how modular their
sourcecode is written so that my modifications are easily applicable
in their source.
Here are some parts/functionalities that I already have (partially)
implemented and would like to add to the core:
- - the main graph of interconnected modules supports heterogene module
types for example it could support FAUST code-pieces represented in
modules as well as ladspa-modules,
the subgraph created by interconnected modules of the same type is the
sent to the type-specific "compiler" creating executable signal paths
- - the executable graph of interconnected modules is analyzed and split
up in parts that can be executed in parallel, locks in the necessary
parts are added and the whole graph can be
executed in several threads
- - modules are mainly connected using a zoomable patch-matrix; the
zoomlevel corresponds to the level of typing (of connections)
As I mainly write QT-Applications I'd prefer a project that can be
either easily extended to use QT or which already uses it. I think it
is better to work on an existing project, since
I am currently busy with releasing an album and university-shiznit and
I can not imagine doing everything in a prolific way in parallel.
Thanks in advance for any input!
So long...
Niklas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFEq/F++k24EnBNzsMRAlNrAJ97l5nZeqM8B86w4FDrh34joLvZEQCeOxpn
1VD/QOT47Nfd2X6kEItBFRw=
=jz9s
-----END PGP SIGNATURE-----
Howdy peeps.
Not really much of a release, so not much fanfare, but in the
interests of sharing effort I give you...
Powernap!
http://dis-dot-dat.net/?item=code/powernap/
If, like me, you need to drive an app from a Python interface,
powernap can help. It's a small extension that switches to the
real-time scheduler and provides two handy sleep-like functions:
nap() naps for a given number of milliseconds, timed with the RTC
rnap() is a "rolling nap" that tries to make the time between calls
the given number of milliseconds. A padding nap, if you will.
It works for me and it might come in handy for someone else.
James
Hi everybody!
I am a newbie to alsa programming.
I am trying to follow the article which locates at
http://www.suse.de/~mana/alsa090_howto.html to develop a playback program.
My code here:
snd_pcm_t*pcm_handle;
unsigned int rate = 8000;
// Sample rate returned by
// snd_pcm_hw_params_set_rate_near
int exact_rate;
// exact_rate == rate ----> dir =0
//exact_rate < rate ----> dir =-1
//exact_rate > rate ----> dir =1
int dir = 0;
// Number of periods
int periods = 2;
snd_pcm_stream_t stream = SND_PCM_STREAM_PLAYBACK;
// This structure contains information about the hardware
//and can be used to specify the configuration to be used for the
PCM stream.
snd_pcm_hw_params_t *hwparams;
// Name of the PCM device, like plughw:0,0
//The first number is the number of the soundcard,
//the second number is the number of the device.
char *pcm_name;
// Init pcm_name. Of course, later you
//will make this configurable ;-)
pcm_name = strdup("plughw:0,0");
printf("Device name:%s\n",pcm_name);
//Allocate the snd_pcm_hw_params_t structure on the stack.
snd_pcm_hw_params_alloca(&hwparams);
// Open PCM. The last parameter of this function is the mode.
// If this is set to 0, the standard mode is used. Possible
// other values are SND_PCM_NONBLOCK and SND_PCM_ASYNC.
// If SND_PCM_NONBLOCK is used, read / write access to the
// PCM device will return immediately. If SND_PCM_ASYNC is
// specified, SIGIO will be emitted whenever a period has
//been completely processed by the soundcard.
if (snd_pcm_open(&pcm_handle, pcm_name, stream, 0) <
0){//SND_PCM_NONBLOCK
fprintf(stderr, "Error opening PCM device %s\n", pcm_name);
return;
}
// Init hwparams with full configuration space
if (snd_pcm_hw_params_any(pcm_handle, hwparams) < 0) {
fprintf(stderr, "Can not configure this PCM device.\n");
return;
}
// Set access type. This can be either
SND_PCM_ACCESS_RW_INTERLEAVED or
// SND_PCM_ACCESS_RW_NONINTERLEAVED.There are also access types for
// MMAPed access, but this is beyond the scope of this introduction.
if (snd_pcm_hw_params_set_access(pcm_handle, hwparams,
SND_PCM_ACCESS_RW_INTERLEAVED) < 0) {
fprintf(stderr, "Error setting access.\n");
return;
}
//Set sample format
if (snd_pcm_hw_params_set_format(pcm_handle, hwparams,
SND_PCM_FORMAT_S16_LE) < 0) {
fprintf(stderr, "Error setting format.\n");
return;
}
// Set sample rate. If the exact rate is not supported by the
hardware, use nearest possible rate.
exact_rate = snd_pcm_hw_params_set_rate_near(pcm_handle, hwparams,
&rate, &dir);
if (exact_rate < 0) {
fprintf(stderr, "Error setting rate.\n");
return;
}
if (rate != exact_rate) {
fprintf(stderr, "The rate %d Hz is not supported by your
hardware.\n=> Using %d Hz instead.\n", rate, exact_rate);
}
// Set number of channels
if (snd_pcm_hw_params_set_channels(pcm_handle, hwparams, 2) < 0) {
fprintf(stderr, "Error setting channels.\n");
return;
}
// Set number of periods. Periods used to be called fragments.
if (snd_pcm_hw_params_set_periods(pcm_handle, hwparams, periods, 0)
< 0)
{
fprintf(stderr, "Error setting periods.\n");
return;
}
// Set buffer size (in frames). The resulting latency is given by
// latency = periodsize * periods / (rate * bytes_per_frame)
snd_pcm_uframes_t buffersize = ( snd_pcm_uframes_t )(
number_of_frames * periods );
if (snd_pcm_hw_params_set_buffer_size_near(pcm_handle, hwparams,
&buffersize) < 0){
fprintf(stderr, "Error setting buffersize.\n");
return;
}
printf("Buffer size asked for %d, set %d \n",buffersize,exact_rate);
// Apply HW parameter settings to
// PCM device and prepare device
if (snd_pcm_hw_params(pcm_handle, hwparams) < 0) {
fprintf(stderr, "Error setting HW params.\n");
return;
}
snd_pcm_prepare(pcm_handle);
Unfortunately, exact_rate is zero.The following lines were printed out:
The rate 8000 Hz is not supported by your hardware.
=> Using 0 Hz instead.
If exact_rate > 0 is OK but it is zero.
I don't know how to solve the problem.
Please help me.
Thanks!
Phuoc Nguyen
Hi,
Is there a standard way of converting a 24bit sample to 16bit?
I ask because I think that in different scenarios, one would want a
different result.
1) scale a 24bit value to a 16bit by simple multiplication by a fraction.
2) bit shift the 24bit value, so that the "most useful 16bits" are
returned to the user. The problem here is what are the "most useful
16bits"? I have one application where just using the lower 16bits of the
24bit value is ideal, due to extremely low input signals.
Option (1) looses information due to compression of the signal.
Option (2) is more likely to loose information through clipping.
James
In gimp list, I mentioned that I don't want my software to be
used in Windows. That would encourage people to install Linux.
My plan was to use GPL + Windows exclusion. I was very clearly
informed that it would not work.
Then why similar works for Linuxsampler?
BTW, I'm still puzzled on what kind of license I should use.
Juhana
--
http://music.columbia.edu/mailman/listinfo/linux-graphics-dev
for developers of open source graphics software
So, I'm trying to build Smack, which needs Om, which needs libgnomecanvasmm,
which my os (Fedora Core 3) doesn't seem to have, so I found it here:
http://sunsite.mff.cuni.cz/MIRRORS/ftp.gnome.org/pub/GNOME/sources/libgnome…
And when I try to build it, I get this:
g++ -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"libgnomecanvasmm\" -I../../libgnomecanvas
-I../../libgnomecanvas -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -I/usr/local/include/libart-2.0
-I/usr/include/gtkmm-2.4 -I/usr/lib/gtkmm-2.4/include -I/usr/include/glibmm-2.4
-I/usr/lib/glibmm-2.4/include -I/usr/include/gdkmm-2.4 -I/usr/lib/gdkmm-2.4/include
-I/usr/include/pangomm-1.4 -I/usr/include/atkmm-1.6 -I/usr/include/gtk-2.0
-I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -I/usr/lib/gtk-2.0/include -I/usr/X11R6/include
-I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/freetype2/config
-I/usr/include/atk-1.0 -I/usr/include/libgnomecanvas-2.0 -g -O2 -MT line.lo -MD -MP -MF
.deps/line.Tpo -c line.cc -fPIC -DPIC -o .libs/line.o
In file included from line.cc:3:
../../libgnomecanvas/libgnomecanvasmm/line.h:374: error: extra qualification ignored
../../libgnomecanvas/libgnomecanvasmm/line.h:375: error: explicit specialization of non-template
`Glib::<anonymous class>'
../../libgnomecanvas/libgnomecanvasmm/line.h:375: error: an anonymous union cannot have function
members
../../libgnomecanvas/libgnomecanvasmm/line.h:378: error: abstract declarator `Glib::<anonymous
class>' used as declaration
make[4]: *** [line.lo] Error 1
make[4]: Leaving directory
`/home/scameron/software/libgnomecanvasmm-2.6.0/libgnomecanvas/libgnomecanvasmm'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory
`/home/scameron/software/libgnomecanvasmm-2.6.0/libgnomecanvas/libgnomecanvasmm'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/scameron/software/libgnomecanvasmm-2.6.0/libgnomecanvas'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/scameron/software/libgnomecanvasmm-2.6.0/libgnomecanvas'
make: *** [all-recursive] Error 1
[scameron@zuul libgnomecanvasmm-2.6.0]$
Anybody know how to get around this...? (without installing another OS
preferably)
-- steve
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Hi!
Trying to understand some magic with Ipmulse Response, FFT and so on, I'm playing with
scipy, matplotlib (and python as new language for me as a bonus). Concrete IR was got
with help of DRC (rec_imp, saying more strictly).
Currently I have got this frequency response graph:
http://gaydenko.com/mix/needSmooth.png
And the question is: what is common way to smooth the result? Some offtopic apps has
something like "1/24, ..., 1/3 octave smoothing". What does it mean?
Andrew
Hi peeps.
I've just been running an app through valgrind and I'm getting a few
of these:
==11955== Syscall param write(buf) points to uninitialised byte(s)
==11955== at 0x4D51BDB: (within /lib64/libpthread-2.4.so)
==11955== by 0x4B27CDD: (within /usr/lib64/libjack.so.0.0.23)
==11955== by 0x4B29434: jack_deactivate (in
/usr/lib64/libjack.so.0.0.23)
==11955== by 0x4B2945F: jack_client_close (in
/usr/lib64/libjack.so.0.0.23)
==11955== by 0x40402F: jackpart_close() (jackPart.cc:86)
==11955== by 0x40235F: mainLoop() (sampleplayer.cpp:438)
==11955== by 0x40237B: main (sampleplayer.cpp:444)
==11955== Address 0x7FEFFE934 is on thread 1's stack
I can't see anything wrong on my part, so I thought I'd check with
people who know more than I before I tear my program apart.
I also get them coming from jack_port_register, jack_activate and
jack_connect.
Any ideas?
James
Linuxaudio.org is getting ready to announce new memberships in the coming
weeks. For this reason, I would like to invite all Linux Audio projects and
its members, as well as other allied projects, institutions, companies, and
hardware vendors to consider joining our organization.
HOW TO JOIN
Simply send an e-mail to ico at linuxaudio dot org stating your interest to
join. There are no dues or hidden costs and the membership can be terminated
at any time via member's written request.
BENEFITS
As the consortium grows, we strive to provide a focal, converging point
through which we will represent our community, offer new opportunities for
collaboration and interaction, represent and preserve interests of the
community, as well as serve as a point of contact for commercial industry
and hardware vendors.
For more info please visit linuxaudio.org or do not hesitate to contact me
directly.
Best wishes,
Ivica Ico Bukvic, D.M.A. Composition
Virginia Tech
Dept. of Music - 0240
Blacksburg, VA 24061
(540) 231-7047
(540) 231-5034 (fax)
ico(a)vt.edu
http://www.music.vt.edu/people/faculty/bukvic/