Modulate a signal with Audio Input

Mar 30, 2008 at 11:53am

Modulate a signal with Audio Input

Hey!,

I’m new to max/msp but I found a nice project which I want to work on to learn a bit more about basic programming: http://little-scale.blogspot.com/2006/11/toriton.html

I was able to reproduce the patch succesfully, which is already a major thing to me, but the resulting sound doesn’t really satisfy me yet. I’ve tried to take a basic looper and modulate the speed (and other things) of the loop with an audio signal (once again the audio signal is provided by a solar cell). Problem is: I just can’t make it work.

This is the looper I’m using to work upon:

http://milkcrate.com.au/_other/downloads/max_patches/easy_loop/easy_loop_2.pat

Sorry for my noobish question, but I’m just starting out and I’m eager to learn. Can anyone please help me? Thanks!

#36616
Apr 3, 2008 at 1:16am

Anyone?

#125764
Apr 3, 2008 at 1:31am

How are you getting an audio signal out of a solar panel? Is it powering some 555′s or something?

Is it converting the sunlight into a control voltage running through an arduino or something?

Why a solar panel? I could think that a simple light sensor or ultrasonic sensor would give you more control and a better range.

#125765
Apr 3, 2008 at 7:43am

Hey Donk, thanks for the reply!

Sorry if I didn’t make myself clear in my first post. I’m not getting an audio signal out of the solar panel. I just directly connected the + en – of my solar panel to a male audio jack, which means it only produces higher and lower voltages.

I’d like to keep it simple, so no 555′s or arduino …

#125766
Apr 6, 2008 at 10:13am

So anyone got anymore ideas?
I’d be really thankful if anyone could help me.

#125767
Apr 6, 2008 at 10:34am

This is the code I’ve got right now. Maybe that helps a bit.
I’m just looking for a way to modulate the sample speed (and other parameters) by an incoming signal. It can’t be that difficult :)

max v2;
#N vpatcher 34 45 982 659;
#P origin 0 -4;
#P window setfont “Sans Serif” 9.;
#P newex 66 214 27 9109513 *~;
#P newex 67 120 28 9109513 *~ 5.;
#P window setfont “Sans Serif” 10.;
#P newex 68 54 96 9109514 adc~;
#P comment 716 28 87 9109514 Mod depth (ms);
#P flonum 716 51 55 10 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P comment 605 28 86 9109514 Mod Speed (Hz);
#P flonum 605 51 35 10 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 596 145 93 9109514 scale -1. 1. 0. 1.;
#P newex 567 99 42 9109514 cycle~;
#P user number~ 567 123 606 139 10 139 3 2 0. 0. 0 0. 20 0. 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 431 187 27 9109514 +;
#P comment 520 28 67 9109514 Loop Length;
#P comment 448 28 59 9109514 Loop Start;
#P newex 436 538 52 9109514 dac~ 1 2;
#P button 479 207 15 0;
#P newex 479 251 27 9109514 +;
#P newex 382 251 31 9109514 sig~;
#P flonum 522 50 63 10 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 448 51 58 10 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 382 51 45 10 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 515 299 108 9109514 loop 1 , loopinterp 1;
#P newex 515 251 51 9109514 loadbang;
#P message 260 299 31 9109514 read;
#P newex 419 357 72 9109514 groove~ loop;
#P newex 260 354 109 9109514 buffer~ loop 60000;
#P comment 381 28 48 9109514 Speed;
#P connect 24 0 25 0;
#P connect 23 0 24 0;
#P connect 3 0 1 0;
#P fasten 6 0 9 0 387 156 387 156;
#P fasten 5 0 2 0 520 329 424 329;
#P fasten 9 0 2 0 387 329 424 329;
#P fasten 18 0 15 0 601 168 436 168;
#P connect 2 0 12 0;
#P connect 7 0 15 1;
#P fasten 15 0 2 1 436 280 455 280;
#P connect 2 0 12 1;
#P fasten 8 0 11 0 527 197 484 197;
#P fasten 11 0 10 0 484 232 484 232;
#P fasten 15 0 10 0 436 232 484 232;
#P fasten 10 0 2 2 484 312 486 312;
#P fasten 8 0 10 1 527 232 501 232;
#P fasten 4 0 5 0 520 278 520 278;
#P fasten 19 0 17 0 610 83 572 83;
#P connect 17 0 16 0;
#P connect 16 1 18 0;
#P fasten 21 0 18 4 721 106 665 106;
#P pop;

#125768
Apr 6, 2008 at 6:27pm

sounds like a stroll through the MSP tutorials is in order. Specifically, you will want to check out Tutorial 14 which covers sample playback with groove~.

Check out Tutorial 23 for techniques on how to get numerical values from signals. Also check out the peakamp~ and avg~ objects.

In general, going through the tutorials is going to radically improve your mental toolbox.

-ben

#125769
Apr 6, 2008 at 6:33pm

Thanks for helping me on my way, Ben.
I’ll definately check those parts of the manual out.

It’s just that it’s difficult to find my way inside the many possibilities of max.

#125770
Apr 6, 2008 at 9:15pm

I’ve used fiddle~ (search on maxobjects for it) to convert control voltage from my theremin, but i did it through a make control board.
The CV voltages were read by the make controller, and turned into values between 0 and 1024 which Max read and used fiddle to pitch shift a sample.

The key was the controller which took in analog signals and converted them into signals Max could read.

#125771

You must be logged in to reply to this topic.