document.addEventListener('keydown', (event) => {
if (event.ctrlKey && event.key === ']') {
const activeTextarea = document.querySelector('textarea.handsontableInput');
if (activeTextarea) {
const originalValue = activeTextarea.value;
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // possibilities are endless with substitutions | |
| outlets = 3; | |
| inlets = 4; | |
| var mstr = ` | |
| <svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"> | |
| <circle cx="50" cy="50" r="40" fill="blue" /> | |
| </svg> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| You will always move in the direction of your strongest thought -- so make it a good one. | |
| */ | |
| include("ztrk_pattern_utils.js"); | |
| outlets = 3; | |
| inlets = 4; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import math | |
| def parse_pat(filepath): | |
| patterns = {} | |
| current_pattern = None | |
| with open(filepath, "r") as f: | |
| for raw_line in f: | |
| line = raw_line.strip() | |
| if not line or line.startswith(";"): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defun c:ArcToLine2 (/ *error* blg blk ent objts cnt blgLoc pts stp mxp cur ent2d) | |
| (vl-load-com) | |
| (defun *error* (msg) | |
| (and uFlag (vla-EndUndoMark doc)) | |
| (and ov (mapcar (function setvar) vl ov)) | |
| (and msg | |
| (or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*") | |
| (princ (strcat "\n** Error: " msg " **")))) | |
| (princ)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ''' | |
| in verts v | |
| in faces s | |
| out v_out v | |
| out e_out s | |
| ''' | |
| import numpy as np |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import bpy | |
| import xlsxwriter | |
| fname = r"C:\Users\DealgaMcArdle\Documents\Blender Experiments\creating_EXCEL_FILE\excel_example\xls_output.xlsx" | |
| # prepare data | |
| sdata = bpy.data.texts['data'].as_string().split('\n') | |
| names_and_dateissued = [s.split(' ') for s in sdata] | |
| structured_data = {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def intersect_line_plane(v1, v2, plane_co, plane_no): | |
| u = l2[0]-l1[0], l2[1]-l1[1], l2[2]-l1[2] | |
| h = l1[0]-plane_co[0], l1[1]-plane_co[1], l1[2]-plane_co[2] | |
| dot = plane_no[0]*u[0] + plane_no[1]*u[1] + plane_no[2]*u[2] | |
| if abs(dot) > 1.0e-5: | |
| f = -(plane_no[0]*h[0] + plane_no[1]*h[1] + plane_no[2]*h[2]) / dot | |
| return l1[0]+u[0]*f, l1[1]+u[1]*f, l1[2]+u[2]*f | |
| else: | |
| # parallel to plane |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ''' | |
| in verts v | |
| in edges s | |
| out new_verts v | |
| out new_edges s | |
| ''' | |
| import numpy as np | |
| def shortest_edge_between_edges(edge1, edge2): |
Creating an old-school music tracker-style sequencer in Max for Live (M4L) is a fun and creative project! Trackers are known for their vertical, pattern-based interface where notes are entered in a grid, often with columns representing different instruments or voices. Below is a step-by-step guide to building a basic tracker-style sequencer in Max for Live:
Before diving into Max, sketch out the key components of your tracker:
- Pattern Grid: A vertical grid where each row represents a step and each column represents a voice or instrument.
- Note Input: A way to input notes (e.g., via MIDI or a virtual keyboard).
- Playback Controls: Play, stop, and tempo controls.
- Pattern Length: Adjustable pattern length (e.g., 16 steps, 32 steps).
NewerOlder