Tuesday, January 27, 2015

Class notes 1/27: more useful MIDI objects

kslider object--gives you little visual keyboard, it'll tell you the number of the pitch when you click on the keys--or you can get these numbers from the little keyboard in the documentation

mtof--MIDI pitch number to frequency

Velocity signals are usually interpreted by receiving device as amplitude, but some synthesizers may be more sophisticated and emphasize different frequencies depending on velocity to mimic different acoustic instruments.

4n is quarter note, 4nd is dotted quarter note, 8nt eighth note triplet, or you can calculate triplets by number of ticks--to have both duple and triple feel in same piece, send each of those messages differently, or different metros

timepoint object--specify moment that you want something to happen, can be 29.1.0 (bar 29, beat 1, tick 0)

metro has attribute called @active, which means whenever the transport is on, that metro will be on--another attribute called @autostarttime (or something similar), which allows you to specify when metro turns on

drunk object--kind of random generator, not quite as random as random object

urn object--generates numbers like random object but won't repeat numbers--if you keep banging once it's out, it won't change its number but will send bangs out right inlet--can input message "clear" to restart it--Dobrian trick is to connect right outlet of urn to inlet of "clear, bang" message so it restarts automatically after it gets to the end

random object--randomness is maybe impossible? to define, b/c we actually have very little or no experience with things that are random in the universe--in computers, pseudorandom--uses deterministic system, different programming languages have different ways of doing it and expressing it--can constrain number of random possibilities in Max, so can say random 12 (gives you twelve possibilities) or send 12 in right inlet--every time it's banged, it sends out integer number between 0 and 11--if you don't give it an argument, it only chooses 0--random object only deals with positive integers

decide object--random object, but just for 0 and 1, same as random 2

noise~ object--generates white noise, can filter it to create different effects, can sample it

sah~--sample and hold, samples noise, but only when receives triggering message in R inlet--triggering message can be cycle~ object, which samples white noise 8 times per second and sends it out--add one (so it's not negative), can mess with it from there (multiply it by a frequency, etc.)

prepend object--takes whatever you type in as argument, puts that argument before whatever comes in the inlet and sends them out together

append object--same as prepend, but puts argument on end of whatever comes in inlet

text button--can have button mode or toggle mode, if toggle mode, can have diff't messages depending on whether it's toggled on or off

table object--only stores integer numbers, whereas coll object stores floating point numbers

if object--works like an if;then statement

when object--reports the time in measure, beat, and ticks, have to unpack it though

MIDI deals with equal temperament, although some synthesizers you could send to might be able to handle other tunings--MSP gives you really specific control over pitch, so that would be a better way to work--but you can use Max to map onto a tuning system you've devised yourself, using a coll object would be one way

Middle C is 60--if you divide any pitch number of C's by 12, the remainder will be zero.  Therefore:
modulo 12 operation, %: gives you remainder when divided by 12, so C is 0, C#'s are 1, D's are 2, etc.--gives you pitch class of each note--so you could find a way to multiply each pitch class by a certain number to detune them

TO LOOK INTO: umenu, drunk

No comments:

Post a Comment