Cabbage Logo
Back to Cabbage Site

How do i integrate a file loading wavetable system?

How would i implement this? I want to use vco2init to load wavetable files into the plugin and be able to play them back inside of it. By this i mean being able to load them through the interface, as a user (I know there is a file whatchamacallit but i dont know how i would take the file from that and use it elsewhere) I do not really understand how i would do this, as i have looked at the manual and it all completely blows over my head. I am debating using diskin to just play the very small single cycle waveforms i created with the SCW editor (a good tool, check it out) in a loop so it functions the same. Im sure this is common knowledge to know how to do this but i am quite stuck.

Here is a basic sample loading instrument. You should be able to modify it to suit your needs. Right now it loads a sound file and passes it to a table. When you press a note on your keyboard it will play back that file, albeit in the wrong pitch, but it should be a start at least.
LoadSample.csd (914 Bytes)

1 Like

Thank you

This one use vco2init.

SampleLoadvco2init.csd (1.2 KB)

1 Like

I’ll test this out tommorow but I reckon this will be exactly what I need. Thanks!

Note there is one caveat here. Tables must be power of 2 size. When you are creating your waveforms, choose something to the power of 2 if you can :wink: That waveform generator seems pretty neat.

I have no idea what this means but I’m assuming a caveat is a cycle? So in theory if I somehow duplicate it across so it is a double cycle wave it will work?

No, I just mean that tables have to be power of two sized.

ive been playing with the sample loader. how would i get the notes played to correspond to the pitch of the sample?

I thought you were using single cycle wave-forms that you generate using the online tool you referenced? Their pitch is determined by the number of samples in the cycle and the sampling rate. Or are you talking about something else?

i am talking about the sample loader withput vco2

vco2init has a frequency parameter you can use to specify what the frequency of the sample is. :+1: