did I already reach the limits of my patching creativity?

Dec 29, 2013 at 8:32am

did I already reach the limits of my patching creativity?

I have made an oscillator out of chromatic samples using the polybuffer object. Each buffer inside the polybuffer has the recording of one tone. Everything is working well except for a very annoying “click” each time the buffer (=midinote) is changed which messes up everything. Is there a solution? Please help!

<code>

– Pasted Max Patch, click to expand. –

</code>

#276876
Dec 29, 2013 at 11:20am

Without looking at your patch, are you fading your samples in and out with a short [line~] or something similar?

#276880
Dec 29, 2013 at 11:44am

I can’t use line~ in my patch, the oscillator has to be able to make a big glissando (glide) without any interruptions..

#276881
Dec 29, 2013 at 1:13pm

Sorry I misread and thought you were using [poly~].

#276883
Dec 29, 2013 at 1:22pm

I’m trying to do this with poly too, I guess this really is impossible with Max..

#276886
Dec 29, 2013 at 1:46pm

Not impossible, just a bit of a pain. (But this is true in most DSP languages) If you have two different samples you need to read from both of them at the same time and cross fade.

#276890
Dec 29, 2013 at 1:49pm

Limits of Max? Don’t think so. Limits of your patching creativity? Perhaps ;)

#276891
Dec 29, 2013 at 1:50pm

thank you for your comment. I already tried using crossfades instead, but if I make big fast jumps,
the volume-sliders don’t seem to be fast enough to follow. Do I need a super-computer for this? : )

#276892
Dec 29, 2013 at 1:52pm

@loadmess: I already tried out so many patches. I’d gladly pay someone who thinks this is possible : )
remember I’m using over 100 recordings to make a single oscillator, a big jump requires easily 50+ crossfades in less than a second..

seems like I also get more replies when using a more provoking title for my topics ; )

#276893
Dec 29, 2013 at 2:10pm

In the absence of an alternative suggestion, I should shy from commenting but I think your frustration (I’ve read all the other threads) has resulted in an approach that seems flawed, rather than Max itself. It strikes me as very heavy-handed to use 100+ samples to get the sound of 1 oscillator. Someone else suggested using [wave~] and loading your sample into a buffer; surely this makes more sense? There are also numerous threads on here about waveshaping and (re-)creating unique oscillators.

Sorry not be more constructive/helpful

Brendan

#276894
Dec 29, 2013 at 2:18pm

for example, from the toots:

http://cycling74.com/wiki/index.php?title=MSP_Filter_Tutorial_3:_Analog-Style_Synthesis

and Peter’s own contributions to this thread:

http://cycling74.com/forums/topic/oscillators-train-and-triangle-or-something-else/

(I’m assuming this thread relates to an earlier question regarding a customised oscillator – if not, erm, oops sorry)

Brendan

#276895
Dec 29, 2013 at 2:22pm

or… emailing the people who designed the original softsynth oscillator?

BTW, were we ever told what the samples came from to begin with?

*shrug*

#276897
Dec 29, 2013 at 2:24pm

*shrug*

LOL

#276898
Dec 29, 2013 at 2:30pm

It’s all in the implementation for crossfades. You need an equal power cross fade. There should be one in the M4L abstractions. (M4L.bal1~ ?)
If there’s a slider involved, that’s probably not going to work well, since it needs to change at signal rate. (I.e. you should be able to control your oscillator with a signal)

I’d also encourage you to use fewer samples, especially if these are from an oscillator. One sample per three half-steps is typical for samples of acoustic instruments, and I’d imagine you could probably get away with less.

Inflammatory titles may get more notice, but when used too often they may get you ignored by the old-timers…

#276900
Dec 29, 2013 at 3:29pm

thanks a lot guys, I will investigate the given options. I changed the title of the topic : )

#276905
Dec 29, 2013 at 4:06pm

P.S. So how much money we talking about?…

Here’s a version that uses stepped subdivisions per octave. (one chunk of buffer~ per octave) Uses a linear crossfade to go between the two oscillators.

Can’t upload the files directly, but here’s TableSaw.js:

function generate_harmonics(base_freq,sample_rate,start_sample,length)
{
fib_a = 1;
fib_b = 1;
fib_tmp = 1;

fib_max = (0.5*sample_rate) / base_freq;

for (i = 0.; i<length; i += 1.) {
v = 0.;
for (fib_a = 1, fib_b = 1; fib_a<fib_max; fib_tmp=fib_a, fib_a = fib_a+fib_b, fib_b=fib_tmp) {
amp = 1/Math.pow(fib_a,0.75);
v = v + amp * Math.sin(fib_a*2.*Math.PI*i/length);
}
outlet(0,i+start_sample,v*0.4);
}
}

And here's TableSaw.maxpat:

<code>

– Pasted Max Patch, click to expand. –

</code>

#276910
Dec 29, 2013 at 5:24pm

Peter, did you made this patch for me? Thanks a lot!
I’m very curious to see it in action ..but I’m afraid I’m doing something wrong.

I copied your text (starting from “function generate…” till “outlet(0,i+start_sample,v*0.4);}}”) into a text file which I renamed to TableSaw.js.
In Max I get the following error:

-tableSaw.js: Javascript SyntaxError: Illegal charachter, line 1

I’m sorry/embarrassed I know so little about programming..it’s probably something very simple.
If your patch works we can certainly discuss a “reward” : )

greetings from belgium,
Nils

#276912
Dec 29, 2013 at 7:15pm

Hi Nils, I’ll see if I can put it up on Dropbox/Yousendit/etc. later.

#276919
Dec 30, 2013 at 1:01am

Ah so all this relates to this http://cycling74.com/forums/topic/payed-job-custom-oscillators/ ?

How about a link to that softsynth?

Is it VST/AU? Why not use it in Max?

#276926
Dec 30, 2013 at 3:12am

I can’t use the softsynth because the oscillators are cut down to chromatic samples.
It concerns vintage electronic instruments like the trautonium on which the ability of
playing microtonal intervals in glissando like movements was one of the great benefits..

Thanks Peter!

#276936
Dec 30, 2013 at 3:45am

Ok, everything’s working now. When I clicked the bang “generate fibonacci…” I got an error again, the .js file showed up in Max and seemed to contain completely different text. I pasted the text again in this window and now it works. I’m off for some testing.

#276943
Dec 30, 2013 at 4:44am

Peter,

These crossfades are working wonderfully well. Very interesting patch. I tried to load 2 samples of my own to check if the timbral difference between them would be audible. But since their frequency is different (an octave) they don’t go in unison. There is also quite a bit distortion. I assume the patch isn’t ready for this.

Would it be possible to modify it so I can load 7 samples (miditone 24, 36, 48, 60, 72, 84, 96) to have them crossfaded into an oscillator? This way I can check if 7 samples is enough for smooth transitions. It’s possible I will need stepped subdivisions per tritone (or less..) for some of the more bright sounding oscillators. Concerning costs please send me an email: nils.vanderplancken@telenet.be

#276948
Dec 30, 2013 at 9:55am

It’s very possible. You would need to use lookup tables to specify the boundaries rather than doing them via arithmetic, but it’s very doable.

You’ll notice that I’ve specified as multiples of 100 Hz. This is because it will always be an integer subdivision if the sample rate (e.g. 441 samples). You’ll get tuning errors with frequencies that don’t map to integer subdivisions (say, 101 Hz). One solution is to use longer oscillator samples and divide the fundamental frequency. It’s not perfect but it will be an improvement. Can contact you off list.

#276979
Dec 30, 2013 at 10:15am

Yes you can contact me.

I have some further questions, but it might indeed be better to discuss them privately. I have to admit I will have to read your post a couple of times to fully understand, most of this stuff is new to me as I’m still learning Max.

Again, if it is possible to hire you to make a fully working patch, I’m very interested. You seem to know what you’re doing.

#276981
Jan 6, 2014 at 6:00am

Hi Peter,

just to let you know I sent you some recordings,

all the best,

Nils

#277515
Jan 13, 2014 at 8:58am

for those who were/are interested in this topic:

2d.wave~ is the way to go to make an oscillator out of multiple samples.

I speed-shifted all my recorded notes to the same frequency (same waveform length). After this I made sure that all my recordings are “loopable” and that they are all existing of exactly the same amount of samples. After this I pasted them all together in 1 bigger sound file.

2d.wave slices this recording (loaded in a buffer) in as many parts as I have recorded notes and makes it possible to scroll both horizontally (=speed of the sliced parts = frequency) as vertically (crossfading between sliced parts) through the buffer.

I made it work so that for each frequency the right sliced buffer part with it’s own distinctive wave shape is chosen. Problem solved : )

#278090
Jan 13, 2014 at 3:07pm

and that sounds like…? ;)

#278136

You must be logged in to reply to this topic.