recreating the sound of a granular sampler

sampler in question is bastl instruments microgranny small pocket sampler. I just love what it does when stuff is run through it. but so far haven’t got the sound if I try and recreate it with audacity, I will post my examples of sampling I have done with it and my attempts to create a like for like version ,minus some ground noise.

here is the source sample material example I have used. I picked something which I thought would sound nice all lofi as just a test for this;

https://www.youtube.com/watch?v=10Y6mV53C0o

here is the sample run through microgranny, this is as raw and vanilla I think the sampling does. ignore the ground hum, made a mistake there, probably needed to disconnect the ac on the laptop.
https://soundcloud.com/user-176723455/01wav

here is my first attempt at recreating it in audacity. in this version I lowered the sample rate to 22050, switch it over to mono then exported as an 8bit sample (these are the specs I found for microgrannys sampling). final thing I did was raise the volume so it was clipping, export, then import again and lower it,export. just trying to match the sound there, clipping audio isn’t a priority for me doing this,i’m thinking its caused by the recording level on the mg when doing the original sample. wanted to hear what it would sound like though.
https://soundcloud.com/user-176723455/01-done-in-audacity

as you can hear there is a distinct difference in the sound. despite the ground problems in the original it sounds a lot less digital. there is this nasty metallic sound which was picked up when I converted my attempt to 8bit. I did try to mess with some eq to filter this out, but as you can hear the original retains the top end, and my attempt at filtering out that noise resulted in a more muddy sound which still retained the nasty digital sound. feel free to do your own attempts at trying to get it as close to the source, i’m opening this up to the forum so if you would rather try it yourself than offer your thoughts that would be cool. any help would be appreciated. :slight_smile:

When the piano melody is repeated a synthesizer has been added, not a processed version of the piano.

You can achieve something similar (without adding a synth) by using a boatload of reverb …

anwida stereo reverb settings used.png

OK, I had a quick go.

  1. Invert
  2. Normalize
  3. Distortion effect > Leveler Moderate preset
  4. Applied this code in the Nyquist Prompt effect:
;version 4
(if (arrayp *track*)
    (setf *track* (mult 0.5 (sum (aref *track* 0)(aref *track* 1)))))

(lowpass8
   (quantize (s-min (lowpass8 *track* 10000) 0.4) 128) 
  10000)

The compression / distortion is not quite right, but I think it’s ballpark.

that is really good steve ! i’m assuming some of the code was the part that clipped the positive side of the waveform? I was looking at the waveform last night and noticed its pretty much set to clip at a certain level and was trying to figure out how to do the same. yea the distortion, I think the microgranny has a more aggressive attack which tails off much quicker? I tried tinkering with the compressor effect and distortion and this is my best attempt at trying to get similar results with that wave shape, although the distortion is not loud enough here at all.
https://soundcloud.com/user-176723455/01-done-in-audacity5
how did you filter out the phasing digital noise in between the notes that I always seem to get when I convert to 8bit?

Yes, the S-MIN command.

A quick explanation of the code:

TRACK is the selected audio. If it’s from a mono track then it is simply a “sound”, but if it’s from a stereo track then it’s an array of two sounds.
So that we can work in mono, the first part of the code checks to see if TRACK is an array:

(if (arrayp *track*)

and if it is, it mixes down to mono, which is another way of saying that it adds the two channels (the 0th and 1st elements in the array) and divides by two:

(mult 0.5
  (sum (aref *track* 0) (aref *track* 1)))

The next part:

(lowpass8
   (quantize (s-min (lowpass8 *track* 10000) 0.4) 128)
  10000)

This is easier to follow if we split it up into a series of actions applied to TRACK

(setf *track* (lowpass8 *track* 10000)) ;set *track* to low pass at 10000 Hz
(setf *track* (s-min *track* 0.4))      ;set *track* to the minimum of *track* and +0.4
(setf *track* (quantize *track* 128))   ;quantize sample values to 255 levels, equivalent to 8 bit audio
(lowpass8 *track* 10000)                ;low pass again

thanks for explaining the code, completely new to audacity script. still got a lot to learn there. would I be correct in understanding that by quantising the sample values to 255 levels, this basically does the 8bit conversion, without actually converting to 8bit?

You got it :wink:

ok guys here’s my latest attempt
https://soundcloud.com/user-176723455/01-done-in-audacity6

i’ve downloaded the latest version of audacity and found there was a whole load of new tools in the distortion plugin to play around with! I think I might need to work on that part, but the great thing is how its now opened up in the latest build with much more variables to work with. :slight_smile: