[yoshimi] Re: (yet another) crazy idea?

  • From: Will Godfrey <willgodfrey@xxxxxxxxxxxxxxx>
  • To: yoshimi@xxxxxxxxxxxxx
  • Date: Sat, 12 Nov 2016 10:27:42 +0000

On Fri, 11 Nov 2016 09:09:58 +0100
Lorenzo Sutton <lorenzofsutton@xxxxxxxxx> wrote:

Hi Will,

On 09/11/2016 22:02, Will Godfrey wrote:
The current 'master' has a compile time switch to enable reporting of the
time it takes to create a note-on event. This proved to be very revealing. 
On
my machine, a fairly average sound takes about 60uS for each note played.
Something like 'Master Synth' takes about 130uS. However, on odd occasions 
they
take three times a long!

It gets worse. Run the 'Out_There' demo files and it occasionally peaks a 
10x
as long. This simply has to be due to memory shuffling.

This evening I looked at the Adnote code (must be getting better, I didn't 
have
a panic attack) and for every note-on there are a bunch of 'new' directives
then value calculations/insertions. For each note-off there is the
corresponding bunch of 'delete'. To me, This seems quite wrong.

*warning* crazy bit coming up.

So, what if when loading an instrument to a part we do all the memory
allocations for notes up to the limit for that part (but no initialisation)?
This will take up a lot more memory than previously, but memory availability
continues to expand - and remember original Zyn was written when we were
talking in terms of memory sizes of 200-500 megabytes.  

I wonder, what order of magnitude in terms of RAM consumption would this 
generate (compared to now)? And what would the benefits be in terms of 
performance?

i.e. what's the c/b balance?

Lorenzo.

Very difficult to get a clear idea on this. Something like 150 floating point
variables are created for a single Addsynth voice note (not including LFO etc
inserts). This is more that SubSynth and PadSynth combined.

In theory you could have all 8 AddSynth voices + Sub and Pad. Then you could
have these in all 16 kit items, for all 64 parts and with note limits set for
60 per part. That would be in the region of 36Mb!

Whether such a monster would ever be playable on any exisiting CPU is another
matter of course :)

In practice, and on average, most AddSynth engines only use 2 voices. Mostly it
gets used with just one of the other engines and kits are just 2-3 items (apart
from drums). Personally I tend to average about 10 parts and very seldom change
the part note limits from the default 20. That gives us a far more reasonable
540k.

As for the benefits, you would be able to get much more out of the processor
without risk of occasional Xruns, as a note-on would never cause a memory
shuffle. It would make less difference to pure Sub or Pad notes as they do
far less dynamically.

-- 
Will J Godfrey
http://www.musically.me.uk
Say you have a poem and I have a tune.
Exchange them and we can both have a poem, a tune, and a song.
Yoshimi source code is available from either: 
http://sourceforge.net/projects/yoshimi
Or: https://github.com/Yoshimi/yoshimi
Our list archive is at: https://www.freelists.org/archive/yoshimi
To post, email to yoshimi@xxxxxxxxxxxxx

Other related posts: