Author Topic: Is Miniatmegatron open source?  (Read 123 times)

Is Miniatmegatron open source?

« on: November 25, 2017, 04:17:56 PM »
Open quickbuttons

veryfungi

Posts: 2

Offline
  • *
  • Newbie
    • View Profile
Hello,

I want to make my own miniatmegatron like device. Is it open source, and or, would you be willing to help at all? I think I have it mostly, but I need to know if the pots increase voltage with clockwise, or counterclockwise rotation. Thanks!

Re: Is Miniatmegatron open source?

« Reply #1 on: November 25, 2017, 04:33:46 PM »
Open quickbuttons

paulsoulsby

Posts: 190

Offline
  • Administrator
  • *****
  • Full Member
    • View Profile
Hi yes all code  is open source and on github: https://github.com/soulsbysynths
However someone has just alerted me that there is an issue with latest mini libraries.  If you download v2.6 you'll be OK.  Will hope to have working libraries up to date by next week.
thanks
Paul

Re: Is Miniatmegatron open source?

« Reply #2 on: November 25, 2017, 04:35:37 PM »
Open quickbuttons

paulsoulsby

Posts: 190

Offline
  • Administrator
  • *****
  • Full Member
    • View Profile
and pots turn clockwise! So fully clockwise will be read as 255 and fully anticlockwise is 0.

Re: Is Miniatmegatron open source?

« Reply #3 on: November 25, 2017, 04:55:54 PM »
Open quickbuttons

veryfungi

Posts: 2

Offline
  • *
  • Newbie
    • View Profile
Thank you so much. :D You're the best!

Re: Is Miniatmegatron open source?

« Reply #4 on: December 02, 2017, 11:40:48 AM »
Open quickbuttons

bobo

Posts: 3

Offline
  • *
  • Newbie
    • View Profile
Have you made any progress customizing the arduino code? I succeeded in getting the miniAtmegatron working on my Arduino nano with v2.6 of the libraries (thank you Paul!). But as an Arduino beginner I don't have a clue where to start. I am used to the structure of .ino files. But the .ino file for the miniAtmegatron is almost empty, so everything appears to be happening in the libraries. But which library do I start with? Min? Or MinEngine? I understand the function of libraries for subroutines like behaviour of pots of oscillators. But where is the main program flow hiding?
Would be glad to hear some clues on this.

Re: Is Miniatmegatron open source?

« Reply #5 on: December 03, 2017, 11:13:27 PM »
Open quickbuttons

paulsoulsby

Posts: 190

Offline
  • Administrator
  • *****
  • Full Member
    • View Profile
Hi - I'll do a little chart showing how the classes all interact with each other.  It's pretty easy once you know this.  The .ino file is just a holder for uploading the project.  All the work is done in the classes now.   Will hopefully add the diagram tomorrow.

Re: Is Miniatmegatron open source?

« Reply #6 on: December 05, 2017, 11:09:22 PM »
Open quickbuttons

bobo

Posts: 3

Offline
  • *
  • Newbie
    • View Profile
Thanks very much Paul! For the update of the libraries (dind't try it yet) and for the diagrams. At least I found a new folder in github called "docs" which contains an html that opens a lot of info on the classes, files and interaction. This looks very complex for a beginning programmer..  :-\
I thought of the following customizations:
a. add a single din midi in (thru optocoupler)
b. add five pots so you dont need the switch
c. I will need a multiplexer for freeing up digital (a) and analog pins (b)

And if and when I succeed in all that I would like to try to add a 2x16 I2C lcd screen, to replace the 2 multicoloured leds.

I am going to study your diagrams.
Any hints where to start are off course very welcome :)

Re: Is Miniatmegatron open source?

« Reply #7 on: December 07, 2017, 06:20:39 PM »
Open quickbuttons

paulsoulsby

Posts: 190

Offline
  • Administrator
  • *****
  • Full Member
    • View Profile
Yes, that's work in-progress.  Still trying to find a way to publish it properly.  Also, I think there's possibly too many diagrams, it makes it look more complex than it is!
Start with the Min class.  That contains a hardware class and engine class. The hardware class handles the electronics, the engine is the processing for the generating audio.  Both of those classes generate events.  The job of the Min class is to pass events between the hardware and engine class.  The idea is that the hardware and engine can be totally independent, so you can port different audio engines to different hardware interfaces really easily.
R.e. your customisations.
a)  Yes totally possible. Even can use a Sparkfun MIDI shield (don't connect the buttons or pots though)
b)  You'll need to remove pots on A4 & A5 as they use the I2C bus.  Then add an external I2C ADC chip.  If you look at the code for the Oscitron Hardware, you'll see how to do this with a Microchip MCP3208 ADC.  So 8 of the pots will come off the MCP3208 and 4 off the Atmega328.  That frees up A4 & A5 to use for the I2C to drive the ADC.
c)  See above.  Just free up A4 & A5 and use the I2C bus.  Then adding an I2C screen at a later date is easy too!

Hope this helps as a starting point!

Re: Is Miniatmegatron open source?

« Reply #8 on: December 07, 2017, 07:22:53 PM »
Open quickbuttons

bobo

Posts: 3

Offline
  • *
  • Newbie
    • View Profile
This helps enormously, thanks. I don't know the MCP3208 ADC. I planned to:
- remove the RGB LEDs, that frees up pins D5, D6, D9, D10 and D11, and remove the switch, that frees pin D2
- add a multiplexer 74HC4051 which takes 3 digital pins and one analog pin (A3), then 8 pots go to the multiplexer and 3 stay on A0,A1,A2
- A4, A5 are ready to act as SDA and SCL to connect to the LCD 1602 board

That leaves me with 3 free digital pins for further expansion.

That seems easy.  :)
Now the software - not so easy  :'(