///////////////////////////////////////////////////////////////////////////////////////////////// // // functions: wrap up functionality in a neat name //
( var f = { | a, b | a + b; // last thing in function is what is returned };
# Import everything needed to edit video clips | |
from moviepy.editor import * | |
from vectortween.PointAnimation import PointAnimation | |
fps = 25 | |
duration = 10 | |
W = 2000 | |
H = 500 | |
# Generate a text clip |
import moviepy.editor as mpy | |
from vectortween.Mapping import Mapping | |
basename = 'video.mp4' | |
inputfile = basename + ".mp4" | |
outputfile = basename + ".new.mp4" | |
video_file = mpy.VideoFileClip(inputfile) | |
duration = video_file.duration # duration | |
video_width, video_height = video_file.size | |
textclip = mpy.TextClip("www.YouTube.com",fontsize=30,color="red") |
///////////////////////////////////////////////////////////////////////////////////////////////// // // functions: wrap up functionality in a neat name //
( var f = { | a, b | a + b; // last thing in function is what is returned };
// continuous | |
( | |
~stream = Pwhite(50, 70, 5).asStream; | |
) | |
( | |
~stream.next.debug("next value"); | |
) | |
( |
// note: the trickiest part to getting scores to work is to | |
// properly escape all the quotes " and backslashes \ while creating the html string | |
// showing simple fragment | |
( | |
var webview = WebView().minSize_(300@600); | |
var browser = View(bounds:900@700).layout_(VLayout(webview)); | |
webview.setHtml(html:"<html> | |
<head> | |
<meta charset='utf-8'> | |
<meta http-equiv=\"content-type\" content=\"text/html\" /> |
( | |
var webview = WebView().minSize_(300@200); | |
var browser = View(bounds:900@700).layout_(VLayout(webview)); | |
webview.setHtml(html:" | |
<div id=\"myscore\"></div> | |
<script src=\"https://unpkg.com/vexflow/releases/vexflow-min.js\"> </script> | |
<script> | |
var vf = new Vex.Flow.Factory({ | |
renderer: {elementId: 'myscore', width: 500, height: 200} |
( s.waitForBoot({ var deg_to_bass = ( 1: "c3", 2: "d3", 3: "e3", 4: "f3", 5: "g3", 6: "a3", 7: "b3",
( | |
// By James McCartney | |
var w, h = 1080, v = 720, seed, run = true, phase = 0; | |
var text_radius = 300; // pixels | |
var text_angle_increment = 7.degrad; // 7 degrees converted to radians | |
var text_start_angle = 0; | |
var text_center_x = 0; | |
var text_center_y = 0; |
( | |
s.waitForBoot({ | |
Ndef(\bits, { | |
var t = PulseCount.ar(Impulse.ar(8e3)); | |
var sig = HPF.ar( | |
( | |
((t * 15) & (t >> 5)) | | |
((t * 5) & (t >> [3, 4])) | | |
((t * 2) & (t >> 9)) | | |
((t * 8) & (t >> 11)) | |