AN ATTEMPT TO BUILD A REALTIME AUDIO COMPUTER USING DEBIAN/GNU LINUX:

NO WARRANTY!

PROBLEMS TO BE SOLVED

HDSPMIXER:

1.
After booting, i have to start the hdspmixer application to get audio output, i suppose the levels are muted before.
Is this an hdspmixer issue or sth. about the alsa startup scripts?

2.
If i close the hdspmixer and open it again, it loads the default settings (if there are any) and gives me full levels on all channels. Ouch!
This also happens if i saved my levels to a preset, may it be number 1 or others.
It even persists at saving to a file (/home/peter/hdspmixer_default.mix), and making this the default file via the menu.
Seems like the file doesn't get loaded automatically, though once loaded via the menu, my old levels appear.
Perhaps tweaking the card with amixer could help? (see link)

ALSA:

1.
HDSP with external clock source using OSS emulation:
Takashi Iwai mailed me a patch for hdsp.c to allow setting the "Sample Clock Source Locking" in alsamixer. (see link)
Once this is set, the OSS emulation works fine. One drawback though is that switching from an external clock source (autosync)
to an internal clock is prohibited in hdspconf. Takashi kindly sent me another patch which i still have to apply. (see link)
When will those changes be included in the alsa cvs drivers?

PD:

1.
Using the [key] object it seems not to be possible to detect if the key is being held down, since the OS sends on and off states in quick succession when the key is  held.
Even trying some clever logic in the way of speedlim plus once does not work cleanly.

2.

Add an --geometry flag to the pd command to make the window appear at a given position.

3.
No success so far using two pd computers and connecting it via the -guicmd flag over ssh.
Here a suggestion from the pd mailing list:

"Another possibility is to run the gui via rsh on the other machine,
on the machine m1.upf.edu:

pd -guicmd "rsh m2.upf.edu /usr/lib/pd/bin/pd-gui 5400 m1.upf.edu"

If you have the rsh permissions setup, this should start the

gui on m2.upf.edu and pd on m1.upf.edu."


4.
Find a sed/awk script to change fontsizes in pd files automatically.


5.
Howto disable the display of hidden items in open dialogs?


HINTS AND HACKS

PD:

1.
Mac OSX: Making the shortcuts for toggle and bang work on pd 0.37 
> this line in pd.tk
>
> bind $name.c <alt-Key> {pdtk_canvas_altkey %W %K %A}
>
> should be something like
>
> if {$pd_nt =3D=3D 2} {
>         bind $name.c <Option-Key> {pdtk_canvas_altkey %W %K %A}
> }
> else{
>         bind $name.c <alt-Key> {pdtk_canvas_altkey %W %K %A}
> }

2.
Make the tilde appear without having to type a space:
setxkbmap -model pc105 -layout de -variant nodeadkeys

3.
Make KDE remember the position of the pd window:
Use the "Desktop -> Window-Specific Settings" in the Control Center

HDSPMIXER:


1.
The level meters setup doesn't store its setting, it defaults to -40 dB.
Even after saving and loading a .mix file.
This is known as a bug on the alsa-devel bugtracker assigned to Thomas Charbonel some time ago (see link).
One hack is to change the "level" value in HDSPMixerPresetData.cxx and recompile

2.
The master mute and solo buttons have to be engaged to make the channel buttons work.
By default they are not engaged which could be changed.
It is possible to save their state to a file though.
One hack is to change the "mute" and "solo" values in HDSPMixerPresetData.cxx and recompile

KERNEL / LOW-LATENCY:

1.
Florian Schmid has some very useful pages on building a low-latency kernel (see link).
I succeeded applying the 2.6.13.rc7 patch, then an Ingo Molnar patch thus making it a 2.6.13-rc7-rt4.

2.
The debian Xserver has a nice value of -10 per default, thus making things like desktop switching interrupting audio.
The default nice value can be set in /etc/X11/Xwrapper.config to zero.

3.
Tuning the filesystem

adding noatime to fstab:
/dev/hda2   /   ext3    defaults,errors=remount-ro,noatime      0       1

PP: temporal changes done to ext3 filesystem:
tune2fs -O dir_index /dev/hda2
tune2fs -o journal_data_writeback /dev/hda2

make permament in fstab:
/dev/hda7 /home ext3 defaults,noatime,data=writeback 1 2

4.
Building the Linux Realtime Security Module LSM to allow jack to run with higher priority as ordinary user.