tffshtt

port LPC1343 polysynth to MBHP_CORE_STM32F4?

88 posts in this topic

There's this genius, ultra simple 16 voice, fully multitimbral, LPC1343 based synth called Goom concieved by Mark Owen:

 

It is written in assembler...so are there any assembler mad men out there that could port it to the MB core?  It is open source / Mark has granted permission for it to be ported.

 

Making it work on the MB core would be much easier for idiots like me to assemble (no SMD) and leave some nice processor headroom for things like LFOs / noise / filtermodes to be added.

 

If this seems like an outrageous / idiotic question please forgive me as I'm a microcontroller know-nothing...

Share this post


Link to post
Share on other sites

Just had a look into the source code - it shouldn't be so difficult to port this to MIOS32, I will check this next weekend. :)

 

Best Regards, Thorsten.

Share this post


Link to post
Share on other sites

Hi Thorsten,

 

If you do get a chance to look at it, may I send you the version Mark sent me, that makes goom fully controllable via MIDI? i.e. in the goom software downloadable from his website, MIDI channel 1 is reserved for the analog / panel controls.  Gruss aus Berlin, Justin

Share this post


Link to post
Share on other sites

Hi Justin,

 

I don't know when a weekend starts at your side... ;-)

However, here the quick&dirty migration: http://svnmios.midibox.org/listing.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Fsynthesizers%2Fgoom%2F

 

I expect that somebody else takes over the maintenance of this code, especially whenever Marks is doing updates.

 

The code is taken from his website, it seems that sound parameters can be updated via Chn1 - at least I get some sounds when setting some CCs and playing notes.

 

Best Regards, Thorsten.

Share this post


Link to post
Share on other sites

Hi Thorsten,

Totally amazing, thanks...

sorry, sorry, sorry if I came across as being pushy / impatient... definitely not my  intention.  I greatly appreciate your efforts...

If you find yourself in Berlin, beer is on me! 

As far as I can tell Mark won't be making any updates, which is another reason I thought it most excellent to be able to use Goom with the NG.

Embarking now on the mission to build....

 

Cheers,

justin

Edited by tffshtt

Share this post


Link to post
Share on other sites

I tried this out yesterday with success. You could run this on a STM32F4 discovery board without the Core board and control it via USB MIDI to test it out.

Share this post


Link to post
Share on other sites

@Rowan
Thanks so much for the tip!

Edited by tffshtt

Share this post


Link to post
Share on other sites

OK.  Got a st32f4 discovery board, installed the bootloader and I can see it in MIOS studio...

is there a step by step for dummies on what to do next?

(i.e. how to download the code Thorsten posted and put it on the board so I can send it some MIDI notes/CC messages and hear something from the output) 

many thanks ;)

Share this post


Link to post
Share on other sites

You need to compile the application as TK has only posted the source code.

 

Rather than make you jump through hoops jut to try it out, attached it the application I compiled a few days ago.

project.hex

Edited by Rowan

Share this post


Link to post
Share on other sites

@Rowan

Ha! I knew I was missing something! THANKS!

Share this post


Link to post
Share on other sites

WOW this thing is FUN!  THanks so much to the both of you! Video coming soon...

Share this post


Link to post
Share on other sites

Does this theoretically have double the polyphony seeing as the stm32f4 has twice the CPU power?

Share this post


Link to post
Share on other sites

@sneakthief

I think so!  I am a no-good programmer, so I unfortunately I can't do anything like that.  I'd be interested in adding a small mod matrix/ LFO / filter modes with all that overhead.  The F4 also opens up the possibility for floating point calculations, but I think that would involve a major rewrite.

Share this post


Link to post
Share on other sites
Does this theoretically have double the polyphony seeing as the stm32f4 has twice the CPU power?

What i understand is If the code was changed to make use of the FPU of the M3 even more headroom is possible.

Edited by Shuriken

Share this post


Link to post
Share on other sites

n00b question here:

If possible could someone with write access change the following in the code Thorsten posted?

Mark metioned that since Thorsten brought the sampling rate up to 48kHz, for the tuning to be correct (A=440hz), the line in setfreqvol() and two other places:

u-=287; // constant to give correct tuning for sample rate: log((72e6/2048)/(440*2^-0.75)/128)/log(2)*4096 for A=440Hz

should be:

u-=2127; // constant to give correct tuning for sample rate: log((48000)/(440*2^-0.75)/128)/log(2)*4096 for A=440Hz

@sneakthief

He also mentioned for Goom to be reliable with 32 voices it would probably have to be brought back down to the original (LPC 72Mhz/2048 =) ~35.1kHz range and recommended simply building a second Goom if 16 additional voices are required.

Edited by tffshtt

Share this post


Link to post
Share on other sites

I adapted the sample rate so that it matches with the original project.

This is probably the better way anyhow, e.g. to get equal envelope slope times.

 

Currently the waveform calculation takes 35 uS on a STM32F4, it's triggered each 113 uS, which means that the CPU is only loaded by ca. 30%

 

However, I'm not planning to extend the synth from my side, I only did the adaption in order to allow somebody else to take this as a basis for further developments. :smile:

 

A prebuild binary is now on the server as well (-> release/STM32F407VG/project.hex)

 

You can download the files with a subversion client (google for good clients which are provided for your preferred OS)

Once you installed the client, take following URL: svn://svnmios.midibox.org/mios32

Alternatively check this page how to install the toolchain, so that you are able to build the firmware by yourself: http://www.ucapps.de/mios32_c.html

 

Best Regards, Thorsten.

Share this post


Link to post
Share on other sites

Thanks Thorsten!

 

So do I understand correctly that you changed the sampling rate to ~35.1kHz? (EDIT: oops just saw in the comments that this *is* the case)

If that's the case I might put the newer build on the second discovery board I bought and do a sound comparison...

30% CPU load is a nice low number...

I understand about someone else extending the code... maybe that could be me (that damn medieninformatik degree should be good for something, right?) but I'm not very confident in my programming /trouble shooting skills.  This is going to sound super nerdy but this is all an over obsessed fantasy come true for me. Size, sound, cost and ease of programming (both 'good' and 'bad' sounds) are all excellent.

 

Next tests will be through a stereo analog filter to see if I can chop an expensive analog down to size with the goom.

Edited by tffshtt

Share this post


Link to post
Share on other sites

The last part should be no problem considering synths like Shruthi or Ambika.

Share this post


Link to post
Share on other sites

@Shuriken

yes, I'll be interested to see how it compares to hybrids like the ambika.  I had one and liked it.  The filters are excellent (Andre at tubeohm is hopefully building me an MI 'filterbank' type thingy at the end of this year) but there were two things that I found exceedingly annoying.  The MIDI implementation is pants (signed NRPN all over the place and you have to calculate it all yourself) and so were the 8 bit CVs which cutoff my nice legato notes at the end.  The rest of it was great but those annoyances plus not using about 85% of the parameters made me sell it.  The first goom test with analog will just be audio through the Evolver which has a decent stereo filter.

Share this post


Link to post
Share on other sites

Thanks Thorsten!

I thought about getting a client but realized

terminal >

svn checkout svn://svnmios.midibox.org/mios32/trunk/apps/synthesizers/goom/

is super easy...even worked for a dummy like me!

Share this post


Link to post
Share on other sites

Apologies for hijacking a little this fantastic little thread here!

I am wanting to integrate the goom and the midibox seq v4 into a single instrument ...

(possibly would like to add a second goom so that all the four midi channels would have separate voices...- or even better, four gooms running simutaneously ...)...

 

would be building a bespoke front panel integrating controls for both ....

 

... can i integrate the code for running the goom(s) and the seqV4 onto one CORE_STM32F4 Module ?

... possible? crazy?

...thankyou thorsten for amazing work ... jez

...

 

....

Share this post


Link to post
Share on other sites
... can i integrate the code for running the goom(s) and the seqV4 onto one CORE_STM32F4 Module ?

... possible? crazy?

No, this is not possible.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now