MIDIbox Forum: SD card polyphonic sample player - MIDIbox Forum

Jump to content

  • 3 Pages +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

SD card polyphonic sample player Rate Topic: -----

#41 User is offline   jojjelito 

  • MIDIbox Tweaker
  • PipPipPip
  • View gallery
  • Group: Programmer
  • Posts: 317
  • Joined: 15-July 08
  • LocationStockholm

Posted 18 January 2012 - 23:14

Looks nice, but as Hawkeye kind of inferred - try boarding an airplane with that thing and you'll see more of the inside of Gitmo than you want :hairy:

Still, I'm impressed by the compactness of the thing!

J
Zehntausende sitzen zu Hause und haben Angst.

#42 User is offline   mbira 

  • MIDIbox Newbie
  • Pip
  • Group: Members
  • Posts: 13
  • Joined: 29-July 09

Posted 07 February 2012 - 07:18

Hi guys,
I was sent to this thread, as I think I'm looking for something like this. Please pardon my newbie ignorance-I have experience building audio gear - preamps, compressors, tube amps, etc, but I'm still pretty new with this type of stuff.

I built a Megadrum, and I use it to convert audio signals to Midifrom marimbas where I put piezos in the keys. Right now, the megadrum is feeding my computer via USB and I am using Reason synth sounds.

I'd like to build an onboard hardware sample solution on each marimba and ditch the computer. I was sent here, but I'm confused if the specs I need would work if I build this.

My soprano marimba has 21 keys. I want to sample each key with at least 4 layers of velocity:
21 x 4 = 84 samples

I then would like to be able to store at least four patches of sounds. So will this sampler let me store 336 stereo (stereo isn't essential, but would be nice) samples at 44.1/16 bit if each sample were an average of one second (some would be longer, but most would be shorter.

I only need I think 6 notes of polyphony at the most (we only use two mallets at a time).

Can I switch between the four banks of sound with the push of a button?

Sorry again about coming in with so many questions. I've read over the thread, and I'm afraid I just don't know enough yet to answer these questions...

PS: if you're interested in seeing what I'm talking about in action, here's a live video from a show we were recently playing (using Reason as the sound module).

This post has been edited by mbira: 07 February 2012 - 07:18


#43 User is offline   Lee 

  • MIDIbox Newbie
  • Pip
  • Group: Programmer
  • Posts: 73
  • Joined: 09-October 11

Posted 07 February 2012 - 09:15

Hi,

Looks like an interesting application! It should just about be possible but you will need to get your hands dirty in the code. The project's constraints and tradeoffs are as follows:

- polyphony. This depends upon CPU speed (usually fixed at 120MHz if it's the LPC board) but also the speed of your SDcard, the length of the samples and your sampling rate (the code is set for 44.1 but other guys here use lower). By default you can get 8 notes polyphony on long samples but with shorter you could get 10,12 or more

- number of samples. By default this is 64 per sample bank (ie the number you want to play right now) so it could be possible to increase it - it depends how much memory is used on the processor. The memory is used to cache the cluster positions on the SDcard, and the longer the samples the more clusters - so trading off sample length (or lower bit rate) and you could increase the number of samples. I think you could easily go to 84 samples with no changes except the define at the top of the code which is set to 64

- velocity split. Currently the code only does amplitude modulation of the samples depending on velocity input. It should not be too hard to modify the midi receive routines to map to 4 sample sets depending on velocity, but you will have to add this code. I would recommend you build a 21 sample bank at your first velocity then add an offset for each velocity layer. The rest of the voice assignment code and sound output should work ok. You will have to make sure that if a note off is received then all the velocities are turned off. One thing you could add is to modify the bank file parsing to read in a start and end velocity for each sample (velocity layer) which would make it easier to create sound sets.

Finally, the project only currently supports mono samples. This is purely because SD cards are slow and the polyphony discussed about would be halved if using stereo sounds (though with short samples you may stretch to 5 or 6 notes polyphony with a fast SD card). You could though perhaps do something novel like only reading mono samples but mixing seperate left and right outputs and output lower note ranges on the left and upper on the right if that's useful ?

On the point about changing sound banks - yes it already responds to midi program change and i also have a rotary switch on the J10 port which directly allows selecting up to 9 sound banks at the turn of a switch.

Note that if you want to ditch the laptop, then you'll need megadrum to output real 5 pin DIN midi rather than a USB interface (as the LPC code here doesn't run the USB port in host mode). This should be trivial for you.

Good luck!

View Postmbira, on 07 February 2012 - 07:18, said:

Hi guys,
I was sent to this thread, as I think I'm looking for something like this. Please pardon my newbie ignorance-I have experience building audio gear - preamps, compressors, tube amps, etc, but I'm still pretty new with this type of stuff.

I built a Megadrum, and I use it to convert audio signals to Midifrom marimbas where I put piezos in the keys. Right now, the megadrum is feeding my computer via USB and I am using Reason synth sounds.

I'd like to build an onboard hardware sample solution on each marimba and ditch the computer. I was sent here, but I'm confused if the specs I need would work if I build this.

My soprano marimba has 21 keys. I want to sample each key with at least 4 layers of velocity:
21 x 4 = 84 samples

I then would like to be able to store at least four patches of sounds. So will this sampler let me store 336 stereo (stereo isn't essential, but would be nice) samples at 44.1/16 bit if each sample were an average of one second (some would be longer, but most would be shorter.

I only need I think 6 notes of polyphony at the most (we only use two mallets at a time).

Can I switch between the four banks of sound with the push of a button?

Sorry again about coming in with so many questions. I've read over the thread, and I'm afraid I just don't know enough yet to answer these questions...

PS: if you're interested in seeing what I'm talking about in action, here's a live video from a show we were recently playing (using Reason as the sound module).


#44 User is offline   mbira 

  • MIDIbox Newbie
  • Pip
  • Group: Members
  • Posts: 13
  • Joined: 29-July 09

Posted 07 February 2012 - 17:25

Great. Thanks for the thorough reply! I haven't yet done enough research on the components-to be sure I understand-so the currently loaded samples in the bank get loaded into memory on the processor? Are you having to read from the SD card during performance other than when changing banks? Does that only take a few secons or a few minutes? Just making sure this will work for us on stage...Have you measured latency? Regarding stereo, maybe I can modify the code to have half the polyphony and send two samples for every hit...

#45 User is offline   Lee 

  • MIDIbox Newbie
  • Pip
  • Group: Programmer
  • Posts: 73
  • Joined: 09-October 11

Posted 07 February 2012 - 18:10

Hi, the player reads directly from the SDcard during playing and doesn't buffer in RAM - the processor only has 64kB! This actually works well but due to the speed of the card the polyphony is limited.

When you change bank, it pre reads the positions of the sample data on the card (just the positions, not the actual data) which takes about 1 second - possibly faster depending on number of samples in the bank.

Latency is fixed which at 44.1k is 5.2ms

Cheers

View Postmbira, on 07 February 2012 - 17:25, said:

Great. Thanks for the thorough reply! I haven't yet done enough research on the components-to be sure I understand-so the currently loaded samples in the bank get loaded into memory on the processor? Are you having to read from the SD card during performance other than when changing banks? Does that only take a few secons or a few minutes? Just making sure this will work for us on stage...Have you measured latency? Regarding stereo, maybe I can modify the code to have half the polyphony and send two samples for every hit...


#46 User is offline   mbira 

  • MIDIbox Newbie
  • Pip
  • Group: Members
  • Posts: 13
  • Joined: 29-July 09

Posted 07 February 2012 - 20:48

Awesome!

Lee, you mentioned you are using a minimal setup for the processor. Do you have a link to the minimal setup? This will live in the instrument, so the less I need, the better. I have 5V coming off of the megadrum (schematic), and I can tie in to the MIDI coming directly out of the atmega and 6N138N.

#47 User is offline   Lee 

  • MIDIbox Newbie
  • Pip
  • Group: Programmer
  • Posts: 73
  • Joined: 09-October 11

Posted 08 February 2012 - 09:52

Read the section just below half way down this page: http://www.ucapps.de...core_lpc17.html (the schematic for the full LPC based board is around there too - the minimal bit is just the obvious parts of the USB connector, power regulator and capacitors, plus a jumper for the boot hold)

And then look at the links on the top of the wiki page here for the DAC and SD card connectors: http://www.midibox.o...d_sample_player



View Postmbira, on 07 February 2012 - 20:48, said:

Awesome!

Lee, you mentioned you are using a minimal setup for the processor. Do you have a link to the minimal setup? This will live in the instrument, so the less I need, the better. I have 5V coming off of the megadrum (schematic), and I can tie in to the MIDI coming directly out of the atmega and 6N138N.


Share this topic:


  • 3 Pages +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users