Wave sample piano with 4 velocity layers


#1

wave sample piano with 4 velocity layers (but without the release samples)

Hello Community,

I've had an axoloti for a few days now and I think it's great. Actually I only wanted to test it for Midi Din to USB and back. But I think the patches and their possibilities are great.
I also like the independence from the PC. For a long time I'm looking for a piece of hardware to play my own sound files (SF2) without a PC. I don't seem to be the only one looking for something like this. Now that I wanted to know how powerful the Axoloti is, I searched for samples for a piano under this link:

The City Piano is a fully sampled Baldwin Baby Grand with 4 velocity layers and release samples. It is free and public domain. Do anything you like with it.
http://www.mediafire.com/download/4vmjle2acsy1xd2/City_Piano_Close_Samples.zip

Now I've run into some trouble. First of all, I converted the samples from stereo to mono and at the right rate. In stereo, I use too much resources on the Axoloti. Here I used the software sox.

http://sox.sourceforge.net/
I used sox with the following parameters: -t raw -e signed-integer -b 16 -c 1 -r 48000

The notes were then renamed. Note and velocity response. Example Grade: 21
Quiet: 21 = 021
Average: 21 + 127 = 148
Strong: 21 + 127 + 127 + 127 = 275
Loud: 21 + 127 + 127 + 127 +127 = 402

These 4 files result in the 4 velocity layers for the Midi-Note 21.
Then I have to evaluate the velocity dynamics to play back the correct file.

See my patch: homaMidiKeyV1.axp (12.3 KB)

The samples (in the required format) are available here: https://1drv.ms/u/s!Am2OR1KBwBangbkIFsnSAlsd2n6Mog

Currently, the patch can play up to 14 notes. That's enough for Elise, but other pieces are getting cramped. Especially if Sustain is used. Then errors occur.
Here is also my question if it is possible to discard the first (oldest) notes and play back the current (new) ones when reaching the limit of 14 under "poly"?
How would that be possible?

Another problem is cracking with very fast playing. I already use a fast SD card here.
SD-Card SanDisk Ultra with the specification: A1 Minimum random read 1500 IOPS

I also recommend the virtual keyboard for testing, as it changes the velocity/volume with the mouse depending on the click position: http://www.tobias-erichsen.de/software/virtualkeys.html

Or play some piano midi files with a midiplayer like http://falcosoft.hu/softwares.html

To try creating directory on sdcard: /homaMidiKeyV1
and copy all 353 files noteXXX.raw from noteXXX.7z to your SD-Card!

Have fun!


#2

regarding issues with fast playing you might want to read some of the more recently used samples into memory so that playing a note over and over wont load it each time. Effectively use the ram as an sd cache, though designing caches isnt necessarily easy.

regarding poly allocation, you might need to roll your own voice handler that allocates voices in a fifo stack.

I actually wanted to start working on a soundfont player for axoloti using tinysoundfont, you seem a lot farther in that direction than I am at the moment but I can catch up pretty fast, if you'd like to work together on it feel free to pm me

on another note, I looked at your patcher and noticed that instead of velocity crossfading you used velocity to scale the output, which might sound better if you used different volume adjustments depending on which sample is used, since your current setup will probably scale the low velocities down too much in volume. in other words, scale the velocity vca in such a way that the volume difference between two adjacent velocity levels (e.g. 88 and 89) is always consistent. Traditionally velocity layers are implemented with a crossfade between the velocity level below the actual velocity and the one above it, but your system is probably better for the hardware if the vca adjustments are made. I'll try the edits myself if I have time later today.


#3

This is really nice, just tried it out right now. homa, did you ever develop this further? watamacha?