News:

SMF - Just Installed!

Main Menu

Atmegadrum source code

Started by charliesays, January 01, 2015, 10:16:30 PM

Previous topic - Next topic

charliesays

Hi there,
loving the synth, it's really amazing! Just wondered if you would know why, when I'm uploading the Atmegadrum 1_1 source code, it says the sketch is too big? I'm using Arduino 1.0.6
Any advice would be great.
Thanks!

paulsoulsby

Hi,
The first Atmegatron software was written with 1.0.5.  I think Arduino must have added something when they realised 1.0.6.  The code was already on the edge with 1.0.5, so I think that tipped it over the edge.
If you want to use a 1.1, you can still get 1.0.5 of the Arduino sofware here:  http://arduino.cc/en/Main/OldSoftwareReleases

1.3 should be fine with 1.0.6.  I'd definitely recommend using 1.3.

charliesays

Thanks - I'm using 1.3 of Atmegatron but trying to load 1.1 of AtmegaDrum - I'll try the earlier Arduino and see if that helps.

paulsoulsby

Oops - misread the question!  Yes, the Atmegadrum will def run with Arduino 1.0.5.  I should shave a few samples off the drum sounds and make sure it runs with 1.0.6.  It's only out by about 12 bytes (i.e. 12 samples).  I'll update the downloads page later today.

charliesays

No problem and thanks - downloaded 1.0.5 and it's uploaded the Atmegadrum fine, now to go make some 8-bit beats!  :D

ploom2

hi
i got things downloading today :)

question 1 for atmegadrum.
whats the best approach in putting in my own samples?
file size?
bit rate ?
and how do i get them converted into the text string (i'm on a mac)

and any other magic numbers to change in the source code to adapt things to my samples (like those numbers in seq_patstore[16] ?

i'm not a coder...idiot proof answers would be great for me.
thanks.

paulsoulsby

Hi,
The first step is to save the files in 8-bit.  You can do this in Audacity.  http://audacityteam.org/
Open file, trim it (the samples need to be VERY short to fit into memory!)
File->Export..., set format = "other uncompressed files".  Options:  header = microsoft wav, encoding = unsigned 8-bit PCM.

The next stage is to convert the wav into a list of numbers.  If you have access to a windows machine this is easy, just install this code generator app:  http://soulsbysynths.com/wp-content/uploads/2013/12/Atmegadrum-Wavetable-Builder.zip

Unfortunately I don't have any solution for doing this on a Mac.  There may be software out there already that can do this, but I don't know of any off-hand.

I may well convert the app to Mac in the future.  This isn't a straightforward thing to do though I'm afraid.
You can get this for Mac, which allows PC apps to run: https://www.codeweavers.com/products/

ploom2

thanks , yeh i'm digging into pc emulation to run an old nord editor too.

so would i only need to update the long strings of the samples and not tweak any other info ?
I'll try to dig into it this weekend. the drum machine is fun.

paulsoulsby

The app generates all the code and saves as wavestore.ino.  Then put the wavestore.ino file into your Arduino sketch folder, replacing old file. Then upload to Atmegatron.

You need to have something in all 16 sounds, and the total of all sounds must be less than 20kb.  The app will show you this total.

If you want a long sound, just load in a couple of samples of silence into some of the other sounds.

ploom2

thanks

i noticed it can stutter / slow down little but generally it works fine.

ploom2

hi
i was wondering , if i update wavs 1 to 16 does the editor automatically load them up ?
just bought a cheap laptop to run pc things :)

paulsoulsby

Hi,
Apologies for the delay.  I realised that all the Atmegadrum downloads were a little out of date and needed updating.
If you go to the Atmegatron downloads page you see a new Atmegadrum sketch (v1.2.1) and Atmegadrum wavetable builder (v1.1)
Please download these and install the wavetable builder.

To use the wavetable builder: 
1)  Select a drum sample to replace (bottom left)
2)  Click Import wav... and select the file you want to import.  (Remember, use Audacity to convert them to 8bit 8kHz).
3)  Use the slider under the waveform to shorten the wav.  It will auto-find a zero crossing (so no clicks).
4)  Once you've done this for all sounds, make sure that the total samples is less than 19500 samples.  If not, crop ends off samples using slider until it is.
5)  Click Save Wavetable... and overwrite Wavetable.ino in Atmegadrum Arduino sketch folder.  Do this with Arduino software closed.
6)  Then open sketch and upload to Atmegatron in usual way!
8)


Wul

If you go to the Atmegatron downloads page you see a new Atmegadrum sketch (v1.2.1) and Atmegadrum wavetable builder (v1.1)

The sketch is not there, help please.