| Author |
Message |
BobTheDog

Joined: Feb 28, 2005 Posts: 4044 Location: England
Audio files: 32
G2 patch files: 15
|
Posted: Mon Oct 12, 2009 8:23 am Post subject:
|
 |
|
Yep you are absolutely correct.
I have just re-read my posts and they are a bit arsey, sorry about that.
I know it is no excuse but I have been having a bad day/week/month.
Bloody computers!
Andy |
|
|
Back to top
|
|
 |
purusha
Joined: Mar 13, 2008 Posts: 131 Location: Ilkley
|
|
|
Back to top
|
|
 |
blue hell
Site Admin

Joined: Apr 03, 2004 Posts: 24505 Location: The Netherlands, Enschede
Audio files: 298
G2 patch files: 320
|
Posted: Mon Oct 12, 2009 8:47 am Post subject:
|
 |
|
| BobTheDog wrote: | | Bloody computers! |
Probably just red paint .. no ?
It has been said that for multicore DSP a good C compiler will outperform hand coded assembly ... but I'm a noob you can fool me with anything there  _________________ Jan
also .. could someone please turn down the thermostat a bit.
 |
|
|
Back to top
|
|
 |
purusha
Joined: Mar 13, 2008 Posts: 131 Location: Ilkley
|
Posted: Mon Oct 12, 2009 8:51 am Post subject:
|
 |
|
In development time and portability terms - almost certainly: yes.
 _________________ OVNI Soundcloud Purusha Soundcloud |
|
|
Back to top
|
|
 |
DrJustice

Joined: Sep 13, 2004 Posts: 2112 Location: Morokulien
Audio files: 4
|
Posted: Mon Oct 12, 2009 8:53 am Post subject:
|
 |
|
Not trying to be contrary, but although compilers written specifically for DSPs may turn out good enough code in most instances, I have yet to see one that exploits multifunction instructions really well, combined with interleaving parts of an algorithm to avoid result delays and pipeline stalls and also using peculiar data orderings to avoid unnecessary address register manipulation. That's what makes DSP coding fun; when you look at your code and can see how it exploits every clock tick, every register and every datapath with not a gram of fat - but hey, I'm kinda old school...
| purusha wrote: | | The FFT algorithms themselves are purely based on arithmetic, not addressing mechanisms. |
Surely the bit reversed address generators in DSPs are all about addressing issues in FFTs.
Of course, as purusha mentions, when coding C for DSPs you'll for a large part call library routines that are hand optimized. I haven't checked out if the latest compilers support SIMD instructions through intrinsics, I assume they offer something in that area.
However, I do suspect that the audio algorithms in DSP based synths are hand coded assembly - they often do impressive amounts of work compared to the DSP power at hand (e.g. 32 voice Virus C on a single 56k), and there's a tradition to uphold
DJ
-- |
|
|
Back to top
|
|
 |
purusha
Joined: Mar 13, 2008 Posts: 131 Location: Ilkley
|
Posted: Mon Oct 12, 2009 9:02 am Post subject:
|
 |
|
| DrJustice wrote: | | Surely the bit reversed address generators in DSPs are all about addressing issues in FFTs. |
I guess it depends on the architecture and whether or not the compiler can pull tricks to generate the proper code. To be honest, I only know TMS320 in any depth and didn't have any issues like that IIRC.
I'd have thought that kind of thing could be modularised though? Wrapper functions for making sure things are in the right format - that kind of thing? _________________ OVNI Soundcloud Purusha Soundcloud |
|
|
Back to top
|
|
 |
BobTheDog

Joined: Feb 28, 2005 Posts: 4044 Location: England
Audio files: 32
G2 patch files: 15
|
Posted: Mon Oct 12, 2009 9:31 am Post subject:
|
 |
|
How does the compiler understand a high level algorithm though?
Years ago there was some compiler that recognised the Sieve of Eratosthenes algorithm code and output highly optimised code which they then used in their marketing blurb to show how good their optimiser was!
I think it may have been Borland. |
|
|
Back to top
|
|
 |
purusha
Joined: Mar 13, 2008 Posts: 131 Location: Ilkley
|
Posted: Mon Oct 12, 2009 9:44 am Post subject:
|
 |
|
I guess to do it properly, standard algorithms would be optimised for a subset of platforms.
A nice solution would be to have a library which kept the same API, but used platform specific optimised code for the algorithm.
BTW - It's not unusual for VST plug-in manufacturers to take algorithms from hardware DSP based platforms and port to native. Often they don't sound identical because of the different methods used to make calculations, but it does appear to be possible.
An example off-the-top-of-my-head, Sonnox?
Edit: this just been mentioned elsewhere too:
http://www.youtube.com/watch?v=a9rJzngpjDY&feature%20=channel&fmt=18
BTW - the "old school" optimisation reference has me remembering the days when I was writing ZX81 games in 1K. That 1K was also used for video RAM, so the more code you wrote, the smaller the screen had to get! Certainly honed your Z80 skillz  _________________ OVNI Soundcloud Purusha Soundcloud |
|
|
Back to top
|
|
 |
DrJustice

Joined: Sep 13, 2004 Posts: 2112 Location: Morokulien
Audio files: 4
|
Posted: Mon Oct 12, 2009 10:31 am Post subject:
|
 |
|
| purusha wrote: | | DrJustice wrote: | | Surely the bit reversed address generators in DSPs are all about addressing issues in FFTs. |
I guess it depends on the architecture and whether or not the compiler can pull tricks to generate the proper code. To be honest, I only know TMS320 in any depth and didn't have any issues like that IIRC.
I'd have thought that kind of thing could be modularised though? Wrapper functions for making sure things are in the right format - that kind of thing? |
Well, it's exactly data copying and/or reordering one wants to avoid. I just had a quick search for compiler intrinsics supporting address generators (bit reversal, modulo, circular) and such, and it seems there's a lot of that nowadays, which makes it more feasible to write e.g. an efficient FFT in C. BTW, my experiences are based on 56k and AD SHARCs and fixed point DSPs
DJ
-- |
|
|
Back to top
|
|
 |
purusha
Joined: Mar 13, 2008 Posts: 131 Location: Ilkley
|
Posted: Mon Oct 12, 2009 10:41 am Post subject:
|
 |
|
Agreed, you don't want to have to re-order by buffer duplication and transformation etc. if you can help it. However, if there's a necessity due to architectural limitations and you can do it whilst staying within the performance requirements...
It sounds like we're talking about a necessity for re-ordering for an algorithm that's beyond my experience though. The DSP algorithms I used were pretty basic and off-the-shelf. I wasn't doing audio DSP work, it was motor monitoring and control. There wasn't much optimisation for us on that job, the DSP had enough grunt to do the job without getting our hands too dirty.
I'm more of a real-time OS guy than a FFT maths type.
 _________________ OVNI Soundcloud Purusha Soundcloud |
|
|
Back to top
|
|
 |
BobTheDog

Joined: Feb 28, 2005 Posts: 4044 Location: England
Audio files: 32
G2 patch files: 15
|
Posted: Mon Oct 12, 2009 12:08 pm Post subject:
|
 |
|
| Blue Hell wrote: | | BobTheDog wrote: | | Bloody computers! |
Probably just red paint .. no ?
It has been said that for multicore DSP a good C compiler will outperform hand coded assembly ... but I'm a noob you can fool me with anything there  |
You a Noob!
I am not sure that the C compiler is doing the real work here though.
For instruction level parallelism compilers written by the chip manufacturer do an extremely good job, but for data parallelism it is pretty hard for a compiler to produce parallel code for anything non-trivial without hints from the programmer.
If I knock out a bit of complex serial C code it is hard for a compiler to work out data dependencies and to split the algorithm into the most efficient number of concurrent sub-tasks and to manage the critical path ordering of these sub-tasks based usually on a smaller number of concurrent processing units.
Also the compiler would need some understanding of shared memory cost between these units, for instance the cache between cores is going to be more efficient that shared memory between processors which is more efficient than between machines in a cluster.
Then it has to deal with synchronisation problems to certain resources, it is all starting to look pretty complicated to do a good job.
So you have to start looking at extension to C that allow the programmer to tell the compiler how to distribute processing, these allow you to declare blocks of processing and relationships between them, UPC is an example of this. |
|
|
Back to top
|
|
 |
blue hell
Site Admin

Joined: Apr 03, 2004 Posts: 24505 Location: The Netherlands, Enschede
Audio files: 298
G2 patch files: 320
|
Posted: Mon Oct 12, 2009 2:07 pm Post subject:
|
 |
|
| BobTheDog wrote: | | You a Noob! |
I used to be good at compiler building when I was at uni, but I didn't pay attention really for the last 25 odd years ... all the multiple data / instruction issues were just remarks then ... DSP was barely touched ... but I guess the dragon book still has some useful tricks these days.
What is UPC ... ah ... http://en.wikipedia.org/wiki/Unified_Parallel_C ... reading up now. _________________ Jan
also .. could someone please turn down the thermostat a bit.
 |
|
|
Back to top
|
|
 |
cappy2112

Joined: Dec 24, 2004 Posts: 2500 Location: San Jose, California
Audio files: 2
G2 patch files: 1
|
Posted: Mon Oct 12, 2009 8:40 pm Post subject:
|
 |
|
| purusha wrote: |
BTW - the "old school" optimisation reference has me remembering the days when I was writing ZX81 games in 1K. That 1K was also used for video RAM, so the more code you wrote, the smaller the screen had to get! Certainly honed your Z80 skillz  |
I have a great documentary about Atari- in the early days, on DVD.
There are interviews with the programmers who wrote the games for the 2600. They had to write the game logic, the graphics I/O (while maintaining refresh rates), the sound fx (while still maintaining video refresh rates).
Some of those programmers got several hundred thousand dollar bonuses, in the early 80's, for the top-selling games !!!!!!!!!!!!!!!!! _________________ Free Tibet. Release the Panchen Lama from prison. Let the Dalai Lama return to his home. |
|
|
Back to top
|
|
 |
Chet

Joined: Nov 19, 2004 Posts: 231 Location: Lititz,PA,USA
Audio files: 7
G2 patch files: 35
|
Posted: Tue Oct 13, 2009 9:43 am Post subject:
|
 |
|
| buzzr wrote: | Right now I'm using the G2 with Reaktor and having some very good results.
Maybe Reaktor will be updated.......HA! |
Heh, I agree that Reaktor's overdue for an update. But it still has some life in it. I'm building a collection of Reaktor macros right now in an attempt to mimic the style and operation of the G2 modules. I've got another dozen or so modules to finish, and then I'll submit it to the Reaktor user library.
I'd add a picture of it, but I got a message saying "Sorry, you have reached your maximum Upload Quota Limit of 20 MB". |
|
|
Back to top
|
|
 |
blue hell
Site Admin

Joined: Apr 03, 2004 Posts: 24505 Location: The Netherlands, Enschede
Audio files: 298
G2 patch files: 320
|
Posted: Tue Oct 13, 2009 10:26 am Post subject:
|
 |
|
| Chet wrote: | | I got a message saying "Sorry, you have reached your maximum Upload Quota Limit of 20 MB". |
I raised your limit Chet and would love to see the picture  _________________ Jan
also .. could someone please turn down the thermostat a bit.
 |
|
|
Back to top
|
|
 |
Chet

Joined: Nov 19, 2004 Posts: 231 Location: Lititz,PA,USA
Audio files: 7
G2 patch files: 35
|
|
|
Back to top
|
|
 |
dorremifasol

Joined: Sep 28, 2006 Posts: 823 Location: Barcelona, Spain
Audio files: 7
G2 patch files: 49
|
Posted: Tue Oct 13, 2009 10:38 am Post subject:
|
 |
|
Wow, that looks pretty nice  _________________ Cheers,
Albert |
|
|
Back to top
|
|
 |
blue hell
Site Admin

Joined: Apr 03, 2004 Posts: 24505 Location: The Netherlands, Enschede
Audio files: 298
G2 patch files: 320
|
Posted: Tue Oct 13, 2009 10:40 am Post subject:
|
 |
|
Thanks! looks good! _________________ Jan
also .. could someone please turn down the thermostat a bit.
 |
|
|
Back to top
|
|
 |
BobTheDog

Joined: Feb 28, 2005 Posts: 4044 Location: England
Audio files: 32
G2 patch files: 15
|
Posted: Tue Oct 13, 2009 10:53 am Post subject:
|
 |
|
| Beatless Chords sounds interesting, what does that do then? |
|
|
Back to top
|
|
 |
Chet

Joined: Nov 19, 2004 Posts: 231 Location: Lititz,PA,USA
Audio files: 7
G2 patch files: 35
|
Posted: Tue Oct 13, 2009 11:18 am Post subject:
|
 |
|
| BobTheDog wrote: | | Beatless Chords sounds interesting, what does that do then? |
It makes minor adjustments to pitches, converting equal temperament to just intonation. You choose a root key, and when you play chords some of them (I, IV, V, IIIm, VIm, etc.) do not beat. It’s an unusual sound for those of us accustomed to hearing equal temperament-based music. It’s especially useful for crunching guitars and overdriven organs, because major chords don't sound muddy. |
|
|
Back to top
|
|
 |
BobTheDog

Joined: Feb 28, 2005 Posts: 4044 Location: England
Audio files: 32
G2 patch files: 15
|
Posted: Tue Oct 13, 2009 11:20 am Post subject:
|
 |
|
Thanks for the info, it all looks fun.
I look forward to a play. |
|
|
Back to top
|
|
 |
buzzr
Joined: Dec 13, 2007 Posts: 360 Location: portland
Audio files: 1
G2 patch files: 1
|
Posted: Tue Oct 13, 2009 4:44 pm Post subject:
|
 |
|
Looks nice Chet! You're giving Bantri a run for his money
In the meantime I'm investing in a doepfer... |
|
|
Back to top
|
|
 |
Chet

Joined: Nov 19, 2004 Posts: 231 Location: Lititz,PA,USA
Audio files: 7
G2 patch files: 35
|
Posted: Tue Oct 13, 2009 8:48 pm Post subject:
|
 |
|
| buzzr wrote: | Looks nice Chet! You're giving Bantri a run for his money
In the meantime I'm investing in a doepfer... |
Oh, I'm not attempting anything as difficult as Bantri is. I'm making an imitation, not a copy. He's actually going to emulate 24-bit integer math in Reaktor (egads!), while I'm content to paste in stock oscillators and filters.  |
|
|
Back to top
|
|
 |
Unfed
Joined: May 11, 2004 Posts: 200 Location: Rochester, NY
Audio files: 4
G2 patch files: 11
|
Posted: Tue Oct 13, 2009 9:50 pm Post subject:
|
 |
|
| Chet wrote: | | Great! Here it is. |
absolutely fantastic, looking forward to it! i'm actually more interested in something like this than what Bantri is doing. we'll see how this works out as far as patching. not sure exactly what it entails, pretty exciting though! _________________ SoundCloud |
|
|
Back to top
|
|
 |
Chet

Joined: Nov 19, 2004 Posts: 231 Location: Lititz,PA,USA
Audio files: 7
G2 patch files: 35
|
|
|
Back to top
|
|
 |
|