Skip to content

Instantly share code, notes, and snippets.

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.WindowConstants;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Point;
public class DrawStuff {
import processing.sound.*;
SinOsc sine;
void setup() {
size(640, 360);
background(255);
// Create the sine oscillator
sine = new SinOsc(this);
//Imports needed
import ddf.minim.analysis.*;
import ddf.minim.*;
//object needed to access microphone
AudioInput input;
//works with input to access microphone sound
Minim minim;
//needed analyze the sound
/**
* Processing Sound Library, Example 1
*
* Five sine waves are layered to construct a cluster of frequencies.
* This method is called additive synthesis. Use the mouse position
* inside the display window to detune the cluster.
*/
import processing.sound.*;
import ddf.minim.analysis.*;
removeConsecutives(String[] a)
String[] letters = {"a","a","a","a","b","c","c","a","a","d","e","e","e","e"};
removeConsecutives(letters);
public String[] removeConsecutives(String[] a)
{
String[] newArray;
return newArray;
@memish
memish / RainFall.java
Created September 26, 2018 17:26
Practice Arrays
double[] phila = {2.85,6.02,4.74,3.94,5.21,3.34,3.06,4.11,8.35};
double[] seattle = {8.12,2.16,2.44,5.69,0.12,0.63,0.05,0.2,0.98};
double[] sandiego = {2.28,2.04,2.26,0.75,0.20,0.09,0.03,0.09,0.21};
double philaTot = 0;
double seattleTot = 0;
double sdTot = 0;
int space = 40;
@memish
memish / Starter.java
Last active September 25, 2018 13:03
int num = 0;
void setup(){
size(600,400);
}
void draw(){
background(0);
fill(255);
//text("Hello, World",20,30);
<html lang=en>
<head>
<meta charset=utf-8>
<title>Javascript gravity</title>
</head>
<body onload="init()">
<script>
//Canvas setup below
<html lang=en>
<head>
<meta charset=utf-8>
<title>Javascript gravity</title>
</head>
<body onload="init()">
<script>
var canvas, ctx, container;
import java.util.*;
public class Cryptogram
{
public Cryptogram()
{