Building a library of settings to apply to samples

Is it possible to build a library of different ASDR and bandwidth settings to apply to some core wav samples, so they may be imported and called to function in a music script on the platform?

1 Like

Really interesting question, thanks!

To help get my head in the same space as this problem, what would the syntax/code you would like to write to make this happen.

For example, imagine that you could write whatever code you wanted and it would magically work - what might you write and what might you want it to do?

Thanks Sam,

So for example, if I wanted a section of my music composition to use the with_fx:**** do function, and I have a series of logical FX presets of my own to apply to a neighbouring series of raw samples I have recorded e.g. five samples of the same raw sound at pentatonic pitches, can FX be tailored?

Alike to the options of tailoring ASDR envelope aspects and amplitude to various synth pitches and samples, is there a way of firstly programming dB and Hz independently, and then secondly, creating variables for combined levels of these - to apply to the specific neighbouring raw samples?

So perhaps we could imagine something like:

in_thread do
   with_fx, db: +23, Hz: 500 do # (or perhaps a pre-tailored variable to match the specific sample e.g. 'nasal')
      sample :nasal_c3, rate: 1, release: 0.5, amp: 0.5
      sleep 1
      sample :nasal_e3, rate: 1, release: 0.5, amp: 0.5
      sleep 1
      sample :nasal_g3, rate: 1, release: 0.5, amp: 0.5
      sleep 1
   end
end

Or is there perhaps already a programming approach that exists, to produce a similar result?

Hi @nicolajb,

I’ve just made a few minor edits to your post to forma the code nicely - I hope you don’t mind :slight_smile: In the future, you can surround any code inline such as in_thread with single backpacks ` and they will be formatted nicely.

For longer blocks of code (that spread over multiple lines) you’re better off starting and finishing the code with three backticks on a single line: ``` which will not only render your code nicely but will also add fancy colour highlighting :slight_smile:

To answer your question, have you seen the fns use_sample_defaults and with_sample_defaults?

sample :loop_amen # uses default opts

use_sample_defaults amp: 0.5, cutoff: 70
sample :loop_amen # uses amp 0.5 and cutoff 70

with_sample_defaults cutoff: 90 do
  sample :loop_amen  # uses cutoff 90
end

There’s also use_merged_sample_defaults and with_merged_sample_defaults which will merge additional defaults rather than completely replacing them:

sample :loop_amen # uses default opts

use_sample_defaults amp: 0.5, cutoff: 70
sample :loop_amen # uses amp 0.5 and cutoff 70

with_merged_sample_defaults amp: 1 do
  sample :loop_amen  # uses cutoff 70 and amp 1
end
2 Likes