SynthMaker

Saving - Loading Wave Arrays to - from disk

Archive · 2008 6 old posts

From the original SynthMaker forum (2004–2014), with its members’ names and dates.

Tzarls ·

Hi. This is my first post in this forum. I´ve been using SM for abotu 15 days (still have another 15 days before my demo expires, and then I´ll have to seek for some way to get the $$ to buy this software!).

I built an instrument a few months ago using Reaktor (some graduate work) and it turned out to be a good idea for a commercial VSTi, speacially since there´s no other VSTi in existance that simulates the instrument I´m working on. So I started looking at some way of making my instrument a real VSTi without the need to learn C++ or the like (I used to do some basic programming, but that was many years ago). Then I found SM, and downloaded the demo to check if it had everything I needed to make my project come true. In about 10 days I had "translated" my original Reaktor schematic into a SM schematic. and I´ve spent the next five days improving the "code" and adding a few options and stuff like that. The instrument works quite well, with about 10 - 15% CPU usage, almost the same as similar comercial VSTis. Of course, I´m only at about 25% of what I want it to be, but the hard part is already there (I guess).

The biggest problem with my instrument is file size. Since my instrument uses samples, my .dll is quite big - about 46Mb (compressed) with the test samples. And once I begin developing the "real" sampleset, with variations and such, that number is sure to get bigger. So I´d like to have some way of storing and loading entire wave arrays.

Let say, for example, I´m building a violin simulator. I want to simulate the sound of different brands of violins. The main code would be the same for every brand, only the samples would change. So, the user loads the VSTi without the samples (faster load) and then clicks the "open" button, opens a browser windows, clicks the "stradivarius.arr", or the "gagli.arr" or whatever, and it loads the entire content of the file to a wave array, making the sampleset available for playback.

Of course the corresponding modules could include a password option, like a float to be mixed with the wave data, so of you load with the wrong float, everything sounds....well, wrong! That way you won´t have anyone loading your samples from ther own VSTis if you don´t want so.

I´ve read a lot of request like this in the forum, but I´m not sure if they´re asking for the same functionality I am.

Please feel free to post comment and or corrections to this idea.

infuzion ·

Tzarls wrote: ...So, the user loads the VSTi without the samples (faster load) and then clicks the "open" button, opens a browser windows, clicks the "stradivarius.arr", or the "gagli.arr" or whatever, and it loads the entire content of the file to a wave array, making the sampleset available for playback. Of course the corresponding modules could include a password option, like a float to be mixed with the wave data, so of you load with the wrong float, everything sounds....well, wrong! That way you won´t have anyone loading your samples from ther own VSTis if you don´t want so.

I would think that loading a text file that has the files listed for that sample set/wave array is the way to go here. And very possible with existing primitives.

Nothing is uncrackable; for every week you spend trying to make a uncrackable algorithm (that can still load fast), it will take only a day for the crackers to hack it. Not trying to be a downer, but that is life. There are some members-only threads here that talk about how to add protection to VSTs, but without a dongle I'd say not really worth the effort.

matti ·

Who cracks SM plugs anyway? They're not that "sweet" that anyone would be intrested. (they don't work in OSX... which is the prime OS for "cracker musicians" nowdays)

And to the original question... It would be very possible(maybe even easy) to build such a wave system yourself! Just add up all the data to one wave, do the descrambling modifications(just remember it's going to be saved as a 16bit wave) and save it to disk. Then save a text file(you can descramble that too) with information of where to cut the big wave to get the right sized pieces... Or do it in multiple waves like Infuzion suggested + a text file).

Tzarls ·

That could work. The only showstopper is, at least for me, the 16 bit limit.

About the "everything is crackable" - yes, I know that. I just wanted to have my samples secured from the regular non-technically-educated ones, and if my samples got cracked and redistributed, at least I´ll know they were good enough to be worth the effort...

Tzarls ·

One question that just came to my mind.... if, say, I have my wavearray loaded with samples recorded at 44.1/24 bits, and use the generated vsti in a DAW in a 192Khz/24 bits session, what would happen?

matti ·

Tzarls wrote: One question that just came to my mind.... if, say, I have my wavearray loaded with samples recorded at 44.1/24 bits, and use the generated vsti in a DAW in a 192Khz/24 bits session, what would happen?

Depends on your implementation. If you have a resampler/sampleplayer that takes the samplerate as a factor they should play just fine. If not, they get pitched up.

About the 16bit limit. There might be some way to overcome this.. For example saving a 32bit data in two 16bit samples of a wave file. You couldn't open this in a normal wave editor after that, but it should work with your SM schematic if you decode it correctly.

I've already requested support for higher bitrate wave files -> here. I believe SM already opens 24bit wave files? Not sure tho..

Wrote something here? To have a post removed or your name hidden, write to [email protected].

Before your first post

A few rules keep this a friendly place. You agree to them once.

Shown next to what you post, here and in the app. It doesn’t have to be your real name: 3–24 lower-case letters, digits or _ (capitals become lower case, spaces become _).

    Then your post goes up straight away.

    Delete this reply?

    Open it in SynthMaker?

    It goes on the track you’re editing there, in place of that track’s sound, and into My sounds. Your other tracks stay as they are.

    Want to keep that track’s sound? Start a new song in SynthMaker first (Song › New song), then open this.

    Report this reply?

    Only the developer reads reports. The person isn’t told who reported them.

    What’s wrong with it?

    Block this person?

    You won’t see their posts and replies here any more. They aren’t told, and you can unblock them at any time.

    People you’ve blocked

    Their posts and replies are hidden from you. Unblock someone to see them again.

    The community rules

    A few rules keep this a friendly place. Everyone agrees to them once, before their first post.