Expert Sleepers Disting firmware hacking

From circuitbending to homebrew stompboxes & synths, keep the DIY spirit alive!

Moderators: Kent, luketeaford, lisa, Joe.

User avatar
adammokan
Common Wiggler
Posts: 97
Joined: Mon Apr 16, 2012 12:14 pm
Location: Chandler, Arizona

Expert Sleepers Disting firmware hacking

Post by adammokan » Sat Aug 09, 2014 1:22 pm

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.



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

Last edited by adammokan on Sat Aug 09, 2014 1:59 pm, edited 1 time in total.

User avatar
os
Super Deluxe Wiggler
Posts: 13688
Joined: Tue Jun 30, 2009 6:55 am
Location: UK
Contact:

Post by os » Sat Aug 09, 2014 1:54 pm

Cool! I think you're the first to post something. Exciting times.

User avatar
adammokan
Common Wiggler
Posts: 97
Joined: Mon Apr 16, 2012 12:14 pm
Location: Chandler, Arizona

Post by adammokan » Sat Aug 16, 2014 4:44 pm

@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
Common Wiggler
Posts: 102
Joined: Sat May 10, 2014 1:31 pm
Location: Fort Collins

Re: Expert Sleepers Disting firmware hacking

Post by BrianAndren » Sun Aug 17, 2014 9:38 am

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
Common Wiggler
Posts: 102
Joined: Sat May 10, 2014 1:31 pm
Location: Fort Collins

Re: Expert Sleepers Disting firmware hacking

Post by BrianAndren » Sun Aug 17, 2014 9:39 am

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?

User avatar
adammokan
Common Wiggler
Posts: 97
Joined: Mon Apr 16, 2012 12:14 pm
Location: Chandler, Arizona

Re: Expert Sleepers Disting firmware hacking

Post by adammokan » Sun Aug 17, 2014 10:59 am

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.

User avatar
os
Super Deluxe Wiggler
Posts: 13688
Joined: Tue Jun 30, 2009 6:55 am
Location: UK
Contact:

Post by os » Sun Aug 17, 2014 12:11 pm

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.

User avatar
adammokan
Common Wiggler
Posts: 97
Joined: Mon Apr 16, 2012 12:14 pm
Location: Chandler, Arizona

Post by adammokan » Sun Aug 17, 2014 6:17 pm

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 -

User avatar
adammokan
Common Wiggler
Posts: 97
Joined: Mon Apr 16, 2012 12:14 pm
Location: Chandler, Arizona

Post by adammokan » Sun Aug 17, 2014 6:24 pm

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 :)



So no biggie. You've done enough by creating this awesome little modular sandbox module.

User avatar
os
Super Deluxe Wiggler
Posts: 13688
Joined: Tue Jun 30, 2009 6:55 am
Location: UK
Contact:

Post by os » Mon Oct 06, 2014 3:31 am

I'm giving a presentation about the disting this week at the London Music Hackspace:

http://musichackspace.org/the-disting-e ... tober-9th/

User avatar
Jamisnemo
Common Wiggler
Posts: 169
Joined: Mon Oct 22, 2012 12:51 am
Location: Belmont, CA

Post by Jamisnemo » Tue Oct 28, 2014 12:44 am

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!

User avatar
os
Super Deluxe Wiggler
Posts: 13688
Joined: Tue Jun 30, 2009 6:55 am
Location: UK
Contact:

Post by os » Thu Nov 20, 2014 6:28 am

Just adding this to the thread for posterity:

[video][/video]

User avatar
ETP
Super Deluxe Wiggler
Posts: 1847
Joined: Sat Mar 23, 2013 3:01 pm
Location: Austria, Innsbruck

Post by ETP » Sat Dec 13, 2014 10:18 am

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?
Last edited by ETP on Tue Mar 10, 2015 4:41 am, edited 1 time in total.

User avatar
adammokan
Common Wiggler
Posts: 97
Joined: Mon Apr 16, 2012 12:14 pm
Location: Chandler, Arizona

Post by adammokan » Sun Dec 14, 2014 12:05 pm

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?
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/downlo ... re_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!

User avatar
ETP
Super Deluxe Wiggler
Posts: 1847
Joined: Sat Mar 23, 2013 3:01 pm
Location: Austria, Innsbruck

Post by ETP » Sun Dec 14, 2014 12:22 pm

yes you helped me :tu:

thank you!!

User avatar
daluxer
Veteran Wiggler
Posts: 713
Joined: Sat Nov 17, 2012 1:25 pm
Location: Berlin

Post by daluxer » Mon Jan 26, 2015 11:36 am

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?

User avatar
adammokan
Common Wiggler
Posts: 97
Joined: Mon Apr 16, 2012 12:14 pm
Location: Chandler, Arizona

Post by adammokan » Fri Jan 30, 2015 11:52 am

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.

User avatar
daluxer
Veteran Wiggler
Posts: 713
Joined: Sat Nov 17, 2012 1:25 pm
Location: Berlin

Post by daluxer » Fri Jan 30, 2015 1:13 pm

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! :)

DMR
Wiggling with Experience
Posts: 439
Joined: Sat Jan 04, 2014 1:05 pm

Post by DMR » Thu Feb 05, 2015 10:15 pm

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
Common Wiggler
Posts: 59
Joined: Sun Mar 01, 2015 1:12 pm
Location: San Francisco

General Q

Post by bgf » Sun Mar 01, 2015 1:19 pm

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!

User avatar
os
Super Deluxe Wiggler
Posts: 13688
Joined: Tue Jun 30, 2009 6:55 am
Location: UK
Contact:

Post by os » Mon Mar 02, 2015 4:08 am

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
Common Wiggler
Posts: 59
Joined: Sun Mar 01, 2015 1:12 pm
Location: San Francisco

Post by bgf » Mon Mar 02, 2015 11:11 am

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
Common Wiggler
Posts: 59
Joined: Sun Mar 01, 2015 1:12 pm
Location: San Francisco

Post by bgf » Mon Mar 02, 2015 11:14 am

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.

User avatar
adammokan
Common Wiggler
Posts: 97
Joined: Mon Apr 16, 2012 12:14 pm
Location: Chandler, Arizona

Post by adammokan » Mon Mar 02, 2015 7:02 pm

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.

User avatar
adammokan
Common Wiggler
Posts: 97
Joined: Mon Apr 16, 2012 12:14 pm
Location: Chandler, Arizona

Post by adammokan » Mon Mar 02, 2015 7:07 pm

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.

Post Reply

Return to “Music Tech DIY”