CPU vs RAM : recording and real-time

Talk about your MIDI interfaces, microphones, keyboards...

Moderators: khz, MattKingUSA

tony-j
Established Member
Posts: 31
Joined: Fri Aug 25, 2017 11:36 pm

CPU vs RAM : recording and real-time

Postby tony-j » Sat Sep 30, 2017 1:26 pm

Hello i'm on kxstudio and make some experiments with my 2 audio interfaces.

I tried to sample at 192khz and i have to admit: it's an other level of quality(at a 1024 bit rate and 5ms latency, and no xruns at all). But at that sampling rate you can only record, no real time actions, like midi keyboard or fx plugins, because it starts a machine gun of clicks and pops, and i log thousands of xruns.......it's a CPU problem.

So i tried to let do the real time work to an other CPU and audio device. All the plugin fxs and synths routed with carla, and use the second soundcard output as an other sound source in the primary input but again i have clicks and pops in the stream, this time they're just in the backround, it's not like a broken record,it is occasional but permanent digital distortion and i'm doing the real time work to a sampling rate of 44100hz.There's no xruns this time. The CPUs are almost the same (around 2 Ghz speed ) but it has only1 gb ram (the other has 4). So it's a ram problem. With bash commands i noticed that i have 2 bank slots for the memory but before investing other money in RAM i would like your opinion .

The goal is to record at the best sample rate, and do real-time performance at a same time. Talking about use midi keyboard with zynaddsubfx or yoshimi. I tried to use only ardour and record a midi track but it's exactly the same. I tried to reduce the sample rate to 48k and 44k but it's only question of time when the real-time playng starts to make problems. I solved using 2 cpus. and using the second audio device as analog output to the first input.
have i to invest in ram (at least 4 gb) or should i direct myself to a computer with more powerfull CPU (around 4ghz)? Does the soundcard have its own processor? what changes with more than 4gb of RAM? What do you think about the 2 cpus usage? is there a way to use only one? What the real-time needs ? Could an audio interface be used as an effect rack? Receiving analog input processing as digital and back to the analogic outputs. (with no xruns machine gun)

User avatar
CrocoDuck
Established Member
Posts: 1052
Joined: Sat May 05, 2012 6:12 pm
Contact:

Re: CPU vs RAM : recording and real-time

Postby CrocoDuck » Sat Sep 30, 2017 2:57 pm

Hi there!

We will be happy to assist you in what you want to achieve, but first be aware that perhaps you don't need 192 kHz at all. There is a good article linked in this thread. High sample rates are useful pretty much only for two things:

  • Reduce latency
  • Recording/Measuring/Synthesizing nonlinearly distorted signals

So, perhaps you don't really need to go all the way up to 192 kHz.

First of all, I would make sure your system is properly optimized. This will help. Then, you might wish to slim down your system. When I was using a computer with specs similar to yours I a was used to run OpenBox and kill not needed programs and services (you can read the rest of the page, it is very informative).

As for soundcards, few of them have their own DSP processors, mostly for mixing and metering (this one, for example). However this is not the norm and in all cases, the audio processing happens in the CPU.
Check my Linux audio experiments on my SoundCloud.
Browse my AUR packages.
Fancying a swim in the pond?

tony-j
Established Member
Posts: 31
Joined: Fri Aug 25, 2017 11:36 pm

Re: CPU vs RAM : recording and real-time

Postby tony-j » Wed Oct 04, 2017 4:01 am

Hello thank you for your help. Maybe a tricked myself convincing me to hear a better sound. at 192 khz was the first time that i could sample at 5ms latency without xruns . I don't know what a nonlinear distortion is. I work with the feedback distortion sometimes is that it?.

Anyway the problems persist even at 44100hz, i was playing the midi keyboard with a strange sound with echos on zynaddsubfx, the first 5 minuts all is well. After that i noticed the dsp load jumping over 50% and the sound start to be crcrcrcrcrcr, but wanna hear something funny? in the recording, even if at that point it marked 20 xruns, the sound is perfect, can't hear any difference.

Here's the result of the scan

Code: Select all

tony@Lifebook:~/Downloads/realtimeconfigquickscan-master$ ./realTimeConfigQuickScan.pl
== GUI-enabled checks ==
Checking if you are root... no - good
Checking filesystem 'noatime' parameter... 3.13.0 kernel - good
(relatime is default since 2.6.30)
Checking CPU Governors... CPU 0: 'performance' CPU 1: 'performance'  - good
Checking swappiness... 10 - good
Checking for resource-intensive background processes... none found - good
Checking checking sysctl inotify max_user_watches... >= 524288 - good
Checking access to the high precision event timer... readable - good
Checking access to the real-time clock... readable - good
Checking whether you're in the 'audio' group... yes - good
Checking for multiple 'audio' groups... no - good
Checking the ability to prioritize processes with chrt... yes - good
Checking kernel support for high resolution timers... found - good
Kernel with Real-Time Preemption... not found - not good
Kernel without real-time capabilities found
For more information, see http://wiki.linuxaudio.org/wiki/system_configuration#installing_a_real-time_kernel
Checking if kernel system timer is high-resolution... found - good
Checking kernel support for tickless timer... found - good
== Other checks ==
Checking filesystem types... ok.
not found.
** Warning: no tmpfs partition mounted on /tmp
   For more information, see:
   - http://wiki.linuxaudio.org/wiki/system_configuration#tmpfs
   - http://lowlatency.linuxaudio.org
** Set $SOUND_CARD_IRQ to the IRQ of your soundcard to enable more checks.
   Find your sound card's IRQ by looking at '/proc/interrupts' and lspci.
tony@Lifebook:~/Downloads/realtimeconfigquickscan-master$ uname -a
Linux Lifebook 3.13.0-132-lowlatency #181-Ubuntu SMP PREEMPT Wed Sep 13 14:24:59 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
tony@Lifebook:~/Downloads/realtimeconfigquickscan-master$


i tried to follow some tutorials about the irq but didn't understand much and also i'm quite afraid to put my hands on kernel configuration and /boot section. Do i need to install some patch? i've noticed there is an rtkit in the processes. I'm on kxstudio.

I also tried to kill some processes with htop but didn't do a lot.

actually my UR44 has a built-in dsp chip.

User avatar
chaocrator
Established Member
Posts: 306
Joined: Fri Jun 26, 2015 8:11 pm
Location: Kyiv, Ukraine
Contact:

Re: CPU vs RAM : recording and real-time

Postby chaocrator » Wed Oct 04, 2017 7:55 am

tony-j wrote:The goal is to record at the best sample rate, and do real-time performance at a same time.

so, if you're going to do multitrack recording, the very first thing you should concern about is your drive input/output rate. HDD is almost certainly will be a bottleneck.

User avatar
CrocoDuck
Established Member
Posts: 1052
Joined: Sat May 05, 2012 6:12 pm
Contact:

Re: CPU vs RAM : recording and real-time

Postby CrocoDuck » Wed Oct 04, 2017 11:07 am

tony-j wrote: I don't know what a nonlinear distortion is. I work with the feedback distortion sometimes is that it?.


It is any kind of distortion that alters the shape of the signal. An overdrive is a source of nonlinear distortion, but also a compressor is.

In general, digital algorithms that produce nonlinear distortion yield more accurate results when used at high sample rate, as the different shape of the signal is achieved by adding higher harmonics (usually). Only harmonics up to half sample rate can be generated without aliasing, hence higher sample rate means more harmonics, hence more accuracy.

Although harmonics beyond the audible range cannot really be heard themselves, the shape of the signal is gonna be altered by them anyway. This can influence the output sound due to the transient response and dynamics of loudspeakers and ear... but as far as I know there isn't a lot of evidence regarding how the sample rate affects the perception of nonlinear distortion. It is actually quite hard to grasp perception of nonlinear distortion as a whole. I typically use 48 kHz sample rate and I am very happy with it. I go beyond only when I want to measure things, as I did in my master project (you can find it in my blog in the signature).

tony-j wrote:Here's the result of the scan


Looking good there.

tony-j wrote:i tried to follow some tutorials about the irq but didn't understand much and also i'm quite afraid to put my hands on kernel configuration and /boot section. Do i need to install some patch? i've noticed there is an rtkit in the processes. I'm on kxstudio.


I believe KXStudio comes with rtirq already installed. Perhaps, all you need to do is configure it a tiny bit. See here.

However, this is weird (maybe ringing a bell):

tony-j wrote:Anyway the problems persist even at 44100hz, i was playing the midi keyboard with a strange sound with echos on zynaddsubfx, the first 5 minuts all is well. After that i noticed the dsp load jumping over 50% and the sound start to be crcrcrcrcrcr, but wanna hear something funny? in the recording, even if at that point it marked 20 xruns, the sound is perfect, can't hear any difference.


Let's just have a look at the whole of your hardware. Repost the output of

Code: Select all

lspci -vnn
Check my Linux audio experiments on my SoundCloud.
Browse my AUR packages.
Fancying a swim in the pond?

tony-j
Established Member
Posts: 31
Joined: Fri Aug 25, 2017 11:36 pm

Re: CPU vs RAM : recording and real-time

Postby tony-j » Wed Oct 04, 2017 9:23 pm

then i definitely need an higher sample rate. For example i keep the tube gain of my korgs always at the max level to obtain an overdrive.
Today i tried to sample an analogc synth with distortion and filters on two different sample rates 44k and 192k. And there's a tiny little difference in the first it's like is added a little low pass filter, the second achieve a little more "weight" imho. i was planning to change the tubes of the korgs till i realized there's very much to know yet about sampling first.I would have posted the difference on youtube, but i have problems there too. The video i posted are like compressed compared to the start waves. Could the ffmpeg compiling tutorial here helps me? Nevermind. matter for other topic.

I think that beyond all possibile software improvements there are some serious hardware limits for my goals.

The tracks were recorded perfectly, the problem was in the real-time playback, which could be a bad day for live performances of dj/producers.
I'm just trying to understand what i can and what i can't do.
Here's my lspci

Code: Select all

tony@Lifebook:~$ lspci -vnn
00:00.0 Host bridge [0600]: Intel Corporation Core Processor DRAM Controller [8086:0044] (rev 02)
        Subsystem: Fujitsu Limited. Device [10cf:1505]
        Flags: bus master, fast devsel, latency 0
        Capabilities: <access denied>
        Kernel driver in use: agpgart-intel

00:02.0 VGA compatible controller [0300]: Intel Corporation Core Processor Integrated Graphics Controller [8086:0046] (rev 02) (prog-if 00 [VGA controller])
        Subsystem: Fujitsu Limited. Device [10cf:150a]
        Flags: bus master, fast devsel, latency 0, IRQ 41
        Memory at f0000000 (64-bit, non-prefetchable) [size=4M]
        Memory at d0000000 (64-bit, prefetchable) [size=256M]
        I/O ports at 1800 [size=8]
        Expansion ROM at <unassigned> [disabled]
        Capabilities: <access denied>
        Kernel driver in use: i915

00:16.0 Communication controller [0780]: Intel Corporation 5 Series/3400 Series Chipset HECI Controller [8086:3b64] (rev 06)
        Subsystem: Fujitsu Limited. Device [10cf:152b]
        Flags: bus master, fast devsel, latency 0, IRQ 42
        Memory at f0905000 (64-bit, non-prefetchable) [size=16]
        Capabilities: <access denied>
        Kernel driver in use: mei_me

00:1a.0 USB controller [0c03]: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller [8086:3b3c] (rev 05) (prog-if 20 [EHCI])
        Subsystem: Fujitsu Limited. Device [10cf:1528]
        Flags: bus master, medium devsel, latency 0, IRQ 16
        Memory at f0905800 (32-bit, non-prefetchable) [size=1K]
        Capabilities: <access denied>
        Kernel driver in use: ehci-pci

00:1b.0 Audio device [0403]: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio [8086:3b56] (rev 05)
        Subsystem: Fujitsu Limited. Device [10cf:1531]
        Flags: bus master, fast devsel, latency 0, IRQ 43
        Memory at f0700000 (64-bit, non-prefetchable) [size=16K]
        Capabilities: <access denied>
        Kernel driver in use: snd_hda_intel

00:1c.0 PCI bridge [0604]: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 1 [8086:3b42] (rev 05) (prog-if 00 [Normal decode])
        Flags: bus master, fast devsel, latency 0
        Bus: primary=00, secondary=01, subordinate=02, sec-latency=0
        I/O behind bridge: 00002000-00002fff
        Memory behind bridge: f0400000-f04fffff
        Prefetchable memory behind bridge: 00000000f0c00000-00000000f0dfffff
        Capabilities: <access denied>
        Kernel driver in use: pcieport

00:1c.1 PCI bridge [0604]: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 2 [8086:3b44] (rev 05) (prog-if 00 [Normal decode])
        Flags: bus master, fast devsel, latency 0
        Bus: primary=00, secondary=03, subordinate=04, sec-latency=0
        I/O behind bridge: 00003000-00003fff
        Memory behind bridge: f0500000-f05fffff
        Prefetchable memory behind bridge: 00000000f0e00000-00000000f0ffffff
        Capabilities: <access denied>
        Kernel driver in use: pcieport

00:1c.4 PCI bridge [0604]: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 5 [8086:3b4a] (rev 05) (prog-if 00 [Normal decode])
        Flags: bus master, fast devsel, latency 0
        Bus: primary=00, secondary=05, subordinate=06, sec-latency=0
        I/O behind bridge: 00004000-00004fff
        Memory behind bridge: f0600000-f06fffff
        Prefetchable memory behind bridge: 00000000f1000000-00000000f11fffff
        Capabilities: <access denied>
        Kernel driver in use: pcieport

00:1c.5 PCI bridge [0604]: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 6 [8086:3b4c] (rev 05) (prog-if 00 [Normal decode])
        Flags: bus master, fast devsel, latency 0
        Bus: primary=00, secondary=07, subordinate=07, sec-latency=0
        I/O behind bridge: 00005000-00005fff
        Memory behind bridge: c0000000-c03fffff
        Prefetchable memory behind bridge: 00000000f0a00000-00000000f0afffff
        Capabilities: <access denied>
        Kernel driver in use: pcieport

00:1d.0 USB controller [0c03]: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller [8086:3b34] (rev 05) (prog-if 20 [EHCI])
        Subsystem: Fujitsu Limited. Device [10cf:1528]
        Flags: bus master, medium devsel, latency 0, IRQ 23
        Memory at f0905c00 (32-bit, non-prefetchable) [size=1K]
        Capabilities: <access denied>
        Kernel driver in use: ehci-pci

00:1e.0 PCI bridge [0604]: Intel Corporation 82801 Mobile PCI Bridge [8086:2448] (rev a5) (prog-if 01 [Subtractive decode])
        Flags: bus master, fast devsel, latency 0
        Bus: primary=00, secondary=08, subordinate=08, sec-latency=0
        Capabilities: <access denied>

00:1f.0 ISA bridge [0601]: Intel Corporation HM55 Chipset LPC Interface Controller [8086:3b09] (rev 05)
        Subsystem: Fujitsu Limited. Device [10cf:157b]
        Flags: bus master, medium devsel, latency 0
        Capabilities: <access denied>
        Kernel driver in use: lpc_ich

00:1f.2 IDE interface [0101]: Intel Corporation 5 Series/3400 Series Chipset 4 port SATA IDE Controller [8086:3b28] (rev 05) (prog-if 8f [Master SecP SecO PriP PriO])
        Subsystem: Fujitsu Limited. Device [10cf:151d]
        Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 19
        I/O ports at 1838 [size=8]
        I/O ports at 180c [size=4]
        I/O ports at 1830 [size=8]
        I/O ports at 1808 [size=4]
        I/O ports at 1820 [size=16]
        I/O ports at 1810 [size=16]
        Capabilities: <access denied>
        Kernel driver in use: ata_piix

00:1f.3 SMBus [0c05]: Intel Corporation 5 Series/3400 Series Chipset SMBus Controller [8086:3b30] (rev 05)
        Subsystem: Fujitsu Limited. Device [10cf:1525]
        Flags: medium devsel, IRQ 10
        Memory at f0906000 (64-bit, non-prefetchable) [size=256]
        I/O ports at 1840 [size=32]

00:1f.5 IDE interface [0101]: Intel Corporation 5 Series/3400 Series Chipset 2 port SATA IDE Controller [8086:3b2d] (rev 05) (prog-if 85 [Master SecO PriO])
        Subsystem: Fujitsu Limited. Device [10cf:151d]
        Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 19
        I/O ports at 1890 [size=8]
        I/O ports at 1884 [size=4]
        I/O ports at 1888 [size=8]
        I/O ports at 1880 [size=4]
        I/O ports at 1870 [size=16]
        I/O ports at 1860 [size=16]
        Capabilities: <access denied>
        Kernel driver in use: ata_piix

00:1f.6 Signal processing controller [1180]: Intel Corporation 5 Series/3400 Series Chipset Thermal Subsystem [8086:3b32] (rev 05)
        Subsystem: Fujitsu Limited. Device [10cf:1526]
        Flags: fast devsel, IRQ 10
        Memory at f0704000 (64-bit, non-prefetchable) [size=4K]
        Capabilities: <access denied>

03:00.0 Network controller [0280]: Qualcomm Atheros AR9285 Wireless Network Adapter (PCI-Express) [168c:002b] (rev 01)
        Subsystem: Fujitsu Limited. Device [10cf:1537]
        Flags: bus master, fast devsel, latency 0, IRQ 17
        Memory at f0500000 (64-bit, non-prefetchable) [size=64K]
        Capabilities: <access denied>
        Kernel driver in use: ath9k

07:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 06)
        Subsystem: Fujitsu Limited. Device [10cf:15b1]
        Flags: bus master, fast devsel, latency 0, IRQ 40
        I/O ports at 5000 [size=256]
        Memory at f0a04000 (64-bit, prefetchable) [size=4K]
        Memory at f0a00000 (64-bit, prefetchable) [size=16K]
        Capabilities: <access denied>
        Kernel driver in use: r8169

ff:00.0 Host bridge [0600]: Intel Corporation Core Processor QuickPath Architecture Generic Non-core Registers [8086:2c62] (rev 02)
        Subsystem: Fujitsu Limited. Device [10cf:155b]
        Flags: bus master, fast devsel, latency 0

ff:00.1 Host bridge [0600]: Intel Corporation Core Processor QuickPath Architecture System Address Decoder [8086:2d01] (rev 02)
        Subsystem: Fujitsu Limited. Device [10cf:155b]
        Flags: bus master, fast devsel, latency 0

ff:02.0 Host bridge [0600]: Intel Corporation Core Processor QPI Link 0 [8086:2d10] (rev 02)
        Subsystem: Fujitsu Limited. Device [10cf:155b]
        Flags: bus master, fast devsel, latency 0

ff:02.1 Host bridge [0600]: Intel Corporation 1st Generation Core i3/5/7 Processor QPI Physical 0 [8086:2d11] (rev 02)
        Subsystem: Fujitsu Limited. Device [10cf:155b]
        Flags: bus master, fast devsel, latency 0

ff:02.2 Host bridge [0600]: Intel Corporation 1st Generation Core i3/5/7 Processor Reserved [8086:2d12] (rev 02)
        Subsystem: Fujitsu Limited. Device [10cf:155b]
        Flags: bus master, fast devsel, latency 0

ff:02.3 Host bridge [0600]: Intel Corporation 1st Generation Core i3/5/7 Processor Reserved [8086:2d13] (rev 02)
        Subsystem: Fujitsu Limited. Device [10cf:155b]
        Flags: bus master, fast devsel, latency 0

chaocrator wrote:so, if you're going to do multitrack recording, the very first thing you should concern about is your drive input/output rate. HDD is almost certainly will be a bottleneck

for now recording doesn't give me problems, i'm stuck with rt playback and fx racks added on the incoming signal.


i think that the CPU can't handle both recording and playback, but i had problems even with the playback only with 2or3 zynaddsubfx sounds or just adding an fx on the plugin host to the incoming signal (if i add three of them i think it's normal that start failures but i had problems with 1) for example the tremolo if i turn a knob during the playng i have heavy digital distortion
I think the real-time playing problem is CPU related, and the plugin host one is RAM related

tony-j
Established Member
Posts: 31
Joined: Fri Aug 25, 2017 11:36 pm

Re: CPU vs RAM : recording and real-time

Postby tony-j » Thu Oct 05, 2017 3:45 am

42low wrote:Don't forget! To high gives problems too. Then too much of that unhearable sound will be 'plugin-ed' out of which to much 'distorting by sounds' can start to exist. Search the internet or youtube for it.

I personally wouldn't go up to 192. :|


aye aye captain!!!

i tried my korg esx midi connected to the sound card with zynaddsubfx as module. but i still have heavy clipping, in the playback (didn't try to sample it) Then i forced cadence to 16 bit and set the rate at 44k , the esx sampling specifics , and much better but still some clipping.

Instead of buy new ram and hope to resolve, i saw this zynthian hardware synth , and wondering : use this computer and my ur44 to record at a "good" sample rate :roll: , and use this device to real-time working (synths and fxs) and connect with analogic to input , i saw it is fully hackable , should i resolve my clipping problems with this? If yes better spend 200euros on this than buy ram for nothing, or go to only non-free hardware.
But i have yet some doubts my korgs will do a stress test to it and i don't want to spend money for nothing. I've noticed it has jack installed, could be compatible with my Steinberg UR22 (or maybe they could be connected analogically)?

User avatar
CrocoDuck
Established Member
Posts: 1052
Joined: Sat May 05, 2012 6:12 pm
Contact:

Re: CPU vs RAM : recording and real-time

Postby CrocoDuck » Thu Oct 05, 2017 11:15 am

tony-j wrote:Today i tried to sample an analogc synth with distortion and filters on two different sample rates 44k and 192k. And there's a tiny little difference in the first it's like is added a little low pass filter, the second achieve a little more "weight" imho.


I would expect most differences to be very subtle. The only way to fairly compare them is to record the tracks, export them to uncompressed file format (like wav) and do a blind AB or ABX comparison (compare the track without knowing which is which). Ideally, they should be a recording of the same exact thing in the very same conditions, just vary the sample rate so that the sample rate is the only thing that varies. If you can reliably hear a difference between the two after repeated attempts then there is a difference you can hear. Otherwise it is an illusion (illusions do happen a lot. Actually, most of the time).

If you want to share files with us, best to use uncompressed wavs.

tony-j wrote:Here's my lspci


Seeing nothing bad there. I would try to modprobe out your wireless driver and see if that improves the situation. It happens fairly often that wireless related interrupts get in the way.

Code: Select all

modprobe -r ath9k


What about the kernel version?

Code: Select all

uname -a



tony-j wrote:i tried my korg esx midi connected to the sound card with zynaddsubfx as module. but i still have heavy clipping, in the playback (didn't try to sample it) Then i forced cadence to 16 bit and set the rate at 44k , the esx sampling specifics , and much better but still some clipping.

Instead of buy new ram and hope to resolve, i saw this zynthian hardware synth , and wondering : use this computer and my ur44 to record at a "good" sample rate :roll: , and use this device to real-time working (synths and fxs) and connect with analogic to input , i saw it is fully hackable , should i resolve my clipping problems with this? If yes better spend 200euros on this than buy ram for nothing, or go to only non-free hardware.
But i have yet some doubts my korgs will do a stress test to it and i don't want to spend money for nothing. I've noticed it has jack installed, could be compatible with my Steinberg UR22 (or maybe they could be connected analogically)?


I am very confused by this. First of all, what are you referring to by clipping? Clipping identifies the alteration of a signal when the dynamic range of a device is exceeded. It is distortion, high signal peaks get clipped out. What problem are you facing? Do you hear pops and clicks, symptom of xrun (buffer over/underruns) or do you hear distortion?

What devices are you referring to above? Maybe you forgot to add links?
Check my Linux audio experiments on my SoundCloud.
Browse my AUR packages.
Fancying a swim in the pond?

tony-j
Established Member
Posts: 31
Joined: Fri Aug 25, 2017 11:36 pm

Re: CPU vs RAM : recording and real-time

Postby tony-j » Tue Oct 10, 2017 1:44 pm

Sorry for the late ....busy
CrocoDuck wrote:I would expect most differences to be very subtle. The only way to fairly compare them is to record the tracks, export them to uncompressed file format (like wav) and do a blind AB or ABX comparison (compare the track without knowing which is which). Ideally, they should be a recording of the same exact thing in the very same conditions, just vary the sample rate so that the sample rate is the only thing that varies. If you can reliably hear a difference between the two after repeated attempts then there is a difference you can hear. Otherwise it is an illusion (illusions do happen a lot. Actually, most of the time).


i'm on it , will sample again and give the dropbox links here. just a little time more.

CrocoDuck wrote:Seeing nothing bad there. I would try to modprobe out your wireless driver and see if that improves the situation. It happens fairly often that wireless related interrupts get in the way.

Code: Select all
modprobe -r ath9k


What about the kernel version?



i already turned off the wirless card with Fn+F5 as explained in the tutorials.

this is my kernel version

Code: Select all

tony@Lifebook:~$ uname -a
Linux Lifebook 3.13.0-132-lowlatency #181-Ubuntu SMP PREEMPT Wed Sep 13 14:24:59 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux


CrocoDuck wrote:I am very confused by this. First of all, what are you referring to by clipping? Clipping identifies the alteration of a signal when the dynamic range of a device is exceeded. It is distortion, high signal peaks get clipped out. What problem are you facing? Do you hear pops and clicks, symptom of xrun (buffer over/underruns) or do you hear distortion?

my apologies, clipping is not the appropriate word, i was talking about xruns , when it happens it's like a system breakdown , the sound interrupts itself and start horrible noise, and for example zynaddsubfx logs a peak of 180 db, it happens when i'm playing more than 10 minutes on the midi keyboard , or with a banksound with different delays and a strong attack,when playing a chord of three notes and i add another one. Same thing if i use zynaddsubfx as module for my korg esx, it doesn't happen only with zyn but also with the effect racks in carla.
The sound it's like a mad geiger counter at a high volume, there's not problem if i'm recording but what about the live playback? if it happens with the speaker at high volume i would make people deaf. I don't know if a limiter can help, but surely enough it will be a bad sound anyway.

What devices are you referring to above? Maybe you forgot to add links?


talking about this http://zynthian.org/ it's DIY device based on raspberry pi 3, it doesn't cost too much and maybe splitting the works i coudl solve my problem, i'm asking them if i can use it with my ur22 sound card instead the integrated one, but nobody answered me yet.

42low wrote:I think it could be the in volume. It could be that your in signal simply has to much volume. And if this is what's happening you can never get a good non clipping signal.
The easiest way actually to connect a synth on a soundcard is through a mixer which can handle all volumes right.

You can set the volume in from your computer in the 'sound' settings.
[/quote]

actually yes the volumes of the sounds of zynaddsubfx bank are different between each others and sometimes there's some distortion of that kind.
actually i have a mixer, but i don't use it. My UR44 can do the mixer too, and also my korg esx can do the "mixer" if we refer about controlling the fader of the midi signal going out and the aux in.

User avatar
CrocoDuck
Established Member
Posts: 1052
Joined: Sat May 05, 2012 6:12 pm
Contact:

Re: CPU vs RAM : recording and real-time

Postby CrocoDuck » Tue Oct 10, 2017 2:15 pm

tony-j wrote:i already turned off the wirless card with Fn+F5 as explained in the tutorials.


That might actually not prevent the issue. On my old laptop the wifi was used to trigger xrun clusters every 2 minutes. The only way to prevent it was to unload the wifi kernel module, not even the hardware switch would help. The reason is that some process might periodically try to reach the wifi, even if the actual card is off, and they will be stopped completely only if you unload the module.

How accurate is this 10 minutes "deadline"? If it is very accurate, it might be a sign of an interfering process.

This:

tony-j wrote:when it happens it's like a system breakdown , the sound interrupts itself and start horrible noise, and for example zynaddsubfx logs a peak of 180 db, it happens when i'm playing more than 10 minutes on the midi keyboard , or with a banksound with different delays and a strong attack,when playing a chord of three notes and i add another one. Same thing if i use zynaddsubfx as module for my korg esx, it doesn't happen only with zyn but also with the effect racks in carla.


Does look like the CPU cannot handle it. I would consider removing all unnecessary services. In the past, when I was running on an AMD64 and 512 MB of RAM, switching to LXDE helped a lot.

tony-j wrote:i'm on it , will sample again and give the dropbox links here. just a little time more.


No need to do it now, if you are busy, we can focus on the problem for the time being.

tony-j wrote:talking about this http://zynthian.org/ it's DIY device based on raspberry pi 3, it doesn't cost too much and maybe splitting the works i coudl solve my problem, i'm asking them if i can use it with my ur22 sound card instead the integrated one, but nobody answered me yet.


I would ask directly the zynthian guys. They seem to have a forum.
Check my Linux audio experiments on my SoundCloud.
Browse my AUR packages.
Fancying a swim in the pond?

tony-j
Established Member
Posts: 31
Joined: Fri Aug 25, 2017 11:36 pm

Re: CPU vs RAM : recording and real-time

Postby tony-j » Tue Oct 10, 2017 4:27 pm

CrocoDuck wrote:That might actually not prevent the issue. On my old laptop the wifi was used to trigger xrun clusters every 2 minutes. The only way to prevent it was to unload the wifi kernel module, not even the hardware switch would help. The reason is that some process might periodically try to reach the wifi, even if the actual card is off, and they will be stopped completely only if you unload the module.

How accurate is this 10 minutes "deadline"? If it is very accurate, it might be a sign of an interfering process.


that's ok i will try this for sure.
Can't say it is periodic i associated this to overheating, cpu can't handle hard stuff when it's working for some time.

CrocoDuck wrote:Does look like the CPU cannot handle it. I would consider removing all unnecessary services. In the past, when I was running on an AMD64 and 512 MB of RAM, switching to LXDE helped a lot.


yes is the cpu , i have 4 GB ram but i think it's the dual core the problem, perhaps it needs 4core.Before i was on ubuntu studio on lxde and didn't try a lot but 1 or 2 sounds did have the same problem. didn't try a lot but i think that there are hardware limits for what i need.

CrocoDuck wrote:I would ask directly the zynthian guys. They seem to have a forum.

yes i wrote there but they hadn't answered me yet maybe i'll send a pm later.
i need an effect rack and a good synth, UR44 with its 6 inputs and 4 outputs (handled by jackd and carla) opened a world of possibilities especially with free-ware , zynaddsubfx with korg esx control change is amazing,and i have an other sound card with hard preamps ( that i love) only to do this, but there's this big problem ahead, hope the raspberry 4core can solve it but i know the cpu isn't built to do this. Maybe i should go to some analog stuff. dunno. would be a lot of things to buy. I saw this receptor and thought i could buy a 2nd hand one, but i'm really against the concept of using a linux based hardware that runs only non-free software.

User avatar
CrocoDuck
Established Member
Posts: 1052
Joined: Sat May 05, 2012 6:12 pm
Contact:

Re: CPU vs RAM : recording and real-time

Postby CrocoDuck » Tue Oct 10, 2017 7:29 pm

tony-j wrote:yes is the cpu , i have 4 GB ram but i think it's the dual core the problem, perhaps it needs 4core.


That's pretty strange to me though: you should have enough power really.

I had a look around about your sound-card and I seen that few years ago it required a kernel patch to work (for example here). According to this thread, the kernel patch has been merged into the kernel code at version 3.18. Now, you seem to be sporting a rather ancient 3.13 kernel... I wonder whether your computer is fully rigged to deal with the device. The first port of call would be, I think, to try to make an AVLinux live pendrive and see how things work in the live environment. I think the kernel should be more up to date on that (4.9 if I am not wrong). Give it a go.

EDID: Wait, I am slightly confused: with what soundcard do you observe the problem?
Check my Linux audio experiments on my SoundCloud.
Browse my AUR packages.
Fancying a swim in the pond?

tony-j
Established Member
Posts: 31
Joined: Fri Aug 25, 2017 11:36 pm

Re: CPU vs RAM : recording and real-time

Postby tony-j » Tue Oct 10, 2017 9:18 pm

i think both,
actually i had installed that patch when i bought my ur22, i had ubuntu xenial, just to make the sistem see it. Then i installed ubuntu studio with low latency kernel and then qjackctl noticed it without any trouble.

I'm quite sad i have to try an other distro, is the fourth that i have to try, but i'll give it a chance. I'm starting to think i just stressed the system too much.
For example the angel piano (in the companion bank) do xruns all the times. Even with the ubuntu studio kernel (the xenial one). Because it has a strong attack and 2 or 3 delays, (short , modulation) so the system can do a note, but can't do 2 or 3 one after the other because it has to handle the new note and the old note reverbs and echos (that's why i thought it was a random memory lack)

same if you add too much fxs in the racks, it goes to a point that the system can do anymore and it is like it falls down during a run and stands up and continues running (metaphorically)

User avatar
CrocoDuck
Established Member
Posts: 1052
Joined: Sat May 05, 2012 6:12 pm
Contact:

Re: CPU vs RAM : recording and real-time

Postby CrocoDuck » Wed Oct 11, 2017 8:00 am

tony-j wrote:I'm quite sad i have to try an other distro, is the fourth that i have to try, but i'll give it a chance. I'm starting to think i just stressed the system too much.


We are doing it as a test only, to see whether the kernel might be the issue. If AVLinux works fine we can try to upgrade the kernel on your Ubuntu and see whether it works. I have the feeling that your lowlatency kernel might have an old version of the patch rather than the stable code merged in the kernel tree, this could explain the weird behavior I think.
Check my Linux audio experiments on my SoundCloud.
Browse my AUR packages.
Fancying a swim in the pond?

tony-j
Established Member
Posts: 31
Joined: Fri Aug 25, 2017 11:36 pm

Re: CPU vs RAM : recording and real-time

Postby tony-j » Thu Dec 07, 2017 4:19 pm

hello i think i finally solved my problem of xruns.

It was not a software problem but hardware. It happened because i used an usb midi keyboard plugged directly to the computer and an external soundcard. To avoid xruns the midi device must be plugged directly to the soundcard ( mine has midi I/O ports) that query to the sound bank in the computer and back to the sound card outputs, instead doing digital ping pong between the cpu and the soundcard. It sounds quite obvious now, i took months to figure it out. I spent 80 euros for a usb midi keyboard for nothing but i'm glad that i've solved my problem.

I'm sampling to 44khz that is the rate of the korgs, a buffer size of 256 for low latency, at 24bit like the soundcard has. I have less then 20% load, even with zynaddsubfx and rakarrack together .
I heard that rakarrack requires an higher sample rate to do its stuff at best, sometimes it crushes when i change a preset fast but i think it's not related to the rate , maybe i will try a newer kernel to see if it gets better.

Thank you for your help.


Return to “Computer Related Hardware”

Who is online

Users browsing this forum: No registered users and 1 guest