Routing Questions
So I'm working on a patch that takes audio input, and outputs MIDI messages by using the sigmund~ in coordination with makenote and noteout. I've got my thresholds set fine, and the pitch tracking and note detection is working quite well. The problem is duration - makenote anticipates a pre-determined duration, but we don't know what that is until the note has stopped, at which point we want to send our MIDI note "off" message.
First thing's first: i need a way of re-routing note "off" messages from "makenote," so that when the velocity = 0, the note value will get re-routed to the cold input on a float. Not really sure what object in Pd can do this.
Next, the patch needs a way of determining when to send the note "off." The goal is to send that message whenever there is A. a sudden change in volume, or B. a sudden change in pitch. I'm currently using unsig~ to output a real-time value every 40 ms, as well as a value that is delayed 40ms, in order to compare volume level and pitch in real time (over a period of 40ms). Whenever pitch changes, it will send a bang to the float that holds the note value, as well as to another float that holds a default "0" velocity value, which are both then sent simultaneously to the makenote object thus sending a note "off" whenever pitch changes. The same bang can also be sent whenever volume changes by a predetermined threshold (15 dB over this 40ms frame), thus sending a note "off" whenever a note is released.
At the moment, the real roadbloack is the signal re-routing I want to achieve, to send the MIDI note value from "makenote" to a float whenever velocity = 0.
If anybody has comments on how I could improve the system, I'd love to hear them.
Use of makenote and noteout
Make sure you connect the right outlet (velocity) of [makenote] into the velocity inlet of [noteout]. As it is now, you're just sending the note number out of [makenote]. [noteout] pairs that with whatever velocity value is stored in it's second inlet, and since you haven't updated it, it's stored value is zero.
Timelapse audio - hopw to record splits of seconds
You could try and record it directly to disk using [writesf~]. Stick it inside of a subpatch with a [switch~], and use a [metro 15000] to turn the [switch~] on every 15 seconds and turn it off a half second later using a [delay 500] or [makenote 1 500]:
[metro 15000]
|
[makenote 1 500]
|
[switch~]
The [switch~] turns dsp on and off in the subpatch, making it act sort of like a pause/play. You'll probably want to use a declicking envelope as well.
Novation Launchpad LED's
Never used Launchpad, but I'm guessing you need to give [makenote] a duration argument. It's in milliseconds, so if you want one second use something like [makenote 16 1000] (the first argument is velocity). Or send a time in the third inlet.
Strip-Controller Ideas Anyone?
Shankar;
1. You could use any resistive element as a voltage divider, magnetic tape, resistive wire... I've been thinking of getting a tub of that 'magnetic paint' they sell in craft stores here; it is just iron mixed with a binder. I'm guessing if you add the right amount of graphite tho the paint, you can mask a surface, paint a few coats, and you are golden.
2. The overall resistance, or length of the physical object will not affect resolution, as long as your are using the midi standard. The resolution depends on the ADC. Midi constant control messages will give you 127 steps. To increase resolution, some other platform(arduino, etc...) and 'language(osc, serial) is needed.
3. How about a linear encoder? Google rotary encoders to see how they work... Ok? Now, fabricate a meter long strip of plastic or whatever with holes evenly spaced along it. Get a few IR gap detectors, also called slot detectors, basically an IR emitter/receptor pair. Glue two of these side by side so that your strip can go between both of them. Mount your "shuttle" (the slot detectors) so that you can move it up and down the strip. Hook these guys to two DIGITAL pins on an arduino(or anything else) and use some example code from the ardiuno playground. Basically, each time the detector goes HIGH, you increment or decrement a counter variable by 1. The direction is determined by which of your two detectors goes HIGH first. The benifits of this are: Your "resolution' is unlimited, it is determined by the number of holes in the strip and the spacing. It is much 'cheaper' in terms of cpu load, because it uses no ADC.
Stripnote (newbie)
Hi all,
I'm new to the forum and brand new with PD (I use Aeolus, AlsaModular, FluidSynth, Bristol). I have trouble dealing with makenote and stripnote. What I would like to do, is using PD to drive Fluidsynth/Timidity (having in mind a synth for kids project, mixing soundfonts and PD synthesis) for GM sounds.
I can do it for short sounds, but not with organ, and long noises as birds, sea, stream, helicopter... I whish to use a tgl or radio-button to send note-on and note-off messages, after few hours I can only start the sound and schedule a note-off with makenote. But what I wish is the ability to start/stop the sound, as the media/midi test tgl do. I think I have to deal with stripnote, but can't do it.
Thanks for your help, I apologize for my poor english.
Changing midi sounds and more
1. use "program change" MIDI messages, and optionally "bank select" (a particular "control change" controller) MIDI messages
2. from Pd's help browser -> 5.reference -> 0.INTRO.txt:
------------------------------ MIDI ----------------------------------
notein ctlin pgmin bendin touchin polytouchin midiin sysexin - MIDI input
noteout ctlout pgmout bendout touchout polytouchout midiout - MIDI output
makenote - schedule a delayed "note off" message corresponding to a note-on
stripnote - strip "note off" messages
Generative composition?
Make a pd patch that uses 4 things
- a metronome to get the beat
- a random number generator between 0 and 127
- a note event maker
- a midi output object
connected like so
[1( switch on
|
[metro 125]
|
[random 127]
|
[makenote 64 120] velocity, duration
| | ,
[noteout]
Yes, this is generative composition. The generator in this case is noise.
Transposing midi notes with controller and note si
[select 51] outputs a bang at the left outlet when the input to the left inlet is equal to 51, otherwise it passes it through to the right outlet unchanged.
Transposing up by 1 semitone can be done with [+ 1], change the right inlet to change the transpose amount. If you're sending the note to midi hardware, the transpose should be a whole number of semitones.
You'll need the objects [notein] [noteout] [ctlin] for interfacing with external midi.
A problem you might run into is if you have a note held down while changing the transpose amount, because then the note-off message that arrives later will be transposed to a different note than the note-on message was, leading to stuck notes. If you can live with having notes all being a fixed length, look into [stripnote] and [makenote] (I think that's what they're called, check the midi section of the "test audio and midi" patch in the media menu).
Ambisonics? and Matrix?
This is quoted from a mail passing in the Canadian Electroacoustic Community about three new ambisonic objects for PD. Seems quite well done.
"""""""""""""""""""""""""""""""
I'm very pleased to announce that new objects for sound spatialization are
available on the CICM web site : [url=http://www.mshparisnord.org/cicm/dl_en.htm
]http://www.mshparisnord.org/cicm/dl_en.htm
These objects are developed by Rémi Mignot and Jean-Baptiste Thiébaut. Most
of them are available for Macintosh, Windows and Linux for Max/MSP and PD.
ambipan~ is an external that uses ambisonic techniques for a surround
panning up to 16 loudspeakers. The ambisonic algorithm is from Michael
Gerzon.
ambicube~is a 3-dimensional version of ambipan~ so you can use it with two
levels of loudspeakers
vbapan~is an external that uses vector based amplitude panning for a
surround panning up to 16 loudspeakers. The vbap algorithl is from Ville
Pulkki.
trajectory is an intuitive abstraction for drawing trajectories. It
contains 8 graphical tools such as ellipse, spiral, broken line, etc.
Trajectories can be stored. The coordinates may be send to ambipan~ and
vbapan~ to localise up to 16 independent sounds.
Help files are written in French for instance, the trajectory help is
bilingual.
Your feedback is welcome !
"""""""""""""""""""""""""""""""""""""""""""""""""""
