Skip to content

Instantly share code, notes, and snippets.

@hsitz
hsitz / Orca custom operator
Created June 19, 2023 16:56
custom operator for javascript Orca
/* this gist is javascript and goes in the library.js file */
/* that's part of Orca install. I had it between the */
/* 'OperatorMidi' and 'OperatorCC' functions, though that order */
/* is just for organization, not necessary. */
library['~'] = function OperatorMidiWithTranspose (orca, x, y, passive) {
Operator.call(this, orca, x, y, '~', true)
this.name = 'midiwithtranspose'
this.info = 'Sends MIDI note with note transpose'
@hsitz
hsitz / seq_knobs
Last active April 27, 2020 16:21
tapseq
@OnLoad
// one more time
// is his here now?
// another change
// and anoher
// change this to the note of the paired Hardware Controller (Drum Pads optional)
// picking notes on a Keyboard works just fine too. But it's create for tapping out sequenced rhythms
Controller_Note = 36 // change this to the note of the paired Hardware Controller (Drum Pads optional)
@OnLoad
FillArray seq, 0, 128
seq = [1,3, 5, 7, 9, 11, 10, 8, 6, 4, 2]
seqndx = 0
call SetUpScale
delay = 100
ShowLayout 2
// script that implements
// something like geoshred's
// autooctave.
// this will currently not
// do anything unless you're
// playing "legato", defined
// as pressing next key
// before previous key is
// released. If playing
// legato, the octave
@hsitz
hsitz / velcurve
Last active April 16, 2020 04:02
normcurve = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ]
normcurve = [ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 ]
normcurve = [ 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 ]
normcurve = [ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39 ]
normcurve = [ 40, 41, 42, 43, 44, 45, 46, 47, 48, 49 ]
@OnLoad
// on_notes array will record the note
// that is actually played for
// any given note value.
// e.g., if note 60 is pressed
// but it is offset to 72
// then on_notes[60] will be 72.
fillarray on_notes, 0, 129
lastnote=0
lnote = 0
@OnLoad
fillarray counter, 0, 20
@END
@OnMidiNoteOn
inc counter[midichannel]
sendmidithru
@END
@OnMidiNoteOff
@OnLoad
// counter will hold the
// humber of currently-held notes for each channel
fillarray counter, 0, 10
// each channel's saved notes are put in noteoffs array
// starting at offset of 40 * [their channel #]
fillarray noteoffs, 0
// save_cnt will count how many notes
// are being saved for each channel
fillarray save_cnt, 0, 10
@OnLoad
fillarray counter, 0, 20
@END
@OnMidiNoteOn
inc counter[midichannel]
sendmidithru
@END
@OnMidiNoteOff
@hsitz
hsitz / filteroffs
Last active April 8, 2020 18:39
save all midi note offs until last key's
@OnLoad
counter = 0
fillarray noteoffs, 20, 0
fillarray channels, 20, 0
suppressed = 0
@END
@OnMidiNoteOn
inc counter
sendmidithru