├── .DS_Store
├── DesktopTemplate
├── sketch.properties
├── .DS_Store
├── data
│ ├── .DS_Store
│ └── mykbeat.wav
├── AndroidManifest.xml
├── DesktopTemplate.pde
├── Licence.txt
└── MaximJava_api.pde
├── AndroidTemplate
├── sketch.properties
├── .DS_Store
├── data
│ ├── .DS_Store
│ └── mybeat.wav
├── web-export
│ ├── mybeat.wav
│ ├── index.html
│ └── AndroidTemplate.pde
├── AndroidManifest.xml
├── Licence.txt
├── AndroidTemplate.pde
└── android_api.pde
├── JavaScriptTemplate
├── .DS_Store
├── sketch.properties
├── data
│ ├── .DS_Store
│ └── mykbeat.wav
├── template
│ ├── .DS_Store
│ └── template.html
├── web-export
│ ├── mykbeat.wav
│ ├── JavaScriptTemplate.pde
│ ├── index.html
│ └── maxim.js
├── JavaScriptTemplate.pde
├── Licence.txt
└── maxim.js
└── README.md
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/micknoise/Maxim/HEAD/.DS_Store
--------------------------------------------------------------------------------
/DesktopTemplate/sketch.properties:
--------------------------------------------------------------------------------
1 | mode.id=processing.mode.java.JavaMode
2 | mode=Java
3 |
--------------------------------------------------------------------------------
/AndroidTemplate/sketch.properties:
--------------------------------------------------------------------------------
1 | mode.id=processing.mode.android.AndroidMode
2 | mode=Android
3 |
--------------------------------------------------------------------------------
/AndroidTemplate/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/micknoise/Maxim/HEAD/AndroidTemplate/.DS_Store
--------------------------------------------------------------------------------
/DesktopTemplate/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/micknoise/Maxim/HEAD/DesktopTemplate/.DS_Store
--------------------------------------------------------------------------------
/JavaScriptTemplate/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/micknoise/Maxim/HEAD/JavaScriptTemplate/.DS_Store
--------------------------------------------------------------------------------
/AndroidTemplate/data/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/micknoise/Maxim/HEAD/AndroidTemplate/data/.DS_Store
--------------------------------------------------------------------------------
/AndroidTemplate/data/mybeat.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/micknoise/Maxim/HEAD/AndroidTemplate/data/mybeat.wav
--------------------------------------------------------------------------------
/DesktopTemplate/data/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/micknoise/Maxim/HEAD/DesktopTemplate/data/.DS_Store
--------------------------------------------------------------------------------
/JavaScriptTemplate/sketch.properties:
--------------------------------------------------------------------------------
1 | mode.id=de.bezier.mode.javascript.JavaScriptMode
2 | mode=JavaScript
3 |
--------------------------------------------------------------------------------
/DesktopTemplate/data/mykbeat.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/micknoise/Maxim/HEAD/DesktopTemplate/data/mykbeat.wav
--------------------------------------------------------------------------------
/JavaScriptTemplate/data/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/micknoise/Maxim/HEAD/JavaScriptTemplate/data/.DS_Store
--------------------------------------------------------------------------------
/JavaScriptTemplate/data/mykbeat.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/micknoise/Maxim/HEAD/JavaScriptTemplate/data/mykbeat.wav
--------------------------------------------------------------------------------
/AndroidTemplate/web-export/mybeat.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/micknoise/Maxim/HEAD/AndroidTemplate/web-export/mybeat.wav
--------------------------------------------------------------------------------
/JavaScriptTemplate/template/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/micknoise/Maxim/HEAD/JavaScriptTemplate/template/.DS_Store
--------------------------------------------------------------------------------
/JavaScriptTemplate/web-export/mykbeat.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/micknoise/Maxim/HEAD/JavaScriptTemplate/web-export/mykbeat.wav
--------------------------------------------------------------------------------
/AndroidTemplate/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/DesktopTemplate/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/DesktopTemplate/DesktopTemplate.pde:
--------------------------------------------------------------------------------
1 | //The MIT License (MIT) - See Licence.txt for details
2 |
3 | //Copyright (c) 2013 Mick Grierson, Matthew Yee-King, Marco Gillies
4 |
5 |
6 | Maxim maxim;
7 |
8 |
9 | void setup()
10 | {
11 | size(640, 960);
12 |
13 | background(0);
14 |
15 |
16 | }
17 |
18 | void draw()
19 | {
20 | // code that happens every frame
21 | }
22 |
23 | void mouseDragged()
24 | {
25 | // code that happens when the mouse moves
26 | // with the button down
27 | }
28 |
29 | void mousePressed()
30 | {
31 | // code that happens when the mouse button
32 | // is pressed
33 | }
34 |
35 | void mouseReleased()
36 | {
37 | // code that happens when the mouse button
38 | // is released
39 | }
40 |
41 |
--------------------------------------------------------------------------------
/JavaScriptTemplate/JavaScriptTemplate.pde:
--------------------------------------------------------------------------------
1 | //The MIT License (MIT) - See Licence.txt for details
2 |
3 | //Copyright (c) 2013 Mick Grierson, Matthew Yee-King, Marco Gillies
4 |
5 |
6 | Maxim maxim;
7 |
8 |
9 | void setup()
10 | {
11 | size(640, 960);
12 |
13 | background(0);
14 |
15 |
16 | }
17 |
18 | void draw()
19 | {
20 | // code that happens every frame
21 | }
22 |
23 | void mouseDragged()
24 | {
25 | // code that happens when the mouse moves
26 | // with the button down
27 | }
28 |
29 | void mousePressed()
30 | {
31 | // code that happens when the mouse button
32 | // is pressed
33 | }
34 |
35 | void mouseReleased()
36 | {
37 | // code that happens when the mouse button
38 | // is released
39 | }
40 |
41 |
--------------------------------------------------------------------------------
/JavaScriptTemplate/web-export/JavaScriptTemplate.pde:
--------------------------------------------------------------------------------
1 | //The MIT License (MIT) - See Licence.txt for details
2 |
3 | //Copyright (c) 2013 Mick Grierson, Matthew Yee-King, Marco Gillies
4 |
5 |
6 | Maxim maxim;
7 |
8 |
9 | void setup()
10 | {
11 | size(640, 960);
12 |
13 | background(0);
14 |
15 |
16 | }
17 |
18 | void draw()
19 | {
20 | // code that happens every frame
21 | }
22 |
23 | void mouseDragged()
24 | {
25 | // code that happens when the mouse moves
26 | // with the button down
27 | }
28 |
29 | void mousePressed()
30 | {
31 | // code that happens when the mouse button
32 | // is pressed
33 | }
34 |
35 | void mouseReleased()
36 | {
37 | // code that happens when the mouse button
38 | // is released
39 | }
40 |
41 |
42 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Maxim
2 | =====
3 |
4 | OK so this was a quickly hacked together thing we did for a MOOC in 2013. I really don't think you want to use this anymore but I'll leave it here for posterity.
5 |
6 | ------------------
7 |
8 | Cross Platform JavaScript/Java Audio DSP and Mobile Web Development Library Compatible with Processing
9 |
10 | Maxim is designed to make it easier to program cross platform audio for desktops amd mobile platforms.
11 | It provides a single API for building complex audio applications on Android, iOS and the Desktop, using
12 | the WebAudioAPI in combination with traditional Java approaches for compatibility.
13 |
14 | It's a work in progress, but vastly simplifies the process of getting started writing audio and music software
15 | for mobile platforms
16 |
17 | Some notes :
18 |
19 | If you are using javascript mode, make sure your browser supports WebAudioAPI properly.
20 |
21 | See here for a list of browsers that support WebAudio
22 |
23 | http://caniuse.com/audio-api
24 |
--------------------------------------------------------------------------------
/AndroidTemplate/Licence.txt:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2013 Mick Grierson, Matthew Yee-King, Marco Gillies
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7 |
8 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9 |
--------------------------------------------------------------------------------
/DesktopTemplate/Licence.txt:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2013 Mick Grierson, Matthew Yee-King, Marco Gillies
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7 |
8 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9 |
--------------------------------------------------------------------------------
/JavaScriptTemplate/Licence.txt:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2013 Mick Grierson, Matthew Yee-King, Marco Gillies
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7 |
8 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9 |
--------------------------------------------------------------------------------
/AndroidTemplate/AndroidTemplate.pde:
--------------------------------------------------------------------------------
1 | //When running on the iPad or iPhone, you won't see anything unless you tap the screen.
2 | //If it doesn't appear to work first time, always try refreshing the browser.
3 |
4 | Maxim maxim;
5 | AudioPlayer player;
6 | float go;
7 | boolean playit;
8 |
9 | int elements = 20;// This is the number of points and lines we will calculate at once. 1000 is alot actually.
10 |
11 | void setup() {
12 | //The size is iPad Portrait.
13 | //If you want landscape, you should swap the values.
14 | size(768, 1024);
15 |
16 | frameRate(25); // this is the framerate. Tweak for performance
17 | maxim = new Maxim(this);
18 | player = maxim.loadFile("mybeat.wav");
19 | player.setLooping(true);
20 | player.setAnalysing(true);
21 | noStroke();
22 | rectMode(CENTER);
23 | background(0);
24 | colorMode(HSB);
25 | }
26 |
27 | void draw() {
28 |
29 | if (playit) {
30 |
31 | player.play();
32 | float power = player.getAveragePower();
33 | //go+=power*50;
34 | go = power * 50;
35 | translate(width/2, height/2);// we translate the whole sketch to the centre of the screen, so 0,0 is in the middle.
36 | for (int i = elements; i > 0;i--) {
37 | fill((5*i+go)%255, power*512, 255); // this for loop calculates the x and y position for each node in the system and draws a line between it and the next.
38 | ellipse((mouseX-(width/2))*(elements-i)/elements, (mouseY-(height/2))*(elements-i)/elements, width*1.5/elements*i, height*1.5/elements*i);
39 | }
40 | player.speed((float) mouseX / (float) width);
41 | }
42 | }
43 |
44 | void mousePressed() {
45 |
46 | playit = !playit;
47 |
48 | if (playit) {
49 |
50 | player.play();
51 | }
52 | else {
53 |
54 | player.stop();
55 | }
56 | }
57 |
58 |
--------------------------------------------------------------------------------
/AndroidTemplate/web-export/index.html:
--------------------------------------------------------------------------------
1 |
2 |