What is KVR Audio? | Submit News | Advertise | Developer Account

Options (Affects News & Product results only):

OS:
Format:
Include:
Quick Search KVR

"Quick Search" KVR Audio's Product Database, News Items, Developer Listings, Forum Topics and videos here. For advanced Product Database searching please use the full product search. For the forum you can use the phpBB forum search.

To utilize the power of Google you can use the integrated Google Site Search.

Products 0

Developers 0

News 0

Forum 0

Videos 0

Search  

Odd behavior of multiple samples in Alchemy (long post)

Official support for: camelaudio.com

Moderator: Camel Audio Mods

BLSheep04
KVRer
 
28 posts since 21 Dec, 2009

Postby BLSheep04; Mon Apr 02, 2012 1:44 am Odd behavior of multiple samples in Alchemy (long post)

Hello,

I have some strange problems going on when I import audio in Alchemy

It's a long explanation, so let me first summarize:

When I import samples, the sounds that are heard have no correlation with the keys pressed on the MIDI keyboard, and the sounds have excessive stuttering/mangled sound at the extremes of the keyboard. Also, when multiple samples are loaded, I believe only one sample is being used, no matter if there are more accurate/appropriate samples for the key pressed.

Now, here's exactly what happened:

I was playing with Alchemy within Reaper v 4.21, importing some beautiful Steinway piano samples from the University of Iowa's Sampling program (http://theremin.music.uiowa.edu/).

First off, I load up a single piano sample in granular mode (file name is called Piano.ff.C3.aiff). For some reason, when I play C3 on the virtual MIDI keyboard, the sample plays back one octave lower, and with extreme stuttering artifacts at the high end of the keyboard and a completely distorted/corrupted sound at the lower end. This occurs even when I use the bestfreq and single note parameters when importing. I try to change grain size, density, but no improvement.

Then I try to load multiple samples in granular mode (C3-C6, all FF), hoping this might help. Everything loads fine, but when I play on the C3, Alchemy plays the wrong note: a G6. The surrounding keys play sounds as if I had just loaded a G6 sample (ie: the D3 key plays a A6 sound, B2 plays an F6). These sounds, too, can have excessive stuttering. Like before, as I go higher up on the keyboard, the stuttering sound is exaggerated and the sound does not resemble a piano. It's as if Alchemy is only reading a single sample from the group that is loaded, and the other samples that should be used as higher octaves are not being utilized at all.

When I load the same C3-C6 samples in Additive/Spectral modes, I have the trouble as well.

To start off, the Root Note detector in Alchemy is always one one octave lower than the file name (ie: Piano.ff.C3.aiff will be detected in Alchemy as a C2 root note).

And it seems as though Alchemy chokes on multiple samples, taking almost 40 seconds to analyze 4 samples (23.7 megabyes), despite only 12% of the CPU being used the entire time! Hopefully Camel Audio can better utilize CPUs to reduce load times. I have a quad core, so to only use 12% of the CPU seems inefficient at best.

Once the samples have been loaded, I get the same problem with the wrong sound played for whichever key is pressed on the keyboard. The stuttering and chorusing is gone, so it seems as though granular mode is simply inadequate for the samples.

I also repeatedly get a message when using these samples in Additive/Spectral modes, "Please select a location and filename for supporting data files". Is there additional information needed for these samples to work correctly? I would hope not, as they are simply .aiff files. If so, could some point me in the correct direction about how to do so?

Thanks,

Jon
User avatar
biomechanoid
KVRian
 
1178 posts since 29 May, 2002, from Scotland

Postby biomechanoid; Mon Apr 02, 2012 5:31 am

hi Jon,

1 - unfortunately there are 2 different protocols for identifying root notes - i.e. there is no universally accepted 'rule' re what octave C3 is, and as you've discovered, some hosts and content are an octave out from others. we chose the method used by the majority of hosts and content providers, but as I say, its unfortunate that there is a choice that had to be made in the first place.

2 - which analysis method are you using? analysing single samples in additive, granular and spectral will by their nature produce artefacts (different depending on analysis method) the further from the root key they are, as the data analysed is having to be stretched / squashed. You can minimise this by experimenting with the import settings, but best settings depend very much on the nature of the content. you should also note that artefacts will be considerably worse if the 'correct' root key is not specified for any given sample.

3 - are you loading your multi samples as an SFZ or selecting multiple files in the import browser? if its an SFZ, please send it (no samples required) to support, and we'll take a look. if the defined root-notes aren't what alchemy expects, this will create problems.

4 - altho analysis and extraction of data obviously does take time, the time taken to analyse the samples you mention does seem considerably longer than usual. i'm not sure why this would be the case. do you see the same times when analysing similar factory content?

5 - re re-save data dialogues - are you saving the preset in Alchemy or in Reaper? This dialogue should only appear if the preset hasn't been saved in Alchemy, and therefore the host needs to deal with recalling the .aaz (analysed) data within a project - some hosts limit the size of data that can be saved in a project, so its necessary to reference files externally.

hopefully this helps. i'm sure andy will chime in with more info.

cheers

col
[ Camel Audio Alchemy ] [ ucn netlabel ]
"Its my firm belief that its a mistake to hold firm beliefs"
User avatar
ZenPunkHippy
KVRAF
 
10272 posts since 18 Jun, 2008, from Melbourne, Australia

Postby ZenPunkHippy; Mon Apr 02, 2012 7:10 am

Hi,

#5 is the easiest to solve. As pointed out by Col, it's due to the limits some hosts place on how much data can be saved in the host project file. Reaper can handle more than the default 1 MB, I've tested up to 100 MB which seemed to work well. To change the default, the following line in the config file should be modified:

MaxChunkSize= 1048576

The optimum value depends on the size of the files you are analysing. To set a limit of (almost) 50 MB change the first number to a 5 and add an extra 0, like this:

MaxChunkSize= 50048576

Quit Reaper, edit and save the file. Restart Reaper and the prompt will no longer be displayed (unless you go over the new 50 MB limit). T make a backup of the AAZ data (which might also be useful in other presets) just save the preset using the Save As button and the AAZ files will be saved along with the preset file.

Not sure what would be causing the stuttering, but make sure the number of audio buffers allocated to the sound card driver is at least 256. Some systems will cope with 128, but 256 is the recommended minimum for sample based instruments.

If that doesn't fix the problem, as Col said provide us with a link to the samples or email us an example preset to alchemy-beta [at] camelaudio [dot] com and we'll take a look. Thanks.

Peace,
Andy.
BLSheep04
KVRer
 
28 posts since 21 Dec, 2009

Postby BLSheep04; Mon Apr 02, 2012 4:03 pm

Thanks guys!

I'll try and send some files (they are .aiff, not sfz) to support to see if they can recreate the issues.

I'm going to send Piano.ff.C3.aiff, Piano.ff.C4.aiff, Piano.ff.C5.aiff, Piano.ff.C6.aiff. I set the root note to C3, but the sound is definitely G6. It's interesting to go from C2, which plays a C3 sample/sound, to C#2, which plays G#5.

The University of Iowa samples I import take longer than factory content to import (I imported the sample sample notes from the C7 that comes with Alchemy, which took ~6 seconds). Of course the factory samples were about 6x smaller (4.25 mb vs 24mb). The samples have not been optimized, in terms of chopping off tails and starts, so one has to hold down the key til the sample plays. I don't see why they would necessarily take so long to import, however.

When it comes to loading factory audio (not importing), there is no issue...usually 1-2 seconds max.

In terms of the stuttering, I think this was just artifact from the Granular mode. Additive mode seems to do okay.

Regarding saving the MaxChunkSize= 50048576 command, which Reaper file am I saving it to? Is it Reaper-Install.ini?

How should I go about having Alchemy assign the samples properly, so it's using the most appropriate sample for whatever note/octave I'm playing? Same deal with velocity samples. How do I get Alchemy to play the appropriate sample based on velocity (there are 3 samples per note - ff, mf, pp)?

On a separate note, is there a quick way to import factory sounds??? I usually find that granular mode is not ideal for the "realistic" instruments (ie: French Horn), but in order to import the audio, I basically have to duplicate Alchemy's factory soundbank in a separate location on the hard drive, as the import audio window does NOT show the Program Data/Camel Audio/Alchemy folder.

On another separate note, when I import audio, is there a way I can TYPE IN the root note? Clicking on the Root Note box, I get the drop down menu, and usually it can take a long time to scroll down to one of the notes that is higher up on the keyboard.

Thanks!

Jon
User avatar
ZenPunkHippy
KVRAF
 
10272 posts since 18 Jun, 2008, from Melbourne, Australia

Postby ZenPunkHippy; Mon Apr 02, 2012 9:24 pm

BLSheep04 wrote:I'm going to send Piano.ff.C3.aiff, Piano.ff.C4.aiff, Piano.ff.C5.aiff, Piano.ff.C6.aiff. I set the root note to C3, but the sound is definitely G6. It's interesting to go from C2, which plays a C3 sample/sound, to C#2, which plays G#5.

Difficult to say what's gong on here without looking at the samples ourselves, but ...

The samples have not been optimized, in terms of chopping off tails and starts, so one has to hold down the key til the sample plays

For best results you should trim the samples. I'm not sure how / if this would affect pitch detection, but it's creating unnecessary extra work for the analysis phase. If you don't have an audio editor available, Ocenaudio is free and works on all OS's:

http://www.ocenaudio.com.br/

the factory samples were about 6x smaller (4.25 mb vs 24mb).

Additive and spectral analysis is not a real time process like granular, which is why the samples need to be analysed first. The time required to analyse a sample will increase as the file size increases.

When it comes to loading factory audio (not importing), there is no issue...usually 1-2 seconds max.

If you mean presets, these are loading pre-analysised AAZ files. If you mean samples via Load Audio this is because granular analysis is used. For the Add/Spec modes, see above.

Regarding saving the MaxChunkSize= 50048576 command, which Reaper file am I saving it to? Is it Reaper-Install.ini?

Sorry, I meant the Alchemy config file. The default location is:

C:\ProgramData\Camel Audio\Alchemy\AlchemyConfig.txt

How should I go about having Alchemy assign the samples properly, so it's using the most appropriate sample for whatever note/octave I'm playing? Same deal with velocity samples. How do I get Alchemy to play the appropriate sample based on velocity (there are 3 samples per note - ff, mf, pp)?

The best way to do this is to create an SFZ file defining the instrument. SFZ allows you to define the keyboard zone for a particular sample, both in terms of pitch and velocity, and also round-robin if you have more than one file per note/velocity.

The easiest way to create an SFZ for your purposes is to copy an existing file that is close to what you want, and mofify it using a text editor to load these samples. More info about SFZ files here:

http://www.camelaudio.com/alchemymanual/sfz-files/

You can also select multiple files for import in the browser, see below for information about setting the root note.

On a separate note, is there a quick way to import factory sounds??? I usually find that granular mode is not ideal for the "realistic" instruments (ie: French Horn), but in order to import the audio, I basically have to duplicate Alchemy's factory soundbank in a separate location on the hard drive, as the import audio window does NOT show the Program Data/Camel Audio/Alchemy folder.

This is due to a bug in 1.25, which will be fixed in the next update. When the data folder is in the default location "ProgramData" (a hidden folder) the browser fails to open in the correct place. One workaround is to browse to the folder through the DLL folder (there is a shortcut next to the DLL) but this becomes tiresome after a few imports.

A better work around is to move the data folder somewhere else so that's the root folder is not hidden, that way the Import Audio browser will always open in the last used folder. More info about moving Alchemy in this FAQ entry:

http://bit.ly/HcabI2

On another separate note, when I import audio, is there a way I can TYPE IN the root note? Clicking on the Root Note box, I get the drop down menu, and usually it can take a long time to scroll down to one of the notes that is higher up on the keyboard.

If the file name contains the root note that is what Alchemy will use e.g.

SemiAcoustic-Short1-G1.wav

The note must be at the end of the file name for this to work.

Peace,
Andy.
BLSheep04
KVRer
 
28 posts since 21 Dec, 2009

Postby BLSheep04; Thu Apr 05, 2012 9:29 pm

Thanks, Andy. I'll give a shot when I have some time.

Perhaps in an upcoming update, Camel Audio can have its own SFZ/Camel audio editor to make these multi sampled, velocity independent, round robin instruments. Maybe Alchemy could blend multiple samples for added realism (ie: individual samples at different volume levels can split the difference). In the editor, drag and drop of multiple samples into appropriate MIDI "columns" and "rows" would be awesome, with batch scripting in additional to individual and group scripting. In the editor, maybe you could have hybrid audio engines, where some notes sound better in the lower keys with additive, whereas maybe some of the upper notes might sound better with spectral. Just ruminating here.

Another feature, hopefully in an update, would be the ability to type in the root note in the import audio window, and then have that file(s) automatically save correctly, or if its a group, a batch process. It could be a pain to (re)name each file individually.

Also, with another update, could you improve the import audio function? When importing audio, in Alchemy (on PC), Shift + mouse click acts like Control + mouse click in other programs. As an example, if I want to load 11 files, I currently have to Shift + mouse click every single file.

Shift + mouse click, on every other program I've used, is like selecting all contiguous files starting with the first file selected. For instance, I would click the first selection, move 10 files down, press Shift + mouse click, and Alchemy would automatically select these additional 10 files, for a total of 11 files selected for loading.

Lastly, hopefully you guys can "unleash" Alchemy's ability to use multi core, powerful cpus when analyzing in spectral and additive engines. I keep coming back to the fact that I'm only using 12% of my cpu :(

Thanks, again!
User avatar
ZenPunkHippy
KVRAF
 
10272 posts since 18 Jun, 2008, from Melbourne, Australia

Postby ZenPunkHippy; Fri Apr 06, 2012 1:23 am

Hi,

Mapping samples and improvements to analysis / resynthesis are on both our list of things to improve for Alchemy v2. Shift-click to select multiple files has been fixed for v1.30.

CPU when when importing files is heavily dependent on CPU speed and file size., but I don't know if it uses multiple cores. Again, that is something we will investigate for v2.

Peace,
Andy.
iamyourfather
KVRist
 
274 posts since 7 Aug, 2010, from London, UK

Postby iamyourfather; Sun Apr 15, 2012 4:46 am

BLSheep04 wrote:
Perhaps in an upcoming update, Camel Audio can have its own SFZ/Camel audio editor to make these multi sampled, velocity independent, round robin instruments. Maybe Alchemy could blend multiple samples for added realism (ie: individual samples at different volume levels can split the difference). In the editor, drag and drop of multiple samples into appropriate MIDI "columns" and "rows" would be awesome, with batch scripting in additional to individual and group scripting. In the editor, maybe you could have hybrid audio engines, where some notes sound better in the lower keys with additive, whereas maybe some of the upper notes might sound better with spectral. Just ruminating here.



Absolutely the single most wanted Alchemy feature from me, would transform Alchemy IMHO. Preach on Brother ! :)

ZenPunkHippy wrote:Hi,

Mapping samples and improvements to analysis / resynthesis are on both our list of things to improve for Alchemy v2. Shift-click to select multiple files has been fixed for v1.30.

CPU when when importing files is heavily dependent on CPU speed and file size., but I don't know if it uses multiple cores. Again, that is something we will investigate for v2.

Peace,
Andy.


Bloomin' marvellous... can't wait for this :D
KungKrille
KVRian
 
926 posts since 6 May, 2006, from Sweden

Postby KungKrille; Sun Apr 15, 2012 8:32 am

I have created a SFZ for you that you can download here. I don't think there are any legal issues with this but if there is I'll remove the link.

Just a couple of things to be aware about. As you have already noticed the samples are not trimmed so the samples won't trigger immediately. You have to cut the silence in the audio files yourself. There are software that can do this automatically on all files in one session like ESC 3 and Wavosaur (I think).

I have put the files in velocity groups so if you want to tweak the values you only have to edit 3 places in a text editor. I have also added a volume to each group if you find the lower velocity groups too silent. When you import the SFZ make sure "Max Velocities" is set to "All", then change "Granular" to "Sampler" in the source editor and turn off "Velocity" modulator for the "Master Amp".

I don't know if this is what you need but maybe you and others will find this file useful. Too bad I'm not the owner of the samples or that Alchemy supports the sample offset opcode, otherwise I could have fixed the timing for you as well.
Image
BLSheep04
KVRer
 
28 posts since 21 Dec, 2009

Postby BLSheep04; Tue Apr 17, 2012 11:32 am

KungKrille wrote:I have created a SFZ for you that you can download here. I don't think there are any legal issues with this but if there is I'll remove the link.

Just a couple of things to be aware about. As you have already noticed the samples are not trimmed so the samples won't trigger immediately. You have to cut the silence in the audio files yourself. There are software that can do this automatically on all files in one session like ESC 3 and Wavosaur (I think).

I have put the files in velocity groups so if you want to tweak the values you only have to edit 3 places in a text editor. I have also added a volume to each group if you find the lower velocity groups too silent. When you import the SFZ make sure "Max Velocities" is set to "All", then change "Granular" to "Sampler" in the source editor and turn off "Velocity" modulator for the "Master Amp".

I don't know if this is what you need but maybe you and others will find this file useful. Too bad I'm not the owner of the samples or that Alchemy supports the sample offset opcode, otherwise I could have fixed the timing for you as well.


Wow, thank you! I'll give this a run through when I get a chance to breathe.
padillac
KVRist
 
334 posts since 27 Nov, 2011

Postby padillac; Sat Apr 21, 2012 4:23 pm

Yeah I've found importing multiple samples in Alchemy to give me horrible, unusable results. I have enough trouble getting the settings right for one sample, so I don't expect multiple samples to work at all (my first question is what does the sole "root note" select box do when I have multiple samples, as well as the range selector?)

I've just been command-clicking each sample file (painful in its own right), and they have the note information embedded in the audio header, as well as in the file name. I'll have to experiment and see where exactly Alchemy is getting the note information and what it does with it on the multiple samples.

It sounds like the way to go for multiple samples is an SFZ file. I'll have to give that a go.

Also I wonder if there are any factory or pack presets that use SFZ. There have to be some that use multiple pitched samples. I'll need to hunt those down and study them too.
User avatar
ZenPunkHippy
KVRAF
 
10272 posts since 18 Jun, 2008, from Melbourne, Australia

Postby ZenPunkHippy; Sun Apr 22, 2012 12:00 pm

When importing multiple samples via the Import Audio browser or via an SFZ the "Root Note" setting on the GUI is ignored. An SFZ specifies (or should for better results) the root note. When importing multiple files (Ctrl-click) the root note is taken from the file name. If the root note is not specified in the SFZ or file name automatic pitch detection will be used.

Also I wonder if there are any factory or pack presets that use SFZ. There have to be some that use multiple pitched samples. I'll need to hunt those down and study them too.

Basically any preset that references multiple samples in a single source will have originally loaded the samples from an SFZ file. However, once the preset is saved the SFZ Is no longer referenced and the individual sample file references are stored in the preset.

Peace,
Andy.

Moderator: Camel Audio Mods

Return to Camel Audio