-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpresets.java
executable file
·78 lines (72 loc) · 4.02 KB
/
presets.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
public class presets {
public static void main(String[] args){;}
public static double[] alien(){
return (MusicLibrary.addArrays(MusicLibrary.echo(MusicLibrary.HbeatGen(110, 8, 8, 60, (((double)2)/((double)3)),0.1),10000,0.3,0.05,0.5),MusicLibrary.HbeatGen(300, 8, 8, 50, (((double)1)/((double)4)),0.1)));
}
public static double[] electro(){
return (MusicLibrary.addArrays(MusicLibrary.echo(MusicLibrary.HbeatGen(110, 8, 8, 60, (((double)2)/((double)3)),0.1),10000,0.3,0.05,0.5),MusicLibrary.randBeatFollow(0, 8, 120, (((double)2)/((double)3)),0.1)));//beatGen
}
public static double[][] randomBeatSad(double tempo){
double[] z={440,277.183,329.628,369.994};//k, repetitive
double[] x={392.00,261.63,293.66,349.23};//too repetitive outta here
double[] c={349.23,392.00,415.30,466.16,261.63,277.18,311.13};//meh nah
double[] v={293.66,349.23,392.00,440.00,261.63};//good, good
double[][] noties = {z,x,c,v};
double[] notes = noties[MusicLibrary.randInt(0,3)];
ArrayTools.printArray(notes);
double[] notes2=MusicLibrary.shuffleNotes(notes,8);
double[] startNotes=notes2;
double[] a =MusicLibrary.noteBeatFollow(notes2, tempo, 0.5,0.8);
double[] finalie=a;
//start
notes2[0]=notes[(int) Math.floor(Math.random() * notes.length)];
notes2[1]=notes[(int) Math.floor(Math.random() * notes.length)];
double fnote=notes[0];
double snote=notes[1];
a =MusicLibrary.noteBeatFollow(notes2, tempo, 0.5,0.8);
finalie=MusicLibrary.concatArrays(finalie,a);
//end
notes2[0]=notes[(int) Math.floor(Math.random() * notes.length)];
notes2[1]=notes[(int) Math.floor(Math.random() * notes.length)];
double repnote=notes2[notes2.length-1];
notes2[notes2.length-1]=notes[(int) Math.floor(Math.random() * notes.length)];;
a =MusicLibrary.noteBeatFollow(notes2, tempo, 0.5,0.8);
finalie=MusicLibrary.concatArrays(finalie,a);
//--
notes2[0]=fnote;
notes2[1]=snote;
startNotes[startNotes.length-1]=repnote;
a =MusicLibrary.noteBeatFollow(startNotes, tempo, 0.5,0.8);
finalie=MusicLibrary.concatArrays(finalie,a);
double[] ting = {notes[(int) Math.floor(Math.random() * notes.length)],notes[(int) Math.floor(Math.random() * notes.length)],notes[(int) Math.floor(Math.random() * notes.length)],notes[(int) Math.floor(Math.random() * notes.length)],notes[(int) Math.floor(Math.random() * notes.length)],notes[(int) Math.floor(Math.random() * notes.length)],notes[(int) Math.floor(Math.random() * notes.length)],notes[(int) Math.floor(Math.random() * notes.length)]};
double[][] fin = {finalie,ting};
return (fin);
}
/*public static double[] randomBeatSadInput(){
double[] notes={440,493.883,277.183,329.628,369.994};
double[] notes2=MusicLibrary.shuffleNotes(notes,8);
double[] startNotes=notes2;
double[] a =MusicLibrary.noteBeatFollow(notes2, 120, 0.5,0.9);
double[] finalie=a;
//start
notes2[0]=notes[(int) Math.floor(Math.random() * notes.length)];
notes2[1]=notes[(int) Math.floor(Math.random() * notes.length)];
a =MusicLibrary.noteBeatFollow(notes2, 120, 0.5,0.9);
finalie=MusicLibrary.concatArray(finalie,a);
//end
notes2[0]=notes[(int) Math.floor(Math.random() * notes.length)];
notes2[1]=notes[(int) Math.floor(Math.random() * notes.length)];
a =MusicLibrary.noteBeatFollow(notes2, 120, 0.5,0.9);
finalie=MusicLibrary.concatArray(finalie,a);
//--
a =MusicLibrary.noteBeatFollow(startNotes, 120, 0.5,0.9);
finalie=MusicLibrary.concatArray(finalie,a);
return (finalie);
*/
public static double[] motorstrelski(){
return ArrayTools.scaleArray(MusicLibrary.HbeatGen(10, 1, 1, 480, 0.5,0),30);
}
public static double[] motorstrelski90(){
return ArrayTools.scaleArray(MusicLibrary.HbeatGen(10, 8, 8, 60, 0.5,0),30);
}
}