Atte, Iain, Tim, and everyone else who's interested in Python and ALSA:
As promised, I've put together some documentation of my Python bindings
for the ALSA sequencer API. You can find the new version at
http://www.math.tu-berlin.de/~brinkman/software/midikinesis/
The module pyseq.py is the heart and soul of the package. I've added
a simple MIDI file player, midiplayer.py, as a tutorial that shows most
aspects of the bindings in action.
The package also contains a number of other applications built with
the bindings. Most of them are pretty straightforward, except possibly
MidiKinesis, which I presented at LAC 2005, and the new module
leierkasten.py: That one receives control change messages from, say,
a MIDI controller keyboard and converts their rate of change into
MIDI tempo messages. The MIDI file player, midiplayer.py, pays attention
to incoming tempo messages, so that you can plug leierkasten.py into
midiplayer.py in order to create a virtual hand organ.
Any feedback would be appreciated; questions are always welcome.
All the best,
Peter
Hi
Is there a multimedia kernel for debian I can
install with apt-get?
basicaly I'm building another Audio box from scatch and have a basic
gnome system.
cheers
Bob
Aaaargh. It Happened Again(TM).
Do you remember
http://music.columbia.edu/pipermail/linux-audio-user/2005-March/022049.html
?
I have always suffered the same problem, (though much less now) along
many jack, alsa and kernel versions and configurations...
I got:
Slackware 10.1
kernel 2.6.12.2 vanilla (but older versions worked equally well)
ALSA 1.0.8
JACK 0.99.0
all compiled from sources
AMD Athlon XP 3000+
AsRock K7S8X
SB Live! Digital 5.1 (hw:0)
SB Live! Player 5.1 (hw:1)
ForteMedia FM801 (hw:2)
RTL8139
Matrox G450 DualHead AGP
every card runs on its own IRQ:
root at slack101-sal:/home/salvuz# cat /proc/interrupts
CPU0
0: 3067468 IO-APIC-edge timer
1: 4252 IO-APIC-edge i8042
8: 0 IO-APIC-edge rtc
9: 0 IO-APIC-level acpi
12: 68805 IO-APIC-edge i8042
14: 130386 IO-APIC-edge ide0
15: 107823 IO-APIC-edge ide1
16: 0 IO-APIC-level FM801
17: 2080 IO-APIC-level eth0
18: 1138 IO-APIC-level EMU10K1
19: 0 IO-APIC-level EMU10K1
20: 0 IO-APIC-level ohci_hcd:usb2
21: 0 IO-APIC-level ohci_hcd:usb3
23: 0 IO-APIC-level ehci_hcd:usb1
NMI: 0
LOC: 3067418
ERR: 0
MIS: 0
The problem in detail:
Sometimes in occurence of a client being closed or added, but sometimes
apparently randomly, without xruns and not necessarily under heavy load,
I experience sudden corruption of sound, in form of crackling sound
coming out of alsa_pcm:playback ports.
Capture and client ones are not affected, i.e. I can record cleanly even
under crackling sound condition: if I close every client, restart jack
and play what I recorded just before, the sound is not corrupted at all,
just (software) monitoring is horrible.
I use my SB Lives always at 48kHz (but the problem arises at other SR
too), I tried on the ForteMedia FM801, on the intel8x0 C-Media builtin
soundcard (ugh!), on the PC of a friend of mine with NVidia chipset,
nVidia builtin soundcard, SB Live and Agnula 1.2.1, I tried Agnula 1.2.1
along with my Slackware on my system, with various buffer, periods and
other settings that jackd accepted. Nothing helped. The show-stopping
noise, even if certainly not seldom, came out.
Well, I noticed that continuing to open and close clients, or doing
something apparently "heavy" such as choosing a PADsynth intsrument
(such as ChoirPad 1) in Zynad (upon choosing PADsyn instruments Zynad
GUI hangs for a moment, then the instrument is ready), I could screw the
sound in the same identical manner (the sound appears distorted in the
very same way), but also I could restore (after one, two or little more
tries) the clean sound from alsa_pcm:playback ports.
To make things easier, I wrote this little script that does the dirty work:
itstarts jack_simple_client, than *stops the process* (do you hear the
alarm siren?) then CONTinues it, then kills it (quite obvious)
#!/bin/bash
# Pound on broken TV set
sudo jack_simple_client POUND! &
sudo kill -STOP `ps -el|grep simple|awk '{print $4}'`
sleep 0.2
sudo kill -CONT `ps -el|grep simple|awk '{print $4}'`
sleep 0.1
sudo kill -9 `ps -el|grep simple|awk '{print $4}'`
I know, with this script I am juggling chainsaws over Jack... sorry
about that. But it somewhat works (I must admit sometimes jackd dies
after the treatment, but there's a let's say 80% probability it doesn't).
A painless,and "100% success cases, no jackd deaths" approach is to use
jack_bufsize: I simply re-set jackd buffer size and voila, back to clean
sound. Try that if you have the same problem:
sudo jack_bufsize `ps aux|grep jack|grep " -p" \
| awk '{print $19}'|sed 's/-p//'|uniq`
So I think it's a buffer issue that somewhat involves the hardware
output ports...
I lived satisfied with this setup...until I discovered that oss2jack
0.21 stops working upon executing jack_bufsize. Aaarghh!
Maybe oss2jack 0.21 isn't happy with buffer resizing, whereas 0.15 was ok.
Tooooooooo bad, because I had:
Gnome Wave Cleaner
Avidemux2
ReZound (playback only)
Skype
sox
GNUsound (native JACK supports segfaults)
ZynAdSubFX (it gives me rock solid performance even upon loading a
PADsynt instrument)
all working with jack... :(
oss2jack 0.15 doesn't die with jack_bufsize, but doesn't handle capture.
I then read this from Jesse Chappell:
excerpt from
http://music.columbia.edu/pipermail/linux-audio-user/2005-March/022074.html
---------------------------------------------------------------------
Anyone who is having this problem, please try a version of JACK
from CVS where the version is >= 0.99.52 (after 17 march). I
made some fixes to jack's alsa driver that *might* help this
problem. I know compiling your own jackd might be a little much
to ask, but I'm very curious.
---------------------------------------------------------------------
Now that jack 0.100.0 was out, I grabbed the source,
./configure --prefix=/usr --enable-stripped-jackd --disable-portaudio
--disable-coreaudio --enable-capabilities --enable-optimize
--enable-posix-shm --enable-resize --enable-timestamps
--with-default-tmpdir=/mnt/ramfs
make && make install
and thought the end of my nightmare had
finally come, but, unfortunately, that's not the case...
As in subject, It Happened Again.
And,worst of all, all jack clients (not only oss2jack), even ardour
(even via his latency panel), die with
cannot open shm segment /jack-1 (No such file or directory)
cannot attach port segment shared memory (No such file or directory)
Killed
upon setting jack buffersize.
I prepared two ogg files that will explain the weird sound:
http://mio.discoremoto.virgilio.it/salvuz
For those who don't speak Italian...
- check the "Seleziona tutti" (select all) checkbox
- then click on "Scarica" (download) button
I had Jack running on hw:0 via qjackctl at 256 frames per buffer:
/usr/bin/jackstart -v -R -p512 -t10000 -dalsa -dhw:0 -r48000 -p256 -n2
-s -S
I fired up ZynAddSubFX, Hydrogen and two istances of qarecord, one with
--jack, connected to Zyn and Hydrogen, the other one on another card
(hw:1) with ALSA, capturing via "Line in" what came out of hw:0 "Line
out", begin to record something (just a test case, as I am a guitarist
that tries to play keyboards)
then induced corruption with the "pound" script. Another couple of
"pounds", and the sound comes clear again, but you know the story.
I hope to have been of any help, and I wonder whan can be done...
Thanks for your care!
ciao
--
salvuz
POST FATA RESVRGO
Linux registered user #291700 | machine #174619
get counted on ---> http://counter.li.org/ <---
Thanks for trying, Fernando. If I lived closer (than N. Idaho) I'd come
down there and sweep the floors or restore user's files from backup to
give you a little time to do more of the great work you've done putting
Planet CCRMA together so "Linux challenged" users like me can do more
music and less computer. I did CAD application and OS support for 15
years at HP/Agilent and I know how little time there is left over after
just keeping the wheels on! Hang in there. 8^)
Here's more of a philosophical question. Can someone help me understand
why installing an app like Gnome Wave Cleaner on a "standard", clean
Linux distribution like my Fedora Core 3 from CCRMA is so d??n
difficult? Shouldn't all these libraries, etc just already be there? I
can maybe understand the unusual ones like "fftw" (Fastest Fourier
Transform in the West) but why all the missing Gnome components? It's
probably only me that's missing something but it seems to me that Linux
is never going to become even close to mainstream (maybe we don't want
it to be mainstream) until it gets a good, consistent across all
distros, way of installing apps that just works.
I love using Linux and, as always, I'm open to feedback, suggestions,
education, etc. (Especially education!) 8^)
Thanks,
Mike
Mike Jewell
One-Up Audio
On Mon, 2005-08-08 at 18:26 -0700, Fernando Lopez-Lezcano wrote:
> On Mon, 2005-08-08 at 18:23, Fernando Lopez-Lezcano wrote:
> > Hmmm, he must have gotten it from somewhere else, it is not part of
> > Planet CCRMA (not because I don't want it to be, just no time to do it
> > so far). Sorry.
>
> I do have a spec file and just tried to rebuild it to try to remember
> why I had not finished packaging it and it stops with some build error:
>
> checking how to run the C preprocessor
> biquad.c: In function `filter_audio':
> biquad.c:64: warning: implicit declaration of function
> `load_filter_preferences'biquad.c:126: warning: unused variable
> `p_first'
> biquad.c:59: warning: unused variable `i_left'
> biquad.c:59: warning: unused variable `i_right'
> biquad.c:61: warning: unused variable `filtered_sample'
> biquad.c: At top level:
> biquad.c:247: error: conflicting types for 'load_filter_preferences'
> biquad.c:64: error: previous implicit declaration of
> 'load_filter_preferences' was here
>
> Hmmm, does not look difficult to fix, apparently a double declaration.
> -- Fernando
by Kjetil Svalastog Matheussen <k.s.matheussen@notam02.no>
Lee Revell:
>
> On Tue, 2005-08-09 at 16:49 -0400, Paul Davis wrote:
>> On Tue, 2005-08-09 at 22:17 +0000, Salvatore Di Pietro wrote:
>>
>> > Moreover, using jack_bufsize, or resizing buffer within Ardour, causes
>> > complete muting of output sound (bit not clients death, as it was
>> > before), until I restart jack.
>> > Notice that this "complete muting" only affects the output ports, i.e.
>> I
>> > can continue recording with qarecord, or ardour, I just cannot hear
>> (and
>> > monitor) anything anymore until I restart jack and its clients.
>>
>> as far as we can tell, this is an ALSA (kernel) driver issue. it does
>> not affect other backends, and does not affect (we think) every ALSA
>> supported piece of h/w. it would be nice for it to be either fixed or at
>> least tracked down conclusively.
>>
>
> I suspect it's in the ALSA core (could be alsa-lib or in the kernel) as
> it's been reported with everything from ice1712 to emu10k1 to RME
> hardware to cheap onboard stuff.
>
Okey, this might be totally wrong. It might be that I haven't fully
understood
how the lock/unlock-stuff in the jack engine works.
But reading the code for jack_driver_buffer_size in jackd/engine, the
following seems to happen:
1. Lock graph
2. Change the buffer sizes integer for all the clients on the server:
for-each-client-do: client->control->nframes = nframes;
3. Unlock the graph.
4. Lock the graph
5. Send a message to all clients that the buffersize must be changed.
5. Unlock the graph.
So, from what I can see, a process-cycle can happen between point 3 and 4,
where the server think the buffersize is the new value, while the clients
thing the buffersize is the old value.
Hi. Amazingly after emerging alsa-lib, alsa-utils, and alsa-oss, running
alsaconf, and pushing up the master volume in alsamixer, the sounds worked
OOTB. I had to add snd-seq-midi to /etc/modules.autoload.d, as it hadn't
autoloaded at bootup. The problem is that even though the midi keyboard shows
up in /proc/bus/usb/devices, it does not show up in Qjackctl's midi connect
bay. Tried modprobe snd-usb-audio, but it complains that there is no such
module. As shown below, the kernel config shows snd-usb-audio there, but
commented out. All relevant info further down. Nigel.
Kernel: Genkernel: Version 2.6.11-gentoo-r9
Alsa version: 1.08
KDE 3.3.2
X11-6.8.2-r1
Audigy2 soundblaster (emu10k1)
Part content from /etc/kernels/kernel-config-x8
#
# Advanced Linux Sound Architecture
#
CONFIG_SND=m
CONFIG_SND_TIMER=m
CONFIG_SND_PCM=m
CONFIG_SND_HWDEP=m
CONFIG_SND_RAWMIDI=m
CONFIG_SND_SEQUENCER=m
# CONFIG_SND_SEQ_DUMMY is not set
CONFIG_SND_OSSEMUL=y
CONFIG_SND_MIXER_OSS=m
CONFIG_SND_PCM_OSS=m
CONFIG_SND_SEQUENCER_OSS=y
# CONFIG_SND_RTCTIMER is not set
# CONFIG_SND_VERBOSE_PRINTK is not set
# CONFIG_SND_DEBUG is not set
USB devices
#
# CONFIG_SND_USB_AUDIO is not set
# CONFIG_SND_USB_USX2Y is not set
#
# Open Sound System
#
# CONFIG_SOUND_PRIME is not set
#
# USB support
#
CONFIG_USB=m
# CONFIG_USB_DEBUG is not set
#
# Miscellaneous USB options
#
CONFIG_USB_DEVICEFS=y
# CONFIG_USB_BANDWIDTH is not set
# CONFIG_USB_DYNAMIC_MINORS is not set
# CONFIG_USB_SUSPEND is not set
# CONFIG_USB_OTG is not set
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB_ARCH_HAS_OHCI=y
#
# USB Host Controller Drivers
#
CONFIG_USB_EHCI_HCD=m
# CONFIG_USB_EHCI_SPLIT_ISO is not set
# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
CONFIG_USB_OHCI_HCD=m
CONFIG_USB_UHCI_HCD=m
# CONFIG_USB_SL811_HCD is not set
#
# USB Device Class drivers
#
# CONFIG_USB_AUDIO is not set
# CONFIG_USB_BLUETOOTH_TTY is not set
# CONFIG_USB_MIDI is not set
# CONFIG_USB_ACM is not set
CONFIG_USB_PRINTER=m
/sbin/lsmod
bash-2.05b$ /sbin/lsmod
Module Size Used by
snd_emu10k1 81540 0
snd_ac97_codec 67576 1 snd_emu10k1
snd_util_mem 3328 1 snd_emu10k1
snd_hwdep 6944 1 snd_emu10k1
snd_pcm_oss 46496 0
snd_pcm 76040 3 snd_emu10k1,snd_ac97_codec,snd_pcm_oss
snd_page_alloc 7428 2 snd_emu10k1,snd_pcm
snd_mixer_oss 16128 1 snd_pcm_oss
snd_seq_midi 6432 0
snd_rawmidi 18848 2 snd_emu10k1,snd_seq_midi
snd_seq_midi_event 6016 1 snd_seq_midi
snd_seq 44944 2 snd_seq_midi,snd_seq_midi_event
snd_timer 19460 3 snd_emu10k1,snd_pcm,snd_seq
snd_seq_device 6796 4 snd_emu10k1,snd_seq_midi,snd_rawmidi,snd_seq
snd 44132 10
snd_emu10k1,snd_ac97_codec,snd_hwdep,snd_pcm_oss,snd_pcm,snd_mixer_oss,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
8139too 19584 0
mii 3968 1 8139too
sata_via 5636 0
sata_svw 5252 0
sata_sil 6020 0
sata_promise 7812 0
libata 39172 4 sata_via,sata_svw,sata_sil,sata_promise
dm_mod 50812 0
sbp2 20360 0
ohci1394 28676 0
ieee1394 87860 2 sbp2,ohci1394
ohci_hcd 18184 0
uhci_hcd 27664 0
usb_storage 27776 0
usbhid 30016 0
ehci_hcd 27400 0
usbcore 97400 6 ohci_hcd,uhci_hcd,usb_storage,usbhid,ehci_hcd
bash-2.05b$
bash-2.05b$
cat /proc/bus/usb/devices
T: Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2
B: Alloc= 0/900 us ( 0%), #Int= 0, #Iso= 0
D: Ver= 1.10 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=0000 ProdID=0000 Rev= 2.06
S: Manufacturer=Linux 2.6.11-gentoo-r9 uhci_hcd
S: Product=VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (#2)
S: SerialNumber=0000:00:07.3
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr= 0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 2 Ivl=255ms
T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2
B: Alloc= 0/900 us ( 0%), #Int= 0, #Iso= 0
D: Ver= 1.10 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=0000 ProdID=0000 Rev= 2.06
S: Manufacturer=Linux 2.6.11-gentoo-r9 uhci_hcd
S: Product=VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller
S: SerialNumber=0000:00:07.2
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr= 0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 2 Ivl=255ms
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0
D: Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=0a4d ProdID=0066 Rev= 2.52
S: Manufacturer=Evolution Electronics Ltd.
S: Product=MK-225C USB MIDI keyboard
C:* #Ifs= 2 Cfg#= 1 Atr=c0 MxPwr= 0mA
I: If#= 0 Alt= 0 #EPs= 0 Cls=01(audio) Sub=01 Prot=00 Driver=(none)
I: If#= 1 Alt= 0 #EPs= 2 Cls=01(audio) Sub=03 Prot=00 Driver=(none)
E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
cat /proc/asound/cards
0 [Audigy2 ]: Audigy2 - Sound Blaster Audigy2
Sound Blaster Audigy2 (rev.4, serial:0x10021102) at
0xd800, irq 10
cat /proc/asound/devices
1: : sequencer
4: [0- 0]: hardware dependent
9: [0- 1]: raw midi
8: [0- 0]: raw midi
18: [0- 2]: digital audio playback
26: [0- 2]: digital audio capture
25: [0- 1]: digital audio capture
16: [0- 0]: digital audio playback
24: [0- 0]: digital audio capture
0: [0- 0]: ctl
33: : timer
/etc/hotplug/blacklist. But I don't think there's anything here that could
cause a problem.
# Listing a module here prevents the hotplug scripts from
loading it.
# Usually that'd be so that some other driver will bind it instead,
# no matter which driver happens to get probed first. Sometimes user
# mode tools can also control driver binding.
#
# Syntax: driver name alone (without any spaces) on a line. Other
# lines are ignored.
#
# uhci ... usb-uhci handles the same pci class
usb-uhci
# usbcore ... module is loaded implicitly, ignore it otherwise
usbcore
# tulip ... de4x5, xircom_tulip_cb, dmfe (...) handle same devices
de4x5
# At least 2.4.3 and later xircom_tulip doesn't have that conflict
# xircom_tulip_cb
dmfe
#evbug is a debug tool and should be loaded explicitly
evbug
Thats all folks. Any suggestions apart from "Reinstall the OS" welcome.
Bob,
Thanks for your suggestion; I'll check it out...
>For a real esoteric view on Mixing and mastering try 'mixing with your mind'
>but I warn you its quite esoteric, will suit the few of us who meditate
>when mixing/mastering.
Regards,
Dave.
Hi LAUs,
I'm trying to install Gnome Wave Cleaner on my FedoraCore3 (CCRMA) box
and am (as usual, for me) running into dependency hell.
In order of GWC's ./configure complaints:
**I first installed libsndfile (which already existed in /usr/bin but
apparently some other component was missing.) This fixed that error.
**I then installed fftw (which also existed bla, bla, bla.) Fixed.
**It then complained about libgnomeui. When I ./configure that one I
get:
checking for esound >= 0.2.26 audiofile >= 0.2.3... Package esound was
not found in the pkg-config search path.
Perhaps you should add the directory containing `esound.pc'
to the PKG_CONFIG_PATH environment variable
No package 'esound' found
checking for libgnome-2.0 >= 2.0.0 libgnomecanvas-2.0 >= 2.0.0
libbonoboui-2.0 >= 2.0.0 gconf-2.0 >= 1.1.11... Package libgnome-2.0 was
not found in the pkg-config search path.
Perhaps you should add the directory containing `libgnome-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libgnome-2.0' found
configure: error: Library requirements (libgnome-2.0 >= 2.0.0
libgnomecanvas-2.0 >= 2.0.0 libbonoboui-2.0 >= 2.0.0 gconf-2.0 >=
1.1.11) not met; consider adjusting the PKG_CONFIG_PATH environment
variable if your libraries are in a nonstandard prefix so pkg-config can
find them.
Am I totally on the wrong track here? In concept, installing apps on
Linux is pretty simple but I can't ever remember having it just work for
me using the standard ./configure, make, make install process. Sure
wish CCRMA had an apt-get package... Sure wish I understood Linux
better. 8^)
Thanks for any help on this,
Mike
Mike Jewell
One-Up Audio
On Fri, 29 Jul 2005 07:19 , Mike Jewell <mj405(a)oneupaudio.com> sent:
>>
>>When I go to the gwc site (http://gwc.sourceforge.net\) I'm confused
>>as to what to get.
>>
And Jan Depner wrote:
> At the bottom of the page, go to "The GWC project files at
>sourceforge.net".
> Grab gwc2. Its a tgz so you'll have to do the obligatory ./configure,
>make, make install (read the README and/or INSTALL file).
>Jan
Greetings all,
As many of you know, Bob Katz's book on mastering has been recommended over
and over. It really is worthwhile. I thank Mark Knecht especially for
getting me to buy it. Anyone working in digital audio, even those who
think they know it all, can benefit from this book.
A new book was recently published, and I just obtained a copy of it:
The Art of Digital Music by David Battino and Kelli Richards.
Now I've just started reading parts of it, but I've already seen some really
good advice. This consists of interviews of 56 people in the industry plus
some conferences. There is a DVD consisting of not just a little marketing,
but it's OK. The book also has noticeable hype BUT:
The interviews are something like what you may have seen in Electronic
Musician, but it's nice to see a lot more all in one place. I find myself
nodding my head in agreement over and over again...
I don't recommend this to anyone just getting started. You need
some experience to understand WHY they say the things they do. Without
it, you won't find this book very helpful. One of the things I like about
this new book is that it provided validation of some of my own conclusions
about working with digital audio. It's also good to see differences of
opinion.
Regards to all,
Dave.
Hello list,
How do I route a signal from line-in (guitar) to either Creox or
Ecamegapedal using jackd? I use qjackctl, but the only input/outputs are
alsa_pcm. I guess it must be simple, but I simply don't get it :-)
Thanks,
Hans