Question about CPU (SOLVED)

Post fully complete "how to" guides and tutorials here. This is a great place to get feedback on stuff you might put in the wiki.

Moderators: MattKingUSA, khz

User avatar
briandc
Established Member
Posts: 1442
Joined: Sun Apr 29, 2012 3:17 pm
Location: Italy
Has thanked: 58 times
Been thanked: 28 times
Contact:

Question about CPU (SOLVED)

Post by briandc »

What requires more computer resources (cpu, ram, etc)--- an external synth sending only sound in, or an external midi controller sending in only midi signals, to a softsynth?

Thanks!

brian
Last edited by briandc on Wed Jun 13, 2012 8:31 pm, edited 1 time in total.
Have your PC your way: use linux!
My sound synthesis biome: http://www.linuxsynths.com
User avatar
Capoeira
Established Member
Posts: 1321
Joined: Tue May 12, 2009 1:01 pm
Location: Brazil
Has thanked: 3 times
Been thanked: 2 times

Re: Question about CPU

Post by Capoeira »

briandc wrote:What requires more computer resources (cpu, ram, etc)--- an external synth sending only sound in
brian
doesn't use cpu or ram at all. conversion is made by audio card

briandc wrote: a softsynth?
uses some cpu and ram but generally not noticeable.
any sample based aplication and/or using effects is another story
varpa
Established Member
Posts: 509
Joined: Fri Feb 25, 2011 6:40 pm
Been thanked: 13 times

Re: Question about CPU

Post by varpa »

I would clarify sending midi to a softsynth may use negligible CPU but the softsynth may use substantial CPU/DSP. Yoshimi can easily send DSP to 100% causing many xruns. When playing Yoshimi live (i.e. with low latency) I keep an eye on the DSP (shown in QJackCrl, for example) and lay off the keyboard if I see the DSP edging up close to 100%. Big samples, on the other handy (like SampleTekk Black Grand piano, 6GB, loaded in linuxsampler) eat RAM alive, causing GUI slugishness, but not so much CPU usage.
slowpick
Established Member
Posts: 457
Joined: Mon Apr 25, 2011 10:09 am

Re: Question about CPU

Post by slowpick »

briandc wrote:What requires more computer resources (cpu, ram, etc)--- an external synth sending only sound in, or an external midi controller sending in only midi signals, to a softsynth?

Thanks!

brian
Make sure your cpu(s) are not scaled for energy conservation, you want
equal and full access to all cores. Use the htop command,
to monitor system activity, the cpu cores and ram usage are easy
to watch as you crush them with the sustain peddle pumping flooding
certain yoshimi patches with midi data. Choosing 'monophonic' can be a
useful yoshimi option. 8)

the following linkis informative, if a little old, and geared to doing
the opposite of what you desire. Still, the knowledge will be useful.

http://www.pantz.org/software/cpufreq/u ... linux.html
User avatar
briandc
Established Member
Posts: 1442
Joined: Sun Apr 29, 2012 3:17 pm
Location: Italy
Has thanked: 58 times
Been thanked: 28 times
Contact:

Re: Question about CPU

Post by briandc »

Thanks everyone,

so it sounds as though audio coming into the PC for processing is less resource-consuming as using a virtual synth, with just an external MIDI keyboard to use it (unless the virtual synth uses sampling).

Correct?

I ask because I have an older PC with a Pentium, single core (but acts like dual) with about 2GHz, and 1GB of RAM, which I am thinking of using to record audio coming in from an external synth.
But I think something needs tweaking because I get quite a few xruns, even though QJackCtl has a humble 5-msec latency!

Any thoughts?

brian
Have your PC your way: use linux!
My sound synthesis biome: http://www.linuxsynths.com
slowpick
Established Member
Posts: 457
Joined: Mon Apr 25, 2011 10:09 am

Re: Question about CPU

Post by slowpick »

If you can't hear the xruns, don't worry, just record :)
Try timemachine to record the synth audio, it saves
24bit .w64 files by default. These can be played by vlc,
and imported into audacity, for editing, and exporting to .wav, mp3, flac etc versions.

vlc can output the recording into qjackctl, connected to 'system' for monitoring,
and to timemachine for recording, and record a new part at the same time, a simple
but high quality overdub.

Phasex is a synth with lots of potential, even receiving audio for modulation,
and multiple Hexter with sysex bank imports, and rakarrack fx, is a great warehouse
of sound. Yoshimi/zynaddsubfx use the same sound banks, you can test the limits
of your cpu with its multi-timbrality, using 3 or more long-release sounds
and the sustain peddle :shock: :lol:
User avatar
briandc
Established Member
Posts: 1442
Joined: Sun Apr 29, 2012 3:17 pm
Location: Italy
Has thanked: 58 times
Been thanked: 28 times
Contact:

Re: Question about CPU

Post by briandc »

slowpick wrote:If you can't hear the xruns, don't worry, just record :)
Try timemachine to record the synth audio, it saves
24bit .w64 files by default. These can be played by vlc,
and imported into audacity, for editing, and exporting to .wav, mp3, flac etc versions.

vlc can output the recording into qjackctl, connected to 'system' for monitoring,
and to timemachine for recording, and record a new part at the same time, a simple
but high quality overdub.

Phasex is a synth with lots of potential, even receiving audio for modulation,
and multiple Hexter with sysex bank imports, and rakarrack fx, is a great warehouse
of sound. Yoshimi/zynaddsubfx use the same sound banks, you can test the limits
of your cpu with its multi-timbrality, using 3 or more long-release sounds
and the sustain peddle :shock: :lol:
Hi slowpick,
wow, lots of good info. Thanks!
I've used phasex before, but are you saying it can import the patches from Hexter and modify them?

I'll try timemachine as an option to Audacity, just to see how it performs. Sounds like it might be a useful go-around to save resources. :)

Lastly, I installed zynaddsubfx, but I can't get any of the bank sounds to play. Am I missing something?

brian
Have your PC your way: use linux!
My sound synthesis biome: http://www.linuxsynths.com
slowpick
Established Member
Posts: 457
Joined: Mon Apr 25, 2011 10:09 am

Re: Question about CPU

Post by slowpick »

In phasex, the OSC's and LFO's each have a Source knob, you can turn to
'Input 1 and 2' or Input 1 or Input 2, and whatever is on the soundcard line-in
will then be 'in the synth'. There are 4 OSC's so one or more of them can have that
audio input, as well as any of the 4 LFO's.

There are knobs for Input Boost, and Patch Vol on the left side of the gui, and the Gain knob
just sits below the filter listing, between the three, you can manage the volume,
and then apply some presets. or create sounds, using the audio, be it guitar,
vocal, synth etc.

Some zynaddsubfx versions don't work in some settings, but yoshimi
uses the same soundbanks, you can link or copy them to a yoshimi folder.
It works with a2jmidid providing a midi port
in the middle (midi) tab of qjackctl, start it with

a2jmidid -j default
then start yoshimi. The gui is slighty different, but it should have better stability.
User avatar
briandc
Established Member
Posts: 1442
Joined: Sun Apr 29, 2012 3:17 pm
Location: Italy
Has thanked: 58 times
Been thanked: 28 times
Contact:

Re: Question about CPU

Post by briandc »

slowpick wrote:In phasex, the OSC's and LFO's each have a Source knob, you can turn to
'Input 1 and 2' or Input 1 or Input 2, and whatever is on the soundcard line-in
will then be 'in the synth'. There are 4 OSC's so one or more of them can have that
audio input, as well as any of the 4 LFO's.

There are knobs for Input Boost, and Patch Vol on the left side of the gui, and the Gain knob
just sits below the filter listing, between the three, you can manage the volume,
and then apply some presets. or create sounds, using the audio, be it guitar,
vocal, synth etc.

Some zynaddsubfx versions don't work in some settings, but yoshimi
uses the same soundbanks, you can link or copy them to a yoshimi folder.
It works with a2jmidid providing a midi port
in the middle (midi) tab of qjackctl, start it with

a2jmidid -j default
then start yoshimi. The gui is slighty different, but it should have better stability.
Hi slowpick,
absolutely fascinating! I did in fact get yoshimi to work, followed your advice above. The banks of patches are there, and they load. --The only problem is, yoshimi doesn't appear in the ALSA tab, which is what all the other synths also appear in, where I connect the Motif. I can only play yoshimi through a virtual keyboard/PC keyboard.


brian
Have your PC your way: use linux!
My sound synthesis biome: http://www.linuxsynths.com
User avatar
briandc
Established Member
Posts: 1442
Joined: Sun Apr 29, 2012 3:17 pm
Location: Italy
Has thanked: 58 times
Been thanked: 28 times
Contact:

Re: Question about CPU

Post by briandc »

Also, when I open Ardour, I get a message that says some memory has been locked, and that Ardour may close before memory is used up.
I know that QJackCtl has a button to unlock memory. Should I use it?

brian
Have your PC your way: use linux!
My sound synthesis biome: http://www.linuxsynths.com
User avatar
autostatic
Established Member
Posts: 1994
Joined: Wed Dec 09, 2009 5:26 pm
Location: Beverwijk, The Netherlands
Has thanked: 32 times
Been thanked: 104 times
Contact:

Re: Question about CPU

Post by autostatic »

slowpick wrote: a2jmidid -j default
a2jmidid defaults to '-j default' so adding it as an option is not necessary.
briandc wrote:The only problem is, yoshimi doesn't appear in the ALSA tab, which is what all the other synths also appear in, where I connect the Motif. I can only play yoshimi through a virtual keyboard/PC keyboard.
That's where you need a2jmidid for, it creates Yoshimi ports for your Motif in the JACK MIDI tab and you can connect Yoshimi to your Motif there.
If you open the Setup window of QjackCtl and go to the 'Options' tab enter the following line in the 'Execute script after Startup:' field:

Code: Select all

a2jmidid -e &
The -e option forces a2jmidid to create JACK MIDI ports of all available hardware and software ALSA ports and the ampersand tells a2jmidid to run in the background so QjackCtl can move on loading.
User avatar
autostatic
Established Member
Posts: 1994
Joined: Wed Dec 09, 2009 5:26 pm
Location: Beverwijk, The Netherlands
Has thanked: 32 times
Been thanked: 104 times
Contact:

Re: Question about CPU

Post by autostatic »

briandc wrote:I've used phasex before, but are you saying it can import the patches from Hexter and modify them?
This is not possible.
User avatar
briandc
Established Member
Posts: 1442
Joined: Sun Apr 29, 2012 3:17 pm
Location: Italy
Has thanked: 58 times
Been thanked: 28 times
Contact:

Re: Question about CPU

Post by briandc »

AutoStatic wrote:
slowpick wrote: a2jmidid -j default
a2jmidid defaults to '-j default' so adding it as an option is not necessary.
briandc wrote:The only problem is, yoshimi doesn't appear in the ALSA tab, which is what all the other synths also appear in, where I connect the Motif. I can only play yoshimi through a virtual keyboard/PC keyboard.
That's where you need a2jmidid for, it creates Yoshimi ports for your Motif in the JACK MIDI tab and you can connect Yoshimi to your Motif there.
If you open the Setup window of QjackCtl and go to the 'Options' tab enter the following line in the 'Execute script after Startup:' field:

Code: Select all

a2jmidid -e &
The -e option forces a2jmidid to create JACK MIDI ports of all available hardware and software ALSA ports and the ampersand tells a2jmidid to run in the background so QjackCtl can move on loading.
You, my friend, are a MASTER! :D

What about the settings in QJackCtl to avoid xruns? I have it set at 256 frames/period, and sample rate at 41000, with realtime activated, and priority at default. Can I change any of this to reduce the xruns even more? (I don't get many, but they do happen at times...

Thanks for all your help,
brian
Have your PC your way: use linux!
My sound synthesis biome: http://www.linuxsynths.com
Pablo
Established Member
Posts: 1274
Joined: Thu Apr 17, 2008 9:57 pm
Been thanked: 3 times

Re: Question about CPU

Post by Pablo »

What about the settings in QJackCtl to avoid xruns? I have it set at 256 frames/period, and sample rate at 41000, with realtime activated, and priority at default. Can I change any of this to reduce the xruns even more? (I don't get many, but they do happen at times...
Try increasing the frames/period value. Also, make sure you have realtime and memlock privileges. You can check via terminal with:

ulimit -r -l
User avatar
briandc
Established Member
Posts: 1442
Joined: Sun Apr 29, 2012 3:17 pm
Location: Italy
Has thanked: 58 times
Been thanked: 28 times
Contact:

Re: Question about CPU

Post by briandc »

Pablo wrote:
What about the settings in QJackCtl to avoid xruns? I have it set at 256 frames/period, and sample rate at 41000, with realtime activated, and priority at default. Can I change any of this to reduce the xruns even more? (I don't get many, but they do happen at times...
Try increasing the frames/period value. Also, make sure you have realtime and memlock privileges. You can check via terminal with:

ulimit -r -l
Hi Pablo,

Thanks for your time.
I increased the frames/period from 256 to 512. (Latency at 23.2ms now..) But I think it was actually better when I was at 256, and with only 32000Mhz rather than 41000. Is that possible?

When I typed ulimit -r -l I got this:

Code: Select all

real-time priority              (-r) 0
max locked memory       (kbytes, -l) 64
Audour, when opening, gives me this message:
Your system has a limit for maximum amount of locked memory. This might cause Ardour to run out of memory before your system runs out of memory.

You can view the memory limit with 'ulimit -l', and it is normally controlled by /etc/security/limits.conf
What should I do?

brian
Have your PC your way: use linux!
My sound synthesis biome: http://www.linuxsynths.com
Post Reply