Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Download a general version of this RC file from:
- # https://pastebin.com/
- # Device numbers. Use 'aseqdump -l' to determine client names.
- dnew 0 "i2 mini 32 plus" ro
- dnew 1 "SINCO" rw
- dnew 2 "Cre8audioNiftyCASE" wo
- dnew 3 "JT-4000 MICRO" rw
- dnew 4 "RHYTHM DESIGNER RD-6" rw
- dnew 5 "Arturia MicroFreak" rw
- dnew 6 "monologue" rw
- # Inputs
- inew monologue {6 0}
- inew Arturia_MicroFreak {5 0}
- inew RD6_drum {4 0} # Device number 4, Midi channel 0. Midi
- # channel 0 is called channel 1
- # on some devices or computers.
- inew JT4000_synth {3 0}
- inew Sinco_wireless {1 0}
- inew i2_mini {0 0}
- # Outputs
- onew monologue {6 0}
- onew Arturia_MicroFreak {5 0}
- onew RD6_drum {4 0}
- onew JT4000_synth {3 0}
- onew Sinco_wireless {1 0} # Output to the Sinco because it's in- and out.
- onew NiftyCase {2 0} # I'm gonna name device 2, channel 0 to
- # output: "NiftyCase".
- # Create new (temporary) track (default is 120 BPM)
- tnew temptrack
- # Set quantisation to 16th note (check w/ 'getq'). Set tempo to 100 BPM (check w/ 'mtempo')
- setq 16; t 100
- # Go to measure 1 instead of 0 because of the problems w/ the 'wipe' procedure (see further on).
- #g 1
- # Nope. Go to bar 0 because of problems with looping...
- g 0
- ##############
- # PROCEDURES #
- ##############
- # Procedure to quantize every bar (from 0 to end) at 100%
- proc quantize \
- {
- g 0; sel [mend]; tquanta 100
- print "Everything is now quantized to "[getq]"-th note."
- }
- # Procedure to set the metronome on easier. Assume device is on Midi channel 0. Set metronome on only when recording.
- proc metronome dev_number \
- {
- metrocf {non {$dev_number 0} 68 127} {non {$dev_number 0} 60 127};
- m rec;
- print "During record the metronome is played on device: " $dev_number
- }
- # Procedure show note-to-midi conversion table.
- proc conversiontable \
- {
- print
- print "Table to convert music note to Midi-note-number: "
- print
- print " C C# D D# E F F# G G# A A# B "
- print "0 12 13 14 15 16 17 18 19 20 21 22 23 "
- print "1 24 25 26 27 28 29 30 31 32 33 34 35 "
- print "2 36 37 38 39 40 41 42 43 44 45 46 47 "
- print "3 48 49 50 51 52 53 54 55 56 57 58 59 "
- print "4 60 61 62 63 64 65 66 67 68 69 70 71 "
- print "5 72 73 74 75 76 77 78 79 80 81 82 83 "
- print "6 84 85 86 87 88 89 90 91 92 93 94 95 "
- print "7 96 97 98 99 100 101 102 103 104 104 106 107"
- print "8 108 109 110 111 112 113 114 115 116 117 118 119"
- print
- }
- # Scratchpad: sequence {ll 68 s s 64 l 62 60 s s s s s s s s}
- proc sequence mylist {
- print "Example: sequence {ll 68 s s 64 65 l 62 60 s s s s s s s} "
- print " "
- print "Input 16 Midi note numbers between curly braces { } "
- print " "
- print " s = silence/skip. "
- print " l + note = long note (8th) of 2 steps "
- print " ll + note + s + s = long long note (4th) of 4 steps (1 beat) "
- print " "
- print "Use the command [conversiontable] for conversion of notes to numbers. "
- print "Bar at which seq. will be inserted (numbering starts at 0) is: "[getpos]" th bar."
- print
- let step = 0
- let flag_l = 0
- let flag_ll = 0
- for note in $mylist {
- if $step != 16 {
- if $note != s && $note != l && $note != ll && $flag_l != 1 && $flag_ll != 1 {
- pstep [getpos] $step $note
- let step = $step + 1
- }
- if $note == s {
- let step = $step + 1
- }
- if $flag_l == 1 {
- let flag_l = 0
- pstep [getpos] $step-1 $note
- let pattern_note_length = 16
- let step = $step + 1
- }
- if $note == l && $flag_l == 0 {
- let flag_l = 1
- let pattern_note_length = 8
- let step = $step + 1 # Enter note in next loop
- }
- if $flag_ll == 1 {
- let flag_ll = 0
- pstep [getpos] $step-1 $note
- let pattern_note_length = 16
- let step = $step + 1
- }
- if $note == ll && $flag_ll == 0 {
- let flag_ll = 1
- let pattern_note_length = 4
- let step = $step + 1 # Enter note in next loop
- }
- } # close if
- } # close for
- } # close proc
- # Scratchpad (C4maj F4maj F5maj):
- # rnew i2_mini JT4000_synth; chord {60 64 67 s l 65 69 72 s s s s 77 79 84 s}
- proc chord chordlist {
- print "Example: chord {60 64 67 s l 65 69 72 s s s s 77 79 84 s} "
- print " "
- print "Input 3 note chords between curly braces { } "
- print " "
- print " s = skip a step (16th note) "
- print " chord + s = chord of a quarter note (1 beat) "
- print " l chord + 4 x s = long chord of a half note (2 beats) "
- print " ll chord + 8 x s = long long chord of 1 bar (4 beats) "
- print " "
- print "Use the command [conversiontable] for conversion of notes to numbers. "
- print "Bar at which seq. will be inserted (numbering starts at 0) is: "[getpos]" th bar."
- print
- let step = 0
- let chordpos = 0
- let counter = 0
- let flag_l = 0
- let counter_l = 0
- let flag_ll = 0
- let counter_ll = 0
- for note in $chordlist {
- if $note != s && $note != l && $note != ll && $flag_l != 1 && $flag_ll != 1 {
- let pattern_note_length = 4
- pstep [getpos] $chordpos $note
- let step = $step + 1
- }
- if $note == l {
- let flag_l = 1
- let step = $step + 1
- }
- if $note == ll {
- let flag_ll = 1
- let step = $step + 1
- }
- if $flag_l == 1 && $counter_l < 8 && $note != s && $note != l && $note != ll && $flag_ll != 1 {
- # Count if [l]ong note is set
- let counter_l = $counter_l + 1
- let pattern_note_length = 2
- pstep [getpos] $chordpos $note
- let step = $step + 1
- }
- if $flag_ll == 1 && $counter_ll <= 4 && $note != s && $note != l && $note != ll && $flag_l != 1 {
- # Count if [ll]ong long note is set
- let counter_ll = $counter_ll + 1
- let pattern_note_length = 1
- pstep [getpos] $chordpos $note
- let step = $step + 1
- }
- # Reset counter_l and flag_l
- if $counter_l >= 8 {
- let counter_l = 0
- let flag_l = 0
- }
- # Reset counter_ll and flag_ll
- if $counter_l > 4 {
- let counter_ll = 0
- let flag_ll = 0
- }
- if $note == s {
- let step = $step + 1
- }
- if $step % 4 == 0 {
- let chordpos = $step
- # End long chord modes
- let flag_l = 0
- let flag_ll = 0
- }
- } # close for
- # Reset note length to "normal"
- let pattern_note_length = 16
- } # close proc
- proc help \
- {
- print
- print "Additional procedures: "
- print "[sequence], [conversiontable], [wipe] track, [quantize], [t]empo in BPM, "
- print "[metronome] on 'devicenumber'. [chord] "
- print
- print "[sequence]: "
- print "This command takes a list of 16 Midi note numbers between curly braces { }. "
- print "You can also enter an 's' to skip a step and 'l' for a long 8th note. Use "
- print "'ll note s s' for an even longer entry of a 1/4 note. The procedure "
- print "[conversiontable] prints a table to help you to convert notes to numbers. "
- print
- print "Type '[procedure] help' for more info. "
- print
- }
- # General info to show at startup:
- print "This is the file ~/.midishrc "
- print "Inputs and outputs you can use are called (check with 'ilist; olist'): "
- print "Inputs: "
- print [ilist]
- print "Outputs: "
- print [olist]
- print
- print "Ignore these messages about Midi devices that you've not connected (yet): "
- print "alsa_open: couldn't parse alsa port"
- print
- print "Current tempo: "[mtempo]" BPM, quantsation: "[getq]"th, track: "[gett]
- print
- print "Short procedure "
- print "--------------- "
- print "1. Connect input to output, example: rnew Sinco_wireless JT4000_synth "
- print "2. Then [i]nteractive, [r]ecord, [s]top or [p]lay "
- print "3. Type [help] for more procedures or '[procedure] help' "
- print
- # ---------------------------------------------------------------------------
- # Make use of the extra functions from Jeanette C. Unfortunately one may ONLY use a hard path reference to a file to executed (you cannot use ~ for '/home/your_name/' nor /home/$USER/').
- print "Messages from midish_extrarc: "
- exec "/home/your_name/.midish_extrarc"
- print
- # ----------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement