Max and MaxForLive, Part 2: Programming in Max | J. Anthony Allen | Skillshare

Playback Speed


1.0x


  • 0.5x
  • 0.75x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 1.75x
  • 2x

Max and MaxForLive, Part 2: Programming in Max

teacher avatar J. Anthony Allen, Music Producer, Composer, PhD, Professor

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

    • 1.

      Introduction

      3:55

    • 2.

      Recap From Part 1

      1:42

    • 3.

      Modes: Presentation, Patching, Locked, and Unlocked

      5:03

    • 4.

      Learning How To Learn Max

      3:10

    • 5.

      Tools in the Patcher Window

      1:53

    • 6.

      Audio Controls

      4:38

    • 7.

      The Global Transport

      2:59

    • 8.

      The Inspector

      2:41

    • 9.

      Reference Files

      1:54

    • 10.

      Console

      1:28

    • 11.

      The Calendar

      1:39

    • 12.

      Tools Along the Bottom of the Patcher Window

      2:45

    • 13.

      Package Manager

      2:32

    • 14.

      Snippets

      2:35

    • 15.

      Image, Video, and Audio Libraries

      2:54

    • 16.

      Objects

      4:30

    • 17.

      Messages

      3:59

    • 18.

      Comments

      2:07

    • 19.

      Toggle

      3:04

    • 20.

      Buttons And Bangs

      4:03

    • 21.

      Number Boxes

      5:44

    • 22.

      Sliders

      7:01

    • 23.

      MaxForLive Objects

      1:42

    • 24.

      Everything Else

      2:27

    • 25.

      [+]

      7:02

    • 26.

      Number Boxes

      4:45

    • 27.

      Changing Message Boxes

      3:46

    • 28.

      Other Math Operators

      3:53

    • 29.

      Arguments

      4:16

    • 30.

      How Is This Useful?

      7:12

    • 31.

      Outputting MIDI Notes

      4:53

    • 32.

      Timing and Metro

      4:28

    • 33.

      Adding More Notes

      6:38

    • 34.

      Designing for the Future

      4:13

    • 35.

      A Few More Notes

      7:12

    • 36.

      Tilde (~) Objects

      3:15

    • 37.

      Audio Settings

      3:43

    • 38.

      Volume Control

      3:24

    • 39.

      Microphone Input

      2:53

    • 40.

      Simple Sound File Player

      5:01

    • 41.

      A Multi-Input Source

      5:29

    • 42.

      Delay Objects

      6:44

    • 43.

      Volume Control

      2:52

    • 44.

      Presentation Mode

      5:10

    • 45.

      UI Elements

      5:05

    • 46.

      Volume and Meters

      4:09

    • 47.

      Panning

      5:43

    • 48.

      Mute

      8:06

    • 49.

      Effects

      5:34

    • 50.

      "Patchers"

      12:08

    • 51.

      More Channels!

      7:52

    • 52.

      Debugging

      2:53

    • 53.

      Final Cleanup

      2:28

    • 54.

      Learning How to Learn Max

      2:42

    • 55.

      Bonus Lecture

      0:36

  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.

42

Students

--

Project

About This Class

It's time to unleash the full power of Max and create your own "secret weapon" tools for music production!

In this comprehensive class series, you'll discover my personal best tools and learn how to harness them to elevate your music production. Plus, I'll reveal an unlimited source of amazing (and free!) Max projects that you can customize to your heart's content.

Why Learn from Me?

With over a decade of experience teaching Max to thousands of aspiring creators, I know exactly what it takes to help you master this versatile platform. By the end of this series, you'll be amazed at your newfound abilities.


What You'll Get:

This class is packed with valuable content, incorporating my entire university Max curriculum. Get ready for an immersive learning experience!

This class has a ton of material. I've put my whole university Max curriculum into this class, so buckle up!

Designed for those with little or no existing experience working with Max, this sequence of classes is going to be divided into three parts. Part 1 focuses on using max to make music, finding great max patches, engaging with the max community, and understanding the max workflow. Part 2 focuses on the basics of Max programming, and Part 3 will get more advanced and dive in deeper with MaxForLive.


This is Part 2: Programming in Max. This class contains:

  • Max Programming: Building plugins, effects, and tools in Max and MaxForLive.

  • The Max Interface: How the Max windows make a welcoming canvas for you to start creating, even if you've never programmed before.

  • Max UI:: Learn to create unique projects by taking advantage of the UI (User Interface) objects in Max

  • Max Objects: Learn how to find the right object, and get to know how to use each object in Max for your projects.

  • Max Patches: We are going to build four projects together in this class, and I'll give you working final versions of those patches to practice with.

Why Choose this Course?

  • Designed for Beginners: No prior experience with Max (or any programming) necessary. This course is perfect for newcomers to Max looking to dive in headfirst.

  • Step-by-Step Learning: Divided into three parts, this course gradually builds your expertise from the basics to more advanced techniques.

  • Direct Instructor Support: As a committed instructor, I personally answer 100% of the questions posted in the course to ensure your success.


Mastering Max opens up a world of possibilities for your music production journey. Join the vibrant Max community and take your skills to new heights.

Jason Allen, renowned instructor and mentor to over 1 million students, is committed to your success. As an active participant in the course, he personally answers 100% of the questions posted, ensuring you receive the guidance and support you need.

Meet Your Teacher

Teacher Profile Image

J. Anthony Allen

Music Producer, Composer, PhD, Professor

Teacher

Dr. J. Anthony Allen is a distinguished composer, producer, educator, and innovator whose multifaceted career spans various musical disciplines. Born in Michigan and based in Minneapolis, Dr. Allen has composed orchestral works, produced acclaimed dance music, and through his entrepreneurship projects, he has educated over a million students worldwide in music theory and electronic music production.

Dr. Allen's musical influence is global, with compositions performed across Europe, North America, and Asia. His versatility is evident in works ranging from Minnesota Orchestra performances to Netflix soundtracks. Beyond creation, Dr. Allen is committed to revolutionizing music education for the 21st century. In 2011, he founded Slam Academy, an electronic music school aimed... See full profile

Level: Intermediate

Class Ratings

Expectations Met?
    Exceeded!
  • 0%
  • Yes
  • 0%
  • Somewhat
  • 0%
  • Not really
  • 0%

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.

Transcripts

1. Introduction: Hey everyone, welcome to Max and Max for live part two programming in Max. In this class we're going to go through some basics of how the Max language, the Max environment works. And then pretty quick, we're going to build a little program to add some numbers together. Then we're going to build a little program to make music with those numbers. And we're going to go until, by the end of the class, we're going to be building this, a full functioning mixer, complete with gain, mute, solo, and plug ins. Now this might look a little gnarly. I can make it look even narlier by doing that. But I promise you by the end of this class, you're going to understand how all of this works. And this will be the first big building block that you'll use to be able to build your own projects. And anything you can imagine in Max, if you're not familiar with what Max is, Max is a programming language designed for audio and video. It's a very different kind of programming language. You're not going to be writing code. You're going to be moving little boxes around and connecting things almost like a giant bunch of little guitar effect petals. I've been using Max for an embarrassingly long time, like 20 years, and I've been teaching it in my university classes for probably about ten years. The curriculum I've developed has helped thousands of people learn how to use Mac, even though it is. Yes. Quite a complicated thing. But I promise you if you go step by step with me, you'll understand how it works, how to think like Max. And most importantly, my own personal little motto, you will learn how to learn Max. This class, like all of my classes, is endorsed by the International Association of Online Music Educators and Institutions, which holds it to the highest possible standards, online education and classes. With that, let's dive in and start learning how to build audio and video plug ins in Max and Max for live. Here we go. Message box. I can do that just by clicking on them, right? I could connect a bang to them and then hit them or I could just click on them. Okay, so I'm going to lock my patch hoops. Alright, you did now I'm going to click on them. But which one do I need to click first? This is what this little note meant by trigger the calculation right there, Okay? So that means that load when the number comes. Now if I click on this, it's going to start playing, okay? I can adjust the volume Now, wouldn't it be cool if everything I told you about objects so far was universally always true for all objects, that would be cool, but that's not true. Unfortunately, there are a handful of objects that are weird exceptions to the way they work. One, so we have a signal coming in on the first channel, because that's where my microphone is plugged into. Now I can see it here. I could route it down to here. I could route it into this. I could do anything I want to it. But that's how we get a signal, an audio signal maybe. 2. Recap From Part 1: Okay, in the previous class I'm calling in my head Max one, but it was basically what Max is and how to use Max. We didn't focus on programming and Max, we just focused on using Max. We talked a lot about the interface objects, the different things we can click on and move around, things like this. We talked about what Max is and what it can do. How Max for live is different than that and the different versions of Max that exist. We talked about the Max community and how you can find and share Max patches all over the internet. Some of the famous ones that exist out there like the Radiohead stuff, the Otecer patch. What was the third one we talked about? Oh, I think the convolution workshop patch. We went over a handful of my favorite patches that are publicly available, and I shared a few things with you there. At the very end, we talked a little bit about understanding the guts of a patch, what it means to be locked, unlocked, presentation mode, looking at the help files, and the max console key takeaways would be, if you want to just explore what you can do with Max, go to Maxforlive.com and just download a whole bunch of stuff. Look at what people are making and sharing there. If you want to review more of what we're talking about now, just go to that previous class that max one class and check that out. But for now let's keep going forward. 3. Modes: Presentation, Patching, Locked, and Unlocked: Okay, before we press forward, I do want to review one thing in a little bit more detail that I just blazed over. And that is the different modes, unlocked, presentation, locked, those things. We need to be all on the same page about that, because that's going to be really important as we dive into actually programming. Let's review that just really quick. I have this patch here. I think this is one of the ones I showed you in the previous class. Don't worry about what it does for now, we'll deal with that later. Here are our different modes In a patch down here, we can see that we are in locked mode because this is locked. When I'm in locked mode, that means anything on the screen that I could click on, when I click on it, I'm going to interact with it. I'm going to use this patch when we're locked. That means we can use it if I want to change something. If I want to move something around or add something or take away something, then I go to unlock mode. Now when I click on this fader, for example, I'm not going to use it, I'm going to move it around. You could think of this as an edit mode, okay. Locked is like a using It mode, and unlocked is an edit mode. I can make new stuff, I can delete stuff, anything I want to do, it's an edit mode. Whenever you're programming something, you should be in unlocked mode. Now to test things, we want to be in locked mode, makes sense, right? The super quick way to toggle back and forth between locked and unlocked mode, and you're going to see me do this 1,000 times, is to press Command and then click on any blank space no matter where it is. Just not on an object but just command blank space. There we go. That's going to flip you to the other one. I'm locked. Click Now I'm unlocked command click. Now I'm locked, right. This is how I can toggle really fast. You can also just hit this little padlock button down here, Cool. The other mode is presentation mode. That's this button here. Presentation mode means that's our parents are coming over. We want to clean everything up. We want to hide all of the nasty bits. If we click on presentation mode, in this case everything goes away because I didn't put anything in presentation mode. Let's say I want to actually make a presentation mode out of this. What I'm going to do is I want this to show up, this fader, maybe this little text which is called a comment. I'm going to slick shift, click, shift, click that. I want those things to show up. Maybe this toggle. Sure, maybe that's it. Okay, now I'm going to control click on these things that are highlighted and I'm going to say add to presentation. Now they're going to get like a salmon colored hue around them. But otherwise everything is the same. The only thing that's different is if I go to presentation view, I'm going to only see those things. Now in presentation view, I can also be locked or unlocked. I'm unlocked now, that means I can go like this and say that I can add stuff in presentation mode. But basically this is where I'm building the app. I'm building like the interface so that people can use it and they don't have to look at all the ugly things, okay? Now if I go out of presentation mode and back to what we call patching mode, we go back, okay, what we want is for someone to be able to use this patch just by being in presentation mode. That's going to hide all the things that they don't need to see from for them. Again, in presentation mode I can be locked in which case I'm going to interact and use the patch. Or I can be unlocked where I'm going to actually interact with it. Okay, We probably don't do a whole bunch in presentation mode until we get to the max for live stuff later. But just know that that's what that is. Primarily, we're going to be going between locked and unlocked for a little while. Okay. So those are different modes. Cool. If you're trying to edit something and it's not behaving the way you think it is, it might be because you're locked mode. So just hit that unlocked and then you're good to go. 4. Learning How To Learn Max: Okay. If you've ever learned another language, like a spoken language, then you know that the wrong way to do that is to sit with a dictionary and try to memorize the dictionary. Right? That's not a very efficient way to learn another language. You've got to use that language a lot. Build off the words that you already know. Listen and learn new words. As you go, you're going to ask questions, you're going to look things up and you're going to absorb more and more. That's how we need to Max. Max isn't a program that you're going to take these classes on and then know everything there is to know about Max. It doesn't work that way. What I'm going to focus on is learning how to learn Max, this thing that I'll say 100 times. That means you might not know what this object does unlock. You might not know what this object does, but that's okay. I'm going to show you that we can open the help file for it. We can read about this object and how to use it. If we're looking for something that does a particular thing and we don't know what it is, we're going to talk about how to find that object and then learn how to use it. Throughout this class, you'll probably even see me open up the help files for some of the objects that we use because I don't have every object memorized and how to use it. That's okay. You don't need to don't try to memorize every object. Try to memorize how to look things up, how to use things, and how things connect together to make programs. That's the right way to learn. Max? It's not by memorizing every object. That being said, there is a handful of objects that are going to be super useful and you should probably memorize them. But you will, whether you like it or not, looking up the help files is totally okay. Searching around for help online is totally okay. So keep that in mind as we go forward. Cool. Okay, I want to start us off by learning the basic things that are in the perimeters of our window here. Like what these things, what these things at the bottom do on the sides and on the top, I don't want to go through every single thing because I really want to get into making something quickly. But we do need to go over some of these things so that you know how to find what you're looking for. Let's go into how this thing works. This is called the Patcher window and see if we can get a good feel for how things work, okay. 5. Tools in the Patcher Window: Okay, let's dive into the patcher window now. In order to do this, I think we're going to start fresh. I'm just going to command W to close all these windows. I do want to keep my window open here. We used to call this the max window, now we call it the max Counsel. Sometimes I still say the max window, but I'll try to say max cool. To go command for a new patcher window. Okay. Now we have just a blank space. Now with these pat windows, you can just resize them and do whatever you want, just like any document. What we're going to go through in this section is this stuff in the edges. Every little thing that's here in the edges, you can think of all of these as basically shortcuts. There are other ways to get to just about all of them. Another way to think of them as your tool palettes. We have virtually everything you're going to need in the margins here. The margins are customizable. You can add more stuff here if you want. If I click down somewhere I can add some things. Control clicking. We'll show you a few more options. You can remove things if you want. Remove this from the sidebar. I haven't added or removed anything because I wanted to look like what you're looking at. But if you want to customize your Patra window, we can do that. Okay, so we're just going to go through some of the more important things here and then hopefully we'll get to making some stuff as quickly as we can. All right, let's start with our audio controls down in the bottom right corner here. 6. Audio Controls: Okay, Now these audio controls are a relatively new thing. They weren't in previous versions of a, most of these things in the border weren't in previous versions of Max. We just had this tool palette up top and that was mostly it. In the last few versions we got more and more stuff popping up. These audio controls here we have a power button and that's going to basically turn on audio. Okay? This is a strange concept. You can compare it to turning on your speaker of your computer. That's not really what it's doing, but it's basically enabling audio to happen. If it's not on, it's not going to make any sound audio wise. You can still do some miti stuff without this on. Now you'll notice here that it's disabled. I can't click on this power button. That's because I'm not asking this patch to do anything that involves audio. Let's make a little object. I'm just going to say F play. This is an object that plays an audio file, sound file player. Right now, instantly, as soon as I made that, you see this power button, this audio button fire up. Now it says, in order for this to do anything, you need to turn audio on. Now I can go here and turn audio on. I can also do a little bit of level adjustment here, and this is just going to be a global level. You can think of this as a master fader. I usually just leave it alone. Generally speaking, it's probably fine to leave it alone and just let it be. Now there are ways to manually do this in all of Max, you could just make an object called if you wanted, which we're going to look at this in a minute, is like our digital analog converter. This is our main output. If we want to send sound to our speakers, we're going to do that. Okay? We're not going to hear anything here because I haven't loaded an audio file, but I could use this to turn on and off audio. If I say send it, the message start and stop, I can toggle audio that way. This is more complicated. Don't worry if that doesn't make sense. All I really want you to take away from this is we can turn on audio and off audio over here. But there are other ways to do it too. We can write something in Max that turns audio on and off also. This isn't our only way. Why would we do that? Why do we have the option to do it manually? Well, what if you wanted to create a patch that as soon as it loaded audio was just running? Well, the easiest way to do that would be to use an object called load bang, which basically shoots out something. As soon as the patch is loaded it say load bang, start the deck. Then as soon as this patch is loaded, it's automatically going to turn audio on. I don't have to reach down here and hit that button. This would just automatically do it. There are ways to script things into happening, right? And that's what this would be. Okay. We're getting a little ahead of ourselves, but that's okay. This is audio on and off, and our volume, we add a little bit more. We can add a mute button, we can add a solo button. Now, I believe the solo button is for if we have a whole bunch of Windows open, it's only going to play this window. Same thing with the mute button. I'm going to get rid of those for now. I'm just control clicking here. Okay, that's toggling audio on and off. 7. The Global Transport: All right, the next thing I want to look at is this little button here called the Global Transport. Now this is really fun. This as well as the audio, but especially this has a different purpose. If you're in Max for live or just Max, this is really fun. The old days, I feel like such a grandpa saying that in the old days, in Max, if you wanted to build something that was, that had like a beat and a tempo, you had to build the whole system. You had to build a way for something to create a pulse and then divide that into quarter notes. And then you could fashion yourself like a grid and drum machine or something if you wanted to do that. But you had to build the whole system every time. Now we really don't, if you're in Max for live, you can easily write things like this. You could say, I could say something like metro four N. That means metronome four N is going to be a quarter note. What this says is go to the transport in live if I'm in max for live and figure out what the quarter note and then output that quarter note for me. This gives me a metronome that's just at a quarter note of whatever my transport is in live. However, I'm not in live, I'm just in Max. I transport down here. I could use an object to tell Max what the BPM is, then I can just turn on the global transport and it's like a playhead is going and then I can do things like Metro Four before we had this transport, which is again, a new thing, you had to do stuff like this. You had to say Metro 1,000 which is in terms of milliseconds. This would be a metronome at 1,000 milliseconds, which would be basically 60 BPM, which is confusing. We don't have to do that anymore. All you have to do is just remember the transport button is down here. There is a transport object that will let you control this. You can start and stop it. You can set the tempo. You can do all kinds of crazy stuff with it. More on that later, but this is the global transport. 8. The Inspector: Okay, up next the inspector, this is a super important little spot. We find it right here a little, it looks like information, right? It is in fact called the inspector. However, what it does is give us a ton of information. Imagine each object like this has a ton of weird little settings. Because they do, this is how we're going to get to them. Okay, I'm going to click this and it's going to open all kinds of stuff. I don't have anything selected, the inspector does nothing. But if I select something like this, transport says scripting name, I can give it a name, how the transport handles it. Reset bar on time signature tempo. What is the tempo presently? Not a ton of options in this one. Let's go to Load Bang. I can change the color of it, set it to hide, unlock, change the style. What's under style can make it look a little different. It's cool description, give it an annotation and a name. Now this name thing, you don't really need to give objects names, but you can, and there's a reason you might want to if you're doing some more advanced stuff. If we go to Dak, similar stuff, style color, if we want to change the look of it, that's cool. Some objects have a ton of options to them, and some only have a few. But I should point out, we've only been looking at this basic category. If we look at layout, there's more things we can do, recent things we've messed with, and just here's all the things we can do with that. There's a ton of stuff here for various things you may need to go into the inspector. There's not a ton of super critical stuff that's in the inspector. But if you're ever thinking I wish I could do X or Y to this object, check out the inspector. That's probably where it is. 9. Reference Files: Okay, another super important one in terms of learning how to learn Max, is the reference. Over here we have reference. Looks like a little book, maybe. Sounds like it's going to be the manual. And it here I've clicked on transport and I go to reference. It's telling me here what it does controls a clock. Okay? Messages it can take attributes which are things you can change about it and other things you could look up. So some of, some of these are objects like Metro Translate Time Point, when some of them are patches that are going to give us examples of how this works. Some of them are like tutorials. If I open this up, we're in here. This big tutorial thing that is going to give me a ton of info about how this works. We can see anything we click on here gets a little explanation down here before we click on it, so that we can learn a little bit more. This little reference thing is great way to figure out a little bit more about this object. See all the possible messages, all the possible attributes, and some help on how to use it. Don't be afraid to go to this reference like all the time. 10. Console: Okay, next one. Super easy. I just want to point out while we're here, we already know the max console window and what it does, hit a bunch of buttons and that's why I'm getting a error there. But if you are a one window person and you don't want this floating window around here, you can close this. Just go here. Now the window is attached, right? Max console is here. You'll see all the same stuff. You can make it nice and big. If you want you can even do this group, just grab this little bar here and make it smaller if you want your console and big. Now if you want it separate you can easily just go up to window and Max Counsel or it looks like shift command M. I think it's a weird key command but there you go. That'll get you the counsel As a floating window. I prefer it as a floating window personally, then that pop out window because honestly I usually leave the inspector open but small like that. That's how I prefer to work. But if you like one window, you can make the max counsel over there with this button right here. 11. The Calendar: Okay, up next. A weird thing that's here that I wanted to point out because I think it should just be in all software now. It really should. This little thing up here is a calendar. Now, why on Earth does Max need a calendar? Are there special things you can do with the date and time? Maybe. But that's not what this is. This is like a weird file browser. What you're going to do here is you're going to click on it. It's going to show you all the dates. You can click on a date, Today is the 17th, but I can see on the 14th, these are the files I opened on the 14th. I can go back and see what files I was working on on what day. This is super handy if you're working on a project and you're like, I can't find that file and you can go up to file recent and look at through a list of all the recent things. That's cool, but it's hard to deal with. This is basically a better version of that where you can just say, oh, I was last working on it like last Saturday, show me all the files I worked on on Saturday. And you can do that. You can also just do like a stream view of the last 30 days, three days ago. There's something, it's super handy. I highly recommend getting used to using it. If you are a software developer or know any software developers tell them to build this into their software because it's really handy. That is all. 12. Tools Along the Bottom of the Patcher Window: Okay. Next let's move to the bottom of the window and just go over all of these things all at once. Let's go starting over here. These you already know, lock unlock, presentation mode, right? This one in the middle, that's going to let the patch operate while it's unlocked. That can sometimes be useful for testing, but honestly I never ever use it. Here we can see a list of all of our sub windows that are open, called Pat windows. This would be if you have a very complicated patch and you've got things happening like this, you want to see the object over the patch so it can get ugly. This can help clean that up. Similarly with this, show grid can help you keep organized by just having a grid laid out. I think somewhere there's a way to snap things to the grid if you like. Oops, I usually leave it off over here. There's a debugging mode that you can explore if you like. I never really use it. These last two are cool. Again, these are a process that was really complicated in the past, but now it's quite easy. If you're familiar with in Ableton Live, how we have Key mapping and Midi mapping. These are basically the same thing I can do. Audio mapping or key mapping. Key mapping could be, well, let's do it. I need like a UI object. Here is a toggle button. Okay, I could go to key mapping. Then anything that's outlined in orange here, I can assign a key to do it. I could click on this Able for Mapping. Then press I don't know, the A key. Now when I press A, that's going to toggle. Now A is also assigned to making, and something else, I need to be a little smarter about that. But then Midi mapping is going to do the same thing. I could assign this to a Midi note. Then whenever I play that Midi note, that toggle is going to go off. It's just like this is already built into Ableton. But it lets you create some key commands of your own for your projects. It can be really handy for that. That's basically everything in the bottom row. Cool. Let's look at a few things on the left side here. 13. Package Manager: Okay, we're going to look at a few things on the left side here. First thing is the package manager. Now, what are packages? I have told you that these are objects and the objects are their own little programs, right? There are tons, and tons, and tons of them in Max. Max is made up of probably 30,000 objects or something like that, but there are more you can make objects. If you're savvy it's tricky, but there are ways to do it. What people will do is create a bundle of objects that do specific things and then release them together with help files and documentation on how to use them as packages. You can install whole packages into your computer, and that's what we're going to see. If we go to Package Manager, this window comes up and it shows all these packages that are available. There are a lot of these. They don't have to show up in Package Manager for to be real. You can find them on people's websites all the time. I can look at just installed packages. These are things that I've installed, some of them like this one I've helped contribute to. Um, this one it shows is an update, the Maat externals. This one is made by Cycling 74. I can download and install things right from here. Here are some that cycling thinks are pretty cool. I could just install them right from here. But the more important thing to me is going to the installed packages and seeing what I have installed and if there's any updates, but there's a ton of fun stuff. It might be the case that you download a max patch that you found online and you want to open it up and do some stuff. And it says you need to have some packages in order for this to work. You'll generally see that in the max council it'll say such and such package is missing or something like that. Be sure to keep an eye on that and when that happens, that's what they're talking about. You need to find any package that it's missing. A package is basically a bundle of externals, which is what these are. Cool. 14. Snippets: Okay, next snippets, snippets. Now, it used to be the case that you could make a project in Max, let's say you made a big, big project, but there was one little piece of it that you used all the time. You could say that as its own file and pull it in. And it was a cumbersome process, but they streamlined it in the last couple versions with this snippets thing. This is a way for you to find other people's if you want but also just save your own things like let's say this is something I use all the time. All the time. I need to open a sound file and send it to the deck. And start the deck when the patch opens. I do this all the time. I could save this as a snippet and then just be able to plop it in whenever I need to. If I go to snippets, you see all kinds of little things. Let's grab a snippet. Here's one called feedback delay. I just plop it in there. This is all set. It's a feedback delay. I don't need to do anything else. It's just there and it works and it's done. They're more complicated things. You can install some of these as packages. Here's just a simple audio file player, basically that it says SF play open, wants me to loop it, and then a little volume control. These are just like pre coded things. This is a fancier one, it's going to give me some cool looking things, little step sequencer, other things that can play around with the whole synthesizer here, right? I could get into this mess around with the code inside if I wanted to. If you have any piece of code like, let's say this little bit that I made and you want to save it as a snippet, you just highlight some stuff. Control, click, save snippet. There you go. You got a little like reusable thing that you can use all the time. It's really handy. That's where they live snippets. You can also just view a list of things you've got, probably a little bit easier. 15. Image, Video, and Audio Libraries: The next thing I want to show you, the second to last thing I want to show you is these three things right here. Audio, video, images. These are just little libraries of things. You can put stuff in here if you want, but what you use in your patch definitely doesn't need to be in here. Let's click on Audio. And let's say here's a clap. Is going to click and drag it over here. Now I have a clap. Now I'm not going to hear it, because I need to send it to something to hear it. And that gets into the programming a little bit. But now I should be able to hear it. This is a sound that's ready to go. There's some audio stuff here by length. Here is some little video files. These are mostly for testing. You wouldn't really want to use these in a piece because we're all used to seeing them, especially this one. This one is in like 1 million different demos. It's not awesome to use. But again, we can't really play this because we need something to send it to. In this case, it's It window. If I make a It window, we'll talk more about later. This little thing pops up now if I press play, lock it, play. Now our video plays. It's got sound too. We have these little video things. This one's new. I haven't seen this one before. Oops, I'm locked. It just yelled at me because I tried to do something while it was locked. Okay, let's throw this into our window. It's fun. Can loop it. Wheel of Fortune. Neat. These are just little things for testing and demos and stuff like that. Bunch images to play with. These are actually interesting because there are some UI things in here, buttons and things like that that you can play with that, but more on that later, think of these as like a little demo content library. They're not particularly interesting, but they can give you some material to work with really fast. 16. Objects: Okay, up next we're going to talk about these things up here. Now, these are our main building blocks. These are the things we really need to start making stuff. Let's start with this one. This is probably the most important tool that you will use. This is called object, okay? Right now it's blank, there's no object there. But object is a box that looks like this. What we're going to load into that object is a little program that does a thing. Let's say I'm going to type in here random, I'm going to press Return. Now you can see when I press return, that object changed a little bit. Right now it's got two little dots on the top and one little dot at the bottom. If I change it again to something different now it just has one on the top and one on the bottom. Each object, as soon as you load the program into it and create the object, it's going to have different inputs. These are the things at the top and outputs, these are the things at the bottom. You can think of this just like a guitar pedal. Inputs are the things that can go into it, like the sound of your guitar. Outputs are the thing that sets out. We have different inputs and outputs. The different ones do different things. They're all different and unique to each little object. Okay, if I went back to random, I need to know what these two inputs do and what this output does. So I'm going to put my mouse over the first input and it causes random number output. Okay, over here it says set the random number range. Okay? What it's telling me here is I can put in a number here and that'll be the probably max range of the random object here. It probably wants a bang and I can send it a bang, it will generate a random number At the bottom, it says random number output. Let's do it. Here's a bang. Let's get a number box and connect that. Cool, Now if I lock it and press this bang, it generates a random number. But we didn't give it a range yet. It thinks it's a range of zero. Okay, let's give it a range. Let's use another number box and connect that there. Okay, let's set this to, I'm just going to drag 90. Okay, now we can click this bang, and it's going to generate a random number 0-90 Cool. I can just keep clicking it all day long and that's fine. This thing is an object. We can get it right there. Object. We can also press n and make another object like that. You can see what I just did here is I tried to create an object called n and n and I got an error saying that's not an object and it turned pink, that means that's not an object. Okay, Now remember what I said before, when use any object, remember these are their own little programs and we've got to remember how to use them. But we don't have to memorize every single object and how it works, right? We can put our mouse over the inputs and outputs. We can control click on it and open help files. We can look at the reference for it. There are things we can do. Let's keep moving on. I just want to really quickly go over the difference between these things and then we're going to make something. 17. Messages: Okay, I'm going to delete these two things. We're going to head off one very common problem that people find when they're new to Max, I'm going to grab a message here. Okay, so that's right next to objects. I'm going to put it right there. Okay. Now this is a message box. This is an object box. It is very common problem that I see when people are just learning to try to use a message box as an object. That won't work. Get comfortable seeing these two as very different things. This has this light gray stuff at the top and at the bottom. The inputs and outputs are going to change based on what's in it. A message, on the other hand, is almost always going to have two inputs and one output. You can change that with some fancy self we'll talk about later. But the most important thing that's different about a message is that it doesn't actually do anything. It is not a program. You can write whatever you want here. I'm not going to get an error saying that's not a thing. Messages are designed to be exactly that you can think of them as a little E mail. They're a message, this is something I can send to random if I wanted to. Now what I can do, if I lock my patch and click on this, it's going to send this to the random object, okay, because they're connected. It's going to go into here, which is expecting a number. It's probably going to give me an error when I click on this click. Yes, my error says the random object, it's inlet is saying this is the wrong message or type, meaning it wants a number. But we can use message boxes for numbers two. Let's say 1,000 Now if I click this, I don't get an error. I can click this all day long. Now the random object says, okay cool. You want the range, because that's what's coming into this, to be 1,000 random number between zero on 1,000 There are 1 million different usages for messages, but the thing to remember about messages is that they are just text. I can type whatever I want. When I click on them, it's going to send them to whatever they're connected to. Okay, if I click on this, I just said sandwich to random again. Random says, I don't know what you mean by sandwich, because it's not what you would send to random. These are just text and numbers. They're holding things for us that we can shoot out when we need them by clicking on them or we can use a bang. Clicking on this bang will now hit Sandwich and send Sandwich to random. We'll see another error when I do that right there. See, okay, just remember messages are containers for text or numbers. Objects have these gray parts on the top and bottom and actually run little programs. Cool, cool. 18. Comments: Okay, next is comments. Now if random does a lot of things, if an object does a lot of things by running a little program, and a message does a little bit of things by holding on text. You could say that a comment, which is what these are, functionally does nothing. Okay? What a comment is, just text that doesn't do anything. Let's make my window a little bit bigger here, okay? This is completely non functional. It has nothing to do with the sandwich or the random or the bang. It is not connected to anything. I can put some things into it. If I want to change that comment, I can do some funny stuff. I don't know if I've ever found a need to do that. There's no output for comments. Why then do we have comments? Well, it's because when you have a big complicated patch, you want to leave little notes for yourself all over the place on what's doing. What if I put this into a patch? I might want to put a little comment on it that says this won't work. Or I might say, this object makes random numbers. Sure I can make it a little bit bigger. It's all one line if I want. It's just a way to leave yourself little notes about what's going on. It's a really good habit to get into if you're working on something, leave things all over the place. It's just a way to put text into your patch that doesn't do anything. Help you understand what's going on. Go up unworried. 19. Toggle: Okay. Up next is a toggle that is this little guy right here. Let's look at a toggle. When I make one, I get this little thing. If I lock it and click on it, I can toggle things on and off. That's really neat. There are a lot of objects that just need to be turned on and turned off. Like I think we saw that with audio. If we make an audio system, we can build in a way to just put a toggle on here that turns it on and off. But there's a couple interesting things about this little toggle. The first is that it is actually outputting numbers as is most things in Max. Let's make an object called print, print. I think maybe we already mentioned this, but what print does is it's going to take anything that goes into its inlet and show it over in the max console. Okay, so I'm going to lock it. I'm going to turn this on. Okay, Print one. I'm going to turn it off, print zero. I'm going toggle it on and off a whole bunch. And what we're going to see here is 10101010. The reason I'm showing you this is because I want you to become familiar with the idea that a toggle is just a fancy way to send ones in zeros. One means on, zero means off. Interestingly, it can also accept those. Let's take a message and put a one in it, connect it to the toggle. Okay, let's make another message and create a zero. Also connect it to the toggle. Yes, you can connect two things to the same spot like this. Okay, what's going to happen if I click zero? The toggle is going to turn off and it's going to send a zero. I can keep sending zero over and over and over. And the toggle is going to stay off because I am telling it go to your off state. That is what zero means, go off, I send it one, it's going to turn on, and I keep sending it one, it's going to keep staying on. I can control a toggle with ones and zeros. I can also control it by clicking on it. There's a couple other things you can do with toggles. Two, but remember that a toggle is really just a fancy way to send ones and zeros. It's not actually sending the word on, in the word off, it is sending zeros and ones most of the time when you need to toggle, that's what you want is a zero in one. Okay, let's move on to buttons. 20. Buttons And Bangs: Okay button. One of the most important things that we have. This is a weird little concept that we use in Max A. Button is a very simple thing. Let's first talk about a little bit of the terminology behind this. We call this object a button. We call the thing that it sends a bang. We used to call these things bangs. They've recently changed it to calling them buttons instead of bangs. I have a whole theory about why they did that, ask me some other time, but I will occasionally refer to these little things as Bangs. They mean the same thing. You can think of these buttons. This will be the nerdiest reference I use in this whole class. Maybe they are the Hodor of Max. Now if you know that reference, what I'm referring here to is Hodor was a character from Game of Thrones. You could talk to him all day long and he would just say, that's what he could say. He could say one thing he could say, you would say, how are you today? And he would say, read me Shakespeare. And he would say, that's what a bang does, except instead of hodor, it says bang. I can send a ton of things. Let me do a print on it so you can see if I connect this to the print object. And let's clear my max console, I send something. I click at once to print and it says bang. Okay? It sends bang is what it says. If I send it a number, if I click on this, 11 is going to get sent to this bang. And what is the bang going to say? Click. It's going to say bang. It's all knows how to do. If I send it sandwich. It says bang. Send it Happy Wednesday to you, lock it. Click it. It says bang. It's all knows how to do, say bang. You can send it anything you want. It's going to say bang. Now this is oddly useful, you're going to see these little buttons or bangs all over the place. We use them as triggers, basically another way to do a trigger, but when you want something to happen, you will want something just to start that thing happening or trigger something going or something like that. This is a very efficient way to do it. They can also be useful for conversion. If I have this thing here, every time someone clicks that I want an event to happen, I can just run it into a bang and then do something with that bang. That way I've basically thrown out the text and converted it to a bang more on that later. But the thing to remember about a button or a bang is that you can send it anything and it will output bang. They're very useful for triggers for anything. Here's one that I used here to hit the sandwich into the random which generates an object, an air, okay, Hold on to those for now. They're going to be super important. 21. Number Boxes: Okay, let's get a little bit bigger here. Okay. Up next number boxes. Now I can just click and drag to make a number box. Or I can click and hold down to see a few different types of number boxes. Okay. I'm going to load up one of each to talk about Just a second. You see that in bangs to, but these are just different kinds of triggers and toggles and things. We'll talk more about these later. Okay. Number boxes are going to show you a number. Okay? So if I put a toggle into a number box, and then I turn the toggle on and off, it's going to show me the number that's coming in. Okay? If I put a message into a number box, if it has words in it, it's going to do nothing because a number box only knows how to show a number. But if I said 500 and put that into a number box and click on it, it's going to say 500. Okay. Simple enough. Right? Number boxes can also output numbers. What this outlet is going to do on the left, it's going to shoot out the number that just came into it. Okay? Let's put another number box down here. Okay, One. It shoots out a one. Okay? If I say 500, it shoots out 500. I can send it a bang. It will just keep on shooting out 500. If I change this number box to something else, just by clicking and dragging it, I click this, it's going to shoot 500 down to here. It can hold on to numbers in that way, and it can be set to numbers in that way. Now there are three types of number boxes here. These two can get people into trouble sometimes. This is called a number box. This is called a flow numb or a floating point number. We can get into all kind weird math stuff with this, but let's simple and say if you need a decimal point, you need this number box. This is only going to show whole numbers. This can show whole numbers or numbers with a decimal point. If I made a message box that said 250.345 I run this into this number box, what it's going to show is 250. It's going to t, it's not going to round, it's going to truncate it, it's going to chop off the decimal point. Okay? If I send that same number into this number box, it's going to show me actually the whole thing. If I make it a little bit bigger, okay, it's going to show me the whole thing. The reason that these are two different things is because I think historically these were a little more CPU intensive to keep track of all the extra digits. It doesn't really matter so much. Now my general workflow is I always use one of these unless I am explicitly doing something that is going to have decimal points to it. In which case I will use this one or this one. Because often something with decimal points, I'm talking about an audio signal. Audio signals tend to be 0-1 there's a ton of decimal points. That's what this one is for. This little thing here is telling us this is an audio number box. This can be used a few different ways, but typically if you run an audio signal into this, like if we say play an audio file and we look into this, we're going to see the volume. This is just for an audio signal. This is for anything that we need a decimal point, and this is for any whole number. Cool. Another example would be, if we're dealing with Midi stuff, we're going to use this, right? Because if I say Midi note number 60, there's no Midi note number 60.1 It's just 60. And then the next one is 61. There's nothing in between. We can use a number box instead of a flow numb. The way you can interact with this is you can send it numbers. You can click and drag on it. When it's yellow, that just means it's highlighted. You could type in numbers and hit Return for them to execute. Then you can output numbers down here. 22. Sliders: Okay, up next, let's talk about sliders. That's this one here. And there's a number of fun things. I'm just going to grab one. Let's get a little bit bigger, okay? This is a number slider. Now what's weird and interesting about this is that you'll find that these number sliders are basically the same as number boxes. They just look neat. I can click and drag on this to go up and down. I can connect a number box to the bottom of it to see what I'm doing. It's a range of zero to 127, which we can change by going into the inspector for it. If we go here, click on it Inspector. We can change the way it looks. We can change a lot about it. But right here, there's the range, and we can change it. The default is 128, because that's what we like for Midi stuff. But at the end of the day, all this slider is doing is outputting numbers 0-127 All right, And if you're thinking, why doesn't it go to 1.1 28? This is like a weird Midi thing, but it has a range of 128. There are 128 numbers, but zero counts. We start with zero. That means its highest number is going to be 127. But it's, it just outputs numbers. We have output at the bottom that's going to output the number every time that it changes. It's going to output the number. When I move it, it's going to output the number. We can put numbers in to it if we want. We can also bang it just to say, output your number, we can send it a bang. But the rest of these, if you look at these, here's a dial, I can connect it to a number box. If I click and drag on it, this happens. But it's the exact same thing. It's just a different shape, right? There's nothing different between those two except for the shape. Here's another one, right? If I can click and drag on and do it now. This one is slightly different. You'll notice that it has two outputs and they're a little tricky to get to. There we go. I can't put this into a number box because this is an audio signal. This particular fader is designed to be an audio signal fader. In other words, a volume ****. Okay? It wants me to put an audio signal into it and take an audio signal out. This one does work a little bit differently. Here's one, this is probably familiar to you. It looks like a piano keyboard, right? I can click on stuff, I'm just clicking and dragging here. But I can click on individual notes and do whatever I want. But let's connect a number box to it and see that it's just outputting numbers. This does. This is a dial the same way this is. And this is a little easier to help us see the Midi notes that are happening and can be handy for doing Midi stuff. But it is actually just a slider. Interesting H, here are a couple fancier ones. These are just data sliders. There's a range slider. You can grab a range of stuff, but these just output numbers like everything else, some fancier stuff. Here's a staff. I can again, the Midi note number. You can do chords on this. And if you want to do that, go into the help file for it and you'll see that it has some polyphonic modes. Okay, with all of these different sliders. Just remember that if it looks like a keyboard, if it looks like it looks like this, or remember these are all just outputting numbers. They are just sliders with any number slider. They will output numbers. They will also take numbers in. For example, if I wanted to take this dial and say, show me a Midi note, I can now turn this dial and it's going to show me what Midi note I'm on. I can do the same thing for notes as I turn the dial, it's going to go that way. Now, quick programming lesson on Max. If I click on the keyboard, is it going to change the dial? In this case? No, because when I click on a note here, it's going to output that number here. And it's going to go to this 48. It's going to go to this number box, which is not going anywhere. Things only flow in one direction because this number box is connected to this keyboard slider. That does not mean the opposite is true. This keyboard slider is not sending information back. Everything has inputs and outputs. Okay. If I connected this number box to this slider, I'm going to create a feedback loop. Not like an audio feedback loop, but a number feedback loop. Because I'm going to change this dial, it's going to change this, it's going to change that, which is going to change this. Then it's going to go in a circle and eventually it would crash max. Except max is designed to prevent us from doing that. Let's try it. Okay. The stack overflow outlets are disabled until this message is cleared. It basically just said, I stopped you from crashing this whole program, now I just have to click on one of these and delete it. Now I should be back up and running. Okay, sliders. 23. MaxForLive Objects: Okay, let's go to this section now. This is called Max for live objects. These are all objects that we basically have already seen, but just ones that look like Max, that look like Ableton Live. Here's a number box, right? But this number box, you can make it look like Ableton, right? Like if I lock our patch, this is how number boxes in live look. If I really want to make something like live, this is how I would do it. Arrows. Here's a volume slider, right? Like this looks like this, doesn't look like live, this looks like live. It does the same thing except this one looks like live. I can change the name of it where it says live dial. I can change that or I can get rid of it entirely. Little volume slider or any slider actually toggle. There's a lot of different things. They do a lot of the same stuff. This toggle works the same way our Toggle works, except it looks like Live Max. For live objects, we can do everything that we already know how to do with all our objects. It's just they look like live. If you want to look like live, use the Max for live objects. Cool. 24. Everything Else: Okay, there are a whole bunch of more things. If I go to this click add object thing, you can see all kinds of other stuff. Here's some basic stuff. Here's some audio specific stuff. Audio inputs, volume sliders, wave form. This is a cool one, it just looks like a old school VUter filter. More data visualization, image based, some fun interface things. And then jitter is video stuff, lots of different things there. Now remember that all of these objects that we're seeing are visual objects called UI objects. We talked about this in the last class. These are all just the UI objects. The main objects are all here. You get to them by making an object and then typing one of 1 million things. Those aren't showing up here. These are just showing our objects with things we can click on and stuff. The millions of objects that we have are all accessible through this object. But that being said, UI objects, like all these things we can click on, you can still get to them. They are just objects, right? Like if I say plowum, I make that as an object, it just switches into a floating point number. If I make an object called, let me do it over here. If I make an object called slider and press return, it magically turns into one of these, because that's called a K slider. All of these things are just objects like everything else. They have some special properties to click on them and use them. Okay, maybe keep that in mind. The vast majority of our objects are here. A few of them are listed here and here. These are just the UI objects though. Cool. Okay, let's make something. 25. [+]: Okay, so now that we know the general way around the interface here, let's make something, we're going to start with something very basic and we're going to turn it into something musical in just a minute. Okay, so stick with me first. We're just going to add some numbers together, okay? So I'm going to hit command to make a new patch. Okay, here we go. Blank slate. Beautiful. First thing I need is something that holds a number. Okay? We know at least two things that can do this at this point, and that would be a number box or a message. Okay, either of these are going to work just fine, in fact. Well, let's just use a message for now. Okay, in this message I'm going to write a number. Let's say five. Okay, Now I'm going to make another message box. In this one I'm going to write two. Cool. Now I want to add these two numbers together. I need a little program that knows how to add things together. Add numbers together specifically for this thing. Do you think I need a message box or an object box? Take a guess. Well, it's going to do something, right? It's going to be a little program that knows how to do something. I definitely need an object. Okay. Now, what do you think the program is called that knows how to add numbers together? Let's just take a wild guess. I don't know. Maybe add plus, yeah, add two numbers together. Cool. Okay, let's zoom in here a little bit. Okay, This has two inlets and one outlet. This one says set left Operand and trigger the calculation. Hold on to that for a second. This one says set right Operand. Okay, There's my right Operand and there's my left Operand. Let's see what our output says. Result left and right. Okay, now let's put a number box down here. Okay, so here's a number box and I'm going to connect the output to that number box. That number box is going to show us the result. Okay, it still says zero. I didn't tell it to go yet, right? So I need to send these numbers into the object. I could do that because I have a message box. I could do that just by clicking on them, right? I could connect a bang to them and then hit them, or I could just click on them. Okay, so I'm going to lock my patch. Oops, did now I'm going to click on them. But which one do I need to click first? This is what this little note meant by trigger the calculation right there. That means that when a number comes in through this inlet, the left inlet, it's going to both use it as a number and force the calculation to happen for it to do its thing, right? If I click two first, we're not going to see any output, right? I can click it all day long and this is just getting 22222 and that's great. But nothing has triggered the calculation yet. But it is holding on to that number inside this plus object. It's saying, well, I know two. You want me to add two to something, but I don't know what, you want me to add two yet. If I click five, it's going to say it wants me to add, to start with five, add two, and then output it. That's what the left inlet is telling us to do. If I click five, boom it says a five plus two and it outputs setting. Okay, so I needed to trigger that in order for it to happen. Okay, so let's change some stuff. Let's say now this number is 156. Okay, so what's going to happen now if I click on 156? Nothing right? Because again, it's waiting for this side to change. Okay, let's type in 1,945 a good year. What's going to happen now? If I click 1945, it's going to process 1945 plus 156. Okay, it worked. Now here's a head scratcher for you. I'm trying to get you to understand how the flow of information works. I'm going to type in five, go back down to easy numbers here. I'm going to type in three, okay? Now, what's going to happen when I hit three? Think about it. You got to guess. Okay, here we go. Here's three. We got 159. Now, why is that? Is that a glitch in the program? Nope. I did exactly what it was supposed to do because I never clicked five, I never told it that I updated this number. Just because I changed this number box, it didn't output, it didn't go down into the object. It's waiting for me to click on it. It's still holding the previous number in this inlet, right? That's what it added 32 before it said 156 and it added three, and now we have 159. If I want to add three to five, I need to make sure I click five again and then I click three and I get eight. Okay. So just by changing the number doesn't send it down the patch cable. Okay. It can in some instances, but in this case it doesn't. Okay. So very basic adding numbers. 26. Number Boxes: All right, let's take this a little step further and give myself a little bit more space here. Select all of this and just scoot it down just a little bit. Now, what if I wanted to hit these two numbers at the exact same time? I could easily do that by making a button or a bang and connecting it to, whoops, to both sides. Okay, neat. Now, when I click this, it's going to send a bang, Which is essentially the same as clicking on it to 5.3 Okay, we didn't see anything update here because it's already eight. Let's give it a new number. Let's say 15.7 Now when I click on it, both of these are going to get sent at the same time, and it should update to my new number. Now, there is a secret trick going on here with which one of these arrives first. If you do something like this, there's a weird Max Voodoo thing that happens in which the right one is always going to arrive first. Things go from right to left when they happen at the same time. It's weird, that might be something you need to know way down the line. Don't worry about that for now. Okay, let's switch out these messages for number boxes because they're going to behave a little bit differently. And this will show us why we might want to use number boxes. Okay, I'm going to connect them. Well, actually let's say 20. And this one let's say ten. Okay? As soon as I clicked outside of this number box, it output 30. Great, that's what we wanted. But the one thing that's different with number boxes that when you change the number, it is going to output it. Meaning it is going to send it down this patch cable. If I just click and drag on this number, it's going to output whatever number I'm currently on plus whatever this is the result down there. I can scrub this all over just by clicking and dragging on it. Or I can type a number and then hit Return and it's going to output it. Now if you ever see this, it means it just doesn't have enough room. We can grab this bottom little thing and stretch it out to get all the room we need same thing up there. Okay? Now, if I take this down to, I don't know, five, it's always updating. Right? But if I do the same thing with this one in the right, it's not, this is sending that number down this patch cable. It is doing that but the object knows to just hold on to anything that comes in in this inlet and wait for something in the left inlet. Okay, in order to trigger it. Now I can do the same thing with a bang here. If I want to resend both these numbers out, I can just hit them with a bang. Well, you're not going to see it though. In this case, hitting this does send these numbers down here to the plus object and then out. However, whenever I change them, it also sends them out. You don't really see it, actually this would work. Let's change this to 395. Now if I hit this bang, it's going to hit 395 again. But it's also going to hit 113 and trigger the calculation. There it is. Okay. Okay. That's why you might want to use number boxes instead of messages. Number boxes are always going to output their number as soon as it changes, messages won't. Now, there's a whole bunch of other reasons to use messages. Mostly because you can put anything in a message like words, text, whatever, number boxes, you can only put numbers, that's another thing to keep in mind. But in this particular case, we could use either one. 27. Changing Message Boxes: Okay, two more quick things. Let's put a message down here. How do I put something into a message? I'm sending this number into this number box. That's easy. Number boxes can take numbers, but let's get rid of that and put this into a message. Will that work in the obvious way? No, it will not work. Here's how you need to get that to work. There's a few things you can do. Let's look at this in says trigger the message or set it. Okay. Two options here. First, trigger the message. I can send a bang to that inlet. And trigger the message, meaning send it out the outlet. Okay, that's not what we want to do here. Set changes it. That means that if the message box gets something that says set, like literally says that SET, then it will change the number box to whatever is in front of it after it, here's a number box. I can say set Pickles if I send that into a number box and now I'm going to click on it to send it through the patch cable. It says Pickles. If I say the word set and then space something, it's going to send that into that. I could do something weird like set and then try to get this number into this message box. And then down into that message box. It's weird, but that's not a great way to do this. Let's look and see if our other inlet has any options for us Set the message without output. That sounds like maybe something we want. That means that if I send something into this inlet, it's going to automatically set the message to that. I don't need to use the word set, it's not going to output it, it's just going to hold onto it. This is very useful. Oops, let's delete that. Put that into here. Now when I change the numbers, it's going to output them into that message box. It's going to hold onto, this is not outputting that, this is just holding on to that number. This is actually a very useful thing. Often you want something just to hold onto a number. Then later when I want to use that number, I'm going to send it a bang and that's going to output that number and use it. Holding on to numbers is an important thing, right? Inlet is how you can do that. Now one other thing I'll point out here is can this go both places or is this going to split the signal or do something strange? Half goes to one side, half goes the other side. No, this is going to work exactly how you think it's going to work. You can send an outlet as many places as you want, okay. It's just perfectly happy for that to work. Okay, cool. So let's talk about some other math operations and then we'll try to make some noise with this. 28. Other Math Operators: Okay, Not to state the obvious, but let's look at other math things we can do here. We've used a plus, that's great. Can we do the same thing with minus? If I type in minus, let's see what it says here. Subtract two numbers, output the result. Cool, minus is going to work just great. Now you'll notice something here. I change the object to minus, which essentially flushed it out. It doesn't know anything anymore. Nothing has come into this right inlet since I changed it. When I move this number box around, what's being output is the same thing because it's taking this number and subtracting zero from it. I haven't given it 527 yet. It doesn't know that exists. Let's say 23, 19. I just wanted to wiggle that object around so it gets something. Now, when I move this around, it's actually going to subtract that 40 from, it works exactly the same as the plus. And if you're wondering, can I go negative? Yes, I can definitely go negative with these. I can't do decimal points because I'm using these number boxes. I can only do whole numbers, but that's okay. We could do decimal points, the subtract object doesn't really care. What about multiply? We use Asterix and we're going to multiply these two numbers. Again, I'm going to get zero here because I'm multiplying one oh three by zero. It doesn't know about this 40 yet. Now it does, Now it knows that it's 79. And I move this, then I get these very high numbers, divide, sure. Now, these numbers are going to get truncated, not rounded, okay? Because I don't have whole numbers. Let's see here, 99/2 It's going to say four. The exact answer is 4.5 right? But it's going to chop off that 0.5 It's not going to round, it's not going to round, it's just going to chop off the 0.5 If I wanted to see the 0.5 I need a floating point number. And I can put that here and add to that skew all these over a little bit. There we go. What happened here is I'm inputting, I haven't told the divide object to use floating point numbers. In order for it to know that I want floating point results, I have to give it a floating point number. The easiest is to say zero space. I said divide space. Zero decimal point is what I meant to say. Now it's going to give me floating point numbers and the message will give me floating point numbers. This brings us to an interesting concept, and that is the argument, which is what we have here. Okay, the argument is a way to tell an object like a default state. Okay, let's go to a new video and talk about arguments really quick. 29. Arguments: Okay, let's go back to plus because it's just a little easier for my brain than divide, let's say. Now what I can do is I can add an argument here if I want to. In this case now, arguments are going to work different for every object. And you're going to have to look up what arguments you can put into the different objects. But in this case, the argument can take the place of the right number. Let's get rid of that one, okay? Now, I'm going to say nine plus what, right? I can easily say plus space. Whenever you put a space after the name of an object, it's going to be an argument. I could say five here. Now what that's going to do is to say anything that comes in the right inlet is going to say plus five. It's always going to be nine plus 558 plus 142, plus five. Everything is going to be plus five all the time. I don't need to give it the right inlet because I've said what it is here in the argument. Now to clarify this even a little bit more, this space here, the name of an object, cannot have spaces in it. You will never find an object that has spaces in it. This is exactly why, because Max is designed so that after the name of the object is arguments, you might have multiple things. You might have a whole bunch of arguments, which in this case doesn't really do anything. We can only have one argument. In this case, you can have many arguments, but the name of the object is going to be the thing before any spaces. Okay, now let's go one step further. I could still use this inlet. If I take this number box and put it here and change it, what did I just do? Here's what I did. I overwrote the object or the argument, okay? If an object has an argument like this and then something comes in, whatever came in wins, okay? The more recent thing always overwrites this, okay? If there's a way to overwrite an argument, which there isn't always, but most of the time there is, Whatever comes in last or most recent is going to overwrite the argument. Now it's going to be 59 plus 191. If I click this, added up to a nice round number, that's neat. Okay, now there's really no way to get this back. Once I do this, I can't revert back to the argument. The only way is to just change this to five. The argument is essentially lost even though it doesn't update. The object doesn't show you that that argument is gone. It is. Objects never update like that and show you what they're doing in that way. You just have to know that you overwrote that argument and it's gone now. Okay, now there's a lot of cases for arguments I think we looked at earlier. A case where something like tempo is an object and you can give it an argument of the starting tempo. Tempo 01:20 P.M. Now I don't have to send it a message that says 120. I've given it a default state. That's what arguments are good at. Okay, let's use this to make a little bit of. Music 30. How Is This Useful?: Okay, how is this relevant to anything like. Yeah, I can add numbers. That's cool trick. I thought this was a music language. Well, I'm going to zoom out a little bit here. Which I'm doing just by like a pinch to zoom thing on my track pad. But you can also do it with this up here. Okay, We don't need that. One thing that's really interesting is that if we look at Miti data, it's just numbers. Let's make some Midi notes. Okay? I'm going to use an object called Note Out. I'm going to make some Midi notes. Let's look at what this object needs. The first is pitch. Okay? Let's put a number box here. That move I did, by the way, is option click and drag makes a new whatever you just did. I just like to grab things. Sometimes there's my pitch velocity. Now the velocity is how hard we hit the Midi note that I'm going to always leave the same. Let's set that to 100, Pretty loud note and do that. I don't need a number box. I'm not going to change this. I'm just going to hit it when I need it. Then Midi channel is what my third one needs. Same thing there. I'm just going to say Midi channel one, okay? Now, if I change this to 60 or so, then I hit all three of these things at the same time I should make a Midi note. Let's make some space here. Okay, here we go. I did it. These three things are the ingredients for a Midi note. The note number, the velocity, and the channel, no doubt works a lot like this number box where the math operation. Because if I hit Midi channel, it doesn't do. I hit velocity, it doesn't do anything if not number. Now that I've already given it a velocity and a Midi channel, it knows how to put it together into a Midi note so I can scrub the Sra and make all my notes net. Okay, let's use math. Let's get rid of these. Let's say for every note I play, I want to add an octave that's going to be 12 notes higher, okay? I just have to do that. Now, whatever note I play here, it's going to play it an octave higher. If I say note number 60, it's going to play note number 72. That's the same note in octave higher. But if I wanted to play both at the same time, this note and the note in octave higher, can I do that? See what's happening here is note number 51 is going to go into this number box and that's going to make a note. Note number 63 is going to go into this number box. Now this is a weird situation. Only one thing can happen at a time in Midi. But things can happen extremely fast. So this will sound like there are octaves happening. It's, you almost can't tell. But if we change this to be like a really dissonant interval, 13th, 13 half steps, which would be C to C sharp, but an octave higher as dissonant, you'll hear the dissonance. Cool. Okay, well what if we want an octave and a fifth? Fifth is seven semitones away. Let's take our initial note, add seven to it, and put it down here. Now we have initial notes coming there. We have that in octave higher. We have a fifth higher from the original. If we wanted them to be in order of low to high, we would do it this way. I guess that doesn't matter. The order doesn't matter in this case. Now we're going to have basically like a power, not a fifth and octave crazy. What if we wanted to add a major third to it? Major third is going to be four half steps away. By half steps, I mean like notes on the keyboard, if you're not savvy with music theory, a half step is the closest possible note. C to C sharp is one. C sharp to D is two. A major third is going to be four away, half steps away. Now we have major triads happening on every note, right? Remember I don't need to hit these anymore because note out is going to remember them because I did it once and now it just knows the velocity that I want. You can start to do fun stuff with Midi. What I want to do next is I want us to actually make something fun. And what we're going to make is like a fun little Midi arpegiator delay, random composition generator thing. It'll be fun, trust me. Let's dive into that and make our first reel patch. 31. Outputting MIDI Notes: Okay, so let's see how we can go from just being able to add numbers together into making a usable musical machine thing. Now I do this little patch every year when I teach in my in person college classes how to use Max. I get a little more carried away with it every time that's likely to happen here. That's what's so fun about this is that once you start building it, then it becomes just like Lego pieces. And attaching more and more and more stuff to it just gets really fun. But okay, here we go. So we're going to make something that generates some mittyes, has some timing to it. It's going to our Peggy, eight things make some chords. Ultimately we'll generate like a midi sequence of notes. Okay, the first thing we need is to make a Midi note. Let's take a object to make a mite. There's actually a few different ways we can do it, but I'm going to go with the easiest one, which is not okay. That means make a generate the sound. This is the same thing we just did. Okay? I'm going to put three number boxes here. Oops, Let's make this a little bit longer. Three number boxes. We'll do this just to keep things tidy. Okay, Now I'm going to click on the output of the number box, and drag that down to the input. Output to input, output to input. Okay? Now we remember that this one is the pitch, the note number. This one is the velocity, and this one is the Midi channel. Okay? The Midi channel, I'm going to always want to be one. In this case, I'm going to make a message. I'm just going to put a one in that message box. Maybe I'll even get rid of this number box because I'm never going to change in this patch. That can just say this. The velocity I am going to change and the pitch I am going to change. Let's leave those as they are. Okay. Next I'm going to put this all the way down at the bottom, because this is going to be like the end of my chain. That's where things are, that's the end. That's the output, basically up here. I'm going to make a Midi note here. Let's put a number box and a comment. For the comment, I'm just going to, let's say Midi note. Okay, Is that cool? Okay, then let's copy this. I'm going to say command C, Command V to paste it, we'll say poopy. Now if you're not that experience with Midi stuff, phlocitys, the volume, the note, let's just for now, connect this all the way down there and all the way down here. Okay? We need to give note doubt some information. Let's just make sure we can hear something. I'm going to lock it and I'm going to click on this one. Now it got the channel. I'm going to go here. I don't know, type in 100, it's a good velocity. Now if I drag this around, it should be generating notes, okay? So we have everything we need. Next I'm going to, let's play a note every certain amount of time, okay? Let's add a timing mechanism that's going to say at some interval it's going to send the note that's in this number box. Okay, let's maybe go to a new video for that, since it's a new topic. 32. Timing and Metro: Okay, next I need a way to hit this and maybe this at some interval. Let's unlock and get an object. Now there's a few different things we can do that will give us an output at some interval. The thing we're going to get here is a bang. With a bang, we can do pretty much anything. Let's use an object called metro. This is basically a metronome, okay? I could give it the input of the time, or I could do that just as an argument, which is what I'm really in the habit of doing. Let's say 1,000 Okay? Metro, as it does most time objects when you're not working in Ableton, Metro works on milliseconds. Metro, 1,000 means send a bang every 1,000 milliseconds, which is, in other words, every 1 second. Okay, I do need to turn the Metrodome on and off. Let's use a toggle. We could also use ones and zeros. Okay? Now let's look at that bang, okay? So I'm going to lock it and turn on that metro. Now, I should see that bang every second. Now, if I connect that bang to this number box, we're going to hear that note every second I can change this note. And it's just going to keep it going. Cool. Okay, now what if I want to change this tempo later? Let's put in a number box that's going to let us do that. This input right here, set metronome time interval, I'm going to put that number box into there. Now if it's going, we're still at 1,000 because I haven't given it anything that's going to overwrite that 1,000 But if I go here and type in let's say 500, that's going to be twice as fast. As soon as I hit return, we've overwritten the argument that's in metro now, it's this, this 1,000 even though it doesn't update to show that it's gone, is gone, okay. I can adjust the tempo here. Can go way high if I want. Okay, But let's just go back to 1,000 So contact in 1,000 hit return, Cool. I'm going to turn that off. Let's set a little note there, a little comment that says tempo. And we'll make another comment over here that says start, Stop. Sure. Those are like our main controls, right? Okay. We've set some time going with the metro object, it's hitting a bang, which is hitting our note number. Okay, Remember that we don't need to hit velocity unless we're going to change it because the net objects going to remember these two inlets. Okay, next let's do some more delay work to add some more notes. 33. Adding More Notes: Okay, so let's say in between each of these notes, I want to hear that note again, but an octave higher, okay? So I have to do two things in order for this to happen. Right? I have to set up a number box that's got that number of my Midi note but an octave higher. And then I have to set up a timing to hit it at the right time. First, let's get the right number in there. I'm always going to want this number, but an octave higher, that's going to be this number. Plus 12, always. Okay, let's take this, we're going to go plus space 12. We're going to take this number. Now, let's make a number box and go there. Okay? Whenever this number is changed, this number is going to have the right number. I have to do something to feed this plus 12 first. But as soon as that changes, which would be anytime it's hit, if I just started the metronome, it would hit it and then this would populate. Okay, So I have the right number right now. I need to find a way for this to get hit in between each of these. How am I going to do that? Okay, let's think about this. This is hitting every 1,000 milliseconds, okay? This is getting hit, okay? So what I need to do is I want something that happens right in the middle of that. So basically 500 milliseconds, right? So maybe if I could delay this bang by 500 milliseconds, that would put me right in the middle. Okay, so let's try that. Let's get an object now. I need an object that's going to delay something. Okay, there's a whole bunch of different delays. I could type in delay delay, Tilda delay, R, del, MC delay, tap in, tap out. There's all kinds of different delays. They delay different kinds of stuff. Okay, what I'm trying to delay here is a bang. I just need a good old fashioned delay worth pointing out real quick since you're probably seeing it on the screen delay. And del. Del is the same thing. Del is just like a shorthand. But let's use delay, okay? Delay. And then we'll give it an argument of 500, okay? Now, I'm going to look for this bang, because delay needs to get a bang. If we look at its input here, bang gets delayed. Or we can send it the word stop and that will cancel the delay, but the bang gets delayed. If you give this anything other than a bang, it's going to give you an air. Let's grab this bang. This is going to output a bang after 500 milliseconds, so it's going to hold onto it for half our time. Let's get a bang. I'm going to put it right here, here. Then I'm going to hit that bang, or that bang is going to hit this number box, which is going to go generate our next note. Okay, well let's walk through that. This is going to hit the metronome 1,000 is going to hit here, okay? That's going to trigger a bang. That bang is both going to trigger our current note and go into this delay. It's going to wait 500 milliseconds, then it's going to bang this bang, which is going to hit our added note a mite there. If this works, we should hear our initial note every 1,000 milliseconds, with an octave higher in between. A bum, bum, bum, bum, bum, bum. Let's try it. Here we go. Okay, do you hear what's happening? What's happening is that what we're hearing here is we're hearing the note and the octave every time this metro hits. And then we're hearing just the upper octave on when the delay hits. Okay, why is that happening? The problem lies. It's because when this number is changing, it's coming in that's triggering the output. Okay? We don't want this, we want to change this number without triggering its output. The easiest option for this is going to be not to use a number box, but to use a message. Okay, in this way we'll take this number, we'll put it in to the right inlet because if we put our mouse over that, it says set the message without output, which is what we want. We just wanted to put it there. And then this bang, we'll put on the left inlet because it says trigger the message. Okay, now let's change this want and connect this. Now let's listen. There we go. Okay, moving on. 34. Designing for the Future: Okay, now there's something I did here that I want to talk through and I'm going to, it, it's a little bit of a tricky concept as to why I'm going to change it. What it is is this delay 500. The reason I want to change the way I did that is because I still want it to be delayed 500. But I want to change the way it's handling that. Because what's going to happen when I change the tempo? Let's say I changed the tempo to 2000. Okay, now this is 2000. This is still 500 though. Now it's not going to be our nice bouncy thing, it's going to have a lopsidedness to it. Or if I did it fast like 400, now it's all monkey. Oh, it's not even going to get the 500. Let's do 700. Okay. So this isn't always going to be exactly half of that. Whenever I change the number, it's going to screw that up. It's only going to be exactly half if we're at 1,000 BPM. So let's set it up so that we can change the tempo. And we'll always be at half for this delay. Okay? I want to put this here, and this over here, There we go. Okay? So instead of 500, I need to derive 500 from this number, okay? So the way I'm going to do that is pretty easily, I'm going to say divide by space two. I'm going to take that from there. And then I'm going to put that into the right side of my delay object. Okay, Now I'm still going to leave the argument at 500 because we might as well have a default there. That's a safe bet, since this one is defaulting at 1,000 But now, if I change this to be faster, this is always going to be exactly half of that. Now, you may have said, well, you're not exactly that. If you're at 865 and you divide it by two, you've got a remainder. But we don't really deal with partial milliseconds here. It's going to have to be close enough. Let's hear it, okay? You can speed it up. Okay. Now, it's always going to be exactly half. This is designing for the future, right? Like we're building something where I'm not going to hard code these numbers. I'm not going to put those numbers in there and say those are just what they are. I want them to be modifiable in a way that doesn't break the whole system. So instead of just writing delay 500, I'm going to set up a way to derive that number from another number that I might change. Okay, so you're going to see us do that a lot. It's the same reason that down here we didn't just write 82 in this box and then send that down. We derived the octave from the number so that we can change it. Cool. Okay, let's move on and add a couple more notes. 35. A Few More Notes: Okay, so far, so good. Let's add a few more of these, okay? I'm going to take our velocity and just put that over here so we're not doing anything with it yet. Now what I'm going to do here is I'm going to these five objects and their connections. Okay, I'm going to copy them. I'm going to click somewhere outside of that and hit Paste. I'm going to drag them over here. Okay, I'm going to do it twice actually. Okay, this is going to give me a unique little unit that I can do more fun stuff with. Okay, let's connect it. We got to connect our tempo to our math operator here two times. We need to connect our note to our math operator here, two times we need to connect our output to our Midi note there. Now, all three are hooked up, but all three are the same. Let's say if this is this, 100 is the quarter note, this divided by two is the eighth note. Okay? What if I wanted a note to come as the first 16th and last 16th? Okay? Basically, in between those two, the first one is easy because it's going to be half of that. Okay? If it's 1,000 we want to get 250. What do we divide 1,000 by to get to 50? Is it four? Let's find out if we're right. Let's just temporarily put a little number box here and change this to 1,000 and we got 250. Great. Okay, now I don't need this number box. I like to throw little number boxes on stuff just to test sometimes. Okay, now here's the trickier one here. We're going to need to get 750, because we want this one to be the last 16th note. If 1,000 is our tempo, 750 is what we want. 1,000 divided by what gets us 750. Okay. There's two different ways we could get this number. One of them would be 1.33 ish is going to get us there. I added a little number box so we could see 751. That gets us more or less right at this speed for what we're doing, we're going to be one millisecond off. Probably won't notice that there is a little more reliable way we could get it though. Remember that if this results in 500 and this results in 250, I'm trying to get something to result in 750. There's another way to do it. It would be just plus the result of this and the result of this. Now, I don't need this at all. What I did here was took this and this which is 502. 50. And just added it together and that's going to get me the 750 that I want. Right. And so that'll work just fine. So let's go with that. Okay. Now, I'm just noticing I never hooked up these delays to that, okay? So if you are confused by what I just did, I am going to walk through it one more time. Okay? Okay. So let me just walk through this. Before we hear it, we are going to hear a note every 1,000 milliseconds because of this. Okay? That note is going to be whatever is here, currently, 70. It's fine. Then we're going to an octave hire of that, not because of this. Plus 12 every 500 milliseconds, halfway in between each one of this note. Okay, Then we go over here. This is going to give us know, every 250 milliseconds before this one. We're going to hear this one first. It is also going to be an octave, but let's change that. Let's make this one a fifth, which is 77 half steps. This one will be a fifth. We'll hear a fifth first, and then an octave. Then we're going to hear this one, which is getting its information a little bit differently then the other two because it's adding the result of this and this to get its delay, which will be by default 750 at the tempo of 1,000 Let's make this one, I don't know, maybe two octaves. I'm going to change that to 24. Okay, I think it should work. Let's try it. Oh, but we have to change some stuff to get values here. Let's change this 53 or so. Let's make sure that we're all on the same page here, Okay, Now I'm going to hit Start. It works how pretty? Okay, that's neat. Let's make it neater by changing this note. 36. Tilde (~) Objects: Okay, let's talk about working with audio stuff. We've already done stuff with Midi and with numbers. Audio signals work a little bit differently. We have two main things that tell us. We're dealing with an audio signal, that is that most objects that are carrying an audio signal have a little tilda after them. Something like that. Let's see if I can zoom in on that. There we go. Okay, we have the name of the object and then a little tilda. The tilda is supposed to be like a little sine wave. It's just a naming convention that means this is an audio signal thing. Not all objects have it. They don't have to have that in order to handle audio, but most of them do. Another thing that you'll see, I don't think I can generate it, is that the patch cords, oops, misspelled, that the patch cords that connect the two have this yellow striped look to them, that tells me that there's audio going between these two objects, that yellow striped thing. Okay, if I did this, you can see there's just numbers or data flowing through this patch, but there's audio flowing through this patch cord. Now if you get into doing video stuff, you'll find that video things are green. The patch cords are green. When you see those two things, you know you're dealing with audio, you've got a object with a little tilda in it and you've got a patch that's this yellow poca thing. Now always at the end of every patch that is processing audio, you're going to have Dc unless you're in Max for live. Max for live, you're going to have something called plug out that means send that back to live. But I'm not in Live right now, this isn't going to work for me. C means send it to my speakers, my digital analog converter. You can also use something called Easy, which makes this little speaker looking thing before we really make any sound here, there's a couple settings we need to make sure we have set up. Let's go to a new video and talk about our audio settings to make all of this work. 37. Audio Settings: Okay. You might remember from the previous class that when we have a Dak object or something that looks like this, we have to turn it on and off. We can do that down here, or we can do it with one of these by clicking on it. Or we can do it with one of these by sending it a one, or a zero, or a toggle. But there are still some more settings. I'm going to go up to options and audio status that gives me this window. This tells me that audio is on how much CPU it's using. The main thing I care about right now is my input and output device. My input is going to be if I have a mic plugged in or anything like that, I don't really care about that. But if I did want to use this mic, I would set it to universal audio thunderbolt because that's my audio interface. This microphone is plugged into that universal audio thunderbolt. But I don't want to do that right now. Output device in every normal circumstance in the world, do you need to say whatever your speakers are connected to? If you're just working on a laptop, it might be external headphone output or something like that, it might be speaker output, whatever. For me, I have a whole bunch of things connected to my computer that can handle making sound. The main one is the Universal Audio thunderbolt. That is my Apollo twin audio interface that's over here. Now, I'm not using that at the moment because this is my sound capture system that I need to make this video. I'm using this right now, but normally I would be using my actual audio output. We're going to set those to where we want. You can mess around with sampling rate, buffer size, your inputs and outputs if you want. This is where you would do all of that. But mostly I'm going to set up my input and output device. Now if you change your input or output device, it's very likely that your audio system is going to turn off, just turn it back on. If anything weird happens with your audio, like it's not making sound, go to this window and make sure that it's maybe toggle it on and off again just to be safe. Okay, now we're on. I'm going to close that window. I can confirm it. I like to use this little click object. It does exactly what it sounds like. It makes it a tiny little digital click. And now I'm hearing it. I can see the signal happening down here. And it's nice and easy. Go ahead and try that. Make a little patch using click tilda, put a bang into it to generate the click, put a signal going to the output. Now I'm only hearing my left channel here because that's what the doc does. This is my left channel. This is my right channel. If I want to hear it in stereo, I can do that now. I'll hear both channels. So go ahead and make that, make sure you're getting sound from this click object. If you're not, go to that setting and make sure that your outputs are set up correctly. 38. Volume Control: Okay. I've talked about the C down here and the easy C. We have to turn these on in order for us to get audio. Now it's interesting that audio for your whole patch is either on or off. If I click this, just turned off and now it turned on and turned off. It's just a weird thing that audio is either on or off. No matter how you turn it on, you're going to turn it on for all of these devices, whether you use them or not. Typically we wouldn't have multiple docks, just have one. I'm going to do this and put a little toggle here. Okay, This is how we're going to turn that on. Okay, Now we can hear our little click. Now this set up is not a great way to do it. What I should really have is a volume meter before I get to the deck, right? Because if I just play something and it's just screaming loud, I don't have any way to control that here. Get in the habit of putting some volume meters before your deck. Let's do it. I'm going to delete those. Go up here to my objects, go to audio gain control and make one of those. Now I'm going to put my signal into that gain control. Interestingly, look at the bottom of the gain control. There's two outputs here, they're really close together. Okay, I'm going to take the left one and put that into my signal. Okay? The right one actually just gives you a number that tells you the value of the slider here, which can be useful sometimes but is not right now. Now, I'm not going to hear anything, but if I turn it up, I will hear it all the way up. Cool. Okay. But I'm Mano again, I could add my right channel here, two different ways. I could just take it from here since I am never going to need to change the volume of the click on the left or right to be different. Now it'll be both sides. Or if I didn't want to do that, I could make another volume meter, take the click into there. Now I have two volume meters that I can control separately. Right. Either way is going to work, it just depends on how you want to control it. Get in the habit of putting a volume meter before your, so that you can control the level and you don't hurt yourself or your speakers. Okay, now let's talk about getting an audio signal in to our patch. 39. Microphone Input: Okay. So if I want to get an audio signal in like from my microphone, I need a new object. And that object, it's going to be the opposite of a deck. It's going to be an ADC analog to digital converter. Right? It's going to have a tilda on it. Okay, That is going to listen for something coming in. Now let's look at the help file for this. We can give it a start and stop. We can give it some arguments of what channel to listen for. But by default, it's going to be listening for inputs 1.2 Let's use another new object, a meter. This is just like a level meter and plug it into channels 1.21 Cool trick about level. You can grab it by the corner and just stretch it to make it bigger. But if you make it longer, whoop, eventually it'll switch to be oriented vertically. If you just so it down, do it that way, okay? Okay, now this is going to show us the signal coming in. I need to start it up. I already know we're not going to see any signal, right? Because in our settings, we didn't set up an input signal. Let's try it. Let's go to audio settings again. If I go to input device and say, Universal Audio Thunderbolt, that's the same microphone I'm using now. Okay? It wants me to restart my audio. Okay. Check, check, check. All right. It's working. Hopefully you can still hear me. Cool. We have a signal coming in on the first channel because that's where my microphone is plugged into now. I can see it here. I could route it down to here. I could route it into this. I could do anything I want to it. But that's how we get an audio signal in. Adc is going to ask for where you have a microphone plugged in or some signal plugged in and let you do whatever you want with it. Cool. All right, next let's talk about a few other audio interface objects and then we'll make like a quick little audio project. 40. Simple Sound File Player: Okay, let's make something that can just play a simple audio file. I'm going to get rid of this, We'll get rid of that, we'll keep these two things. Okay, cool. I'm going to use Ac, and I need a way to turn on and off that C. I want to be able to scale my volume. I'm just going to nudge this in here because I think it looks that way. We'll do that too. I could just use that live game for this, but now I'll be able to see and adjust my levels, okay? I want to be able to just play a sound file, okay? There's a few different ways to do this. I'm going to do it the classic way, just to show you the process that goes into thinking through this, Okay, So the first thing I'm going to need is an object that can play an audio file. Let's think about what this might be called. What is an object going to be called that can play a sound file? Take a guess, you might be right. Sound file play is not quite it, but play SF, play tilda is what we want, that's going to play a sound file. Let's look at the help for it. F play two. It takes an argument of the number of channels. If we want to stereo file, we're going to put two. Okay, let's do that on ours. A play two. Now you'll notice I have three outputs. Channel one, output, channel two, output and bang. When done playing at the end of the file, this is going to send out a bang that could be useful. Okay, I've got some controls I can do. Stop the file, loop the file go to a certain point and open the file. I'm going to unlock this help file, because you can do that. I'm going to grab these two things. Copy. I'm going to go up here and Paste. Cool, I don't need this little comment. Okay, let's go open and start. Stop. Okay, now I just need to connect my output to my level meter. I'll also connect it to this is a level meter, this is a Gain control, my right channel. Do the same thing, okay? And then my outputs are already connected here. I don't need this output to go because I'm just using it to see what's going on. That's basically all we need. Okay, let's lock it, and let's use it. When I click on this open button, it's going to open like a finder window, and I'm going to have to select an audio file. Okay. Let's dig around my hard drive and find an audiophile. Okay. Okay. Here's a piano, something from another project I was working on. I said okay and loaded it. Now if I click on this, it's going to start playing in. Okay. I can adjust the volume. Neat. A simple sound file player, we can see that there's an audio signal going through the patch chords. And these patch chords, not this patch, okay? We can see our signal happening here. We can scale it everything we need for a good simple audio patch. Okay, now let's do something a little more interesting. Let's make an audio delay effect. 41. A Multi-Input Source: Okay, let's make an audio delay. I want to get a little fancy with this. Let's get a little fancy with it. Here's what I'm going to do. I'm going to take my deck and I'm going to put it way down here. And I'm going to take this stuff. Maybe I'll put this down here with it. I'm going to keep this up here, okay? But what I want to do is give myself the option to have multiple inputs, right? What if I could use the sound file as my input, but I could also my microphone. I want to switch between the two. Okay, this is cool. I'm going to add, let's do an ADC. You think that's what it is, except I need a Z, n x. Okay, here's a signal coming out of that. What I'm going to need here is something to switch between the inputs. I think I could do that with a selector, tilda. Let's look at our inputs here. Turns input off, or routes to output input one. Okay, let's look at the help file. Assign one of several inputs to an outlet. I have a bunch of different inputs and I give it an argument of the number of inputs. And then this inlet selects which one I want to hear. That looks pretty good. Okay, let's go back over here. I'm going to have two inlets. Let's just treat our audio file as mono for now. That'll just make everything easier. I'm going to put that into inlet two. This, I'm talking into inlet one here to channel one. That's all I need. Then I'm going to take this out and put it into our signal that does it. The only thing I have left to do is create some way to toggle between them. We could say, let's do it with a message over here, we'll say sound file or my input. Now, I can't send these messages directly into selector. That's not going to work. What selector needs, there is a number, zero is going to turn it off, then one is going to be this, and two is going to be that. Let's actually make an off option. Okay, here's a fun little trick you can do. I'm going to take another message box, put a zero in it. Now when I click, it's going to send a bang. Well it's going to send the word off to this message, which should just output this message box to zero and turn it off. Same thing with one. I can go into same thing with two. Oops, two. Now when M input, I can click input. It's going to say two selector which is going to switch selector into listening to this. Now, I might need a bang in between these two. Let's find out. Okay, let's turn on our deck. Cha, cha cha. All right, so now our mice input is going through. Switch the sound file. I'll hit play on it. There's no open file. Let's open a file. Dance music from hell, I actually know what that is, but that's okay. Play. Okay. Now if I switch the sound file, now my mic is off and I can turn everything off. Okay, so I can switch between two or just turn it off. Okay, cool. That works pretty well. We could have more inputs if we wanted to. If we wanted to have ten different sound files, we could do that. We just need selector ten. Okay, now we have multiple inputs coming in. That's pretty cool. Now let's create our audio delay. 42. Delay Objects: Now, wouldn't it be cool if everything I told you about objects so far was universally always true for all objects? That would be cool, but that's not true. Unfortunately, there are a handful of objects that are weird, exceptions to the way they work. One of them is the primary way that we're going to do an audio delay. Let's make a new object. And if I just say delay, let's see what we got here. We can delay a bang delay, Tilda delay a signal. Let's come back to that one in a minute. Delay, R is something. Pipe is a type of delay. Mc delay, Tilda, multi channel delay. A signal tap in input to a delay line. Mc tap in, tap out output from a delay line. There's all kinds of different things. Delay a signal sounds like what we need. Let's create it then. Let's look at the help file. Use the delay object to delay a signal by a certain amount of time. The delay time can be specified in samples determined by the sampling right or using the max time format syntax above. Okay, this isn't the best way to do this because this Tilda option is for delaying by a certain number of samples. It's not exactly what we want to do here. What we want to do is this tap in option. This is a weird object. We've got Ta in. Let's look at the help file. Tap in Now this comes. If you've ever used delays before, effect petals or anything like that, you may know the term multi tap delay. That's when a feedback, it does feedback on itself and it comes back like several times quieter each time it's a multi tap delay. That's basically what we're going to do here. The argument we're going to give it is the maximum delay time. We can put in whatever we want here. Then we use this tap out object to actually get it at a certain time. Let me show you what that means. Let's put in here 2000. Okay, that's 2 seconds. I'm going to take my audio signal, let's do one channel for now and say tap in 2000. So that means basically make a bucket that's 2 seconds long and start dumping that sound into it. And then I'm going to come and get it when I want, but it's never going to go bigger than 2000 milliseconds. Okay, When I'm ready to get it, I'm going to tap out Tilda. And I could do 2000 milliseconds, but let's say five, oops, tap out Tilda space 500 milliseconds. A half a second. Okay, we'll connect that. Now you're thinking, this is the weird exception here. Isn't there audio going here? Why did this not get an audio signal line? There's an interesting answer to that. The reason is, what's really happening here is that tap in is creating a buffer. A buffer is like that bucket. It's a chunk of space somewhere else on your computer. Tap in, making that buffer, and it's setting it aside and it's holding our audio signal there. What Tap out is doing is saying go to that buffer and bring that back. These are only connected to show that they're accessing the same buffer, not that they're sharing a signal between them. Coming out of tap out will be an audio signal, right? We have an audio signal going in. They're connected just to show that they're using the same buffer. But then an audio signal comes out of tap out. It's a strange object, it's weird. But here's something cool we can do with it. We can have multiple tap outs. We can do that. We can do this all day long. Okay. What's going to happen here is that the first tap out, the first delay of our signal is going to go on to the left channel. The second one, after a second, is going to go on to the right channel. And the third one, after a second and a half, is going to go back to the left channel. Let's make the third one go both left and right. Okay, The third one goes to both. Okay, let's test it. So let's do our sound file. Tell not a great example of it. This is like a student made piece. Let's do my Mike. Check, check, check, check, check, check, check, check, check, check, check, check, check, check. Okay. So we're hearing it four times, right? We're hearing the dry, we're hearing this one. We're hearing first, and then this, and we're hearing four. Okay. Let's tighty this up a little bit. Let's maybe add some more flare to this by giving ourselves volume control on each of the tap outs. 43. Volume Control: Okay, all we really need is this again. I'm going to copy this and put it over here. Actually, this can be mono. Let's put that up in there. Then let's put this down here. I'm going to get rid of this one. Put that tap out into there, and then into there. Let's take this one. I know this gets ugly after a while, but you just get used to seeing it. Both of these, we'll put them into both. Okay, now I can control the volume of the delay. Let's say I want to do, this would be a typical delay, right? It's going to work a little bit better. Check, check. Okay, maybe we go check, check, check, check, check, check, check, check. This one's like barely register, register Tutu. There, there it is. There it is, okay. So this is great. You know, now we've got everything we basically need for a delay line. Now we could adjust the output times using a slider or anything so that they work like our Midi delay. But there's one big difference. I don't think we can adjust this one. You have to set this to be the maximum. Even if it's like 10,000 you set it to 10,000 and then you know, like you're never going to go more than that. But these I think you can readjust. Let's look at the help file. Yeah, you can set the delay time with any number or message here. If you want to change those, you can do it to be like divisions of the beat or whatever. Okay, I want to do one more thing with this patch. Let's take this opportunity to clean it up and make a nice presentation patch. 44. Presentation Mode: Okay, let's get this set up so that you might actually use it. First thing I'm going to do is think, what are the things I actually need to see on the screen? I probably need my sound file controls at least open and the play, let's click on Open. And then I'm going to write click or control. Click and go to Add to presentation. Okay, nothing's really going to happen but you're going to get this salmon hue around it. I'm just going to do that for the things I need add to presentation. I do. But this up here will do the same thing. Let's make sure we have this. I want these three buttons. I'm going to just click and drag to select them all. Add to presentation. I probably want this. Let's make my volume for each of these, but not the level meter. You could add the level meter. I don't know, This is just simple, okay? I think that's everything I need. All right, so now I'm going to click on presentation mode. Okay, Now everything's still going to work just fine. Let's add some text. I'm going to add a comment that says Select Input. Since that's probably the first thing we should do, we can move stuff around here. Do this. There's a fonts window somewhere. I think I go over to inspector I can make this look different font font style. Let's go bold. Sure. Okay, so you can mess around a font if you want. Okay, so select Input, and then we'll just put this and that. Okay, there are some tools for lining things up somewhere. Let's just say turn on audio can go there. Sound file controls, open a file, and then we'll say stop file is what this little toggle is. Okay? Then we'll say this is our volume. Maybe take this down there and this is our input volume, The volume of whatever we've selected up here. Then here we'll say delayed volumes in S. Sure. Take these three from here. I want to make them smaller to show that they're not like the main volume. Just line them up like that. Sure. Okay, fine. So there we have our cute little patch. This is everything we need, right? We can still use this exactly as is need to. Is that at the end of that, it's funny is what it meant to be. This is perfect, this is exactly what we need to go out of presentation mode. I'll see everything magically go back to where it was. Right. I can still keep working on it. Here are those text things that I added. Those got added somewhere, but I can move them around and it's not really going to matter. I can take this, throw it over there or something. When I come back, everything goes back to where it's supposed to go. Okay, so this looks nice and pretty Okay, great. So a simple audio delay. I'm going to give you this patch and then we'll move on and do something a little more complicated. 45. UI Elements: Okay, let's make a mix now. This is going to be a more complicated one, and this will be the grand finale of our class here. This is going to take us a lot of steps, but I think we can do it. Let's start with just the UI elements. This is a way that I like to start sometimes and it's just fun. Basically, we're going to make it look really nice, but it's not going to work at all. Then over the next eight or so videos, we're going to make it all work. What do we need for a mixer? First, we need volume control. Let's use something different. Let's maybe the volume, here it is. Live gain. Okay, let's use that. We're going to need panning control, Let's see what's going to be a good tool for that. If we want to use the live stuff, we would use this. Okay, We'll use that for panning. We're going to need a mute in a solo light. That's a tab. Let's do that just with a message box, But we'll do something fun with it. Okay, We'll say mute and solo. Put that at the top. Maybe we'll do this just to make it look nice, slick and all in line. Okay? I suppose maybe panning should be at top. That looks a little more normal. We'll put that right there. And then that right there, little off, looks good. Okay, now I think there's one other thing we need and that would be maybe plug ins for that. We're probably going to want a drop down list. There's a way to do that. I think it's Slider you button. Menu. There it is. Menu is going to make a, we can click there and open up a list of stuff. Let's make this a little sh to fit there. Then let's put maybe four plug in slots. Okay, I'm going to select all this and move it down. Okay, cool. Let's do one other fun thing. Let's grab a panel. Panels are pretty useless, but they just make things look pretty. I'm going to put a panel behind this whole thing, okay? Now I'm going to control click on it and say send it back. Okay. There's our panel. Let's maybe change the color of the panel a little bit to go to inspector Interior color. Let's do maybe that grids neat or the gradients neat. Sure, we'll do that. Okay, there's our mixer. We got pretty much everything. We need one channel of a mixer. Now one of the things I want to talk about in this section is like a deployment idea. What we're going to do is we're going to build this one strip of the mixer. We're going to get all of this working. Then we're going to set it up so that if we want to have ten channels, it's just duplicate, Duplicate, Duplicate, duplicate. And then we've got all the channels we want. Okay? But we're not going to duplicate things until we get the one working really well. Okay, Let's a way to test this. We need some audio signal here. Should I just do it with my microphone? Let's do a audio file, okay, SF play. And we need to start it, okay? I'll connect this volume in a minute once I know what I'm doing here. But let's go on and first set up our volume. We know how to basically do this. This is a little bit different control, so it'll work a little bit differently, but we'll figure it out. Let's go to the next video and set up our volume meter. 46. Volume and Meters: Okay, so let's connect. Well, let's first look at the help file for the live gain object. Okay, so it wants just a signal coming in, scales input audio volumes is an indication of a current sound level and decibel. Okay, so this is just give me several fancy ways of looking at it. There's audio going into here. They've changed the color of this patch cable, which is annoying, but you can do that. You can change the color of a patch cable. But I really don't like doing it because now it's not as obvious that this is an audio signal. You can still see that it's dotted so it is. But anyway, it doesn't matter. Let's take our signal, our sound, and let's put it into our live gain. That's channel two. That's channel one. We only have one channel at the moment. Okay, so we're going to hook that up. Oh, now we need an output. Huh? Let's go down here and let's easy. Sure, we'll go out. Okay, now we have four outlets out here, so let's make sure we're doing the right thing. Scaled channel one? Yes, scaled channel two. Oops, I don't want easy DC. I want easy. There we go. Now I should have two channels coming out. Let's see, Channel one. Where did you go? Channel one. Okay, Channel two. What are these other outputs? Parameter values, that's going to send a number based on where the slider is. Parameter raw values, that's going to send a zero or one range amplitude of every channel. The general amplitude that it's doing. Okay, let's put that down there now. We should have this set up. Let's go to open and will use my dance music from hell. I should say what this is when I'm filming this. Right now, it is the end of September. It is almost Halloween. In a class of mine, we made some Halloween themed dance music. That's what this is, don't judge me. Okay. So we're going to turn that on. There it is. All right, And we can scale it up and down. Clicking, dragging on this, It's great. Okay, so our gain works. Let's change it so that where it says live gain here, Let's get rid of that. I'm going to go over to the inspector. If you don't see all this stuff, be sure you click on this eye. Let's find where we can change that name. Let's just change it to game. We'll do the short name also. There it is, okay. Game shows our level at the bottom. That looks great. Okay, our volume is working next. Let's go to our panning. 47. Panning: Okay, panning in live is tricky. This is probably the trickiest part of this whole thing. Maybe the solo thing will be tricky too. But you would hope that there would just be like a pan tilda object. But there's really not. We have to do a little bit of fancy stuff to get panning to work. So the first thing I'm going to do is look at the values of this dial. I want to just see what it's sending. Zero to 127. Great. Okay. Now what I need to do is take that number. I'm going to scale it to be zero to one. What that means is that when this dial says zero, it's actually going to send out zero. But when it says 127, it's actually going to send out a one, and everything is therefore in between. There's a really easy way to do that. There's an object called scale. It takes four arguments as you can see here. Actually, there's a fifth optional argument, but the first argument is the lowest number coming in. The next argument is the highest number coming in. The next argument is the lowest number we want to come out. And I'm going to put zero decimal point there to let it know we want a floating point number. The last argument is the highest number we want coming out. Okay, Now I need a floating point number to see that. And that now I should be seeing zero up to one. Perfect. Okay, I'm going to take a multiply tilda object. This is going to multiply the signal and what that means is the volume of the signal. Okay? Let's take this into there, and then we're going to control that with this, Okay, now we're halfway there. If I take this to the output, let's call this channel two, then this is going to control the volume of a channel. Now the only thing I need to do is actually just invert this to get the other one. Okay? In order to invert this, I got to do a little bit of fancy math. But I believe if I do an expression which is exclamation point and then minus, that should invert the values that are all coming in. I don't exactly know what the expression exclamation point minus means, I just know that it works. Then I'm going to put an argument of one to tell it that I want something with floating point numbers in it. Okay? I'm going to take this number and go out here. Okay? I'm going to connect this. I'll walk through this one more time, and I'm going to connect this to the other side. Okay? So what's happening here is, let me put just another number box down here so we can see this one. Okay? As this panning moves it, this is just translating its value into a zero to one value. All right? I need a floating point number here, that's why I didn't do what I expected it to do. Okay? When this is all the way to the left one here in our first channel, okay? It's going to be this one. When we have all the way on the right, we have one here, there it is, if I get it. And zero here. Okay. Everything in between. Okay. It's a little cumbersome to do it this way. Okay. Now I just need to connect this to my right in Lit, I be able to pan with this dial. Cool. Okay, and again, I can change that live dial text by going down here and just writing pan on short name. We'll probably do it. Okay, That was probably the hardest part of this. Let's go on and do the mute button. 48. Mute: Okay, up next, let's connect our mute button. Now there's a way that you might think this could work. There's a few different ways we could do it, actually. We could do this. We could just put a zero here, put a bang here, just for good measure. And then put that into our game, right? And let's connect our mute button to that bang. When I click the mute button, the volume of our gain goes to zero. Let's fire things up. Oops. Okay, let's open dance music from Hell again. Okay, there it is. Now, if I hit mute, it went all the way. Oh, its value is. Okay. So here if I mouse over it, it says the parameter is negative 70 up to six. If I want this to go to the bottom, I need to type in negative 70. Okay? Now, when I hit Mute, it goes down to zero. Okay? That's cool. But that creates a problem, right? Because now I can't hit mute again. To bring it back up to where it was. I would have to store somewhere a value of where it was to unmute it. This isn't a very good way to do it. Let's try a different approach. What if I just took another one of these multiply jobs, ran our signal through that before the panner? It could be after the panner, but if it's before the panner, then I only need to do this once. We'll go out of this into both of the pannersow. With this, I'll just say one all the way up and zero all the way off. Let's put a bang on both of these. It's got to be separate bangs. Okay, Now I, now I have a problem here. So I can connect, mute to the zero, right? That works. But I need a way where I can hit it again to turn it back off. This is a fun little problem. Okay, watch this. Let me explain one more time why this isn't going to work. I can hit mute and it's going to multiply my signal by zero. Which is going to mute it, right? That's cool. But now I want to be able to hit mute again and have it mute. It's got to hit this button when I hit it a second time, every other time I hit it, it needs to hit the other one. Okay, here's how I'm going to do that. Let's do a counter object with an argument of one. That means the maximum number get to is one. A counter is going to count bangs. Okay, let's put a number box so we can see it. There's the bang, we're going to count. Okay, now we're going to take our mute button and go up to there. Let's get rid of this one, Okay, Now we're going to use a Select object. Select is just going to look for specific numbers. I'm going to give it the arguments of some numbers I wanted to look for 0.1 okay? When it gets to zero, I want to say turn that on. And when it gets to one I want to say turn that off. That's going to make it toggle between these two. See, as I click it, you can see it's going back and forth. Okay, cool. In theory it's working hoops signal mutt mute. Ok, let's a little fancier with it. What if we can make it turn red like that when it's on and then turn it back to black when it's off. We can totally do that. We're going to use something called an attribute. What we're going to do here is create an attribute object that's AT T R U I. That's going to magically turn into this when you make it. Now once you plug it in to something, if I take the output and go into that message box, you can double click here and see a bunch of attributes that you can change. I'm going to select background color now. I also went into the objects and changed display mode to single number float, That's going to let me change this number into two different colors. Weirdly what it's doing right now, and I don't entirely understand why, but it's working out perfectly for me, is that if I set it to zero, it turns it to black. And if I set it to anything that's not zero, it turns it red, which is perfect. Because now I can just connect these two numbers. Zero means the mute off, One means the mute is on. If I click on it, it's going to, let's make sure we did that correctly. I'm going to have to open this again. Play. Turn on some audio. Turn my panning up. Okay. Mutamuta. Okay. I have those backwards. Okay. This one needs to go here. This one needs to go here. Okay. Now it's not muted now, it is muted. All right, so it's working great. I can get rid of this. There are other ways to deal with attributes in Max. This is the easiest to use, this attributes object. Okay, now let's deal with solo. 49. Effects: Okay, plug in time, okay? This one is going to be weird. We're going to use this object, VST. Now I believe VST can actually load any plug in. First thing I want to do is list all of my available VST'skay. Let's put this down here. Up here. We're going to use an object called VST scan that's going to tell me what my VSTs are. I'm going to say list VST. Okay? And then I can plug that into VST scan. Then if I wanted to fill in this dropdown list, I'm going to need to say prepended would put first the word append. Put this list right. Append to what comes out of this. Then put that into that, okay? If I hit this little list, VST, okay? Something came up there. And here's all the VST is on my computer. Wow, that's a lot, it looks like this is showing us all the plug ins on my computer. Okay, cool. Let's do that for all four of these. I can't just connect this four times, or maybe I can. Well, let's finish this one first. What I need to do to get into the VST object to actually load this is I need to write another pre penned plug. Because the VST object needs the word plug and then the name of the plug in that it wants out of this dropdown menu. I need to take the middle outlet that these menus, they're called. On the left, they'll output the number of the thing that you selected, 12345 in the middle, they'll output the name of the thing you selected. The actual text on the right it says dump out. I'm not really sure what that is, but we need the name. We're going to take the name of it into pre penned plug then put that here. Okay, I suppose we could do this for all four of them, but we need separate VST objects for each one. If we want to load four ST's, we need four VST objects out of the middle outlet. The middle outlet to. The middle outlet to there. Okay? Now we also need to send our audio into here. Right? Let's do these in series. Our audio signal is coming in here. It's going through our panning before it goes into our volume. Let's run it into here. And then here's channel two, out, in and out. Then that will go into our mixer for channel one out and in, oops, out, and then out into our volume, okay? Okay. Now the only thing left to do here is we need to hit this load VST, this list VST. When this patch opens, basically at some point we need to hit that. The easiest way to do that is with an object called load bang. What that's going to do is as soon as this patch loads, it's going to shoot out a bang. And that's going to hit that list and then load all those plug ins to that list so we can select one and load it up. Okay, I know it's getting pretty ugly, but we're almost done. We're actually with the main function of the thing. Now what we need to do is tidy it up and deploy it out so that we have eight channels. Let's do that next. 50. "Patchers": Okay. The next thing I want to show you is how do you use patches? This is going to help us tidy this up, a whole bunch. Okay? A patch is a way to hide a bunch of stuff inside another object. Watch this, Let's say this stuff, this stuff is all just cumbersome. I'm going to make a patcher, I'm going to make another object. I'm going to call it is the name of the object that is a patch. And then I'm going to give it a name, any name. Let's call it Solo Routing. I don't think the name can have a space in it. Now, a whole new window popped up and it's called Solo routing. What I could do is take all of this, copy it, and put it in there. Now I need to get in and out of it, I could in let actually I don't need to get into this at all. I just need a whole bunch of outlets. Actually, these are all going to the same place. I only need one outlet. I can connect all of these to this outlet. Okay. That's going to send them all out here. Here's my patch. This. Okay. Now I can go here and delete these. And just put this right there, pretty neat, huh? Now, this doesn't need to be saved as a separate file. You can if you want, but it's in this patch. Okay. So to that end, if we wanted to, we could wrap all of this up in another patch. In fact, let's do it. This is going to be a little cumbersome to do. Okay, let's make a patch called Channel One. Okay, Now in my Channel One patch, I'm going to take everything except for the actual patch, the Channel one patcher. Let's put that over there. Okay, let's take everything. We'll put that in this patcher. Okay, Now I'm just going to replace all of this stuff with inlets and outlets. Here's my main audio output. Oops, I'm going to need two of these. That looks like channel two, doesn't it? It's Channel 1.2 Okay, here's another outlet, Channel two. I can label these. If I go to my patcher and I say comment, this is going to be audio one, this is going to be audio two. Okay. Now this VST, let's make another one, okay? And this needs to go to the gain one, we'll say to gain one, that's going to replace this. Then this is going to be to gain two. Now, if you're thinking to yourself, why are we doing this? I don't get what we're doing here. This will make more sense in a minute. Let me tidy this up and then you'll see why I did it this way. Actually, I don't need these at all because these are going to be on the outside. Let's get rid of those. You'll notice that these now just automatically turn to 1.2 okay? So this is an input because this panning **** needs to get sent into here. Okay, let's make an inlet. In this inlet, we'll put a comment that says from Pan **** output. Okay, what else is connected here? Solo. Okay, here's another input. We're going to connect this to where that is, then we're going to say. From solo button. Okay, what's going on up here? Okay, this will say from mute button that needs to hit that. And then we can get rid of this. Okay, There's four inputs from our. This goes to the pre Penn plug. Then we can get rid of these, but we're going to label these plug in one, plug in two, plug in three, and plug in four. Okay? What is all right. This is the color changer needs to go to the mute button. Okay? This is the one that isn't going to work. Here's what I'm going to do. I'm going to separate it right here. I'm going to bring this one over. This needs to be plugged directly into that object for it to work. We'll keep it on the outside. We'll make an inlet outlet, an outlet right here. These two things get sent in for this, we'll say two BG color attribute. Then we'll break that. This is a little tricky one, but I'm going to, I'm going to copy this and put it out here to remind me that this has to stay going to that. Ok. All right, but now I can get rid of that and that. All right, now just this pen send business and we're done. Okay, so just an outlet, this pre pen send can go there. You just need to do it once because it can all go to the same spot. Then let's call this to VST ST input. Okay. Now if I go back to my main thing, I can get rid of virtually everything. Let's keep this because it's just for our testing stuff. Oh, did I do that? We got to add that to we need an inlet and then that can go there. Let's put that over here and then that'll take place of that. This one will label as audio input inputs. Okay? All right, so now we can get rid of this and we can get rid of all of this. See how much nicer that looks. We'll leave this here, although we can hide this way down here if we want. And then this channel, okay, let's put this down here too. This is all we need. This is all of our guts. We just have to connect everything now. Okay. So our audio input goes there. This is from, Connect that to there, from solo button. Connect that to there from mute button. Connect that to the plug in one, that's the middle inlet to that plug in. And then the next three are going to be all these plug ins. All right, let's check our outputs. Let's get rid of this. And we have gain one audio channels two. Or actually, no, no, no, no, no. How it was before was, right. These are going to go into gain one and gain two. Then my outputs here are still my output there, okay? And then this goes to VST input, which is there. And that is true of all of them. And this 12 BG color attribute that goes to there. All right? And that's it. Right now, it's quite easy to hide all of this stuff, right? I could just say this is what I want in presentation. View, select that control, click Add to Presentation. Okay, now I go to presentation. I just have my mixer. Now, I could have done that with everything else, but this makes it a lot easier to deploy out all eight of my channels. Let's do that next. 51. More Channels!: All right, one more thing, now, we've got this all set up, we can just deploy it out. So I need to copy everything here. Actually, one thing I'm going to do first is I'm going to take this and I'm going to take my ugly bits and just pull them down here a little bit more. Okay, Now I'm going to select everything. I'm going to go here, then I'm going to take these two ugly things and take them down. Maybe even more than that, okay? Because I am going to need to get in there. Okay. Now, I'm going to take these two. Actually I'm going to take all four. I'm going to take all of it. Copy that, that's cool. Then leaving this out of there. Let's take all of that again and that. Okay, so now I got some real ugliness here, but if I go into patcher mode, things look pretty good except my alignment is way off. I could tidy this up. It should be like that. I don't know why this got off there. That's slightly better. Anyway, let's make it work. First thing, let's take our audio signal that needs to actually, first, let's take all of our channels. I'm going to rename this one. This is going to be this one's channel three. I moved it up here just so I could see what it was connected to. Okay, This must be channel two. Yes, channel two. Let's find another one. This is channel 12345. Let's put that over there. This one is channel seven. This one is channel eight. This one is channel six, and this one is channel four. Okay, so first thing I need to do is connect our audio signal to all of them into the first input here. Give it some audio to process. This is turning into a nice and ugly patch. Good Max patches are always just hideous to look at. Okay. Now I think the only thing I have left to do other than connecting my audio output on each of these, I need to go into here. I suppose I could do woots, pardon me, while I connect some lines. Get uglier and uglier. Okay. The only other thing I need to do, I think is the solo thing. Channel one should be all set up. Let's go to channel two. If I double click on channel two, I open the patch that is controlling channel two. Okay. Now I can go into patch solo routing. Double click on that. Okay. Now I need to change this one to one and then I don't want 2345678. Okay, that should be good. Let's go to channel three. And then in the solo routing. Okay, here I need channels. Replace this one with one, that should do it. Right? 12, I don't want 345678. That works. Okay, that was three. Let's go to four. Here it is, Solar routing. So we replace four with one and that'll get me what I want. Okay. 45. It's up here. Solar routing, replace five with one. Six. Solar routing, play six with one. Almost done seven. Solo routing. Play seven with one and eight, place eight with one. Okay. Now it should be all working. Okay. So if I solo something, okay, that didn't quite work. Why? Okay, It seems to always be behaving with as though it's one. Okay? But easy enough, a good opportunity to talk about debugging. So let's go to a new video and talk about that. 52. Debugging: Okay. You're probably saying to yourself, well, all of that and now it doesn't work. This is common and I wanted to include this. I could have just as easily made it edit and just showed it working. But there's a problem somewhere and we need to find it. This will happen on every patch you have. There's going to be something that you're going to have to drill down into and find what the problem is. What's happening here is whenever we solo something, channel one is always the one soloing no matter what we do. That means somewhere something is telling Channel one to be soloed. No matter what we do. I know exactly what the problem is. It's this right here. Because in every one of these, we said channel one solo right here. This is channel one. That's right. But if I go to channel two, it says channel one solo. That's where we went wrong. We need to say channel two solo on channel two. On channel three, we need to say channel three solo that we're sending the right message. Hopefully, after we update all of these, this fixes the problem five, this data handling where you're turning a bunch of stuff off and turning something else on is always a pain in Max there are better ways to do this using a matrix system, but this is the way I do it and it's not very efficient. But okay, let's try our mute solo system now. Solo, turn it off. Solo. Solo. Solo. Good. Perfect. Okay, we do have some problems with multiple solos and not turning off a solo, but we'll leave that alone for now. From here on out, it appears to all be working. Let's clean it up just a little bit more and then we'll wrap this one up. 53. Final Cleanup: Okay, you might be saying this is cool, we made this patch. What good is this patch? Well, to be honest, this patch isn't super useful other than as a way to learn how to use all these different elements of Max. But we have a single sound source coming into the mixer eight times. What we should really do if we want this to be useful is make eight different sound source inputs. Eventually we could make our own W this way. But this was just an experiment to get us learning how to use really quite well. This is a complicated project. Okay, let's check in on our presentation view. It still looks pretty good. I actually like these to just really brush up on each other so you can't even see the difference. I'm just going to use the arrow keys to nudge them over. It looks pretty good. Oops, one more on that one, one more. Now, if you go to a menu, there are some and distribute things that would help some of this just to line things up and keep things tidy. But this way it works too. All right. There's a nice little mixer. If we really wanted to maybe make it pop just a little bit more, could probably put a border on this border size two. There we go. That's okay. All right, let's call it good. So I'm going to save this. I'll give you this for monkey and around with if you want to. Then let's go on and talk about why doing this in Max for live would be so much easier. 54. Learning How to Learn Max: Okay, I've said this before about Max. That's that you can't possibly learn every object there is in Max, it might look like I'm pulling some of these names of objects just out of nowhere from my memory. And I am for the most part. But that's because I've taught teaching these exact examples several times. I know these particular objects really well, but I don't know every object, You will never know every object. The goal of learning is to learn how to learn so that you can always be adapting and learning new stuff as something comes up. So we'll get comfortable with those help files, get comfortable looking around and finding new solutions to problems that come up. Now this mixer is really interesting example because in the old days of Max, if you wanted to do something really cool with Max, you had to build everything from scratch. If you wanted to do something that used eight channels of sound, you had to build an eight channel mixer. If you wanted to do something that there was a sequence, you had to build the sequencer. But since the invention of Max for Live, you don't need to do that. Those things can exist, you can tap into Ableton to handle a lot of that stuff for you. That's really the power of Max for live. You don't need to build a mixer anymore. You can use Ableton and you can just focus on doing the cool thing that you want to do. In the next big section, we're going to talk about how to integrate stuff with Ableton. That means working in Max for live, all the code we already learned, all of this stuff still applies. You can use all the same objects. You can do all the same stuff, but you can do more. You can do more by asking Ableton for some information. You can say, hey Ableton, what's our tempo? You can say, hey Ableton, where are we in the timeline? All kinds of stuff. You can send things back to Ableton. You can basically control all of Ableton with some very specific commands. It's fun. In the next section, we're going to really focus on working with Max for live. 55. Bonus Lecture: Hey everyone, want to learn more about what I'm up to? You can sign up for my email list here. If you do that, I'll let you know about when new courses are released and when I make additions or changes to courses you're already enrolled in. Also check out on this site. I post a lot of stuff there and I check into it every day. Please come hang out with me in one of those two places or both, and we'll see you there.