Forums > MaxMSP

Jun 22 2007 | 4:11 pm

Hi,

I’m doing some volunteer programming work at the moment building a musical instrument for children with mobility disorders. I’ve been given MaxMSP to do the job, but I’ve never used it before and time is running out, so if anyone can help me work it out I would really appreciate it. It should be very simple.

I’m getting a single INT (0-127) from the fiddle object, which is used as the controlling parameter. Depending on whether it is between 0 and 50, 50 and 100, and 100 and 127, it will play a choice of 3 parallel chords. The metronome should also be varied by increase or decrease in the control integer coming out of fiddle.

Thanks for your time. If I’ve posted this in the wrong forum, please advise and I’ll repost.

Kind regards,

Lex

Jun 22 2007 | 4:20 pm

PS: I should add that, while I have done the first 15-20 tutorials, I am not a programmer and am merely doing what I can to learn in my capacity as a volunteer. I have noticed on the forum that there are a lot of students trying to get their schoolwork done by other people, and I hope my request will not be construed as such. Any advice would be helpful.

Jun 22 2007 | 4:27 pm

Hi Lex,

What do you want to play chords with? A synthesizer? A sample? MIDI output?
What is the purpose of the metronome and what are the min and max values?
Could you post the patch that you already have?

Cheers,
Mattijs

Quote: Lex Moon wrote on Fri, 22 June 2007 18:11
—————————————————-
> Hi,
>
> I’m doing some volunteer programming work at the moment building a musical instrument for children with mobility disorders. I’ve been given MaxMSP to do the job, but I’ve never used it before and time is running out, so if anyone can help me work it out I would really appreciate it. It should be very simple.
>
> I’m getting a single INT (0-127) from the fiddle object, which is used as the controlling parameter. Depending on whether it is between 0 and 50, 50 and 100, and 100 and 127, it will play a choice of 3 parallel chords. The metronome should also be varied by increase or decrease in the control integer coming out of fiddle.
>
> Thanks for your time. If I’ve posted this in the wrong forum, please advise and I’ll repost.
>
> Kind regards,
>
> Lex
—————————————————-

Jun 22 2007 | 4:43 pm

Jun 22 2007 | 5:12 pm

Thanks guys,

1. The metronome is being used to trigger the chords at a faster or slower repetitive rate.

2. Min value 0 – Max Value somewhere around 130.

3. Fiddle is taking a pitch from a GSR2 sensor. At the moment I am using Speedlim to smooth the data, although this may not be the most efficient way.

4. I will use the data to control an FMSynth, or maybe the Operator synth in Ableton Live via Rewire. Ableton is my specialty, which is for some insane reason why they’ve asked me to do this work in Max (??).

How do I post a patch on this forum?

Thanks again,

Lex

Jun 22 2007 | 6:29 pm

"
How do I post a patch on this forum?
"

Lex, go to your patch, select what you want to post, hit copy, then go to your max post and hit paste. The output will look a bit like this:

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 79 162 91 196617 this is an example;
#P message 75 88 26 196617 test;
#P fasten 0 0 1 0 80 137 117 119 97 104 97 148 117 136 84 109;
#P window clipboard copycount 2;

Likewise, copy the above text and paste it into a max patch to do the inverse. Yes, it is magic.

Peter

Jun 22 2007 | 7:21 pm

Couple of things:

fiddle~ generally will not track pitches below MIDI 48, so you’re not
going to get much out of the 0-50 range. Also, 100-127 is over three
octaves above middle C, so this is probably a little high as well.
(unless I’m misunderstanding; you’re tracking the range of the voice?)

Here’s an example of a way to grab the amplitude (though you could
always use the one coming out of fiddle, but this is a little smoother.

Peter McCulloch

max v2;
#N vpatcher 451 165 1051 565;
#P button 102 336 35 0;
#P window setfont "Sans Serif" 12.;
#P window linecount 1;
#P newex 170 288 134 196620 scale -70. 0. 0. 127.;
#P newex 170 259 75 196620 clip -70. 0.;
#P newex 129 188 61 196620 delay 10;
#P user number~ 434 117 544 136 12 3 3 2 0. 0. 0 0. 250 0. 0 0 0 221
221 221 222 222 222 0 0 0;
#P newex 251 65 52 196620 atodb~;
#P newex 251 37 122 196620 average~ 200 rms;
#P user scope~ 374 196 504 326 256 3 128 -127. 0. 0 0. 0 0. 102 255 51
135 135 135 0;
#P newex 251 119 166 196620 rampsmooth~ 200. 4000.;
#P flonum 170 321 94 12 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 102 306 35 12 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 129 223 89 196620 snapshot~ 0.;
#P newex 102 154 37 196620 t f b;
#P newex 102 25 39 196620 adc~;
#N vpatcher 20 74 620 474;
#P window setfont "Arial Black" 24.;
#P comment 339 38 141 791478296 PM.Round;
#P window setfont "Sans Serif" 9.;
#P comment 21 85 32 196617 Input;
#P comment 69 47 220 196617 Set amount to round to. (1’s , 10’s ,
0.1’s , etc.);
#P newex 67 92 19 196617 t f;
#N vpatcher 20 74 620 474;
#P window setfont "Sans Serif" 9.;
#P newex 50 98 24 196617 t 1.;
#P newex 50 76 32 196617 sel 0;
#P newex 50 50 60 196617 loadmess 0;
#P outlet 50 126 15 0;
#P connect 1 0 2 0;
#P connect 2 0 3 0;
#P connect 3 0 0 0;
#P fasten 2 1 0 0 77 119 55 119;
#P pop;
#P newobj 87 66 70 196617 p SafeDefault;
#P comment 180 286 158 196617 peter.mcculloch@gmail.com;
#N comlet Amount to round to. (1 = normal rounding , 10 = round to
nearest 10);
#P inlet 67 66 15 0;
#P newex 23 141 79 196617 vexpr \$f1/\$f2;
#P outlet 23 280 15 0;
#P inlet 23 108 15 0;
#P window linecount 2;
#P newex 23 187 259 196617 vexpr
[(\$f1>=0)*(int(int(\$f1)+(\$f1-int(\$f1)>=0.5)))+(\$f1<0)*(int(int(\$f1)-
(\$f1-int(\$f1)< -0.5)))]*\$f2;
#P window linecount 1;
#P comment 340 80 158 196617 Rounding that also works on lists;
#P newex 67 115 35 196617 sel 0.;
#P connect 3 0 5 0;
#P connect 5 0 2 0;
#P connect 2 0 4 0;
#P connect 8 0 9 0;
#P connect 6 0 9 0;
#P connect 9 0 0 0;
#P connect 0 1 5 1;
#P fasten 0 1 2 1 97 136 277 136;
#P pop;
#P newobj 102 106 57 196620 p Round;
#P newex 102 73 131 196620 fiddle~ 1024 1 20 3;
#P connect 2 0 0 0;
#P connect 0 0 1 0;
#P connect 1 0 3 0;
#P connect 3 0 5 0;
#P connect 5 0 15 0;
#P connect 3 1 12 0;
#P connect 12 0 4 0;
#P connect 7 0 4 0;
#P connect 4 0 13 0;
#P connect 13 0 14 0;
#P connect 14 0 6 0;
#P connect 2 0 9 0;
#P connect 9 0 10 0;
#P connect 10 0 7 0;
#P connect 7 0 8 0;
#P connect 10 0 11 0;
#P pop;

Jun 22 2007 | 8:04 pm

It’s a good thing you did not say you were a uni student,
because we would have given you a lot of grief. ;)

Anthony

Jun 28 2007 | 1:15 pm

Hi all,

I’ve managed to get my patch working in a basic sort of way, but now I’m having quite a bit of trouble getting my patch to talk to Ableton. The Max patch below should control channel 1 in Ableton via rewire, but it doesn’t want to talk. Any ideas? When I click on ad_rewire in the DSP settings it doesn’t want to move from the Off position, and gives me an error message saying ‘Is Rewire mixer running?’. All the sync options for Max are on in the Ableton preferences.

Thanks,

Lex

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 382 492 52 196617 noteout 1;
#P window linecount 2;
#P newex 386 425 51 196617 makenote 70 3000;
#P window linecount 1;
#P message 399 394 20 196617 40;
#P newex 268 488 52 196617 noteout 1;
#P window linecount 2;
#P newex 270 425 50 196617 makenote 90 2000;
#P window linecount 1;
#P message 277 398 20 196617 48;
#P message 162 398 20 196617 57;
#P newex 162 487 52 196617 noteout 1;
#B color 5;
#P number 247 156 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 247 174 40 196617 cycle~;
#P window linecount 2;
#P newex 162 424 50 196617 makenote 127 1000;
#P button 457 390 15 0;
#P button 333 391 15 0;
#P button 224 390 17 0;
#P window linecount 1;
#P newex 277 359 66 196617 split 80 100;
#P newex 407 363 60 196617 split 60 80;
#P newex 162 361 72 196617 split 100 120;
#P number 277 287 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 516 300 15 0;
#P number 543 257 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 543 236 38 196617 * 100;
#P newex 516 275 37 196617 metro;
#P number 516 208 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 277 240 64 196617 speedlim 50;
#P window linecount 2;
#P newex 247 202 57 196617 fiddle~ 2048;
#P user ezadc~ 186 129 230 162 0;
#P window linecount 1;
#P comment 564 203 100 196617 Variable Metronome;
#P comment 174 342 100 196617 Range 1;
#P comment 289 341 100 196617 Range 2;
#P comment 418 341 100 196617 Range 3;
#P window linecount 4;
#P comment 60 399 100 196617 change number here to chose the note you want to send to the make note command;
#P connect 7 0 13 0;
#P fasten 7 0 8 0 282 267 511 267 511 195 521 195;
#P connect 29 1 30 1;
#P connect 29 0 30 0;
#P connect 28 0 29 0;
#P connect 15 0 28 0;
#P connect 26 1 27 1;
#P connect 26 0 27 0;
#P connect 25 0 26 0;
#P connect 16 0 25 0;
#P fasten 13 0 14 0 282 331 167 331;
#P connect 14 0 24 0;
#P connect 24 0 20 0;
#P connect 20 0 23 0;
#P fasten 20 1 23 1 207 449 188 449;
#P connect 14 1 17 0;
#P connect 22 0 21 0;
#P connect 5 0 6 0;
#P connect 21 0 6 0;
#P connect 6 2 7 0;
#P connect 13 0 16 0;
#P connect 16 1 18 0;
#P fasten 13 0 15 0 282 331 412 331;
#P connect 15 1 19 0;
#P connect 8 0 9 0;
#P connect 9 0 12 0;
#P fasten 8 0 10 0 521 230 548 230;
#P connect 10 0 11 0;
#P connect 11 0 9 1;
#P window clipboard copycount 31;

Aug 10 2007 | 7:12 am

Hey man,
I have the same problem.
Did you find an aswer?

Thanx
Peer

Aug 10 2007 | 7:59 am
Aug 10 2007 | 8:29 am

But I have these ‘rewire mixer not connected’ problem.
And I read some other things on the forum and it seems that everyone is not crazy about ReWire…so now I’m checking Soundflower which seems to work but I still don’t have a signal in Live….but I’m going on fighting and searching.

Thanx so far
Take care

Aug 10 2007 | 8:46 am

Hey Mattijs,
do you still soundflower or did you switch to another device?

Aug 10 2007 | 12:12 pm

Quote: jazzisfaction wrote on Fri, 10 August 2007 10:46
—————————————————-
> Hey Mattijs,
> do you still soundflower or did you switch to another device?
—————————————————-

Hi jazzisfaction,

I still use soundflower, but without soundflowerbed (because of the increasing latency mentioned before on the forum). Instead of soundflowerbed I use the aggregate device. On a G5, working with Logic, this results in the output getting more and more corrupt with clicks and distortion until after 10 minutes it is almost gone. On Mac Pro there is no problem.

So on the G5 I haven’t found a solution yet, on Mac Pro I use soundflower with an aggregate device and that works perfectly.

Mattijs

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

Forums > MaxMSP