GUI horribly slow
@TerMinhqtor Hello, and welcome to the forum...!
"GUI horribly slow" is a problem that rears it's ugly head when Pure Data is not able to process audio properly (maybe I should say "easily"). Audio always has priority (unsurprisingly) even when it is not actually turned on for a patch (which is however..... surprising..!). If audio is struggling, it will interrupt the GUI.
The graphics are fine...... Menus etc....... as you have observed are unaffected. They are managed by the OS on instruction from the tcl code. It is re-drawing of the window contents (Pd GUIs) that suffer.
Anyway, you will need to look at the audio settings (Menu, Media, Audio Settings...)
Often relaxing the latency (bigger audio buffer) by increasing the "Delay (Msec):" will solve the problem.
You might have trouble setting the audio settings because Pd is struggling so much, in which case try opening this patch, and then saving your audio settings, and then re-starting Pd.
Pd Fix.zip
Read the "readme" first.
I hope that helps.
David.
Streaming audio file player? Timeline editor? Syncing multiple tracks?
@johnwbyrd I have never looked at the source code, but I run a live performance with Pd....... 30 input channels, 8 out..... with live mixing and using [readsf~] for up to 15 minute backing tracks, and I have never had Pd hang even momentarily.
I use extended for that although I doubt the [readsf~] implementation is different.
However, I use windows7....... and is it possible that Pd and the OS treat disk access slightly differently on other systems? I doubt that.
[readsf~] requires an "open" and a "start"...... so it is not forward looking as it might be in an audio editor. However if you program the "open" in advance.... or even at load, then the start is instantaneous (in ram) and you can emulate an instant player.
If Pd is stumbling during playback..... look elsewhere for the problem....... not in [readsf~]......
A multi-GHz processor with rapid disc access should not have problems with audio or Pd...... they use a paltry fraction of the resources available.
Yes..... Pd prioritises audio..... like all programs that use audio.... over video, screen drawing...... everything. So if your patch is struggling in any way you could see the Pd gui stumble.
Check thoroughly your audio and latency settings.... any mismatch with the capabilities of the soundcard could cause what you are seeing.
More here about setting up your computer for audio......... https://forum.pdpatchrepo.info/topic/10125/audio-and-video-why-do-i-have-problems ..... with a link to a good read for problem solving!
You often just need to tell your OS to do as instructed......"and I mean it!"........... Otherwise it prefers to go and peruse it's Facebook page for likes!
Maybe, otherwise, use FL studio or something similar.
Programs written specifically for audio application will have been written in assembly language and be more appropriate for your purposes.
Communication with Pd is usually facilitated through at least midi or OSC messaging.
David.
No sound from raspberry
I had the same difficulty. No sound cards were available according to
aplay --list-devices
I found somewhere (I forget where) the suggestion to add to
/boot/config.txt
the line:
dtparam=audio=on
and from then everything went swimmingly. I set up some (possibly pretty dangerous) values in
/etc/security/limits.conf
like this:
### realtime permission for audio
@audio – rtprio 99
@audio – memlock unlimited
@audio – nice -10
@audio - priority 8
# End of file
The audio priority of 8 seems to be necessary to stop annoying messages in the puredata console when it's started. I'm not an expert on these values, they might not be wise, safe or ideal but they worked for me.
And I made sure that my user is in the audio group:
usermod -a -G audio david
And I've had glitch free performance since out of the mini jack.
install pdl2ork on manjaro: fails to get flite installed..
Hi there, i also posted to the manjaro forum but i guess here i can find more expertise on that topic: i want to install pd-l2ork on manjaro (arch-based) linux and I get this error building flite:
Insert Co> Found flite1.patch
==> Validating source files with md5sums...
flite-1.4-release.tar.bz2 ... Passed
flite1.patch ... Passed
==> Extracting sources...
-> Extracting flite-1.4-release.tar.bz2 with bsdtar
==> Starting prepare()...
patching file config/common_make_rules
==> Starting build()...
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for ranlib... ranlib
checking for a BSD-compatible install... /usr/bin/install -c
checking for ar... ar
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether byte ordering is bigendian... no
checking for mmap... yes
checking sys/soundcard.h usability... yes
checking sys/soundcard.h presence... yes
checking for sys/soundcard.h... yes
checking machine/soundcard.h usability... no
checking machine/soundcard.h presence... no
checking for machine/soundcard.h... no
checking sys/audioio.h usability... no
checking sys/audioio.h presence... no
checking for sys/audioio.h... no
checking mmsystem.h usability... no
checking mmsystem.h presence... no
checking for mmsystem.h... no
configure: creating ./config.status
config.status: creating config/config
config.status: creating config/system.mak
making in ...
making in include ...
making in src ...
making in src/audio ...
gcc -fPIC -D_FORTIFY_SOURCE=2 -I. -DCST_AUDIO_LINUX -I../../include -O3 -Wall -c auclient.c -o /tmp/yaourt-tmp-kalimerox/aur-flite1/obj/src/audio/auclient.os
gcc -fPIC -D_FORTIFY_SOURCE=2 -I. -DCST_AUDIO_LINUX -I../../include -O3 -Wall -c auserver.c -o /tmp/yaourt-tmp-kalimerox/aur-flite1/obj/src/audio/auserver.os
gcc -fPIC -D_FORTIFY_SOURCE=2 -I. -DCST_AUDIO_LINUX -I../../include -O3 -Wall -c audio.c -o /tmp/yaourt-tmp-kalimerox/aur-flite1/obj/src/audio/audio.os
gcc -fPIC -D_FORTIFY_SOURCE=2 -I. -DCST_AUDIO_LINUX -I../../include -O3 -Wall -c au_streaming.c -o /tmp/yaourt-tmp-kalimerox/aur-flite1/obj/src/audio/au_streaming.os
au_streaming.c: In function ‘audio_stream_chunk’:
au_streaming.c:77:9: warning: variable ‘n’ set but not used [-Wunused-but-set-variable]
int n;
^
gcc -fPIC -D_FORTIFY_SOURCE=2 -I. -DCST_AUDIO_LINUX -I../../include -O3 -Wall -c au_oss.c -o /tmp/yaourt-tmp-kalimerox/aur-flite1/obj/src/audio/au_oss.os
au_oss.c: In function ‘audio_open_oss’:
au_oss.c:86:25: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
ad->platform_data = (void *)afd;
^
au_oss.c: In function ‘audio_close_oss’:
au_oss.c:181:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
ioctl((int)ad->platform_data, SNDCTL_DSP_SYNC, NULL);
^
au_oss.c:182:16: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
rv = close((int)ad->platform_data);
^
au_oss.c: In function ‘audio_write_oss’:
au_oss.c:189:18: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
return write((int)ad->platform_data,samples,num_bytes);
^
au_oss.c: In function ‘audio_flush_oss’:
au_oss.c:194:18: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
return ioctl((int)ad->platform_data, SNDCTL_DSP_SYNC, NULL);
^
au_oss.c: In function ‘audio_drain_oss’:
au_oss.c:199:18: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
return ioctl((int)ad->platform_data, SNDCTL_DSP_RESET, NULL);
^
ar: ../../..//tmp/yaourt-tmp-kalimerox/aur-flite1/lib/libflite.shared.a: No such file or directory
make[2]: *** [../../config/common_make_rules:116: /tmp/yaourt-tmp-kalimerox/aur-flite1/obj/src/audio/.build_so] Error 1
make[1]: *** [../config/common_make_rules:133: /tmp/yaourt-tmp-kalimerox/aur-flite1/obj/src/.make_build_dirs] Error 2
make: *** [config/common_make_rules:133: /tmp/yaourt-tmp-kalimerox/aur-flite1/obj//.make_build_dirs] Error 2
==> ERROR: A failure occurred in build().
Aborting...
==> ERROR: Makepkg was unable to build flite1.
de
anyone having the same issues or an advice=? ?
thanks!!
Pd doesn´t run when connecting an external audio interface.
Hello,
I have been using Pd for a while, and now I am working on some patches with an external audio interface to get audio input from a guitar. However, I am experiencing a problem with one of my audio interfaces.
I have the Alesis io4 audio card. I can connect it to my computer and use it with other software without any problems. However, when I try to launch Pd with this interface connected, Pd suddenly crashes without reporting any error. I have tried to use another interface (Scarlet 2i2) and Pd opens succesfully.
I would like to know if someone have experienced this problem with an external audio device, and if so, if you have any idea about how to solve it. Maybe is there any configuration i should do before the software can recognize the device?
Thanks for your attention,
cheers
inioms
Cubie pd pedal
Hi there,
I've been working on that for nearly two years and now it is done I find it soooo 2014 that the previous intentions to make a full wiki page seem now silly. Anyway this could give ideas to other people so here is an abstract.
This is basically a lame-electronics simple-aggregate-of-common-parts version of a guitar pedal that hosts pd extended patches as effects. It's based on a cubieboard 2, connected to an el-cheapo (this was intended as a proof of concept hardware) soundcard through usb, internally. It boots a rt-patched version of debian from microSD card (never managed to flash sdram) in ... 50seconds , with autologin so no keyboard is needed. After this time it behaves like a floor pedal, pd runs the stored patches responding to its hardware interface. Anyway a keyboard, a mouse and a display can be plugged in and it behaves like a linux desktop, it's easy to edit patches on the fly.
The interface consists of three footswitches, three leds, a button switch, a clickable rotary encoder, four clickable potentiometers and a 4x20 lcd display. The pots and the display communicate with the gpio pins (all of them digital) through i2c, the pots being read by a quadruple i2c adc.
I called it a pd pedal, but I have to confess it cannot be directly connected to a guitar amp, as the IO are two preamplified instrument inputs, two line in, two line out and a headphone stereo jack. This can be solved when you have a digital pedal in your pedalboard that have line inputs. Of course I knew it from the beginning, and could never work it around later as it would have taken more space and would have been tedious to implement for a beginner electronics fan like me .
I also wanted from the beginning to make a relatively small footprint on my pedalboard so it is rather tall (aluminium box is 160x125x76). What a challenge to stack these components in such a box it has been, especially when it came with holes positioning, elements fixture, internal aluminium rounded edges to mill and file down...
The 1 ghz dual-core with 1 gb ram allows for decent dsp patches.
The pedal automatically runs a predefined patch but interface allows for patch selection. (statically coded so far)
I initially wrote several externals that allow for interface i/o, but never got rid of audio artifacts when the interface was trigged. As a workaround I now make the readings from outside pd, with a well-choosen rt priority and send values to pd using pdsend. The workaround is only half of what it should be, as for outputting data (writing things on the display) I still rely on a homebrew pd external (too much work for me to take it out of pd). The result is uncorrupted audio only when lcd display is not used, which is unreasonable (every pot controls a patch parameter and I love to see the values updated on the lcd). But when the pedal is left untouched the audio is clean.
Here are two pics, one of the inside before the audio card is stacked and the other one showing it outside look.
Thanks,
Nau
External Autio Interface mic problem
Hi everyone,
I am looking for help, to solve my problem with pure data and my audio interface. I am using PD as life performing software, and I need to use my external audio interface for better quality and avoid sound delay.
Interface I am using, is zoom R24 recorder with interface and some other stuff. PD can find it easy and it use no problem as sound output device, but once I set up input to use mic, it cut the sound off, and mic have no sight of life... I was trying different drivers, and possibilities to turn mic on, but no luck...
Is there anyway how I could use it as audio input and output for life performing... Maybe I need some special drivers, or use special commands to turn it on?
My internal audio card works fine, and the setup as internal audio card as input, and output to external interface works also... But once I switch, no signals! What should I do?!
Thanks.
Beatmaker Abstract
http://www.2shared.com/photo/mA24_LPF/820_am_July_26th_13_window_con.html
I conceptualized this the other day. The main reason I wanted to make this is because I'm a little tired of complicated ableton live. I wanted to just be able to right click parameters and tell them to follow midi tracks.
The big feature in this abstract is a "Midi CC Module Window" That contains an unlimited (or potentially very large)number of Midi CC Envelope Modules. In each Midi CC Envelope Module are Midi CC Envelope Clips. These clips hold a waveform that is plotted on a tempo divided graph. The waveform is played in a loop and synced to the tempo according to how long the loop is. Only one clip can be playing per module. If a parameter is right clicked, you can choose "Follow Midi CC Envelope Module 1" and the parameter will then be following the envelope that is looping in "Midi CC Envelope Module 1".
Midi note clips function in the same way. Every instrument will be able to select one Midi Notes Module. If you right clicked "Instrument Module 2" in the "Instrument Module Window" and selected "Midi input from Midi Notes Module 1", then the notes coming out of "Midi Notes Module 1" would be playing through the single virtual instrument you placed in "Instrument Module 2".
If you want the sound to come out of your speakers, then navigate to the "Bus" window. Select "Instrument Module 2" with a drop-down check off menu by right-clicking "Inputs". While still in the "Bus" window look at the "Output" window and check the box that says "Audio Output". Now the sound is coming through your speakers. Check off more Instrument Modules or Audio Track Modules to get more sound coming through the same bus.
Turn the "Aux" on to put all audio through effects.
Work in "Bounce" by selecting inputs like "Input Module 3" by right clicking and checking off Input Modules. Then press record and stop. Copy and paste your clip to an Audio Track Module, the "Sampler" or a Side Chain Audio Track Module.
Work in "Master Bounce" to produce audio clips by recording whatever is coming through the system for everyone to hear.
Chop and screw your audio in the sampler with highlight and right click processing effects. Glue your sample together and put it in an Audio Track Module or a Side Chain Audio Track Module.
Use the "Threshold Setter" to perform long linear modulation. Right click any parameter and select "Adjust to Threshold". The parameter will then adjust its minimum and maximum values over the length of time described in the "Threshold Setter".
The "Execution Engine" is used to make sure all changes happen in sync with the music.
IE>If you selected a subdivision of 2, and a length of 2, then it would take four quarter beats(starting from the next quarter beat) for the change to take place. So if you're somewhere in the a (1e+a) then you will have to wait for 2, 3, 4, 5, to pass and your change would happen on 6.
IE>If you selected a subdivision of 1 and a length of 3, you would have to wait 12 beats starting on the next quater beat.
IE>If you selected a subdivision of 8 and a length of 3, you would have to wait one and a half quarter beats starting on the next 8th note.
http://www.pdpatchrepo.info/hurleur/820_am,_July_26th_13_window_conception.png
How to compile and install a Real-Time Kernel for Debian \#1
original post by Sumidero, cut and pasted from here:
http://puredata.hurleur.com/sujet-5605-compile-install-real-time-kernel-debian
Hello everybody:
After some exchange of posts in this thread:
http://puredata.hurleur.com/sujet-5578-old-toughbook-useful-live-events
I told @katjav and @PonZo that soon I was going to post a log of a Real-time Kernel compilation and installation for Debian based machines, so that Pd would run fast and smooth in any machine, even a small netbook. I only found the log of the compilation of a desktop machine, but the process is the same, adjusting the choices to the equipment features. I hope this encourages you to compile your own Real-time kernel.
You can download the pdf file from here:
http://dl.dropbox.com/u/6086343/HowToCompileARealTimeKernelForDebian.pdf
Extra data:
You can find out the chipset name of your audio card using this command:
# cat /proc/asound/cards
There are some extra tweaks needed to develop real-time performance:
Install jack with its graphic front end:
# aptitude install qjackctl
Once installed, it prompts us to configure automatically this file:
/etc/security/limits.d/audio.conf
We agree and then we tweak this other file opening it with any text editor (always in root mode).
# gedit /etc/security/limits.conf
Then we add these lines at the bottom of the limits.conf file to assign high and real-time priorities to the @audio group:
@audio - rtprio 99
@audio - memlock unlimited
@audio - nice -10
Don't forget to add your user to the @audio group:
# adduser <userName> audio
I hope it works for you too. Best regards to all of you.
Sumidero
NVidia puredyne vs vista
Hey
Once again I'm back on vista. My brief journey to puredyne goes something like this.
from puredyne
partitioned new hard drive with 4 partitions 1-swap , 2 ext4 200Gib, 1 NTFS 200GB . Copied Vista to NTFS partition with gparted(started to do this with dd but with new Gibabits stuff I was skeered but hey a platter is a platter and a cluster is a cluster right). Actually there was a 5th partition in there which was the vista restoration partition but I eventually deleted it for obvious reasons.
Removed old drive ,
took machine to ethernet connection with internet,
booted to vista ,
installed Norton virus scanner - only 1 virus, 2 tracking cookies, and one gain trickler after over a year with no virus scanner, Thats pretty good and shows you can be selective about what you download and where you visit on the web and not get any viruses.
Was trying to get windows movie maker to work with mov codec which it doesnt.
Installed auto updates for the first and only time. this took about 3 hours and still needed to install service pack 1, 2. Aborted trying to update win movie maker
****Problem 1***** MS movie maker does not work with GEM mov video output codec.
Installed latest Nvidia drivers for vista.
Woohooo OpenGl hardware acceleration GEM works so much better in vista now.
*****Problem 2********ASIO for all does not allow 2 applications to run with audio and midi at the same time. If I wanted to run Widi and play my guitar so puredata can receive midi input from guitar ASIO will not allow it but ASIO for all is the only way I can get latency down so this would be feasible.
Got frustrated.
Installed fresh copy of puredyne onto 2nd ext4 partition.
ran puredata audio latency good with fresh install. gem video bad.
used synaptics to install nvidia drivers. v185 I think.
ran GEm error no opengl config.
downloaded gdeb , flash player, google chrome, nvidia drivers from nvidia site.
installed gdeb from terminal, flash and chrome from gdeb.
rebooted to log in as root and iunstalled nvidia drivers.
woohoo hardware acceleration for opengl
******problem 3************
gem works great but audio glitches with puredata window visible.
when only gem window is visible i can unaudioglitchily move the mouse around to control same parameters that would normaly be controled with sliders in pd window.
Seems like before i upgraded nvidia video drivers hw:do o whatever it is, was listed in JackD as realtek HD Audio, now it is listed as NVIDIA HD Audio.
So Gem works great but not when Pd window is open and I think my audio drivers were replaced with Nvidia.
I would really like to get back to my patch and stop wasting time on these operating systems and hardware configurations I thought in the last 15 years all this hardware acelleration and autodetection would be figured out but no all we got is rc.0, rc.01, rc.02, rc, etc...... instead of just rc.d.
Ok I'm getting an error when I exit puredyne that says pid file not found is jackd running. anyone know what that means?
Also does anyone have a keymap for gem keyboard for linux, windows and mac so I don't have to record them.
Any suggestions about what to do about my ASIO problems in windows?
Any suggestions about my audio driver in Linux?
Any suggestions about my GEM mov video / windows incompatibilities?
I can import the mov video and audio to SF Acid 3.0 and output a 2Gb avi then import it into windows movie maker but this is crazy to do for a 7 minute 12fps 320x240 video.
Ahhhhhhhhh!
Any suggestions are welcome!
PS I believe someone could rewrite puredata's audio and video interface in assembly language to control their hardware before figuring out how to get these operating systems to do it.