MARF 248r source code available

Buchla, Serge, Studio.h, Northern Light Modular, Keen Assoc., 1979, Vedic Scapes, etc. Banana systems
Be sure to look into MANUFACTURER SUB-FORA as well..

Moderators: Kent, luketeaford, Joe.

Post Reply
User avatar
stevenb
Common Wiggler
Posts: 153
Joined: Wed Dec 18, 2013 11:16 pm
Location: Nirvana Silly, California
Contact:

Re: MARF 248r source code available

Post by stevenb » Wed Apr 01, 2020 10:33 pm

Sounds like you don't have an oscillosope?
E3C790EC-688F-4658-A8F8-1332C793792E.jpeg

tele_player
Wiggling with Experience
Posts: 341
Joined: Fri Feb 15, 2019 10:50 am
Location: Sacramento

Re: MARF 248r source code available

Post by tele_player » Thu Apr 02, 2020 12:33 am

Oops, my mistake.

jimfowler
Ultra Wiggler
Posts: 914
Joined: Mon Feb 22, 2016 1:13 pm
Location: New York
Contact:

Re: MARF 248r source code available

Post by jimfowler » Thu Apr 02, 2020 6:53 am

From Zoolander
Attachments
EADB84A0-744C-4F44-8F10-8E17E8574CB5.png
EADB84A0-744C-4F44-8F10-8E17E8574CB5.png (43.34 KiB) Viewed 1902 times

tele_player
Wiggling with Experience
Posts: 341
Joined: Fri Feb 15, 2019 10:50 am
Location: Sacramento

Re: MARF 248r source code available

Post by tele_player » Thu Apr 02, 2020 9:23 am

Since the jittery analog output is caused by sloppy ADC values, If I may make 2 code suggestions:
1) verify whether MUX switching is corrupting some/most/all ADC reads. Correct as needed.
2) replace 10 element moving average arrays with a weighted moving average, using a multiplier that can be much higher than 10. 40k samples/sec is way way more than required for a good user experience. Additional advantages of simplicity and reduced memory usage.

These suggestions are what I was getting at with my earlier questions. It’s not my intention to step on anybody’s toes, just some ideas I’d try if I had a MARF here.

User avatar
cygmu
Super Deluxe Wiggler
Posts: 1770
Joined: Mon Feb 15, 2016 3:33 pm
Location: UK

Re: MARF 248r source code available

Post by cygmu » Thu Apr 02, 2020 10:24 am

tele_player wrote:
Thu Apr 02, 2020 9:23 am
40k samples/sec is way way more than required for a good user experience.
There are 40 pots being MUXed so each one is read at 1kHz, which is a common sample rate for CV and I guess that's why it was chosen. I am sure that going a bit slower would be ok, but not a factor of ten for example -- you'll hear steps as you slide the sliders.

But yeah, some careful examination of what is going on and some experimentation with the software filtering is definitely in order. I'd be surprised if it can't at least be improved.

tele_player
Wiggling with Experience
Posts: 341
Joined: Fri Feb 15, 2019 10:50 am
Location: Sacramento

Re: MARF 248r source code available

Post by tele_player » Thu Apr 02, 2020 11:27 am

I think you’d be surprised. I just tested this method of averaging using an Axoloti.
High values of weighted average don’t cause stepping, they cause lag. Try it.

For instance, Axoloti reads the pots 3000 times a second, using the STM32F4 ADC. Using a weighted average with a factor of 100 works very well to clean up the analog values.

To be clear, here’s how it looks, in C pseudo code:

avg = ( (avg*99)+adc_value )/ 100

The actual factor chosen is a trade off of lag vs noise.
Last edited by tele_player on Thu Apr 02, 2020 11:45 am, edited 1 time in total.

maxl0rd
Wiggling with Experience
Posts: 303
Joined: Mon Aug 05, 2013 1:51 pm

Re: MARF 248r source code available

Post by maxl0rd » Thu Apr 02, 2020 11:39 am

Yes, an exponential filter/ewma is a good approach. Both more flexible and more efficient than averaging.

User avatar
cygmu
Super Deluxe Wiggler
Posts: 1770
Joined: Mon Feb 15, 2016 3:33 pm
Location: UK

Re: MARF 248r source code available

Post by cygmu » Thu Apr 02, 2020 11:44 am

I see what you mean now. I believe that is a one-pole IIR filter, right?

Anyway, yes: I think it is worth experimenting with that and also with a two-pole. Some Mutable instruments modules use the same MCU, use the on-board ADCs with MUXing, no hardware filtering, and either one or two-pole filters like this, and seem to work quite happily. Of course there may be more trouble lurking in the hardware here but there is reason to believe that we can do better.

thombet
Common Wiggler
Posts: 54
Joined: Tue Jul 08, 2014 2:42 pm
Location: belgium
Contact:

Re: MARF 248r source code available

Post by thombet » Mon May 04, 2020 8:12 am

Wow great work you guys are doing here! many thanks for the effort!

i tried to download version 2.5a8. but my programmer cant run the .bin extension. Is there a .hex available?

thanks

thomas B
stevenb wrote:
Fri Mar 27, 2020 1:46 pm
cygmu wrote:
Fri Mar 27, 2020 3:17 am
PacificState wrote:
Fri Mar 27, 2020 2:28 am
Thanks so much for making this available! I've just built my MARF and flashed the latest version of the firmware down.

One thing, though - I can't seem to enter the calibration mode; if I turn on the power holding the left advance switch down, I don't get cycling LEDs. I'm not super familiar with the unit, but it otherwise appears to be working (including the advance switch itself) - any ideas?
Mine is the same -- glad to hear I am not the only one.

I think there's a bug in the code and I'm discussing with Steven and Max.
Calibration is now fixed, again :-) MARF v2.5a8 for your testing pleasure...

MARF v2.5a8.bin.zip

Steven

User avatar
stevenb
Common Wiggler
Posts: 153
Joined: Wed Dec 18, 2013 11:16 pm
Location: Nirvana Silly, California
Contact:

Re: MARF 248r source code available

Post by stevenb » Mon May 04, 2020 5:05 pm

thombet wrote:
Mon May 04, 2020 8:12 am
Wow great work you guys are doing here! many thanks for the effort!

i tried to download version 2.5a8. but my programmer cant run the .bin extension. Is there a .hex available?

thanks

thomas B
stevenb wrote:
Fri Mar 27, 2020 1:46 pm
cygmu wrote:
Fri Mar 27, 2020 3:17 am
PacificState wrote:
Fri Mar 27, 2020 2:28 am
Thanks so much for making this available! I've just built my MARF and flashed the latest version of the firmware down.

One thing, though - I can't seem to enter the calibration mode; if I turn on the power holding the left advance switch down, I don't get cycling LEDs. I'm not super familiar with the unit, but it otherwise appears to be working (including the advance switch itself) - any ideas?
Mine is the same -- glad to hear I am not the only one.

I think there's a bug in the code and I'm discussing with Steven and Max.
Calibration is now fixed, again :-) MARF v2.5a8 for your testing pleasure...

MARF v2.5a8.bin.zip

Steven
Hi thomas, what programmer are you using? What is the failure like? What version of firmware are you currently running?

Steven

thombet
Common Wiggler
Posts: 54
Joined: Tue Jul 08, 2014 2:42 pm
Location: belgium
Contact:

Re: MARF 248r source code available

Post by thombet » Tue May 05, 2020 2:51 am

Hi steven

i'm using the stm32cubeprogrammer for mac. it says i cant open .bin files all the other versions where in .hex when i extracted them from the zip file you shared.

thombet
Common Wiggler
Posts: 54
Joined: Tue Jul 08, 2014 2:42 pm
Location: belgium
Contact:

Re: MARF 248r source code available

Post by thombet » Tue May 05, 2020 3:05 am

I tested the V2,5 a6 but that did not work for me. I started to look for soldershorts but instead i found some ground shorts on some chips of the motherboard.

IC 13 sn74hc165 Pin 14 shorts to ground this is weird cause al the other SN74HC165 CHIPS has their Pin 14 run to the switches, IC 13 has this run too but also shorts to ground.
IC 16 sn74hc165 Pin 12 shorts to ground i don't know why.

IC 19/21 TL074CN Pin 12/10/5 shorts to ground on the 2 ic's?

is this normal? i can't get my head arround it..

any help is usefull because my MARF is pretty unuseable right now. it only works when all the pots are fully counterclock wise.
i returnd to the old firmware cause the V2,5a 6 didn't give me the calibration mode

cheers

tele_player
Wiggling with Experience
Posts: 341
Joined: Fri Feb 15, 2019 10:50 am
Location: Sacramento

Re: MARF 248r source code available

Post by tele_player » Tue May 05, 2020 9:33 am

thombet wrote:
Tue May 05, 2020 2:51 am
Hi steven

i'm using the stm32cubeprogrammer for mac. it says i cant open .bin files all the other versions where in .hex when i extracted them from the zip file you shared.
The 'bin to hex' converter is probably installed on your Mac somewhere. I googled "bin to hex Mac" and one of the responses had this command for doing the conversions:

arm-none-eabi-objcopy -I binary -O ihex filename.bin filename.hex

So, on my Mac, I have several ARM toolchains installed. From my home directory, I did the following to locate the program:

find . -name arm-none-eabi-objcopy

User avatar
stevenb
Common Wiggler
Posts: 153
Joined: Wed Dec 18, 2013 11:16 pm
Location: Nirvana Silly, California
Contact:

Re: MARF 248r source code available

Post by stevenb » Tue May 05, 2020 11:14 am

tele_player wrote:
Tue May 05, 2020 9:33 am
thombet wrote:
Tue May 05, 2020 2:51 am
Hi steven

i'm using the stm32cubeprogrammer for mac. it says i cant open .bin files all the other versions where in .hex when i extracted them from the zip file you shared.
The 'bin to hex' converter is probably installed on your Mac somewhere. I googled "bin to hex Mac" and one of the responses had this command for doing the conversions:

arm-none-eabi-objcopy -I binary -O ihex filename.bin filename.hex

So, on my Mac, I have several ARM toolchains installed. From my home directory, I did the following to locate the program:

find . -name arm-none-eabi-objcopy
Pretty slick, tele_player . I like that.
Sorry Thomas, I'll post a .hex file next release

Steven

thombet
Common Wiggler
Posts: 54
Joined: Tue Jul 08, 2014 2:42 pm
Location: belgium
Contact:

Re: MARF 248r source code available

Post by thombet » Tue May 05, 2020 5:49 pm

turns out there was ground problems because of flux...

well i cleanded everything for the 3th time and it al works like a V2 should work.

now off for some testing of the new 2,5 A6 en A8. Thanks for the tip Tele_player.
thombet wrote:
Tue May 05, 2020 3:05 am
I tested the V2,5 a6 but that did not work for me. I started to look for soldershorts but instead i found some ground shorts on some chips of the motherboard.

IC 13 sn74hc165 Pin 14 shorts to ground this is weird cause al the other SN74HC165 CHIPS has their Pin 14 run to the switches, IC 13 has this run too but also shorts to ground.
IC 16 sn74hc165 Pin 12 shorts to ground i don't know why.

IC 19/21 TL074CN Pin 12/10/5 shorts to ground on the 2 ic's?

is this normal? i can't get my head arround it..

any help is usefull because my MARF is pretty unuseable right now. it only works when all the pots are fully counterclock wise.
i returnd to the old firmware cause the V2,5a 6 didn't give me the calibration mode

cheers

thombet
Common Wiggler
Posts: 54
Joined: Tue Jul 08, 2014 2:42 pm
Location: belgium
Contact:

Re: MARF 248r source code available

Post by thombet » Wed May 06, 2020 4:23 pm

thanks Steven!

stevenb wrote:
Tue May 05, 2020 11:14 am

Pretty slick, tele_player . I like that.
Sorry Thomas, I'll post a .hex file next release

Steven

User avatar
stevenb
Common Wiggler
Posts: 153
Joined: Wed Dec 18, 2013 11:16 pm
Location: Nirvana Silly, California
Contact:

Re: MARF 248r source code available

Post by stevenb » Sat May 09, 2020 10:33 am

Hi,
This is to let you know that there is a new beta release of MARFv2.5 firmware available for you to download. Give it a go. As always feedback is appreciated.
Here is the file:

MARF_v2.5b3.hex.zip
(23.49 KiB) Downloaded 60 times

MARF v2.5b3 release notes

Bug Fixes:


1) Fixed a bug in Calibration where external input for Stage Address 2 on AFG2 wasn’t being calibrated.

2) Fixed a bug where 1st stage after Enabled stage causing a stop, was not firing its Programmed Pulse

3) Fixed a bug where 1st stage after Sustained stage causing a stop, was not firing its Programmed Pulse

4) Programmed Pulses on stages that were selected by External Stage Address input were firing late

5) Interval Time slider settings are now recalled with preset recall

6) Improved Quantization behavior.

Enhancements: 

1) Implemented a new slider value averaging scheme. It isn’t perfect, but it is far better than what was there before. Voltage output is now considerably more stable than it was.

2) Improved slider catchup performance. If you load a preset ,moving the slider past its preset value will activate slider and values will be set properly.

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks to maxl0rd, cygmu, Dave Brown, and PacificState for invaluable development time and in general being awesome.
Thanks to jimfowler and Fuzz for testing support.

Steven

tele_player
Wiggling with Experience
Posts: 341
Joined: Fri Feb 15, 2019 10:50 am
Location: Sacramento

Re: MARF 248r source code available

Post by tele_player » Sat May 09, 2020 11:14 am

Is source code for this version available for examination?

User avatar
stevenb
Common Wiggler
Posts: 153
Joined: Wed Dec 18, 2013 11:16 pm
Location: Nirvana Silly, California
Contact:

Re: MARF 248r source code available

Post by stevenb » Sat May 09, 2020 12:00 pm

tele_player wrote:
Sat May 09, 2020 11:14 am
Is source code for this version available for examination?
Yes, it's available on the git repository at:
https://github.com/wir35/marf/tree/v2.5

Steven

thombet
Common Wiggler
Posts: 54
Joined: Tue Jul 08, 2014 2:42 pm
Location: belgium
Contact:

Re: MARF 248r source code available

Post by thombet » Sat May 09, 2020 1:08 pm

Wow some big improvements!

trying it out tonight!

thanks!
stevenb wrote:
Sat May 09, 2020 10:33 am
Hi,
This is to let you know that there is a new beta release of MARFv2.5 firmware available for you to download. Give it a go. As always feedback is appreciated.
Here is the file:


MARF_v2.5b3.hex.zip


MARF v2.5b3 release notes

Bug Fixes:


1) Fixed a bug in Calibration where external input for Stage Address 2 on AFG2 wasn’t being calibrated.

2) Fixed a bug where 1st stage after Enabled stage causing a stop, was not firing its Programmed Pulse

3) Fixed a bug where 1st stage after Sustained stage causing a stop, was not firing its Programmed Pulse

4) Programmed Pulses on stages that were selected by External Stage Address input were firing late

5) Interval Time slider settings are now recalled with preset recall

6) Improved Quantization behavior.

Enhancements: 

1) Implemented a new slider value averaging scheme. It isn’t perfect, but it is far better than what was there before. Voltage output is now considerably more stable than it was.

2) Improved slider catchup performance. If you load a preset ,moving the slider past its preset value will activate slider and values will be set properly.

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks to maxl0rd, cygmu, Dave Brown, and PacificState for invaluable development time and in general being awesome.
Thanks to jimfowler and Fuzz for testing support.

Steven

tildetilde
Learning to Wiggle
Posts: 4
Joined: Mon Apr 13, 2020 12:14 pm

Re: MARF 248r source code available

Post by tildetilde » Wed May 20, 2020 11:12 am

Hello all!!

I spent all day yesterday trying to update the firmware on my MARF and am wondering if you guys have any suggestions.. 

I've got the software (STM32 CubeProgrammer) installed and running on my mac, and connected the two pins on the STM32 card on the marf (I soldered them to a little chopped-off bit of a resistor as per my friend Charles's suggestion -- the module now won't power up, which he says is good and means it's in firmware mode) -- but when I run through the instruction sin the MARF manual it says: 

21:29:16 : ST-LINK error (DEV_USB_COMM_ERR)
21:29:16 : Error: Problem occured while trying to connect

Any ideas?? I'm pretty sure I have the right Java installed (the program wouldn't run otherwise, right?) but running out of ideas of what else it might be... 

Bill Lynes made this one -- I just messaged him and he said he just follows the instructions on how to program it, in case that is helpful. 

I'm using a mac, though I also tried from a PC and it didn't seem to make a difference (same error message). 

Thank you so much.. so so excited to get this updated, amazing amazing work you all have done - especially Steven!! 

- Giselle

User avatar
architexture
Wiggling with Experience
Posts: 298
Joined: Fri Nov 30, 2018 2:59 pm
Location: Portland, OR
Contact:

Re: MARF 248r source code available

Post by architexture » Wed May 20, 2020 12:48 pm

I had the same issue. Make sure that din 3 is turned off in the little 4 din switch next to the smt32 board, and make sure you are jumping the pins as described earlier in this thread. I was having the damndest time until I realized I needed to flip Din3 and then it all worked like a charm

maxl0rd
Wiggling with Experience
Posts: 303
Joined: Mon Aug 05, 2013 1:51 pm

Re: MARF 248r source code available

Post by maxl0rd » Wed May 20, 2020 12:51 pm

I was able to flash a new build with this hex file the other day, using the stm32 cube programmer on a mac. I did not have to bridge the pins.

User avatar
architexture
Wiggling with Experience
Posts: 298
Joined: Fri Nov 30, 2018 2:59 pm
Location: Portland, OR
Contact:

Re: MARF 248r source code available

Post by architexture » Wed May 20, 2020 1:55 pm

Yeah the pin bridging is only needed on the initial flash.

tildetilde
Learning to Wiggle
Posts: 4
Joined: Mon Apr 13, 2020 12:14 pm

Re: MARF 248r source code available

Post by tildetilde » Wed May 20, 2020 4:07 pm

Dang. Tried again with the Din3 switch flipped off (thanks architexture!) with and without the pins bridged, but nothing..! Did you all have to change the settings in STM32cubeprogrammer or just use the default?

Post Reply

Return to “4U Format Modules + EMS”