Forums > MaxMSP

did I already reach the limits of my patching creativity?

December 29, 2013 | 8:32 am

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>



dtr
December 29, 2013 | 11:20 am

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


December 29, 2013 | 11:44 am

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



dtr
December 29, 2013 | 1:13 pm

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


December 29, 2013 | 1:22 pm

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


December 29, 2013 | 1:46 pm

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.



dtr
December 29, 2013 | 1:49 pm

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


December 29, 2013 | 1:50 pm

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


December 29, 2013 | 1:52 pm

@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 ; )


December 29, 2013 | 2:10 pm

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


December 29, 2013 | 2:18 pm

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


December 29, 2013 | 2:22 pm

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

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

*shrug*


December 29, 2013 | 2:24 pm

*shrug*

LOL


December 29, 2013 | 2:30 pm

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…


December 29, 2013 | 3:29 pm

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


December 29, 2013 | 4:06 pm

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>


December 29, 2013 | 5:24 pm

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


December 29, 2013 | 7:15 pm

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



dtr
December 30, 2013 | 1:01 am

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?


December 30, 2013 | 3:12 am

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!


December 30, 2013 | 3:45 am

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.


December 30, 2013 | 4:44 am

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


December 30, 2013 | 9:55 am

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.


December 30, 2013 | 10:15 am

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.


January 6, 2014 | 6:00 am

Hi Peter,

just to let you know I sent you some recordings,

all the best,

Nils


January 13, 2014 | 8:58 am

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



dtr
January 13, 2014 | 3:07 pm

and that sounds like…? ;)


Viewing 27 posts - 1 through 27 (of 27 total)