Soulsby Synths Forum

Technical Support => Software technical support => Topic started by: charliesays on January 01, 2015, 10:16:30 PM

Title: Atmegadrum source code
Post by: charliesays on January 01, 2015, 10:16:30 PM
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!
Title: Re: Atmegadrum source code
Post by: paulsoulsby on January 02, 2015, 01:02:29 PM
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 (http://arduino.cc/en/Main/OldSoftwareReleases)

1.3 should be fine with 1.0.6.  I'd definitely recommend using 1.3.
Title: Re: Atmegadrum source code
Post by: charliesays on January 04, 2015, 11:51:17 AM
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.
Title: Re: Atmegadrum source code
Post by: paulsoulsby on January 05, 2015, 10:25:54 AM
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.
Title: Re: Atmegadrum source code
Post by: charliesays on January 05, 2015, 11:11:44 AM
No problem and thanks - downloaded 1.0.5 and it's uploaded the Atmegadrum fine, now to go make some 8-bit beats!  :D
Title: Re: Atmegadrum source code
Post by: ploom2 on September 17, 2015, 10:23:26 PM
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.
Title: Re: Atmegadrum source code
Post by: paulsoulsby on September 18, 2015, 10:39:29 AM
Hi,
The first step is to save the files in 8-bit.  You can do this in Audacity.  http://audacityteam.org/ (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 (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/ (https://www.codeweavers.com/products/)
Title: Re: Atmegadrum source code
Post by: ploom2 on September 18, 2015, 06:38:16 PM
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.
Title: Re: Atmegadrum source code
Post by: paulsoulsby on September 19, 2015, 09:05:05 AM
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.
Title: Re: Atmegadrum source code
Post by: ploom2 on September 19, 2015, 07:33:28 PM
thanks

i noticed it can stutter / slow down little but generally it works fine.
Title: Re: Atmegadrum source code
Post by: ploom2 on September 23, 2015, 11:31:49 PM
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 :)
Title: Re: Atmegadrum source code
Post by: paulsoulsby on September 26, 2015, 10:29:24 AM
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)
Title: Re: Atmegadrum source code
Post by: ploom2 on September 26, 2015, 06:01:45 PM
thanks
Title: Re: Atmegadrum source code
Post by: Wul on December 09, 2020, 09:46:51 AM
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.