Author Topic: Fast Chip Synth Engine Test 1  (Read 2674 times)

Pantheon

  • Guest
Fast Chip Synth Engine Test 1
« on: April 12, 2012, 12:57:07 pm »
Hi all,

I've been working for the last week on a chip tune synthesizer engine. My goal is to make it as efficient as possible
while still offering lots of nice music making features. So far all of the calculations are fixed point, and there are no conditionals in the inner loop of the synthesizers. It includes a small assembly like language to specify drum sounds, and is fully programmed to play midi. To compose a tune its as easy as loading a VST version into ableton live or any sequencer, writing the tune, then exporting all the midi for it. It decides what routines are best suited to the current piece of music to ensure minimal work.

On my 1ghz PC the program uses < 1% cpu, for all four synth channels and 1 drum channel. I'd love to know of a way to measure its efficiency on the Dingoo. If anyone has any tips on how to do that I would love to try it.

I compiled a test program playing a fairly complex piece of music I wrote for it. Oh yeah its compiled for the latest OpenDingux dev version.

Since Dingoonity doesn't like uploading Zip files, I renamed it as a .txt file. Just change that to .Zip, inside is just an executable, just run it and away you go.


pcercuei

  • ***
  • Posts: 1427
    • My devblog
Re: Fast Chip Synth Engine Test 1
« Reply #1 on: April 12, 2012, 02:42:48 pm »
On my 1ghz PC the program uses < 1% cpu, for all four synth channels and 1 drum channel. I'd love to know of a way to measure its efficiency on the Dingoo. If anyone has any tips on how to do that I would love to try it.

It eats less than 1% of the CPU on OD, and ~5% of the RAM. Good job!

At which rate does it play the samples?
« Last Edit: April 12, 2012, 02:51:20 pm by Ayla »

Pantheon

  • Guest
Re: Fast Chip Synth Engine Test 1
« Reply #2 on: April 12, 2012, 03:06:51 pm »
22050hz sample rate, mono output.
cool thanks for testing Ayla, thats some positive results :)

I'd be interested to know how you profiled it? is there a program for it or some feature of Linux that can give these stats?

pcercuei

  • ***
  • Posts: 1427
    • My devblog
Re: Fast Chip Synth Engine Test 1
« Reply #3 on: April 12, 2012, 03:59:10 pm »
Could you try with a 44100Hz sample rate?  ;D

I just launched it from gmenu2x and monitored its CPU consumption with htop from telnet. It's not very precise, but I can tell for sure it was not eating more than 1%.

Pantheon

  • Guest
Re: Fast Chip Synth Engine Test 1
« Reply #4 on: April 12, 2012, 05:09:14 pm »
I am about to head out of the house at the moment. Later on I'll recompile it at 44100hz and see how it goes.
At < 1% I can probably afford to output in stereo 8).

Pantheon

  • Guest
Re: Fast Chip Synth Engine Test 1
« Reply #5 on: April 13, 2012, 10:42:05 am »
Ok, I've recompiled at 44100. I actually made the sample rate selectable in the API. I think I can hear some buffer under running at 44100hz, so it will be interesting to see what profiling turns up. Also running htop on my laptop shows it uses %5 constant, but I have a feeling that is not accurate. Also a side effect of changing the sample rate is that the vibrato becomes twice as intense, so that will need sorting. I should also add some compression to the song data since there is a ton of repetition and wasted space there, that will be done in the future.

Same thing applies, rename muzplay44.txt to muzplay44.zip, etc...
I'll upload a few more songs for it at some point too.

pcercuei

  • ***
  • Posts: 1427
    • My devblog
Re: Fast Chip Synth Engine Test 1
« Reply #6 on: May 02, 2012, 12:46:28 am »
It eats ~8% of the CPU when underclocked to 48MHz  ;D