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: -----

#1 User is offline   Lee 

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

Posted 13 November 2011 - 17:48

Hi all,

I've just finished a basic implementation of a polyphonic sample player. It basically takes a bank of sample files from the SD card and allows playing in real time. You'll need an LPC1769 based MIOS32 device, the SD card interface and a I2S DAC...

Further details and links to files on the wiki here: http://www.midibox.o...d_sample_player

Many thanks

Lee

#2 User is offline   Hawkeye 

  • MIDIbox Guru
  • PipPipPipPip
  • View gallery
  • Group: Programmer
  • Posts: 1,091
  • Joined: 24-July 10
  • LocationGermany, Munich

Posted 13 November 2011 - 18:00

Very nice project, thanks for adding docu and code!
In conjunction with e.g. a SEQ V4L, one could for example build a cool portable rhythm production studio!
Or use it as the worlds cheapest piano multisampler (different samples for every note) e.g. for an old midi keyboard... Great stuff!

Greets!
Peter

#3 User is offline   igi 

  • MIDIbox Newbie
  • Pip
  • View gallery
  • Group: Members
  • Posts: 72
  • Joined: 30-March 10

Posted 13 November 2011 - 19:05

Cool!
:thumbsup:
LCD supported?(yet.)

Really nice!

Best regards, IGI

#4 User is offline   jojjelito 

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

Posted 13 November 2011 - 19:42

If we can load it with the old Korg M1 pianos we can haz an instant house piano module. Wonder if a 2nd hand M1 is cheaper though? Or use the VSTi - shudder.
Still, this would make a mighty cool Wavetable/DCO thingy if you don't have other plans in mind. PPG or VS for the masses.

This post has been edited by jojjelito: 13 November 2011 - 19:45

Zehntausende sitzen zu Hause und haben Angst.

#5 User is offline   ilmenator 

  • MIDIbox Guru
  • PipPipPipPip
  • Group: Frequent Writer
  • Posts: 1,120
  • Joined: 01-September 02
  • LocationTrondheim, Norway

Posted 13 November 2011 - 22:20

View Postjojjelito, on 13 November 2011 - 19:42, said:

Still, this would make a mighty cool Wavetable/DCO thingy if you don't have other plans in mind. PPG or VS for the masses.

Yay! :flowers:

#6 User is offline   Lee 

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

Posted 16 November 2011 - 23:50

It's weird that, as I do own an M1 I bought back in 1990, I also have the Korg M1 VST software, and obviously this hardware now! :frantics: And the original hardware is best! (though wait until I sample it, like I did my DW8000 which I have as a sample set running on the SD card player sounding great!!)

I've now got bank switching on the fly working too... Also out of the box the bank files support layering and zoning (ie layering = have same midi note on a line, with different sample. Zoning = just pick different sample for different midi note ranges). Pretty handy really! :ahappy:

View Postjojjelito, on 13 November 2011 - 19:42, said:

If we can load it with the old Korg M1 pianos we can haz an instant house piano module. Wonder if a 2nd hand M1 is cheaper though? Or use the VSTi - shudder.
Still, this would make a mighty cool Wavetable/DCO thingy if you don't have other plans in mind. PPG or VS for the masses.


#7 User is offline   jojjelito 

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

Posted 17 November 2011 - 08:25

I have to try the Adventure Kid AKWF in order to have some fun. It's a massive pack of some 4350 single-cycle waveforms. Get it! Love it!

If I get really bored I could load those into my Prophet VS or use slightly less magic and get them into one of my Shruthis. Or just refill it. Choices choices...
Nahh, SD card convenience plus dedicated hardware will win the day :flowers:

I still get 90's flashbacks from the M1 presets! One day I'll grow up, but that was my guilty pleasures moment of today ™.
Zehntausende sitzen zu Hause und haben Angst.

#8 User is offline   ilmenator 

  • MIDIbox Guru
  • PipPipPipPip
  • Group: Frequent Writer
  • Posts: 1,120
  • Joined: 01-September 02
  • LocationTrondheim, Norway

Posted 17 November 2011 - 08:57

View Postjojjelito, on 17 November 2011 - 08:25, said:

I have to try the Adventure Kid AKWF in order to have some fun. It's a massive pack of some 4350 single-cycle waveforms. Get it! Love it!

Very nice find, thanks for sharing!

#9 User is offline   Lee 

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

Posted 17 November 2011 - 10:27

The code currently is one-shot only, however it should be fairly easy to add a parameter to the bank file to indicate looping, with the constraint that the samples will need to be 256 samples (512 bytes) long due to the way the card data is read in a sector at a time...

Lee

#10 User is offline   jojjelito 

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

Posted 17 November 2011 - 10:51

Nice! It's getting better and better.

It would be really cool if there was a way to "unalign" the samples so that you could read and load up to a few sectors. Then it could discard the non-used data and have loop start, loop end and loop mode (fwd/rew/ping-pong/xfade) modes. But, thar's other dedicated things for that. Hardware samplers aren't really in vogue these days, but lo-fi loopers or wavetablers/DCOs are.
Zehntausende sitzen zu Hause und haben Angst.

#11 User is offline   Lee 

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

Posted 17 November 2011 - 12:26

It is possible, but this would be at the expense of polyphony. With using SD cards, they are slow to read compared to RAM (like you'd have on a classic sampler) and right now 8 reads in parallel is all that is possible. If your sample finished part way through a 512 byte sector, you would need to read part of another sector at the start which one effectively take up one 'slot' from the 8 reads... So to allow for this case on all voices, we'd be down to about 4 notes polyphony...

I'll have a play with this when I get the time and report back...

Cheers

Lee

View Postjojjelito, on 17 November 2011 - 10:51, said:

Nice! It's getting better and better.

It would be really cool if there was a way to "unalign" the samples so that you could read and load up to a few sectors. Then it could discard the non-used data and have loop start, loop end and loop mode (fwd/rew/ping-pong/xfade) modes. But, thar's other dedicated things for that. Hardware samplers aren't really in vogue these days, but lo-fi loopers or wavetablers/DCOs are.


#12 User is offline   Hawkeye 

  • MIDIbox Guru
  • PipPipPipPip
  • View gallery
  • Group: Programmer
  • Posts: 1,091
  • Joined: 24-July 10
  • LocationGermany, Munich

Posted 17 November 2011 - 13:57

Yes, maybe implement the option to hold a few very small (looped) samples in memory (those single-cycle waveforms) or other wavetable-ish stuff.
Me still haz some code of my old (1994) dos based mod player somewhere (which does sample stretching to obtain the played note pitch - good old amiga times :-)),
but then... this would be quite another project... Lee decides :)

Edit: on a second thought, SD storage is so big and cheap, one could totally create full note spectrum sample files of "unlimited length" offline, that means, if you have a nice single-cycle waveform, run a script that "renders" a samplebank for the SD player, as it is... not much work to do, and it runs on todays sd card sample player software :) and does not require further ram or processing power.

Greets,
Peter

This post has been edited by Hawkeye: 17 November 2011 - 14:28


#13 User is offline   jojjelito 

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

Posted 17 November 2011 - 14:43

View PostHawkeye, on 17 November 2011 - 13:57, said:

Yes, maybe implement the option to hold a few very small (looped) samples in memory (those single-cycle waveforms) or other wavetable-ish stuff.
Me still haz some code of my old (1994) dos based mod player somewhere (which does sample stretching to obtain the played note pitch - good old amiga times :-)),
but then... this would be quite another project... Lee decides :)

Edit: on a second thought, SD storage is so big and cheap, one could totally create full note spectrum sample files of "unlimited length" offline, that means, if you have a nice single-cycle waveform, run a script that "renders" a samplebank for the SD player, as it is... not much work to do, and it runs on todays sd card sample player software :) and does not require further ram or processing power.

Greets,
Peter


Hear hear! Some support for loop points and mode would be nice. The rest of the sample editing could and should be done offline on a proper computer. SD cards cost the same as a roll of film (anyone remember those?) so that's almost a throwaway.

Grits,
Johan
Zehntausende sitzen zu Hause und haben Angst.

#14 User is offline   Lee 

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

Posted 18 November 2011 - 00:52

Committed a major new version, this has a new format bank file, for example:

0x3b 0 0031 3b.raw
0x3c 1 0000 t_c3.raw

This is now: midi note number, 0=no sample hold, 1=sample hold, 0031 = envelope decay value, filename. The decay is experimental, but clearly 0000 = no decay, and higher numbers is a longer decay (up to 1023) - it's a decimal number.

I've tested a bank file with different sample sets zoned, some with sample hold and different decay values and it seems to work ok, but it's probably got bugs, and i'm not really happy with some stuff - but it's a step forward!

On the point around a RAM based wavetable player, that's not really a priority for me right now, though some of the SD card player can be reused for this type of purpose, but it is a major re-write. I'm interested in doing it, but i'll have to look at it later unless someone else wants to take it on..?

Thanks

Lee

#15 User is offline   Hawkeye 

  • MIDIbox Guru
  • PipPipPipPip
  • View gallery
  • Group: Programmer
  • Posts: 1,091
  • Joined: 24-July 10
  • LocationGermany, Munich

Posted 18 November 2011 - 10:37

Hi Lee,

cool - don´t worry about that ram based wavetable player - one can nicely precalculate samples and use the normal sd player :)

Greets,
Peter

#16 User is offline   magneticstripper 

  • MIDIbox Newbie
  • Pip
  • Group: Members
  • Posts: 4
  • Joined: 06-May 10

Posted 05 December 2011 - 16:23

Lee,
This project is amazing! i just built one this last weekend. The prototype is already integrated into my live setup. Please keep up the excellent work!
Cheers,
James F Ellis

#17 User is offline   Lee 

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

Posted 05 December 2011 - 18:42

Thanks! Out of interest, what do you use the player for?

Cheers

Lee

#18 User is offline   Lee 

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

Posted 05 December 2011 - 22:10

I've just added another minor but useful feature to the version in the SVN (hex and source) - it will now load bank files depending on MIDI program change. If you send a change to patch 1, it will load the bank file bank.1, patch 2 - bank.2 etc... If the patch number doesn't exist it will output nothing (no samples loaded) but upon sending a patch/bank that does exist it will then correctly load the bank and make noise again. :smile:

Hopefully this will make it easy to have multiple banks on the SD card and switch on the fly (loading a bank typically takes about a second for 64 samples, correspondingly less if your bank has less samples) - the LED on the board will be on during loading of the bank.

If anyone else wants any simple features let me know. I'm stuck for time a bit at the moment, but you never know if it's something simple!

Cheers!

Lee

#19 User is offline   magneticstripper 

  • MIDIbox Newbie
  • Pip
  • Group: Members
  • Posts: 4
  • Joined: 06-May 10

Posted 06 December 2011 - 06:21

Lee,
In its current manifestation, the sample player is providing the digital "concrete noise/abstract beat/abstract vocal/micro glitch" layer of a MB SEQ4 controlled mainly analog synth/drum setup. Formally, some samples are drumlike in sound and usage, others are textural and pad like. i am really amazed at the player's ability to do "micro edits" and "stutter cuts".
Lee, i have all kinds of suggestions for features. Alas, i am wary to make them for the fear my ignorance of all things "bit order" showing through....... Send a CC and all samples triggered afterwards play backwards? Parametric bit crushing? On the more realistic side: a hardware config file that would allow things like changing the midi channel (which i really need to do, so many things on channel 1).
You Rock!
Cheers,
James F Ellis

#20 User is offline   igi 

  • MIDIbox Newbie
  • Pip
  • View gallery
  • Group: Members
  • Posts: 72
  • Joined: 30-March 10

Posted 11 December 2011 - 18:42

Hi,really nice!

Some gate and trigger out could be nice for triggering external
envelope generators for analog VCA and VCF.
Perfect solution is some control surface with LCD and internal EG's witch support AOUT module, but
this is ( I guess) not easy hach.

Just gate and trigger is fine.

Best regards, IGI

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