MUFF WIGGLER Forum Index
 FAQ & Terms of UseFAQ & Terms Of Use   Wiggler RadioMW Radio   Muff Wiggler TwitterTwitter   Support the site @ PatreonPatreon 
 SearchSearch   RegisterSign up   Log inLog in 
WIGGLING 'LITE' IN GUEST MODE

Expert Sleepers Disting firmware hacking
MUFF WIGGLER Forum Index -> Music Tech DIY Goto page 1, 2, 3, 4, 5  Next [all]
Author Expert Sleepers Disting firmware hacking
adammokan
Started messing with some silly code to mess up audio using the Disting and put a Github gist up for anyone that has a PICKit3 programmer laying around.

First example is a bytebeat generator/waveshaper. Only tested with basic waveforms so far, but its fun. I know my scaling code for the Z input is garbage, but it works for now. You should be able to replace my `vTrash` variable with any bytebeat code out there that uses the `t` variable for time. But note that I am modulating `t` with the Z pot right now, so mileage may vary. Either way, hope someone gets some ideas from this.

https://gist.github.com/amokan/13acaa559c6868d2a290

There are a couple quick video clips of this on my Instagram feed (user 'adammokan')

http://instagram.com/p/rcVCKsKXzl
os
Cool! I think you're the first to post something. Exciting times.
adammokan
@os - any chance you can throw me a bone on the register settings for the LEDs? I've been messing with it and cannot seem to find the correct way to light up LEDs "1-B".

I've found "1-A" works with:

PORTASET = BIT_3;
PORTBSET = BIT_4;
BrianAndren
adammokan wrote:
Started messing with some silly code to mess up audio using the Disting and put a Github gist up for anyone that has a PICKit3 programmer laying around.



I have an ICD2 laying around. I don't have the Disting yet. What Microchip MCU is in the Disting?
BrianAndren
BrianAndren wrote:
adammokan wrote:
Started messing with some silly code to mess up audio using the Disting and put a Github gist up for anyone that has a PICKit3 programmer laying around.



I have an ICD2 laying around. I don't have the Disting yet. What Microchip MCU is in the Disting?


I think the ICD2 should work. Do you know?
adammokan
BrianAndren wrote:

I have an ICD2 laying around. I don't have the Disting yet. What Microchip MCU is in the Disting?


PIC32MX

I have a PICKit3 with the six pin connector. Not sure about the ICD2.
os
adammokan wrote:
@os - any chance you can throw me a bone on the register settings for the LEDs?

Look in startupSequence() in the hello_disting project. That iterates over the LEDs.
adammokan
Threw together a really noisy, but functional oscillator thing over the past hour. It's pretty weird and shouldn't be interesting at all, but I managed to get some real solid sounds from it. Sounds good with the DPO sending values to X, Y, and Z.

Code/info can be found here - https://gist.github.com/amokan/13acaa559c6868d2a290#file-sinosaur-md
adammokan
os wrote:

Look in startupSequence() in the hello_disting project. That iterates over the LEDs.


Yeah. I found all of that. It does that single light sweep on each side, though. I messed with that loop yesterday to find the secret combo for two lights, but ran out of time. I noticed you seem to be setting register A to zero after the first element of that sequence.

Here is a link to my LED function. Works when `selector` == 0, but not much else. At least it changes so I can tell when I've changed algorithms smile

https://gist.github.com/amokan/288795f6e5d0eb1306e4

So no biggie. You've done enough by creating this awesome little modular sandbox module.
os
I'm giving a presentation about the disting this week at the London Music Hackspace:

http://musichackspace.org/the-disting-eurorack-synth-module-presentati on-with-andrew-ostler-october-9th/
Jamisnemo
This is awesome!

I just got back from vacation and now that my Zorlon Cannon MKII firmware rewrite is on hold, I can start digging into writing some code for the disting!

I guess it's time to move it into my developer rack...

Thanks for the examples and for the hello_disting code!! It's a huge help!
os
Just adding this to the thread for posterity:

ETP
i´m thinking of hacking this little guy too.
i´ve no idea of coding in C. i´ve done some assembler and BASIC coding on the c64. i guess this should help a little bit.

i want to programm a two channel cv clock generator. maybe euclid or something like the "Zularic Repetitor"
or a nice drum synth. should be possible i think..

and i have a couple of questions...

is the original code of disting somewhere for download? for reflash. just in case
can i read out the disting code for backup?
is the mutable module tester necessary? what do you do with that?
is it possible to use snazzy fx sketches?
can i programm it in assembler? better C?

i think this here is my friend for progamming, right?
http://www.amazon.de/Microchip-PICkit3-In-Circuit-Debugger-Programmer- PIC32/dp/B00OAQW7NS/ref=sr_1_1?ie=UTF8&qid=1418481279&sr=8-1&keywords= pickit+3
adammokan
ETP wrote:

is the original code of disting somewhere for download? for reflash. just in case
can i read out the disting code for backup?
is the mutable module tester necessary? what do you do with that?
is it possible to use snazzy fx sketches?
can i programm it in assembler? better C?

i think this here is my friend for progamming, right?
http://www.amazon.de/Microchip-PICkit3-In-Circuit-Debugger-Programmer- PIC32/dp/B00OAQW7NS/ref=sr_1_1?ie=UTF8&qid=1418481279&sr=8-1&keywords= pickit+3


Yes. That PicKit3 programmer will work. Same one I have.

Answers to your other questions -

1) Original firmware can be downloaded here - http://www.expert-sleepers.co.uk/downloads/firmware/disting_firmware_1 _0.zip

2) The stock firmware is compiled already, so you just flash the binary

3) Mutable Module Tester def not necessary. I just use it because I can have it next to me on my desk while coding. Easier than a 4u case swallowing my workspace up.

4) Snazzy FX sketches won't work as they are arduino/atmega based - but you could use them as a rough outline writing C code for the Microchip processor.

5) Assembler is an option for sure. I'm sure you found it, but the best way to start is with 'base' project OS pushed to github - https://github.com/expertsleepersltd/disting

Hope that helps!
ETP
yes you helped me thumbs up

thank you!!
daluxer
Ha, glad the thread is back.

A CV record would be nice to see in disting. Os told that it is possible.

I'm thinking something like : Z - Position(?) X - input signal, Y - start/stop trigger, A - output and B ..- inverted out?
adammokan
daluxer wrote:
Ha, glad the thread is back.

A CV record would be nice to see in disting. Os told that it is possible.

I'm thinking something like : Z - Position(?) X - input signal, Y - start/stop trigger, A - output and B ..- inverted out?


Definitely possible. I started messing with this a bit one morning, but I don't believe I saved the code when getting a new laptop. Memory is limited, but depending on how you store the data, a few seconds is possible. I really need to grab another Disting to use as a development module and mess with this more. I just hate having to take the Disting out of the rack to access the programming pins and reset button.
daluxer
great news adam. I'm not sure if I am capable of programming it but I should pick up a programmer aswell..lots of nice things can be done! smile
DMR
My understanding is that while a compiled copy of the original firmware is available, the source is not? I understand if Os doesn't want to release the source of each module "program", but it would be convenient if compiled versions of the individual programs were available so hackers could mix and match custom and factory programs in some manner. Also, perhaps future versions of the module could allow for updating of the firmware over audio as the Mutable Instruments modules are.
bgf
Just found out about disting. Had been looking at some of the arduino boards. Some questions:

* I want to write some CV processing routines. Are the Inputs and outputs accurate enough for CV work? I assume so, but all the spec are for audio processing. What's the DC range of the I/O?

* It seems the free compiler outputs completely un-optimized code, and the optimizing compilers are punishingly expensive. Is the 10X performance hit really not a problem for the things we want to do with this board?

thanks!
os
Most of the disting's functions are CV processing. The range is about ±10V.

The free compiler supports gcc -O1, which is pretty good.
bgf
os wrote:
The free compiler supports gcc -O1, which is pretty good.


Ah - I did not realize this. I assumed optimizations were completely off, which is kind of terrible. -O1 doesn't sound so bad. thanks.
bgf
Has anyone ever hacked the disting hardware to add more inputs or outputs? I'm guessing it's not so easy, as (unlike the Arduinos) there are probably no convenient headers for finding the peripheral buses.
adammokan
bgf wrote:
Has anyone ever hacked the disting hardware to add more inputs or outputs? I'm guessing it's not so easy, as (unlike the Arduinos) there are probably no convenient headers for finding the peripheral buses.


No headers are available and everything is SMT. Not saying you couldn't try if you were insane enough - but if you want to hack at the hardware level with this chipset, just grab a Pic32 dev board, some opamps, pots, and a codec chip.
adammokan
bgf wrote:
os wrote:
The free compiler supports gcc -O1, which is pretty good.


Ah - I did not realize this. I assumed optimizations were completely off, which is kind of terrible. -O1 doesn't sound so bad. thanks.


Never had any issues with the free compiler regarding optimization (and no, they are not 'completely off'). Granted, I don't care that much because I deal with code optimization all day at work and do this for fun, but I've never felt anything I developed on the Disting was suffering due to the compiler.
MUFF WIGGLER Forum Index -> Music Tech DIY Goto page 1, 2, 3, 4, 5  Next [all]
Page 1 of 5
Powered by phpBB © phpBB Group