root of user samples in synth

Hi:

hoping someone can help me out with this
when I load in samples via USB, the op-1 creates a user synth patch, as it should, but it always detunes the sample by 3 notes; in other words, it sets the root of the sample to A, not C. obviously there are workarounds I can do for this, but does anyone know why it does this? does it just assign all samples to a root of A? seems odd.
1 Like

I discovered the same thing. You just have to load A samples. No way around it that I know of.

has anyone published any details on OP1’s AIF file structure? maybe we should…

Thanks for the quick response, people! Yes, would be very interested to know of file structure…

when the "op-1" (APPL) chunk is missing from the uploaded sound, the sampler engine creates a snapshot with base frequency of 440 Hz. Samples sampled at C are saved with base_freq=261.625..

Screen Shot 2015-01-08 at 17.47.20


here are some sample op1 chunks

sampler:
op-1{
"adsr":[512,10746,32767,10000,4000,64,4000,4000],
"base_freq":261.6253662109375,
"fx_active":true,
"fx_params":[4480,15544,10788,12104,0,0,0,0],
"fx_type":"delay",
"knobs":[0,0,1823,1823,12000,0,0,11583],
"lfo_active":true,
"lfo_params":[11840,18431,1024,15144,0,0,0,0],
"lfo_type":"random",
"name":"20150108_0251",
"octave":0,
"synth_version":1,
"type":"sampler"
}

drwave
op-1{
"adsr":[64,10688,20992,2624,2048,64,4000,4000],
"fx_active":false,
"fx_params":[7040,18336,3572,6361,0,0,0,0],
"fx_type":"delay",
"knobs":[4785,11683,8155,0,32000,0,0,0],
"lfo_active":true,
"lfo_params":[10240,720,3760,7264,0,0,0,0],
"lfo_type":"value",
"name":"digisin",
"octave":0,
"synth_version":1,
"type":"drwave"
}


drum file made with drum utility
op-1{
"drum_version":1,
"type":"drum",
"name":"user",
"octave":0,
"pitch":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
"start":[0,0,59709135,103855912, ... ,0,0,0],
"fx_active":false,
"fx_type":"delay",
"fx_params":[8000,8000,8000,8000,8000,8000,8000,8000],
"lfo_active":false,
"lfo_type":"tremolo",
"lfo_params":[16000,16000,16000,16000,0,0,0,0]
}

p.s. http://paulbourke.net/dataformats/audio/

1 Like

wow, amazing info. thanks for that….

some software (e.g. Adobe Audition) preserves unrecognised application-specific AIFF chunks, so technically it's possible to open a sample patch saved in C, paste your sound in and save it as a new file. theoretically the OP-1 should play it in the right key. I haven't tried this (yet).

any progress on this?! exciting!

If there is enough clamour here, I could try to reused some of the randomizer code that handles the AIFF patch headers and create a page that allows uploading a sampler patch and changing the base frequency…

punji, any progress on that? Alternatively an external program to do that would be excellent too…

@punji, would you be able to answer a question about the op-1 and aiff metadata? I’m trying to load some single cycle waveforms with 600 samples each (the Adventure Kid waveforms) and manually edit the metadata after converting to aiff so the base frequency on the op-1 will be 73.5 Hz (44100/600). However, I don’t seem to be able to get the op-1 to recognize my metadata at all, and the base frequency always reverts to 440. Any hints as to how I would get the op-1 to respect my metadata?

My gut feeling is that this might not work, @szilm. Take what I’m saying with a pinch of salt as I may well be wrong, but I somehow recollect experiencing the same thing as you when I was writing a drumkit generator. That is, whenever I got my sampling rate wrong, I noticed that the op-1 re-pitched my samples as if it had overridden things to run at 44100 Hz.

I’m still running at 44100 Hz sampling. I just have a very short sample (600 samples total). I could downsample it to 100 samples and have a single cycle at A440, but then I’d be re-interpolating it when I want to play a low octave and probably introducing some artifacts. Internally, the op-1 has a concept of the samples “base frequency”, and I’d be happy enough if it would recognize my sample as a D in any octave, instead of being out-of-tune with the internal synths etc. That said, I guess I can use the new master tuning feature to repitch my sample before playing, and return it to neutral for all other operations but it’s a hassle. I’m also curious about the op-1’s use of the aiff metadata, since I can’t seem to generate anything that it will respect metadata-wise.

@szilm I don’t have much experience with sample presets, but I tried editing the “base_freq” parameter on an existing OP-1 aiff file (44100@16) and the sample pitch indeed change. The only weird thing is that doubling the parameter value halved the frequency and vice-versa.

How did you create your file and add the metadata? Maybe there was some issue there that caused the OP-1 to ignore the whole metadata section.

@szilm The only weird thing is that doubling the parameter value halved the frequency and vice-versa.

that’s normal. this is the frequency of the root key. if you’re saying it’s an octave higher, then the synth will play an octave lower.


@szilm I remember the OP1 having some issue with single cycle waveforms, could be an old thing tho

The OP1 defaults to A (440.0000). Easiest to subvert this by making your waveform tuned to A.

@punji, my first attempt at editing the metadata was done via Audacity. Then, suspecting possible encoding differences in my produced aiff files, I used a hex editor to change the frequency value without disturbing the encoded data in any way.


@eesn, I will try in the future resampling my waveform to A440 but I lose a lot of information in this case, going from an original 600 samples down to merely 100. Shame to lose all that fidelity in the bass!
@eesn, I will try in the future resampling my waveform to A440 but I lose a lot of information in this case, going from an original 600 samples down to merely 100. Shame to lose all that fidelity in the bass!

nothing is stopping you from sampling to a multiple of the A frequency, or just generating a tone in A instead of C.


How exactly do I view and edit the Metadata of an OP-1 sample on a Mac? What application is best for this? Or is there some Terminal command?