Hello osculator-wiimote users,
I've been working on a wiimote musical composition, making use of 3 general wiimote gestures:
1) Striking - like striking a drum - accomplished using the osculator "MIDI Note" feature, attached to the accel param.
2) Swinging - like waving a wand - accomplished using the osculator "MIDI Note w/ Params", triggered by a button, and using "Note Params" to set musical-pitch and velocity based on wiimote-pitch and roll. Note: this is enhanced by enabling in osculator Parameters/IO/MIDI Notes w Params settings/CHECK ON Emulate Pitch Bend Wheel.
3) Discrete Positions [the focus of this post] - like placing the wiimote in a specific spacial area (such as into different mailbox cubbies) to trigger different pitches - I accomplished this by combining osculator and midipipe. Osculator sends out MIDI CC (controller) signals associated with a parameter such as wiimote-pitch, and a trigger event using MIDI Note. Osculater sends these MIDI signals to a shared MIDI bus, such as IAC Bus 1. Midipipe then takes input from that MIDI bus, and applies an applescript trigger shown below, and then sends the new output do a different MIDI buss (ex: IAC Bus 2). This script is effectively similar to the osculator MIDI Note w/ Params, except that I am able to control which specific notes are returned -- in my current case, I'm using the wiimote-pitch parameter, to define areas of an arc that correspond with notes from a pentatonic minor scale [Cm: C, Eb, F, G, Bb, C] (vs. returning several chromatic notes [C, Db, D, Eb, E, F]).
Hopefully someone may find this useful.
best,
donfede
I've been working on a wiimote musical composition, making use of 3 general wiimote gestures:
1) Striking - like striking a drum - accomplished using the osculator "MIDI Note" feature, attached to the accel param.
2) Swinging - like waving a wand - accomplished using the osculator "MIDI Note w/ Params", triggered by a button, and using "Note Params" to set musical-pitch and velocity based on wiimote-pitch and roll. Note: this is enhanced by enabling in osculator Parameters/IO/MIDI Notes w Params settings/CHECK ON Emulate Pitch Bend Wheel.
3) Discrete Positions [the focus of this post] - like placing the wiimote in a specific spacial area (such as into different mailbox cubbies) to trigger different pitches - I accomplished this by combining osculator and midipipe. Osculator sends out MIDI CC (controller) signals associated with a parameter such as wiimote-pitch, and a trigger event using MIDI Note. Osculater sends these MIDI signals to a shared MIDI bus, such as IAC Bus 1. Midipipe then takes input from that MIDI bus, and applies an applescript trigger shown below, and then sends the new output do a different MIDI buss (ex: IAC Bus 2). This script is effectively similar to the osculator MIDI Note w/ Params, except that I am able to control which specific notes are returned -- in my current case, I'm using the wiimote-pitch parameter, to define areas of an arc that correspond with notes from a pentatonic minor scale [Cm: C, Eb, F, G, Bb, C] (vs. returning several chromatic notes [C, Db, D, Eb, E, F]).
Code:
-- script for MidiPipe to take control input and transform it to note-on events for a pentatonic scale -- to be used with a Wii remote, and WiiToMidi or OSCulator -- created 2012-04-03 donfede@casagrau.org property InputController : 40 -- MIDI CC controller we are watching to calculte pitch value property InputChannel : 4 -- listen to input from MIDI channel 4 only property InputTrigger : 24 -- note-on/off event we are watching for (C0) property FlagNotesOff : 0 -- flag to also send an all notes off command with the note event (0 == off) property NewOutNote : 0 on runme(message) -- look for 176 MIDI CC Status message from the controller we are watching if ((item 1 of message = (175 + InputChannel) ) and (item 2 of message = InputController)) then -- convert message to a Note-On event for the correct note. -- divide the spectrum into fifths for pentatonic minor scale if (item 3 of message is less than 22) then set NewOutNote to 48 -- C4 (do) else if (item 3 of message is less than 43) then set NewOutNote to 51 -- Eb4 (me) else if (item 3 of message is less than 64) then set NewOutNote to 53 -- F4 (fa) else if (item 3 of message is less than 85) then set NewOutNote to 55 -- G4 (sol) else if (item 3 of message is less than 106) then set NewOutNote to 58 -- Bb4 (te) else if (item 3 of message is less than 129) then set NewOutNote to 60 -- C5 (do) end if -- item 3 analyze end if -- check for MIDI CC 176 -- look for for note on/off triggers to respond to, using the note value extracted above if ((item 1 of message = (143 + InputChannel)) and (item 2 of message = InputTrigger)) or ((item 1 of message = (127 + InputChannel)) and (item 2 of message = InputTrigger)) then -- set item 2 of message to (item 1 of NewOutNoteRef) set item 2 of message to NewOutNote set item 3 of message to 100 -- static volume of 100/127 to start with if (FlagNotesOff = 1) then -- insert CC 123 (all notes off) and then add the new note-on event set returnMessage to {(175 + InputChannel), 123, 0, item 1 of message, item 2 of message, item 3 of message} else set returnMessage to {item 1 of message, item 2 of message, item 3 of message} end if -- notes off check return returnMessage end if -- respond to triggers end runme
best,
donfede
Comment